diff --git a/.gitignore b/.gitignore index d21613ba4a160f..48392d17f1e0fb 100644 --- a/.gitignore +++ b/.gitignore @@ -105,6 +105,7 @@ _UpgradeReport_Files/ # coverage related /gcovr /build +/coverage # === Rules for XCode artifacts === *.xcodeproj diff --git a/.travis.yml b/.travis.yml index f6dc47d8297175..82a55c76e19b7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,10 @@ x-ccache-setup-steps: &ccache-setup-steps - export CXX='ccache g++-6' os: linux -dist: xenial language: cpp +env: + global: + - PYTHON_VERSION="2.7.15" jobs: include: - stage: "Compile" @@ -20,7 +22,7 @@ jobs: - g++-6 install: *ccache-setup-steps script: - - pyenv global 2.7.15 + - pyenv global ${PYTHON_VERSION} - ./configure - make -j2 -C out V=1 v8 @@ -34,7 +36,7 @@ jobs: - g++-6 install: *ccache-setup-steps script: - - pyenv global 2.7.15 + - pyenv global ${PYTHON_VERSION} - ./configure - make -j2 V=1 - cp out/Release/node /home/travis/.ccache @@ -47,7 +49,7 @@ jobs: - mkdir -p out/Release - cp /home/travis/.ccache/node out/Release/node script: - - pyenv global 2.7.15 + - pyenv global ${PYTHON_VERSION} - python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare default - name: "Test C++ Suites" @@ -63,7 +65,7 @@ jobs: - cp /home/travis/.ccache/cctest out/Release/cctest - touch config.gypi script: - - pyenv global 2.7.15 + - pyenv global ${PYTHON_VERSION} - out/Release/cctest - make -j1 V=1 test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp - python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare addons js-native-api node-api @@ -72,7 +74,7 @@ jobs: language: node_js node_js: "node" install: - - pyenv global 2.7.15 + - pyenv global ${PYTHON_VERSION} - make lint-py-build || true script: - NODE=$(which node) make lint lint-py diff --git a/BUILDING.md b/BUILDING.md index a1946ac7c5384d..7a17a24b595c17 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -29,7 +29,7 @@ file a new issue. * [Building the documentation](#building-the-documentation) * [Building a debug build](#building-a-debug-build) * [Windows](#windows) - * [Prerequisites](#prerequisites-1) + * [Prerequisites](#prerequisites) * [Option 1: Manual install](#option-1-manual-install) * [Option 1: Automated install with Boxstarter](#option-1-automated-install-with-boxstarter) * [Building Node.js](#building-nodejs-1) @@ -322,8 +322,7 @@ Make sure the linter does not report any issues and that all tests pass. Please do not submit patches that fail either check. If you want to run the linter without running tests, use -`make lint`/`vcbuild lint`. It will run both JavaScript linting and -C++ linting. +`make lint`/`vcbuild lint`. It will lint JavaScript, C++, and Markdown files. If you are updating tests and want to run tests in a single test file (e.g. `test/parallel/test-stream2-transform.js`): diff --git a/CHANGELOG.md b/CHANGELOG.md index deb0b763f93ac8..17c36b8ef04eec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,8 @@ release. -12.6.0
+12.7.0
+12.6.0
12.5.0
12.4.0
12.3.1
diff --git a/Makefile b/Makefile index e14edb2a034173..d7427e578f8820 100644 --- a/Makefile +++ b/Makefile @@ -488,7 +488,11 @@ test-all-suites: | clear-stalled test-build bench-addons-build doc-only ## Run a CI_NATIVE_SUITES ?= addons js-native-api node-api CI_JS_SUITES ?= default -CI_DOC := doctool +ifeq ($(node_use_openssl), false) + CI_DOC := doctool +else + CI_DOC = +endif .PHONY: test-ci-native # Build and test addons without building anything else @@ -700,7 +704,11 @@ tools/doc/node_modules: tools/doc/package.json .PHONY: doc-only doc-only: tools/doc/node_modules \ $(apidoc_dirs) $(apiassets) ## Builds the docs with the local or the global Node.js binary. - @$(MAKE) out/doc/api/all.html out/doc/api/all.json + @if [ "$(shell $(node_use_openssl))" != "true" ]; then \ + echo "Skipping doc-only (no crypto)"; \ + else \ + $(MAKE) out/doc/api/all.html out/doc/api/all.json; \ + fi .PHONY: doc doc: $(NODE_EXE) doc-only @@ -1027,7 +1035,6 @@ $(TARBALL): release-only $(NODE_EXE) doc $(RM) -r $(TARNAME)/tools/node_modules $(RM) -r $(TARNAME)/tools/osx-* $(RM) -r $(TARNAME)/tools/osx-pkg.pmdoc - $(RM) -r $(TARNAME)/tools/pkgsrc find $(TARNAME)/ -name ".eslint*" -maxdepth 2 | xargs $(RM) find $(TARNAME)/ -type l | xargs $(RM) # annoying on windows tar -cf $(TARNAME).tar $(TARNAME) diff --git a/common.gypi b/common.gypi index c106549f67c264..1eadd779a34427 100644 --- a/common.gypi +++ b/common.gypi @@ -38,7 +38,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.14', + 'v8_embedder_string': '-node.16', ##### V8 defaults for Node.js ##### @@ -84,25 +84,49 @@ }, { 'openssl_no_asm%': 0, }], - ['GENERATOR=="ninja"', { - 'obj_dir': '<(PRODUCT_DIR)/obj', - 'v8_base': '<(PRODUCT_DIR)/obj/tools/v8_gypfiles/libv8_snapshot.a', - }, { - 'obj_dir%': '<(PRODUCT_DIR)/obj.target', - 'v8_base': '<(PRODUCT_DIR)/obj.target/tools/v8_gypfiles/libv8_snapshot.a', - }], ['OS == "win"', { 'os_posix': 0, 'v8_postmortem_support%': 0, - 'obj_dir': '<(PRODUCT_DIR)/obj', - 'v8_base': '<(PRODUCT_DIR)/lib/libv8_snapshot.a', }, { 'os_posix': 1, 'v8_postmortem_support%': 1, }], - ['OS == "mac"', { - 'obj_dir%': '<(PRODUCT_DIR)/obj.target', - 'v8_base': '<(PRODUCT_DIR)/libv8_snapshot.a', + ['v8_use_snapshot==1', { + 'conditions': [ + ['GENERATOR == "ninja"', { + 'obj_dir': '<(PRODUCT_DIR)/obj', + 'v8_base': '<(PRODUCT_DIR)/obj/tools/v8_gypfiles/libv8_snapshot.a', + }, { + 'obj_dir%': '<(PRODUCT_DIR)/obj.target', + 'v8_base': '<(PRODUCT_DIR)/obj.target/tools/v8_gypfiles/libv8_snapshot.a', + }], + ['OS == "win"', { + 'obj_dir': '<(PRODUCT_DIR)/obj', + 'v8_base': '<(PRODUCT_DIR)/lib/libv8_snapshot.a', + }], + ['OS == "mac"', { + 'obj_dir%': '<(PRODUCT_DIR)/obj.target', + 'v8_base': '<(PRODUCT_DIR)/libv8_snapshot.a', + }], + ], + }, { + 'conditions': [ + ['GENERATOR == "ninja"', { + 'obj_dir': '<(PRODUCT_DIR)/obj', + 'v8_base': '<(PRODUCT_DIR)/obj/tools/v8_gypfiles/libv8_nosnapshot.a', + }, { + 'obj_dir%': '<(PRODUCT_DIR)/obj.target', + 'v8_base': '<(PRODUCT_DIR)/obj.target/tools/v8_gypfiles/libv8_nosnapshot.a', + }], + ['OS == "win"', { + 'obj_dir': '<(PRODUCT_DIR)/obj', + 'v8_base': '<(PRODUCT_DIR)/lib/libv8_nosnapshot.a', + }], + ['OS == "mac"', { + 'obj_dir%': '<(PRODUCT_DIR)/obj.target', + 'v8_base': '<(PRODUCT_DIR)/libv8_nosnapshot.a', + }], + ], }], ['openssl_fips != ""', { 'openssl_product': '<(STATIC_LIB_PREFIX)crypto<(STATIC_LIB_SUFFIX)', diff --git a/configure.py b/configure.py index 4985200b284bae..a791efebbca128 100755 --- a/configure.py +++ b/configure.py @@ -131,13 +131,6 @@ help="Generate an executable with libgcc and libstdc++ libraries. This " "will not work on OSX when using the default compilation environment") -parser.add_option("--enable-vtune-profiling", - action="store_true", - dest="enable_vtune_profiling", - help="Enable profiling support for Intel VTune profiler to profile " - "JavaScript code executed in nodejs. This feature is only available " - "for x32, x86, and x64 architectures.") - parser.add_option("--enable-pgo-generate", action="store_true", dest="enable_pgo_generate", @@ -407,7 +400,7 @@ action='store_true', dest='node_use_large_pages', help='build with Large Pages support. This feature is supported only on Linux kernel' + - '>= 2.6.38 with Transparent Huge pages enabled') + '>= 2.6.38 with Transparent Huge pages enabled and FreeBSD') intl_optgroup.add_option('--with-intl', action='store', @@ -515,11 +508,6 @@ dest='without_siphash', help=optparse.SUPPRESS_HELP) -parser.add_option('--code-cache-path', - action='store', - dest='code_cache_path', - help='optparse.SUPPRESS_HELP') - # End dummy list. parser.add_option('--without-ssl', @@ -722,7 +710,7 @@ def get_nasm_version(asm): stdout=subprocess.PIPE) except OSError: warn('''No acceptable ASM compiler found! - Please make sure you have installed NASM from http://www.nasm.us + Please make sure you have installed NASM from https://www.nasm.us and refer BUILDING.md.''') return '0' @@ -997,15 +985,6 @@ def configure_node(o): if flavor == 'aix': o['variables']['node_target_type'] = 'static_library' - if target_arch in ('x86', 'x64', 'ia32', 'x32'): - o['variables']['node_enable_v8_vtunejit'] = b(options.enable_vtune_profiling) - elif options.enable_vtune_profiling: - raise Exception( - 'The VTune profiler for JavaScript is only supported on x32, x86, and x64 ' - 'architectures.') - else: - o['variables']['node_enable_v8_vtunejit'] = 'false' - if flavor != 'linux' and (options.enable_pgo_generate or options.enable_pgo_use): raise Exception( 'The pgo option is supported only on linux.') @@ -1060,22 +1039,23 @@ def configure_node(o): else: o['variables']['node_use_dtrace'] = 'false' - if options.node_use_large_pages and flavor != 'linux': + if options.node_use_large_pages and not flavor in ('linux', 'freebsd'): raise Exception( 'Large pages are supported only on Linux Systems.') - if options.node_use_large_pages and flavor == 'linux': + if options.node_use_large_pages and flavor in ('linux', 'freebsd'): if options.shared or options.enable_static: raise Exception( 'Large pages are supported only while creating node executable.') if target_arch!="x64": raise Exception( 'Large pages are supported only x64 platform.') - # Example full version string: 2.6.32-696.28.1.el6.x86_64 - FULL_KERNEL_VERSION=os.uname()[2] - KERNEL_VERSION=FULL_KERNEL_VERSION.split('-')[0] - if KERNEL_VERSION < "2.6.38": - raise Exception( - 'Large pages need Linux kernel version >= 2.6.38') + if flavor == 'linux': + # Example full version string: 2.6.32-696.28.1.el6.x86_64 + FULL_KERNEL_VERSION=os.uname()[2] + KERNEL_VERSION=FULL_KERNEL_VERSION.split('-')[0] + if KERNEL_VERSION < "2.6.38" and flavor == 'linux': + raise Exception( + 'Large pages need Linux kernel version >= 2.6.38') o['variables']['node_use_large_pages'] = b(options.node_use_large_pages) if options.no_ifaddrs: @@ -1116,7 +1096,7 @@ def configure_node(o): o['variables']['node_no_browser_globals'] = b(options.no_browser_globals) # TODO(refack): fix this when implementing embedded code-cache when cross-compiling. if o['variables']['want_separate_host_toolset'] == 0: - o['variables']['node_code_cache_path'] = 'yes' + o['variables']['node_code_cache'] = 'yes' # For testing o['variables']['node_shared'] = b(options.shared) node_module_version = getmoduleversion.get_version() diff --git a/deps/acorn-plugins/acorn-bigint/CHANGELOG.md b/deps/acorn-plugins/acorn-bigint/CHANGELOG.md deleted file mode 100644 index 1d12d708f2cb75..00000000000000 --- a/deps/acorn-plugins/acorn-bigint/CHANGELOG.md +++ /dev/null @@ -1,21 +0,0 @@ -## 0.4.0 (2019-04-04) - -* Make compatible with acorn-numeric-separator - -## 0.3.1 (2018-10-06) - -* Fix creation of BigInt values everywhere (Thanks, Gus Caplan!) - -## 0.3.0 (2018-09-14) - -* Update to new acorn 6 interface -* Actually support creating BigInt values in AST in Chrome -* Change license to MIT - -## 0.2.0 (2017-12-20) - -* Emit BigInt values in AST if supported by runtime engine - -## 0.1.0 (2017-12-19) - -Initial release diff --git a/deps/acorn-plugins/acorn-bigint/README.md b/deps/acorn-plugins/acorn-bigint/README.md deleted file mode 100644 index b0b6bb55543a58..00000000000000 --- a/deps/acorn-plugins/acorn-bigint/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# BigInt support for Acorn - -[![NPM version](https://img.shields.io/npm/v/acorn-bigint.svg)](https://www.npmjs.org/package/acorn-bigint) - -This is a plugin for [Acorn](http://marijnhaverbeke.nl/acorn/) - a tiny, fast JavaScript parser, written completely in JavaScript. - -It implements support for arbitrary precision integers as defined in the stage 3 proposal [BigInt: Arbitrary precision integers in JavaScript](https://github.com/tc39/proposal-bigint). The emitted AST follows [an ESTree proposal](https://github.com/estree/estree/blob/132be9b9ec376adbc082dd5f6ba78aefd7a1a864/experimental/bigint.md). - -## Usage - -This module provides a plugin that can be used to extend the Acorn `Parser` class: - -```javascript -const {Parser} = require('acorn'); -const bigInt = require('acorn-bigint'); -Parser.extend(bigInt).parse('100n'); -``` - -## License - -This plugin is released under an [MIT License](./LICENSE). diff --git a/deps/acorn-plugins/acorn-bigint/index.js b/deps/acorn-plugins/acorn-bigint/index.js deleted file mode 100644 index 8e63515e11bbc5..00000000000000 --- a/deps/acorn-plugins/acorn-bigint/index.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict" - -const acorn = require('internal/deps/acorn/acorn/dist/acorn') -const tt = acorn.tokTypes -const isIdentifierStart = acorn.isIdentifierStart - -module.exports = function(Parser) { - return class extends Parser { - parseLiteral(value) { - const node = super.parseLiteral(value) - if (node.raw.charCodeAt(node.raw.length - 1) == 110) node.bigint = this.getNumberInput(node.start, node.end) - return node - } - - readRadixNumber(radix) { - let start = this.pos - this.pos += 2 // 0x - let val = this.readInt(radix) - if (val === null) this.raise(this.start + 2, `Expected number in radix ${radix}`) - if (this.input.charCodeAt(this.pos) == 110) { - let str = this.getNumberInput(start, this.pos) - val = typeof BigInt !== "undefined" ? BigInt(str) : null - ++this.pos - } else if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number") - return this.finishToken(tt.num, val) - } - - readNumber(startsWithDot) { - let start = this.pos - - // Not an int - if (startsWithDot) return super.readNumber(startsWithDot) - - // Legacy octal - if (this.input.charCodeAt(start) === 48 && this.input.charCodeAt(start + 1) !== 110) { - return super.readNumber(startsWithDot) - } - - if (this.readInt(10) === null) this.raise(start, "Invalid number") - - // Not a BigInt, reset and parse again - if (this.input.charCodeAt(this.pos) != 110) { - this.pos = start - return super.readNumber(startsWithDot) - } - - let str = this.getNumberInput(start, this.pos) - let val = typeof BigInt !== "undefined" ? BigInt(str) : null - ++this.pos - return this.finishToken(tt.num, val) - } - - // This is basically a hook for acorn-numeric-separator - getNumberInput(start, end) { - if (super.getNumberInput) return super.getNumberInput(start, end) - return this.input.slice(start, end) - } - } -} diff --git a/deps/acorn-plugins/acorn-bigint/package.json b/deps/acorn-plugins/acorn-bigint/package.json deleted file mode 100644 index 073cdfb86c309d..00000000000000 --- a/deps/acorn-plugins/acorn-bigint/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "acorn-bigint", - "_id": "acorn-bigint@0.4.0", - "_inBundle": false, - "_integrity": "sha512-W9iaqWzqFo7ZBLmI9dMjHYGrN0Nm/ZgToqhvd3RELJux7RsX6k1/80h+bD9TtTpeKky/kYNbr3+vHWqI3hdyfA==", - "_location": "/acorn-bigint", - "_phantomChildren": {}, - "_requested": { - "type": "tag", - "registry": true, - "raw": "acorn-bigint", - "name": "acorn-bigint", - "escapedName": "acorn-bigint", - "rawSpec": "", - "saveSpec": null, - "fetchSpec": "latest" - }, - "_requiredBy": [ - "#USER", - "/" - ], - "_resolved": "https://registry.npmjs.org/acorn-bigint/-/acorn-bigint-0.4.0.tgz", - "_shasum": "af3245ed8a7c3747387fca4680ae1960f617c4cd", - "_spec": "acorn-bigint", - "_where": "/home/ruben/repos/node/node", - "bugs": { - "url": "https://github.com/acornjs/acorn-bigint/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Adrian Heine", - "email": "mail@adrianheine.de" - } - ], - "deprecated": false, - "description": "Support for BigInt in acorn", - "devDependencies": { - "acorn": "^6.1.1", - "eslint": "^5.16.0", - "eslint-plugin-node": "^8.0.1", - "mocha": "^6.0.2", - "test262": "git+https://github.com/tc39/test262.git#611919174ffe060503691a0c7e3eb2a65b646124", - "test262-parser-runner": "^0.5.0" - }, - "engines": { - "node": ">=4.8.2" - }, - "homepage": "https://github.com/acornjs/acorn-bigint", - "license": "MIT", - "name": "acorn-bigint", - "peerDependencies": { - "acorn": "^6.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/acornjs/acorn-bigint.git" - }, - "scripts": { - "lint": "eslint -c .eslintrc.json .", - "test": "mocha", - "test:test262": "node run_test262.js" - }, - "version": "0.4.0" -} diff --git a/deps/acorn/acorn-walk/CHANGELOG.md b/deps/acorn/acorn-walk/CHANGELOG.md index 525950b5183bcf..c02dbd7dda8417 100644 --- a/deps/acorn/acorn-walk/CHANGELOG.md +++ b/deps/acorn/acorn-walk/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.2.0 (2017-07-04) + +### New features + +Add support for `Import` nodes. + ## 6.1.0 (2018-09-28) ### New features diff --git a/deps/acorn/acorn-walk/README.md b/deps/acorn/acorn-walk/README.md index 2b94bec31eccfb..e192baced005ac 100644 --- a/deps/acorn/acorn-walk/README.md +++ b/deps/acorn/acorn-walk/README.md @@ -6,7 +6,7 @@ An abstract syntax tree walker for the ## Community Acorn is open source software released under an -[MIT license](https://github.com/acornjs/acorn/blob/master/LICENSE). +[MIT license](https://github.com/acornjs/acorn/blob/master/acorn-walk/LICENSE). You are welcome to [report bugs](https://github.com/acornjs/acorn/issues) or create pull diff --git a/deps/acorn/acorn-walk/dist/walk.js b/deps/acorn/acorn-walk/dist/walk.js index 322a58d9fabcb3..398a0032f4bb65 100644 --- a/deps/acorn/acorn-walk/dist/walk.js +++ b/deps/acorn/acorn-walk/dist/walk.js @@ -1,456 +1,458 @@ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.acorn = global.acorn || {}, global.acorn.walk = {}))); -}(this, (function (exports) { 'use strict'; - -// AST walker module for Mozilla Parser API compatible trees - -// A simple walk is one where you simply specify callbacks to be -// called on specific nodes. The last two arguments are optional. A -// simple use would be -// -// walk.simple(myTree, { -// Expression: function(node) { ... } -// }); -// -// to do something with all expressions. All Parser API node types -// can be used to identify node types, as well as Expression and -// Statement, which denote categories of nodes. -// -// The base argument can be used to pass a custom (recursive) -// walker, and state can be used to give this walked an initial -// state. - -function simple(node, visitors, baseVisitor, state, override) { - if (!baseVisitor) { baseVisitor = base - ; }(function c(node, st, override) { - var type = override || node.type, found = visitors[type]; - baseVisitor[type](node, st, c); - if (found) { found(node, st); } - })(node, state, override); -} - -// An ancestor walk keeps an array of ancestor nodes (including the -// current node) and passes them to the callback as third parameter -// (and also as state parameter when no other state is present). -function ancestor(node, visitors, baseVisitor, state) { - var ancestors = []; - if (!baseVisitor) { baseVisitor = base - ; }(function c(node, st, override) { - var type = override || node.type, found = visitors[type]; - var isNew = node !== ancestors[ancestors.length - 1]; - if (isNew) { ancestors.push(node); } - baseVisitor[type](node, st, c); - if (found) { found(node, st || ancestors, ancestors); } - if (isNew) { ancestors.pop(); } - })(node, state); -} - -// A recursive walk is one where your functions override the default -// walkers. They can modify and replace the state parameter that's -// threaded through the walk, and can opt how and whether to walk -// their child nodes (by calling their third argument on these -// nodes). -function recursive(node, state, funcs, baseVisitor, override) { - var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor;(function c(node, st, override) { - visitor[override || node.type](node, st, c); - })(node, state, override); -} - -function makeTest(test) { - if (typeof test === "string") - { return function (type) { return type === test; } } - else if (!test) - { return function () { return true; } } - else - { return test } -} - -var Found = function Found(node, state) { this.node = node; this.state = state; }; - -// A full walk triggers the callback on each node -function full(node, callback, baseVisitor, state, override) { - if (!baseVisitor) { baseVisitor = base - ; }(function c(node, st, override) { - var type = override || node.type; - baseVisitor[type](node, st, c); - if (!override) { callback(node, st, type); } - })(node, state, override); -} - -// An fullAncestor walk is like an ancestor walk, but triggers -// the callback on each node -function fullAncestor(node, callback, baseVisitor, state) { - if (!baseVisitor) { baseVisitor = base; } - var ancestors = [];(function c(node, st, override) { - var type = override || node.type; - var isNew = node !== ancestors[ancestors.length - 1]; - if (isNew) { ancestors.push(node); } - baseVisitor[type](node, st, c); - if (!override) { callback(node, st || ancestors, ancestors, type); } - if (isNew) { ancestors.pop(); } - })(node, state); -} - -// Find a node with a given start, end, and type (all are optional, -// null can be used as wildcard). Returns a {node, state} object, or -// undefined when it doesn't find a matching node. -function findNodeAt(node, start, end, test, baseVisitor, state) { - if (!baseVisitor) { baseVisitor = base; } - test = makeTest(test); - try { - (function c(node, st, override) { - var type = override || node.type; - if ((start == null || node.start <= start) && - (end == null || node.end >= end)) - { baseVisitor[type](node, st, c); } - if ((start == null || node.start === start) && - (end == null || node.end === end) && - test(type, node)) - { throw new Found(node, st) } + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = global || self, factory((global.acorn = global.acorn || {}, global.acorn.walk = {}))); +}(this, function (exports) { 'use strict'; + + // AST walker module for Mozilla Parser API compatible trees + + // A simple walk is one where you simply specify callbacks to be + // called on specific nodes. The last two arguments are optional. A + // simple use would be + // + // walk.simple(myTree, { + // Expression: function(node) { ... } + // }); + // + // to do something with all expressions. All Parser API node types + // can be used to identify node types, as well as Expression and + // Statement, which denote categories of nodes. + // + // The base argument can be used to pass a custom (recursive) + // walker, and state can be used to give this walked an initial + // state. + + function simple(node, visitors, baseVisitor, state, override) { + if (!baseVisitor) { baseVisitor = base + ; }(function c(node, st, override) { + var type = override || node.type, found = visitors[type]; + baseVisitor[type](node, st, c); + if (found) { found(node, st); } + })(node, state, override); + } + + // An ancestor walk keeps an array of ancestor nodes (including the + // current node) and passes them to the callback as third parameter + // (and also as state parameter when no other state is present). + function ancestor(node, visitors, baseVisitor, state) { + var ancestors = []; + if (!baseVisitor) { baseVisitor = base + ; }(function c(node, st, override) { + var type = override || node.type, found = visitors[type]; + var isNew = node !== ancestors[ancestors.length - 1]; + if (isNew) { ancestors.push(node); } + baseVisitor[type](node, st, c); + if (found) { found(node, st || ancestors, ancestors); } + if (isNew) { ancestors.pop(); } })(node, state); - } catch (e) { - if (e instanceof Found) { return e } - throw e } -} - -// Find the innermost node of a given type that contains the given -// position. Interface similar to findNodeAt. -function findNodeAround(node, pos, test, baseVisitor, state) { - test = makeTest(test); - if (!baseVisitor) { baseVisitor = base; } - try { - (function c(node, st, override) { + + // A recursive walk is one where your functions override the default + // walkers. They can modify and replace the state parameter that's + // threaded through the walk, and can opt how and whether to walk + // their child nodes (by calling their third argument on these + // nodes). + function recursive(node, state, funcs, baseVisitor, override) { + var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor + ;(function c(node, st, override) { + visitor[override || node.type](node, st, c); + })(node, state, override); + } + + function makeTest(test) { + if (typeof test === "string") + { return function (type) { return type === test; } } + else if (!test) + { return function () { return true; } } + else + { return test } + } + + var Found = function Found(node, state) { this.node = node; this.state = state; }; + + // A full walk triggers the callback on each node + function full(node, callback, baseVisitor, state, override) { + if (!baseVisitor) { baseVisitor = base + ; }(function c(node, st, override) { var type = override || node.type; - if (node.start > pos || node.end < pos) { return } baseVisitor[type](node, st, c); - if (test(type, node)) { throw new Found(node, st) } - })(node, state); - } catch (e) { - if (e instanceof Found) { return e } - throw e + if (!override) { callback(node, st, type); } + })(node, state, override); } -} - -// Find the outermost matching node after a given position. -function findNodeAfter(node, pos, test, baseVisitor, state) { - test = makeTest(test); - if (!baseVisitor) { baseVisitor = base; } - try { - (function c(node, st, override) { - if (node.end < pos) { return } + + // An fullAncestor walk is like an ancestor walk, but triggers + // the callback on each node + function fullAncestor(node, callback, baseVisitor, state) { + if (!baseVisitor) { baseVisitor = base; } + var ancestors = [] + ;(function c(node, st, override) { var type = override || node.type; - if (node.start >= pos && test(type, node)) { throw new Found(node, st) } + var isNew = node !== ancestors[ancestors.length - 1]; + if (isNew) { ancestors.push(node); } baseVisitor[type](node, st, c); + if (!override) { callback(node, st || ancestors, ancestors, type); } + if (isNew) { ancestors.pop(); } })(node, state); - } catch (e) { - if (e instanceof Found) { return e } - throw e } -} - -// Find the outermost matching node before a given position. -function findNodeBefore(node, pos, test, baseVisitor, state) { - test = makeTest(test); - if (!baseVisitor) { baseVisitor = base; } - var max;(function c(node, st, override) { - if (node.start > pos) { return } - var type = override || node.type; - if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node)) - { max = new Found(node, st); } - baseVisitor[type](node, st, c); - })(node, state); - return max -} - -// Fallback to an Object.create polyfill for older environments. -var create = Object.create || function(proto) { - function Ctor() {} - Ctor.prototype = proto; - return new Ctor -}; - -// Used to create a custom walker. Will fill in all missing node -// type properties with the defaults. -function make(funcs, baseVisitor) { - var visitor = create(baseVisitor || base); - for (var type in funcs) { visitor[type] = funcs[type]; } - return visitor -} - -function skipThrough(node, st, c) { c(node, st); } -function ignore(_node, _st, _c) {} - -// Node walkers. - -var base = {}; - -base.Program = base.BlockStatement = function (node, st, c) { - for (var i = 0, list = node.body; i < list.length; i += 1) - { - var stmt = list[i]; - - c(stmt, st, "Statement"); - } -}; -base.Statement = skipThrough; -base.EmptyStatement = ignore; -base.ExpressionStatement = base.ParenthesizedExpression = - function (node, st, c) { return c(node.expression, st, "Expression"); }; -base.IfStatement = function (node, st, c) { - c(node.test, st, "Expression"); - c(node.consequent, st, "Statement"); - if (node.alternate) { c(node.alternate, st, "Statement"); } -}; -base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); }; -base.BreakStatement = base.ContinueStatement = ignore; -base.WithStatement = function (node, st, c) { - c(node.object, st, "Expression"); - c(node.body, st, "Statement"); -}; -base.SwitchStatement = function (node, st, c) { - c(node.discriminant, st, "Expression"); - for (var i = 0, list = node.cases; i < list.length; i += 1) { - var cs = list[i]; - - if (cs.test) { c(cs.test, st, "Expression"); } - for (var i$1 = 0, list$1 = cs.consequent; i$1 < list$1.length; i$1 += 1) - { - var cons = list$1[i$1]; - c(cons, st, "Statement"); + // Find a node with a given start, end, and type (all are optional, + // null can be used as wildcard). Returns a {node, state} object, or + // undefined when it doesn't find a matching node. + function findNodeAt(node, start, end, test, baseVisitor, state) { + if (!baseVisitor) { baseVisitor = base; } + test = makeTest(test); + try { + (function c(node, st, override) { + var type = override || node.type; + if ((start == null || node.start <= start) && + (end == null || node.end >= end)) + { baseVisitor[type](node, st, c); } + if ((start == null || node.start === start) && + (end == null || node.end === end) && + test(type, node)) + { throw new Found(node, st) } + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e } } -}; -base.SwitchCase = function (node, st, c) { - if (node.test) { c(node.test, st, "Expression"); } - for (var i = 0, list = node.consequent; i < list.length; i += 1) - { - var cons = list[i]; - - c(cons, st, "Statement"); + + // Find the innermost node of a given type that contains the given + // position. Interface similar to findNodeAt. + function findNodeAround(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + try { + (function c(node, st, override) { + var type = override || node.type; + if (node.start > pos || node.end < pos) { return } + baseVisitor[type](node, st, c); + if (test(type, node)) { throw new Found(node, st) } + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } } -}; -base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) { - if (node.argument) { c(node.argument, st, "Expression"); } -}; -base.ThrowStatement = base.SpreadElement = - function (node, st, c) { return c(node.argument, st, "Expression"); }; -base.TryStatement = function (node, st, c) { - c(node.block, st, "Statement"); - if (node.handler) { c(node.handler, st); } - if (node.finalizer) { c(node.finalizer, st, "Statement"); } -}; -base.CatchClause = function (node, st, c) { - if (node.param) { c(node.param, st, "Pattern"); } - c(node.body, st, "Statement"); -}; -base.WhileStatement = base.DoWhileStatement = function (node, st, c) { - c(node.test, st, "Expression"); - c(node.body, st, "Statement"); -}; -base.ForStatement = function (node, st, c) { - if (node.init) { c(node.init, st, "ForInit"); } - if (node.test) { c(node.test, st, "Expression"); } - if (node.update) { c(node.update, st, "Expression"); } - c(node.body, st, "Statement"); -}; -base.ForInStatement = base.ForOfStatement = function (node, st, c) { - c(node.left, st, "ForInit"); - c(node.right, st, "Expression"); - c(node.body, st, "Statement"); -}; -base.ForInit = function (node, st, c) { - if (node.type === "VariableDeclaration") { c(node, st); } - else { c(node, st, "Expression"); } -}; -base.DebuggerStatement = ignore; - -base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); }; -base.VariableDeclaration = function (node, st, c) { - for (var i = 0, list = node.declarations; i < list.length; i += 1) - { - var decl = list[i]; - - c(decl, st); + + // Find the outermost matching node after a given position. + function findNodeAfter(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + try { + (function c(node, st, override) { + if (node.end < pos) { return } + var type = override || node.type; + if (node.start >= pos && test(type, node)) { throw new Found(node, st) } + baseVisitor[type](node, st, c); + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } } -}; -base.VariableDeclarator = function (node, st, c) { - c(node.id, st, "Pattern"); - if (node.init) { c(node.init, st, "Expression"); } -}; - -base.Function = function (node, st, c) { - if (node.id) { c(node.id, st, "Pattern"); } - for (var i = 0, list = node.params; i < list.length; i += 1) - { - var param = list[i]; - - c(param, st, "Pattern"); + + // Find the outermost matching node before a given position. + function findNodeBefore(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + var max + ;(function c(node, st, override) { + if (node.start > pos) { return } + var type = override || node.type; + if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node)) + { max = new Found(node, st); } + baseVisitor[type](node, st, c); + })(node, state); + return max } - c(node.body, st, node.expression ? "Expression" : "Statement"); -}; - -base.Pattern = function (node, st, c) { - if (node.type === "Identifier") - { c(node, st, "VariablePattern"); } - else if (node.type === "MemberExpression") - { c(node, st, "MemberPattern"); } - else - { c(node, st); } -}; -base.VariablePattern = ignore; -base.MemberPattern = skipThrough; -base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); }; -base.ArrayPattern = function (node, st, c) { - for (var i = 0, list = node.elements; i < list.length; i += 1) { - var elt = list[i]; - - if (elt) { c(elt, st, "Pattern"); } + + // Fallback to an Object.create polyfill for older environments. + var create = Object.create || function(proto) { + function Ctor() {} + Ctor.prototype = proto; + return new Ctor + }; + + // Used to create a custom walker. Will fill in all missing node + // type properties with the defaults. + function make(funcs, baseVisitor) { + var visitor = create(baseVisitor || base); + for (var type in funcs) { visitor[type] = funcs[type]; } + return visitor } -}; -base.ObjectPattern = function (node, st, c) { - for (var i = 0, list = node.properties; i < list.length; i += 1) { - var prop = list[i]; - - if (prop.type === "Property") { - if (prop.computed) { c(prop.key, st, "Expression"); } - c(prop.value, st, "Pattern"); - } else if (prop.type === "RestElement") { - c(prop.argument, st, "Pattern"); + + function skipThrough(node, st, c) { c(node, st); } + function ignore(_node, _st, _c) {} + + // Node walkers. + + var base = {}; + + base.Program = base.BlockStatement = function (node, st, c) { + for (var i = 0, list = node.body; i < list.length; i += 1) + { + var stmt = list[i]; + + c(stmt, st, "Statement"); } - } -}; + }; + base.Statement = skipThrough; + base.EmptyStatement = ignore; + base.ExpressionStatement = base.ParenthesizedExpression = + function (node, st, c) { return c(node.expression, st, "Expression"); }; + base.IfStatement = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.consequent, st, "Statement"); + if (node.alternate) { c(node.alternate, st, "Statement"); } + }; + base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); }; + base.BreakStatement = base.ContinueStatement = ignore; + base.WithStatement = function (node, st, c) { + c(node.object, st, "Expression"); + c(node.body, st, "Statement"); + }; + base.SwitchStatement = function (node, st, c) { + c(node.discriminant, st, "Expression"); + for (var i$1 = 0, list$1 = node.cases; i$1 < list$1.length; i$1 += 1) { + var cs = list$1[i$1]; + + if (cs.test) { c(cs.test, st, "Expression"); } + for (var i = 0, list = cs.consequent; i < list.length; i += 1) + { + var cons = list[i]; + + c(cons, st, "Statement"); + } + } + }; + base.SwitchCase = function (node, st, c) { + if (node.test) { c(node.test, st, "Expression"); } + for (var i = 0, list = node.consequent; i < list.length; i += 1) + { + var cons = list[i]; -base.Expression = skipThrough; -base.ThisExpression = base.Super = base.MetaProperty = ignore; -base.ArrayExpression = function (node, st, c) { - for (var i = 0, list = node.elements; i < list.length; i += 1) { - var elt = list[i]; + c(cons, st, "Statement"); + } + }; + base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) { + if (node.argument) { c(node.argument, st, "Expression"); } + }; + base.ThrowStatement = base.SpreadElement = + function (node, st, c) { return c(node.argument, st, "Expression"); }; + base.TryStatement = function (node, st, c) { + c(node.block, st, "Statement"); + if (node.handler) { c(node.handler, st); } + if (node.finalizer) { c(node.finalizer, st, "Statement"); } + }; + base.CatchClause = function (node, st, c) { + if (node.param) { c(node.param, st, "Pattern"); } + c(node.body, st, "Statement"); + }; + base.WhileStatement = base.DoWhileStatement = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.body, st, "Statement"); + }; + base.ForStatement = function (node, st, c) { + if (node.init) { c(node.init, st, "ForInit"); } + if (node.test) { c(node.test, st, "Expression"); } + if (node.update) { c(node.update, st, "Expression"); } + c(node.body, st, "Statement"); + }; + base.ForInStatement = base.ForOfStatement = function (node, st, c) { + c(node.left, st, "ForInit"); + c(node.right, st, "Expression"); + c(node.body, st, "Statement"); + }; + base.ForInit = function (node, st, c) { + if (node.type === "VariableDeclaration") { c(node, st); } + else { c(node, st, "Expression"); } + }; + base.DebuggerStatement = ignore; + + base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); }; + base.VariableDeclaration = function (node, st, c) { + for (var i = 0, list = node.declarations; i < list.length; i += 1) + { + var decl = list[i]; - if (elt) { c(elt, st, "Expression"); } - } -}; -base.ObjectExpression = function (node, st, c) { - for (var i = 0, list = node.properties; i < list.length; i += 1) - { - var prop = list[i]; + c(decl, st); + } + }; + base.VariableDeclarator = function (node, st, c) { + c(node.id, st, "Pattern"); + if (node.init) { c(node.init, st, "Expression"); } + }; + + base.Function = function (node, st, c) { + if (node.id) { c(node.id, st, "Pattern"); } + for (var i = 0, list = node.params; i < list.length; i += 1) + { + var param = list[i]; - c(prop, st); - } -}; -base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration; -base.SequenceExpression = function (node, st, c) { - for (var i = 0, list = node.expressions; i < list.length; i += 1) - { - var expr = list[i]; - - c(expr, st, "Expression"); - } -}; -base.TemplateLiteral = function (node, st, c) { - for (var i = 0, list = node.quasis; i < list.length; i += 1) - { - var quasi = list[i]; + c(param, st, "Pattern"); + } + c(node.body, st, node.expression ? "Expression" : "Statement"); + }; + + base.Pattern = function (node, st, c) { + if (node.type === "Identifier") + { c(node, st, "VariablePattern"); } + else if (node.type === "MemberExpression") + { c(node, st, "MemberPattern"); } + else + { c(node, st); } + }; + base.VariablePattern = ignore; + base.MemberPattern = skipThrough; + base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); }; + base.ArrayPattern = function (node, st, c) { + for (var i = 0, list = node.elements; i < list.length; i += 1) { + var elt = list[i]; + + if (elt) { c(elt, st, "Pattern"); } + } + }; + base.ObjectPattern = function (node, st, c) { + for (var i = 0, list = node.properties; i < list.length; i += 1) { + var prop = list[i]; + + if (prop.type === "Property") { + if (prop.computed) { c(prop.key, st, "Expression"); } + c(prop.value, st, "Pattern"); + } else if (prop.type === "RestElement") { + c(prop.argument, st, "Pattern"); + } + } + }; - c(quasi, st); - } + base.Expression = skipThrough; + base.ThisExpression = base.Super = base.MetaProperty = ignore; + base.ArrayExpression = function (node, st, c) { + for (var i = 0, list = node.elements; i < list.length; i += 1) { + var elt = list[i]; - for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1) - { - var expr = list$1[i$1]; + if (elt) { c(elt, st, "Expression"); } + } + }; + base.ObjectExpression = function (node, st, c) { + for (var i = 0, list = node.properties; i < list.length; i += 1) + { + var prop = list[i]; - c(expr, st, "Expression"); - } -}; -base.TemplateElement = ignore; -base.UnaryExpression = base.UpdateExpression = function (node, st, c) { - c(node.argument, st, "Expression"); -}; -base.BinaryExpression = base.LogicalExpression = function (node, st, c) { - c(node.left, st, "Expression"); - c(node.right, st, "Expression"); -}; -base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) { - c(node.left, st, "Pattern"); - c(node.right, st, "Expression"); -}; -base.ConditionalExpression = function (node, st, c) { - c(node.test, st, "Expression"); - c(node.consequent, st, "Expression"); - c(node.alternate, st, "Expression"); -}; -base.NewExpression = base.CallExpression = function (node, st, c) { - c(node.callee, st, "Expression"); - if (node.arguments) - { for (var i = 0, list = node.arguments; i < list.length; i += 1) + c(prop, st); + } + }; + base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration; + base.SequenceExpression = function (node, st, c) { + for (var i = 0, list = node.expressions; i < list.length; i += 1) { - var arg = list[i]; - - c(arg, st, "Expression"); - } } -}; -base.MemberExpression = function (node, st, c) { - c(node.object, st, "Expression"); - if (node.computed) { c(node.property, st, "Expression"); } -}; -base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) { - if (node.declaration) - { c(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); } - if (node.source) { c(node.source, st, "Expression"); } -}; -base.ExportAllDeclaration = function (node, st, c) { - c(node.source, st, "Expression"); -}; -base.ImportDeclaration = function (node, st, c) { - for (var i = 0, list = node.specifiers; i < list.length; i += 1) - { - var spec = list[i]; - - c(spec, st); - } - c(node.source, st, "Expression"); -}; -base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore; - -base.TaggedTemplateExpression = function (node, st, c) { - c(node.tag, st, "Expression"); - c(node.quasi, st, "Expression"); -}; -base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); }; -base.Class = function (node, st, c) { - if (node.id) { c(node.id, st, "Pattern"); } - if (node.superClass) { c(node.superClass, st, "Expression"); } - c(node.body, st); -}; -base.ClassBody = function (node, st, c) { - for (var i = 0, list = node.body; i < list.length; i += 1) - { - var elt = list[i]; - - c(elt, st); - } -}; -base.MethodDefinition = base.Property = function (node, st, c) { - if (node.computed) { c(node.key, st, "Expression"); } - c(node.value, st, "Expression"); -}; - -exports.simple = simple; -exports.ancestor = ancestor; -exports.recursive = recursive; -exports.full = full; -exports.fullAncestor = fullAncestor; -exports.findNodeAt = findNodeAt; -exports.findNodeAround = findNodeAround; -exports.findNodeAfter = findNodeAfter; -exports.findNodeBefore = findNodeBefore; -exports.make = make; -exports.base = base; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); -//# sourceMappingURL=walk.js.map + var expr = list[i]; + + c(expr, st, "Expression"); + } + }; + base.TemplateLiteral = function (node, st, c) { + for (var i = 0, list = node.quasis; i < list.length; i += 1) + { + var quasi = list[i]; + + c(quasi, st); + } + + for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1) + { + var expr = list$1[i$1]; + + c(expr, st, "Expression"); + } + }; + base.TemplateElement = ignore; + base.UnaryExpression = base.UpdateExpression = function (node, st, c) { + c(node.argument, st, "Expression"); + }; + base.BinaryExpression = base.LogicalExpression = function (node, st, c) { + c(node.left, st, "Expression"); + c(node.right, st, "Expression"); + }; + base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) { + c(node.left, st, "Pattern"); + c(node.right, st, "Expression"); + }; + base.ConditionalExpression = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.consequent, st, "Expression"); + c(node.alternate, st, "Expression"); + }; + base.NewExpression = base.CallExpression = function (node, st, c) { + c(node.callee, st, "Expression"); + if (node.arguments) + { for (var i = 0, list = node.arguments; i < list.length; i += 1) + { + var arg = list[i]; + + c(arg, st, "Expression"); + } } + }; + base.MemberExpression = function (node, st, c) { + c(node.object, st, "Expression"); + if (node.computed) { c(node.property, st, "Expression"); } + }; + base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) { + if (node.declaration) + { c(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); } + if (node.source) { c(node.source, st, "Expression"); } + }; + base.ExportAllDeclaration = function (node, st, c) { + c(node.source, st, "Expression"); + }; + base.ImportDeclaration = function (node, st, c) { + for (var i = 0, list = node.specifiers; i < list.length; i += 1) + { + var spec = list[i]; + + c(spec, st); + } + c(node.source, st, "Expression"); + }; + base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = base.Import = ignore; + + base.TaggedTemplateExpression = function (node, st, c) { + c(node.tag, st, "Expression"); + c(node.quasi, st, "Expression"); + }; + base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); }; + base.Class = function (node, st, c) { + if (node.id) { c(node.id, st, "Pattern"); } + if (node.superClass) { c(node.superClass, st, "Expression"); } + c(node.body, st); + }; + base.ClassBody = function (node, st, c) { + for (var i = 0, list = node.body; i < list.length; i += 1) + { + var elt = list[i]; + + c(elt, st); + } + }; + base.MethodDefinition = base.Property = function (node, st, c) { + if (node.computed) { c(node.key, st, "Expression"); } + c(node.value, st, "Expression"); + }; + + exports.ancestor = ancestor; + exports.base = base; + exports.findNodeAfter = findNodeAfter; + exports.findNodeAround = findNodeAround; + exports.findNodeAt = findNodeAt; + exports.findNodeBefore = findNodeBefore; + exports.full = full; + exports.fullAncestor = fullAncestor; + exports.make = make; + exports.recursive = recursive; + exports.simple = simple; + + Object.defineProperty(exports, '__esModule', { value: true }); + +})); diff --git a/deps/acorn/acorn-walk/package.json b/deps/acorn/acorn-walk/package.json index aee3f2584d2de2..239e6c729aedfe 100644 --- a/deps/acorn/acorn-walk/package.json +++ b/deps/acorn/acorn-walk/package.json @@ -4,7 +4,7 @@ "homepage": "https://github.com/acornjs/acorn", "main": "dist/walk.js", "module": "dist/walk.mjs", - "version": "6.1.1", + "version": "6.2.0", "engines": {"node": ">=0.4.0"}, "maintainers": [ { diff --git a/deps/acorn/acorn/CHANGELOG.md b/deps/acorn/acorn/CHANGELOG.md index 430b0b5cd14247..f94f23ccf295b0 100644 --- a/deps/acorn/acorn/CHANGELOG.md +++ b/deps/acorn/acorn/CHANGELOG.md @@ -1,3 +1,25 @@ +## 6.2.0 (2019-07-04) + +### Bug fixes + +Improve valid assignment checking in `for`/`in` and `for`/`of` loops. + +Disallow binding `let` in patterns. + +### New features + +Support bigint syntax with `ecmaVersion` >= 10. + +Support dynamic `import` syntax with `ecmaVersion` >= 10. + +Upgrade to Unicode version 12. + +## 6.1.1 (2019-02-27) + +### Bug fixes + +Fix bug that caused parsing default exports of with names to fail. + ## 6.1.0 (2019-02-08) ### Bug fixes diff --git a/deps/acorn/acorn/README.md b/deps/acorn/acorn/README.md index 9ffacdbc9e9552..fa372ee6821bab 100644 --- a/deps/acorn/acorn/README.md +++ b/deps/acorn/acorn/README.md @@ -54,7 +54,7 @@ an object containing any of these fields: - **ecmaVersion**: Indicates the ECMAScript version to parse. Must be either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018) or 10 (2019, partial support). This influences support for strict mode, the set of - reserved words, and support for new syntax features. Default is 7. + reserved words, and support for new syntax features. Default is 9. **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being implemented by Acorn. Other proposed new features can be implemented @@ -86,7 +86,7 @@ an object containing any of these fields: - **allowImportExportEverywhere**: By default, `import` and `export` declarations can only appear at a program's top level. Setting this option to `true` allows them anywhere where a statement is allowed. - + - **allowAwaitOutsideFunction**: By default, `await` expressions can only appear inside `async` functions. Setting this option to `true` allows to have top-level `await` expressions. They are @@ -256,14 +256,11 @@ The utility spits out the syntax tree as JSON data. ## Existing plugins - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx) - + Plugins for ECMAScript proposals: - + - [`acorn-stage3`](https://github.com/acornjs/acorn-stage3): Parse most stage 3 proposals, bundling: - - [`acorn-async-iteration`](https://github.com/acornjs/acorn-async-iteration): Parse [async iteration proposal](https://github.com/tc39/proposal-async-iteration) - - [`acorn-bigint`](https://github.com/acornjs/acorn-bigint): Parse [BigInt proposal](https://github.com/tc39/proposal-bigint) - [`acorn-class-fields`](https://github.com/acornjs/acorn-class-fields): Parse [class fields proposal](https://github.com/tc39/proposal-class-fields) - - [`acorn-dynamic-import`](https://github.com/kesne/acorn-dynamic-import): Parse [import() proposal](https://github.com/tc39/proposal-dynamic-import) - [`acorn-import-meta`](https://github.com/acornjs/acorn-import-meta): Parse [import.meta proposal](https://github.com/tc39/proposal-import-meta) - [`acorn-numeric-separator`](https://github.com/acornjs/acorn-numeric-separator): Parse [numeric separator proposal](https://github.com/tc39/proposal-numeric-separator) - [`acorn-private-methods`](https://github.com/acornjs/acorn-private-methods): parse [private methods, getters and setters proposal](https://github.com/tc39/proposal-private-methods)n diff --git a/deps/acorn/acorn/dist/acorn.js b/deps/acorn/acorn/dist/acorn.js index 44d95c5fae74db..dcb091fd4fe3d9 100644 --- a/deps/acorn/acorn/dist/acorn.js +++ b/deps/acorn/acorn/dist/acorn.js @@ -1,5018 +1,4964 @@ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.acorn = {}))); -}(this, (function (exports) { 'use strict'; - -// Reserved word lists for various dialects of the language - -var reservedWords = { - 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", - 5: "class enum extends super const export import", - 6: "enum", - strict: "implements interface let package private protected public static yield", - strictBind: "eval arguments" -}; - -// And the keywords - -var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; - -var keywords = { - 5: ecma5AndLessKeywords, - 6: ecma5AndLessKeywords + " const class extends export import super" -}; - -var keywordRelationalOperator = /^in(stanceof)?$/; - -// ## Character categories - -// Big ugly regular expressions that match characters in the -// whitespace, identifier, and identifier-start categories. These -// are only applied when a character is found to actually have a -// code point above 128. -// Generated by `bin/generate-identifier-regex.js`. - -var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7b9\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; -var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; - -var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); -var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); - -nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; - -// These are a run-length and offset encoded representation of the -// >0xffff code points that are a valid part of identifiers. The -// offset starts at 0x10000, and each pair of numbers represents an -// offset to the next range, and then a size of the range. They were -// generated by bin/generate-identifier-regex.js - -// eslint-disable-next-line comma-spacing -var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,190,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,26,230,43,117,63,32,0,257,0,11,39,8,0,22,0,12,39,3,3,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,68,12,0,67,12,65,1,31,6129,15,754,9486,286,82,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541]; - -// eslint-disable-next-line comma-spacing -var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,280,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239]; - -// This has a complexity linear to the value of the code. The -// assumption is that looking up astral identifier characters is -// rare. -function isInAstralSet(code, set) { - var pos = 0x10000; - for (var i = 0; i < set.length; i += 2) { - pos += set[i]; - if (pos > code) { return false } - pos += set[i + 1]; - if (pos >= code) { return true } - } -} - -// Test whether a given character code starts an identifier. - -function isIdentifierStart(code, astral) { - if (code < 65) { return code === 36 } - if (code < 91) { return true } - if (code < 97) { return code === 95 } - if (code < 123) { return true } - if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) } - if (astral === false) { return false } - return isInAstralSet(code, astralIdentifierStartCodes) -} - -// Test whether a given character is part of an identifier. - -function isIdentifierChar(code, astral) { - if (code < 48) { return code === 36 } - if (code < 58) { return true } - if (code < 65) { return false } - if (code < 91) { return true } - if (code < 97) { return code === 95 } - if (code < 123) { return true } - if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) } - if (astral === false) { return false } - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) -} - -// ## Token types - -// The assignment of fine-grained, information-carrying type objects -// allows the tokenizer to store the information it has about a -// token in a way that is very cheap for the parser to look up. - -// All token type variables start with an underscore, to make them -// easy to recognize. - -// The `beforeExpr` property is used to disambiguate between regular -// expressions and divisions. It is set on all token types that can -// be followed by an expression (thus, a slash after them would be a -// regular expression). -// -// The `startsExpr` property is used to check if the token ends a -// `yield` expression. It is set on all token types that either can -// directly start an expression (like a quotation mark) or can -// continue an expression (like the body of a string). -// -// `isLoop` marks a keyword as starting a loop, which is important -// to know when parsing a label, in order to allow or disallow -// continue jumps to that label. - -var TokenType = function TokenType(label, conf) { - if ( conf === void 0 ) conf = {}; - - this.label = label; - this.keyword = conf.keyword; - this.beforeExpr = !!conf.beforeExpr; - this.startsExpr = !!conf.startsExpr; - this.isLoop = !!conf.isLoop; - this.isAssign = !!conf.isAssign; - this.prefix = !!conf.prefix; - this.postfix = !!conf.postfix; - this.binop = conf.binop || null; - this.updateContext = null; -}; - -function binop(name, prec) { - return new TokenType(name, {beforeExpr: true, binop: prec}) -} -var beforeExpr = {beforeExpr: true}; -var startsExpr = {startsExpr: true}; - -// Map keyword names to token types. - -var keywords$1 = {}; - -// Succinct definitions of keyword token types -function kw(name, options) { - if ( options === void 0 ) options = {}; - - options.keyword = name; - return keywords$1[name] = new TokenType(name, options) -} - -var types = { - num: new TokenType("num", startsExpr), - regexp: new TokenType("regexp", startsExpr), - string: new TokenType("string", startsExpr), - name: new TokenType("name", startsExpr), - eof: new TokenType("eof"), - - // Punctuation token types. - bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), - bracketR: new TokenType("]"), - braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), - braceR: new TokenType("}"), - parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), - parenR: new TokenType(")"), - comma: new TokenType(",", beforeExpr), - semi: new TokenType(";", beforeExpr), - colon: new TokenType(":", beforeExpr), - dot: new TokenType("."), - question: new TokenType("?", beforeExpr), - arrow: new TokenType("=>", beforeExpr), - template: new TokenType("template"), - invalidTemplate: new TokenType("invalidTemplate"), - ellipsis: new TokenType("...", beforeExpr), - backQuote: new TokenType("`", startsExpr), - dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), - - // Operators. These carry several kinds of properties to help the - // parser use them properly (the presence of these properties is - // what categorizes them as operators). - // - // `binop`, when present, specifies that this operator is a binary - // operator, and will refer to its precedence. - // - // `prefix` and `postfix` mark the operator as a prefix or postfix - // unary operator. - // - // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as - // binary operators with a very low precedence, that should result - // in AssignmentExpression nodes. - - eq: new TokenType("=", {beforeExpr: true, isAssign: true}), - assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), - incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), - prefix: new TokenType("!/~", {beforeExpr: true, prefix: true, startsExpr: true}), - logicalOR: binop("||", 1), - logicalAND: binop("&&", 2), - bitwiseOR: binop("|", 3), - bitwiseXOR: binop("^", 4), - bitwiseAND: binop("&", 5), - equality: binop("==/!=/===/!==", 6), - relational: binop("/<=/>=", 7), - bitShift: binop("<>/>>>", 8), - plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), - modulo: binop("%", 10), - star: binop("*", 10), - slash: binop("/", 10), - starstar: new TokenType("**", {beforeExpr: true}), - - // Keyword token types. - _break: kw("break"), - _case: kw("case", beforeExpr), - _catch: kw("catch"), - _continue: kw("continue"), - _debugger: kw("debugger"), - _default: kw("default", beforeExpr), - _do: kw("do", {isLoop: true, beforeExpr: true}), - _else: kw("else", beforeExpr), - _finally: kw("finally"), - _for: kw("for", {isLoop: true}), - _function: kw("function", startsExpr), - _if: kw("if"), - _return: kw("return", beforeExpr), - _switch: kw("switch"), - _throw: kw("throw", beforeExpr), - _try: kw("try"), - _var: kw("var"), - _const: kw("const"), - _while: kw("while", {isLoop: true}), - _with: kw("with"), - _new: kw("new", {beforeExpr: true, startsExpr: true}), - _this: kw("this", startsExpr), - _super: kw("super", startsExpr), - _class: kw("class", startsExpr), - _extends: kw("extends", beforeExpr), - _export: kw("export"), - _import: kw("import"), - _null: kw("null", startsExpr), - _true: kw("true", startsExpr), - _false: kw("false", startsExpr), - _in: kw("in", {beforeExpr: true, binop: 7}), - _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), - _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), - _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), - _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) -}; - -// Matches a whole line break (where CRLF is considered a single -// line break). Used to count lines. - -var lineBreak = /\r\n?|\n|\u2028|\u2029/; -var lineBreakG = new RegExp(lineBreak.source, "g"); - -function isNewLine(code, ecma2019String) { - return code === 10 || code === 13 || (!ecma2019String && (code === 0x2028 || code === 0x2029)) -} - -var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/; - -var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; - -var ref = Object.prototype; -var hasOwnProperty = ref.hasOwnProperty; -var toString = ref.toString; - -// Checks if an object has a property. - -function has(obj, propName) { - return hasOwnProperty.call(obj, propName) -} - -var isArray = Array.isArray || (function (obj) { return ( - toString.call(obj) === "[object Array]" -); }); - -function wordsRegexp(words) { - return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$") -} - -// These are used when `options.locations` is on, for the -// `startLoc` and `endLoc` properties. - -var Position = function Position(line, col) { - this.line = line; - this.column = col; -}; - -Position.prototype.offset = function offset (n) { - return new Position(this.line, this.column + n) -}; - -var SourceLocation = function SourceLocation(p, start, end) { - this.start = start; - this.end = end; - if (p.sourceFile !== null) { this.source = p.sourceFile; } -}; - -// The `getLineInfo` function is mostly useful when the -// `locations` option is off (for performance reasons) and you -// want to find the line/column position for a given character -// offset. `input` should be the code string that the offset refers -// into. - -function getLineInfo(input, offset) { - for (var line = 1, cur = 0;;) { - lineBreakG.lastIndex = cur; - var match = lineBreakG.exec(input); - if (match && match.index < offset) { - ++line; - cur = match.index + match[0].length; - } else { - return new Position(line, offset - cur) - } - } -} - -// A second optional argument can be given to further configure -// the parser process. These options are recognized: - -var defaultOptions = { - // `ecmaVersion` indicates the ECMAScript version to parse. Must be - // either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), or 10 - // (2019). This influences support for strict mode, the set of - // reserved words, and support for new syntax features. The default - // is 9. - ecmaVersion: 9, - // `sourceType` indicates the mode the code should be parsed in. - // Can be either `"script"` or `"module"`. This influences global - // strict mode and parsing of `import` and `export` declarations. - sourceType: "script", - // `onInsertedSemicolon` can be a callback that will be called - // when a semicolon is automatically inserted. It will be passed - // the position of the comma as an offset, and if `locations` is - // enabled, it is given the location as a `{line, column}` object - // as second argument. - onInsertedSemicolon: null, - // `onTrailingComma` is similar to `onInsertedSemicolon`, but for - // trailing commas. - onTrailingComma: null, - // By default, reserved words are only enforced if ecmaVersion >= 5. - // Set `allowReserved` to a boolean value to explicitly turn this on - // an off. When this option has the value "never", reserved words - // and keywords can also not be used as property names. - allowReserved: null, - // When enabled, a return at the top level is not considered an - // error. - allowReturnOutsideFunction: false, - // When enabled, import/export statements are not constrained to - // appearing at the top of the program. - allowImportExportEverywhere: false, - // When enabled, await identifiers are allowed to appear at the top-level scope, - // but they are still not allowed in non-async functions. - allowAwaitOutsideFunction: false, - // When enabled, hashbang directive in the beginning of file - // is allowed and treated as a line comment. - allowHashBang: false, - // When `locations` is on, `loc` properties holding objects with - // `start` and `end` properties in `{line, column}` form (with - // line being 1-based and column 0-based) will be attached to the - // nodes. - locations: false, - // A function can be passed as `onToken` option, which will - // cause Acorn to call that function with object in the same - // format as tokens returned from `tokenizer().getToken()`. Note - // that you are not allowed to call the parser from the - // callback—that will corrupt its internal state. - onToken: null, - // A function can be passed as `onComment` option, which will - // cause Acorn to call that function with `(block, text, start, - // end)` parameters whenever a comment is skipped. `block` is a - // boolean indicating whether this is a block (`/* */`) comment, - // `text` is the content of the comment, and `start` and `end` are - // character offsets that denote the start and end of the comment. - // When the `locations` option is on, two more parameters are - // passed, the full `{line, column}` locations of the start and - // end of the comments. Note that you are not allowed to call the - // parser from the callback—that will corrupt its internal state. - onComment: null, - // Nodes have their start and end characters offsets recorded in - // `start` and `end` properties (directly on the node, rather than - // the `loc` object, which holds line/column data. To also add a - // [semi-standardized][range] `range` property holding a `[start, - // end]` array with the same numbers, set the `ranges` option to - // `true`. - // - // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 - ranges: false, - // It is possible to parse multiple files into a single AST by - // passing the tree produced by parsing the first file as - // `program` option in subsequent parses. This will add the - // toplevel forms of the parsed file to the `Program` (top) node - // of an existing parse tree. - program: null, - // When `locations` is on, you can pass this to record the source - // file in every node's `loc` object. - sourceFile: null, - // This value, if given, is stored in every node, whether - // `locations` is on or off. - directSourceFile: null, - // When enabled, parenthesized expressions are represented by - // (non-standard) ParenthesizedExpression nodes - preserveParens: false -}; - -// Interpret and default an options object - -function getOptions(opts) { - var options = {}; - - for (var opt in defaultOptions) - { options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; } - - if (options.ecmaVersion >= 2015) - { options.ecmaVersion -= 2009; } - - if (options.allowReserved == null) - { options.allowReserved = options.ecmaVersion < 5; } - - if (isArray(options.onToken)) { - var tokens = options.onToken; - options.onToken = function (token) { return tokens.push(token); }; - } - if (isArray(options.onComment)) - { options.onComment = pushComment(options, options.onComment); } - - return options -} - -function pushComment(options, array) { - return function(block, text, start, end, startLoc, endLoc) { - var comment = { - type: block ? "Block" : "Line", - value: text, - start: start, - end: end - }; - if (options.locations) - { comment.loc = new SourceLocation(this, startLoc, endLoc); } - if (options.ranges) - { comment.range = [start, end]; } - array.push(comment); - } -} - -// Each scope gets a bitset that may contain these flags -var SCOPE_TOP = 1; -var SCOPE_FUNCTION = 2; -var SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION; -var SCOPE_ASYNC = 4; -var SCOPE_GENERATOR = 8; -var SCOPE_ARROW = 16; -var SCOPE_SIMPLE_CATCH = 32; -var SCOPE_SUPER = 64; -var SCOPE_DIRECT_SUPER = 128; - -function functionFlags(async, generator) { - return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0) -} - -// Used in checkLVal and declareName to determine the type of a binding -var BIND_NONE = 0; -var BIND_VAR = 1; -var BIND_LEXICAL = 2; -var BIND_FUNCTION = 3; -var BIND_SIMPLE_CATCH = 4; -var BIND_OUTSIDE = 5; // Special case for function names as bound inside the function - -var Parser = function Parser(options, input, startPos) { - this.options = options = getOptions(options); - this.sourceFile = options.sourceFile; - this.keywords = wordsRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]); - var reserved = ""; - if (!options.allowReserved) { - for (var v = options.ecmaVersion;; v--) - { if (reserved = reservedWords[v]) { break } } - if (options.sourceType === "module") { reserved += " await"; } - } - this.reservedWords = wordsRegexp(reserved); - var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict; - this.reservedWordsStrict = wordsRegexp(reservedStrict); - this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind); - this.input = String(input); - - // Used to signal to callers of `readWord1` whether the word - // contained any escape sequences. This is needed because words with - // escape sequences must not be interpreted as keywords. - this.containsEsc = false; - - // Set up token state - - // The current position of the tokenizer in the input. - if (startPos) { - this.pos = startPos; - this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1; - this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; - } else { - this.pos = this.lineStart = 0; - this.curLine = 1; - } - - // Properties of the current token: - // Its type - this.type = types.eof; - // For tokens that include more information than their type, the value - this.value = null; - // Its start and end offset - this.start = this.end = this.pos; - // And, if locations are used, the {line, column} object - // corresponding to those offsets - this.startLoc = this.endLoc = this.curPosition(); - - // Position information for the previous token - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; - - // The context stack is used to superficially track syntactic - // context to predict whether a regular expression is allowed in a - // given position. - this.context = this.initialContext(); - this.exprAllowed = true; - - // Figure out if it's a module code. - this.inModule = options.sourceType === "module"; - this.strict = this.inModule || this.strictDirective(this.pos); - - // Used to signify the start of a potential arrow function - this.potentialArrowAt = -1; - - // Positions to delayed-check that yield/await does not exist in default parameters. - this.yieldPos = this.awaitPos = this.awaitIdentPos = 0; - // Labels in scope. - this.labels = []; - // Thus-far undefined exports. - this.undefinedExports = {}; - - // If enabled, skip leading hashbang line. - if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") - { this.skipLineComment(2); } - - // Scope tracking for duplicate variable names (see scope.js) - this.scopeStack = []; - this.enterScope(SCOPE_TOP); - - // For RegExp validation - this.regexpState = null; -}; - -var prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true } }; - -Parser.prototype.parse = function parse () { - var node = this.options.program || this.startNode(); - this.nextToken(); - return this.parseTopLevel(node) -}; - -prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 }; -prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 }; -prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 }; -prototypeAccessors.allowSuper.get = function () { return (this.currentThisScope().flags & SCOPE_SUPER) > 0 }; -prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 }; -prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) }; - -// Switch to a getter for 7.0.0. -Parser.prototype.inNonArrowFunction = function inNonArrowFunction () { return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0 }; - -Parser.extend = function extend () { - var plugins = [], len = arguments.length; - while ( len-- ) plugins[ len ] = arguments[ len ]; - - var cls = this; - for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); } - return cls -}; - -Parser.parse = function parse (input, options) { - return new this(options, input).parse() -}; - -Parser.parseExpressionAt = function parseExpressionAt (input, pos, options) { - var parser = new this(options, input, pos); - parser.nextToken(); - return parser.parseExpression() -}; - -Parser.tokenizer = function tokenizer (input, options) { - return new this(options, input) -}; - -Object.defineProperties( Parser.prototype, prototypeAccessors ); - -var pp = Parser.prototype; - -// ## Parser utilities - -var literal = /^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)")/; -pp.strictDirective = function(start) { - var this$1 = this; - - for (;;) { - // Try to find string literal. - skipWhiteSpace.lastIndex = start; - start += skipWhiteSpace.exec(this$1.input)[0].length; - var match = literal.exec(this$1.input.slice(start)); - if (!match) { return false } - if ((match[1] || match[2]) === "use strict") { return true } - start += match[0].length; - - // Skip semicolon, if any. - skipWhiteSpace.lastIndex = start; - start += skipWhiteSpace.exec(this$1.input)[0].length; - if (this$1.input[start] === ";") - { start++; } - } -}; - -// Predicate that tests whether the next token is of the given -// type, and if yes, consumes it as a side effect. + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = global || self, factory(global.acorn = {})); +}(this, function (exports) { 'use strict'; + + // Reserved word lists for various dialects of the language + + var reservedWords = { + 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", + 5: "class enum extends super const export import", + 6: "enum", + strict: "implements interface let package private protected public static yield", + strictBind: "eval arguments" + }; -pp.eat = function(type) { - if (this.type === type) { - this.next(); - return true - } else { - return false - } -}; + // And the keywords -// Tests whether parsed token is a contextual keyword. + var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; -pp.isContextual = function(name) { - return this.type === types.name && this.value === name && !this.containsEsc -}; + var keywords = { + 5: ecma5AndLessKeywords, + 6: ecma5AndLessKeywords + " const class extends export import super" + }; -// Consumes contextual keyword if possible. + var keywordRelationalOperator = /^in(stanceof)?$/; -pp.eatContextual = function(name) { - if (!this.isContextual(name)) { return false } - this.next(); - return true -}; + // ## Character categories -// Asserts that following token is given contextual keyword. + // Big ugly regular expressions that match characters in the + // whitespace, identifier, and identifier-start categories. These + // are only applied when a character is found to actually have a + // code point above 128. + // Generated by `bin/generate-identifier-regex.js`. -pp.expectContextual = function(name) { - if (!this.eatContextual(name)) { this.unexpected(); } -}; + var nonASCIIidentifierStartChars = "aab5bac0-d6d8-f6f8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7c6\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab67\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; + var nonASCIIidentifierChars = "\u200c\u200db7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; -// Test whether a semicolon can be inserted at the current position. + var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); + var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); -pp.canInsertSemicolon = function() { - return this.type === types.eof || - this.type === types.braceR || - lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) -}; + nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; -pp.insertSemicolon = function() { - if (this.canInsertSemicolon()) { - if (this.options.onInsertedSemicolon) - { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); } - return true - } -}; + // These are a run-length and offset encoded representation of the + // >0xffff code points that are a valid part of identifiers. The + // offset starts at 0x10000, and each pair of numbers represents an + // offset to the next range, and then a size of the range. They were + // generated by bin/generate-identifier-regex.js -// Consume a semicolon, or, failing that, see if we are allowed to -// pretend that there is a semicolon at this position. + // eslint-disable-next-line comma-spacing + var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,155,22,13,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,0,33,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,0,161,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,754,9486,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541]; -pp.semicolon = function() { - if (!this.eat(types.semi) && !this.insertSemicolon()) { this.unexpected(); } -}; + // eslint-disable-next-line comma-spacing + var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,232,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,792487,239]; -pp.afterTrailingComma = function(tokType, notNext) { - if (this.type === tokType) { - if (this.options.onTrailingComma) - { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); } - if (!notNext) - { this.next(); } - return true - } -}; - -// Expect a token of a given type. If found, consume it, otherwise, -// raise an unexpected token error. - -pp.expect = function(type) { - this.eat(type) || this.unexpected(); -}; - -// Raise an unexpected token error. - -pp.unexpected = function(pos) { - this.raise(pos != null ? pos : this.start, "Unexpected token"); -}; - -function DestructuringErrors() { - this.shorthandAssign = - this.trailingComma = - this.parenthesizedAssign = - this.parenthesizedBind = - this.doubleProto = - -1; -} - -pp.checkPatternErrors = function(refDestructuringErrors, isAssign) { - if (!refDestructuringErrors) { return } - if (refDestructuringErrors.trailingComma > -1) - { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); } - var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind; - if (parens > -1) { this.raiseRecoverable(parens, "Parenthesized pattern"); } -}; - -pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) { - if (!refDestructuringErrors) { return false } - var shorthandAssign = refDestructuringErrors.shorthandAssign; - var doubleProto = refDestructuringErrors.doubleProto; - if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0 } - if (shorthandAssign >= 0) - { this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); } - if (doubleProto >= 0) - { this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); } -}; - -pp.checkYieldAwaitInDefaultParams = function() { - if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) - { this.raise(this.yieldPos, "Yield expression cannot be a default value"); } - if (this.awaitPos) - { this.raise(this.awaitPos, "Await expression cannot be a default value"); } -}; - -pp.isSimpleAssignTarget = function(expr) { - if (expr.type === "ParenthesizedExpression") - { return this.isSimpleAssignTarget(expr.expression) } - return expr.type === "Identifier" || expr.type === "MemberExpression" -}; - -var pp$1 = Parser.prototype; - -// ### Statement parsing - -// Parse a program. Initializes the parser, reads any number of -// statements, and wraps them in a Program node. Optionally takes a -// `program` argument. If present, the statements will be appended -// to its body instead of creating a new node. - -pp$1.parseTopLevel = function(node) { - var this$1 = this; - - var exports = {}; - if (!node.body) { node.body = []; } - while (this.type !== types.eof) { - var stmt = this$1.parseStatement(null, true, exports); - node.body.push(stmt); + // This has a complexity linear to the value of the code. The + // assumption is that looking up astral identifier characters is + // rare. + function isInAstralSet(code, set) { + var pos = 0x10000; + for (var i = 0; i < set.length; i += 2) { + pos += set[i]; + if (pos > code) { return false } + pos += set[i + 1]; + if (pos >= code) { return true } + } } - if (this.inModule) - { for (var i = 0, list = Object.keys(this$1.undefinedExports); i < list.length; i += 1) - { - var name = list[i]; - this$1.raiseRecoverable(this$1.undefinedExports[name].start, ("Export '" + name + "' is not defined")); - } } - this.adaptDirectivePrologue(node.body); - this.next(); - if (this.options.ecmaVersion >= 6) { - node.sourceType = this.options.sourceType; - } - return this.finishNode(node, "Program") -}; - -var loopLabel = {kind: "loop"}; -var switchLabel = {kind: "switch"}; - -pp$1.isLet = function(context) { - if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { return false } - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); - // For ambiguous cases, determine if a LexicalDeclaration (or only a - // Statement) is allowed here. If context is not empty then only a Statement - // is allowed. However, `let [` is an explicit negative lookahead for - // ExpressionStatement, so special-case it first. - if (nextCh === 91) { return true } // '[' - if (context) { return false } - - if (nextCh === 123) { return true } // '{' - if (isIdentifierStart(nextCh, true)) { - var pos = next + 1; - while (isIdentifierChar(this.input.charCodeAt(pos), true)) { ++pos; } - var ident = this.input.slice(next, pos); - if (!keywordRelationalOperator.test(ident)) { return true } - } - return false -}; - -// check 'async [no LineTerminator here] function' -// - 'async /*foo*/ function' is OK. -// - 'async /*\n*/ function' is invalid. -pp$1.isAsyncFunction = function() { - if (this.options.ecmaVersion < 8 || !this.isContextual("async")) - { return false } - - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length; - return !lineBreak.test(this.input.slice(this.pos, next)) && - this.input.slice(next, next + 8) === "function" && - (next + 8 === this.input.length || !isIdentifierChar(this.input.charAt(next + 8))) -}; - -// Parse a single statement. -// -// If expecting a statement and finding a slash operator, parse a -// regular expression literal. This is to handle cases like -// `if (foo) /blah/.exec(foo)`, where looking at the previous token -// does not help. - -pp$1.parseStatement = function(context, topLevel, exports) { - var starttype = this.type, node = this.startNode(), kind; - - if (this.isLet(context)) { - starttype = types._var; - kind = "let"; + // Test whether a given character code starts an identifier. + + function isIdentifierStart(code, astral) { + if (code < 65) { return code === 36 } + if (code < 91) { return true } + if (code < 97) { return code === 95 } + if (code < 123) { return true } + if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) } + if (astral === false) { return false } + return isInAstralSet(code, astralIdentifierStartCodes) } - // Most types of statements are recognized by the keyword they - // start with. Many are trivial to parse, some require a bit of - // complexity. - - switch (starttype) { - case types._break: case types._continue: return this.parseBreakContinueStatement(node, starttype.keyword) - case types._debugger: return this.parseDebuggerStatement(node) - case types._do: return this.parseDoStatement(node) - case types._for: return this.parseForStatement(node) - case types._function: - // Function as sole body of either an if statement or a labeled statement - // works, but not when it is part of a labeled statement that is the sole - // body of an if statement. - if ((context && (this.strict || context !== "if" && context !== "label")) && this.options.ecmaVersion >= 6) { this.unexpected(); } - return this.parseFunctionStatement(node, false, !context) - case types._class: - if (context) { this.unexpected(); } - return this.parseClass(node, true) - case types._if: return this.parseIfStatement(node) - case types._return: return this.parseReturnStatement(node) - case types._switch: return this.parseSwitchStatement(node) - case types._throw: return this.parseThrowStatement(node) - case types._try: return this.parseTryStatement(node) - case types._const: case types._var: - kind = kind || this.value; - if (context && kind !== "var") { this.unexpected(); } - return this.parseVarStatement(node, kind) - case types._while: return this.parseWhileStatement(node) - case types._with: return this.parseWithStatement(node) - case types.braceL: return this.parseBlock(true, node) - case types.semi: return this.parseEmptyStatement(node) - case types._export: - case types._import: - if (!this.options.allowImportExportEverywhere) { - if (!topLevel) - { this.raise(this.start, "'import' and 'export' may only appear at the top level"); } - if (!this.inModule) - { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); } - } - return starttype === types._import ? this.parseImport(node) : this.parseExport(node, exports) - - // If the statement does not start with a statement keyword or a - // brace, it's an ExpressionStatement or LabeledStatement. We - // simply start parsing an expression, and afterwards, if the - // next token is a colon and the expression was a simple - // Identifier node, we switch to interpreting it as a label. - default: - if (this.isAsyncFunction()) { - if (context) { this.unexpected(); } - this.next(); - return this.parseFunctionStatement(node, true, !context) - } + // Test whether a given character is part of an identifier. - var maybeName = this.value, expr = this.parseExpression(); - if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) - { return this.parseLabeledStatement(node, maybeName, expr, context) } - else { return this.parseExpressionStatement(node, expr) } + function isIdentifierChar(code, astral) { + if (code < 48) { return code === 36 } + if (code < 58) { return true } + if (code < 65) { return false } + if (code < 91) { return true } + if (code < 97) { return code === 95 } + if (code < 123) { return true } + if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) } + if (astral === false) { return false } + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) } -}; -pp$1.parseBreakContinueStatement = function(node, keyword) { - var this$1 = this; + // ## Token types - var isBreak = keyword === "break"; - this.next(); - if (this.eat(types.semi) || this.insertSemicolon()) { node.label = null; } - else if (this.type !== types.name) { this.unexpected(); } - else { - node.label = this.parseIdent(); - this.semicolon(); - } + // The assignment of fine-grained, information-carrying type objects + // allows the tokenizer to store the information it has about a + // token in a way that is very cheap for the parser to look up. - // Verify that there is an actual destination to break or - // continue to. - var i = 0; - for (; i < this.labels.length; ++i) { - var lab = this$1.labels[i]; - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === "loop")) { break } - if (node.label && isBreak) { break } - } - } - if (i === this.labels.length) { this.raise(node.start, "Unsyntactic " + keyword); } - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") -}; - -pp$1.parseDebuggerStatement = function(node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement") -}; - -pp$1.parseDoStatement = function(node) { - this.next(); - this.labels.push(loopLabel); - node.body = this.parseStatement("do"); - this.labels.pop(); - this.expect(types._while); - node.test = this.parseParenExpression(); - if (this.options.ecmaVersion >= 6) - { this.eat(types.semi); } - else - { this.semicolon(); } - return this.finishNode(node, "DoWhileStatement") -}; - -// Disambiguating between a `for` and a `for`/`in` or `for`/`of` -// loop is non-trivial. Basically, we have to parse the init `var` -// statement or expression, disallowing the `in` operator (see -// the second parameter to `parseExpression`), and then check -// whether the next token is `in` or `of`. When there is no init -// part (semicolon immediately after the opening parenthesis), it -// is a regular `for` loop. - -pp$1.parseForStatement = function(node) { - this.next(); - var awaitAt = (this.options.ecmaVersion >= 9 && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction)) && this.eatContextual("await")) ? this.lastTokStart : -1; - this.labels.push(loopLabel); - this.enterScope(0); - this.expect(types.parenL); - if (this.type === types.semi) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, null) - } - var isLet = this.isLet(); - if (this.type === types._var || this.type === types._const || isLet) { - var init$1 = this.startNode(), kind = isLet ? "let" : this.value; - this.next(); - this.parseVar(init$1, true, kind); - this.finishNode(init$1, "VariableDeclaration"); - if ((this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1 && - !(kind !== "var" && init$1.declarations[0].init)) { - if (this.options.ecmaVersion >= 9) { - if (this.type === types._in) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - } else { node.await = awaitAt > -1; } - } - return this.parseForIn(node, init$1) - } - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, init$1) - } - var refDestructuringErrors = new DestructuringErrors; - var init = this.parseExpression(true, refDestructuringErrors); - if (this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) { - if (this.options.ecmaVersion >= 9) { - if (this.type === types._in) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - } else { node.await = awaitAt > -1; } - } - this.toAssignable(init, false, refDestructuringErrors); - this.checkLVal(init); - return this.parseForIn(node, init) - } else { - this.checkExpressionErrors(refDestructuringErrors, true); - } - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, init) -}; - -pp$1.parseFunctionStatement = function(node, isAsync, declarationPosition) { - this.next(); - return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync) -}; - -pp$1.parseIfStatement = function(node) { - this.next(); - node.test = this.parseParenExpression(); - // allow function declarations in branches, but only in non-strict mode - node.consequent = this.parseStatement("if"); - node.alternate = this.eat(types._else) ? this.parseStatement("if") : null; - return this.finishNode(node, "IfStatement") -}; - -pp$1.parseReturnStatement = function(node) { - if (!this.inFunction && !this.options.allowReturnOutsideFunction) - { this.raise(this.start, "'return' outside of function"); } - this.next(); - - // In `return` (and `break`/`continue`), the keywords with - // optional arguments, we eagerly look for a semicolon or the - // possibility to insert one. - - if (this.eat(types.semi) || this.insertSemicolon()) { node.argument = null; } - else { node.argument = this.parseExpression(); this.semicolon(); } - return this.finishNode(node, "ReturnStatement") -}; - -pp$1.parseSwitchStatement = function(node) { - var this$1 = this; - - this.next(); - node.discriminant = this.parseParenExpression(); - node.cases = []; - this.expect(types.braceL); - this.labels.push(switchLabel); - this.enterScope(0); - - // Statements under must be grouped (by label) in SwitchCase - // nodes. `cur` is used to keep the node that we are currently - // adding statements to. - - var cur; - for (var sawDefault = false; this.type !== types.braceR;) { - if (this$1.type === types._case || this$1.type === types._default) { - var isCase = this$1.type === types._case; - if (cur) { this$1.finishNode(cur, "SwitchCase"); } - node.cases.push(cur = this$1.startNode()); - cur.consequent = []; - this$1.next(); - if (isCase) { - cur.test = this$1.parseExpression(); - } else { - if (sawDefault) { this$1.raiseRecoverable(this$1.lastTokStart, "Multiple default clauses"); } - sawDefault = true; - cur.test = null; - } - this$1.expect(types.colon); - } else { - if (!cur) { this$1.unexpected(); } - cur.consequent.push(this$1.parseStatement(null)); - } - } - this.exitScope(); - if (cur) { this.finishNode(cur, "SwitchCase"); } - this.next(); // Closing brace - this.labels.pop(); - return this.finishNode(node, "SwitchStatement") -}; - -pp$1.parseThrowStatement = function(node) { - this.next(); - if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) - { this.raise(this.lastTokEnd, "Illegal newline after throw"); } - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement") -}; - -// Reused empty array added for node fields that are always empty. - -var empty = []; - -pp$1.parseTryStatement = function(node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - if (this.type === types._catch) { - var clause = this.startNode(); - this.next(); - if (this.eat(types.parenL)) { - clause.param = this.parseBindingAtom(); - var simple = clause.param.type === "Identifier"; - this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0); - this.checkLVal(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL); - this.expect(types.parenR); - } else { - if (this.options.ecmaVersion < 10) { this.unexpected(); } - clause.param = null; - this.enterScope(0); - } - clause.body = this.parseBlock(false); - this.exitScope(); - node.handler = this.finishNode(clause, "CatchClause"); - } - node.finalizer = this.eat(types._finally) ? this.parseBlock() : null; - if (!node.handler && !node.finalizer) - { this.raise(node.start, "Missing catch or finally clause"); } - return this.finishNode(node, "TryStatement") -}; - -pp$1.parseVarStatement = function(node, kind) { - this.next(); - this.parseVar(node, false, kind); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration") -}; - -pp$1.parseWhileStatement = function(node) { - this.next(); - node.test = this.parseParenExpression(); - this.labels.push(loopLabel); - node.body = this.parseStatement("while"); - this.labels.pop(); - return this.finishNode(node, "WhileStatement") -}; - -pp$1.parseWithStatement = function(node) { - if (this.strict) { this.raise(this.start, "'with' in strict mode"); } - this.next(); - node.object = this.parseParenExpression(); - node.body = this.parseStatement("with"); - return this.finishNode(node, "WithStatement") -}; - -pp$1.parseEmptyStatement = function(node) { - this.next(); - return this.finishNode(node, "EmptyStatement") -}; - -pp$1.parseLabeledStatement = function(node, maybeName, expr, context) { - var this$1 = this; - - for (var i$1 = 0, list = this$1.labels; i$1 < list.length; i$1 += 1) - { - var label = list[i$1]; - - if (label.name === maybeName) - { this$1.raise(expr.start, "Label '" + maybeName + "' is already declared"); - } } - var kind = this.type.isLoop ? "loop" : this.type === types._switch ? "switch" : null; - for (var i = this.labels.length - 1; i >= 0; i--) { - var label$1 = this$1.labels[i]; - if (label$1.statementStart === node.start) { - // Update information about previous labels on this node - label$1.statementStart = this$1.start; - label$1.kind = kind; - } else { break } - } - this.labels.push({name: maybeName, kind: kind, statementStart: this.start}); - node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); - this.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement") -}; - -pp$1.parseExpressionStatement = function(node, expr) { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement") -}; - -// Parse a semicolon-enclosed block of statements, handling `"use -// strict"` declarations when `allowStrict` is true (used for -// function bodies). - -pp$1.parseBlock = function(createNewLexicalScope, node) { - var this$1 = this; - if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true; - if ( node === void 0 ) node = this.startNode(); - - node.body = []; - this.expect(types.braceL); - if (createNewLexicalScope) { this.enterScope(0); } - while (!this.eat(types.braceR)) { - var stmt = this$1.parseStatement(null); - node.body.push(stmt); - } - if (createNewLexicalScope) { this.exitScope(); } - return this.finishNode(node, "BlockStatement") -}; - -// Parse a regular `for` loop. The disambiguation code in -// `parseStatement` will already have parsed the init statement or -// expression. - -pp$1.parseFor = function(node, init) { - node.init = init; - this.expect(types.semi); - node.test = this.type === types.semi ? null : this.parseExpression(); - this.expect(types.semi); - node.update = this.type === types.parenR ? null : this.parseExpression(); - this.expect(types.parenR); - node.body = this.parseStatement("for"); - this.exitScope(); - this.labels.pop(); - return this.finishNode(node, "ForStatement") -}; - -// Parse a `for`/`in` and `for`/`of` loop, which are almost -// same from parser's perspective. - -pp$1.parseForIn = function(node, init) { - var type = this.type === types._in ? "ForInStatement" : "ForOfStatement"; - this.next(); - if (type === "ForInStatement") { - if (init.type === "AssignmentPattern" || - (init.type === "VariableDeclaration" && init.declarations[0].init != null && - (this.strict || init.declarations[0].id.type !== "Identifier"))) - { this.raise(init.start, "Invalid assignment in for-in loop head"); } - } - node.left = init; - node.right = type === "ForInStatement" ? this.parseExpression() : this.parseMaybeAssign(); - this.expect(types.parenR); - node.body = this.parseStatement("for"); - this.exitScope(); - this.labels.pop(); - return this.finishNode(node, type) -}; - -// Parse a list of variable declarations. - -pp$1.parseVar = function(node, isFor, kind) { - var this$1 = this; - - node.declarations = []; - node.kind = kind; - for (;;) { - var decl = this$1.startNode(); - this$1.parseVarId(decl, kind); - if (this$1.eat(types.eq)) { - decl.init = this$1.parseMaybeAssign(isFor); - } else if (kind === "const" && !(this$1.type === types._in || (this$1.options.ecmaVersion >= 6 && this$1.isContextual("of")))) { - this$1.unexpected(); - } else if (decl.id.type !== "Identifier" && !(isFor && (this$1.type === types._in || this$1.isContextual("of")))) { - this$1.raise(this$1.lastTokEnd, "Complex binding patterns require an initialization value"); - } else { - decl.init = null; - } - node.declarations.push(this$1.finishNode(decl, "VariableDeclarator")); - if (!this$1.eat(types.comma)) { break } - } - return node -}; + // All token type variables start with an underscore, to make them + // easy to recognize. -pp$1.parseVarId = function(decl, kind) { - if ((kind === "const" || kind === "let") && this.isContextual("let")) { - this.raiseRecoverable(this.start, "let is disallowed as a lexically bound name"); - } - decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false); -}; - -var FUNC_STATEMENT = 1; -var FUNC_HANGING_STATEMENT = 2; -var FUNC_NULLABLE_ID = 4; - -// Parse a function declaration or literal (depending on the -// `statement & FUNC_STATEMENT`). - -// Remove `allowExpressionBody` for 7.0.0, as it is only called with false -pp$1.parseFunction = function(node, statement, allowExpressionBody, isAsync) { - this.initFunction(node); - if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) { - if (this.type === types.star && (statement & FUNC_HANGING_STATEMENT)) - { this.unexpected(); } - node.generator = this.eat(types.star); - } - if (this.options.ecmaVersion >= 8) - { node.async = !!isAsync; } - - if (statement & FUNC_STATEMENT) { - node.id = (statement & FUNC_NULLABLE_ID) && this.type !== types.name ? null : this.parseIdent(); - if (node.id && !(statement & FUNC_HANGING_STATEMENT)) - // If it is a regular function declaration in sloppy mode, then it is - // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding - // mode depends on properties of the current scope (see - // treatFunctionsAsVar). - { this.checkLVal(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); } - } + // The `beforeExpr` property is used to disambiguate between regular + // expressions and divisions. It is set on all token types that can + // be followed by an expression (thus, a slash after them would be a + // regular expression). + // + // The `startsExpr` property is used to check if the token ends a + // `yield` expression. It is set on all token types that either can + // directly start an expression (like a quotation mark) or can + // continue an expression (like the body of a string). + // + // `isLoop` marks a keyword as starting a loop, which is important + // to know when parsing a label, in order to allow or disallow + // continue jumps to that label. + + var TokenType = function TokenType(label, conf) { + if ( conf === void 0 ) conf = {}; + + this.label = label; + this.keyword = conf.keyword; + this.beforeExpr = !!conf.beforeExpr; + this.startsExpr = !!conf.startsExpr; + this.isLoop = !!conf.isLoop; + this.isAssign = !!conf.isAssign; + this.prefix = !!conf.prefix; + this.postfix = !!conf.postfix; + this.binop = conf.binop || null; + this.updateContext = null; + }; - var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - this.enterScope(functionFlags(node.async, node.generator)); - - if (!(statement & FUNC_STATEMENT)) - { node.id = this.type === types.name ? this.parseIdent() : null; } - - this.parseFunctionParams(node); - this.parseFunctionBody(node, allowExpressionBody, false); - - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, (statement & FUNC_STATEMENT) ? "FunctionDeclaration" : "FunctionExpression") -}; - -pp$1.parseFunctionParams = function(node) { - this.expect(types.parenL); - node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); - this.checkYieldAwaitInDefaultParams(); -}; - -// Parse a class declaration or literal (depending on the -// `isStatement` parameter). - -pp$1.parseClass = function(node, isStatement) { - var this$1 = this; - - this.next(); - - // ecma-262 14.6 Class Definitions - // A class definition is always strict mode code. - var oldStrict = this.strict; - this.strict = true; - - this.parseClassId(node, isStatement); - this.parseClassSuper(node); - var classBody = this.startNode(); - var hadConstructor = false; - classBody.body = []; - this.expect(types.braceL); - while (!this.eat(types.braceR)) { - var element = this$1.parseClassElement(node.superClass !== null); - if (element) { - classBody.body.push(element); - if (element.type === "MethodDefinition" && element.kind === "constructor") { - if (hadConstructor) { this$1.raise(element.start, "Duplicate constructor in the same class"); } - hadConstructor = true; - } - } - } - node.body = this.finishNode(classBody, "ClassBody"); - this.strict = oldStrict; - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") -}; - -pp$1.parseClassElement = function(constructorAllowsSuper) { - var this$1 = this; - - if (this.eat(types.semi)) { return null } - - var method = this.startNode(); - var tryContextual = function (k, noLineBreak) { - if ( noLineBreak === void 0 ) noLineBreak = false; - - var start = this$1.start, startLoc = this$1.startLoc; - if (!this$1.eatContextual(k)) { return false } - if (this$1.type !== types.parenL && (!noLineBreak || !this$1.canInsertSemicolon())) { return true } - if (method.key) { this$1.unexpected(); } - method.computed = false; - method.key = this$1.startNodeAt(start, startLoc); - method.key.name = k; - this$1.finishNode(method.key, "Identifier"); - return false + function binop(name, prec) { + return new TokenType(name, {beforeExpr: true, binop: prec}) + } + var beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true}; + + // Map keyword names to token types. + + var keywords$1 = {}; + + // Succinct definitions of keyword token types + function kw(name, options) { + if ( options === void 0 ) options = {}; + + options.keyword = name; + return keywords$1[name] = new TokenType(name, options) + } + + var types = { + num: new TokenType("num", startsExpr), + regexp: new TokenType("regexp", startsExpr), + string: new TokenType("string", startsExpr), + name: new TokenType("name", startsExpr), + eof: new TokenType("eof"), + + // Punctuation token types. + bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), + bracketR: new TokenType("]"), + braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), + braceR: new TokenType("}"), + parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), + parenR: new TokenType(")"), + comma: new TokenType(",", beforeExpr), + semi: new TokenType(";", beforeExpr), + colon: new TokenType(":", beforeExpr), + dot: new TokenType("."), + question: new TokenType("?", beforeExpr), + arrow: new TokenType("=>", beforeExpr), + template: new TokenType("template"), + invalidTemplate: new TokenType("invalidTemplate"), + ellipsis: new TokenType("...", beforeExpr), + backQuote: new TokenType("`", startsExpr), + dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), + + // Operators. These carry several kinds of properties to help the + // parser use them properly (the presence of these properties is + // what categorizes them as operators). + // + // `binop`, when present, specifies that this operator is a binary + // operator, and will refer to its precedence. + // + // `prefix` and `postfix` mark the operator as a prefix or postfix + // unary operator. + // + // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as + // binary operators with a very low precedence, that should result + // in AssignmentExpression nodes. + + eq: new TokenType("=", {beforeExpr: true, isAssign: true}), + assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), + incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), + prefix: new TokenType("!/~", {beforeExpr: true, prefix: true, startsExpr: true}), + logicalOR: binop("||", 1), + logicalAND: binop("&&", 2), + bitwiseOR: binop("|", 3), + bitwiseXOR: binop("^", 4), + bitwiseAND: binop("&", 5), + equality: binop("==/!=/===/!==", 6), + relational: binop("/<=/>=", 7), + bitShift: binop("<>/>>>", 8), + plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), + modulo: binop("%", 10), + star: binop("*", 10), + slash: binop("/", 10), + starstar: new TokenType("**", {beforeExpr: true}), + + // Keyword token types. + _break: kw("break"), + _case: kw("case", beforeExpr), + _catch: kw("catch"), + _continue: kw("continue"), + _debugger: kw("debugger"), + _default: kw("default", beforeExpr), + _do: kw("do", {isLoop: true, beforeExpr: true}), + _else: kw("else", beforeExpr), + _finally: kw("finally"), + _for: kw("for", {isLoop: true}), + _function: kw("function", startsExpr), + _if: kw("if"), + _return: kw("return", beforeExpr), + _switch: kw("switch"), + _throw: kw("throw", beforeExpr), + _try: kw("try"), + _var: kw("var"), + _const: kw("const"), + _while: kw("while", {isLoop: true}), + _with: kw("with"), + _new: kw("new", {beforeExpr: true, startsExpr: true}), + _this: kw("this", startsExpr), + _super: kw("super", startsExpr), + _class: kw("class", startsExpr), + _extends: kw("extends", beforeExpr), + _export: kw("export"), + _import: kw("import", startsExpr), + _null: kw("null", startsExpr), + _true: kw("true", startsExpr), + _false: kw("false", startsExpr), + _in: kw("in", {beforeExpr: true, binop: 7}), + _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), + _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), + _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), + _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) }; - method.kind = "method"; - method.static = tryContextual("static"); - var isGenerator = this.eat(types.star); - var isAsync = false; - if (!isGenerator) { - if (this.options.ecmaVersion >= 8 && tryContextual("async", true)) { - isAsync = true; - isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); - } else if (tryContextual("get")) { - method.kind = "get"; - } else if (tryContextual("set")) { - method.kind = "set"; - } - } - if (!method.key) { this.parsePropertyName(method); } - var key = method.key; - var allowsDirectSuper = false; - if (!method.computed && !method.static && (key.type === "Identifier" && key.name === "constructor" || - key.type === "Literal" && key.value === "constructor")) { - if (method.kind !== "method") { this.raise(key.start, "Constructor can't have get/set modifier"); } - if (isGenerator) { this.raise(key.start, "Constructor can't be a generator"); } - if (isAsync) { this.raise(key.start, "Constructor can't be an async method"); } - method.kind = "constructor"; - allowsDirectSuper = constructorAllowsSuper; - } else if (method.static && key.type === "Identifier" && key.name === "prototype") { - this.raise(key.start, "Classes may not have a static property named prototype"); - } - this.parseClassMethod(method, isGenerator, isAsync, allowsDirectSuper); - if (method.kind === "get" && method.value.params.length !== 0) - { this.raiseRecoverable(method.value.start, "getter should have no params"); } - if (method.kind === "set" && method.value.params.length !== 1) - { this.raiseRecoverable(method.value.start, "setter should have exactly one param"); } - if (method.kind === "set" && method.value.params[0].type === "RestElement") - { this.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params"); } - return method -}; - -pp$1.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) { - method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper); - return this.finishNode(method, "MethodDefinition") -}; - -pp$1.parseClassId = function(node, isStatement) { - if (this.type === types.name) { - node.id = this.parseIdent(); - if (isStatement === true) - { this.checkLVal(node.id, BIND_LEXICAL, false); } - } else { - if (isStatement === true) - { this.unexpected(); } - node.id = null; - } -}; + // Matches a whole line break (where CRLF is considered a single + // line break). Used to count lines. -pp$1.parseClassSuper = function(node) { - node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null; -}; + var lineBreak = /\r\n?|\n|\u2028|\u2029/; + var lineBreakG = new RegExp(lineBreak.source, "g"); -// Parses module export declaration. + function isNewLine(code, ecma2019String) { + return code === 10 || code === 13 || (!ecma2019String && (code === 0x2028 || code === 0x2029)) + } -pp$1.parseExport = function(node, exports) { - var this$1 = this; + var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/; - this.next(); - // export * from '...' - if (this.eat(types.star)) { - this.expectContextual("from"); - if (this.type !== types.string) { this.unexpected(); } - node.source = this.parseExprAtom(); - this.semicolon(); - return this.finishNode(node, "ExportAllDeclaration") - } - if (this.eat(types._default)) { // export default ... - this.checkExport(exports, "default", this.lastTokStart); - var isAsync; - if (this.type === types._function || (isAsync = this.isAsyncFunction())) { - var fNode = this.startNode(); - this.next(); - if (isAsync) { this.next(); } - node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync); - } else if (this.type === types._class) { - var cNode = this.startNode(); - node.declaration = this.parseClass(cNode, "nullableID"); - } else { - node.declaration = this.parseMaybeAssign(); - this.semicolon(); - } - return this.finishNode(node, "ExportDefaultDeclaration") - } - // export var|const|let|function|class ... - if (this.shouldParseExportStatement()) { - node.declaration = this.parseStatement(null); - if (node.declaration.type === "VariableDeclaration") - { this.checkVariableExport(exports, node.declaration.declarations); } - else - { this.checkExport(exports, node.declaration.id.name, node.declaration.id.start); } - node.specifiers = []; - node.source = null; - } else { // export { x, y as z } [from '...'] - node.declaration = null; - node.specifiers = this.parseExportSpecifiers(exports); - if (this.eatContextual("from")) { - if (this.type !== types.string) { this.unexpected(); } - node.source = this.parseExprAtom(); - } else { - for (var i = 0, list = node.specifiers; i < list.length; i += 1) { - // check for keywords used as local names - var spec = list[i]; + var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; - this$1.checkUnreserved(spec.local); - // check if export is defined - this$1.checkLocalExport(spec.local); - } + var ref = Object.prototype; + var hasOwnProperty = ref.hasOwnProperty; + var toString = ref.toString; - node.source = null; - } - this.semicolon(); + // Checks if an object has a property. + + function has(obj, propName) { + return hasOwnProperty.call(obj, propName) } - return this.finishNode(node, "ExportNamedDeclaration") -}; - -pp$1.checkExport = function(exports, name, pos) { - if (!exports) { return } - if (has(exports, name)) - { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); } - exports[name] = true; -}; - -pp$1.checkPatternExport = function(exports, pat) { - var this$1 = this; - - var type = pat.type; - if (type === "Identifier") - { this.checkExport(exports, pat.name, pat.start); } - else if (type === "ObjectPattern") - { for (var i = 0, list = pat.properties; i < list.length; i += 1) - { - var prop = list[i]; - this$1.checkPatternExport(exports, prop); - } } - else if (type === "ArrayPattern") - { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) { - var elt = list$1[i$1]; + var isArray = Array.isArray || (function (obj) { return ( + toString.call(obj) === "[object Array]" + ); }); - if (elt) { this$1.checkPatternExport(exports, elt); } - } } - else if (type === "Property") - { this.checkPatternExport(exports, pat.value); } - else if (type === "AssignmentPattern") - { this.checkPatternExport(exports, pat.left); } - else if (type === "RestElement") - { this.checkPatternExport(exports, pat.argument); } - else if (type === "ParenthesizedExpression") - { this.checkPatternExport(exports, pat.expression); } -}; - -pp$1.checkVariableExport = function(exports, decls) { - var this$1 = this; - - if (!exports) { return } - for (var i = 0, list = decls; i < list.length; i += 1) - { - var decl = list[i]; - - this$1.checkPatternExport(exports, decl.id); - } -}; - -pp$1.shouldParseExportStatement = function() { - return this.type.keyword === "var" || - this.type.keyword === "const" || - this.type.keyword === "class" || - this.type.keyword === "function" || - this.isLet() || - this.isAsyncFunction() -}; - -// Parses a comma-separated list of module exports. - -pp$1.parseExportSpecifiers = function(exports) { - var this$1 = this; - - var nodes = [], first = true; - // export { x, y as z } [from '...'] - this.expect(types.braceL); - while (!this.eat(types.braceR)) { - if (!first) { - this$1.expect(types.comma); - if (this$1.afterTrailingComma(types.braceR)) { break } - } else { first = false; } - - var node = this$1.startNode(); - node.local = this$1.parseIdent(true); - node.exported = this$1.eatContextual("as") ? this$1.parseIdent(true) : node.local; - this$1.checkExport(exports, node.exported.name, node.exported.start); - nodes.push(this$1.finishNode(node, "ExportSpecifier")); + function wordsRegexp(words) { + return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$") } - return nodes -}; - -// Parses import declaration. - -pp$1.parseImport = function(node) { - this.next(); - // import '...' - if (this.type === types.string) { - node.specifiers = empty; - node.source = this.parseExprAtom(); - } else { - node.specifiers = this.parseImportSpecifiers(); - this.expectContextual("from"); - node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected(); - } - this.semicolon(); - return this.finishNode(node, "ImportDeclaration") -}; - -// Parses a comma-separated list of module imports. -pp$1.parseImportSpecifiers = function() { - var this$1 = this; + // These are used when `options.locations` is on, for the + // `startLoc` and `endLoc` properties. - var nodes = [], first = true; - if (this.type === types.name) { - // import defaultObj, { x, y as z } from '...' - var node = this.startNode(); - node.local = this.parseIdent(); - this.checkLVal(node.local, BIND_LEXICAL); - nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); - if (!this.eat(types.comma)) { return nodes } - } - if (this.type === types.star) { - var node$1 = this.startNode(); - this.next(); - this.expectContextual("as"); - node$1.local = this.parseIdent(); - this.checkLVal(node$1.local, BIND_LEXICAL); - nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier")); - return nodes - } - this.expect(types.braceL); - while (!this.eat(types.braceR)) { - if (!first) { - this$1.expect(types.comma); - if (this$1.afterTrailingComma(types.braceR)) { break } - } else { first = false; } - - var node$2 = this$1.startNode(); - node$2.imported = this$1.parseIdent(true); - if (this$1.eatContextual("as")) { - node$2.local = this$1.parseIdent(); - } else { - this$1.checkUnreserved(node$2.imported); - node$2.local = node$2.imported; - } - this$1.checkLVal(node$2.local, BIND_LEXICAL); - nodes.push(this$1.finishNode(node$2, "ImportSpecifier")); - } - return nodes -}; + var Position = function Position(line, col) { + this.line = line; + this.column = col; + }; -// Set `ExpressionStatement#directive` property for directive prologues. -pp$1.adaptDirectivePrologue = function(statements) { - for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) { - statements[i].directive = statements[i].expression.raw.slice(1, -1); - } -}; -pp$1.isDirectiveCandidate = function(statement) { - return ( - statement.type === "ExpressionStatement" && - statement.expression.type === "Literal" && - typeof statement.expression.value === "string" && - // Reject parenthesized strings. - (this.input[statement.start] === "\"" || this.input[statement.start] === "'") - ) -}; - -var pp$2 = Parser.prototype; - -// Convert existing expression atom to assignable pattern -// if possible. - -pp$2.toAssignable = function(node, isBinding, refDestructuringErrors) { - var this$1 = this; - - if (this.options.ecmaVersion >= 6 && node) { - switch (node.type) { - case "Identifier": - if (this.inAsync && node.name === "await") - { this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); } - break + Position.prototype.offset = function offset (n) { + return new Position(this.line, this.column + n) + }; - case "ObjectPattern": - case "ArrayPattern": - case "RestElement": - break + var SourceLocation = function SourceLocation(p, start, end) { + this.start = start; + this.end = end; + if (p.sourceFile !== null) { this.source = p.sourceFile; } + }; - case "ObjectExpression": - node.type = "ObjectPattern"; - if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - for (var i = 0, list = node.properties; i < list.length; i += 1) { - var prop = list[i]; - - this$1.toAssignable(prop, isBinding); - // Early error: - // AssignmentRestProperty[Yield, Await] : - // `...` DestructuringAssignmentTarget[Yield, Await] - // - // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|. - if ( - prop.type === "RestElement" && - (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern") - ) { - this$1.raise(prop.argument.start, "Unexpected token"); - } + // The `getLineInfo` function is mostly useful when the + // `locations` option is off (for performance reasons) and you + // want to find the line/column position for a given character + // offset. `input` should be the code string that the offset refers + // into. + + function getLineInfo(input, offset) { + for (var line = 1, cur = 0;;) { + lineBreakG.lastIndex = cur; + var match = lineBreakG.exec(input); + if (match && match.index < offset) { + ++line; + cur = match.index + match[0].length; + } else { + return new Position(line, offset - cur) } - break + } + } - case "Property": - // AssignmentProperty has type === "Property" - if (node.kind !== "init") { this.raise(node.key.start, "Object pattern can't contain getter or setter"); } - this.toAssignable(node.value, isBinding); - break + // A second optional argument can be given to further configure + // the parser process. These options are recognized: + + var defaultOptions = { + // `ecmaVersion` indicates the ECMAScript version to parse. Must be + // either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), or 10 + // (2019). This influences support for strict mode, the set of + // reserved words, and support for new syntax features. The default + // is 9. + ecmaVersion: 9, + // `sourceType` indicates the mode the code should be parsed in. + // Can be either `"script"` or `"module"`. This influences global + // strict mode and parsing of `import` and `export` declarations. + sourceType: "script", + // `onInsertedSemicolon` can be a callback that will be called + // when a semicolon is automatically inserted. It will be passed + // the position of the comma as an offset, and if `locations` is + // enabled, it is given the location as a `{line, column}` object + // as second argument. + onInsertedSemicolon: null, + // `onTrailingComma` is similar to `onInsertedSemicolon`, but for + // trailing commas. + onTrailingComma: null, + // By default, reserved words are only enforced if ecmaVersion >= 5. + // Set `allowReserved` to a boolean value to explicitly turn this on + // an off. When this option has the value "never", reserved words + // and keywords can also not be used as property names. + allowReserved: null, + // When enabled, a return at the top level is not considered an + // error. + allowReturnOutsideFunction: false, + // When enabled, import/export statements are not constrained to + // appearing at the top of the program. + allowImportExportEverywhere: false, + // When enabled, await identifiers are allowed to appear at the top-level scope, + // but they are still not allowed in non-async functions. + allowAwaitOutsideFunction: false, + // When enabled, hashbang directive in the beginning of file + // is allowed and treated as a line comment. + allowHashBang: false, + // When `locations` is on, `loc` properties holding objects with + // `start` and `end` properties in `{line, column}` form (with + // line being 1-based and column 0-based) will be attached to the + // nodes. + locations: false, + // A function can be passed as `onToken` option, which will + // cause Acorn to call that function with object in the same + // format as tokens returned from `tokenizer().getToken()`. Note + // that you are not allowed to call the parser from the + // callback—that will corrupt its internal state. + onToken: null, + // A function can be passed as `onComment` option, which will + // cause Acorn to call that function with `(block, text, start, + // end)` parameters whenever a comment is skipped. `block` is a + // boolean indicating whether this is a block (`/* */`) comment, + // `text` is the content of the comment, and `start` and `end` are + // character offsets that denote the start and end of the comment. + // When the `locations` option is on, two more parameters are + // passed, the full `{line, column}` locations of the start and + // end of the comments. Note that you are not allowed to call the + // parser from the callback—that will corrupt its internal state. + onComment: null, + // Nodes have their start and end characters offsets recorded in + // `start` and `end` properties (directly on the node, rather than + // the `loc` object, which holds line/column data. To also add a + // [semi-standardized][range] `range` property holding a `[start, + // end]` array with the same numbers, set the `ranges` option to + // `true`. + // + // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + ranges: false, + // It is possible to parse multiple files into a single AST by + // passing the tree produced by parsing the first file as + // `program` option in subsequent parses. This will add the + // toplevel forms of the parsed file to the `Program` (top) node + // of an existing parse tree. + program: null, + // When `locations` is on, you can pass this to record the source + // file in every node's `loc` object. + sourceFile: null, + // This value, if given, is stored in every node, whether + // `locations` is on or off. + directSourceFile: null, + // When enabled, parenthesized expressions are represented by + // (non-standard) ParenthesizedExpression nodes + preserveParens: false + }; - case "ArrayExpression": - node.type = "ArrayPattern"; - if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - this.toAssignableList(node.elements, isBinding); - break + // Interpret and default an options object - case "SpreadElement": - node.type = "RestElement"; - this.toAssignable(node.argument, isBinding); - if (node.argument.type === "AssignmentPattern") - { this.raise(node.argument.start, "Rest elements cannot have a default value"); } - break + function getOptions(opts) { + var options = {}; - case "AssignmentExpression": - if (node.operator !== "=") { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); } - node.type = "AssignmentPattern"; - delete node.operator; - this.toAssignable(node.left, isBinding); - // falls through to AssignmentPattern + for (var opt in defaultOptions) + { options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; } - case "AssignmentPattern": - break + if (options.ecmaVersion >= 2015) + { options.ecmaVersion -= 2009; } - case "ParenthesizedExpression": - this.toAssignable(node.expression, isBinding, refDestructuringErrors); - break + if (options.allowReserved == null) + { options.allowReserved = options.ecmaVersion < 5; } - case "MemberExpression": - if (!isBinding) { break } + if (isArray(options.onToken)) { + var tokens = options.onToken; + options.onToken = function (token) { return tokens.push(token); }; + } + if (isArray(options.onComment)) + { options.onComment = pushComment(options, options.onComment); } + + return options + } + + function pushComment(options, array) { + return function(block, text, start, end, startLoc, endLoc) { + var comment = { + type: block ? "Block" : "Line", + value: text, + start: start, + end: end + }; + if (options.locations) + { comment.loc = new SourceLocation(this, startLoc, endLoc); } + if (options.ranges) + { comment.range = [start, end]; } + array.push(comment); + } + } - default: - this.raise(node.start, "Assigning to rvalue"); + // Each scope gets a bitset that may contain these flags + var + SCOPE_TOP = 1, + SCOPE_FUNCTION = 2, + SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION, + SCOPE_ASYNC = 4, + SCOPE_GENERATOR = 8, + SCOPE_ARROW = 16, + SCOPE_SIMPLE_CATCH = 32, + SCOPE_SUPER = 64, + SCOPE_DIRECT_SUPER = 128; + + function functionFlags(async, generator) { + return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0) + } + + // Used in checkLVal and declareName to determine the type of a binding + var + BIND_NONE = 0, // Not a binding + BIND_VAR = 1, // Var-style binding + BIND_LEXICAL = 2, // Let- or const-style binding + BIND_FUNCTION = 3, // Function declaration + BIND_SIMPLE_CATCH = 4, // Simple (identifier pattern) catch binding + BIND_OUTSIDE = 5; // Special case for function names as bound inside the function + + var Parser = function Parser(options, input, startPos) { + this.options = options = getOptions(options); + this.sourceFile = options.sourceFile; + this.keywords = wordsRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]); + var reserved = ""; + if (!options.allowReserved) { + for (var v = options.ecmaVersion;; v--) + { if (reserved = reservedWords[v]) { break } } + if (options.sourceType === "module") { reserved += " await"; } + } + this.reservedWords = wordsRegexp(reserved); + var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict; + this.reservedWordsStrict = wordsRegexp(reservedStrict); + this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind); + this.input = String(input); + + // Used to signal to callers of `readWord1` whether the word + // contained any escape sequences. This is needed because words with + // escape sequences must not be interpreted as keywords. + this.containsEsc = false; + + // Set up token state + + // The current position of the tokenizer in the input. + if (startPos) { + this.pos = startPos; + this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1; + this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; + } else { + this.pos = this.lineStart = 0; + this.curLine = 1; } - } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - return node -}; -// Convert list of expression atoms to binding list. + // Properties of the current token: + // Its type + this.type = types.eof; + // For tokens that include more information than their type, the value + this.value = null; + // Its start and end offset + this.start = this.end = this.pos; + // And, if locations are used, the {line, column} object + // corresponding to those offsets + this.startLoc = this.endLoc = this.curPosition(); + + // Position information for the previous token + this.lastTokEndLoc = this.lastTokStartLoc = null; + this.lastTokStart = this.lastTokEnd = this.pos; + + // The context stack is used to superficially track syntactic + // context to predict whether a regular expression is allowed in a + // given position. + this.context = this.initialContext(); + this.exprAllowed = true; -pp$2.toAssignableList = function(exprList, isBinding) { - var this$1 = this; + // Figure out if it's a module code. + this.inModule = options.sourceType === "module"; + this.strict = this.inModule || this.strictDirective(this.pos); - var end = exprList.length; - for (var i = 0; i < end; i++) { - var elt = exprList[i]; - if (elt) { this$1.toAssignable(elt, isBinding); } - } - if (end) { - var last = exprList[end - 1]; - if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") - { this.unexpected(last.argument.start); } - } - return exprList -}; + // Used to signify the start of a potential arrow function + this.potentialArrowAt = -1; -// Parses spread element. + // Positions to delayed-check that yield/await does not exist in default parameters. + this.yieldPos = this.awaitPos = this.awaitIdentPos = 0; + // Labels in scope. + this.labels = []; + // Thus-far undefined exports. + this.undefinedExports = {}; -pp$2.parseSpread = function(refDestructuringErrors) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(false, refDestructuringErrors); - return this.finishNode(node, "SpreadElement") -}; + // If enabled, skip leading hashbang line. + if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") + { this.skipLineComment(2); } -pp$2.parseRestBinding = function() { - var node = this.startNode(); - this.next(); + // Scope tracking for duplicate variable names (see scope.js) + this.scopeStack = []; + this.enterScope(SCOPE_TOP); - // RestElement inside of a function parameter must be an identifier - if (this.options.ecmaVersion === 6 && this.type !== types.name) - { this.unexpected(); } + // For RegExp validation + this.regexpState = null; + }; - node.argument = this.parseBindingAtom(); + var prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true } }; - return this.finishNode(node, "RestElement") -}; + Parser.prototype.parse = function parse () { + var node = this.options.program || this.startNode(); + this.nextToken(); + return this.parseTopLevel(node) + }; -// Parses lvalue (assignable) atom. + prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 }; + prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 }; + prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 }; + prototypeAccessors.allowSuper.get = function () { return (this.currentThisScope().flags & SCOPE_SUPER) > 0 }; + prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 }; + prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) }; -pp$2.parseBindingAtom = function() { - if (this.options.ecmaVersion >= 6) { - switch (this.type) { - case types.bracketL: - var node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(types.bracketR, true, true); - return this.finishNode(node, "ArrayPattern") + // Switch to a getter for 7.0.0. + Parser.prototype.inNonArrowFunction = function inNonArrowFunction () { return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0 }; - case types.braceL: - return this.parseObj(true) - } - } - return this.parseIdent() -}; - -pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma) { - var this$1 = this; - - var elts = [], first = true; - while (!this.eat(close)) { - if (first) { first = false; } - else { this$1.expect(types.comma); } - if (allowEmpty && this$1.type === types.comma) { - elts.push(null); - } else if (allowTrailingComma && this$1.afterTrailingComma(close)) { - break - } else if (this$1.type === types.ellipsis) { - var rest = this$1.parseRestBinding(); - this$1.parseBindingListItem(rest); - elts.push(rest); - if (this$1.type === types.comma) { this$1.raise(this$1.start, "Comma is not permitted after the rest element"); } - this$1.expect(close); - break - } else { - var elem = this$1.parseMaybeDefault(this$1.start, this$1.startLoc); - this$1.parseBindingListItem(elem); - elts.push(elem); - } - } - return elts -}; - -pp$2.parseBindingListItem = function(param) { - return param -}; - -// Parses assignment pattern around given atom if possible. - -pp$2.parseMaybeDefault = function(startPos, startLoc, left) { - left = left || this.parseBindingAtom(); - if (this.options.ecmaVersion < 6 || !this.eat(types.eq)) { return left } - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern") -}; - -// Verify that a node is an lval — something that can be assigned -// to. -// bindingType can be either: -// 'var' indicating that the lval creates a 'var' binding -// 'let' indicating that the lval creates a lexical ('let' or 'const') binding -// 'none' indicating that the binding should be checked for illegal identifiers, but not for duplicate references - -pp$2.checkLVal = function(expr, bindingType, checkClashes) { - var this$1 = this; - if ( bindingType === void 0 ) bindingType = BIND_NONE; - - switch (expr.type) { - case "Identifier": - if (this.strict && this.reservedWordsStrictBind.test(expr.name)) - { this.raiseRecoverable(expr.start, (bindingType ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); } - if (checkClashes) { - if (has(checkClashes, expr.name)) - { this.raiseRecoverable(expr.start, "Argument name clash"); } - checkClashes[expr.name] = true; - } - if (bindingType !== BIND_NONE && bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } - break - - case "MemberExpression": - if (bindingType) { this.raiseRecoverable(expr.start, "Binding member expression"); } - break - - case "ObjectPattern": - for (var i = 0, list = expr.properties; i < list.length; i += 1) - { - var prop = list[i]; + Parser.extend = function extend () { + var plugins = [], len = arguments.length; + while ( len-- ) plugins[ len ] = arguments[ len ]; - this$1.checkLVal(prop, bindingType, checkClashes); - } - break + var cls = this; + for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); } + return cls + }; - case "Property": - // AssignmentProperty has type === "Property" - this.checkLVal(expr.value, bindingType, checkClashes); - break + Parser.parse = function parse (input, options) { + return new this(options, input).parse() + }; - case "ArrayPattern": - for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { - var elem = list$1[i$1]; + Parser.parseExpressionAt = function parseExpressionAt (input, pos, options) { + var parser = new this(options, input, pos); + parser.nextToken(); + return parser.parseExpression() + }; - if (elem) { this$1.checkLVal(elem, bindingType, checkClashes); } - } - break + Parser.tokenizer = function tokenizer (input, options) { + return new this(options, input) + }; - case "AssignmentPattern": - this.checkLVal(expr.left, bindingType, checkClashes); - break + Object.defineProperties( Parser.prototype, prototypeAccessors ); - case "RestElement": - this.checkLVal(expr.argument, bindingType, checkClashes); - break + var pp = Parser.prototype; - case "ParenthesizedExpression": - this.checkLVal(expr.expression, bindingType, checkClashes); - break + // ## Parser utilities - default: - this.raise(expr.start, (bindingType ? "Binding" : "Assigning to") + " rvalue"); - } -}; - -// A recursive descent parser operates by defining functions for all -// syntactic elements, and recursively calling those, each function -// advancing the input stream and returning an AST node. Precedence -// of constructs (for example, the fact that `!x[1]` means `!(x[1])` -// instead of `(!x)[1]` is handled by the fact that the parser -// function that parses unary prefix operators is called first, and -// in turn calls the function that parses `[]` subscripts — that -// way, it'll receive the node for `x[1]` already parsed, and wraps -// *that* in the unary operator node. -// -// Acorn uses an [operator precedence parser][opp] to handle binary -// operator precedence, because it is much more compact than using -// the technique outlined above, which uses different, nesting -// functions to specify precedence, for all of the ten binary -// precedence levels that JavaScript defines. -// -// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser - -var pp$3 = Parser.prototype; - -// Check if property name clashes with already added. -// Object/class getters and setters are not allowed to clash — -// either with each other or with an init property — and in -// strict mode, init properties are also not allowed to be repeated. - -pp$3.checkPropClash = function(prop, propHash, refDestructuringErrors) { - if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") - { return } - if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) - { return } - var key = prop.key; - var name; - switch (key.type) { - case "Identifier": name = key.name; break - case "Literal": name = String(key.value); break - default: return - } - var kind = prop.kind; - if (this.options.ecmaVersion >= 6) { - if (name === "__proto__" && kind === "init") { - if (propHash.proto) { - if (refDestructuringErrors && refDestructuringErrors.doubleProto < 0) { refDestructuringErrors.doubleProto = key.start; } - // Backwards-compat kludge. Can be removed in version 6.0 - else { this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); } - } - propHash.proto = true; + var literal = /^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)")/; + pp.strictDirective = function(start) { + for (;;) { + // Try to find string literal. + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + var match = literal.exec(this.input.slice(start)); + if (!match) { return false } + if ((match[1] || match[2]) === "use strict") { return true } + start += match[0].length; + + // Skip semicolon, if any. + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + if (this.input[start] === ";") + { start++; } } - return - } - name = "$" + name; - var other = propHash[name]; - if (other) { - var redefinition; - if (kind === "init") { - redefinition = this.strict && other.init || other.get || other.set; - } else { - redefinition = other.init || other[kind]; - } - if (redefinition) - { this.raiseRecoverable(key.start, "Redefinition of property"); } - } else { - other = propHash[name] = { - init: false, - get: false, - set: false - }; - } - other[kind] = true; -}; - -// ### Expression parsing - -// These nest, from the most general expression type at the top to -// 'atomic', nondivisible expression types at the bottom. Most of -// the functions will simply let the function(s) below them parse, -// and, *if* the syntactic construct they handle is present, wrap -// the AST node that the inner parser gave them in another node. - -// Parse a full expression. The optional arguments are used to -// forbid the `in` operator (in for loops initalization expressions) -// and provide reference for storing '=' operator inside shorthand -// property assignment in contexts where both object expression -// and object pattern might appear (so it's possible to raise -// delayed syntax error at correct position). - -pp$3.parseExpression = function(noIn, refDestructuringErrors) { - var this$1 = this; - - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseMaybeAssign(noIn, refDestructuringErrors); - if (this.type === types.comma) { - var node = this.startNodeAt(startPos, startLoc); - node.expressions = [expr]; - while (this.eat(types.comma)) { node.expressions.push(this$1.parseMaybeAssign(noIn, refDestructuringErrors)); } - return this.finishNode(node, "SequenceExpression") - } - return expr -}; - -// Parse an assignment expression. This includes applications of -// operators like `+=`. - -pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) { - if (this.isContextual("yield")) { - if (this.inGenerator) { return this.parseYield(noIn) } - // The tokenizer will assume an expression is allowed after - // `yield`, but this isn't that kind of yield - else { this.exprAllowed = false; } - } + }; - var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldShorthandAssign = -1; - if (refDestructuringErrors) { - oldParenAssign = refDestructuringErrors.parenthesizedAssign; - oldTrailingComma = refDestructuringErrors.trailingComma; - oldShorthandAssign = refDestructuringErrors.shorthandAssign; - refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.shorthandAssign = -1; - } else { - refDestructuringErrors = new DestructuringErrors; - ownDestructuringErrors = true; - } + // Predicate that tests whether the next token is of the given + // type, and if yes, consumes it as a side effect. - var startPos = this.start, startLoc = this.startLoc; - if (this.type === types.parenL || this.type === types.name) - { this.potentialArrowAt = this.start; } - var left = this.parseMaybeConditional(noIn, refDestructuringErrors); - if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); } - if (this.type.isAssign) { - var node = this.startNodeAt(startPos, startLoc); - node.operator = this.value; - node.left = this.type === types.eq ? this.toAssignable(left, false, refDestructuringErrors) : left; - if (!ownDestructuringErrors) { DestructuringErrors.call(refDestructuringErrors); } - refDestructuringErrors.shorthandAssign = -1; // reset because shorthand default was used correctly - this.checkLVal(left); - this.next(); - node.right = this.parseMaybeAssign(noIn); - return this.finishNode(node, "AssignmentExpression") - } else { - if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); } - } - if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; } - if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; } - if (oldShorthandAssign > -1) { refDestructuringErrors.shorthandAssign = oldShorthandAssign; } - return left -}; - -// Parse a ternary conditional (`?:`) operator. - -pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseExprOps(noIn, refDestructuringErrors); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - if (this.eat(types.question)) { - var node = this.startNodeAt(startPos, startLoc); - node.test = expr; - node.consequent = this.parseMaybeAssign(); - this.expect(types.colon); - node.alternate = this.parseMaybeAssign(noIn); - return this.finishNode(node, "ConditionalExpression") - } - return expr -}; - -// Start the precedence parser. - -pp$3.parseExprOps = function(noIn, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseMaybeUnary(refDestructuringErrors, false); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, noIn) -}; - -// Parse binary operators with the operator precedence parsing -// algorithm. `left` is the left-hand side of the operator. -// `minPrec` provides context that allows the function to stop and -// defer further parser to one of its callers when it encounters an -// operator that has a lower precedence than the set it is parsing. - -pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) { - var prec = this.type.binop; - if (prec != null && (!noIn || this.type !== types._in)) { - if (prec > minPrec) { - var logical = this.type === types.logicalOR || this.type === types.logicalAND; - var op = this.value; + pp.eat = function(type) { + if (this.type === type) { this.next(); - var startPos = this.start, startLoc = this.startLoc; - var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn); - var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical); - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn) - } - } - return left -}; - -pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) { - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.operator = op; - node.right = right; - return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") -}; - -// Parse unary operators, both prefix and postfix. - -pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) { - var this$1 = this; - - var startPos = this.start, startLoc = this.startLoc, expr; - if (this.isContextual("await") && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction))) { - expr = this.parseAwait(); - sawUnary = true; - } else if (this.type.prefix) { - var node = this.startNode(), update = this.type === types.incDec; - node.operator = this.value; - node.prefix = true; - this.next(); - node.argument = this.parseMaybeUnary(null, true); - this.checkExpressionErrors(refDestructuringErrors, true); - if (update) { this.checkLVal(node.argument); } - else if (this.strict && node.operator === "delete" && - node.argument.type === "Identifier") - { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); } - else { sawUnary = true; } - expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } else { - expr = this.parseExprSubscripts(refDestructuringErrors); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - while (this.type.postfix && !this.canInsertSemicolon()) { - var node$1 = this$1.startNodeAt(startPos, startLoc); - node$1.operator = this$1.value; - node$1.prefix = false; - node$1.argument = expr; - this$1.checkLVal(expr); - this$1.next(); - expr = this$1.finishNode(node$1, "UpdateExpression"); + return true + } else { + return false } - } + }; - if (!sawUnary && this.eat(types.starstar)) - { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false) } - else - { return expr } -}; - -// Parse call, dot, and `[]`-subscript expressions. - -pp$3.parseExprSubscripts = function(refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseExprAtom(refDestructuringErrors); - var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")"; - if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) { return expr } - var result = this.parseSubscripts(expr, startPos, startLoc); - if (refDestructuringErrors && result.type === "MemberExpression") { - if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; } - if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; } - } - return result -}; - -pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) { - var this$1 = this; - - var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && - this.lastTokEnd === base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === "async"; - while (true) { - var element = this$1.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow); - if (element === base || element.type === "ArrowFunctionExpression") { return element } - base = element; - } -}; + // Tests whether parsed token is a contextual keyword. -pp$3.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow) { - var computed = this.eat(types.bracketL); - if (computed || this.eat(types.dot)) { - var node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = computed ? this.parseExpression() : this.parseIdent(true); - node.computed = !!computed; - if (computed) { this.expect(types.bracketR); } - base = this.finishNode(node, "MemberExpression"); - } else if (!noCalls && this.eat(types.parenL)) { - var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - var exprList = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors); - if (maybeAsyncArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { - this.checkPatternErrors(refDestructuringErrors, false); - this.checkYieldAwaitInDefaultParams(); - if (this.awaitIdentPos > 0) - { this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); } - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true) - } - this.checkExpressionErrors(refDestructuringErrors, true); - this.yieldPos = oldYieldPos || this.yieldPos; - this.awaitPos = oldAwaitPos || this.awaitPos; - this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; - var node$1 = this.startNodeAt(startPos, startLoc); - node$1.callee = base; - node$1.arguments = exprList; - base = this.finishNode(node$1, "CallExpression"); - } else if (this.type === types.backQuote) { - var node$2 = this.startNodeAt(startPos, startLoc); - node$2.tag = base; - node$2.quasi = this.parseTemplate({isTagged: true}); - base = this.finishNode(node$2, "TaggedTemplateExpression"); - } - return base -}; - -// Parse an atomic expression — either a single token that is an -// expression, an expression started by a keyword like `function` or -// `new`, or an expression wrapped in punctuation like `()`, `[]`, -// or `{}`. - -pp$3.parseExprAtom = function(refDestructuringErrors) { - // If a division operator appears in an expression position, the - // tokenizer got confused, and we force it to read a regexp instead. - if (this.type === types.slash) { this.readRegexp(); } - - var node, canBeArrow = this.potentialArrowAt === this.start; - switch (this.type) { - case types._super: - if (!this.allowSuper) - { this.raise(this.start, "'super' keyword outside a method"); } - node = this.startNode(); - this.next(); - if (this.type === types.parenL && !this.allowDirectSuper) - { this.raise(node.start, "super() call outside constructor of a subclass"); } - // The `super` keyword can appear at below: - // SuperProperty: - // super [ Expression ] - // super . IdentifierName - // SuperCall: - // super Arguments - if (this.type !== types.dot && this.type !== types.bracketL && this.type !== types.parenL) - { this.unexpected(); } - return this.finishNode(node, "Super") + pp.isContextual = function(name) { + return this.type === types.name && this.value === name && !this.containsEsc + }; + + // Consumes contextual keyword if possible. - case types._this: - node = this.startNode(); + pp.eatContextual = function(name) { + if (!this.isContextual(name)) { return false } this.next(); - return this.finishNode(node, "ThisExpression") - - case types.name: - var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; - var id = this.parseIdent(false); - if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types._function)) - { return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true) } - if (canBeArrow && !this.canInsertSemicolon()) { - if (this.eat(types.arrow)) - { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false) } - if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types.name && !containsEsc) { - id = this.parseIdent(false); - if (this.canInsertSemicolon() || !this.eat(types.arrow)) - { this.unexpected(); } - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true) - } - } - return id + return true + }; - case types.regexp: - var value = this.value; - node = this.parseLiteral(value.value); - node.regex = {pattern: value.pattern, flags: value.flags}; - return node + // Asserts that following token is given contextual keyword. - case types.num: case types.string: - return this.parseLiteral(this.value) + pp.expectContextual = function(name) { + if (!this.eatContextual(name)) { this.unexpected(); } + }; - case types._null: case types._true: case types._false: - node = this.startNode(); - node.value = this.type === types._null ? null : this.type === types._true; - node.raw = this.type.keyword; - this.next(); - return this.finishNode(node, "Literal") + // Test whether a semicolon can be inserted at the current position. - case types.parenL: - var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow); - if (refDestructuringErrors) { - if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) - { refDestructuringErrors.parenthesizedAssign = start; } - if (refDestructuringErrors.parenthesizedBind < 0) - { refDestructuringErrors.parenthesizedBind = start; } + pp.canInsertSemicolon = function() { + return this.type === types.eof || + this.type === types.braceR || + lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + }; + + pp.insertSemicolon = function() { + if (this.canInsertSemicolon()) { + if (this.options.onInsertedSemicolon) + { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); } + return true } - return expr + }; - case types.bracketL: - node = this.startNode(); - this.next(); - node.elements = this.parseExprList(types.bracketR, true, true, refDestructuringErrors); - return this.finishNode(node, "ArrayExpression") + // Consume a semicolon, or, failing that, see if we are allowed to + // pretend that there is a semicolon at this position. - case types.braceL: - return this.parseObj(false, refDestructuringErrors) + pp.semicolon = function() { + if (!this.eat(types.semi) && !this.insertSemicolon()) { this.unexpected(); } + }; - case types._function: - node = this.startNode(); - this.next(); - return this.parseFunction(node, 0) + pp.afterTrailingComma = function(tokType, notNext) { + if (this.type === tokType) { + if (this.options.onTrailingComma) + { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); } + if (!notNext) + { this.next(); } + return true + } + }; - case types._class: - return this.parseClass(this.startNode(), false) + // Expect a token of a given type. If found, consume it, otherwise, + // raise an unexpected token error. - case types._new: - return this.parseNew() + pp.expect = function(type) { + this.eat(type) || this.unexpected(); + }; - case types.backQuote: - return this.parseTemplate() + // Raise an unexpected token error. - default: - this.unexpected(); - } -}; - -pp$3.parseLiteral = function(value) { - var node = this.startNode(); - node.value = value; - node.raw = this.input.slice(this.start, this.end); - this.next(); - return this.finishNode(node, "Literal") -}; - -pp$3.parseParenExpression = function() { - this.expect(types.parenL); - var val = this.parseExpression(); - this.expect(types.parenR); - return val -}; - -pp$3.parseParenAndDistinguishExpression = function(canBeArrow) { - var this$1 = this; - - var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8; - if (this.options.ecmaVersion >= 6) { - this.next(); + pp.unexpected = function(pos) { + this.raise(pos != null ? pos : this.start, "Unexpected token"); + }; - var innerStartPos = this.start, innerStartLoc = this.startLoc; - var exprList = [], first = true, lastIsComma = false; - var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; - this.yieldPos = 0; - this.awaitPos = 0; - // Do not save awaitIdentPos to allow checking awaits nested in parameters - while (this.type !== types.parenR) { - first ? first = false : this$1.expect(types.comma); - if (allowTrailingComma && this$1.afterTrailingComma(types.parenR, true)) { - lastIsComma = true; - break - } else if (this$1.type === types.ellipsis) { - spreadStart = this$1.start; - exprList.push(this$1.parseParenItem(this$1.parseRestBinding())); - if (this$1.type === types.comma) { this$1.raise(this$1.start, "Comma is not permitted after the rest element"); } - break - } else { - exprList.push(this$1.parseMaybeAssign(false, refDestructuringErrors, this$1.parseParenItem)); - } - } - var innerEndPos = this.start, innerEndLoc = this.startLoc; - this.expect(types.parenR); + function DestructuringErrors() { + this.shorthandAssign = + this.trailingComma = + this.parenthesizedAssign = + this.parenthesizedBind = + this.doubleProto = + -1; + } + + pp.checkPatternErrors = function(refDestructuringErrors, isAssign) { + if (!refDestructuringErrors) { return } + if (refDestructuringErrors.trailingComma > -1) + { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); } + var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind; + if (parens > -1) { this.raiseRecoverable(parens, "Parenthesized pattern"); } + }; - if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { - this.checkPatternErrors(refDestructuringErrors, false); - this.checkYieldAwaitInDefaultParams(); - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - return this.parseParenArrowList(startPos, startLoc, exprList) - } + pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) { + if (!refDestructuringErrors) { return false } + var shorthandAssign = refDestructuringErrors.shorthandAssign; + var doubleProto = refDestructuringErrors.doubleProto; + if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0 } + if (shorthandAssign >= 0) + { this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); } + if (doubleProto >= 0) + { this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); } + }; - if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); } - if (spreadStart) { this.unexpected(spreadStart); } - this.checkExpressionErrors(refDestructuringErrors, true); - this.yieldPos = oldYieldPos || this.yieldPos; - this.awaitPos = oldAwaitPos || this.awaitPos; + pp.checkYieldAwaitInDefaultParams = function() { + if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) + { this.raise(this.yieldPos, "Yield expression cannot be a default value"); } + if (this.awaitPos) + { this.raise(this.awaitPos, "Await expression cannot be a default value"); } + }; - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc); - val.expressions = exprList; - this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); - } else { - val = exprList[0]; - } - } else { - val = this.parseParenExpression(); - } + pp.isSimpleAssignTarget = function(expr) { + if (expr.type === "ParenthesizedExpression") + { return this.isSimpleAssignTarget(expr.expression) } + return expr.type === "Identifier" || expr.type === "MemberExpression" + }; - if (this.options.preserveParens) { - var par = this.startNodeAt(startPos, startLoc); - par.expression = val; - return this.finishNode(par, "ParenthesizedExpression") - } else { - return val - } -}; + var pp$1 = Parser.prototype; -pp$3.parseParenItem = function(item) { - return item -}; + // ### Statement parsing -pp$3.parseParenArrowList = function(startPos, startLoc, exprList) { - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList) -}; + // Parse a program. Initializes the parser, reads any number of + // statements, and wraps them in a Program node. Optionally takes a + // `program` argument. If present, the statements will be appended + // to its body instead of creating a new node. -// New's precedence is slightly tricky. It must allow its argument to -// be a `[]` or dot subscript expression, but not a call — at least, -// not without wrapping it in parentheses. Thus, it uses the noCalls -// argument to parseSubscripts to prevent it from consuming the -// argument list. + pp$1.parseTopLevel = function(node) { + var exports = {}; + if (!node.body) { node.body = []; } + while (this.type !== types.eof) { + var stmt = this.parseStatement(null, true, exports); + node.body.push(stmt); + } + if (this.inModule) + { for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1) + { + var name = list[i]; + + this.raiseRecoverable(this.undefinedExports[name].start, ("Export '" + name + "' is not defined")); + } } + this.adaptDirectivePrologue(node.body); + this.next(); + if (this.options.ecmaVersion >= 6) { + node.sourceType = this.options.sourceType; + } + return this.finishNode(node, "Program") + }; + + var loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"}; + + pp$1.isLet = function(context) { + if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { return false } + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); + // For ambiguous cases, determine if a LexicalDeclaration (or only a + // Statement) is allowed here. If context is not empty then only a Statement + // is allowed. However, `let [` is an explicit negative lookahead for + // ExpressionStatement, so special-case it first. + if (nextCh === 91) { return true } // '[' + if (context) { return false } + + if (nextCh === 123) { return true } // '{' + if (isIdentifierStart(nextCh, true)) { + var pos = next + 1; + while (isIdentifierChar(this.input.charCodeAt(pos), true)) { ++pos; } + var ident = this.input.slice(next, pos); + if (!keywordRelationalOperator.test(ident)) { return true } + } + return false + }; + + // check 'async [no LineTerminator here] function' + // - 'async /*foo*/ function' is OK. + // - 'async /*\n*/ function' is invalid. + pp$1.isAsyncFunction = function() { + if (this.options.ecmaVersion < 8 || !this.isContextual("async")) + { return false } + + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length; + return !lineBreak.test(this.input.slice(this.pos, next)) && + this.input.slice(next, next + 8) === "function" && + (next + 8 === this.input.length || !isIdentifierChar(this.input.charAt(next + 8))) + }; + + // Parse a single statement. + // + // If expecting a statement and finding a slash operator, parse a + // regular expression literal. This is to handle cases like + // `if (foo) /blah/.exec(foo)`, where looking at the previous token + // does not help. + + pp$1.parseStatement = function(context, topLevel, exports) { + var starttype = this.type, node = this.startNode(), kind; + + if (this.isLet(context)) { + starttype = types._var; + kind = "let"; + } + + // Most types of statements are recognized by the keyword they + // start with. Many are trivial to parse, some require a bit of + // complexity. + + switch (starttype) { + case types._break: case types._continue: return this.parseBreakContinueStatement(node, starttype.keyword) + case types._debugger: return this.parseDebuggerStatement(node) + case types._do: return this.parseDoStatement(node) + case types._for: return this.parseForStatement(node) + case types._function: + // Function as sole body of either an if statement or a labeled statement + // works, but not when it is part of a labeled statement that is the sole + // body of an if statement. + if ((context && (this.strict || context !== "if" && context !== "label")) && this.options.ecmaVersion >= 6) { this.unexpected(); } + return this.parseFunctionStatement(node, false, !context) + case types._class: + if (context) { this.unexpected(); } + return this.parseClass(node, true) + case types._if: return this.parseIfStatement(node) + case types._return: return this.parseReturnStatement(node) + case types._switch: return this.parseSwitchStatement(node) + case types._throw: return this.parseThrowStatement(node) + case types._try: return this.parseTryStatement(node) + case types._const: case types._var: + kind = kind || this.value; + if (context && kind !== "var") { this.unexpected(); } + return this.parseVarStatement(node, kind) + case types._while: return this.parseWhileStatement(node) + case types._with: return this.parseWithStatement(node) + case types.braceL: return this.parseBlock(true, node) + case types.semi: return this.parseEmptyStatement(node) + case types._export: + case types._import: + if (this.options.ecmaVersion > 10 && starttype === types._import) { + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); + if (nextCh === 40) // '(' + { return this.parseExpressionStatement(node, this.parseExpression()) } + } + + if (!this.options.allowImportExportEverywhere) { + if (!topLevel) + { this.raise(this.start, "'import' and 'export' may only appear at the top level"); } + if (!this.inModule) + { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); } + } + return starttype === types._import ? this.parseImport(node) : this.parseExport(node, exports) + + // If the statement does not start with a statement keyword or a + // brace, it's an ExpressionStatement or LabeledStatement. We + // simply start parsing an expression, and afterwards, if the + // next token is a colon and the expression was a simple + // Identifier node, we switch to interpreting it as a label. + default: + if (this.isAsyncFunction()) { + if (context) { this.unexpected(); } + this.next(); + return this.parseFunctionStatement(node, true, !context) + } + + var maybeName = this.value, expr = this.parseExpression(); + if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) + { return this.parseLabeledStatement(node, maybeName, expr, context) } + else { return this.parseExpressionStatement(node, expr) } + } + }; + + pp$1.parseBreakContinueStatement = function(node, keyword) { + var isBreak = keyword === "break"; + this.next(); + if (this.eat(types.semi) || this.insertSemicolon()) { node.label = null; } + else if (this.type !== types.name) { this.unexpected(); } + else { + node.label = this.parseIdent(); + this.semicolon(); + } + + // Verify that there is an actual destination to break or + // continue to. + var i = 0; + for (; i < this.labels.length; ++i) { + var lab = this.labels[i]; + if (node.label == null || lab.name === node.label.name) { + if (lab.kind != null && (isBreak || lab.kind === "loop")) { break } + if (node.label && isBreak) { break } + } + } + if (i === this.labels.length) { this.raise(node.start, "Unsyntactic " + keyword); } + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") + }; + + pp$1.parseDebuggerStatement = function(node) { + this.next(); + this.semicolon(); + return this.finishNode(node, "DebuggerStatement") + }; + + pp$1.parseDoStatement = function(node) { + this.next(); + this.labels.push(loopLabel); + node.body = this.parseStatement("do"); + this.labels.pop(); + this.expect(types._while); + node.test = this.parseParenExpression(); + if (this.options.ecmaVersion >= 6) + { this.eat(types.semi); } + else + { this.semicolon(); } + return this.finishNode(node, "DoWhileStatement") + }; + + // Disambiguating between a `for` and a `for`/`in` or `for`/`of` + // loop is non-trivial. Basically, we have to parse the init `var` + // statement or expression, disallowing the `in` operator (see + // the second parameter to `parseExpression`), and then check + // whether the next token is `in` or `of`. When there is no init + // part (semicolon immediately after the opening parenthesis), it + // is a regular `for` loop. + + pp$1.parseForStatement = function(node) { + this.next(); + var awaitAt = (this.options.ecmaVersion >= 9 && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction)) && this.eatContextual("await")) ? this.lastTokStart : -1; + this.labels.push(loopLabel); + this.enterScope(0); + this.expect(types.parenL); + if (this.type === types.semi) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, null) + } + var isLet = this.isLet(); + if (this.type === types._var || this.type === types._const || isLet) { + var init$1 = this.startNode(), kind = isLet ? "let" : this.value; + this.next(); + this.parseVar(init$1, true, kind); + this.finishNode(init$1, "VariableDeclaration"); + if ((this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1) { + if (this.options.ecmaVersion >= 9) { + if (this.type === types._in) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + } else { node.await = awaitAt > -1; } + } + return this.parseForIn(node, init$1) + } + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, init$1) + } + var refDestructuringErrors = new DestructuringErrors; + var init = this.parseExpression(true, refDestructuringErrors); + if (this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) { + if (this.options.ecmaVersion >= 9) { + if (this.type === types._in) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + } else { node.await = awaitAt > -1; } + } + this.toAssignable(init, false, refDestructuringErrors); + this.checkLVal(init); + return this.parseForIn(node, init) + } else { + this.checkExpressionErrors(refDestructuringErrors, true); + } + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, init) + }; + + pp$1.parseFunctionStatement = function(node, isAsync, declarationPosition) { + this.next(); + return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync) + }; + + pp$1.parseIfStatement = function(node) { + this.next(); + node.test = this.parseParenExpression(); + // allow function declarations in branches, but only in non-strict mode + node.consequent = this.parseStatement("if"); + node.alternate = this.eat(types._else) ? this.parseStatement("if") : null; + return this.finishNode(node, "IfStatement") + }; + + pp$1.parseReturnStatement = function(node) { + if (!this.inFunction && !this.options.allowReturnOutsideFunction) + { this.raise(this.start, "'return' outside of function"); } + this.next(); + + // In `return` (and `break`/`continue`), the keywords with + // optional arguments, we eagerly look for a semicolon or the + // possibility to insert one. + + if (this.eat(types.semi) || this.insertSemicolon()) { node.argument = null; } + else { node.argument = this.parseExpression(); this.semicolon(); } + return this.finishNode(node, "ReturnStatement") + }; + + pp$1.parseSwitchStatement = function(node) { + this.next(); + node.discriminant = this.parseParenExpression(); + node.cases = []; + this.expect(types.braceL); + this.labels.push(switchLabel); + this.enterScope(0); + + // Statements under must be grouped (by label) in SwitchCase + // nodes. `cur` is used to keep the node that we are currently + // adding statements to. + + var cur; + for (var sawDefault = false; this.type !== types.braceR;) { + if (this.type === types._case || this.type === types._default) { + var isCase = this.type === types._case; + if (cur) { this.finishNode(cur, "SwitchCase"); } + node.cases.push(cur = this.startNode()); + cur.consequent = []; + this.next(); + if (isCase) { + cur.test = this.parseExpression(); + } else { + if (sawDefault) { this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"); } + sawDefault = true; + cur.test = null; + } + this.expect(types.colon); + } else { + if (!cur) { this.unexpected(); } + cur.consequent.push(this.parseStatement(null)); + } + } + this.exitScope(); + if (cur) { this.finishNode(cur, "SwitchCase"); } + this.next(); // Closing brace + this.labels.pop(); + return this.finishNode(node, "SwitchStatement") + }; + + pp$1.parseThrowStatement = function(node) { + this.next(); + if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) + { this.raise(this.lastTokEnd, "Illegal newline after throw"); } + node.argument = this.parseExpression(); + this.semicolon(); + return this.finishNode(node, "ThrowStatement") + }; + + // Reused empty array added for node fields that are always empty. + + var empty = []; + + pp$1.parseTryStatement = function(node) { + this.next(); + node.block = this.parseBlock(); + node.handler = null; + if (this.type === types._catch) { + var clause = this.startNode(); + this.next(); + if (this.eat(types.parenL)) { + clause.param = this.parseBindingAtom(); + var simple = clause.param.type === "Identifier"; + this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0); + this.checkLVal(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL); + this.expect(types.parenR); + } else { + if (this.options.ecmaVersion < 10) { this.unexpected(); } + clause.param = null; + this.enterScope(0); + } + clause.body = this.parseBlock(false); + this.exitScope(); + node.handler = this.finishNode(clause, "CatchClause"); + } + node.finalizer = this.eat(types._finally) ? this.parseBlock() : null; + if (!node.handler && !node.finalizer) + { this.raise(node.start, "Missing catch or finally clause"); } + return this.finishNode(node, "TryStatement") + }; + + pp$1.parseVarStatement = function(node, kind) { + this.next(); + this.parseVar(node, false, kind); + this.semicolon(); + return this.finishNode(node, "VariableDeclaration") + }; + + pp$1.parseWhileStatement = function(node) { + this.next(); + node.test = this.parseParenExpression(); + this.labels.push(loopLabel); + node.body = this.parseStatement("while"); + this.labels.pop(); + return this.finishNode(node, "WhileStatement") + }; + + pp$1.parseWithStatement = function(node) { + if (this.strict) { this.raise(this.start, "'with' in strict mode"); } + this.next(); + node.object = this.parseParenExpression(); + node.body = this.parseStatement("with"); + return this.finishNode(node, "WithStatement") + }; + + pp$1.parseEmptyStatement = function(node) { + this.next(); + return this.finishNode(node, "EmptyStatement") + }; + + pp$1.parseLabeledStatement = function(node, maybeName, expr, context) { + for (var i$1 = 0, list = this.labels; i$1 < list.length; i$1 += 1) + { + var label = list[i$1]; + + if (label.name === maybeName) + { this.raise(expr.start, "Label '" + maybeName + "' is already declared"); + } } + var kind = this.type.isLoop ? "loop" : this.type === types._switch ? "switch" : null; + for (var i = this.labels.length - 1; i >= 0; i--) { + var label$1 = this.labels[i]; + if (label$1.statementStart === node.start) { + // Update information about previous labels on this node + label$1.statementStart = this.start; + label$1.kind = kind; + } else { break } + } + this.labels.push({name: maybeName, kind: kind, statementStart: this.start}); + node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); + this.labels.pop(); + node.label = expr; + return this.finishNode(node, "LabeledStatement") + }; + + pp$1.parseExpressionStatement = function(node, expr) { + node.expression = expr; + this.semicolon(); + return this.finishNode(node, "ExpressionStatement") + }; + + // Parse a semicolon-enclosed block of statements, handling `"use + // strict"` declarations when `allowStrict` is true (used for + // function bodies). + + pp$1.parseBlock = function(createNewLexicalScope, node) { + if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true; + if ( node === void 0 ) node = this.startNode(); + + node.body = []; + this.expect(types.braceL); + if (createNewLexicalScope) { this.enterScope(0); } + while (!this.eat(types.braceR)) { + var stmt = this.parseStatement(null); + node.body.push(stmt); + } + if (createNewLexicalScope) { this.exitScope(); } + return this.finishNode(node, "BlockStatement") + }; + + // Parse a regular `for` loop. The disambiguation code in + // `parseStatement` will already have parsed the init statement or + // expression. + + pp$1.parseFor = function(node, init) { + node.init = init; + this.expect(types.semi); + node.test = this.type === types.semi ? null : this.parseExpression(); + this.expect(types.semi); + node.update = this.type === types.parenR ? null : this.parseExpression(); + this.expect(types.parenR); + node.body = this.parseStatement("for"); + this.exitScope(); + this.labels.pop(); + return this.finishNode(node, "ForStatement") + }; + + // Parse a `for`/`in` and `for`/`of` loop, which are almost + // same from parser's perspective. + + pp$1.parseForIn = function(node, init) { + var isForIn = this.type === types._in; + this.next(); + + if ( + init.type === "VariableDeclaration" && + init.declarations[0].init != null && + ( + !isForIn || + this.options.ecmaVersion < 8 || + this.strict || + init.kind !== "var" || + init.declarations[0].id.type !== "Identifier" + ) + ) { + this.raise( + init.start, + ((isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer") + ); + } else if (init.type === "AssignmentPattern") { + this.raise(init.start, "Invalid left-hand side in for-loop"); + } + node.left = init; + node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(); + this.expect(types.parenR); + node.body = this.parseStatement("for"); + this.exitScope(); + this.labels.pop(); + return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement") + }; + + // Parse a list of variable declarations. + + pp$1.parseVar = function(node, isFor, kind) { + node.declarations = []; + node.kind = kind; + for (;;) { + var decl = this.startNode(); + this.parseVarId(decl, kind); + if (this.eat(types.eq)) { + decl.init = this.parseMaybeAssign(isFor); + } else if (kind === "const" && !(this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of")))) { + this.unexpected(); + } else if (decl.id.type !== "Identifier" && !(isFor && (this.type === types._in || this.isContextual("of")))) { + this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); + } else { + decl.init = null; + } + node.declarations.push(this.finishNode(decl, "VariableDeclarator")); + if (!this.eat(types.comma)) { break } + } + return node + }; + + pp$1.parseVarId = function(decl, kind) { + decl.id = this.parseBindingAtom(); + this.checkLVal(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false); + }; + + var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4; + + // Parse a function declaration or literal (depending on the + // `statement & FUNC_STATEMENT`). + + // Remove `allowExpressionBody` for 7.0.0, as it is only called with false + pp$1.parseFunction = function(node, statement, allowExpressionBody, isAsync) { + this.initFunction(node); + if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) { + if (this.type === types.star && (statement & FUNC_HANGING_STATEMENT)) + { this.unexpected(); } + node.generator = this.eat(types.star); + } + if (this.options.ecmaVersion >= 8) + { node.async = !!isAsync; } + + if (statement & FUNC_STATEMENT) { + node.id = (statement & FUNC_NULLABLE_ID) && this.type !== types.name ? null : this.parseIdent(); + if (node.id && !(statement & FUNC_HANGING_STATEMENT)) + // If it is a regular function declaration in sloppy mode, then it is + // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding + // mode depends on properties of the current scope (see + // treatFunctionsAsVar). + { this.checkLVal(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); } + } + + var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags(node.async, node.generator)); + + if (!(statement & FUNC_STATEMENT)) + { node.id = this.type === types.name ? this.parseIdent() : null; } + + this.parseFunctionParams(node); + this.parseFunctionBody(node, allowExpressionBody, false); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, (statement & FUNC_STATEMENT) ? "FunctionDeclaration" : "FunctionExpression") + }; + + pp$1.parseFunctionParams = function(node) { + this.expect(types.parenL); + node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); + this.checkYieldAwaitInDefaultParams(); + }; + + // Parse a class declaration or literal (depending on the + // `isStatement` parameter). + + pp$1.parseClass = function(node, isStatement) { + this.next(); + + // ecma-262 14.6 Class Definitions + // A class definition is always strict mode code. + var oldStrict = this.strict; + this.strict = true; + + this.parseClassId(node, isStatement); + this.parseClassSuper(node); + var classBody = this.startNode(); + var hadConstructor = false; + classBody.body = []; + this.expect(types.braceL); + while (!this.eat(types.braceR)) { + var element = this.parseClassElement(node.superClass !== null); + if (element) { + classBody.body.push(element); + if (element.type === "MethodDefinition" && element.kind === "constructor") { + if (hadConstructor) { this.raise(element.start, "Duplicate constructor in the same class"); } + hadConstructor = true; + } + } + } + node.body = this.finishNode(classBody, "ClassBody"); + this.strict = oldStrict; + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") + }; + + pp$1.parseClassElement = function(constructorAllowsSuper) { + var this$1 = this; + + if (this.eat(types.semi)) { return null } + + var method = this.startNode(); + var tryContextual = function (k, noLineBreak) { + if ( noLineBreak === void 0 ) noLineBreak = false; + + var start = this$1.start, startLoc = this$1.startLoc; + if (!this$1.eatContextual(k)) { return false } + if (this$1.type !== types.parenL && (!noLineBreak || !this$1.canInsertSemicolon())) { return true } + if (method.key) { this$1.unexpected(); } + method.computed = false; + method.key = this$1.startNodeAt(start, startLoc); + method.key.name = k; + this$1.finishNode(method.key, "Identifier"); + return false + }; + + method.kind = "method"; + method.static = tryContextual("static"); + var isGenerator = this.eat(types.star); + var isAsync = false; + if (!isGenerator) { + if (this.options.ecmaVersion >= 8 && tryContextual("async", true)) { + isAsync = true; + isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); + } else if (tryContextual("get")) { + method.kind = "get"; + } else if (tryContextual("set")) { + method.kind = "set"; + } + } + if (!method.key) { this.parsePropertyName(method); } + var key = method.key; + var allowsDirectSuper = false; + if (!method.computed && !method.static && (key.type === "Identifier" && key.name === "constructor" || + key.type === "Literal" && key.value === "constructor")) { + if (method.kind !== "method") { this.raise(key.start, "Constructor can't have get/set modifier"); } + if (isGenerator) { this.raise(key.start, "Constructor can't be a generator"); } + if (isAsync) { this.raise(key.start, "Constructor can't be an async method"); } + method.kind = "constructor"; + allowsDirectSuper = constructorAllowsSuper; + } else if (method.static && key.type === "Identifier" && key.name === "prototype") { + this.raise(key.start, "Classes may not have a static property named prototype"); + } + this.parseClassMethod(method, isGenerator, isAsync, allowsDirectSuper); + if (method.kind === "get" && method.value.params.length !== 0) + { this.raiseRecoverable(method.value.start, "getter should have no params"); } + if (method.kind === "set" && method.value.params.length !== 1) + { this.raiseRecoverable(method.value.start, "setter should have exactly one param"); } + if (method.kind === "set" && method.value.params[0].type === "RestElement") + { this.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params"); } + return method + }; + + pp$1.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) { + method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper); + return this.finishNode(method, "MethodDefinition") + }; + + pp$1.parseClassId = function(node, isStatement) { + if (this.type === types.name) { + node.id = this.parseIdent(); + if (isStatement) + { this.checkLVal(node.id, BIND_LEXICAL, false); } + } else { + if (isStatement === true) + { this.unexpected(); } + node.id = null; + } + }; + + pp$1.parseClassSuper = function(node) { + node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null; + }; + + // Parses module export declaration. + + pp$1.parseExport = function(node, exports) { + this.next(); + // export * from '...' + if (this.eat(types.star)) { + this.expectContextual("from"); + if (this.type !== types.string) { this.unexpected(); } + node.source = this.parseExprAtom(); + this.semicolon(); + return this.finishNode(node, "ExportAllDeclaration") + } + if (this.eat(types._default)) { // export default ... + this.checkExport(exports, "default", this.lastTokStart); + var isAsync; + if (this.type === types._function || (isAsync = this.isAsyncFunction())) { + var fNode = this.startNode(); + this.next(); + if (isAsync) { this.next(); } + node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync); + } else if (this.type === types._class) { + var cNode = this.startNode(); + node.declaration = this.parseClass(cNode, "nullableID"); + } else { + node.declaration = this.parseMaybeAssign(); + this.semicolon(); + } + return this.finishNode(node, "ExportDefaultDeclaration") + } + // export var|const|let|function|class ... + if (this.shouldParseExportStatement()) { + node.declaration = this.parseStatement(null); + if (node.declaration.type === "VariableDeclaration") + { this.checkVariableExport(exports, node.declaration.declarations); } + else + { this.checkExport(exports, node.declaration.id.name, node.declaration.id.start); } + node.specifiers = []; + node.source = null; + } else { // export { x, y as z } [from '...'] + node.declaration = null; + node.specifiers = this.parseExportSpecifiers(exports); + if (this.eatContextual("from")) { + if (this.type !== types.string) { this.unexpected(); } + node.source = this.parseExprAtom(); + } else { + for (var i = 0, list = node.specifiers; i < list.length; i += 1) { + // check for keywords used as local names + var spec = list[i]; + + this.checkUnreserved(spec.local); + // check if export is defined + this.checkLocalExport(spec.local); + } + + node.source = null; + } + this.semicolon(); + } + return this.finishNode(node, "ExportNamedDeclaration") + }; + + pp$1.checkExport = function(exports, name, pos) { + if (!exports) { return } + if (has(exports, name)) + { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); } + exports[name] = true; + }; + + pp$1.checkPatternExport = function(exports, pat) { + var type = pat.type; + if (type === "Identifier") + { this.checkExport(exports, pat.name, pat.start); } + else if (type === "ObjectPattern") + { for (var i = 0, list = pat.properties; i < list.length; i += 1) + { + var prop = list[i]; + + this.checkPatternExport(exports, prop); + } } + else if (type === "ArrayPattern") + { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) { + var elt = list$1[i$1]; + + if (elt) { this.checkPatternExport(exports, elt); } + } } + else if (type === "Property") + { this.checkPatternExport(exports, pat.value); } + else if (type === "AssignmentPattern") + { this.checkPatternExport(exports, pat.left); } + else if (type === "RestElement") + { this.checkPatternExport(exports, pat.argument); } + else if (type === "ParenthesizedExpression") + { this.checkPatternExport(exports, pat.expression); } + }; + + pp$1.checkVariableExport = function(exports, decls) { + if (!exports) { return } + for (var i = 0, list = decls; i < list.length; i += 1) + { + var decl = list[i]; + + this.checkPatternExport(exports, decl.id); + } + }; + + pp$1.shouldParseExportStatement = function() { + return this.type.keyword === "var" || + this.type.keyword === "const" || + this.type.keyword === "class" || + this.type.keyword === "function" || + this.isLet() || + this.isAsyncFunction() + }; + + // Parses a comma-separated list of module exports. + + pp$1.parseExportSpecifiers = function(exports) { + var nodes = [], first = true; + // export { x, y as z } [from '...'] + this.expect(types.braceL); + while (!this.eat(types.braceR)) { + if (!first) { + this.expect(types.comma); + if (this.afterTrailingComma(types.braceR)) { break } + } else { first = false; } + + var node = this.startNode(); + node.local = this.parseIdent(true); + node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local; + this.checkExport(exports, node.exported.name, node.exported.start); + nodes.push(this.finishNode(node, "ExportSpecifier")); + } + return nodes + }; + + // Parses import declaration. + + pp$1.parseImport = function(node) { + this.next(); + // import '...' + if (this.type === types.string) { + node.specifiers = empty; + node.source = this.parseExprAtom(); + } else { + node.specifiers = this.parseImportSpecifiers(); + this.expectContextual("from"); + node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected(); + } + this.semicolon(); + return this.finishNode(node, "ImportDeclaration") + }; + + // Parses a comma-separated list of module imports. + + pp$1.parseImportSpecifiers = function() { + var nodes = [], first = true; + if (this.type === types.name) { + // import defaultObj, { x, y as z } from '...' + var node = this.startNode(); + node.local = this.parseIdent(); + this.checkLVal(node.local, BIND_LEXICAL); + nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); + if (!this.eat(types.comma)) { return nodes } + } + if (this.type === types.star) { + var node$1 = this.startNode(); + this.next(); + this.expectContextual("as"); + node$1.local = this.parseIdent(); + this.checkLVal(node$1.local, BIND_LEXICAL); + nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier")); + return nodes + } + this.expect(types.braceL); + while (!this.eat(types.braceR)) { + if (!first) { + this.expect(types.comma); + if (this.afterTrailingComma(types.braceR)) { break } + } else { first = false; } + + var node$2 = this.startNode(); + node$2.imported = this.parseIdent(true); + if (this.eatContextual("as")) { + node$2.local = this.parseIdent(); + } else { + this.checkUnreserved(node$2.imported); + node$2.local = node$2.imported; + } + this.checkLVal(node$2.local, BIND_LEXICAL); + nodes.push(this.finishNode(node$2, "ImportSpecifier")); + } + return nodes + }; + + // Set `ExpressionStatement#directive` property for directive prologues. + pp$1.adaptDirectivePrologue = function(statements) { + for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) { + statements[i].directive = statements[i].expression.raw.slice(1, -1); + } + }; + pp$1.isDirectiveCandidate = function(statement) { + return ( + statement.type === "ExpressionStatement" && + statement.expression.type === "Literal" && + typeof statement.expression.value === "string" && + // Reject parenthesized strings. + (this.input[statement.start] === "\"" || this.input[statement.start] === "'") + ) + }; + + var pp$2 = Parser.prototype; + + // Convert existing expression atom to assignable pattern + // if possible. + + pp$2.toAssignable = function(node, isBinding, refDestructuringErrors) { + if (this.options.ecmaVersion >= 6 && node) { + switch (node.type) { + case "Identifier": + if (this.inAsync && node.name === "await") + { this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); } + break + + case "ObjectPattern": + case "ArrayPattern": + case "RestElement": + break + + case "ObjectExpression": + node.type = "ObjectPattern"; + if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + for (var i = 0, list = node.properties; i < list.length; i += 1) { + var prop = list[i]; + + this.toAssignable(prop, isBinding); + // Early error: + // AssignmentRestProperty[Yield, Await] : + // `...` DestructuringAssignmentTarget[Yield, Await] + // + // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|. + if ( + prop.type === "RestElement" && + (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern") + ) { + this.raise(prop.argument.start, "Unexpected token"); + } + } + break + + case "Property": + // AssignmentProperty has type === "Property" + if (node.kind !== "init") { this.raise(node.key.start, "Object pattern can't contain getter or setter"); } + this.toAssignable(node.value, isBinding); + break + + case "ArrayExpression": + node.type = "ArrayPattern"; + if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + this.toAssignableList(node.elements, isBinding); + break + + case "SpreadElement": + node.type = "RestElement"; + this.toAssignable(node.argument, isBinding); + if (node.argument.type === "AssignmentPattern") + { this.raise(node.argument.start, "Rest elements cannot have a default value"); } + break + + case "AssignmentExpression": + if (node.operator !== "=") { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); } + node.type = "AssignmentPattern"; + delete node.operator; + this.toAssignable(node.left, isBinding); + // falls through to AssignmentPattern + + case "AssignmentPattern": + break + + case "ParenthesizedExpression": + this.toAssignable(node.expression, isBinding, refDestructuringErrors); + break + + case "MemberExpression": + if (!isBinding) { break } + + default: + this.raise(node.start, "Assigning to rvalue"); + } + } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + return node + }; + + // Convert list of expression atoms to binding list. + + pp$2.toAssignableList = function(exprList, isBinding) { + var end = exprList.length; + for (var i = 0; i < end; i++) { + var elt = exprList[i]; + if (elt) { this.toAssignable(elt, isBinding); } + } + if (end) { + var last = exprList[end - 1]; + if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") + { this.unexpected(last.argument.start); } + } + return exprList + }; + + // Parses spread element. + + pp$2.parseSpread = function(refDestructuringErrors) { + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeAssign(false, refDestructuringErrors); + return this.finishNode(node, "SpreadElement") + }; + + pp$2.parseRestBinding = function() { + var node = this.startNode(); + this.next(); + + // RestElement inside of a function parameter must be an identifier + if (this.options.ecmaVersion === 6 && this.type !== types.name) + { this.unexpected(); } + + node.argument = this.parseBindingAtom(); + + return this.finishNode(node, "RestElement") + }; + + // Parses lvalue (assignable) atom. + + pp$2.parseBindingAtom = function() { + if (this.options.ecmaVersion >= 6) { + switch (this.type) { + case types.bracketL: + var node = this.startNode(); + this.next(); + node.elements = this.parseBindingList(types.bracketR, true, true); + return this.finishNode(node, "ArrayPattern") + + case types.braceL: + return this.parseObj(true) + } + } + return this.parseIdent() + }; + + pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma) { + var elts = [], first = true; + while (!this.eat(close)) { + if (first) { first = false; } + else { this.expect(types.comma); } + if (allowEmpty && this.type === types.comma) { + elts.push(null); + } else if (allowTrailingComma && this.afterTrailingComma(close)) { + break + } else if (this.type === types.ellipsis) { + var rest = this.parseRestBinding(); + this.parseBindingListItem(rest); + elts.push(rest); + if (this.type === types.comma) { this.raise(this.start, "Comma is not permitted after the rest element"); } + this.expect(close); + break + } else { + var elem = this.parseMaybeDefault(this.start, this.startLoc); + this.parseBindingListItem(elem); + elts.push(elem); + } + } + return elts + }; + + pp$2.parseBindingListItem = function(param) { + return param + }; + + // Parses assignment pattern around given atom if possible. + + pp$2.parseMaybeDefault = function(startPos, startLoc, left) { + left = left || this.parseBindingAtom(); + if (this.options.ecmaVersion < 6 || !this.eat(types.eq)) { return left } + var node = this.startNodeAt(startPos, startLoc); + node.left = left; + node.right = this.parseMaybeAssign(); + return this.finishNode(node, "AssignmentPattern") + }; + + // Verify that a node is an lval — something that can be assigned + // to. + // bindingType can be either: + // 'var' indicating that the lval creates a 'var' binding + // 'let' indicating that the lval creates a lexical ('let' or 'const') binding + // 'none' indicating that the binding should be checked for illegal identifiers, but not for duplicate references + + pp$2.checkLVal = function(expr, bindingType, checkClashes) { + if ( bindingType === void 0 ) bindingType = BIND_NONE; + + switch (expr.type) { + case "Identifier": + if (bindingType === BIND_LEXICAL && expr.name === "let") + { this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"); } + if (this.strict && this.reservedWordsStrictBind.test(expr.name)) + { this.raiseRecoverable(expr.start, (bindingType ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); } + if (checkClashes) { + if (has(checkClashes, expr.name)) + { this.raiseRecoverable(expr.start, "Argument name clash"); } + checkClashes[expr.name] = true; + } + if (bindingType !== BIND_NONE && bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } + break + + case "MemberExpression": + if (bindingType) { this.raiseRecoverable(expr.start, "Binding member expression"); } + break + + case "ObjectPattern": + for (var i = 0, list = expr.properties; i < list.length; i += 1) + { + var prop = list[i]; + + this.checkLVal(prop, bindingType, checkClashes); + } + break + + case "Property": + // AssignmentProperty has type === "Property" + this.checkLVal(expr.value, bindingType, checkClashes); + break + + case "ArrayPattern": + for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { + var elem = list$1[i$1]; + + if (elem) { this.checkLVal(elem, bindingType, checkClashes); } + } + break + + case "AssignmentPattern": + this.checkLVal(expr.left, bindingType, checkClashes); + break + + case "RestElement": + this.checkLVal(expr.argument, bindingType, checkClashes); + break + + case "ParenthesizedExpression": + this.checkLVal(expr.expression, bindingType, checkClashes); + break + + default: + this.raise(expr.start, (bindingType ? "Binding" : "Assigning to") + " rvalue"); + } + }; + + // A recursive descent parser operates by defining functions for all + + var pp$3 = Parser.prototype; + + // Check if property name clashes with already added. + // Object/class getters and setters are not allowed to clash — + // either with each other or with an init property — and in + // strict mode, init properties are also not allowed to be repeated. + + pp$3.checkPropClash = function(prop, propHash, refDestructuringErrors) { + if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") + { return } + if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) + { return } + var key = prop.key; + var name; + switch (key.type) { + case "Identifier": name = key.name; break + case "Literal": name = String(key.value); break + default: return + } + var kind = prop.kind; + if (this.options.ecmaVersion >= 6) { + if (name === "__proto__" && kind === "init") { + if (propHash.proto) { + if (refDestructuringErrors && refDestructuringErrors.doubleProto < 0) { refDestructuringErrors.doubleProto = key.start; } + // Backwards-compat kludge. Can be removed in version 6.0 + else { this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); } + } + propHash.proto = true; + } + return + } + name = "$" + name; + var other = propHash[name]; + if (other) { + var redefinition; + if (kind === "init") { + redefinition = this.strict && other.init || other.get || other.set; + } else { + redefinition = other.init || other[kind]; + } + if (redefinition) + { this.raiseRecoverable(key.start, "Redefinition of property"); } + } else { + other = propHash[name] = { + init: false, + get: false, + set: false + }; + } + other[kind] = true; + }; + + // ### Expression parsing + + // These nest, from the most general expression type at the top to + // 'atomic', nondivisible expression types at the bottom. Most of + // the functions will simply let the function(s) below them parse, + // and, *if* the syntactic construct they handle is present, wrap + // the AST node that the inner parser gave them in another node. + + // Parse a full expression. The optional arguments are used to + // forbid the `in` operator (in for loops initalization expressions) + // and provide reference for storing '=' operator inside shorthand + // property assignment in contexts where both object expression + // and object pattern might appear (so it's possible to raise + // delayed syntax error at correct position). + + pp$3.parseExpression = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseMaybeAssign(noIn, refDestructuringErrors); + if (this.type === types.comma) { + var node = this.startNodeAt(startPos, startLoc); + node.expressions = [expr]; + while (this.eat(types.comma)) { node.expressions.push(this.parseMaybeAssign(noIn, refDestructuringErrors)); } + return this.finishNode(node, "SequenceExpression") + } + return expr + }; + + // Parse an assignment expression. This includes applications of + // operators like `+=`. + + pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) { + if (this.isContextual("yield")) { + if (this.inGenerator) { return this.parseYield(noIn) } + // The tokenizer will assume an expression is allowed after + // `yield`, but this isn't that kind of yield + else { this.exprAllowed = false; } + } + + var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldShorthandAssign = -1; + if (refDestructuringErrors) { + oldParenAssign = refDestructuringErrors.parenthesizedAssign; + oldTrailingComma = refDestructuringErrors.trailingComma; + oldShorthandAssign = refDestructuringErrors.shorthandAssign; + refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.shorthandAssign = -1; + } else { + refDestructuringErrors = new DestructuringErrors; + ownDestructuringErrors = true; + } + + var startPos = this.start, startLoc = this.startLoc; + if (this.type === types.parenL || this.type === types.name) + { this.potentialArrowAt = this.start; } + var left = this.parseMaybeConditional(noIn, refDestructuringErrors); + if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); } + if (this.type.isAssign) { + var node = this.startNodeAt(startPos, startLoc); + node.operator = this.value; + node.left = this.type === types.eq ? this.toAssignable(left, false, refDestructuringErrors) : left; + if (!ownDestructuringErrors) { DestructuringErrors.call(refDestructuringErrors); } + refDestructuringErrors.shorthandAssign = -1; // reset because shorthand default was used correctly + this.checkLVal(left); + this.next(); + node.right = this.parseMaybeAssign(noIn); + return this.finishNode(node, "AssignmentExpression") + } else { + if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); } + } + if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; } + if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; } + if (oldShorthandAssign > -1) { refDestructuringErrors.shorthandAssign = oldShorthandAssign; } + return left + }; + + // Parse a ternary conditional (`?:`) operator. + + pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseExprOps(noIn, refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + if (this.eat(types.question)) { + var node = this.startNodeAt(startPos, startLoc); + node.test = expr; + node.consequent = this.parseMaybeAssign(); + this.expect(types.colon); + node.alternate = this.parseMaybeAssign(noIn); + return this.finishNode(node, "ConditionalExpression") + } + return expr + }; + + // Start the precedence parser. + + pp$3.parseExprOps = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseMaybeUnary(refDestructuringErrors, false); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, noIn) + }; + + // Parse binary operators with the operator precedence parsing + // algorithm. `left` is the left-hand side of the operator. + // `minPrec` provides context that allows the function to stop and + // defer further parser to one of its callers when it encounters an + // operator that has a lower precedence than the set it is parsing. + + pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) { + var prec = this.type.binop; + if (prec != null && (!noIn || this.type !== types._in)) { + if (prec > minPrec) { + var logical = this.type === types.logicalOR || this.type === types.logicalAND; + var op = this.value; + this.next(); + var startPos = this.start, startLoc = this.startLoc; + var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn); + var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical); + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn) + } + } + return left + }; + + pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) { + var node = this.startNodeAt(startPos, startLoc); + node.left = left; + node.operator = op; + node.right = right; + return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") + }; + + // Parse unary operators, both prefix and postfix. + + pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) { + var startPos = this.start, startLoc = this.startLoc, expr; + if (this.isContextual("await") && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction))) { + expr = this.parseAwait(); + sawUnary = true; + } else if (this.type.prefix) { + var node = this.startNode(), update = this.type === types.incDec; + node.operator = this.value; + node.prefix = true; + this.next(); + node.argument = this.parseMaybeUnary(null, true); + this.checkExpressionErrors(refDestructuringErrors, true); + if (update) { this.checkLVal(node.argument); } + else if (this.strict && node.operator === "delete" && + node.argument.type === "Identifier") + { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); } + else { sawUnary = true; } + expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); + } else { + expr = this.parseExprSubscripts(refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + while (this.type.postfix && !this.canInsertSemicolon()) { + var node$1 = this.startNodeAt(startPos, startLoc); + node$1.operator = this.value; + node$1.prefix = false; + node$1.argument = expr; + this.checkLVal(expr); + this.next(); + expr = this.finishNode(node$1, "UpdateExpression"); + } + } + + if (!sawUnary && this.eat(types.starstar)) + { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false) } + else + { return expr } + }; + + // Parse call, dot, and `[]`-subscript expressions. + + pp$3.parseExprSubscripts = function(refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseExprAtom(refDestructuringErrors); + var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")"; + if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) { return expr } + var result = this.parseSubscripts(expr, startPos, startLoc); + if (refDestructuringErrors && result.type === "MemberExpression") { + if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; } + if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; } + } + return result + }; + + pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) { + var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && + this.lastTokEnd === base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === "async"; + while (true) { + var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow); + if (element === base || element.type === "ArrowFunctionExpression") { return element } + base = element; + } + }; + + pp$3.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow) { + var computed = this.eat(types.bracketL); + if (computed || this.eat(types.dot)) { + var node = this.startNodeAt(startPos, startLoc); + node.object = base; + node.property = computed ? this.parseExpression() : this.parseIdent(true); + node.computed = !!computed; + if (computed) { this.expect(types.bracketR); } + base = this.finishNode(node, "MemberExpression"); + } else if (!noCalls && this.eat(types.parenL)) { + var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + var exprList = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8 && base.type !== "Import", false, refDestructuringErrors); + if (maybeAsyncArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + if (this.awaitIdentPos > 0) + { this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); } + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true) + } + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; + var node$1 = this.startNodeAt(startPos, startLoc); + node$1.callee = base; + node$1.arguments = exprList; + if (node$1.callee.type === "Import") { + if (node$1.arguments.length !== 1) { + this.raise(node$1.start, "import() requires exactly one argument"); + } + + var importArg = node$1.arguments[0]; + if (importArg && importArg.type === "SpreadElement") { + this.raise(importArg.start, "... is not allowed in import()"); + } + } + base = this.finishNode(node$1, "CallExpression"); + } else if (this.type === types.backQuote) { + var node$2 = this.startNodeAt(startPos, startLoc); + node$2.tag = base; + node$2.quasi = this.parseTemplate({isTagged: true}); + base = this.finishNode(node$2, "TaggedTemplateExpression"); + } + return base + }; + + // Parse an atomic expression — either a single token that is an + // expression, an expression started by a keyword like `function` or + // `new`, or an expression wrapped in punctuation like `()`, `[]`, + // or `{}`. + + pp$3.parseExprAtom = function(refDestructuringErrors) { + // If a division operator appears in an expression position, the + // tokenizer got confused, and we force it to read a regexp instead. + if (this.type === types.slash) { this.readRegexp(); } + + var node, canBeArrow = this.potentialArrowAt === this.start; + switch (this.type) { + case types._super: + if (!this.allowSuper) + { this.raise(this.start, "'super' keyword outside a method"); } + node = this.startNode(); + this.next(); + if (this.type === types.parenL && !this.allowDirectSuper) + { this.raise(node.start, "super() call outside constructor of a subclass"); } + // The `super` keyword can appear at below: + // SuperProperty: + // super [ Expression ] + // super . IdentifierName + // SuperCall: + // super Arguments + if (this.type !== types.dot && this.type !== types.bracketL && this.type !== types.parenL) + { this.unexpected(); } + return this.finishNode(node, "Super") + + case types._this: + node = this.startNode(); + this.next(); + return this.finishNode(node, "ThisExpression") + + case types.name: + var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; + var id = this.parseIdent(false); + if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types._function)) + { return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true) } + if (canBeArrow && !this.canInsertSemicolon()) { + if (this.eat(types.arrow)) + { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false) } + if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types.name && !containsEsc) { + id = this.parseIdent(false); + if (this.canInsertSemicolon() || !this.eat(types.arrow)) + { this.unexpected(); } + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true) + } + } + return id + + case types.regexp: + var value = this.value; + node = this.parseLiteral(value.value); + node.regex = {pattern: value.pattern, flags: value.flags}; + return node + + case types.num: case types.string: + return this.parseLiteral(this.value) + + case types._null: case types._true: case types._false: + node = this.startNode(); + node.value = this.type === types._null ? null : this.type === types._true; + node.raw = this.type.keyword; + this.next(); + return this.finishNode(node, "Literal") + + case types.parenL: + var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow); + if (refDestructuringErrors) { + if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) + { refDestructuringErrors.parenthesizedAssign = start; } + if (refDestructuringErrors.parenthesizedBind < 0) + { refDestructuringErrors.parenthesizedBind = start; } + } + return expr + + case types.bracketL: + node = this.startNode(); + this.next(); + node.elements = this.parseExprList(types.bracketR, true, true, refDestructuringErrors); + return this.finishNode(node, "ArrayExpression") + + case types.braceL: + return this.parseObj(false, refDestructuringErrors) + + case types._function: + node = this.startNode(); + this.next(); + return this.parseFunction(node, 0) + + case types._class: + return this.parseClass(this.startNode(), false) + + case types._new: + return this.parseNew() + + case types.backQuote: + return this.parseTemplate() + + case types._import: + if (this.options.ecmaVersion > 10) { + return this.parseDynamicImport() + } else { + return this.unexpected() + } + + default: + this.unexpected(); + } + }; + + pp$3.parseDynamicImport = function() { + var node = this.startNode(); + this.next(); + if (this.type !== types.parenL) { + this.unexpected(); + } + return this.finishNode(node, "Import") + }; + + pp$3.parseLiteral = function(value) { + var node = this.startNode(); + node.value = value; + node.raw = this.input.slice(this.start, this.end); + if (node.raw.charCodeAt(node.raw.length - 1) === 110) { node.bigint = node.raw.slice(0, -1); } + this.next(); + return this.finishNode(node, "Literal") + }; + + pp$3.parseParenExpression = function() { + this.expect(types.parenL); + var val = this.parseExpression(); + this.expect(types.parenR); + return val + }; + + pp$3.parseParenAndDistinguishExpression = function(canBeArrow) { + var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8; + if (this.options.ecmaVersion >= 6) { + this.next(); + + var innerStartPos = this.start, innerStartLoc = this.startLoc; + var exprList = [], first = true, lastIsComma = false; + var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; + this.yieldPos = 0; + this.awaitPos = 0; + // Do not save awaitIdentPos to allow checking awaits nested in parameters + while (this.type !== types.parenR) { + first ? first = false : this.expect(types.comma); + if (allowTrailingComma && this.afterTrailingComma(types.parenR, true)) { + lastIsComma = true; + break + } else if (this.type === types.ellipsis) { + spreadStart = this.start; + exprList.push(this.parseParenItem(this.parseRestBinding())); + if (this.type === types.comma) { this.raise(this.start, "Comma is not permitted after the rest element"); } + break + } else { + exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem)); + } + } + var innerEndPos = this.start, innerEndLoc = this.startLoc; + this.expect(types.parenR); + + if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + return this.parseParenArrowList(startPos, startLoc, exprList) + } + + if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); } + if (spreadStart) { this.unexpected(spreadStart); } + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + + if (exprList.length > 1) { + val = this.startNodeAt(innerStartPos, innerStartLoc); + val.expressions = exprList; + this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); + } else { + val = exprList[0]; + } + } else { + val = this.parseParenExpression(); + } + + if (this.options.preserveParens) { + var par = this.startNodeAt(startPos, startLoc); + par.expression = val; + return this.finishNode(par, "ParenthesizedExpression") + } else { + return val + } + }; + + pp$3.parseParenItem = function(item) { + return item + }; + + pp$3.parseParenArrowList = function(startPos, startLoc, exprList) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList) + }; + + // New's precedence is slightly tricky. It must allow its argument to + // be a `[]` or dot subscript expression, but not a call — at least, + // not without wrapping it in parentheses. Thus, it uses the noCalls + // argument to parseSubscripts to prevent it from consuming the + // argument list. + + var empty$1 = []; + + pp$3.parseNew = function() { + var node = this.startNode(); + var meta = this.parseIdent(true); + if (this.options.ecmaVersion >= 6 && this.eat(types.dot)) { + node.meta = meta; + var containsEsc = this.containsEsc; + node.property = this.parseIdent(true); + if (node.property.name !== "target" || containsEsc) + { this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target"); } + if (!this.inNonArrowFunction()) + { this.raiseRecoverable(node.start, "new.target can only be used in functions"); } + return this.finishNode(node, "MetaProperty") + } + var startPos = this.start, startLoc = this.startLoc; + node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); + if (this.options.ecmaVersion > 10 && node.callee.type === "Import") { + this.raise(node.callee.start, "Cannot use new with import(...)"); + } + if (this.eat(types.parenL)) { node.arguments = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8 && node.callee.type !== "Import", false); } + else { node.arguments = empty$1; } + return this.finishNode(node, "NewExpression") + }; + + // Parse template expression. + + pp$3.parseTemplateElement = function(ref) { + var isTagged = ref.isTagged; + + var elem = this.startNode(); + if (this.type === types.invalidTemplate) { + if (!isTagged) { + this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"); + } + elem.value = { + raw: this.value, + cooked: null + }; + } else { + elem.value = { + raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), + cooked: this.value + }; + } + this.next(); + elem.tail = this.type === types.backQuote; + return this.finishNode(elem, "TemplateElement") + }; + + pp$3.parseTemplate = function(ref) { + if ( ref === void 0 ) ref = {}; + var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false; + + var node = this.startNode(); + this.next(); + node.expressions = []; + var curElt = this.parseTemplateElement({isTagged: isTagged}); + node.quasis = [curElt]; + while (!curElt.tail) { + if (this.type === types.eof) { this.raise(this.pos, "Unterminated template literal"); } + this.expect(types.dollarBraceL); + node.expressions.push(this.parseExpression()); + this.expect(types.braceR); + node.quasis.push(curElt = this.parseTemplateElement({isTagged: isTagged})); + } + this.next(); + return this.finishNode(node, "TemplateLiteral") + }; + + pp$3.isAsyncProp = function(prop) { + return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && + (this.type === types.name || this.type === types.num || this.type === types.string || this.type === types.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types.star)) && + !lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + }; + + // Parse an object literal or binding pattern. + + pp$3.parseObj = function(isPattern, refDestructuringErrors) { + var node = this.startNode(), first = true, propHash = {}; + node.properties = []; + this.next(); + while (!this.eat(types.braceR)) { + if (!first) { + this.expect(types.comma); + if (this.afterTrailingComma(types.braceR)) { break } + } else { first = false; } + + var prop = this.parseProperty(isPattern, refDestructuringErrors); + if (!isPattern) { this.checkPropClash(prop, propHash, refDestructuringErrors); } + node.properties.push(prop); + } + return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") + }; + + pp$3.parseProperty = function(isPattern, refDestructuringErrors) { + var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc; + if (this.options.ecmaVersion >= 9 && this.eat(types.ellipsis)) { + if (isPattern) { + prop.argument = this.parseIdent(false); + if (this.type === types.comma) { + this.raise(this.start, "Comma is not permitted after the rest element"); + } + return this.finishNode(prop, "RestElement") + } + // To disallow parenthesized identifier via `this.toAssignable()`. + if (this.type === types.parenL && refDestructuringErrors) { + if (refDestructuringErrors.parenthesizedAssign < 0) { + refDestructuringErrors.parenthesizedAssign = this.start; + } + if (refDestructuringErrors.parenthesizedBind < 0) { + refDestructuringErrors.parenthesizedBind = this.start; + } + } + // Parse argument. + prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); + // To disallow trailing comma via `this.toAssignable()`. + if (this.type === types.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) { + refDestructuringErrors.trailingComma = this.start; + } + // Finish + return this.finishNode(prop, "SpreadElement") + } + if (this.options.ecmaVersion >= 6) { + prop.method = false; + prop.shorthand = false; + if (isPattern || refDestructuringErrors) { + startPos = this.start; + startLoc = this.startLoc; + } + if (!isPattern) + { isGenerator = this.eat(types.star); } + } + var containsEsc = this.containsEsc; + this.parsePropertyName(prop); + if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) { + isAsync = true; + isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); + this.parsePropertyName(prop, refDestructuringErrors); + } else { + isAsync = false; + } + this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc); + return this.finishNode(prop, "Property") + }; + + pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { + if ((isGenerator || isAsync) && this.type === types.colon) + { this.unexpected(); } + + if (this.eat(types.colon)) { + prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); + prop.kind = "init"; + } else if (this.options.ecmaVersion >= 6 && this.type === types.parenL) { + if (isPattern) { this.unexpected(); } + prop.kind = "init"; + prop.method = true; + prop.value = this.parseMethod(isGenerator, isAsync); + } else if (!isPattern && !containsEsc && + this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && + (prop.key.name === "get" || prop.key.name === "set") && + (this.type !== types.comma && this.type !== types.braceR)) { + if (isGenerator || isAsync) { this.unexpected(); } + prop.kind = prop.key.name; + this.parsePropertyName(prop); + prop.value = this.parseMethod(false); + var paramCount = prop.kind === "get" ? 0 : 1; + if (prop.value.params.length !== paramCount) { + var start = prop.value.start; + if (prop.kind === "get") + { this.raiseRecoverable(start, "getter should have no params"); } + else + { this.raiseRecoverable(start, "setter should have exactly one param"); } + } else { + if (prop.kind === "set" && prop.value.params[0].type === "RestElement") + { this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); } + } + } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { + if (isGenerator || isAsync) { this.unexpected(); } + this.checkUnreserved(prop.key); + if (prop.key.name === "await" && !this.awaitIdentPos) + { this.awaitIdentPos = startPos; } + prop.kind = "init"; + if (isPattern) { + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); + } else if (this.type === types.eq && refDestructuringErrors) { + if (refDestructuringErrors.shorthandAssign < 0) + { refDestructuringErrors.shorthandAssign = this.start; } + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); + } else { + prop.value = prop.key; + } + prop.shorthand = true; + } else { this.unexpected(); } + }; + + pp$3.parsePropertyName = function(prop) { + if (this.options.ecmaVersion >= 6) { + if (this.eat(types.bracketL)) { + prop.computed = true; + prop.key = this.parseMaybeAssign(); + this.expect(types.bracketR); + return prop.key + } else { + prop.computed = false; + } + } + return prop.key = this.type === types.num || this.type === types.string ? this.parseExprAtom() : this.parseIdent(true) + }; + + // Initialize empty function node. + + pp$3.initFunction = function(node) { + node.id = null; + if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; } + if (this.options.ecmaVersion >= 8) { node.async = false; } + }; + + // Parse object or class method. + + pp$3.parseMethod = function(isGenerator, isAsync, allowDirectSuper) { + var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + + this.initFunction(node); + if (this.options.ecmaVersion >= 6) + { node.generator = isGenerator; } + if (this.options.ecmaVersion >= 8) + { node.async = !!isAsync; } + + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); + + this.expect(types.parenL); + node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); + this.checkYieldAwaitInDefaultParams(); + this.parseFunctionBody(node, false, true); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, "FunctionExpression") + }; + + // Parse arrow function expression with given parameters. + + pp$3.parseArrowExpression = function(node, params, isAsync) { + var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + + this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW); + this.initFunction(node); + if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } + + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + + node.params = this.toAssignableList(params, true); + this.parseFunctionBody(node, true, false); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, "ArrowFunctionExpression") + }; + + // Parse function body and check parameters. + + pp$3.parseFunctionBody = function(node, isArrowFunction, isMethod) { + var isExpression = isArrowFunction && this.type !== types.braceL; + var oldStrict = this.strict, useStrict = false; + + if (isExpression) { + node.body = this.parseMaybeAssign(); + node.expression = true; + this.checkParams(node, false); + } else { + var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params); + if (!oldStrict || nonSimple) { + useStrict = this.strictDirective(this.end); + // If this is a strict mode function, verify that argument names + // are not repeated, and it does not try to bind the words `eval` + // or `arguments`. + if (useStrict && nonSimple) + { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); } + } + // Start a new scope with regard to labels and the `inFunction` + // flag (restore them to their old value afterwards). + var oldLabels = this.labels; + this.labels = []; + if (useStrict) { this.strict = true; } + + // Add the params to varDeclaredNames to ensure that an error is thrown + // if a let/const declaration in the function clashes with one of the params. + this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params)); + node.body = this.parseBlock(false); + node.expression = false; + this.adaptDirectivePrologue(node.body.body); + this.labels = oldLabels; + } + this.exitScope(); + + // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval' + if (this.strict && node.id) { this.checkLVal(node.id, BIND_OUTSIDE); } + this.strict = oldStrict; + }; + + pp$3.isSimpleParamList = function(params) { + for (var i = 0, list = params; i < list.length; i += 1) + { + var param = list[i]; + + if (param.type !== "Identifier") { return false + } } + return true + }; + + // Checks function params for various disallowed patterns such as using "eval" + // or "arguments" and duplicate parameters. + + pp$3.checkParams = function(node, allowDuplicates) { + var nameHash = {}; + for (var i = 0, list = node.params; i < list.length; i += 1) + { + var param = list[i]; + + this.checkLVal(param, BIND_VAR, allowDuplicates ? null : nameHash); + } + }; + + // Parses a comma-separated list of expressions, and returns them as + // an array. `close` is the token type that ends the list, and + // `allowEmpty` can be turned on to allow subsequent commas with + // nothing in between them to be parsed as `null` (which is needed + // for array literals). + + pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { + var elts = [], first = true; + while (!this.eat(close)) { + if (!first) { + this.expect(types.comma); + if (allowTrailingComma && this.afterTrailingComma(close)) { break } + } else { first = false; } + + var elt = (void 0); + if (allowEmpty && this.type === types.comma) + { elt = null; } + else if (this.type === types.ellipsis) { + elt = this.parseSpread(refDestructuringErrors); + if (refDestructuringErrors && this.type === types.comma && refDestructuringErrors.trailingComma < 0) + { refDestructuringErrors.trailingComma = this.start; } + } else { + elt = this.parseMaybeAssign(false, refDestructuringErrors); + } + elts.push(elt); + } + return elts + }; + + pp$3.checkUnreserved = function(ref) { + var start = ref.start; + var end = ref.end; + var name = ref.name; + + if (this.inGenerator && name === "yield") + { this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); } + if (this.inAsync && name === "await") + { this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); } + if (this.keywords.test(name)) + { this.raise(start, ("Unexpected keyword '" + name + "'")); } + if (this.options.ecmaVersion < 6 && + this.input.slice(start, end).indexOf("\\") !== -1) { return } + var re = this.strict ? this.reservedWordsStrict : this.reservedWords; + if (re.test(name)) { + if (!this.inAsync && name === "await") + { this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); } + this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); + } + }; + + // Parse the next token as an identifier. If `liberal` is true (used + // when parsing properties), it will also convert keywords into + // identifiers. + + pp$3.parseIdent = function(liberal, isBinding) { + var node = this.startNode(); + if (liberal && this.options.allowReserved === "never") { liberal = false; } + if (this.type === types.name) { + node.name = this.value; + } else if (this.type.keyword) { + node.name = this.type.keyword; + + // To fix https://github.com/acornjs/acorn/issues/575 + // `class` and `function` keywords push new context into this.context. + // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name. + // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword + if ((node.name === "class" || node.name === "function") && + (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) { + this.context.pop(); + } + } else { + this.unexpected(); + } + this.next(); + this.finishNode(node, "Identifier"); + if (!liberal) { + this.checkUnreserved(node); + if (node.name === "await" && !this.awaitIdentPos) + { this.awaitIdentPos = node.start; } + } + return node + }; + + // Parses yield expression inside generator. + + pp$3.parseYield = function(noIn) { + if (!this.yieldPos) { this.yieldPos = this.start; } + + var node = this.startNode(); + this.next(); + if (this.type === types.semi || this.canInsertSemicolon() || (this.type !== types.star && !this.type.startsExpr)) { + node.delegate = false; + node.argument = null; + } else { + node.delegate = this.eat(types.star); + node.argument = this.parseMaybeAssign(noIn); + } + return this.finishNode(node, "YieldExpression") + }; + + pp$3.parseAwait = function() { + if (!this.awaitPos) { this.awaitPos = this.start; } + + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeUnary(null, true); + return this.finishNode(node, "AwaitExpression") + }; + + var pp$4 = Parser.prototype; + + // This function is used to raise exceptions on parse errors. It + // takes an offset integer (into the current `input`) to indicate + // the location of the error, attaches the position to the end + // of the error message, and then raises a `SyntaxError` with that + // message. + + pp$4.raise = function(pos, message) { + var loc = getLineInfo(this.input, pos); + message += " (" + loc.line + ":" + loc.column + ")"; + var err = new SyntaxError(message); + err.pos = pos; err.loc = loc; err.raisedAt = this.pos; + throw err + }; + + pp$4.raiseRecoverable = pp$4.raise; + + pp$4.curPosition = function() { + if (this.options.locations) { + return new Position(this.curLine, this.pos - this.lineStart) + } + }; + + var pp$5 = Parser.prototype; + + var Scope = function Scope(flags) { + this.flags = flags; + // A list of var-declared names in the current lexical scope + this.var = []; + // A list of lexically-declared names in the current lexical scope + this.lexical = []; + // A list of lexically-declared FunctionDeclaration names in the current lexical scope + this.functions = []; + }; + + // The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names. + + pp$5.enterScope = function(flags) { + this.scopeStack.push(new Scope(flags)); + }; + + pp$5.exitScope = function() { + this.scopeStack.pop(); + }; + + // The spec says: + // > At the top level of a function, or script, function declarations are + // > treated like var declarations rather than like lexical declarations. + pp$5.treatFunctionsAsVarInScope = function(scope) { + return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP) + }; + + pp$5.declareName = function(name, bindingType, pos) { + var redeclared = false; + if (bindingType === BIND_LEXICAL) { + var scope = this.currentScope(); + redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; + scope.lexical.push(name); + if (this.inModule && (scope.flags & SCOPE_TOP)) + { delete this.undefinedExports[name]; } + } else if (bindingType === BIND_SIMPLE_CATCH) { + var scope$1 = this.currentScope(); + scope$1.lexical.push(name); + } else if (bindingType === BIND_FUNCTION) { + var scope$2 = this.currentScope(); + if (this.treatFunctionsAsVar) + { redeclared = scope$2.lexical.indexOf(name) > -1; } + else + { redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; } + scope$2.functions.push(name); + } else { + for (var i = this.scopeStack.length - 1; i >= 0; --i) { + var scope$3 = this.scopeStack[i]; + if (scope$3.lexical.indexOf(name) > -1 && !((scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) || + !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) { + redeclared = true; + break + } + scope$3.var.push(name); + if (this.inModule && (scope$3.flags & SCOPE_TOP)) + { delete this.undefinedExports[name]; } + if (scope$3.flags & SCOPE_VAR) { break } + } + } + if (redeclared) { this.raiseRecoverable(pos, ("Identifier '" + name + "' has already been declared")); } + }; + + pp$5.checkLocalExport = function(id) { + // scope.functions must be empty as Module code is always strict. + if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && + this.scopeStack[0].var.indexOf(id.name) === -1) { + this.undefinedExports[id.name] = id; + } + }; + + pp$5.currentScope = function() { + return this.scopeStack[this.scopeStack.length - 1] + }; + + pp$5.currentVarScope = function() { + for (var i = this.scopeStack.length - 1;; i--) { + var scope = this.scopeStack[i]; + if (scope.flags & SCOPE_VAR) { return scope } + } + }; + + // Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`. + pp$5.currentThisScope = function() { + for (var i = this.scopeStack.length - 1;; i--) { + var scope = this.scopeStack[i]; + if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope } + } + }; + + var Node = function Node(parser, pos, loc) { + this.type = ""; + this.start = pos; + this.end = 0; + if (parser.options.locations) + { this.loc = new SourceLocation(parser, loc); } + if (parser.options.directSourceFile) + { this.sourceFile = parser.options.directSourceFile; } + if (parser.options.ranges) + { this.range = [pos, 0]; } + }; + + // Start an AST node, attaching a start offset. + + var pp$6 = Parser.prototype; + + pp$6.startNode = function() { + return new Node(this, this.start, this.startLoc) + }; + + pp$6.startNodeAt = function(pos, loc) { + return new Node(this, pos, loc) + }; + + // Finish an AST node, adding `type` and `end` properties. + + function finishNodeAt(node, type, pos, loc) { + node.type = type; + node.end = pos; + if (this.options.locations) + { node.loc.end = loc; } + if (this.options.ranges) + { node.range[1] = pos; } + return node + } + + pp$6.finishNode = function(node, type) { + return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) + }; + + // Finish node at given position + + pp$6.finishNodeAt = function(node, type, pos, loc) { + return finishNodeAt.call(this, node, type, pos, loc) + }; + + // The algorithm used to determine whether a regexp can appear at a + + var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) { + this.token = token; + this.isExpr = !!isExpr; + this.preserveSpace = !!preserveSpace; + this.override = override; + this.generator = !!generator; + }; + + var types$1 = { + b_stat: new TokContext("{", false), + b_expr: new TokContext("{", true), + b_tmpl: new TokContext("${", false), + p_stat: new TokContext("(", false), + p_expr: new TokContext("(", true), + q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }), + f_stat: new TokContext("function", false), + f_expr: new TokContext("function", true), + f_expr_gen: new TokContext("function", true, false, null, true), + f_gen: new TokContext("function", false, false, null, true) + }; + + var pp$7 = Parser.prototype; + + pp$7.initialContext = function() { + return [types$1.b_stat] + }; + + pp$7.braceIsBlock = function(prevType) { + var parent = this.curContext(); + if (parent === types$1.f_expr || parent === types$1.f_stat) + { return true } + if (prevType === types.colon && (parent === types$1.b_stat || parent === types$1.b_expr)) + { return !parent.isExpr } + + // The check for `tt.name && exprAllowed` detects whether we are + // after a `yield` or `of` construct. See the `updateContext` for + // `tt.name`. + if (prevType === types._return || prevType === types.name && this.exprAllowed) + { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) } + if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType === types.arrow) + { return true } + if (prevType === types.braceL) + { return parent === types$1.b_stat } + if (prevType === types._var || prevType === types._const || prevType === types.name) + { return false } + return !this.exprAllowed + }; + + pp$7.inGeneratorContext = function() { + for (var i = this.context.length - 1; i >= 1; i--) { + var context = this.context[i]; + if (context.token === "function") + { return context.generator } + } + return false + }; + + pp$7.updateContext = function(prevType) { + var update, type = this.type; + if (type.keyword && prevType === types.dot) + { this.exprAllowed = false; } + else if (update = type.updateContext) + { update.call(this, prevType); } + else + { this.exprAllowed = type.beforeExpr; } + }; -var empty$1 = []; + // Token-specific context update code -pp$3.parseNew = function() { - var node = this.startNode(); - var meta = this.parseIdent(true); - if (this.options.ecmaVersion >= 6 && this.eat(types.dot)) { - node.meta = meta; - var containsEsc = this.containsEsc; - node.property = this.parseIdent(true); - if (node.property.name !== "target" || containsEsc) - { this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target"); } - if (!this.inNonArrowFunction()) - { this.raiseRecoverable(node.start, "new.target can only be used in functions"); } - return this.finishNode(node, "MetaProperty") - } - var startPos = this.start, startLoc = this.startLoc; - node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); - if (this.eat(types.parenL)) { node.arguments = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8, false); } - else { node.arguments = empty$1; } - return this.finishNode(node, "NewExpression") -}; - -// Parse template expression. - -pp$3.parseTemplateElement = function(ref) { - var isTagged = ref.isTagged; - - var elem = this.startNode(); - if (this.type === types.invalidTemplate) { - if (!isTagged) { - this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"); - } - elem.value = { - raw: this.value, - cooked: null - }; - } else { - elem.value = { - raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), - cooked: this.value + types.parenR.updateContext = types.braceR.updateContext = function() { + if (this.context.length === 1) { + this.exprAllowed = true; + return + } + var out = this.context.pop(); + if (out === types$1.b_stat && this.curContext().token === "function") { + out = this.context.pop(); + } + this.exprAllowed = !out.isExpr; + }; + + types.braceL.updateContext = function(prevType) { + this.context.push(this.braceIsBlock(prevType) ? types$1.b_stat : types$1.b_expr); + this.exprAllowed = true; + }; + + types.dollarBraceL.updateContext = function() { + this.context.push(types$1.b_tmpl); + this.exprAllowed = true; + }; + + types.parenL.updateContext = function(prevType) { + var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; + this.context.push(statementParens ? types$1.p_stat : types$1.p_expr); + this.exprAllowed = true; + }; + + types.incDec.updateContext = function() { + // tokExprAllowed stays unchanged + }; + + types._function.updateContext = types._class.updateContext = function(prevType) { + if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && + !(prevType === types._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && + !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) + { this.context.push(types$1.f_expr); } + else + { this.context.push(types$1.f_stat); } + this.exprAllowed = false; + }; + + types.backQuote.updateContext = function() { + if (this.curContext() === types$1.q_tmpl) + { this.context.pop(); } + else + { this.context.push(types$1.q_tmpl); } + this.exprAllowed = false; + }; + + types.star.updateContext = function(prevType) { + if (prevType === types._function) { + var index = this.context.length - 1; + if (this.context[index] === types$1.f_expr) + { this.context[index] = types$1.f_expr_gen; } + else + { this.context[index] = types$1.f_gen; } + } + this.exprAllowed = true; + }; + + types.name.updateContext = function(prevType) { + var allowed = false; + if (this.options.ecmaVersion >= 6 && prevType !== types.dot) { + if (this.value === "of" && !this.exprAllowed || + this.value === "yield" && this.inGeneratorContext()) + { allowed = true; } + } + this.exprAllowed = allowed; + }; + + // This file contains Unicode properties extracted from the ECMAScript + // specification. The lists are extracted like so: + // $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText) + + // #table-binary-unicode-properties + var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS"; + var unicodeBinaryProperties = { + 9: ecma9BinaryProperties, + 10: ecma9BinaryProperties + " Extended_Pictographic" + }; + + // #table-unicode-general-category-values + var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu"; + + // #table-unicode-script-values + var ecma9ScriptValues = "Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb"; + var unicodeScriptValues = { + 9: ecma9ScriptValues, + 10: ecma9ScriptValues + " Dogra Dogr Elymaic Elym Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Old_Sogdian Sogo Sogdian Sogd Wancho Wcho" + }; + + var data = {}; + function buildUnicodeData(ecmaVersion) { + var d = data[ecmaVersion] = { + binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues), + nonBinary: { + General_Category: wordsRegexp(unicodeGeneralCategoryValues), + Script: wordsRegexp(unicodeScriptValues[ecmaVersion]) + } }; - } - this.next(); - elem.tail = this.type === types.backQuote; - return this.finishNode(elem, "TemplateElement") -}; - -pp$3.parseTemplate = function(ref) { - var this$1 = this; - if ( ref === void 0 ) ref = {}; - var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false; - - var node = this.startNode(); - this.next(); - node.expressions = []; - var curElt = this.parseTemplateElement({isTagged: isTagged}); - node.quasis = [curElt]; - while (!curElt.tail) { - if (this$1.type === types.eof) { this$1.raise(this$1.pos, "Unterminated template literal"); } - this$1.expect(types.dollarBraceL); - node.expressions.push(this$1.parseExpression()); - this$1.expect(types.braceR); - node.quasis.push(curElt = this$1.parseTemplateElement({isTagged: isTagged})); - } - this.next(); - return this.finishNode(node, "TemplateLiteral") -}; - -pp$3.isAsyncProp = function(prop) { - return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && - (this.type === types.name || this.type === types.num || this.type === types.string || this.type === types.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types.star)) && - !lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) -}; - -// Parse an object literal or binding pattern. - -pp$3.parseObj = function(isPattern, refDestructuringErrors) { - var this$1 = this; - - var node = this.startNode(), first = true, propHash = {}; - node.properties = []; - this.next(); - while (!this.eat(types.braceR)) { - if (!first) { - this$1.expect(types.comma); - if (this$1.afterTrailingComma(types.braceR)) { break } - } else { first = false; } - - var prop = this$1.parseProperty(isPattern, refDestructuringErrors); - if (!isPattern) { this$1.checkPropClash(prop, propHash, refDestructuringErrors); } - node.properties.push(prop); - } - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") -}; - -pp$3.parseProperty = function(isPattern, refDestructuringErrors) { - var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc; - if (this.options.ecmaVersion >= 9 && this.eat(types.ellipsis)) { - if (isPattern) { - prop.argument = this.parseIdent(false); - if (this.type === types.comma) { - this.raise(this.start, "Comma is not permitted after the rest element"); + d.nonBinary.Script_Extensions = d.nonBinary.Script; + + d.nonBinary.gc = d.nonBinary.General_Category; + d.nonBinary.sc = d.nonBinary.Script; + d.nonBinary.scx = d.nonBinary.Script_Extensions; + } + buildUnicodeData(9); + buildUnicodeData(10); + + var pp$8 = Parser.prototype; + + var RegExpValidationState = function RegExpValidationState(parser) { + this.parser = parser; + this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : ""); + this.unicodeProperties = data[parser.options.ecmaVersion >= 10 ? 10 : parser.options.ecmaVersion]; + this.source = ""; + this.flags = ""; + this.start = 0; + this.switchU = false; + this.switchN = false; + this.pos = 0; + this.lastIntValue = 0; + this.lastStringValue = ""; + this.lastAssertionIsQuantifiable = false; + this.numCapturingParens = 0; + this.maxBackReference = 0; + this.groupNames = []; + this.backReferenceNames = []; + }; + + RegExpValidationState.prototype.reset = function reset (start, pattern, flags) { + var unicode = flags.indexOf("u") !== -1; + this.start = start | 0; + this.source = pattern + ""; + this.flags = flags; + this.switchU = unicode && this.parser.options.ecmaVersion >= 6; + this.switchN = unicode && this.parser.options.ecmaVersion >= 9; + }; + + RegExpValidationState.prototype.raise = function raise (message) { + this.parser.raiseRecoverable(this.start, ("Invalid regular expression: /" + (this.source) + "/: " + message)); + }; + + // If u flag is given, this returns the code point at the index (it combines a surrogate pair). + // Otherwise, this returns the code unit of the index (can be a part of a surrogate pair). + RegExpValidationState.prototype.at = function at (i) { + var s = this.source; + var l = s.length; + if (i >= l) { + return -1 + } + var c = s.charCodeAt(i); + if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { + return c + } + return (c << 10) + s.charCodeAt(i + 1) - 0x35FDC00 + }; + + RegExpValidationState.prototype.nextIndex = function nextIndex (i) { + var s = this.source; + var l = s.length; + if (i >= l) { + return l + } + var c = s.charCodeAt(i); + if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { + return i + 1 + } + return i + 2 + }; + + RegExpValidationState.prototype.current = function current () { + return this.at(this.pos) + }; + + RegExpValidationState.prototype.lookahead = function lookahead () { + return this.at(this.nextIndex(this.pos)) + }; + + RegExpValidationState.prototype.advance = function advance () { + this.pos = this.nextIndex(this.pos); + }; + + RegExpValidationState.prototype.eat = function eat (ch) { + if (this.current() === ch) { + this.advance(); + return true + } + return false + }; + + function codePointToString(ch) { + if (ch <= 0xFFFF) { return String.fromCharCode(ch) } + ch -= 0x10000; + return String.fromCharCode((ch >> 10) + 0xD800, (ch & 0x03FF) + 0xDC00) + } + + /** + * Validate the flags part of a given RegExpLiteral. + * + * @param {RegExpValidationState} state The state to validate RegExp. + * @returns {void} + */ + pp$8.validateRegExpFlags = function(state) { + var validFlags = state.validFlags; + var flags = state.flags; + + for (var i = 0; i < flags.length; i++) { + var flag = flags.charAt(i); + if (validFlags.indexOf(flag) === -1) { + this.raise(state.start, "Invalid regular expression flag"); } - return this.finishNode(prop, "RestElement") + if (flags.indexOf(flag, i + 1) > -1) { + this.raise(state.start, "Duplicate regular expression flag"); + } + } + }; + + /** + * Validate the pattern part of a given RegExpLiteral. + * + * @param {RegExpValidationState} state The state to validate RegExp. + * @returns {void} + */ + pp$8.validateRegExpPattern = function(state) { + this.regexp_pattern(state); + + // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of + // parsing contains a |GroupName|, reparse with the goal symbol + // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError* + // exception if _P_ did not conform to the grammar, if any elements of _P_ + // were not matched by the parse, or if any Early Error conditions exist. + if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) { + state.switchN = true; + this.regexp_pattern(state); } - // To disallow parenthesized identifier via `this.toAssignable()`. - if (this.type === types.parenL && refDestructuringErrors) { - if (refDestructuringErrors.parenthesizedAssign < 0) { - refDestructuringErrors.parenthesizedAssign = this.start; + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern + pp$8.regexp_pattern = function(state) { + state.pos = 0; + state.lastIntValue = 0; + state.lastStringValue = ""; + state.lastAssertionIsQuantifiable = false; + state.numCapturingParens = 0; + state.maxBackReference = 0; + state.groupNames.length = 0; + state.backReferenceNames.length = 0; + + this.regexp_disjunction(state); + + if (state.pos !== state.source.length) { + // Make the same messages as V8. + if (state.eat(0x29 /* ) */)) { + state.raise("Unmatched ')'"); } - if (refDestructuringErrors.parenthesizedBind < 0) { - refDestructuringErrors.parenthesizedBind = this.start; + if (state.eat(0x5D /* [ */) || state.eat(0x7D /* } */)) { + state.raise("Lone quantifier brackets"); } } - // Parse argument. - prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); - // To disallow trailing comma via `this.toAssignable()`. - if (this.type === types.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) { - refDestructuringErrors.trailingComma = this.start; + if (state.maxBackReference > state.numCapturingParens) { + state.raise("Invalid escape"); } - // Finish - return this.finishNode(prop, "SpreadElement") - } - if (this.options.ecmaVersion >= 6) { - prop.method = false; - prop.shorthand = false; - if (isPattern || refDestructuringErrors) { - startPos = this.start; - startLoc = this.startLoc; - } - if (!isPattern) - { isGenerator = this.eat(types.star); } - } - var containsEsc = this.containsEsc; - this.parsePropertyName(prop); - if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) { - isAsync = true; - isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); - this.parsePropertyName(prop, refDestructuringErrors); - } else { - isAsync = false; - } - this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc); - return this.finishNode(prop, "Property") -}; - -pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { - if ((isGenerator || isAsync) && this.type === types.colon) - { this.unexpected(); } - - if (this.eat(types.colon)) { - prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); - prop.kind = "init"; - } else if (this.options.ecmaVersion >= 6 && this.type === types.parenL) { - if (isPattern) { this.unexpected(); } - prop.kind = "init"; - prop.method = true; - prop.value = this.parseMethod(isGenerator, isAsync); - } else if (!isPattern && !containsEsc && - this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && - (prop.key.name === "get" || prop.key.name === "set") && - (this.type !== types.comma && this.type !== types.braceR)) { - if (isGenerator || isAsync) { this.unexpected(); } - prop.kind = prop.key.name; - this.parsePropertyName(prop); - prop.value = this.parseMethod(false); - var paramCount = prop.kind === "get" ? 0 : 1; - if (prop.value.params.length !== paramCount) { - var start = prop.value.start; - if (prop.kind === "get") - { this.raiseRecoverable(start, "getter should have no params"); } - else - { this.raiseRecoverable(start, "setter should have exactly one param"); } - } else { - if (prop.kind === "set" && prop.value.params[0].type === "RestElement") - { this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); } - } - } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { - if (isGenerator || isAsync) { this.unexpected(); } - this.checkUnreserved(prop.key); - if (prop.key.name === "await" && !this.awaitIdentPos) - { this.awaitIdentPos = startPos; } - prop.kind = "init"; - if (isPattern) { - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else if (this.type === types.eq && refDestructuringErrors) { - if (refDestructuringErrors.shorthandAssign < 0) - { refDestructuringErrors.shorthandAssign = this.start; } - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else { - prop.value = prop.key; - } - prop.shorthand = true; - } else { this.unexpected(); } -}; - -pp$3.parsePropertyName = function(prop) { - if (this.options.ecmaVersion >= 6) { - if (this.eat(types.bracketL)) { - prop.computed = true; - prop.key = this.parseMaybeAssign(); - this.expect(types.bracketR); - return prop.key - } else { - prop.computed = false; + for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) { + var name = list[i]; + + if (state.groupNames.indexOf(name) === -1) { + state.raise("Invalid named capture referenced"); + } + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction + pp$8.regexp_disjunction = function(state) { + this.regexp_alternative(state); + while (state.eat(0x7C /* | */)) { + this.regexp_alternative(state); } - } - return prop.key = this.type === types.num || this.type === types.string ? this.parseExprAtom() : this.parseIdent(true) -}; - -// Initialize empty function node. - -pp$3.initFunction = function(node) { - node.id = null; - if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; } - if (this.options.ecmaVersion >= 8) { node.async = false; } -}; - -// Parse object or class method. - -pp$3.parseMethod = function(isGenerator, isAsync, allowDirectSuper) { - var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - - this.initFunction(node); - if (this.options.ecmaVersion >= 6) - { node.generator = isGenerator; } - if (this.options.ecmaVersion >= 8) - { node.async = !!isAsync; } - - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); - - this.expect(types.parenL); - node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); - this.checkYieldAwaitInDefaultParams(); - this.parseFunctionBody(node, false, true); - - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, "FunctionExpression") -}; - -// Parse arrow function expression with given parameters. - -pp$3.parseArrowExpression = function(node, params, isAsync) { - var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - - this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW); - this.initFunction(node); - if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } - - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - - node.params = this.toAssignableList(params, true); - this.parseFunctionBody(node, true, false); - - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, "ArrowFunctionExpression") -}; - -// Parse function body and check parameters. - -pp$3.parseFunctionBody = function(node, isArrowFunction, isMethod) { - var isExpression = isArrowFunction && this.type !== types.braceL; - var oldStrict = this.strict, useStrict = false; - - if (isExpression) { - node.body = this.parseMaybeAssign(); - node.expression = true; - this.checkParams(node, false); - } else { - var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params); - if (!oldStrict || nonSimple) { - useStrict = this.strictDirective(this.end); - // If this is a strict mode function, verify that argument names - // are not repeated, and it does not try to bind the words `eval` - // or `arguments`. - if (useStrict && nonSimple) - { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); } - } - // Start a new scope with regard to labels and the `inFunction` - // flag (restore them to their old value afterwards). - var oldLabels = this.labels; - this.labels = []; - if (useStrict) { this.strict = true; } - - // Add the params to varDeclaredNames to ensure that an error is thrown - // if a let/const declaration in the function clashes with one of the params. - this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params)); - node.body = this.parseBlock(false); - node.expression = false; - this.adaptDirectivePrologue(node.body.body); - this.labels = oldLabels; - } - this.exitScope(); - // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval' - if (this.strict && node.id) { this.checkLVal(node.id, BIND_OUTSIDE); } - this.strict = oldStrict; -}; + // Make the same message as V8. + if (this.regexp_eatQuantifier(state, true)) { + state.raise("Nothing to repeat"); + } + if (state.eat(0x7B /* { */)) { + state.raise("Lone quantifier brackets"); + } + }; -pp$3.isSimpleParamList = function(params) { - for (var i = 0, list = params; i < list.length; i += 1) - { - var param = list[i]; + // https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative + pp$8.regexp_alternative = function(state) { + while (state.pos < state.source.length && this.regexp_eatTerm(state)) + { } + }; - if (param.type !== "Identifier") { return false - } } - return true -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term + pp$8.regexp_eatTerm = function(state) { + if (this.regexp_eatAssertion(state)) { + // Handle `QuantifiableAssertion Quantifier` alternative. + // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion + // is a QuantifiableAssertion. + if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) { + // Make the same message as V8. + if (state.switchU) { + state.raise("Invalid quantifier"); + } + } + return true + } -// Checks function params for various disallowed patterns such as using "eval" -// or "arguments" and duplicate parameters. + if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) { + this.regexp_eatQuantifier(state); + return true + } -pp$3.checkParams = function(node, allowDuplicates) { - var this$1 = this; + return false + }; - var nameHash = {}; - for (var i = 0, list = node.params; i < list.length; i += 1) - { - var param = list[i]; + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion + pp$8.regexp_eatAssertion = function(state) { + var start = state.pos; + state.lastAssertionIsQuantifiable = false; - this$1.checkLVal(param, BIND_VAR, allowDuplicates ? null : nameHash); - } -}; - -// Parses a comma-separated list of expressions, and returns them as -// an array. `close` is the token type that ends the list, and -// `allowEmpty` can be turned on to allow subsequent commas with -// nothing in between them to be parsed as `null` (which is needed -// for array literals). - -pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { - var this$1 = this; - - var elts = [], first = true; - while (!this.eat(close)) { - if (!first) { - this$1.expect(types.comma); - if (allowTrailingComma && this$1.afterTrailingComma(close)) { break } - } else { first = false; } - - var elt = (void 0); - if (allowEmpty && this$1.type === types.comma) - { elt = null; } - else if (this$1.type === types.ellipsis) { - elt = this$1.parseSpread(refDestructuringErrors); - if (refDestructuringErrors && this$1.type === types.comma && refDestructuringErrors.trailingComma < 0) - { refDestructuringErrors.trailingComma = this$1.start; } - } else { - elt = this$1.parseMaybeAssign(false, refDestructuringErrors); + // ^, $ + if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) { + return true } - elts.push(elt); - } - return elts -}; - -pp$3.checkUnreserved = function(ref) { - var start = ref.start; - var end = ref.end; - var name = ref.name; - - if (this.inGenerator && name === "yield") - { this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); } - if (this.inAsync && name === "await") - { this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); } - if (this.keywords.test(name)) - { this.raise(start, ("Unexpected keyword '" + name + "'")); } - if (this.options.ecmaVersion < 6 && - this.input.slice(start, end).indexOf("\\") !== -1) { return } - var re = this.strict ? this.reservedWordsStrict : this.reservedWords; - if (re.test(name)) { - if (!this.inAsync && name === "await") - { this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); } - this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); - } -}; - -// Parse the next token as an identifier. If `liberal` is true (used -// when parsing properties), it will also convert keywords into -// identifiers. - -pp$3.parseIdent = function(liberal, isBinding) { - var node = this.startNode(); - if (liberal && this.options.allowReserved === "never") { liberal = false; } - if (this.type === types.name) { - node.name = this.value; - } else if (this.type.keyword) { - node.name = this.type.keyword; - - // To fix https://github.com/acornjs/acorn/issues/575 - // `class` and `function` keywords push new context into this.context. - // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name. - // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword - if ((node.name === "class" || node.name === "function") && - (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) { - this.context.pop(); - } - } else { - this.unexpected(); - } - this.next(); - this.finishNode(node, "Identifier"); - if (!liberal) { - this.checkUnreserved(node); - if (node.name === "await" && !this.awaitIdentPos) - { this.awaitIdentPos = node.start; } - } - return node -}; - -// Parses yield expression inside generator. - -pp$3.parseYield = function(noIn) { - if (!this.yieldPos) { this.yieldPos = this.start; } - - var node = this.startNode(); - this.next(); - if (this.type === types.semi || this.canInsertSemicolon() || (this.type !== types.star && !this.type.startsExpr)) { - node.delegate = false; - node.argument = null; - } else { - node.delegate = this.eat(types.star); - node.argument = this.parseMaybeAssign(noIn); - } - return this.finishNode(node, "YieldExpression") -}; - -pp$3.parseAwait = function() { - if (!this.awaitPos) { this.awaitPos = this.start; } - - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeUnary(null, true); - return this.finishNode(node, "AwaitExpression") -}; - -var pp$4 = Parser.prototype; - -// This function is used to raise exceptions on parse errors. It -// takes an offset integer (into the current `input`) to indicate -// the location of the error, attaches the position to the end -// of the error message, and then raises a `SyntaxError` with that -// message. - -pp$4.raise = function(pos, message) { - var loc = getLineInfo(this.input, pos); - message += " (" + loc.line + ":" + loc.column + ")"; - var err = new SyntaxError(message); - err.pos = pos; err.loc = loc; err.raisedAt = this.pos; - throw err -}; - -pp$4.raiseRecoverable = pp$4.raise; - -pp$4.curPosition = function() { - if (this.options.locations) { - return new Position(this.curLine, this.pos - this.lineStart) - } -}; - -var pp$5 = Parser.prototype; - -var Scope = function Scope(flags) { - this.flags = flags; - // A list of var-declared names in the current lexical scope - this.var = []; - // A list of lexically-declared names in the current lexical scope - this.lexical = []; - // A list of lexically-declared FunctionDeclaration names in the current lexical scope - this.functions = []; -}; - -// The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names. - -pp$5.enterScope = function(flags) { - this.scopeStack.push(new Scope(flags)); -}; - -pp$5.exitScope = function() { - this.scopeStack.pop(); -}; - -// The spec says: -// > At the top level of a function, or script, function declarations are -// > treated like var declarations rather than like lexical declarations. -pp$5.treatFunctionsAsVarInScope = function(scope) { - return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP) -}; - -pp$5.declareName = function(name, bindingType, pos) { - var this$1 = this; - - var redeclared = false; - if (bindingType === BIND_LEXICAL) { - var scope = this.currentScope(); - redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; - scope.lexical.push(name); - if (this.inModule && (scope.flags & SCOPE_TOP)) - { delete this.undefinedExports[name]; } - } else if (bindingType === BIND_SIMPLE_CATCH) { - var scope$1 = this.currentScope(); - scope$1.lexical.push(name); - } else if (bindingType === BIND_FUNCTION) { - var scope$2 = this.currentScope(); - if (this.treatFunctionsAsVar) - { redeclared = scope$2.lexical.indexOf(name) > -1; } - else - { redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; } - scope$2.functions.push(name); - } else { - for (var i = this.scopeStack.length - 1; i >= 0; --i) { - var scope$3 = this$1.scopeStack[i]; - if (scope$3.lexical.indexOf(name) > -1 && !((scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) || - !this$1.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) { - redeclared = true; - break + + // \b \B + if (state.eat(0x5C /* \ */)) { + if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) { + return true } - scope$3.var.push(name); - if (this$1.inModule && (scope$3.flags & SCOPE_TOP)) - { delete this$1.undefinedExports[name]; } - if (scope$3.flags & SCOPE_VAR) { break } + state.pos = start; } - } - if (redeclared) { this.raiseRecoverable(pos, ("Identifier '" + name + "' has already been declared")); } -}; - -pp$5.checkLocalExport = function(id) { - // scope.functions must be empty as Module code is always strict. - if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && - this.scopeStack[0].var.indexOf(id.name) === -1) { - this.undefinedExports[id.name] = id; - } -}; -pp$5.currentScope = function() { - return this.scopeStack[this.scopeStack.length - 1] -}; + // Lookahead / Lookbehind + if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) { + var lookbehind = false; + if (this.options.ecmaVersion >= 9) { + lookbehind = state.eat(0x3C /* < */); + } + if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) { + this.regexp_disjunction(state); + if (!state.eat(0x29 /* ) */)) { + state.raise("Unterminated group"); + } + state.lastAssertionIsQuantifiable = !lookbehind; + return true + } + } -pp$5.currentVarScope = function() { - var this$1 = this; + state.pos = start; + return false + }; - for (var i = this.scopeStack.length - 1;; i--) { - var scope = this$1.scopeStack[i]; - if (scope.flags & SCOPE_VAR) { return scope } - } -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier + pp$8.regexp_eatQuantifier = function(state, noError) { + if ( noError === void 0 ) noError = false; -// Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`. -pp$5.currentThisScope = function() { - var this$1 = this; + if (this.regexp_eatQuantifierPrefix(state, noError)) { + state.eat(0x3F /* ? */); + return true + } + return false + }; - for (var i = this.scopeStack.length - 1;; i--) { - var scope = this$1.scopeStack[i]; - if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope } - } -}; - -var Node = function Node(parser, pos, loc) { - this.type = ""; - this.start = pos; - this.end = 0; - if (parser.options.locations) - { this.loc = new SourceLocation(parser, loc); } - if (parser.options.directSourceFile) - { this.sourceFile = parser.options.directSourceFile; } - if (parser.options.ranges) - { this.range = [pos, 0]; } -}; - -// Start an AST node, attaching a start offset. - -var pp$6 = Parser.prototype; - -pp$6.startNode = function() { - return new Node(this, this.start, this.startLoc) -}; - -pp$6.startNodeAt = function(pos, loc) { - return new Node(this, pos, loc) -}; - -// Finish an AST node, adding `type` and `end` properties. - -function finishNodeAt(node, type, pos, loc) { - node.type = type; - node.end = pos; - if (this.options.locations) - { node.loc.end = loc; } - if (this.options.ranges) - { node.range[1] = pos; } - return node -} - -pp$6.finishNode = function(node, type) { - return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) -}; - -// Finish node at given position - -pp$6.finishNodeAt = function(node, type, pos, loc) { - return finishNodeAt.call(this, node, type, pos, loc) -}; - -// The algorithm used to determine whether a regexp can appear at a -// given point in the program is loosely based on sweet.js' approach. -// See https://github.com/mozilla/sweet.js/wiki/design - -var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) { - this.token = token; - this.isExpr = !!isExpr; - this.preserveSpace = !!preserveSpace; - this.override = override; - this.generator = !!generator; -}; - -var types$1 = { - b_stat: new TokContext("{", false), - b_expr: new TokContext("{", true), - b_tmpl: new TokContext("${", false), - p_stat: new TokContext("(", false), - p_expr: new TokContext("(", true), - q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }), - f_stat: new TokContext("function", false), - f_expr: new TokContext("function", true), - f_expr_gen: new TokContext("function", true, false, null, true), - f_gen: new TokContext("function", false, false, null, true) -}; - -var pp$7 = Parser.prototype; - -pp$7.initialContext = function() { - return [types$1.b_stat] -}; - -pp$7.braceIsBlock = function(prevType) { - var parent = this.curContext(); - if (parent === types$1.f_expr || parent === types$1.f_stat) - { return true } - if (prevType === types.colon && (parent === types$1.b_stat || parent === types$1.b_expr)) - { return !parent.isExpr } - - // The check for `tt.name && exprAllowed` detects whether we are - // after a `yield` or `of` construct. See the `updateContext` for - // `tt.name`. - if (prevType === types._return || prevType === types.name && this.exprAllowed) - { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) } - if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType === types.arrow) - { return true } - if (prevType === types.braceL) - { return parent === types$1.b_stat } - if (prevType === types._var || prevType === types._const || prevType === types.name) - { return false } - return !this.exprAllowed -}; - -pp$7.inGeneratorContext = function() { - var this$1 = this; - - for (var i = this.context.length - 1; i >= 1; i--) { - var context = this$1.context[i]; - if (context.token === "function") - { return context.generator } - } - return false -}; - -pp$7.updateContext = function(prevType) { - var update, type = this.type; - if (type.keyword && prevType === types.dot) - { this.exprAllowed = false; } - else if (update = type.updateContext) - { update.call(this, prevType); } - else - { this.exprAllowed = type.beforeExpr; } -}; - -// Token-specific context update code - -types.parenR.updateContext = types.braceR.updateContext = function() { - if (this.context.length === 1) { - this.exprAllowed = true; - return - } - var out = this.context.pop(); - if (out === types$1.b_stat && this.curContext().token === "function") { - out = this.context.pop(); - } - this.exprAllowed = !out.isExpr; -}; - -types.braceL.updateContext = function(prevType) { - this.context.push(this.braceIsBlock(prevType) ? types$1.b_stat : types$1.b_expr); - this.exprAllowed = true; -}; - -types.dollarBraceL.updateContext = function() { - this.context.push(types$1.b_tmpl); - this.exprAllowed = true; -}; - -types.parenL.updateContext = function(prevType) { - var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; - this.context.push(statementParens ? types$1.p_stat : types$1.p_expr); - this.exprAllowed = true; -}; - -types.incDec.updateContext = function() { - // tokExprAllowed stays unchanged -}; - -types._function.updateContext = types._class.updateContext = function(prevType) { - if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && - !(prevType === types._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && - !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) - { this.context.push(types$1.f_expr); } - else - { this.context.push(types$1.f_stat); } - this.exprAllowed = false; -}; - -types.backQuote.updateContext = function() { - if (this.curContext() === types$1.q_tmpl) - { this.context.pop(); } - else - { this.context.push(types$1.q_tmpl); } - this.exprAllowed = false; -}; - -types.star.updateContext = function(prevType) { - if (prevType === types._function) { - var index = this.context.length - 1; - if (this.context[index] === types$1.f_expr) - { this.context[index] = types$1.f_expr_gen; } - else - { this.context[index] = types$1.f_gen; } - } - this.exprAllowed = true; -}; - -types.name.updateContext = function(prevType) { - var allowed = false; - if (this.options.ecmaVersion >= 6 && prevType !== types.dot) { - if (this.value === "of" && !this.exprAllowed || - this.value === "yield" && this.inGeneratorContext()) - { allowed = true; } - } - this.exprAllowed = allowed; -}; - -// This file contains Unicode properties extracted from the ECMAScript -// specification. The lists are extracted like so: -// $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText) - -// #table-binary-unicode-properties -var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS"; -var unicodeBinaryProperties = { - 9: ecma9BinaryProperties, - 10: ecma9BinaryProperties + " Extended_Pictographic" -}; - -// #table-unicode-general-category-values -var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu"; - -// #table-unicode-script-values -var ecma9ScriptValues = "Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb"; -var unicodeScriptValues = { - 9: ecma9ScriptValues, - 10: ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd" -}; - -var data = {}; -function buildUnicodeData(ecmaVersion) { - var d = data[ecmaVersion] = { - binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues), - nonBinary: { - General_Category: wordsRegexp(unicodeGeneralCategoryValues), - Script: wordsRegexp(unicodeScriptValues[ecmaVersion]) - } - }; - d.nonBinary.Script_Extensions = d.nonBinary.Script; - - d.nonBinary.gc = d.nonBinary.General_Category; - d.nonBinary.sc = d.nonBinary.Script; - d.nonBinary.scx = d.nonBinary.Script_Extensions; -} -buildUnicodeData(9); -buildUnicodeData(10); - -var pp$9 = Parser.prototype; - -var RegExpValidationState = function RegExpValidationState(parser) { - this.parser = parser; - this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : ""); - this.unicodeProperties = data[parser.options.ecmaVersion >= 10 ? 10 : parser.options.ecmaVersion]; - this.source = ""; - this.flags = ""; - this.start = 0; - this.switchU = false; - this.switchN = false; - this.pos = 0; - this.lastIntValue = 0; - this.lastStringValue = ""; - this.lastAssertionIsQuantifiable = false; - this.numCapturingParens = 0; - this.maxBackReference = 0; - this.groupNames = []; - this.backReferenceNames = []; -}; - -RegExpValidationState.prototype.reset = function reset (start, pattern, flags) { - var unicode = flags.indexOf("u") !== -1; - this.start = start | 0; - this.source = pattern + ""; - this.flags = flags; - this.switchU = unicode && this.parser.options.ecmaVersion >= 6; - this.switchN = unicode && this.parser.options.ecmaVersion >= 9; -}; - -RegExpValidationState.prototype.raise = function raise (message) { - this.parser.raiseRecoverable(this.start, ("Invalid regular expression: /" + (this.source) + "/: " + message)); -}; - -// If u flag is given, this returns the code point at the index (it combines a surrogate pair). -// Otherwise, this returns the code unit of the index (can be a part of a surrogate pair). -RegExpValidationState.prototype.at = function at (i) { - var s = this.source; - var l = s.length; - if (i >= l) { - return -1 - } - var c = s.charCodeAt(i); - if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { - return c - } - return (c << 10) + s.charCodeAt(i + 1) - 0x35FDC00 -}; - -RegExpValidationState.prototype.nextIndex = function nextIndex (i) { - var s = this.source; - var l = s.length; - if (i >= l) { - return l - } - var c = s.charCodeAt(i); - if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { - return i + 1 - } - return i + 2 -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix + pp$8.regexp_eatQuantifierPrefix = function(state, noError) { + return ( + state.eat(0x2A /* * */) || + state.eat(0x2B /* + */) || + state.eat(0x3F /* ? */) || + this.regexp_eatBracedQuantifier(state, noError) + ) + }; + pp$8.regexp_eatBracedQuantifier = function(state, noError) { + var start = state.pos; + if (state.eat(0x7B /* { */)) { + var min = 0, max = -1; + if (this.regexp_eatDecimalDigits(state)) { + min = state.lastIntValue; + if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) { + max = state.lastIntValue; + } + if (state.eat(0x7D /* } */)) { + // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term + if (max !== -1 && max < min && !noError) { + state.raise("numbers out of order in {} quantifier"); + } + return true + } + } + if (state.switchU && !noError) { + state.raise("Incomplete quantifier"); + } + state.pos = start; + } + return false + }; -RegExpValidationState.prototype.current = function current () { - return this.at(this.pos) -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-Atom + pp$8.regexp_eatAtom = function(state) { + return ( + this.regexp_eatPatternCharacters(state) || + state.eat(0x2E /* . */) || + this.regexp_eatReverseSolidusAtomEscape(state) || + this.regexp_eatCharacterClass(state) || + this.regexp_eatUncapturingGroup(state) || + this.regexp_eatCapturingGroup(state) + ) + }; + pp$8.regexp_eatReverseSolidusAtomEscape = function(state) { + var start = state.pos; + if (state.eat(0x5C /* \ */)) { + if (this.regexp_eatAtomEscape(state)) { + return true + } + state.pos = start; + } + return false + }; + pp$8.regexp_eatUncapturingGroup = function(state) { + var start = state.pos; + if (state.eat(0x28 /* ( */)) { + if (state.eat(0x3F /* ? */) && state.eat(0x3A /* : */)) { + this.regexp_disjunction(state); + if (state.eat(0x29 /* ) */)) { + return true + } + state.raise("Unterminated group"); + } + state.pos = start; + } + return false + }; + pp$8.regexp_eatCapturingGroup = function(state) { + if (state.eat(0x28 /* ( */)) { + if (this.options.ecmaVersion >= 9) { + this.regexp_groupSpecifier(state); + } else if (state.current() === 0x3F /* ? */) { + state.raise("Invalid group"); + } + this.regexp_disjunction(state); + if (state.eat(0x29 /* ) */)) { + state.numCapturingParens += 1; + return true + } + state.raise("Unterminated group"); + } + return false + }; -RegExpValidationState.prototype.lookahead = function lookahead () { - return this.at(this.nextIndex(this.pos)) -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom + pp$8.regexp_eatExtendedAtom = function(state) { + return ( + state.eat(0x2E /* . */) || + this.regexp_eatReverseSolidusAtomEscape(state) || + this.regexp_eatCharacterClass(state) || + this.regexp_eatUncapturingGroup(state) || + this.regexp_eatCapturingGroup(state) || + this.regexp_eatInvalidBracedQuantifier(state) || + this.regexp_eatExtendedPatternCharacter(state) + ) + }; -RegExpValidationState.prototype.advance = function advance () { - this.pos = this.nextIndex(this.pos); -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier + pp$8.regexp_eatInvalidBracedQuantifier = function(state) { + if (this.regexp_eatBracedQuantifier(state, true)) { + state.raise("Nothing to repeat"); + } + return false + }; -RegExpValidationState.prototype.eat = function eat (ch) { - if (this.current() === ch) { - this.advance(); - return true - } - return false -}; - -function codePointToString$1(ch) { - if (ch <= 0xFFFF) { return String.fromCharCode(ch) } - ch -= 0x10000; - return String.fromCharCode((ch >> 10) + 0xD800, (ch & 0x03FF) + 0xDC00) -} - -/** - * Validate the flags part of a given RegExpLiteral. - * - * @param {RegExpValidationState} state The state to validate RegExp. - * @returns {void} - */ -pp$9.validateRegExpFlags = function(state) { - var this$1 = this; - - var validFlags = state.validFlags; - var flags = state.flags; - - for (var i = 0; i < flags.length; i++) { - var flag = flags.charAt(i); - if (validFlags.indexOf(flag) === -1) { - this$1.raise(state.start, "Invalid regular expression flag"); - } - if (flags.indexOf(flag, i + 1) > -1) { - this$1.raise(state.start, "Duplicate regular expression flag"); + // https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter + pp$8.regexp_eatSyntaxCharacter = function(state) { + var ch = state.current(); + if (isSyntaxCharacter(ch)) { + state.lastIntValue = ch; + state.advance(); + return true } - } -}; - -/** - * Validate the pattern part of a given RegExpLiteral. - * - * @param {RegExpValidationState} state The state to validate RegExp. - * @returns {void} - */ -pp$9.validateRegExpPattern = function(state) { - this.regexp_pattern(state); - - // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of - // parsing contains a |GroupName|, reparse with the goal symbol - // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError* - // exception if _P_ did not conform to the grammar, if any elements of _P_ - // were not matched by the parse, or if any Early Error conditions exist. - if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) { - state.switchN = true; - this.regexp_pattern(state); - } -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern -pp$9.regexp_pattern = function(state) { - state.pos = 0; - state.lastIntValue = 0; - state.lastStringValue = ""; - state.lastAssertionIsQuantifiable = false; - state.numCapturingParens = 0; - state.maxBackReference = 0; - state.groupNames.length = 0; - state.backReferenceNames.length = 0; - - this.regexp_disjunction(state); - - if (state.pos !== state.source.length) { - // Make the same messages as V8. - if (state.eat(0x29 /* ) */)) { - state.raise("Unmatched ')'"); - } - if (state.eat(0x5D /* [ */) || state.eat(0x7D /* } */)) { - state.raise("Lone quantifier brackets"); + return false + }; + function isSyntaxCharacter(ch) { + return ( + ch === 0x24 /* $ */ || + ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ || + ch === 0x2E /* . */ || + ch === 0x3F /* ? */ || + ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ || + ch >= 0x7B /* { */ && ch <= 0x7D /* } */ + ) + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter + // But eat eager. + pp$8.regexp_eatPatternCharacters = function(state) { + var start = state.pos; + var ch = 0; + while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) { + state.advance(); } - } - if (state.maxBackReference > state.numCapturingParens) { - state.raise("Invalid escape"); - } - for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) { - var name = list[i]; + return state.pos !== start + }; - if (state.groupNames.indexOf(name) === -1) { - state.raise("Invalid named capture referenced"); + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter + pp$8.regexp_eatExtendedPatternCharacter = function(state) { + var ch = state.current(); + if ( + ch !== -1 && + ch !== 0x24 /* $ */ && + !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) && + ch !== 0x2E /* . */ && + ch !== 0x3F /* ? */ && + ch !== 0x5B /* [ */ && + ch !== 0x5E /* ^ */ && + ch !== 0x7C /* | */ + ) { + state.advance(); + return true } - } -}; + return false + }; -// https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction -pp$9.regexp_disjunction = function(state) { - var this$1 = this; + // GroupSpecifier[U] :: + // [empty] + // `?` GroupName[?U] + pp$8.regexp_groupSpecifier = function(state) { + if (state.eat(0x3F /* ? */)) { + if (this.regexp_eatGroupName(state)) { + if (state.groupNames.indexOf(state.lastStringValue) !== -1) { + state.raise("Duplicate capture group name"); + } + state.groupNames.push(state.lastStringValue); + return + } + state.raise("Invalid group"); + } + }; - this.regexp_alternative(state); - while (state.eat(0x7C /* | */)) { - this$1.regexp_alternative(state); - } + // GroupName[U] :: + // `<` RegExpIdentifierName[?U] `>` + // Note: this updates `state.lastStringValue` property with the eaten name. + pp$8.regexp_eatGroupName = function(state) { + state.lastStringValue = ""; + if (state.eat(0x3C /* < */)) { + if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) { + return true + } + state.raise("Invalid capture group name"); + } + return false + }; - // Make the same message as V8. - if (this.regexp_eatQuantifier(state, true)) { - state.raise("Nothing to repeat"); - } - if (state.eat(0x7B /* { */)) { - state.raise("Lone quantifier brackets"); - } -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative -pp$9.regexp_alternative = function(state) { - while (state.pos < state.source.length && this.regexp_eatTerm(state)) - { } -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term -pp$9.regexp_eatTerm = function(state) { - if (this.regexp_eatAssertion(state)) { - // Handle `QuantifiableAssertion Quantifier` alternative. - // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion - // is a QuantifiableAssertion. - if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) { - // Make the same message as V8. - if (state.switchU) { - state.raise("Invalid quantifier"); + // RegExpIdentifierName[U] :: + // RegExpIdentifierStart[?U] + // RegExpIdentifierName[?U] RegExpIdentifierPart[?U] + // Note: this updates `state.lastStringValue` property with the eaten name. + pp$8.regexp_eatRegExpIdentifierName = function(state) { + state.lastStringValue = ""; + if (this.regexp_eatRegExpIdentifierStart(state)) { + state.lastStringValue += codePointToString(state.lastIntValue); + while (this.regexp_eatRegExpIdentifierPart(state)) { + state.lastStringValue += codePointToString(state.lastIntValue); } + return true } - return true - } + return false + }; - if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) { - this.regexp_eatQuantifier(state); - return true - } + // RegExpIdentifierStart[U] :: + // UnicodeIDStart + // `$` + // `_` + // `\` RegExpUnicodeEscapeSequence[?U] + pp$8.regexp_eatRegExpIdentifierStart = function(state) { + var start = state.pos; + var ch = state.current(); + state.advance(); + + if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { + ch = state.lastIntValue; + } + if (isRegExpIdentifierStart(ch)) { + state.lastIntValue = ch; + return true + } - return false -}; + state.pos = start; + return false + }; + function isRegExpIdentifierStart(ch) { + return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ + } + + // RegExpIdentifierPart[U] :: + // UnicodeIDContinue + // `$` + // `_` + // `\` RegExpUnicodeEscapeSequence[?U] + // + // + pp$8.regexp_eatRegExpIdentifierPart = function(state) { + var start = state.pos; + var ch = state.current(); + state.advance(); -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion -pp$9.regexp_eatAssertion = function(state) { - var start = state.pos; - state.lastAssertionIsQuantifiable = false; + if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { + ch = state.lastIntValue; + } + if (isRegExpIdentifierPart(ch)) { + state.lastIntValue = ch; + return true + } - // ^, $ - if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) { - return true + state.pos = start; + return false + }; + function isRegExpIdentifierPart(ch) { + return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D /* */ } - // \b \B - if (state.eat(0x5C /* \ */)) { - if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) { + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape + pp$8.regexp_eatAtomEscape = function(state) { + if ( + this.regexp_eatBackReference(state) || + this.regexp_eatCharacterClassEscape(state) || + this.regexp_eatCharacterEscape(state) || + (state.switchN && this.regexp_eatKGroupName(state)) + ) { return true } - state.pos = start; - } - - // Lookahead / Lookbehind - if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) { - var lookbehind = false; - if (this.options.ecmaVersion >= 9) { - lookbehind = state.eat(0x3C /* < */); + if (state.switchU) { + // Make the same message as V8. + if (state.current() === 0x63 /* c */) { + state.raise("Invalid unicode escape"); + } + state.raise("Invalid escape"); } - if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) { - this.regexp_disjunction(state); - if (!state.eat(0x29 /* ) */)) { - state.raise("Unterminated group"); + return false + }; + pp$8.regexp_eatBackReference = function(state) { + var start = state.pos; + if (this.regexp_eatDecimalEscape(state)) { + var n = state.lastIntValue; + if (state.switchU) { + // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape + if (n > state.maxBackReference) { + state.maxBackReference = n; + } + return true } - state.lastAssertionIsQuantifiable = !lookbehind; - return true + if (n <= state.numCapturingParens) { + return true + } + state.pos = start; } - } - - state.pos = start; - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier -pp$9.regexp_eatQuantifier = function(state, noError) { - if ( noError === void 0 ) noError = false; - - if (this.regexp_eatQuantifierPrefix(state, noError)) { - state.eat(0x3F /* ? */); - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix -pp$9.regexp_eatQuantifierPrefix = function(state, noError) { - return ( - state.eat(0x2A /* * */) || - state.eat(0x2B /* + */) || - state.eat(0x3F /* ? */) || - this.regexp_eatBracedQuantifier(state, noError) - ) -}; -pp$9.regexp_eatBracedQuantifier = function(state, noError) { - var start = state.pos; - if (state.eat(0x7B /* { */)) { - var min = 0, max = -1; - if (this.regexp_eatDecimalDigits(state)) { - min = state.lastIntValue; - if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) { - max = state.lastIntValue; + return false + }; + pp$8.regexp_eatKGroupName = function(state) { + if (state.eat(0x6B /* k */)) { + if (this.regexp_eatGroupName(state)) { + state.backReferenceNames.push(state.lastStringValue); + return true } - if (state.eat(0x7D /* } */)) { - // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term - if (max !== -1 && max < min && !noError) { - state.raise("numbers out of order in {} quantifier"); - } + state.raise("Invalid named reference"); + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape + pp$8.regexp_eatCharacterEscape = function(state) { + return ( + this.regexp_eatControlEscape(state) || + this.regexp_eatCControlLetter(state) || + this.regexp_eatZero(state) || + this.regexp_eatHexEscapeSequence(state) || + this.regexp_eatRegExpUnicodeEscapeSequence(state) || + (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) || + this.regexp_eatIdentityEscape(state) + ) + }; + pp$8.regexp_eatCControlLetter = function(state) { + var start = state.pos; + if (state.eat(0x63 /* c */)) { + if (this.regexp_eatControlLetter(state)) { return true } + state.pos = start; } - if (state.switchU && !noError) { - state.raise("Incomplete quantifier"); + return false + }; + pp$8.regexp_eatZero = function(state) { + if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) { + state.lastIntValue = 0; + state.advance(); + return true } - state.pos = start; - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Atom -pp$9.regexp_eatAtom = function(state) { - return ( - this.regexp_eatPatternCharacters(state) || - state.eat(0x2E /* . */) || - this.regexp_eatReverseSolidusAtomEscape(state) || - this.regexp_eatCharacterClass(state) || - this.regexp_eatUncapturingGroup(state) || - this.regexp_eatCapturingGroup(state) - ) -}; -pp$9.regexp_eatReverseSolidusAtomEscape = function(state) { - var start = state.pos; - if (state.eat(0x5C /* \ */)) { - if (this.regexp_eatAtomEscape(state)) { + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape + pp$8.regexp_eatControlEscape = function(state) { + var ch = state.current(); + if (ch === 0x74 /* t */) { + state.lastIntValue = 0x09; /* \t */ + state.advance(); return true } - state.pos = start; - } - return false -}; -pp$9.regexp_eatUncapturingGroup = function(state) { - var start = state.pos; - if (state.eat(0x28 /* ( */)) { - if (state.eat(0x3F /* ? */) && state.eat(0x3A /* : */)) { - this.regexp_disjunction(state); - if (state.eat(0x29 /* ) */)) { - return true - } - state.raise("Unterminated group"); + if (ch === 0x6E /* n */) { + state.lastIntValue = 0x0A; /* \n */ + state.advance(); + return true } - state.pos = start; - } - return false -}; -pp$9.regexp_eatCapturingGroup = function(state) { - if (state.eat(0x28 /* ( */)) { - if (this.options.ecmaVersion >= 9) { - this.regexp_groupSpecifier(state); - } else if (state.current() === 0x3F /* ? */) { - state.raise("Invalid group"); + if (ch === 0x76 /* v */) { + state.lastIntValue = 0x0B; /* \v */ + state.advance(); + return true } - this.regexp_disjunction(state); - if (state.eat(0x29 /* ) */)) { - state.numCapturingParens += 1; + if (ch === 0x66 /* f */) { + state.lastIntValue = 0x0C; /* \f */ + state.advance(); return true } - state.raise("Unterminated group"); - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom -pp$9.regexp_eatExtendedAtom = function(state) { - return ( - state.eat(0x2E /* . */) || - this.regexp_eatReverseSolidusAtomEscape(state) || - this.regexp_eatCharacterClass(state) || - this.regexp_eatUncapturingGroup(state) || - this.regexp_eatCapturingGroup(state) || - this.regexp_eatInvalidBracedQuantifier(state) || - this.regexp_eatExtendedPatternCharacter(state) - ) -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier -pp$9.regexp_eatInvalidBracedQuantifier = function(state) { - if (this.regexp_eatBracedQuantifier(state, true)) { - state.raise("Nothing to repeat"); - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter -pp$9.regexp_eatSyntaxCharacter = function(state) { - var ch = state.current(); - if (isSyntaxCharacter(ch)) { - state.lastIntValue = ch; - state.advance(); - return true - } - return false -}; -function isSyntaxCharacter(ch) { - return ( - ch === 0x24 /* $ */ || - ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ || - ch === 0x2E /* . */ || - ch === 0x3F /* ? */ || - ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ || - ch >= 0x7B /* { */ && ch <= 0x7D /* } */ - ) -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter -// But eat eager. -pp$9.regexp_eatPatternCharacters = function(state) { - var start = state.pos; - var ch = 0; - while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) { - state.advance(); - } - return state.pos !== start -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter -pp$9.regexp_eatExtendedPatternCharacter = function(state) { - var ch = state.current(); - if ( - ch !== -1 && - ch !== 0x24 /* $ */ && - !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) && - ch !== 0x2E /* . */ && - ch !== 0x3F /* ? */ && - ch !== 0x5B /* [ */ && - ch !== 0x5E /* ^ */ && - ch !== 0x7C /* | */ - ) { - state.advance(); - return true - } - return false -}; - -// GroupSpecifier[U] :: -// [empty] -// `?` GroupName[?U] -pp$9.regexp_groupSpecifier = function(state) { - if (state.eat(0x3F /* ? */)) { - if (this.regexp_eatGroupName(state)) { - if (state.groupNames.indexOf(state.lastStringValue) !== -1) { - state.raise("Duplicate capture group name"); - } - state.groupNames.push(state.lastStringValue); - return + if (ch === 0x72 /* r */) { + state.lastIntValue = 0x0D; /* \r */ + state.advance(); + return true } - state.raise("Invalid group"); - } -}; - -// GroupName[U] :: -// `<` RegExpIdentifierName[?U] `>` -// Note: this updates `state.lastStringValue` property with the eaten name. -pp$9.regexp_eatGroupName = function(state) { - state.lastStringValue = ""; - if (state.eat(0x3C /* < */)) { - if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) { + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter + pp$8.regexp_eatControlLetter = function(state) { + var ch = state.current(); + if (isControlLetter(ch)) { + state.lastIntValue = ch % 0x20; + state.advance(); return true } - state.raise("Invalid capture group name"); - } - return false -}; - -// RegExpIdentifierName[U] :: -// RegExpIdentifierStart[?U] -// RegExpIdentifierName[?U] RegExpIdentifierPart[?U] -// Note: this updates `state.lastStringValue` property with the eaten name. -pp$9.regexp_eatRegExpIdentifierName = function(state) { - state.lastStringValue = ""; - if (this.regexp_eatRegExpIdentifierStart(state)) { - state.lastStringValue += codePointToString$1(state.lastIntValue); - while (this.regexp_eatRegExpIdentifierPart(state)) { - state.lastStringValue += codePointToString$1(state.lastIntValue); + return false + }; + function isControlLetter(ch) { + return ( + (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) || + (ch >= 0x61 /* a */ && ch <= 0x7A /* z */) + ) + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence + pp$8.regexp_eatRegExpUnicodeEscapeSequence = function(state) { + var start = state.pos; + + if (state.eat(0x75 /* u */)) { + if (this.regexp_eatFixedHexDigits(state, 4)) { + var lead = state.lastIntValue; + if (state.switchU && lead >= 0xD800 && lead <= 0xDBFF) { + var leadSurrogateEnd = state.pos; + if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) { + var trail = state.lastIntValue; + if (trail >= 0xDC00 && trail <= 0xDFFF) { + state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + return true + } + } + state.pos = leadSurrogateEnd; + state.lastIntValue = lead; + } + return true + } + if ( + state.switchU && + state.eat(0x7B /* { */) && + this.regexp_eatHexDigits(state) && + state.eat(0x7D /* } */) && + isValidUnicode(state.lastIntValue) + ) { + return true + } + if (state.switchU) { + state.raise("Invalid unicode escape"); + } + state.pos = start; } - return true - } - return false -}; - -// RegExpIdentifierStart[U] :: -// UnicodeIDStart -// `$` -// `_` -// `\` RegExpUnicodeEscapeSequence[?U] -pp$9.regexp_eatRegExpIdentifierStart = function(state) { - var start = state.pos; - var ch = state.current(); - state.advance(); - - if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { - ch = state.lastIntValue; - } - if (isRegExpIdentifierStart(ch)) { - state.lastIntValue = ch; - return true - } - state.pos = start; - return false -}; -function isRegExpIdentifierStart(ch) { - return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ -} - -// RegExpIdentifierPart[U] :: -// UnicodeIDContinue -// `$` -// `_` -// `\` RegExpUnicodeEscapeSequence[?U] -// -// -pp$9.regexp_eatRegExpIdentifierPart = function(state) { - var start = state.pos; - var ch = state.current(); - state.advance(); - - if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { - ch = state.lastIntValue; - } - if (isRegExpIdentifierPart(ch)) { - state.lastIntValue = ch; - return true + return false + }; + function isValidUnicode(ch) { + return ch >= 0 && ch <= 0x10FFFF } - state.pos = start; - return false -}; -function isRegExpIdentifierPart(ch) { - return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D /* */ -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape -pp$9.regexp_eatAtomEscape = function(state) { - if ( - this.regexp_eatBackReference(state) || - this.regexp_eatCharacterClassEscape(state) || - this.regexp_eatCharacterEscape(state) || - (state.switchN && this.regexp_eatKGroupName(state)) - ) { - return true - } - if (state.switchU) { - // Make the same message as V8. - if (state.current() === 0x63 /* c */) { - state.raise("Invalid unicode escape"); - } - state.raise("Invalid escape"); - } - return false -}; -pp$9.regexp_eatBackReference = function(state) { - var start = state.pos; - if (this.regexp_eatDecimalEscape(state)) { - var n = state.lastIntValue; + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape + pp$8.regexp_eatIdentityEscape = function(state) { if (state.switchU) { - // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape - if (n > state.maxBackReference) { - state.maxBackReference = n; + if (this.regexp_eatSyntaxCharacter(state)) { + return true } - return true - } - if (n <= state.numCapturingParens) { - return true + if (state.eat(0x2F /* / */)) { + state.lastIntValue = 0x2F; /* / */ + return true + } + return false } - state.pos = start; - } - return false -}; -pp$9.regexp_eatKGroupName = function(state) { - if (state.eat(0x6B /* k */)) { - if (this.regexp_eatGroupName(state)) { - state.backReferenceNames.push(state.lastStringValue); + + var ch = state.current(); + if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) { + state.lastIntValue = ch; + state.advance(); return true } - state.raise("Invalid named reference"); - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape -pp$9.regexp_eatCharacterEscape = function(state) { - return ( - this.regexp_eatControlEscape(state) || - this.regexp_eatCControlLetter(state) || - this.regexp_eatZero(state) || - this.regexp_eatHexEscapeSequence(state) || - this.regexp_eatRegExpUnicodeEscapeSequence(state) || - (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) || - this.regexp_eatIdentityEscape(state) - ) -}; -pp$9.regexp_eatCControlLetter = function(state) { - var start = state.pos; - if (state.eat(0x63 /* c */)) { - if (this.regexp_eatControlLetter(state)) { + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape + pp$8.regexp_eatDecimalEscape = function(state) { + state.lastIntValue = 0; + var ch = state.current(); + if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) { + do { + state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + state.advance(); + } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) return true } - state.pos = start; - } - return false -}; -pp$9.regexp_eatZero = function(state) { - if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) { - state.lastIntValue = 0; - state.advance(); - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape -pp$9.regexp_eatControlEscape = function(state) { - var ch = state.current(); - if (ch === 0x74 /* t */) { - state.lastIntValue = 0x09; /* \t */ - state.advance(); - return true - } - if (ch === 0x6E /* n */) { - state.lastIntValue = 0x0A; /* \n */ - state.advance(); - return true - } - if (ch === 0x76 /* v */) { - state.lastIntValue = 0x0B; /* \v */ - state.advance(); - return true - } - if (ch === 0x66 /* f */) { - state.lastIntValue = 0x0C; /* \f */ - state.advance(); - return true - } - if (ch === 0x72 /* r */) { - state.lastIntValue = 0x0D; /* \r */ - state.advance(); - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter -pp$9.regexp_eatControlLetter = function(state) { - var ch = state.current(); - if (isControlLetter(ch)) { - state.lastIntValue = ch % 0x20; - state.advance(); - return true - } - return false -}; -function isControlLetter(ch) { - return ( - (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) || - (ch >= 0x61 /* a */ && ch <= 0x7A /* z */) - ) -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence -pp$9.regexp_eatRegExpUnicodeEscapeSequence = function(state) { - var start = state.pos; - - if (state.eat(0x75 /* u */)) { - if (this.regexp_eatFixedHexDigits(state, 4)) { - var lead = state.lastIntValue; - if (state.switchU && lead >= 0xD800 && lead <= 0xDBFF) { - var leadSurrogateEnd = state.pos; - if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) { - var trail = state.lastIntValue; - if (trail >= 0xDC00 && trail <= 0xDFFF) { - state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; - return true - } - } - state.pos = leadSurrogateEnd; - state.lastIntValue = lead; - } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape + pp$8.regexp_eatCharacterClassEscape = function(state) { + var ch = state.current(); + + if (isCharacterClassEscape(ch)) { + state.lastIntValue = -1; + state.advance(); return true } + if ( state.switchU && - state.eat(0x7B /* { */) && - this.regexp_eatHexDigits(state) && - state.eat(0x7D /* } */) && - isValidUnicode(state.lastIntValue) + this.options.ecmaVersion >= 9 && + (ch === 0x50 /* P */ || ch === 0x70 /* p */) ) { - return true + state.lastIntValue = -1; + state.advance(); + if ( + state.eat(0x7B /* { */) && + this.regexp_eatUnicodePropertyValueExpression(state) && + state.eat(0x7D /* } */) + ) { + return true + } + state.raise("Invalid property name"); } - if (state.switchU) { - state.raise("Invalid unicode escape"); + + return false + }; + function isCharacterClassEscape(ch) { + return ( + ch === 0x64 /* d */ || + ch === 0x44 /* D */ || + ch === 0x73 /* s */ || + ch === 0x53 /* S */ || + ch === 0x77 /* w */ || + ch === 0x57 /* W */ + ) + } + + // UnicodePropertyValueExpression :: + // UnicodePropertyName `=` UnicodePropertyValue + // LoneUnicodePropertyNameOrValue + pp$8.regexp_eatUnicodePropertyValueExpression = function(state) { + var start = state.pos; + + // UnicodePropertyName `=` UnicodePropertyValue + if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) { + var name = state.lastStringValue; + if (this.regexp_eatUnicodePropertyValue(state)) { + var value = state.lastStringValue; + this.regexp_validateUnicodePropertyNameAndValue(state, name, value); + return true + } } state.pos = start; - } - return false -}; -function isValidUnicode(ch) { - return ch >= 0 && ch <= 0x10FFFF -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape -pp$9.regexp_eatIdentityEscape = function(state) { - if (state.switchU) { - if (this.regexp_eatSyntaxCharacter(state)) { - return true - } - if (state.eat(0x2F /* / */)) { - state.lastIntValue = 0x2F; /* / */ + // LoneUnicodePropertyNameOrValue + if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) { + var nameOrValue = state.lastStringValue; + this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue); return true } return false - } + }; + pp$8.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) { + if (!has(state.unicodeProperties.nonBinary, name)) + { state.raise("Invalid property name"); } + if (!state.unicodeProperties.nonBinary[name].test(value)) + { state.raise("Invalid property value"); } + }; + pp$8.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) { + if (!state.unicodeProperties.binary.test(nameOrValue)) + { state.raise("Invalid property name"); } + }; - var ch = state.current(); - if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) { - state.lastIntValue = ch; - state.advance(); - return true + // UnicodePropertyName :: + // UnicodePropertyNameCharacters + pp$8.regexp_eatUnicodePropertyName = function(state) { + var ch = 0; + state.lastStringValue = ""; + while (isUnicodePropertyNameCharacter(ch = state.current())) { + state.lastStringValue += codePointToString(ch); + state.advance(); + } + return state.lastStringValue !== "" + }; + function isUnicodePropertyNameCharacter(ch) { + return isControlLetter(ch) || ch === 0x5F /* _ */ } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape -pp$9.regexp_eatDecimalEscape = function(state) { - state.lastIntValue = 0; - var ch = state.current(); - if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) { - do { - state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + // UnicodePropertyValue :: + // UnicodePropertyValueCharacters + pp$8.regexp_eatUnicodePropertyValue = function(state) { + var ch = 0; + state.lastStringValue = ""; + while (isUnicodePropertyValueCharacter(ch = state.current())) { + state.lastStringValue += codePointToString(ch); state.advance(); - } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) - return true + } + return state.lastStringValue !== "" + }; + function isUnicodePropertyValueCharacter(ch) { + return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch) } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape -pp$9.regexp_eatCharacterClassEscape = function(state) { - var ch = state.current(); - if (isCharacterClassEscape(ch)) { - state.lastIntValue = -1; - state.advance(); - return true - } + // LoneUnicodePropertyNameOrValue :: + // UnicodePropertyValueCharacters + pp$8.regexp_eatLoneUnicodePropertyNameOrValue = function(state) { + return this.regexp_eatUnicodePropertyValue(state) + }; - if ( - state.switchU && - this.options.ecmaVersion >= 9 && - (ch === 0x50 /* P */ || ch === 0x70 /* p */) - ) { - state.lastIntValue = -1; - state.advance(); - if ( - state.eat(0x7B /* { */) && - this.regexp_eatUnicodePropertyValueExpression(state) && - state.eat(0x7D /* } */) - ) { - return true + // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass + pp$8.regexp_eatCharacterClass = function(state) { + if (state.eat(0x5B /* [ */)) { + state.eat(0x5E /* ^ */); + this.regexp_classRanges(state); + if (state.eat(0x5D /* [ */)) { + return true + } + // Unreachable since it threw "unterminated regular expression" error before. + state.raise("Unterminated character class"); } - state.raise("Invalid property name"); - } + return false + }; - return false -}; -function isCharacterClassEscape(ch) { - return ( - ch === 0x64 /* d */ || - ch === 0x44 /* D */ || - ch === 0x73 /* s */ || - ch === 0x53 /* S */ || - ch === 0x77 /* w */ || - ch === 0x57 /* W */ - ) -} - -// UnicodePropertyValueExpression :: -// UnicodePropertyName `=` UnicodePropertyValue -// LoneUnicodePropertyNameOrValue -pp$9.regexp_eatUnicodePropertyValueExpression = function(state) { - var start = state.pos; - - // UnicodePropertyName `=` UnicodePropertyValue - if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) { - var name = state.lastStringValue; - if (this.regexp_eatUnicodePropertyValue(state)) { - var value = state.lastStringValue; - this.regexp_validateUnicodePropertyNameAndValue(state, name, value); - return true + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges + // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges + // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash + pp$8.regexp_classRanges = function(state) { + while (this.regexp_eatClassAtom(state)) { + var left = state.lastIntValue; + if (state.eat(0x2D /* - */) && this.regexp_eatClassAtom(state)) { + var right = state.lastIntValue; + if (state.switchU && (left === -1 || right === -1)) { + state.raise("Invalid character class"); + } + if (left !== -1 && right !== -1 && left > right) { + state.raise("Range out of order in character class"); + } + } } - } - state.pos = start; + }; - // LoneUnicodePropertyNameOrValue - if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) { - var nameOrValue = state.lastStringValue; - this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue); - return true - } - return false -}; -pp$9.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) { - if (!has(state.unicodeProperties.nonBinary, name)) - { state.raise("Invalid property name"); } - if (!state.unicodeProperties.nonBinary[name].test(value)) - { state.raise("Invalid property value"); } -}; -pp$9.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) { - if (!state.unicodeProperties.binary.test(nameOrValue)) - { state.raise("Invalid property name"); } -}; - -// UnicodePropertyName :: -// UnicodePropertyNameCharacters -pp$9.regexp_eatUnicodePropertyName = function(state) { - var ch = 0; - state.lastStringValue = ""; - while (isUnicodePropertyNameCharacter(ch = state.current())) { - state.lastStringValue += codePointToString$1(ch); - state.advance(); - } - return state.lastStringValue !== "" -}; -function isUnicodePropertyNameCharacter(ch) { - return isControlLetter(ch) || ch === 0x5F /* _ */ -} - -// UnicodePropertyValue :: -// UnicodePropertyValueCharacters -pp$9.regexp_eatUnicodePropertyValue = function(state) { - var ch = 0; - state.lastStringValue = ""; - while (isUnicodePropertyValueCharacter(ch = state.current())) { - state.lastStringValue += codePointToString$1(ch); - state.advance(); - } - return state.lastStringValue !== "" -}; -function isUnicodePropertyValueCharacter(ch) { - return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch) -} - -// LoneUnicodePropertyNameOrValue :: -// UnicodePropertyValueCharacters -pp$9.regexp_eatLoneUnicodePropertyNameOrValue = function(state) { - return this.regexp_eatUnicodePropertyValue(state) -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass -pp$9.regexp_eatCharacterClass = function(state) { - if (state.eat(0x5B /* [ */)) { - state.eat(0x5E /* ^ */); - this.regexp_classRanges(state); - if (state.eat(0x5D /* [ */)) { - return true - } - // Unreachable since it threw "unterminated regular expression" error before. - state.raise("Unterminated character class"); - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges -// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges -// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash -pp$9.regexp_classRanges = function(state) { - var this$1 = this; - - while (this.regexp_eatClassAtom(state)) { - var left = state.lastIntValue; - if (state.eat(0x2D /* - */) && this$1.regexp_eatClassAtom(state)) { - var right = state.lastIntValue; - if (state.switchU && (left === -1 || right === -1)) { - state.raise("Invalid character class"); + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash + pp$8.regexp_eatClassAtom = function(state) { + var start = state.pos; + + if (state.eat(0x5C /* \ */)) { + if (this.regexp_eatClassEscape(state)) { + return true } - if (left !== -1 && right !== -1 && left > right) { - state.raise("Range out of order in character class"); + if (state.switchU) { + // Make the same message as V8. + var ch$1 = state.current(); + if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) { + state.raise("Invalid class escape"); + } + state.raise("Invalid escape"); } + state.pos = start; } - } -}; -// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom -// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash -pp$9.regexp_eatClassAtom = function(state) { - var start = state.pos; - - if (state.eat(0x5C /* \ */)) { - if (this.regexp_eatClassEscape(state)) { + var ch = state.current(); + if (ch !== 0x5D /* [ */) { + state.lastIntValue = ch; + state.advance(); return true } - if (state.switchU) { - // Make the same message as V8. - var ch$1 = state.current(); - if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) { - state.raise("Invalid class escape"); - } - state.raise("Invalid escape"); + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape + pp$8.regexp_eatClassEscape = function(state) { + var start = state.pos; + + if (state.eat(0x62 /* b */)) { + state.lastIntValue = 0x08; /* */ + return true } - state.pos = start; - } - var ch = state.current(); - if (ch !== 0x5D /* [ */) { - state.lastIntValue = ch; - state.advance(); - return true - } + if (state.switchU && state.eat(0x2D /* - */)) { + state.lastIntValue = 0x2D; /* - */ + return true + } - return false -}; + if (!state.switchU && state.eat(0x63 /* c */)) { + if (this.regexp_eatClassControlLetter(state)) { + return true + } + state.pos = start; + } -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape -pp$9.regexp_eatClassEscape = function(state) { - var start = state.pos; + return ( + this.regexp_eatCharacterClassEscape(state) || + this.regexp_eatCharacterEscape(state) + ) + }; - if (state.eat(0x62 /* b */)) { - state.lastIntValue = 0x08; /* */ - return true - } + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter + pp$8.regexp_eatClassControlLetter = function(state) { + var ch = state.current(); + if (isDecimalDigit(ch) || ch === 0x5F /* _ */) { + state.lastIntValue = ch % 0x20; + state.advance(); + return true + } + return false + }; - if (state.switchU && state.eat(0x2D /* - */)) { - state.lastIntValue = 0x2D; /* - */ - return true - } + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence + pp$8.regexp_eatHexEscapeSequence = function(state) { + var start = state.pos; + if (state.eat(0x78 /* x */)) { + if (this.regexp_eatFixedHexDigits(state, 2)) { + return true + } + if (state.switchU) { + state.raise("Invalid escape"); + } + state.pos = start; + } + return false + }; - if (!state.switchU && state.eat(0x63 /* c */)) { - if (this.regexp_eatClassControlLetter(state)) { - return true + // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits + pp$8.regexp_eatDecimalDigits = function(state) { + var start = state.pos; + var ch = 0; + state.lastIntValue = 0; + while (isDecimalDigit(ch = state.current())) { + state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + state.advance(); } - state.pos = start; + return state.pos !== start + }; + function isDecimalDigit(ch) { + return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */ } - return ( - this.regexp_eatCharacterClassEscape(state) || - this.regexp_eatCharacterEscape(state) - ) -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter -pp$9.regexp_eatClassControlLetter = function(state) { - var ch = state.current(); - if (isDecimalDigit(ch) || ch === 0x5F /* _ */) { - state.lastIntValue = ch % 0x20; - state.advance(); - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence -pp$9.regexp_eatHexEscapeSequence = function(state) { - var start = state.pos; - if (state.eat(0x78 /* x */)) { - if (this.regexp_eatFixedHexDigits(state, 2)) { - return true + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits + pp$8.regexp_eatHexDigits = function(state) { + var start = state.pos; + var ch = 0; + state.lastIntValue = 0; + while (isHexDigit(ch = state.current())) { + state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); + state.advance(); } - if (state.switchU) { - state.raise("Invalid escape"); + return state.pos !== start + }; + function isHexDigit(ch) { + return ( + (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) || + (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) || + (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) + ) + } + function hexToInt(ch) { + if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) { + return 10 + (ch - 0x41 /* A */) } - state.pos = start; - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits -pp$9.regexp_eatDecimalDigits = function(state) { - var start = state.pos; - var ch = 0; - state.lastIntValue = 0; - while (isDecimalDigit(ch = state.current())) { - state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); - state.advance(); - } - return state.pos !== start -}; -function isDecimalDigit(ch) { - return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */ -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits -pp$9.regexp_eatHexDigits = function(state) { - var start = state.pos; - var ch = 0; - state.lastIntValue = 0; - while (isHexDigit(ch = state.current())) { - state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); - state.advance(); - } - return state.pos !== start -}; -function isHexDigit(ch) { - return ( - (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) || - (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) || - (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) - ) -} -function hexToInt(ch) { - if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) { - return 10 + (ch - 0x41 /* A */) - } - if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) { - return 10 + (ch - 0x61 /* a */) + if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) { + return 10 + (ch - 0x61 /* a */) + } + return ch - 0x30 /* 0 */ } - return ch - 0x30 /* 0 */ -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence -// Allows only 0-377(octal) i.e. 0-255(decimal). -pp$9.regexp_eatLegacyOctalEscapeSequence = function(state) { - if (this.regexp_eatOctalDigit(state)) { - var n1 = state.lastIntValue; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence + // Allows only 0-377(octal) i.e. 0-255(decimal). + pp$8.regexp_eatLegacyOctalEscapeSequence = function(state) { if (this.regexp_eatOctalDigit(state)) { - var n2 = state.lastIntValue; - if (n1 <= 3 && this.regexp_eatOctalDigit(state)) { - state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue; + var n1 = state.lastIntValue; + if (this.regexp_eatOctalDigit(state)) { + var n2 = state.lastIntValue; + if (n1 <= 3 && this.regexp_eatOctalDigit(state)) { + state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue; + } else { + state.lastIntValue = n1 * 8 + n2; + } } else { - state.lastIntValue = n1 * 8 + n2; + state.lastIntValue = n1; } - } else { - state.lastIntValue = n1; + return true } - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit -pp$9.regexp_eatOctalDigit = function(state) { - var ch = state.current(); - if (isOctalDigit(ch)) { - state.lastIntValue = ch - 0x30; /* 0 */ - state.advance(); - return true - } - state.lastIntValue = 0; - return false -}; -function isOctalDigit(ch) { - return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */ -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits -// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit -// And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence -pp$9.regexp_eatFixedHexDigits = function(state, length) { - var start = state.pos; - state.lastIntValue = 0; - for (var i = 0; i < length; ++i) { + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit + pp$8.regexp_eatOctalDigit = function(state) { var ch = state.current(); - if (!isHexDigit(ch)) { - state.pos = start; - return false + if (isOctalDigit(ch)) { + state.lastIntValue = ch - 0x30; /* 0 */ + state.advance(); + return true } - state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); - state.advance(); + state.lastIntValue = 0; + return false + }; + function isOctalDigit(ch) { + return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */ } - return true -}; - -// Object type used to represent tokens. Note that normally, tokens -// simply exist as properties on the parser object. This is only -// used for the onToken callback and the external tokenizer. - -var Token = function Token(p) { - this.type = p.type; - this.value = p.value; - this.start = p.start; - this.end = p.end; - if (p.options.locations) - { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); } - if (p.options.ranges) - { this.range = [p.start, p.end]; } -}; - -// ## Tokenizer - -var pp$8 = Parser.prototype; - -// Move to the next token - -pp$8.next = function() { - if (this.options.onToken) - { this.options.onToken(new Token(this)); } - - this.lastTokEnd = this.end; - this.lastTokStart = this.start; - this.lastTokEndLoc = this.endLoc; - this.lastTokStartLoc = this.startLoc; - this.nextToken(); -}; - -pp$8.getToken = function() { - this.next(); - return new Token(this) -}; - -// If we're in an ES6 environment, make parsers iterable -if (typeof Symbol !== "undefined") - { pp$8[Symbol.iterator] = function() { - var this$1 = this; - return { - next: function () { - var token = this$1.getToken(); - return { - done: token.type === types.eof, - value: token - } + // https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit + // And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence + pp$8.regexp_eatFixedHexDigits = function(state, length) { + var start = state.pos; + state.lastIntValue = 0; + for (var i = 0; i < length; ++i) { + var ch = state.current(); + if (!isHexDigit(ch)) { + state.pos = start; + return false } + state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); + state.advance(); } - }; } + return true + }; + + // Object type used to represent tokens. Note that normally, tokens + // simply exist as properties on the parser object. This is only + // used for the onToken callback and the external tokenizer. + + var Token = function Token(p) { + this.type = p.type; + this.value = p.value; + this.start = p.start; + this.end = p.end; + if (p.options.locations) + { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); } + if (p.options.ranges) + { this.range = [p.start, p.end]; } + }; + + // ## Tokenizer -// Toggle strict mode. Re-reads the next number or string to please -// pedantic tests (`"use strict"; 010;` should fail). + var pp$9 = Parser.prototype; -pp$8.curContext = function() { - return this.context[this.context.length - 1] -}; + // Move to the next token -// Read a single token, updating the parser object's token-related -// properties. + pp$9.next = function() { + if (this.options.onToken) + { this.options.onToken(new Token(this)); } -pp$8.nextToken = function() { - var curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) { this.skipSpace(); } + this.lastTokEnd = this.end; + this.lastTokStart = this.start; + this.lastTokEndLoc = this.endLoc; + this.lastTokStartLoc = this.startLoc; + this.nextToken(); + }; - this.start = this.pos; - if (this.options.locations) { this.startLoc = this.curPosition(); } - if (this.pos >= this.input.length) { return this.finishToken(types.eof) } + pp$9.getToken = function() { + this.next(); + return new Token(this) + }; - if (curContext.override) { return curContext.override(this) } - else { this.readToken(this.fullCharCodeAtPos()); } -}; + // If we're in an ES6 environment, make parsers iterable + if (typeof Symbol !== "undefined") + { pp$9[Symbol.iterator] = function() { + var this$1 = this; + + return { + next: function () { + var token = this$1.getToken(); + return { + done: token.type === types.eof, + value: token + } + } + } + }; } -pp$8.readToken = function(code) { - // Identifier or keyword. '\uXXXX' sequences are allowed in - // identifiers, so '\' also dispatches to that. - if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) - { return this.readWord() } + // Toggle strict mode. Re-reads the next number or string to please + // pedantic tests (`"use strict"; 010;` should fail). - return this.getTokenFromCode(code) -}; + pp$9.curContext = function() { + return this.context[this.context.length - 1] + }; -pp$8.fullCharCodeAtPos = function() { - var code = this.input.charCodeAt(this.pos); - if (code <= 0xd7ff || code >= 0xe000) { return code } - var next = this.input.charCodeAt(this.pos + 1); - return (code << 10) + next - 0x35fdc00 -}; + // Read a single token, updating the parser object's token-related + // properties. -pp$8.skipBlockComment = function() { - var this$1 = this; + pp$9.nextToken = function() { + var curContext = this.curContext(); + if (!curContext || !curContext.preserveSpace) { this.skipSpace(); } - var startLoc = this.options.onComment && this.curPosition(); - var start = this.pos, end = this.input.indexOf("*/", this.pos += 2); - if (end === -1) { this.raise(this.pos - 2, "Unterminated comment"); } - this.pos = end + 2; - if (this.options.locations) { - lineBreakG.lastIndex = start; - var match; - while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { - ++this$1.curLine; - this$1.lineStart = match.index + match[0].length; - } - } - if (this.options.onComment) - { this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, - startLoc, this.curPosition()); } -}; - -pp$8.skipLineComment = function(startSkip) { - var this$1 = this; - - var start = this.pos; - var startLoc = this.options.onComment && this.curPosition(); - var ch = this.input.charCodeAt(this.pos += startSkip); - while (this.pos < this.input.length && !isNewLine(ch)) { - ch = this$1.input.charCodeAt(++this$1.pos); - } - if (this.options.onComment) - { this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, - startLoc, this.curPosition()); } -}; + this.start = this.pos; + if (this.options.locations) { this.startLoc = this.curPosition(); } + if (this.pos >= this.input.length) { return this.finishToken(types.eof) } -// Called at the start of the parse and after every token. Skips -// whitespace and comments, and. + if (curContext.override) { return curContext.override(this) } + else { this.readToken(this.fullCharCodeAtPos()); } + }; -pp$8.skipSpace = function() { - var this$1 = this; + pp$9.readToken = function(code) { + // Identifier or keyword. '\uXXXX' sequences are allowed in + // identifiers, so '\' also dispatches to that. + if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) + { return this.readWord() } - loop: while (this.pos < this.input.length) { - var ch = this$1.input.charCodeAt(this$1.pos); - switch (ch) { - case 32: case 160: // ' ' - ++this$1.pos; - break - case 13: - if (this$1.input.charCodeAt(this$1.pos + 1) === 10) { - ++this$1.pos; - } - case 10: case 8232: case 8233: - ++this$1.pos; - if (this$1.options.locations) { - ++this$1.curLine; - this$1.lineStart = this$1.pos; + return this.getTokenFromCode(code) + }; + + pp$9.fullCharCodeAtPos = function() { + var code = this.input.charCodeAt(this.pos); + if (code <= 0xd7ff || code >= 0xe000) { return code } + var next = this.input.charCodeAt(this.pos + 1); + return (code << 10) + next - 0x35fdc00 + }; + + pp$9.skipBlockComment = function() { + var startLoc = this.options.onComment && this.curPosition(); + var start = this.pos, end = this.input.indexOf("*/", this.pos += 2); + if (end === -1) { this.raise(this.pos - 2, "Unterminated comment"); } + this.pos = end + 2; + if (this.options.locations) { + lineBreakG.lastIndex = start; + var match; + while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { + ++this.curLine; + this.lineStart = match.index + match[0].length; } - break - case 47: // '/' - switch (this$1.input.charCodeAt(this$1.pos + 1)) { - case 42: // '*' - this$1.skipBlockComment(); + } + if (this.options.onComment) + { this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, + startLoc, this.curPosition()); } + }; + + pp$9.skipLineComment = function(startSkip) { + var start = this.pos; + var startLoc = this.options.onComment && this.curPosition(); + var ch = this.input.charCodeAt(this.pos += startSkip); + while (this.pos < this.input.length && !isNewLine(ch)) { + ch = this.input.charCodeAt(++this.pos); + } + if (this.options.onComment) + { this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, + startLoc, this.curPosition()); } + }; + + // Called at the start of the parse and after every token. Skips + // whitespace and comments, and. + + pp$9.skipSpace = function() { + loop: while (this.pos < this.input.length) { + var ch = this.input.charCodeAt(this.pos); + switch (ch) { + case 32: case 160: // ' ' + ++this.pos; + break + case 13: + if (this.input.charCodeAt(this.pos + 1) === 10) { + ++this.pos; + } + case 10: case 8232: case 8233: + ++this.pos; + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } break - case 47: - this$1.skipLineComment(2); + case 47: // '/' + switch (this.input.charCodeAt(this.pos + 1)) { + case 42: // '*' + this.skipBlockComment(); + break + case 47: + this.skipLineComment(2); + break + default: + break loop + } break default: - break loop + if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this.pos; + } else { + break loop + } } - break - default: - if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this$1.pos; - } else { - break loop + } + }; + + // Called at the end of every token. Sets `end`, `val`, and + // maintains `context` and `exprAllowed`, and skips the space after + // the token, so that the next one's `start` will point at the + // right position. + + pp$9.finishToken = function(type, val) { + this.end = this.pos; + if (this.options.locations) { this.endLoc = this.curPosition(); } + var prevType = this.type; + this.type = type; + this.value = val; + + this.updateContext(prevType); + }; + + // ### Token reading + + // This is the function that is called to fetch the next token. It + // is somewhat obscure, because it works in character codes rather + // than characters, and because operator parsing has been inlined + // into it. + // + // All in the name of speed. + // + pp$9.readToken_dot = function() { + var next = this.input.charCodeAt(this.pos + 1); + if (next >= 48 && next <= 57) { return this.readNumber(true) } + var next2 = this.input.charCodeAt(this.pos + 2); + if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' + this.pos += 3; + return this.finishToken(types.ellipsis) + } else { + ++this.pos; + return this.finishToken(types.dot) + } + }; + + pp$9.readToken_slash = function() { // '/' + var next = this.input.charCodeAt(this.pos + 1); + if (this.exprAllowed) { ++this.pos; return this.readRegexp() } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.slash, 1) + }; + + pp$9.readToken_mult_modulo_exp = function(code) { // '%*' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + var tokentype = code === 42 ? types.star : types.modulo; + + // exponentiation operator ** and **= + if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) { + ++size; + tokentype = types.starstar; + next = this.input.charCodeAt(this.pos + 2); + } + + if (next === 61) { return this.finishOp(types.assign, size + 1) } + return this.finishOp(tokentype, size) + }; + + pp$9.readToken_pipe_amp = function(code) { // '|&' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) { return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2) } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1) + }; + + pp$9.readToken_caret = function() { // '^' + var next = this.input.charCodeAt(this.pos + 1); + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.bitwiseXOR, 1) + }; + + pp$9.readToken_plus_min = function(code) { // '+-' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) { + if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && + (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) { + // A `-->` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken() } + return this.finishOp(types.incDec, 2) } - } -}; - -// Called at the end of every token. Sets `end`, `val`, and -// maintains `context` and `exprAllowed`, and skips the space after -// the token, so that the next one's `start` will point at the -// right position. - -pp$8.finishToken = function(type, val) { - this.end = this.pos; - if (this.options.locations) { this.endLoc = this.curPosition(); } - var prevType = this.type; - this.type = type; - this.value = val; - - this.updateContext(prevType); -}; - -// ### Token reading - -// This is the function that is called to fetch the next token. It -// is somewhat obscure, because it works in character codes rather -// than characters, and because operator parsing has been inlined -// into it. -// -// All in the name of speed. -// -pp$8.readToken_dot = function() { - var next = this.input.charCodeAt(this.pos + 1); - if (next >= 48 && next <= 57) { return this.readNumber(true) } - var next2 = this.input.charCodeAt(this.pos + 2); - if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' - this.pos += 3; - return this.finishToken(types.ellipsis) - } else { - ++this.pos; - return this.finishToken(types.dot) - } -}; - -pp$8.readToken_slash = function() { // '/' - var next = this.input.charCodeAt(this.pos + 1); - if (this.exprAllowed) { ++this.pos; return this.readRegexp() } - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(types.slash, 1) -}; - -pp$8.readToken_mult_modulo_exp = function(code) { // '%*' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - var tokentype = code === 42 ? types.star : types.modulo; - - // exponentiation operator ** and **= - if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) { - ++size; - tokentype = types.starstar; - next = this.input.charCodeAt(this.pos + 2); - } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.plusMin, 1) + }; - if (next === 61) { return this.finishOp(types.assign, size + 1) } - return this.finishOp(tokentype, size) -}; - -pp$8.readToken_pipe_amp = function(code) { // '|&' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2) } - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1) -}; - -pp$8.readToken_caret = function() { // '^' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(types.bitwiseXOR, 1) -}; - -pp$8.readToken_plus_min = function(code) { // '+-' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { - if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && - (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) { - // A `-->` line comment - this.skipLineComment(3); + pp$9.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types.assign, size + 1) } + return this.finishOp(types.bitShift, size) + } + if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && + this.input.charCodeAt(this.pos + 3) === 45) { + // `)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/sort-arrow-sprite.png b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/sort-arrow-sprite.png deleted file mode 100644 index 03f704a609c6fd..00000000000000 Binary files a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/sort-arrow-sprite.png and /dev/null differ diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/sorter.js b/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/sorter.js deleted file mode 100644 index 6afb736c39fb15..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/unique-filename/coverage/sorter.js +++ /dev/null @@ -1,156 +0,0 @@ -var addSorting = (function () { - "use strict"; - var cols, - currentSort = { - index: 0, - desc: false - }; - - // returns the summary table element - function getTable() { return document.querySelector('.coverage-summary table'); } - // returns the thead element of the summary table - function getTableHeader() { return getTable().querySelector('thead tr'); } - // returns the tbody element of the summary table - function getTableBody() { return getTable().querySelector('tbody'); } - // returns the th element for nth column - function getNthColumn(n) { return getTableHeader().querySelectorAll('th')[n]; } - - // loads all columns - function loadColumns() { - var colNodes = getTableHeader().querySelectorAll('th'), - colNode, - cols = [], - col, - i; - - for (i = 0; i < colNodes.length; i += 1) { - colNode = colNodes[i]; - col = { - key: colNode.getAttribute('data-col'), - sortable: !colNode.getAttribute('data-nosort'), - type: colNode.getAttribute('data-type') || 'string' - }; - cols.push(col); - if (col.sortable) { - col.defaultDescSort = col.type === 'number'; - colNode.innerHTML = colNode.innerHTML + ''; - } - } - return cols; - } - // attaches a data attribute to every tr element with an object - // of data values keyed by column name - function loadRowData(tableRow) { - var tableCols = tableRow.querySelectorAll('td'), - colNode, - col, - data = {}, - i, - val; - for (i = 0; i < tableCols.length; i += 1) { - colNode = tableCols[i]; - col = cols[i]; - val = colNode.getAttribute('data-value'); - if (col.type === 'number') { - val = Number(val); - } - data[col.key] = val; - } - return data; - } - // loads all row data - function loadData() { - var rows = getTableBody().querySelectorAll('tr'), - i; - - for (i = 0; i < rows.length; i += 1) { - rows[i].data = loadRowData(rows[i]); - } - } - // sorts the table using the data for the ith column - function sortByIndex(index, desc) { - var key = cols[index].key, - sorter = function (a, b) { - a = a.data[key]; - b = b.data[key]; - return a < b ? -1 : a > b ? 1 : 0; - }, - finalSorter = sorter, - tableBody = document.querySelector('.coverage-summary tbody'), - rowNodes = tableBody.querySelectorAll('tr'), - rows = [], - i; - - if (desc) { - finalSorter = function (a, b) { - return -1 * sorter(a, b); - }; - } - - for (i = 0; i < rowNodes.length; i += 1) { - rows.push(rowNodes[i]); - tableBody.removeChild(rowNodes[i]); - } - - rows.sort(finalSorter); - - for (i = 0; i < rows.length; i += 1) { - tableBody.appendChild(rows[i]); - } - } - // removes sort indicators for current column being sorted - function removeSortIndicators() { - var col = getNthColumn(currentSort.index), - cls = col.className; - - cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); - col.className = cls; - } - // adds sort indicators for current column being sorted - function addSortIndicators() { - getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted'; - } - // adds event listeners for all sorter widgets - function enableUI() { - var i, - el, - ithSorter = function ithSorter(i) { - var col = cols[i]; - - return function () { - var desc = col.defaultDescSort; - - if (currentSort.index === i) { - desc = !currentSort.desc; - } - sortByIndex(i, desc); - removeSortIndicators(); - currentSort.index = i; - currentSort.desc = desc; - addSortIndicators(); - }; - }; - for (i =0 ; i < cols.length; i += 1) { - if (cols[i].sortable) { - el = getNthColumn(i).querySelector('.sorter'); - if (el.addEventListener) { - el.addEventListener('click', ithSorter(i)); - } else { - el.attachEvent('onclick', ithSorter(i)); - } - } - } - } - // adds sorting functionality to the UI - return function () { - if (!getTable()) { - return; - } - cols = loadColumns(); - loadData(cols); - addSortIndicators(); - enableUI(); - }; -})(); - -window.addEventListener('load', addSorting); diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/index.js b/deps/npm/node_modules/cacache/node_modules/unique-filename/index.js deleted file mode 100644 index 02bf1e273143c1..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/unique-filename/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict' -var path = require('path') - -var uniqueSlug = require('unique-slug') - -module.exports = function (filepath, prefix, uniq) { - return path.join(filepath, (prefix ? prefix + '-' : '') + uniqueSlug(uniq)) -} diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/package.json b/deps/npm/node_modules/cacache/node_modules/unique-filename/package.json deleted file mode 100644 index 7f245898c08aba..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/unique-filename/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "_from": "unique-filename@^1.1.1", - "_id": "unique-filename@1.1.1", - "_inBundle": false, - "_integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", - "_location": "/cacache/unique-filename", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "unique-filename@^1.1.1", - "name": "unique-filename", - "escapedName": "unique-filename", - "rawSpec": "^1.1.1", - "saveSpec": null, - "fetchSpec": "^1.1.1" - }, - "_requiredBy": [ - "/cacache" - ], - "_resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "_shasum": "1d69769369ada0583103a1e6ae87681b56573230", - "_spec": "unique-filename@^1.1.1", - "_where": "/Users/aeschright/code/cli/node_modules/cacache", - "author": { - "name": "Rebecca Turner", - "email": "me@re-becca.org", - "url": "http://re-becca.org/" - }, - "bugs": { - "url": "https://github.com/iarna/unique-filename/issues" - }, - "bundleDependencies": false, - "dependencies": { - "unique-slug": "^2.0.0" - }, - "deprecated": false, - "description": "Generate a unique filename for use in temporary directories or caches.", - "devDependencies": { - "standard": "^5.4.1", - "tap": "^2.3.1" - }, - "homepage": "https://github.com/iarna/unique-filename", - "keywords": [], - "license": "ISC", - "main": "index.js", - "name": "unique-filename", - "repository": { - "type": "git", - "url": "git+https://github.com/iarna/unique-filename.git" - }, - "scripts": { - "test": "standard && tap test" - }, - "version": "1.1.1" -} diff --git a/deps/npm/node_modules/cacache/node_modules/unique-filename/test/index.js b/deps/npm/node_modules/cacache/node_modules/unique-filename/test/index.js deleted file mode 100644 index 105b4e52e8b407..00000000000000 --- a/deps/npm/node_modules/cacache/node_modules/unique-filename/test/index.js +++ /dev/null @@ -1,23 +0,0 @@ -'sue strict' -var t = require('tap') -var uniqueFilename = require('../index.js') - -t.plan(6) - -var randomTmpfile = uniqueFilename('tmp') -t.like(randomTmpfile, /^tmp.[a-f0-9]{8}$/, 'random tmp file') - -var randomAgain = uniqueFilename('tmp') -t.notEqual(randomAgain, randomTmpfile, 'random tmp files are not the same') - -var randomPrefixedTmpfile = uniqueFilename('tmp', 'my-test') -t.like(randomPrefixedTmpfile, /^tmp.my-test-[a-f0-9]{8}$/, 'random prefixed tmp file') - -var randomPrefixedAgain = uniqueFilename('tmp', 'my-test') -t.notEqual(randomPrefixedAgain, randomPrefixedTmpfile, 'random prefixed tmp files are not the same') - -var uniqueTmpfile = uniqueFilename('tmp', 'testing', '/my/thing/to/uniq/on') -t.like(uniqueTmpfile, /^tmp.testing-7ddd44c0$/, 'unique filename') - -var uniqueAgain = uniqueFilename('tmp', 'testing', '/my/thing/to/uniq/on') -t.is(uniqueTmpfile, uniqueAgain, 'same unique string component produces same filename') diff --git a/deps/npm/node_modules/cacache/package.json b/deps/npm/node_modules/cacache/package.json index 7b45446dc710bc..c5cce2b1060c73 100644 --- a/deps/npm/node_modules/cacache/package.json +++ b/deps/npm/node_modules/cacache/package.json @@ -1,21 +1,26 @@ { - "_from": "cacache@11.3.2", - "_id": "cacache@11.3.2", + "_from": "cacache@^11.3.2", + "_id": "cacache@11.3.3", "_inBundle": false, - "_integrity": "sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==", + "_integrity": "sha512-p8WcneCytvzPxhDvYp31PD039vi77I12W+/KfR9S8AZbaiARFBCpsPJS+9uhWfeBfeAtW7o/4vt3MUqLkbY6nA==", "_location": "/cacache", "_phantomChildren": { - "unique-slug": "2.0.0" + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" }, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "cacache@11.3.2", + "raw": "cacache@^11.3.2", "name": "cacache", "escapedName": "cacache", - "rawSpec": "11.3.2", + "rawSpec": "^11.3.2", "saveSpec": null, - "fetchSpec": "11.3.2" + "fetchSpec": "^11.3.2" }, "_requiredBy": [ "#USER", @@ -23,10 +28,10 @@ "/make-fetch-happen", "/pacote" ], - "_resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.2.tgz", - "_shasum": "2d81e308e3d258ca38125b676b98b2ac9ce69bfa", - "_spec": "cacache@11.3.2", - "_where": "/Users/aeschright/code/cli", + "_resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.3.tgz", + "_shasum": "8bd29df8c6a718a6ebd2d010da4d7972ae3bbadc", + "_spec": "cacache@^11.3.2", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Kat Marchán", "email": "kzm@sykosomatic.org" @@ -58,17 +63,17 @@ } ], "dependencies": { - "bluebird": "^3.5.3", + "bluebird": "^3.5.5", "chownr": "^1.1.1", "figgy-pudding": "^3.5.1", - "glob": "^7.1.3", + "glob": "^7.1.4", "graceful-fs": "^4.1.15", "lru-cache": "^5.1.1", "mississippi": "^3.0.0", "mkdirp": "^0.5.1", "move-concurrently": "^1.0.1", "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", + "rimraf": "^2.6.3", "ssri": "^6.0.1", "unique-filename": "^1.1.1", "y18n": "^4.0.0" @@ -77,15 +82,15 @@ "description": "Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.", "devDependencies": { "benchmark": "^2.1.4", - "chalk": "^2.3.2", + "chalk": "^2.4.2", "cross-env": "^5.1.4", - "require-inject": "^1.4.2", - "standard": "^11.0.1", - "standard-version": "^4.4.0", - "tacks": "^1.2.7", - "tap": "^12.1.1", + "require-inject": "^1.4.4", + "standard": "^12.0.1", + "standard-version": "^6.0.1", + "tacks": "^1.3.0", + "tap": "^12.7.0", "weallbehave": "^1.2.0", - "weallcontribute": "^1.0.8" + "weallcontribute": "^1.0.9" }, "files": [ "*.js", @@ -126,5 +131,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "11.3.2" + "version": "11.3.3" } diff --git a/deps/npm/node_modules/cacache/put.js b/deps/npm/node_modules/cacache/put.js index 01b0dd84fc5ad5..cb4057fd5f8dd2 100644 --- a/deps/npm/node_modules/cacache/put.js +++ b/deps/npm/node_modules/cacache/put.js @@ -20,6 +20,7 @@ const PutOpts = figgyPudding({ gid: {}, single: {}, sep: {}, + error: {}, strict: {} }) @@ -28,7 +29,7 @@ function putData (cache, key, data, opts) { opts = PutOpts(opts) return write(cache, data, opts).then(res => { return index.insert( - cache, key, res.integrity, opts.concat({size: res.size}) + cache, key, res.integrity, opts.concat({ size: res.size }) ).then(entry => { if (opts.memoize) { memo.put(cache, entry, data, opts) @@ -63,7 +64,7 @@ function putStream (cache, key, opts) { }) }, cb => { contentStream.end(() => { - index.insert(cache, key, integrity, opts.concat({size})).then(entry => { + index.insert(cache, key, integrity, opts.concat({ size })).then(entry => { if (opts.memoize) { memo.put(cache, entry, Buffer.concat(memoData, memoTotal), opts) } diff --git a/deps/npm/node_modules/copy-concurrently/README.md~ b/deps/npm/node_modules/copy-concurrently/README.md~ new file mode 100644 index 00000000000000..8fbc31150f91b1 --- /dev/null +++ b/deps/npm/node_modules/copy-concurrently/README.md~ @@ -0,0 +1,127 @@ +# copy-concurrently + +Copy files, directories and symlinks + +``` +const copy = require('copy-concurrently') +copy('/path/to/thing', '/new/path/thing').then(() => { + // this is now copied +}).catch(err => { + // oh noooo +}) +``` + +Copies files, directories and symlinks. Ownership is maintained when +running as root, permissions are always maintained. On Windows, if symlinks +are unavailable then junctions will be used. + +## PUBLIC INTERFACE + +### copy(from, to, [options]) → Promise + +Recursively copies `from` to `to` and resolves its promise when finished. +If `to` already exists then the promise will be rejected with an `EEXIST` +error. + +Options are: + +* maxConcurrency – (Default: `1`) The maximum number of concurrent copies to do at once. +* recurseWith - (Default: `copy.item`) The function to call on each file after recursing into a directory. +* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires + an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory + fails then we'll try making a junction instead. + +Options can also include dependency injection: + +* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's. +* fs - (Default: `require('fs')`) The filesystem module to use. Can be used + to use `graceful-fs` or to inject a mock. +* writeStreamAtomic - (Default: `require('fs-write-stream-atomic')`) The + implementation of `writeStreamAtomic` to use. Used to inject a mock. +* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock. + +## EXTENSION INTERFACE + +Ordinarily you'd only call `copy` above. But it's possible to use it's +component functions directly. This is useful if, say, you're writing +[move-concurently](https://npmjs.com/package/move-concurrently). + +### copy.file(from, to, options) → Promise + +Copies a ordinary file `from` to destination `to`. Uses +`fs-write-stream-atomic` to ensure that the file is entirely copied or not +at all. + +Options are: + +* uid, gid - (Optional) If `getuid()` is `0` then this and gid will be used to + set the user and group of `to`. If uid is present then gid must be too. +* mode - (Optional) If set then `to` will have its perms set to `mode`. +* fs - (Default: `require('fs')`) The filesystem module to use. Can be used + to use `graceful-fs` or to inject a mock. +* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's. +* writeStreamAtomic - (Default `require('fs-write-stream-atomic')`) The + implementation of `writeStreamAtomic` to use. Used to inject a mock. + +### copy.symlink(from, to, options) → Promise + +Copies a symlink `from` to destination `to`. If on Windows then if +symlinking fails, a junction will be used instead. + +Options are: + +* top - The top level the copy is being run from. This is used to determine + if the symlink destination is within the set of files we're copying or + outside it. +* fs - (Default: `require('fs')`) The filesystem module to use. Can be used + to use `graceful-fs` or to inject a mock. +* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's. +* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires + an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory + fails then we'll try making a junction instead. + +### copy.recurse(from, to, options) → Promise + +Reads all of the files in directory `from` and adds them to the `queue` +using `recurseWith` (by default `copy.item`). + +Options are: + +* queue - A [`run-queue`](https://npmjs.com/package/run-queue) object to add files found inside `from` to. +* recurseWith - (Default: `copy.item`) The function to call on each file after recursing into a directory. +* uid, gid - (Optional) If `getuid()` is `0` then this and gid will be used to + set the user and group of `to`. If uid is present then gid must be too. +* mode - (Optional) If set then `to` will have its perms set to `mode`. +* fs - (Default: `require('fs')`) The filesystem module to use. Can be used + to use `graceful-fs` or to inject a mock. +* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock. + +### copy.item(from, to, options) → Promise + +Copies some kind of `from` to destination `to`. This looks at the filetype +and calls `copy.file`, `copy.symlink` or `copy.recurse` as appropriate. + +Symlink copies are queued with a priority such that they happen after all +file and directory copies as you can't create a junction on windows to a +file that doesn't exist yet. + +Options are: + +* top - The top level the copy is being run from. This is used to determine + if the symlink destination is within the set of files we're copying or + outside it. +* queue - The [`run-queue`](https://npmjs.com/package/run-queue) object to + pass to `copy.recurse` if `from` is a directory. +* recurseWith - (Default: `copy.item`) The function to call on each file after recursing into a directory. +* uid, gid - (Optional) If `getuid()` is `0` then this and gid will be used to + set the user and group of `to`. If uid is present then gid must be too. +* mode - (Optional) If set then `to` will have its perms set to `mode`. +* fs - (Default: `require('fs')`) The filesystem module to use. Can be used + to use `graceful-fs` or to inject a mock. +* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock. +* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires + an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory + fails then we'll try making a junction instead. +* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's. +* writeStreamAtomic - (Default `require('fs-write-stream-atomic')`) The + implementation of `writeStreamAtomic` to use. Used to inject a mock. diff --git a/deps/npm/node_modules/debug/.eslintrc b/deps/npm/node_modules/debug/.eslintrc new file mode 100644 index 00000000000000..146371edbe3251 --- /dev/null +++ b/deps/npm/node_modules/debug/.eslintrc @@ -0,0 +1,14 @@ +{ + "env": { + "browser": true, + "node": true + }, + "globals": { + "chrome": true + }, + "rules": { + "no-console": 0, + "no-empty": [1, { "allowEmptyCatch": true }] + }, + "extends": "eslint:recommended" +} diff --git a/deps/npm/node_modules/define-properties/.editorconfig b/deps/npm/node_modules/define-properties/.editorconfig new file mode 100644 index 00000000000000..572e9793f03233 --- /dev/null +++ b/deps/npm/node_modules/define-properties/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; diff --git a/deps/npm/node_modules/define-properties/.eslintrc b/deps/npm/node_modules/define-properties/.eslintrc new file mode 100644 index 00000000000000..db992d7a90c021 --- /dev/null +++ b/deps/npm/node_modules/define-properties/.eslintrc @@ -0,0 +1,12 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": [2, { "min": 1, "max": 35 }], + "max-lines-per-function": [2, 100], + "max-params": [2, 4], + "max-statements": [2, 13] + } +} diff --git a/deps/npm/node_modules/define-properties/.jscs.json b/deps/npm/node_modules/define-properties/.jscs.json new file mode 100644 index 00000000000000..30d54076557d92 --- /dev/null +++ b/deps/npm/node_modules/define-properties/.jscs.json @@ -0,0 +1,174 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 3 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": "asc-insensitive", + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] + }, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} diff --git a/deps/npm/node_modules/define-properties/.travis.yml b/deps/npm/node_modules/define-properties/.travis.yml new file mode 100644 index 00000000000000..ec72d5f3d36b78 --- /dev/null +++ b/deps/npm/node_modules/define-properties/.travis.yml @@ -0,0 +1,233 @@ +language: node_js +os: + - linux +node_js: + - "10.8" + - "9.11" + - "8.11" + - "7.10" + - "6.14" + - "5.12" + - "4.9" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" +before_install: + - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' + - 'nvm install-latest-npm' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "lts/*" + env: PRETEST=true + - node_js: "lts/*" + env: POSTTEST=true + - node_js: "4" + env: COVERAGE=true + - node_js: "10.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true + - env: COVERAGE=true diff --git a/deps/npm/node_modules/define-properties/CHANGELOG.md b/deps/npm/node_modules/define-properties/CHANGELOG.md new file mode 100644 index 00000000000000..5cad1e26a01945 --- /dev/null +++ b/deps/npm/node_modules/define-properties/CHANGELOG.md @@ -0,0 +1,44 @@ +1.1.3 / 2018-08-14 +================= + * [Refactor] use a for loop instead of `foreach` to make for smaller bundle sizes + * [Robustness] cache `Array.prototype.concat` and `Object.defineProperty` + * [Deps] update `object-keys` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `nsp`, `tape`, `jscs`; remove unused eccheck script + dep + * [Tests] use pretest/posttest for linting/security + * [Tests] fix npm upgrades on older nodes + +1.1.2 / 2015-10-14 +================= + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + * [Deps] Update `object-keys` + * [Dev Deps] update `jscs`, `tape`, `eslint`, `@ljharb/eslint-config`, `nsp` + * [Tests] up to `io.js` `v3.3`, `node` `v4.2` + +1.1.1 / 2015-07-21 +================= + * [Deps] Update `object-keys` + * [Dev Deps] Update `tape`, `eslint` + * [Tests] Test on `io.js` `v2.4` + +1.1.0 / 2015-07-01 +================= + * [New] Add support for symbol-valued properties. + * [Dev Deps] Update `nsp`, `eslint` + * [Tests] Test up to `io.js` `v2.3` + +1.0.3 / 2015-05-30 +================= + * Using a more reliable check for supported property descriptors. + +1.0.2 / 2015-05-23 +================= + * Test up to `io.js` `v2.0` + * Update `tape`, `jscs`, `nsp`, `eslint`, `object-keys`, `editorconfig-tools`, `covert` + +1.0.1 / 2015-01-06 +================= + * Update `object-keys` to fix ES3 support + +1.0.0 / 2015-01-04 +================= + * v1.0.0 diff --git a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/LICENSE b/deps/npm/node_modules/define-properties/LICENSE similarity index 94% rename from tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/LICENSE rename to deps/npm/node_modules/define-properties/LICENSE index 39245ac1c60613..8c271c14b62fa2 100644 --- a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/LICENSE +++ b/deps/npm/node_modules/define-properties/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014-2016, Jon Schlinkert. +Copyright (C) 2015 Jordan Harband Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THE SOFTWARE. \ No newline at end of file diff --git a/deps/npm/node_modules/define-properties/README.md b/deps/npm/node_modules/define-properties/README.md new file mode 100644 index 00000000000000..9b60c5f5b7efc8 --- /dev/null +++ b/deps/npm/node_modules/define-properties/README.md @@ -0,0 +1,85 @@ +#define-properties [![Version Badge][npm-version-svg]][package-url] + +[![Build Status][travis-svg]][travis-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +[![browser support][testling-svg]][testling-url] + +Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in older engines. +Existing properties are not overridden. Accepts a map of property names to a predicate that, when true, force-overrides. + +## Example + +```js +var define = require('define-properties'); +var assert = require('assert'); + +var obj = define({ a: 1, b: 2 }, { + a: 10, + b: 20, + c: 30 +}); +assert(obj.a === 1); +assert(obj.b === 2); +assert(obj.c === 30); +if (define.supportsDescriptors) { + assert.deepEqual(Object.keys(obj), ['a', 'b']); + assert.deepEqual(Object.getOwnPropertyDescriptor(obj, 'c'), { + configurable: true, + enumerable: false, + value: 30, + writable: false + }); +} +``` + +Then, with predicates: +```js +var define = require('define-properties'); +var assert = require('assert'); + +var obj = define({ a: 1, b: 2, c: 3 }, { + a: 10, + b: 20, + c: 30 +}, { + a: function () { return false; }, + b: function () { return true; } +}); +assert(obj.a === 1); +assert(obj.b === 20); +assert(obj.c === 3); +if (define.supportsDescriptors) { + assert.deepEqual(Object.keys(obj), ['a', 'c']); + assert.deepEqual(Object.getOwnPropertyDescriptor(obj, 'b'), { + configurable: true, + enumerable: false, + value: 20, + writable: false + }); +} +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/define-properties +[npm-version-svg]: http://versionbadg.es/ljharb/define-properties.svg +[travis-svg]: https://travis-ci.org/ljharb/define-properties.svg +[travis-url]: https://travis-ci.org/ljharb/define-properties +[deps-svg]: https://david-dm.org/ljharb/define-properties.svg +[deps-url]: https://david-dm.org/ljharb/define-properties +[dev-deps-svg]: https://david-dm.org/ljharb/define-properties/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/define-properties#info=devDependencies +[testling-svg]: https://ci.testling.com/ljharb/define-properties.png +[testling-url]: https://ci.testling.com/ljharb/define-properties +[npm-badge-png]: https://nodei.co/npm/define-properties.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/define-properties.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/define-properties.svg +[downloads-url]: http://npm-stat.com/charts.html?package=define-properties diff --git a/deps/npm/node_modules/define-properties/index.js b/deps/npm/node_modules/define-properties/index.js new file mode 100644 index 00000000000000..cb3ae1c7cb3986 --- /dev/null +++ b/deps/npm/node_modules/define-properties/index.js @@ -0,0 +1,58 @@ +'use strict'; + +var keys = require('object-keys'); +var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; + +var toStr = Object.prototype.toString; +var concat = Array.prototype.concat; +var origDefineProperty = Object.defineProperty; + +var isFunction = function (fn) { + return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; +}; + +var arePropertyDescriptorsSupported = function () { + var obj = {}; + try { + origDefineProperty(obj, 'x', { enumerable: false, value: obj }); + // eslint-disable-next-line no-unused-vars, no-restricted-syntax + for (var _ in obj) { // jscs:ignore disallowUnusedVariables + return false; + } + return obj.x === obj; + } catch (e) { /* this is IE 8. */ + return false; + } +}; +var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported(); + +var defineProperty = function (object, name, value, predicate) { + if (name in object && (!isFunction(predicate) || !predicate())) { + return; + } + if (supportsDescriptors) { + origDefineProperty(object, name, { + configurable: true, + enumerable: false, + value: value, + writable: true + }); + } else { + object[name] = value; + } +}; + +var defineProperties = function (object, map) { + var predicates = arguments.length > 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = concat.call(props, Object.getOwnPropertySymbols(map)); + } + for (var i = 0; i < props.length; i += 1) { + defineProperty(object, props[i], map[props[i]], predicates[props[i]]); + } +}; + +defineProperties.supportsDescriptors = !!supportsDescriptors; + +module.exports = defineProperties; diff --git a/deps/npm/node_modules/define-properties/package.json b/deps/npm/node_modules/define-properties/package.json new file mode 100644 index 00000000000000..c6b2f975b775e7 --- /dev/null +++ b/deps/npm/node_modules/define-properties/package.json @@ -0,0 +1,69 @@ +{ + "name": "define-properties", + "version": "1.1.3", + "author": "Jordan Harband", + "description": "Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in older engines.", + "license": "MIT", + "main": "index.js", + "scripts": { + "pretest": "npm run --silent lint", + "test": "npm run --silent tests-only", + "posttest": "npm run --silent security", + "tests-only": "node test/index.js", + "coverage": "covert test/*.js", + "coverage-quiet": "covert test/*.js --quiet", + "lint": "npm run --silent jscs && npm run --silent eslint", + "jscs": "jscs test/*.js *.js", + "eslint": "eslint test/*.js *.js", + "security": "nsp check" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/define-properties.git" + }, + "keywords": [ + "Object.defineProperty", + "Object.defineProperties", + "object", + "property descriptor", + "descriptor", + "define", + "ES5" + ], + "dependencies": { + "object-keys": "^1.0.12" + }, + "devDependencies": { + "@ljharb/eslint-config": "^13.0.0", + "covert": "^1.1.0", + "eslint": "^5.3.0", + "jscs": "^3.0.7", + "nsp": "^3.2.1", + "tape": "^4.9.0" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } + +,"_resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz" +,"_integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==" +,"_from": "define-properties@1.1.3" +} \ No newline at end of file diff --git a/deps/npm/node_modules/define-properties/test/index.js b/deps/npm/node_modules/define-properties/test/index.js new file mode 100644 index 00000000000000..3387f6bc7bbe98 --- /dev/null +++ b/deps/npm/node_modules/define-properties/test/index.js @@ -0,0 +1,125 @@ +'use strict'; + +var define = require('../'); +var test = require('tape'); +var keys = require('object-keys'); + +var arePropertyDescriptorsSupported = function () { + var obj = { a: 1 }; + try { + Object.defineProperty(obj, 'x', { value: obj }); + return obj.x === obj; + } catch (e) { /* this is IE 8. */ + return false; + } +}; +var descriptorsSupported = !!Object.defineProperty && arePropertyDescriptorsSupported(); + +var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; + +test('defineProperties', function (dt) { + dt.test('with descriptor support', { skip: !descriptorsSupported }, function (t) { + var getDescriptor = function (value) { + return { + configurable: true, + enumerable: false, + value: value, + writable: true + }; + }; + + var obj = { + a: 1, + b: 2, + c: 3 + }; + t.deepEqual(keys(obj), ['a', 'b', 'c'], 'all literal-set keys start enumerable'); + define(obj, { + b: 3, + c: 4, + d: 5 + }); + t.deepEqual(obj, { + a: 1, + b: 2, + c: 3 + }, 'existing properties were not overridden'); + t.deepEqual(Object.getOwnPropertyDescriptor(obj, 'd'), getDescriptor(5), 'new property "d" was added and is not enumerable'); + t.deepEqual(['a', 'b', 'c'], keys(obj), 'new keys are not enumerable'); + + define(obj, { + a: 2, + b: 3, + c: 4 + }, { + a: function () { return true; }, + b: function () { return false; } + }); + t.deepEqual(obj, { + b: 2, + c: 3 + }, 'properties only overriden when predicate exists and returns true'); + t.deepEqual(Object.getOwnPropertyDescriptor(obj, 'd'), getDescriptor(5), 'existing property "d" remained and is not enumerable'); + t.deepEqual(Object.getOwnPropertyDescriptor(obj, 'a'), getDescriptor(2), 'existing property "a" was overridden and is not enumerable'); + t.deepEqual(['b', 'c'], keys(obj), 'overridden keys are not enumerable'); + + t.end(); + }); + + dt.test('without descriptor support', { skip: descriptorsSupported }, function (t) { + var obj = { + a: 1, + b: 2, + c: 3 + }; + define(obj, { + b: 3, + c: 4, + d: 5 + }); + t.deepEqual(obj, { + a: 1, + b: 2, + c: 3, + d: 5 + }, 'existing properties were not overridden, new properties were added'); + + define(obj, { + a: 2, + b: 3, + c: 4 + }, { + a: function () { return true; }, + b: function () { return false; } + }); + t.deepEqual(obj, { + a: 2, + b: 2, + c: 3, + d: 5 + }, 'properties only overriden when predicate exists and returns true'); + + t.end(); + }); + + dt.end(); +}); + +test('symbols', { skip: !hasSymbols }, function (t) { + var sym = Symbol('foo'); + var obj = {}; + var aValue = {}; + var bValue = {}; + var properties = { a: aValue }; + properties[sym] = bValue; + + define(obj, properties); + + t.deepEqual(Object.keys(obj), [], 'object has no enumerable keys'); + t.deepEqual(Object.getOwnPropertyNames(obj), ['a'], 'object has non-enumerable "a" key'); + t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'object has non-enumerable symbol key'); + t.equal(obj.a, aValue, 'string keyed value is defined'); + t.equal(obj[sym], bValue, 'symbol keyed value is defined'); + + t.end(); +}); diff --git a/deps/npm/node_modules/es-abstract/.editorconfig b/deps/npm/node_modules/es-abstract/.editorconfig new file mode 100644 index 00000000000000..572e9793f03233 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; diff --git a/deps/npm/node_modules/es-abstract/.eslintrc b/deps/npm/node_modules/es-abstract/.eslintrc new file mode 100644 index 00000000000000..9478bfa1d345c2 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/.eslintrc @@ -0,0 +1,23 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "array-bracket-newline": 0, + "array-element-newline": 0, + "complexity": 0, + "eqeqeq": [2, "allow-null"], + "func-name-matching": 0, + "id-length": [2, { "min": 1, "max": 30 }], + "max-lines": [2, 700], + "max-params": [2, 4], + "max-statements": [2, 24], + "max-statements-per-line": [2, { "max": 2 }], + "no-magic-numbers": 0, + "new-cap": 0, + "no-extra-parens": 1, + "operator-linebreak": [2, "before"], + "sort-keys": 0 + } +} diff --git a/deps/npm/node_modules/es-abstract/.jscs.json b/deps/npm/node_modules/es-abstract/.jscs.json new file mode 100644 index 00000000000000..a6ed539a81db81 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/.jscs.json @@ -0,0 +1,173 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 9 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": false, + + "validateOrderInObjectKeys": false, + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": false, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} diff --git a/deps/npm/node_modules/es-abstract/.nycrc b/deps/npm/node_modules/es-abstract/.nycrc new file mode 100644 index 00000000000000..1b02cf1848d847 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/.nycrc @@ -0,0 +1,14 @@ +{ + "all": true, + "check-coverage": true, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 87.03, + "statements": 86.87, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "operations", + "test" + ] +} diff --git a/deps/npm/node_modules/es-abstract/.travis.yml b/deps/npm/node_modules/es-abstract/.travis.yml new file mode 100644 index 00000000000000..ce65a2f98159ae --- /dev/null +++ b/deps/npm/node_modules/es-abstract/.travis.yml @@ -0,0 +1,232 @@ +language: node_js +os: + - linux +node_js: + - "10.2" + - "9.11" + - "8.11" + - "7.10" + - "6.14" + - "5.12" + - "4.9" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" + - "0.6" +cache: + directories: + - "$HOME/.npm" + - "$(nvm cache dir)" + - "$(nvm_version_path $(nvm_version_remote 0.4))" + - "$(nvm_version_path $(nvm_version_remote 0.6))" + - "$(nvm_version_path $(nvm_version_remote 0.10))" +before_install: + - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' + - 'nvm install-latest-npm' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage && bash <(curl -s https://codecov.io/bash) -f coverage/*.json; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "lts/*" + env: PRETEST=true + - node_js: "lts/*" + env: POSTTEST=true + - node_js: "0.8" + env: COVERAGE=true + - node_js: "0.12" + env: COVERAGE=true + - node_js: "4" + env: COVERAGE=true + - node_js: "8" + env: COVERAGE=true + - node_js: "10.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true diff --git a/deps/npm/node_modules/es-abstract/CHANGELOG.md b/deps/npm/node_modules/es-abstract/CHANGELOG.md new file mode 100644 index 00000000000000..daa7b660a8cfcb --- /dev/null +++ b/deps/npm/node_modules/es-abstract/CHANGELOG.md @@ -0,0 +1,175 @@ +1.12.0 / 2018-05-31 +================= + * [New] add `GetIntrinsic` entry point + * [New] `ES2015`+: add `ObjectCreate` + * [Robustness]: `ES2015+`: ensure `Math.{abs,floor}` and `Function.call` are cached + +1.11.0 / 2018-03-21 +================= + * [New] `ES2015+`: add iterator abstract ops + * [Dev Deps] update `eslint`, `nsp`, `object.assign`, `semver`, `tape` + * [Tests] up to `node` `v9.8`, `v8.10`, `v6.13` + +1.10.0 / 2017-11-24 +================= + * [New] ES2015+: `AdvanceStringIndex` + * [Dev Deps] update `eslint`, `nsp` + * [Tests] require node 0.6 to pass again + * [Tests] up to `node` `v9.2`, `v8.9`, `v6.12`; use `nvm install-latest-npm`; pin included builds to LTS + +1.9.0 / 2017-09-30 +================= + * [New] `es2015+`: add `ArraySpeciesCreate` + * [New] ES2015+: add `CreateDataProperty` and `CreateDataPropertyOrThrow` + * [Tests] consolidate duplicated tests + * [Tests] increase coverage + * [Dev Deps] update `nsp`, `eslint` + +1.8.2 / 2017-09-03 +================= + * [Fix] `es2015`+: `ToNumber`: provide the proper hint for Date objects (#27) + * [Dev Deps] update `eslint` + +1.8.1 / 2017-08-30 +================= + * [Fix] ES2015+: `ToPropertyKey`: should return a symbol for Symbols (#26) + * [Deps] update `function-bind` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config` + * [Docs] github broke markdown parsing + +1.8.0 / 2017-08-04 +================= + * [New] add ES2017 + * [New] move es6+ to es2015+; leave es6/es7 as aliases + * [New] ES5+: add `IsPropertyDescriptor`, `IsAccessorDescriptor`, `IsDataDescriptor`, `IsGenericDescriptor`, `FromPropertyDescriptor`, `ToPropertyDescriptor` + * [New] ES2015+: add `CompletePropertyDescriptor`, `Set`, `HasOwnProperty`, `HasProperty`, `IsConcatSpreadable`, `Invoke`, `CreateIterResultObject`, `RegExpExec` + * [Fix] es7/es2016: do not mutate ES6 + * [Fix] assign helper only supports one source + * [Deps] update `is-regex` + * [Dev Deps] update `nsp`, `eslint`, `@ljharb/eslint-config` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `nsp`, `semver`, `tape` + * [Tests] add tests for missing and excess operations + * [Tests] add codecov for coverage + * [Tests] up to `node` `v8.2`, `v7.10`, `v6.11`, `v4.8`; newer npm breaks on older node + * [Tests] use same lists of value types across tests; ensure tests are the same when ops are the same + * [Tests] ES2015: add ToNumber symbol tests + * [Tests] switch to `nyc` for code coverage + * [Tests] make IsRegExp tests consistent across editions + +1.7.0 / 2017-01-22 +================= + * [New] ES6: Add `GetMethod` (#16) + * [New] ES6: Add `GetV` (#16) + * [New] ES6: Add `Get` (#17) + * [Tests] up to `node` `v7.4`, `v6.9`, `v4.6`; improve test matrix + * [Dev Deps] update `tape`, `nsp`, `eslint`, `@ljharb/eslint-config`, `safe-publish-latest` + +1.6.1 / 2016-08-21 +================= + * [Fix] ES6: IsConstructor should return true for `class` constructors. + +1.6.0 / 2016-08-20 +================= + * [New] ES5 / ES6: add `Type` + * [New] ES6: `SpeciesConstructor` + * [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`; add `safe-publish-latest` + * [Tests] up to `node` `v6.4`, `v5.12`, `v4.5` + +1.5.1 / 2016-05-30 +================= + * [Fix] `ES.IsRegExp`: actually look up `Symbol.match` on the argument + * [Refactor] create `isNaN` helper + * [Deps] update `is-callable`, `function-bind` + * [Deps] update `es-to-primitive`, fix ES5 tests + * [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config`, `tape`, `nsp` + * [Tests] up to `node` `v6.2`, `v5.11`, `v4.4` + * [Tests] use pretest/posttest for linting/security + +1.5.0 / 2015-12-27 +================= + * [New] adds `Symbol.toPrimitive` support via `es-to-primitive` + * [Deps] update `is-callable`, `es-to-primitive` + * [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`, `tape` + * [Tests] up to `node` `v5.3` + +1.4.3 / 2015-11-04 +================= + * [Fix] `ES6.ToNumber`: should give `NaN` for explicitly signed hex strings (#4) + * [Refactor] `ES6.ToNumber`: No need to double-trim + * [Refactor] group tests better + * [Tests] should still pass on `node` `v0.8` + +1.4.2 / 2015-11-02 +================= + * [Fix] ensure `ES.ToNumber` trims whitespace, and does not trim non-whitespace (#3) + +1.4.1 / 2015-10-31 +================= + * [Fix] ensure only 0-1 are valid binary and 0-7 are valid octal digits (#2) + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` + * [Tests] on `node` `v5.0` + * [Tests] fix npm upgrades for older node versions + * package.json: use object form of "authors", add "contributors" + +1.4.0 / 2015-09-26 +================= + * [Deps] update `is-callable` + * [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` + * [Tests] on `node` `v4.2` + * [New] Add `SameValueNonNumber` to ES7 + +1.3.2 / 2015-09-26 +================= + * [Fix] Fix `ES6.IsRegExp` to properly handle `Symbol.match`, per spec. + * [Tests] up to `io.js` `v3.3`, `node` `v4.1` + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` + +1.3.1 / 2015-08-15 +================= + * [Fix] Ensure that objects that `toString` to a binary or octal literal also convert properly + +1.3.0 / 2015-08-15 +================= + * [New] ES6’s ToNumber now supports binary and octal literals. + * [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config`, `tape` + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + * [Tests] up to `io.js` `v3.0` + +1.2.2 / 2015-07-28 +================= + * [Fix] Both `ES5.CheckObjectCoercible` and `ES6.RequireObjectCoercible` return the value if they don't throw. + * [Tests] Test on latest `io.js` versions. + * [Dev Deps] Update `eslint`, `jscs`, `tape`, `semver`, `covert`, `nsp` + +1.2.1 / 2015-03-20 +================= + * Fix `isFinite` helper. + +1.2.0 / 2015-03-19 +================= + * Use `es-to-primitive` for ToPrimitive methods. + * Test on latest `io.js` versions; allow failures on all but 2 latest `node`/`io.js` versions. + +1.1.2 / 2015-03-20 +================= + * Fix isFinite helper. + +1.1.1 / 2015-03-19 +================= + * Fix isPrimitive check for functions + * Update `eslint`, `editorconfig-tools`, `semver`, `nsp` + +1.1.0 / 2015-02-17 +================= + * Add ES7 export (non-default). + * All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. + * Test on `iojs-v1.2`. + +1.0.1 / 2015-01-30 +================= + * Use `is-callable` instead of an internal function. + * Update `tape`, `jscs`, `nsp`, `eslint` + +1.0.0 / 2015-01-10 +================= + * v1.0.0 diff --git a/deps/npm/node_modules/es-abstract/GetIntrinsic.js b/deps/npm/node_modules/es-abstract/GetIntrinsic.js new file mode 100644 index 00000000000000..62dbf05d6379a2 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/GetIntrinsic.js @@ -0,0 +1,177 @@ +'use strict'; + +/* globals + Set, + Map, + WeakSet, + WeakMap, + + Promise, + + Symbol, + Proxy, + + Atomics, + SharedArrayBuffer, + + ArrayBuffer, + DataView, + Uint8Array, + Float32Array, + Float64Array, + Int8Array, + Int16Array, + Int32Array, + Uint8ClampedArray, + Uint16Array, + Uint32Array, +*/ + +var undefined; // eslint-disable-line no-shadow-restricted-names + +var ThrowTypeError = Object.getOwnPropertyDescriptor + ? (function () { return Object.getOwnPropertyDescriptor(arguments, 'callee').get; }()) + : function () { throw new TypeError(); }; + +var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; + +var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto + +var generator; // = function * () {}; +var generatorFunction = generator ? getProto(generator) : undefined; +var asyncFn; // async function() {}; +var asyncFunction = asyncFn ? asyncFn.constructor : undefined; +var asyncGen; // async function * () {}; +var asyncGenFunction = asyncGen ? getProto(asyncGen) : undefined; +var asyncGenIterator = asyncGen ? asyncGen() : undefined; + +var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '$ %Array%': Array, + '$ %ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '$ %ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer.prototype, + '$ %ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, + '$ %ArrayPrototype%': Array.prototype, + '$ %ArrayProto_entries%': Array.prototype.entries, + '$ %ArrayProto_forEach%': Array.prototype.forEach, + '$ %ArrayProto_keys%': Array.prototype.keys, + '$ %ArrayProto_values%': Array.prototype.values, + '$ %AsyncFromSyncIteratorPrototype%': undefined, + '$ %AsyncFunction%': asyncFunction, + '$ %AsyncFunctionPrototype%': asyncFunction ? asyncFunction.prototype : undefined, + '$ %AsyncGenerator%': asyncGen ? getProto(asyncGenIterator) : undefined, + '$ %AsyncGeneratorFunction%': asyncGenFunction, + '$ %AsyncGeneratorPrototype%': asyncGenFunction ? asyncGenFunction.prototype : undefined, + '$ %AsyncIteratorPrototype%': asyncGenIterator && hasSymbols && Symbol.asyncIterator ? asyncGenIterator[Symbol.asyncIterator]() : undefined, + '$ %Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '$ %Boolean%': Boolean, + '$ %BooleanPrototype%': Boolean.prototype, + '$ %DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '$ %DataViewPrototype%': typeof DataView === 'undefined' ? undefined : DataView.prototype, + '$ %Date%': Date, + '$ %DatePrototype%': Date.prototype, + '$ %decodeURI%': decodeURI, + '$ %decodeURIComponent%': decodeURIComponent, + '$ %encodeURI%': encodeURI, + '$ %encodeURIComponent%': encodeURIComponent, + '$ %Error%': Error, + '$ %ErrorPrototype%': Error.prototype, + '$ %eval%': eval, // eslint-disable-line no-eval + '$ %EvalError%': EvalError, + '$ %EvalErrorPrototype%': EvalError.prototype, + '$ %Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '$ %Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined : Float32Array.prototype, + '$ %Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '$ %Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined : Float64Array.prototype, + '$ %Function%': Function, + '$ %FunctionPrototype%': Function.prototype, + '$ %Generator%': generator ? getProto(generator()) : undefined, + '$ %GeneratorFunction%': generatorFunction, + '$ %GeneratorPrototype%': generatorFunction ? generatorFunction.prototype : undefined, + '$ %Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '$ %Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined : Int8Array.prototype, + '$ %Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '$ %Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined : Int8Array.prototype, + '$ %Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '$ %Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined : Int32Array.prototype, + '$ %isFinite%': isFinite, + '$ %isNaN%': isNaN, + '$ %IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, + '$ %JSON%': JSON, + '$ %JSONParse%': JSON.parse, + '$ %Map%': typeof Map === 'undefined' ? undefined : Map, + '$ %MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), + '$ %MapPrototype%': typeof Map === 'undefined' ? undefined : Map.prototype, + '$ %Math%': Math, + '$ %Number%': Number, + '$ %NumberPrototype%': Number.prototype, + '$ %Object%': Object, + '$ %ObjectPrototype%': Object.prototype, + '$ %ObjProto_toString%': Object.prototype.toString, + '$ %ObjProto_valueOf%': Object.prototype.valueOf, + '$ %parseFloat%': parseFloat, + '$ %parseInt%': parseInt, + '$ %Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '$ %PromisePrototype%': typeof Promise === 'undefined' ? undefined : Promise.prototype, + '$ %PromiseProto_then%': typeof Promise === 'undefined' ? undefined : Promise.prototype.then, + '$ %Promise_all%': typeof Promise === 'undefined' ? undefined : Promise.all, + '$ %Promise_reject%': typeof Promise === 'undefined' ? undefined : Promise.reject, + '$ %Promise_resolve%': typeof Promise === 'undefined' ? undefined : Promise.resolve, + '$ %Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '$ %RangeError%': RangeError, + '$ %RangeErrorPrototype%': RangeError.prototype, + '$ %ReferenceError%': ReferenceError, + '$ %ReferenceErrorPrototype%': ReferenceError.prototype, + '$ %Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '$ %RegExp%': RegExp, + '$ %RegExpPrototype%': RegExp.prototype, + '$ %Set%': typeof Set === 'undefined' ? undefined : Set, + '$ %SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), + '$ %SetPrototype%': typeof Set === 'undefined' ? undefined : Set.prototype, + '$ %SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '$ %SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer.prototype, + '$ %String%': String, + '$ %StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, + '$ %StringPrototype%': String.prototype, + '$ %Symbol%': hasSymbols ? Symbol : undefined, + '$ %SymbolPrototype%': hasSymbols ? Symbol.prototype : undefined, + '$ %SyntaxError%': SyntaxError, + '$ %SyntaxErrorPrototype%': SyntaxError.prototype, + '$ %ThrowTypeError%': ThrowTypeError, + '$ %TypedArray%': TypedArray, + '$ %TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined, + '$ %TypeError%': TypeError, + '$ %TypeErrorPrototype%': TypeError.prototype, + '$ %Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '$ %Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array.prototype, + '$ %Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '$ %Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray.prototype, + '$ %Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '$ %Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array.prototype, + '$ %Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '$ %Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array.prototype, + '$ %URIError%': URIError, + '$ %URIErrorPrototype%': URIError.prototype, + '$ %WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '$ %WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined : WeakMap.prototype, + '$ %WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, + '$ %WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined : WeakSet.prototype +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new TypeError('"allowMissing" argument must be a boolean'); + } + + var key = '$ ' + name; + if (!(key in INTRINSICS)) { + throw new SyntaxError('intrinsic ' + name + ' does not exist!'); + } + + // istanbul ignore if // hopefully this is impossible to test :-) + if (typeof INTRINSICS[key] === 'undefined' && !allowMissing) { + throw new TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + return INTRINSICS[key]; +}; diff --git a/tools/node_modules/eslint/node_modules/path-dirname/license b/deps/npm/node_modules/es-abstract/LICENSE similarity index 63% rename from tools/node_modules/eslint/node_modules/path-dirname/license rename to deps/npm/node_modules/es-abstract/LICENSE index 1981663ad8f104..8c271c14b62fa2 100644 --- a/tools/node_modules/eslint/node_modules/path-dirname/license +++ b/deps/npm/node_modules/es-abstract/LICENSE @@ -1,13 +1,12 @@ - The MIT License (MIT) -Copyright (c) Elan Shanker and Node.js contributors. All rights reserved. +Copyright (C) 2015 Jordan Harband Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is +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 @@ -17,6 +16,6 @@ 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. +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/deps/npm/node_modules/es-abstract/Makefile b/deps/npm/node_modules/es-abstract/Makefile new file mode 100644 index 00000000000000..959bbd49c1def0 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/Makefile @@ -0,0 +1,61 @@ +# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. +$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) + + # The files that need updating when incrementing the version number. +VERSIONED_FILES := *.js */*.js *.json README* + + +# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. +# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment +# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. +export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") +UTILS := semver +# Make sure that all required utilities can be located. +UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) + +# Default target (by virtue of being the first non '.'-prefixed in the file). +.PHONY: _no-target-specified +_no-target-specified: + $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) + +# Lists all targets defined in this makefile. +.PHONY: list +list: + @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort + +# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). +.PHONY: test +test: + @npm test + +.PHONY: _ensure-tag +_ensure-tag: +ifndef TAG + $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) +endif + +CHANGELOG_ERROR = $(error No CHANGELOG specified) +.PHONY: _ensure-changelog +_ensure-changelog: + @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) + +# Ensures that the git workspace is clean. +.PHONY: _ensure-clean +_ensure-clean: + @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } + +# Makes a release; invoke with `make TAG= release`. +.PHONY: release +release: _ensure-tag _ensure-changelog _ensure-clean + @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ + new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ + if printf "$$new_ver" | command grep -q '^[0-9]'; then \ + semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ + semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ + else \ + new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ + fi; \ + printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ + replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ + git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ + git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/deps/npm/node_modules/es-abstract/README.md b/deps/npm/node_modules/es-abstract/README.md new file mode 100644 index 00000000000000..0fbf079ccb97dc --- /dev/null +++ b/deps/npm/node_modules/es-abstract/README.md @@ -0,0 +1,44 @@ +# es-abstract [![Version Badge][npm-version-svg]][package-url] + +[![Build Status][travis-svg]][travis-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +[![browser support][testling-svg]][testling-url] + +ECMAScript spec abstract operations. +When different versions of the spec conflict, the default export will be the latest version of the abstract operation. +All abstract operations will also be available under an `es5`/`es2015`/`es2016` entry point, and exported property, if you require a specific version. + +## Example + +```js +var ES = require('es-abstract'); +var assert = require('assert'); + +assert(ES.isCallable(function () {})); +assert(!ES.isCallable(/a/g)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/es-abstract +[npm-version-svg]: http://versionbadg.es/ljharb/es-abstract.svg +[travis-svg]: https://travis-ci.org/ljharb/es-abstract.svg +[travis-url]: https://travis-ci.org/ljharb/es-abstract +[deps-svg]: https://david-dm.org/ljharb/es-abstract.svg +[deps-url]: https://david-dm.org/ljharb/es-abstract +[dev-deps-svg]: https://david-dm.org/ljharb/es-abstract/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/es-abstract#info=devDependencies +[testling-svg]: https://ci.testling.com/ljharb/es-abstract.png +[testling-url]: https://ci.testling.com/ljharb/es-abstract +[npm-badge-png]: https://nodei.co/npm/es-abstract.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/es-abstract.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/es-abstract.svg +[downloads-url]: https://npm-stat.com/charts.html?package=es-abstract diff --git a/deps/npm/node_modules/es-abstract/es2015.js b/deps/npm/node_modules/es-abstract/es2015.js new file mode 100644 index 00000000000000..1a4d7de5608db1 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/es2015.js @@ -0,0 +1,693 @@ +'use strict'; + +var has = require('has'); +var toPrimitive = require('es-to-primitive/es6'); + +var GetIntrinsic = require('./GetIntrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $Array = GetIntrinsic('%Array%'); +var $String = GetIntrinsic('%String%'); +var $Object = GetIntrinsic('%Object%'); +var $Number = GetIntrinsic('%Number%'); +var $Symbol = GetIntrinsic('%Symbol%', true); +var $RegExp = GetIntrinsic('%RegExp%'); + +var hasSymbols = !!$Symbol; + +var $isNaN = require('./helpers/isNaN'); +var $isFinite = require('./helpers/isFinite'); +var MAX_SAFE_INTEGER = $Number.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1; + +var assign = require('./helpers/assign'); +var sign = require('./helpers/sign'); +var mod = require('./helpers/mod'); +var isPrimitive = require('./helpers/isPrimitive'); +var parseInteger = parseInt; +var bind = require('function-bind'); +var arraySlice = bind.call(Function.call, $Array.prototype.slice); +var strSlice = bind.call(Function.call, $String.prototype.slice); +var isBinary = bind.call(Function.call, $RegExp.prototype.test, /^0b[01]+$/i); +var isOctal = bind.call(Function.call, $RegExp.prototype.test, /^0o[0-7]+$/i); +var regexExec = bind.call(Function.call, $RegExp.prototype.exec); +var nonWS = ['\u0085', '\u200b', '\ufffe'].join(''); +var nonWSregex = new $RegExp('[' + nonWS + ']', 'g'); +var hasNonWS = bind.call(Function.call, $RegExp.prototype.test, nonWSregex); +var invalidHexLiteral = /^[-+]0x[0-9a-f]+$/i; +var isInvalidHexLiteral = bind.call(Function.call, $RegExp.prototype.test, invalidHexLiteral); +var $charCodeAt = bind.call(Function.call, $String.prototype.charCodeAt); + +var toStr = bind.call(Function.call, Object.prototype.toString); + +var $floor = Math.floor; +var $abs = Math.abs; + +var $ObjectCreate = Object.create; +var $gOPD = $Object.getOwnPropertyDescriptor; + +var $isExtensible = $Object.isExtensible; + +// whitespace from: http://es5.github.io/#x15.5.4.20 +// implementation from https://github.com/es-shims/es5-shim/blob/v3.4.0/es5-shim.js#L1304-L1324 +var ws = [ + '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003', + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028', + '\u2029\uFEFF' +].join(''); +var trimRegex = new RegExp('(^[' + ws + ']+)|([' + ws + ']+$)', 'g'); +var replace = bind.call(Function.call, $String.prototype.replace); +var trim = function (value) { + return replace(value, trimRegex, ''); +}; + +var ES5 = require('./es5'); + +var hasRegExpMatcher = require('is-regex'); + +// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-abstract-operations +var ES6 = assign(assign({}, ES5), { + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-call-f-v-args + Call: function Call(F, V) { + var args = arguments.length > 2 ? arguments[2] : []; + if (!this.IsCallable(F)) { + throw new $TypeError(F + ' is not a function'); + } + return F.apply(V, args); + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toprimitive + ToPrimitive: toPrimitive, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toboolean + // ToBoolean: ES5.ToBoolean, + + // https://ecma-international.org/ecma-262/6.0/#sec-tonumber + ToNumber: function ToNumber(argument) { + var value = isPrimitive(argument) ? argument : toPrimitive(argument, $Number); + if (typeof value === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a number'); + } + if (typeof value === 'string') { + if (isBinary(value)) { + return this.ToNumber(parseInteger(strSlice(value, 2), 2)); + } else if (isOctal(value)) { + return this.ToNumber(parseInteger(strSlice(value, 2), 8)); + } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { + return NaN; + } else { + var trimmed = trim(value); + if (trimmed !== value) { + return this.ToNumber(trimmed); + } + } + } + return $Number(value); + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tointeger + // ToInteger: ES5.ToNumber, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toint32 + // ToInt32: ES5.ToInt32, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint32 + // ToUint32: ES5.ToUint32, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toint16 + ToInt16: function ToInt16(argument) { + var int16bit = this.ToUint16(argument); + return int16bit >= 0x8000 ? int16bit - 0x10000 : int16bit; + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint16 + // ToUint16: ES5.ToUint16, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toint8 + ToInt8: function ToInt8(argument) { + var int8bit = this.ToUint8(argument); + return int8bit >= 0x80 ? int8bit - 0x100 : int8bit; + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint8 + ToUint8: function ToUint8(argument) { + var number = this.ToNumber(argument); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = sign(number) * $floor($abs(number)); + return mod(posInt, 0x100); + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint8clamp + ToUint8Clamp: function ToUint8Clamp(argument) { + var number = this.ToNumber(argument); + if ($isNaN(number) || number <= 0) { return 0; } + if (number >= 0xFF) { return 0xFF; } + var f = $floor(argument); + if (f + 0.5 < number) { return f + 1; } + if (number < f + 0.5) { return f; } + if (f % 2 !== 0) { return f + 1; } + return f; + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tostring + ToString: function ToString(argument) { + if (typeof argument === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a string'); + } + return $String(argument); + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toobject + ToObject: function ToObject(value) { + this.RequireObjectCoercible(value); + return $Object(value); + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-topropertykey + ToPropertyKey: function ToPropertyKey(argument) { + var key = this.ToPrimitive(argument, $String); + return typeof key === 'symbol' ? key : this.ToString(key); + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength + ToLength: function ToLength(argument) { + var len = this.ToInteger(argument); + if (len <= 0) { return 0; } // includes converting -0 to +0 + if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; } + return len; + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-canonicalnumericindexstring + CanonicalNumericIndexString: function CanonicalNumericIndexString(argument) { + if (toStr(argument) !== '[object String]') { + throw new $TypeError('must be a string'); + } + if (argument === '-0') { return -0; } + var n = this.ToNumber(argument); + if (this.SameValue(this.ToString(n), argument)) { return n; } + return void 0; + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-requireobjectcoercible + RequireObjectCoercible: ES5.CheckObjectCoercible, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isarray + IsArray: $Array.isArray || function IsArray(argument) { + return toStr(argument) === '[object Array]'; + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-iscallable + // IsCallable: ES5.IsCallable, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isconstructor + IsConstructor: function IsConstructor(argument) { + return typeof argument === 'function' && !!argument.prototype; // unfortunately there's no way to truly check this without try/catch `new argument` + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isextensible-o + IsExtensible: Object.preventExtensions + ? function IsExtensible(obj) { + if (isPrimitive(obj)) { + return false; + } + return $isExtensible(obj); + } + : function isExtensible(obj) { return true; }, // eslint-disable-line no-unused-vars + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isinteger + IsInteger: function IsInteger(argument) { + if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) { + return false; + } + var abs = $abs(argument); + return $floor(abs) === abs; + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ispropertykey + IsPropertyKey: function IsPropertyKey(argument) { + return typeof argument === 'string' || typeof argument === 'symbol'; + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-isregexp + IsRegExp: function IsRegExp(argument) { + if (!argument || typeof argument !== 'object') { + return false; + } + if (hasSymbols) { + var isRegExp = argument[$Symbol.match]; + if (typeof isRegExp !== 'undefined') { + return ES5.ToBoolean(isRegExp); + } + } + return hasRegExpMatcher(argument); + }, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevalue + // SameValue: ES5.SameValue, + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero + SameValueZero: function SameValueZero(x, y) { + return (x === y) || ($isNaN(x) && $isNaN(y)); + }, + + /** + * 7.3.2 GetV (V, P) + * 1. Assert: IsPropertyKey(P) is true. + * 2. Let O be ToObject(V). + * 3. ReturnIfAbrupt(O). + * 4. Return O.[[Get]](P, V). + */ + GetV: function GetV(V, P) { + // 7.3.2.1 + if (!this.IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // 7.3.2.2-3 + var O = this.ToObject(V); + + // 7.3.2.4 + return O[P]; + }, + + /** + * 7.3.9 - https://ecma-international.org/ecma-262/6.0/#sec-getmethod + * 1. Assert: IsPropertyKey(P) is true. + * 2. Let func be GetV(O, P). + * 3. ReturnIfAbrupt(func). + * 4. If func is either undefined or null, return undefined. + * 5. If IsCallable(func) is false, throw a TypeError exception. + * 6. Return func. + */ + GetMethod: function GetMethod(O, P) { + // 7.3.9.1 + if (!this.IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // 7.3.9.2 + var func = this.GetV(O, P); + + // 7.3.9.4 + if (func == null) { + return void 0; + } + + // 7.3.9.5 + if (!this.IsCallable(func)) { + throw new $TypeError(P + 'is not a function'); + } + + // 7.3.9.6 + return func; + }, + + /** + * 7.3.1 Get (O, P) - https://ecma-international.org/ecma-262/6.0/#sec-get-o-p + * 1. Assert: Type(O) is Object. + * 2. Assert: IsPropertyKey(P) is true. + * 3. Return O.[[Get]](P, O). + */ + Get: function Get(O, P) { + // 7.3.1.1 + if (this.Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + // 7.3.1.2 + if (!this.IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + // 7.3.1.3 + return O[P]; + }, + + Type: function Type(x) { + if (typeof x === 'symbol') { + return 'Symbol'; + } + return ES5.Type(x); + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-speciesconstructor + SpeciesConstructor: function SpeciesConstructor(O, defaultConstructor) { + if (this.Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var C = O.constructor; + if (typeof C === 'undefined') { + return defaultConstructor; + } + if (this.Type(C) !== 'Object') { + throw new $TypeError('O.constructor is not an Object'); + } + var S = hasSymbols && $Symbol.species ? C[$Symbol.species] : void 0; + if (S == null) { + return defaultConstructor; + } + if (this.IsConstructor(S)) { + return S; + } + throw new $TypeError('no constructor found'); + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-completepropertydescriptor + CompletePropertyDescriptor: function CompletePropertyDescriptor(Desc) { + if (!this.IsPropertyDescriptor(Desc)) { + throw new $TypeError('Desc must be a Property Descriptor'); + } + + if (this.IsGenericDescriptor(Desc) || this.IsDataDescriptor(Desc)) { + if (!has(Desc, '[[Value]]')) { + Desc['[[Value]]'] = void 0; + } + if (!has(Desc, '[[Writable]]')) { + Desc['[[Writable]]'] = false; + } + } else { + if (!has(Desc, '[[Get]]')) { + Desc['[[Get]]'] = void 0; + } + if (!has(Desc, '[[Set]]')) { + Desc['[[Set]]'] = void 0; + } + } + if (!has(Desc, '[[Enumerable]]')) { + Desc['[[Enumerable]]'] = false; + } + if (!has(Desc, '[[Configurable]]')) { + Desc['[[Configurable]]'] = false; + } + return Desc; + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-set-o-p-v-throw + Set: function Set(O, P, V, Throw) { + if (this.Type(O) !== 'Object') { + throw new $TypeError('O must be an Object'); + } + if (!this.IsPropertyKey(P)) { + throw new $TypeError('P must be a Property Key'); + } + if (this.Type(Throw) !== 'Boolean') { + throw new $TypeError('Throw must be a Boolean'); + } + if (Throw) { + O[P] = V; + return true; + } else { + try { + O[P] = V; + } catch (e) { + return false; + } + } + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-hasownproperty + HasOwnProperty: function HasOwnProperty(O, P) { + if (this.Type(O) !== 'Object') { + throw new $TypeError('O must be an Object'); + } + if (!this.IsPropertyKey(P)) { + throw new $TypeError('P must be a Property Key'); + } + return has(O, P); + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-hasproperty + HasProperty: function HasProperty(O, P) { + if (this.Type(O) !== 'Object') { + throw new $TypeError('O must be an Object'); + } + if (!this.IsPropertyKey(P)) { + throw new $TypeError('P must be a Property Key'); + } + return P in O; + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-isconcatspreadable + IsConcatSpreadable: function IsConcatSpreadable(O) { + if (this.Type(O) !== 'Object') { + return false; + } + if (hasSymbols && typeof $Symbol.isConcatSpreadable === 'symbol') { + var spreadable = this.Get(O, Symbol.isConcatSpreadable); + if (typeof spreadable !== 'undefined') { + return this.ToBoolean(spreadable); + } + } + return this.IsArray(O); + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-invoke + Invoke: function Invoke(O, P) { + if (!this.IsPropertyKey(P)) { + throw new $TypeError('P must be a Property Key'); + } + var argumentsList = arraySlice(arguments, 2); + var func = this.GetV(O, P); + return this.Call(func, O, argumentsList); + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-getiterator + GetIterator: function GetIterator(obj, method) { + if (!hasSymbols) { + throw new SyntaxError('ES.GetIterator depends on native iterator support.'); + } + + var actualMethod = method; + if (arguments.length < 2) { + actualMethod = this.GetMethod(obj, $Symbol.iterator); + } + var iterator = this.Call(actualMethod, obj); + if (this.Type(iterator) !== 'Object') { + throw new $TypeError('iterator must return an object'); + } + + return iterator; + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-iteratornext + IteratorNext: function IteratorNext(iterator, value) { + var result = this.Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]); + if (this.Type(result) !== 'Object') { + throw new $TypeError('iterator next must return an object'); + } + return result; + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-iteratorcomplete + IteratorComplete: function IteratorComplete(iterResult) { + if (this.Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return this.ToBoolean(this.Get(iterResult, 'done')); + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-iteratorvalue + IteratorValue: function IteratorValue(iterResult) { + if (this.Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return this.Get(iterResult, 'value'); + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-iteratorstep + IteratorStep: function IteratorStep(iterator) { + var result = this.IteratorNext(iterator); + var done = this.IteratorComplete(result); + return done === true ? false : result; + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-iteratorclose + IteratorClose: function IteratorClose(iterator, completion) { + if (this.Type(iterator) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterator) is not Object'); + } + if (!this.IsCallable(completion)) { + throw new $TypeError('Assertion failed: completion is not a thunk for a Completion Record'); + } + var completionThunk = completion; + + var iteratorReturn = this.GetMethod(iterator, 'return'); + + if (typeof iteratorReturn === 'undefined') { + return completionThunk(); + } + + var completionRecord; + try { + var innerResult = this.Call(iteratorReturn, iterator, []); + } catch (e) { + // if we hit here, then "e" is the innerResult completion that needs re-throwing + + // if the completion is of type "throw", this will throw. + completionRecord = completionThunk(); + completionThunk = null; // ensure it's not called twice. + + // if not, then return the innerResult completion + throw e; + } + completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does + completionThunk = null; // ensure it's not called twice. + + if (this.Type(innerResult) !== 'Object') { + throw new $TypeError('iterator .return must return an object'); + } + + return completionRecord; + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-createiterresultobject + CreateIterResultObject: function CreateIterResultObject(value, done) { + if (this.Type(done) !== 'Boolean') { + throw new $TypeError('Assertion failed: Type(done) is not Boolean'); + } + return { + value: value, + done: done + }; + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-regexpexec + RegExpExec: function RegExpExec(R, S) { + if (this.Type(R) !== 'Object') { + throw new $TypeError('R must be an Object'); + } + if (this.Type(S) !== 'String') { + throw new $TypeError('S must be a String'); + } + var exec = this.Get(R, 'exec'); + if (this.IsCallable(exec)) { + var result = this.Call(exec, R, [S]); + if (result === null || this.Type(result) === 'Object') { + return result; + } + throw new $TypeError('"exec" method must return `null` or an Object'); + } + return regexExec(R, S); + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-arrayspeciescreate + ArraySpeciesCreate: function ArraySpeciesCreate(originalArray, length) { + if (!this.IsInteger(length) || length < 0) { + throw new $TypeError('Assertion failed: length must be an integer >= 0'); + } + var len = length === 0 ? 0 : length; + var C; + var isArray = this.IsArray(originalArray); + if (isArray) { + C = this.Get(originalArray, 'constructor'); + // TODO: figure out how to make a cross-realm normal Array, a same-realm Array + // if (this.IsConstructor(C)) { + // if C is another realm's Array, C = undefined + // Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ? + // } + if (this.Type(C) === 'Object' && hasSymbols && $Symbol.species) { + C = this.Get(C, $Symbol.species); + if (C === null) { + C = void 0; + } + } + } + if (typeof C === 'undefined') { + return $Array(len); + } + if (!this.IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); + } + return new C(len); // this.Construct(C, len); + }, + + CreateDataProperty: function CreateDataProperty(O, P, V) { + if (this.Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!this.IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var oldDesc = $gOPD(O, P); + var extensible = oldDesc || (typeof $isExtensible !== 'function' || $isExtensible(O)); + var immutable = oldDesc && (!oldDesc.writable || !oldDesc.configurable); + if (immutable || !extensible) { + return false; + } + var newDesc = { + configurable: true, + enumerable: true, + value: V, + writable: true + }; + Object.defineProperty(O, P, newDesc); + return true; + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-createdatapropertyorthrow + CreateDataPropertyOrThrow: function CreateDataPropertyOrThrow(O, P, V) { + if (this.Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!this.IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var success = this.CreateDataProperty(O, P, V); + if (!success) { + throw new $TypeError('unable to create data property'); + } + return success; + }, + + // https://www.ecma-international.org/ecma-262/6.0/#sec-objectcreate + ObjectCreate: function ObjectCreate(proto, internalSlotsList) { + if (proto !== null && this.Type(proto) !== 'Object') { + throw new $TypeError('Assertion failed: proto must be null or an object'); + } + var slots = arguments.length < 2 ? [] : internalSlotsList; + if (slots.length > 0) { + throw new $SyntaxError('es-abstract does not yet support internal slots'); + } + + if (proto === null && !$ObjectCreate) { + throw new $SyntaxError('native Object.create support is required to create null objects'); + } + + return $ObjectCreate(proto); + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-advancestringindex + AdvanceStringIndex: function AdvanceStringIndex(S, index, unicode) { + if (this.Type(S) !== 'String') { + throw new $TypeError('S must be a String'); + } + if (!this.IsInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) { + throw new $TypeError('Assertion failed: length must be an integer >= 0 and <= 2**53'); + } + if (this.Type(unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: unicode must be a Boolean'); + } + if (!unicode) { + return index + 1; + } + var length = S.length; + if ((index + 1) >= length) { + return index + 1; + } + + var first = $charCodeAt(S, index); + if (first < 0xD800 || first > 0xDBFF) { + return index + 1; + } + + var second = $charCodeAt(S, index + 1); + if (second < 0xDC00 || second > 0xDFFF) { + return index + 1; + } + + return index + 2; + } +}); + +delete ES6.CheckObjectCoercible; // renamed in ES6 to RequireObjectCoercible + +module.exports = ES6; diff --git a/deps/npm/node_modules/es-abstract/es2016.js b/deps/npm/node_modules/es-abstract/es2016.js new file mode 100644 index 00000000000000..c9166cea7f842a --- /dev/null +++ b/deps/npm/node_modules/es-abstract/es2016.js @@ -0,0 +1,16 @@ +'use strict'; + +var ES2015 = require('./es2015'); +var assign = require('./helpers/assign'); + +var ES2016 = assign(assign({}, ES2015), { + // https://github.com/tc39/ecma262/pull/60 + SameValueNonNumber: function SameValueNonNumber(x, y) { + if (typeof x === 'number' || typeof x !== typeof y) { + throw new TypeError('SameValueNonNumber requires two non-number values of the same type.'); + } + return this.SameValue(x, y); + } +}); + +module.exports = ES2016; diff --git a/deps/npm/node_modules/es-abstract/es2017.js b/deps/npm/node_modules/es-abstract/es2017.js new file mode 100644 index 00000000000000..af3ff480663bbd --- /dev/null +++ b/deps/npm/node_modules/es-abstract/es2017.js @@ -0,0 +1,25 @@ +'use strict'; + +var ES2016 = require('./es2016'); +var assign = require('./helpers/assign'); + +var ES2017 = assign(assign({}, ES2016), { + ToIndex: function ToIndex(value) { + if (typeof value === 'undefined') { + return 0; + } + var integerIndex = this.ToInteger(value); + if (integerIndex < 0) { + throw new RangeError('index must be >= 0'); + } + var index = this.ToLength(integerIndex); + if (!this.SameValueZero(integerIndex, index)) { + throw new RangeError('index must be >= 0 and < 2 ** 53 - 1'); + } + return index; + } +}); + +delete ES2017.EnumerableOwnNames; // replaced with EnumerableOwnProperties + +module.exports = ES2017; diff --git a/deps/npm/node_modules/es-abstract/es5.js b/deps/npm/node_modules/es-abstract/es5.js new file mode 100644 index 00000000000000..3af7e7ea3d5cff --- /dev/null +++ b/deps/npm/node_modules/es-abstract/es5.js @@ -0,0 +1,242 @@ +'use strict'; + +var GetIntrinsic = require('./GetIntrinsic'); + +var $Object = GetIntrinsic('%Object%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $String = GetIntrinsic('%String%'); + +var $isNaN = require('./helpers/isNaN'); +var $isFinite = require('./helpers/isFinite'); + +var sign = require('./helpers/sign'); +var mod = require('./helpers/mod'); + +var IsCallable = require('is-callable'); +var toPrimitive = require('es-to-primitive/es5'); + +var has = require('has'); + +// https://es5.github.io/#x9 +var ES5 = { + ToPrimitive: toPrimitive, + + ToBoolean: function ToBoolean(value) { + return !!value; + }, + ToNumber: function ToNumber(value) { + return +value; // eslint-disable-line no-implicit-coercion + }, + ToInteger: function ToInteger(value) { + var number = this.ToNumber(value); + if ($isNaN(number)) { return 0; } + if (number === 0 || !$isFinite(number)) { return number; } + return sign(number) * Math.floor(Math.abs(number)); + }, + ToInt32: function ToInt32(x) { + return this.ToNumber(x) >> 0; + }, + ToUint32: function ToUint32(x) { + return this.ToNumber(x) >>> 0; + }, + ToUint16: function ToUint16(value) { + var number = this.ToNumber(value); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = sign(number) * Math.floor(Math.abs(number)); + return mod(posInt, 0x10000); + }, + ToString: function ToString(value) { + return $String(value); + }, + ToObject: function ToObject(value) { + this.CheckObjectCoercible(value); + return $Object(value); + }, + CheckObjectCoercible: function CheckObjectCoercible(value, optMessage) { + /* jshint eqnull:true */ + if (value == null) { + throw new $TypeError(optMessage || 'Cannot call method on ' + value); + } + return value; + }, + IsCallable: IsCallable, + SameValue: function SameValue(x, y) { + if (x === y) { // 0 === -0, but they are not identical. + if (x === 0) { return 1 / x === 1 / y; } + return true; + } + return $isNaN(x) && $isNaN(y); + }, + + // https://www.ecma-international.org/ecma-262/5.1/#sec-8 + Type: function Type(x) { + if (x === null) { + return 'Null'; + } + if (typeof x === 'undefined') { + return 'Undefined'; + } + if (typeof x === 'function' || typeof x === 'object') { + return 'Object'; + } + if (typeof x === 'number') { + return 'Number'; + } + if (typeof x === 'boolean') { + return 'Boolean'; + } + if (typeof x === 'string') { + return 'String'; + } + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type + IsPropertyDescriptor: function IsPropertyDescriptor(Desc) { + if (this.Type(Desc) !== 'Object') { + return false; + } + var allowed = { + '[[Configurable]]': true, + '[[Enumerable]]': true, + '[[Get]]': true, + '[[Set]]': true, + '[[Value]]': true, + '[[Writable]]': true + }; + // jscs:disable + for (var key in Desc) { // eslint-disable-line + if (has(Desc, key) && !allowed[key]) { + return false; + } + } + // jscs:enable + var isData = has(Desc, '[[Value]]'); + var IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]'); + if (isData && IsAccessor) { + throw new $TypeError('Property Descriptors may not be both accessor and data descriptors'); + } + return true; + }, + + // https://ecma-international.org/ecma-262/5.1/#sec-8.10.1 + IsAccessorDescriptor: function IsAccessorDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + if (!this.IsPropertyDescriptor(Desc)) { + throw new $TypeError('Desc must be a Property Descriptor'); + } + + if (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) { + return false; + } + + return true; + }, + + // https://ecma-international.org/ecma-262/5.1/#sec-8.10.2 + IsDataDescriptor: function IsDataDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + if (!this.IsPropertyDescriptor(Desc)) { + throw new $TypeError('Desc must be a Property Descriptor'); + } + + if (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) { + return false; + } + + return true; + }, + + // https://ecma-international.org/ecma-262/5.1/#sec-8.10.3 + IsGenericDescriptor: function IsGenericDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + if (!this.IsPropertyDescriptor(Desc)) { + throw new $TypeError('Desc must be a Property Descriptor'); + } + + if (!this.IsAccessorDescriptor(Desc) && !this.IsDataDescriptor(Desc)) { + return true; + } + + return false; + }, + + // https://ecma-international.org/ecma-262/5.1/#sec-8.10.4 + FromPropertyDescriptor: function FromPropertyDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return Desc; + } + + if (!this.IsPropertyDescriptor(Desc)) { + throw new $TypeError('Desc must be a Property Descriptor'); + } + + if (this.IsDataDescriptor(Desc)) { + return { + value: Desc['[[Value]]'], + writable: !!Desc['[[Writable]]'], + enumerable: !!Desc['[[Enumerable]]'], + configurable: !!Desc['[[Configurable]]'] + }; + } else if (this.IsAccessorDescriptor(Desc)) { + return { + get: Desc['[[Get]]'], + set: Desc['[[Set]]'], + enumerable: !!Desc['[[Enumerable]]'], + configurable: !!Desc['[[Configurable]]'] + }; + } else { + throw new $TypeError('FromPropertyDescriptor must be called with a fully populated Property Descriptor'); + } + }, + + // https://ecma-international.org/ecma-262/5.1/#sec-8.10.5 + ToPropertyDescriptor: function ToPropertyDescriptor(Obj) { + if (this.Type(Obj) !== 'Object') { + throw new $TypeError('ToPropertyDescriptor requires an object'); + } + + var desc = {}; + if (has(Obj, 'enumerable')) { + desc['[[Enumerable]]'] = this.ToBoolean(Obj.enumerable); + } + if (has(Obj, 'configurable')) { + desc['[[Configurable]]'] = this.ToBoolean(Obj.configurable); + } + if (has(Obj, 'value')) { + desc['[[Value]]'] = Obj.value; + } + if (has(Obj, 'writable')) { + desc['[[Writable]]'] = this.ToBoolean(Obj.writable); + } + if (has(Obj, 'get')) { + var getter = Obj.get; + if (typeof getter !== 'undefined' && !this.IsCallable(getter)) { + throw new TypeError('getter must be a function'); + } + desc['[[Get]]'] = getter; + } + if (has(Obj, 'set')) { + var setter = Obj.set; + if (typeof setter !== 'undefined' && !this.IsCallable(setter)) { + throw new $TypeError('setter must be a function'); + } + desc['[[Set]]'] = setter; + } + + if ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) { + throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); + } + return desc; + } +}; + +module.exports = ES5; diff --git a/deps/npm/node_modules/es-abstract/es6.js b/deps/npm/node_modules/es-abstract/es6.js new file mode 100644 index 00000000000000..2d1f4dc927a904 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/es6.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./es2015'); diff --git a/deps/npm/node_modules/es-abstract/es7.js b/deps/npm/node_modules/es-abstract/es7.js new file mode 100644 index 00000000000000..f2f15c0a88712c --- /dev/null +++ b/deps/npm/node_modules/es-abstract/es7.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./es2016'); diff --git a/deps/npm/node_modules/es-abstract/helpers/assign.js b/deps/npm/node_modules/es-abstract/helpers/assign.js new file mode 100644 index 00000000000000..2533d20a361958 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/helpers/assign.js @@ -0,0 +1,17 @@ +var bind = require('function-bind'); +var has = bind.call(Function.call, Object.prototype.hasOwnProperty); + +var $assign = Object.assign; + +module.exports = function assign(target, source) { + if ($assign) { + return $assign(target, source); + } + + for (var key in source) { + if (has(source, key)) { + target[key] = source[key]; + } + } + return target; +}; diff --git a/deps/npm/node_modules/es-abstract/helpers/isFinite.js b/deps/npm/node_modules/es-abstract/helpers/isFinite.js new file mode 100644 index 00000000000000..46585376bbee5d --- /dev/null +++ b/deps/npm/node_modules/es-abstract/helpers/isFinite.js @@ -0,0 +1,3 @@ +var $isNaN = Number.isNaN || function (a) { return a !== a; }; + +module.exports = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; }; diff --git a/deps/npm/node_modules/es-abstract/helpers/isNaN.js b/deps/npm/node_modules/es-abstract/helpers/isNaN.js new file mode 100644 index 00000000000000..e4d4f95f316dd5 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/helpers/isNaN.js @@ -0,0 +1,3 @@ +module.exports = Number.isNaN || function isNaN(a) { + return a !== a; +}; diff --git a/deps/npm/node_modules/es-abstract/helpers/isPrimitive.js b/deps/npm/node_modules/es-abstract/helpers/isPrimitive.js new file mode 100644 index 00000000000000..36691564527596 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/helpers/isPrimitive.js @@ -0,0 +1,3 @@ +module.exports = function isPrimitive(value) { + return value === null || (typeof value !== 'function' && typeof value !== 'object'); +}; diff --git a/deps/npm/node_modules/es-abstract/helpers/mod.js b/deps/npm/node_modules/es-abstract/helpers/mod.js new file mode 100644 index 00000000000000..5867fd979c0abf --- /dev/null +++ b/deps/npm/node_modules/es-abstract/helpers/mod.js @@ -0,0 +1,4 @@ +module.exports = function mod(number, modulo) { + var remain = number % modulo; + return Math.floor(remain >= 0 ? remain : remain + modulo); +}; diff --git a/deps/npm/node_modules/es-abstract/helpers/sign.js b/deps/npm/node_modules/es-abstract/helpers/sign.js new file mode 100644 index 00000000000000..2ac0bf1b1a0e9e --- /dev/null +++ b/deps/npm/node_modules/es-abstract/helpers/sign.js @@ -0,0 +1,3 @@ +module.exports = function sign(number) { + return number >= 0 ? 1 : -1; +}; diff --git a/deps/npm/node_modules/es-abstract/index.js b/deps/npm/node_modules/es-abstract/index.js new file mode 100644 index 00000000000000..cee856bbdeb9f5 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/index.js @@ -0,0 +1,22 @@ +'use strict'; + +var assign = require('./helpers/assign'); + +var ES5 = require('./es5'); +var ES2015 = require('./es2015'); +var ES2016 = require('./es2016'); +var ES2017 = require('./es2017'); + +var ES = { + ES5: ES5, + ES6: ES2015, + ES2015: ES2015, + ES7: ES2016, + ES2016: ES2016, + ES2017: ES2017 +}; +assign(ES, ES5); +delete ES.CheckObjectCoercible; // renamed in ES6 to RequireObjectCoercible +assign(ES, ES2015); + +module.exports = ES; diff --git a/deps/npm/node_modules/es-abstract/operations/2015.js b/deps/npm/node_modules/es-abstract/operations/2015.js new file mode 100644 index 00000000000000..1df63c3f4ba8c5 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/operations/2015.js @@ -0,0 +1,78 @@ +'use strict'; + +module.exports = { + IsPropertyDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type', + IsAccessorDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-isaccessordescriptor', + IsDataDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-isdatadescriptor', + IsGenericDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-isgenericdescriptor', + FromPropertyDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor', + ToPropertyDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-topropertydescriptor', + CompletePropertyDescriptor: 'https://ecma-international.org/ecma-262/6.0/#sec-completepropertydescriptor', + ToPrimitive: 'https://ecma-international.org/ecma-262/6.0/#sec-toprimitive', + ToBoolean: 'https://ecma-international.org/ecma-262/6.0/#sec-toboolean', + ToNumber: 'https://ecma-international.org/ecma-262/6.0/#sec-tonumber', + ToInteger: 'https://ecma-international.org/ecma-262/6.0/#sec-tointeger', + ToInt32: 'https://ecma-international.org/ecma-262/6.0/#sec-toint32', + ToUint32: 'https://ecma-international.org/ecma-262/6.0/#sec-touint32', + ToInt16: 'https://ecma-international.org/ecma-262/6.0/#sec-toint16', + ToUint16: 'https://ecma-international.org/ecma-262/6.0/#sec-touint16', + ToInt8: 'https://ecma-international.org/ecma-262/6.0/#sec-toint8', + ToUint8: 'https://ecma-international.org/ecma-262/6.0/#sec-touint8', + ToUint8Clamp: 'https://ecma-international.org/ecma-262/6.0/#sec-touint8clamp', + ToString: 'https://ecma-international.org/ecma-262/6.0/#sec-tostring', + ToObject: 'https://ecma-international.org/ecma-262/6.0/#sec-toobject', + ToPropertyKey: 'https://ecma-international.org/ecma-262/6.0/#sec-topropertykey', + ToLength: 'https://ecma-international.org/ecma-262/6.0/#sec-tolength', + CanonicalNumericIndexString: 'https://ecma-international.org/ecma-262/6.0/#sec-canonicalnumericindexstring', + RequireObjectCoercible: 'https://ecma-international.org/ecma-262/6.0/#sec-requireobjectcoercible', + IsArray: 'https://ecma-international.org/ecma-262/6.0/#sec-isarray', + IsCallable: 'https://ecma-international.org/ecma-262/6.0/#sec-iscallable', + IsConstructor: 'https://ecma-international.org/ecma-262/6.0/#sec-isconstructor', + IsExtensible: 'https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o', + IsInteger: 'https://ecma-international.org/ecma-262/6.0/#sec-isinteger', + IsPropertyKey: 'https://ecma-international.org/ecma-262/6.0/#sec-ispropertykey', + IsRegExp: 'https://ecma-international.org/ecma-262/6.0/#sec-isregexp', + SameValue: 'https://ecma-international.org/ecma-262/6.0/#sec-samevalue', + SameValueZero: 'https://ecma-international.org/ecma-262/6.0/#sec-samevaluezero', + Get: 'https://ecma-international.org/ecma-262/6.0/#sec-get-o-p', + GetV: 'https://ecma-international.org/ecma-262/6.0/#sec-getv', + Set: 'https://ecma-international.org/ecma-262/6.0/#sec-set-o-p-v-throw', + CreateDataProperty: 'https://ecma-international.org/ecma-262/6.0/#sec-createdataproperty', + CreateMethodProperty: 'https://ecma-international.org/ecma-262/6.0/#sec-createmethodproperty', + CreateDataPropertyOrThrow: 'https://ecma-international.org/ecma-262/6.0/#sec-createdatapropertyorthrow', + DefinePropertyOrThrow: 'https://ecma-international.org/ecma-262/6.0/#sec-definepropertyorthrow', + DeletePropertyOrThrow: 'https://ecma-international.org/ecma-262/6.0/#sec-deletepropertyorthrow', + GetMethod: 'https://ecma-international.org/ecma-262/6.0/#sec-getmethod', + HasProperty: 'https://ecma-international.org/ecma-262/6.0/#sec-hasproperty', + HasOwnProperty: 'https://ecma-international.org/ecma-262/6.0/#sec-hasownproperty', + Call: 'https://ecma-international.org/ecma-262/6.0/#sec-call', + Construct: 'https://ecma-international.org/ecma-262/6.0/#sec-construct', + SetIntegrityLevel: 'https://ecma-international.org/ecma-262/6.0/#sec-setintegritylevel', + TestIntegrityLevel: 'https://ecma-international.org/ecma-262/6.0/#sec-testintegritylevel', + CreateArrayFromList: 'https://ecma-international.org/ecma-262/6.0/#sec-createarrayfromlist', + CreateListFromArrayLike: 'https://ecma-international.org/ecma-262/6.0/#sec-createlistfromarraylike', + Invoke: 'https://ecma-international.org/ecma-262/6.0/#sec-invoke', + OrdinaryHasInstance: 'https://ecma-international.org/ecma-262/6.0/#sec-ordinaryhasinstance', + SpeciesConstructor: 'https://ecma-international.org/ecma-262/6.0/#sec-speciesconstructor', + EnumerableOwnNames: 'https://ecma-international.org/ecma-262/6.0/#sec-enumerableownnames', + GetIterator: 'https://ecma-international.org/ecma-262/6.0/#sec-getiterator', + IteratorNext: 'https://ecma-international.org/ecma-262/6.0/#sec-iteratornext', + IteratorComplete: 'https://ecma-international.org/ecma-262/6.0/#sec-iteratorcomplete', + IteratorValue: 'https://ecma-international.org/ecma-262/6.0/#sec-iteratorvalue', + IteratorStep: 'https://ecma-international.org/ecma-262/6.0/#sec-iteratorstep', + IteratorClose: 'https://ecma-international.org/ecma-262/6.0/#sec-iteratorclose', + CreateIterResultObject: 'https://ecma-international.org/ecma-262/6.0/#sec-createiterresultobject', + CreateListIterator: 'https://ecma-international.org/ecma-262/6.0/#sec-createlistiterator', + Type: 'https://ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types', + thisNumberValue: 'https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-number-prototype-object', + thisTimeValue: 'https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-date-prototype-object', + thisStringValue: 'https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-string-prototype-object', + RegExpExec: 'https://ecma-international.org/ecma-262/6.0/#sec-regexpexec', + RegExpBuiltinExec: 'https://ecma-international.org/ecma-262/6.0/#sec-regexpbuiltinexec', + IsConcatSpreadable: 'https://ecma-international.org/ecma-262/6.0/#sec-isconcatspreadable', + IsPromise: 'https://ecma-international.org/ecma-262/6.0/#sec-ispromise', + ArraySpeciesCreate: 'https://ecma-international.org/ecma-262/6.0/#sec-arrayspeciescreate', + ObjectCreate: 'https://ecma-international.org/ecma-262/6.0/#sec-objectcreate', + AdvanceStringIndex: 'https://ecma-international.org/ecma-262/6.0/#sec-advancestringindex', + NormalCompletion: 'https://ecma-international.org/ecma-262/6.0/#sec-normalcompletion' +}; diff --git a/deps/npm/node_modules/es-abstract/operations/2016.js b/deps/npm/node_modules/es-abstract/operations/2016.js new file mode 100644 index 00000000000000..6ac8aae77c28a4 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/operations/2016.js @@ -0,0 +1,80 @@ +'use strict'; + +module.exports = { + IsPropertyDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-property-descriptor-specification-type', + IsAccessorDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-isaccessordescriptor', + IsDataDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-isdatadescriptor', + IsGenericDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-isgenericdescriptor', + FromPropertyDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-frompropertydescriptor', + ToPropertyDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-topropertydescriptor', + CompletePropertyDescriptor: 'https://ecma-international.org/ecma-262/7.0/#sec-completepropertydescriptor', + ToPrimitive: 'https://ecma-international.org/ecma-262/7.0/#sec-toprimitive', + ToBoolean: 'https://ecma-international.org/ecma-262/7.0/#sec-toboolean', + ToNumber: 'https://ecma-international.org/ecma-262/7.0/#sec-tonumber', + ToInteger: 'https://ecma-international.org/ecma-262/7.0/#sec-tointeger', + ToInt32: 'https://ecma-international.org/ecma-262/7.0/#sec-toint32', + ToUint32: 'https://ecma-international.org/ecma-262/7.0/#sec-touint32', + ToInt16: 'https://ecma-international.org/ecma-262/7.0/#sec-toint16', + ToUint16: 'https://ecma-international.org/ecma-262/7.0/#sec-touint16', + ToInt8: 'https://ecma-international.org/ecma-262/7.0/#sec-toint8', + ToUint8: 'https://ecma-international.org/ecma-262/7.0/#sec-touint8', + ToUint8Clamp: 'https://ecma-international.org/ecma-262/7.0/#sec-touint8clamp', + ToString: 'https://ecma-international.org/ecma-262/7.0/#sec-tostring', + ToObject: 'https://ecma-international.org/ecma-262/7.0/#sec-toobject', + ToPropertyKey: 'https://ecma-international.org/ecma-262/7.0/#sec-topropertykey', + ToLength: 'https://ecma-international.org/ecma-262/7.0/#sec-tolength', + CanonicalNumericIndexString: 'https://ecma-international.org/ecma-262/7.0/#sec-canonicalnumericindexstring', + RequireObjectCoercible: 'https://ecma-international.org/ecma-262/7.0/#sec-requireobjectcoercible', + IsArray: 'https://ecma-international.org/ecma-262/7.0/#sec-isarray', + IsCallable: 'https://ecma-international.org/ecma-262/7.0/#sec-iscallable', + IsConstructor: 'https://ecma-international.org/ecma-262/7.0/#sec-isconstructor', + IsExtensible: 'https://ecma-international.org/ecma-262/7.0/#sec-isextensible-o', + IsInteger: 'https://ecma-international.org/ecma-262/7.0/#sec-isinteger', + IsPropertyKey: 'https://ecma-international.org/ecma-262/7.0/#sec-ispropertykey', + IsRegExp: 'https://ecma-international.org/ecma-262/7.0/#sec-isregexp', + SameValue: 'https://ecma-international.org/ecma-262/7.0/#sec-samevalue', + SameValueZero: 'https://ecma-international.org/ecma-262/7.0/#sec-samevaluezero', + SameValueNonNumber: 'https://ecma-international.org/ecma-262/7.0/#sec-samevaluenonnumber', + Get: 'https://ecma-international.org/ecma-262/7.0/#sec-get-o-p', + GetV: 'https://ecma-international.org/ecma-262/7.0/#sec-getv', + Set: 'https://ecma-international.org/ecma-262/7.0/#sec-set-o-p-v-throw', + CreateDataProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-createdataproperty', + CreateMethodProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-createmethodproperty', + CreateDataPropertyOrThrow: 'https://ecma-international.org/ecma-262/7.0/#sec-createdatapropertyorthrow', + DefinePropertyOrThrow: 'https://ecma-international.org/ecma-262/7.0/#sec-definepropertyorthrow', + DeletePropertyOrThrow: 'https://ecma-international.org/ecma-262/7.0/#sec-deletepropertyorthrow', + GetMethod: 'https://ecma-international.org/ecma-262/7.0/#sec-getmethod', + HasProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-hasproperty', + HasOwnProperty: 'https://ecma-international.org/ecma-262/7.0/#sec-hasownproperty', + Call: 'https://ecma-international.org/ecma-262/7.0/#sec-call', + Construct: 'https://ecma-international.org/ecma-262/7.0/#sec-construct', + SetIntegrityLevel: 'https://ecma-international.org/ecma-262/7.0/#sec-setintegritylevel', + TestIntegrityLevel: 'https://ecma-international.org/ecma-262/7.0/#sec-testintegritylevel', + CreateArrayFromList: 'https://ecma-international.org/ecma-262/7.0/#sec-createarrayfromlist', + CreateListFromArrayLike: 'https://ecma-international.org/ecma-262/7.0/#sec-createlistfromarraylike', + Invoke: 'https://ecma-international.org/ecma-262/7.0/#sec-invoke', + OrdinaryHasInstance: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinaryhasinstance', + SpeciesConstructor: 'https://ecma-international.org/ecma-262/7.0/#sec-speciesconstructor', + EnumerableOwnNames: 'https://ecma-international.org/ecma-262/7.0/#sec-enumerableownnames', + GetIterator: 'https://ecma-international.org/ecma-262/7.0/#sec-getiterator', + IteratorNext: 'https://ecma-international.org/ecma-262/7.0/#sec-iteratornext', + IteratorComplete: 'https://ecma-international.org/ecma-262/7.0/#sec-iteratorcomplete', + IteratorValue: 'https://ecma-international.org/ecma-262/7.0/#sec-iteratorvalue', + IteratorStep: 'https://ecma-international.org/ecma-262/7.0/#sec-iteratorstep', + IteratorClose: 'https://ecma-international.org/ecma-262/7.0/#sec-iteratorclose', + CreateIterResultObject: 'https://ecma-international.org/ecma-262/7.0/#sec-createiterresultobject', + CreateListIterator: 'https://ecma-international.org/ecma-262/7.0/#sec-createlistiterator', + Type: 'https://ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types', + thisNumberValue: 'https://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-number-prototype-object', + thisTimeValue: 'https://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-date-prototype-object', + thisStringValue: 'https://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-string-prototype-object', + RegExpExec: 'https://ecma-international.org/ecma-262/7.0/#sec-regexpexec', + RegExpBuiltinExec: 'https://ecma-international.org/ecma-262/7.0/#sec-regexpbuiltinexec', + IsConcatSpreadable: 'https://ecma-international.org/ecma-262/7.0/#sec-isconcatspreadable', + IsPromise: 'https://ecma-international.org/ecma-262/7.0/#sec-ispromise', + ArraySpeciesCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-arrayspeciescreate', + ObjectCreate: 'https://ecma-international.org/ecma-262/7.0/#sec-objectcreate', + AdvanceStringIndex: 'https://ecma-international.org/ecma-262/7.0/#sec-advancestringindex', + OrdinarySet: 'https://ecma-international.org/ecma-262/7.0/#sec-ordinaryset', + NormalCompletion: 'https://ecma-international.org/ecma-262/7.0/#sec-normalcompletion' +}; diff --git a/deps/npm/node_modules/es-abstract/operations/2017.js b/deps/npm/node_modules/es-abstract/operations/2017.js new file mode 100644 index 00000000000000..c8c3aa499cc3f5 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/operations/2017.js @@ -0,0 +1,82 @@ +'use strict'; + +module.exports = { + IsPropertyDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-property-descriptor-specification-type', + IsAccessorDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-isaccessordescriptor', + IsDataDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-isdatadescriptor', + IsGenericDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-isgenericdescriptor', + FromPropertyDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-frompropertydescriptor', + ToPropertyDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-topropertydescriptor', + CompletePropertyDescriptor: 'https://ecma-international.org/ecma-262/8.0/#sec-completepropertydescriptor', + ToPrimitive: 'https://ecma-international.org/ecma-262/8.0/#sec-toprimitive', + ToBoolean: 'https://ecma-international.org/ecma-262/8.0/#sec-toboolean', + ToNumber: 'https://ecma-international.org/ecma-262/8.0/#sec-tonumber', + ToInteger: 'https://ecma-international.org/ecma-262/8.0/#sec-tointeger', + ToInt32: 'https://ecma-international.org/ecma-262/8.0/#sec-toint32', + ToUint32: 'https://ecma-international.org/ecma-262/8.0/#sec-touint32', + ToInt16: 'https://ecma-international.org/ecma-262/8.0/#sec-toint16', + ToUint16: 'https://ecma-international.org/ecma-262/8.0/#sec-touint16', + ToInt8: 'https://ecma-international.org/ecma-262/8.0/#sec-toint8', + ToUint8: 'https://ecma-international.org/ecma-262/8.0/#sec-touint8', + ToUint8Clamp: 'https://ecma-international.org/ecma-262/8.0/#sec-touint8clamp', + ToString: 'https://ecma-international.org/ecma-262/8.0/#sec-tostring', + ToObject: 'https://ecma-international.org/ecma-262/8.0/#sec-toobject', + ToPropertyKey: 'https://ecma-international.org/ecma-262/8.0/#sec-topropertykey', + ToLength: 'https://ecma-international.org/ecma-262/8.0/#sec-tolength', + CanonicalNumericIndexString: 'https://ecma-international.org/ecma-262/8.0/#sec-canonicalnumericindexstring', + ToIndex: 'https://ecma-international.org/ecma-262/8.0/#sec-toindex', + RequireObjectCoercible: 'https://ecma-international.org/ecma-262/8.0/#sec-requireobjectcoercible', + IsArray: 'https://ecma-international.org/ecma-262/8.0/#sec-isarray', + IsCallable: 'https://ecma-international.org/ecma-262/8.0/#sec-iscallable', + IsConstructor: 'https://ecma-international.org/ecma-262/8.0/#sec-isconstructor', + IsExtensible: 'https://ecma-international.org/ecma-262/8.0/#sec-isextensible-o', + IsInteger: 'https://ecma-international.org/ecma-262/8.0/#sec-isinteger', + IsPropertyKey: 'https://ecma-international.org/ecma-262/8.0/#sec-ispropertykey', + IsRegExp: 'https://ecma-international.org/ecma-262/8.0/#sec-isregexp', + SameValue: 'https://ecma-international.org/ecma-262/8.0/#sec-samevalue', + SameValueZero: 'https://ecma-international.org/ecma-262/8.0/#sec-samevaluezero', + SameValueNonNumber: 'https://ecma-international.org/ecma-262/8.0/#sec-samevaluenonnumber', + Get: 'https://ecma-international.org/ecma-262/8.0/#sec-get-o-p', + GetV: 'https://ecma-international.org/ecma-262/8.0/#sec-getv', + Set: 'https://ecma-international.org/ecma-262/8.0/#sec-set-o-p-v-throw', + CreateDataProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-createdataproperty', + CreateMethodProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-createmethodproperty', + CreateDataPropertyOrThrow: 'https://ecma-international.org/ecma-262/8.0/#sec-createdatapropertyorthrow', + DefinePropertyOrThrow: 'https://ecma-international.org/ecma-262/8.0/#sec-definepropertyorthrow', + DeletePropertyOrThrow: 'https://ecma-international.org/ecma-262/8.0/#sec-deletepropertyorthrow', + GetMethod: 'https://ecma-international.org/ecma-262/8.0/#sec-getmethod', + HasProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-hasproperty', + HasOwnProperty: 'https://ecma-international.org/ecma-262/8.0/#sec-hasownproperty', + Call: 'https://ecma-international.org/ecma-262/8.0/#sec-call', + Construct: 'https://ecma-international.org/ecma-262/8.0/#sec-construct', + SetIntegrityLevel: 'https://ecma-international.org/ecma-262/8.0/#sec-setintegritylevel', + TestIntegrityLevel: 'https://ecma-international.org/ecma-262/8.0/#sec-testintegritylevel', + CreateArrayFromList: 'https://ecma-international.org/ecma-262/8.0/#sec-createarrayfromlist', + CreateListFromArrayLike: 'https://ecma-international.org/ecma-262/8.0/#sec-createlistfromarraylike', + Invoke: 'https://ecma-international.org/ecma-262/8.0/#sec-invoke', + OrdinaryHasInstance: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinaryhasinstance', + SpeciesConstructor: 'https://ecma-international.org/ecma-262/8.0/#sec-speciesconstructor', + EnumerableOwnProperties: 'https://ecma-international.org/ecma-262/8.0/#sec-enumerableownproperties', + GetIterator: 'https://ecma-international.org/ecma-262/8.0/#sec-getiterator', + IteratorNext: 'https://ecma-international.org/ecma-262/8.0/#sec-iteratornext', + IteratorComplete: 'https://ecma-international.org/ecma-262/8.0/#sec-iteratorcomplete', + IteratorValue: 'https://ecma-international.org/ecma-262/8.0/#sec-iteratorvalue', + IteratorStep: 'https://ecma-international.org/ecma-262/8.0/#sec-iteratorstep', + IteratorClose: 'https://ecma-international.org/ecma-262/8.0/#sec-iteratorclose', + CreateIterResultObject: 'https://ecma-international.org/ecma-262/8.0/#sec-createiterresultobject', + CreateListIterator: 'https://ecma-international.org/ecma-262/8.0/#sec-createlistiterator', + Type: 'https://ecma-international.org/ecma-262/8.0/#sec-ecmascript-language-types', + thisNumberValue: 'https://ecma-international.org/ecma-262/8.0/#sec-properties-of-the-number-prototype-object', + thisTimeValue: 'https://ecma-international.org/ecma-262/8.0/#sec-properties-of-the-date-prototype-object', + thisStringValue: 'https://ecma-international.org/ecma-262/8.0/#sec-properties-of-the-string-prototype-object', + RegExpExec: 'https://ecma-international.org/ecma-262/8.0/#sec-regexpexec', + RegExpBuiltinExec: 'https://ecma-international.org/ecma-262/8.0/#sec-regexpbuiltinexec', + IsConcatSpreadable: 'https://ecma-international.org/ecma-262/8.0/#sec-isconcatspreadable', + IsPromise: 'https://ecma-international.org/ecma-262/8.0/#sec-ispromise', + ArraySpeciesCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-arrayspeciescreate', + ObjectCreate: 'https://ecma-international.org/ecma-262/8.0/#sec-objectcreate', + AdvanceStringIndex: 'https://ecma-international.org/ecma-262/8.0/#sec-advancestringindex', + OrdinarySet: 'https://ecma-international.org/ecma-262/8.0/#sec-ordinaryset', + NormalCompletion: 'https://ecma-international.org/ecma-262/8.0/#sec-normalcompletion', + IsSharedArrayBuffer: 'https://ecma-international.org/ecma-262/8.0/#sec-issharedarraybuffer', +}; diff --git a/deps/npm/node_modules/es-abstract/operations/es5.js b/deps/npm/node_modules/es-abstract/operations/es5.js new file mode 100644 index 00000000000000..205d1e681560e4 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/operations/es5.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = { + IsPropertyDescriptor: 'https://ecma-international.org/ecma-262/5.1/#sec-8.10', + IsAccessorDescriptor: 'https://ecma-international.org/ecma-262/5.1/#sec-8.10.1', + IsDataDescriptor: 'https://ecma-international.org/ecma-262/5.1/#sec-8.10.2', + IsGenericDescriptor: 'https://ecma-international.org/ecma-262/5.1/#sec-8.10.3', + FromPropertyDescriptor: 'https://ecma-international.org/ecma-262/5.1/#sec-8.10.4', + ToPropertyDescriptor: 'https://ecma-international.org/ecma-262/5.1/#sec-8.10.5' +}; diff --git a/deps/npm/node_modules/es-abstract/package.json b/deps/npm/node_modules/es-abstract/package.json new file mode 100644 index 00000000000000..9b5378b8afb7e7 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/package.json @@ -0,0 +1,102 @@ +{ + "name": "es-abstract", + "version": "1.12.0", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "description": "ECMAScript spec abstract operations.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepublish": "safe-publish-latest", + "pretest": "npm run --silent lint", + "test": "npm run tests-only", + "posttest": "npm run --silent security", + "tests-only": "node test", + "coverage": "nyc npm run --silent tests-only >/dev/null", + "postcoverage": "nyc report", + "lint": "npm run --silent jscs && npm run --silent eslint", + "jscs": "jscs test/*.js *.js", + "eslint": "eslint test/*.js *.js", + "eccheck": "editorconfig-tools check *.js **/*.js > /dev/null", + "security": "nsp check" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/es-abstract.git" + }, + "keywords": [ + "ECMAScript", + "ES", + "abstract", + "operation", + "abstract operation", + "JavaScript", + "ES5", + "ES6", + "ES7" + ], + "dependencies": { + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" + }, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "editorconfig-tools": "^0.1.1", + "eslint": "^4.19.1", + "foreach": "^2.0.5", + "jscs": "^3.0.7", + "nsp": "^3.2.1", + "nyc": "^10.3.2", + "object-inspect": "^1.6.0", + "object-is": "^1.0.1", + "object.assign": "^4.1.0", + "replace": "^1.0.0", + "safe-publish-latest": "^1.1.1", + "semver": "^5.5.0", + "tape": "^4.9.0" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "greenkeeper": { + "//": "nyc is ignored because it requires node 4+, and we support older than that", + "ignore": [ + "nyc" + ] + } + +,"_resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz" +,"_integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==" +,"_from": "es-abstract@1.12.0" +} \ No newline at end of file diff --git a/deps/npm/node_modules/es-abstract/test/.eslintrc b/deps/npm/node_modules/es-abstract/test/.eslintrc new file mode 100644 index 00000000000000..904e833b4c25e5 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/.eslintrc @@ -0,0 +1,11 @@ +{ + "rules": { + "id-length": 0, + "max-lines": 0, + "max-statements-per-line": [2, { "max": 3 }], + "max-nested-callbacks": [2, 3], + "max-statements": 0, + "no-implicit-coercion": [1], + "no-invalid-this": [1] + } +} diff --git a/deps/npm/node_modules/es-abstract/test/GetIntrinsic.js b/deps/npm/node_modules/es-abstract/test/GetIntrinsic.js new file mode 100644 index 00000000000000..ed8e7ecc636bd6 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/GetIntrinsic.js @@ -0,0 +1,34 @@ +'use strict'; + +var GetIntrinsic = require('../GetIntrinsic'); + +var test = require('tape'); +var forEach = require('foreach'); +var debug = require('object-inspect'); + +var v = require('./helpers/values'); + +test('export', function (t) { + t.equal(typeof GetIntrinsic, 'function', 'it is a function'); + t.equal(GetIntrinsic.length, 2, 'function has length of 2'); + + t.end(); +}); + +test('throws', function (t) { + t['throws']( + function () { GetIntrinsic('not an intrinsic'); }, + SyntaxError, + 'nonexistent intrinsic throws a syntax error' + ); + + forEach(v.nonBooleans, function (nonBoolean) { + t['throws']( + function () { GetIntrinsic('%', nonBoolean); }, + TypeError, + debug(nonBoolean) + ' is not a Boolean' + ); + }); + + t.end(); +}); diff --git a/deps/npm/node_modules/es-abstract/test/diffOps.js b/deps/npm/node_modules/es-abstract/test/diffOps.js new file mode 100644 index 00000000000000..2d870897c20595 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/diffOps.js @@ -0,0 +1,24 @@ +'use strict'; + +var keys = require('object-keys'); +var forEach = require('foreach'); + +module.exports = function diffOperations(actual, expected, expectedMissing) { + var actualKeys = keys(actual); + var expectedKeys = keys(expected); + + var extra = []; + var missing = []; + forEach(actualKeys, function (op) { + if (!(op in expected)) { + extra.push(op); + } + }); + forEach(expectedKeys, function (op) { + if (!(op in actual) && expectedMissing.indexOf(op) === -1) { + missing.push(op); + } + }); + + return { missing: missing, extra: extra }; +}; diff --git a/deps/npm/node_modules/es-abstract/test/es2015.js b/deps/npm/node_modules/es-abstract/test/es2015.js new file mode 100644 index 00000000000000..51b94d2e3eeb0a --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/es2015.js @@ -0,0 +1,11 @@ +'use strict'; + +var ES = require('../').ES2015; + +var ops = require('../operations/2015'); + +// jscs:disable +var expectedMissing = ['CreateMethodProperty', 'DefinePropertyOrThrow', 'DeletePropertyOrThrow', 'Construct', 'SetIntegrityLevel', 'TestIntegrityLevel', 'CreateArrayFromList', 'CreateListFromArrayLike', 'OrdinaryHasInstance', 'EnumerableOwnNames', 'GetIterator', 'IteratorNext', 'IteratorComplete', 'IteratorValue', 'IteratorStep', 'IteratorClose', 'CreateListIterator', 'thisNumberValue', 'thisTimeValue', 'thisStringValue', 'RegExpBuiltinExec', 'IsPromise', 'NormalCompletion']; +// jscs:enable + +require('./tests').es2015(ES, ops, expectedMissing); diff --git a/deps/npm/node_modules/es-abstract/test/es2016.js b/deps/npm/node_modules/es-abstract/test/es2016.js new file mode 100644 index 00000000000000..4e9dd2af2e8c45 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/es2016.js @@ -0,0 +1,11 @@ +'use strict'; + +var ES = require('../').ES2016; + +var ops = require('../operations/2016'); + +// jscs:disable +var expectedMissing = ['CreateMethodProperty', 'DefinePropertyOrThrow', 'DeletePropertyOrThrow', 'Construct', 'SetIntegrityLevel', 'TestIntegrityLevel', 'CreateArrayFromList', 'CreateListFromArrayLike', 'OrdinaryHasInstance', 'EnumerableOwnNames', 'GetIterator', 'IteratorNext', 'IteratorComplete', 'IteratorValue', 'IteratorStep', 'IteratorClose', 'CreateListIterator', 'thisNumberValue', 'thisTimeValue', 'thisStringValue', 'RegExpBuiltinExec', 'IsPromise', 'OrdinarySet', 'NormalCompletion']; +// jscs:enable + +require('./tests').es2016(ES, ops, expectedMissing); diff --git a/deps/npm/node_modules/es-abstract/test/es2017.js b/deps/npm/node_modules/es-abstract/test/es2017.js new file mode 100644 index 00000000000000..82533049a56c51 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/es2017.js @@ -0,0 +1,11 @@ +'use strict'; + +var ES = require('../').ES2017; + +var ops = require('../operations/2017'); + +// jscs:disable +var expectedMissing = ['CreateMethodProperty', 'DefinePropertyOrThrow', 'DeletePropertyOrThrow', 'Construct', 'SetIntegrityLevel', 'TestIntegrityLevel', 'CreateArrayFromList', 'CreateListFromArrayLike', 'OrdinaryHasInstance', 'EnumerableOwnProperties', 'GetIterator', 'IteratorNext', 'IteratorComplete', 'IteratorValue', 'IteratorStep', 'IteratorClose', 'CreateListIterator', 'thisNumberValue', 'thisTimeValue', 'thisStringValue', 'RegExpBuiltinExec', 'IsPromise', 'OrdinarySet', 'NormalCompletion', 'IsSharedArrayBuffer']; +// jscs:enable + +require('./tests').es2017(ES, ops, expectedMissing); diff --git a/deps/npm/node_modules/es-abstract/test/es5.js b/deps/npm/node_modules/es-abstract/test/es5.js new file mode 100644 index 00000000000000..cca3030407d888 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/es5.js @@ -0,0 +1,415 @@ +'use strict'; + +var ES = require('../').ES5; +var test = require('tape'); + +var forEach = require('foreach'); +var is = require('object-is'); + +var coercibleObject = { valueOf: function () { return '3'; }, toString: function () { return 42; } }; +var coercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return 42; } +}; +var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; +var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; +var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; +var uncoercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return function toStrFn() {}; } +}; +var objects = [{}, coercibleObject, toStringOnlyObject, valueOfOnlyObject]; +var numbers = [0, -0, Infinity, -Infinity, 42]; +var nonNullPrimitives = [true, false, 'foo', ''].concat(numbers); +var primitives = [undefined, null].concat(nonNullPrimitives); + +test('ToPrimitive', function (t) { + t.test('primitives', function (st) { + var testPrimitive = function (primitive) { + st.ok(is(ES.ToPrimitive(primitive), primitive), primitive + ' is returned correctly'); + }; + forEach(primitives, testPrimitive); + st.end(); + }); + + t.test('objects', function (st) { + st.equal(ES.ToPrimitive(coercibleObject), coercibleObject.valueOf(), 'coercibleObject coerces to valueOf'); + st.equal(ES.ToPrimitive(coercibleObject, Number), coercibleObject.valueOf(), 'coercibleObject with hint Number coerces to valueOf'); + st.equal(ES.ToPrimitive(coercibleObject, String), coercibleObject.toString(), 'coercibleObject with hint String coerces to toString'); + st.equal(ES.ToPrimitive(coercibleFnObject), coercibleFnObject.toString(), 'coercibleFnObject coerces to toString'); + st.equal(ES.ToPrimitive(toStringOnlyObject), toStringOnlyObject.toString(), 'toStringOnlyObject returns toString'); + st.equal(ES.ToPrimitive(valueOfOnlyObject), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject returns valueOf'); + st.equal(ES.ToPrimitive({}), '[object Object]', '{} with no hint coerces to Object#toString'); + st.equal(ES.ToPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); + st.equal(ES.ToPrimitive({}, Number), '[object Object]', '{} with hint Number coerces to Object#toString'); + st['throws'](function () { return ES.ToPrimitive(uncoercibleObject); }, TypeError, 'uncoercibleObject throws a TypeError'); + st['throws'](function () { return ES.ToPrimitive(uncoercibleFnObject); }, TypeError, 'uncoercibleFnObject throws a TypeError'); + st.end(); + }); + + t.end(); +}); + +test('ToBoolean', function (t) { + t.equal(false, ES.ToBoolean(undefined), 'undefined coerces to false'); + t.equal(false, ES.ToBoolean(null), 'null coerces to false'); + t.equal(false, ES.ToBoolean(false), 'false returns false'); + t.equal(true, ES.ToBoolean(true), 'true returns true'); + forEach([0, -0, NaN], function (falsyNumber) { + t.equal(false, ES.ToBoolean(falsyNumber), 'falsy number ' + falsyNumber + ' coerces to false'); + }); + forEach([Infinity, 42, 1, -Infinity], function (truthyNumber) { + t.equal(true, ES.ToBoolean(truthyNumber), 'truthy number ' + truthyNumber + ' coerces to true'); + }); + t.equal(false, ES.ToBoolean(''), 'empty string coerces to false'); + t.equal(true, ES.ToBoolean('foo'), 'nonempty string coerces to true'); + forEach(objects, function (obj) { + t.equal(true, ES.ToBoolean(obj), 'object coerces to true'); + }); + t.equal(true, ES.ToBoolean(uncoercibleObject), 'uncoercibleObject coerces to true'); + t.end(); +}); + +test('ToNumber', function (t) { + t.ok(is(NaN, ES.ToNumber(undefined)), 'undefined coerces to NaN'); + t.ok(is(ES.ToNumber(null), 0), 'null coerces to +0'); + t.ok(is(ES.ToNumber(false), 0), 'false coerces to +0'); + t.equal(1, ES.ToNumber(true), 'true coerces to 1'); + t.ok(is(NaN, ES.ToNumber(NaN)), 'NaN returns itself'); + forEach([0, -0, 42, Infinity, -Infinity], function (num) { + t.equal(num, ES.ToNumber(num), num + ' returns itself'); + }); + forEach(['foo', '0', '4a', '2.0', 'Infinity', '-Infinity'], function (numString) { + t.ok(is(+numString, ES.ToNumber(numString)), '"' + numString + '" coerces to ' + Number(numString)); + }); + forEach(objects, function (object) { + t.ok(is(ES.ToNumber(object), ES.ToNumber(ES.ToPrimitive(object))), 'object ' + object + ' coerces to same as ToPrimitive of object does'); + }); + t['throws'](function () { return ES.ToNumber(uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.end(); +}); + +test('ToInteger', function (t) { + t.ok(is(0, ES.ToInteger(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity, 42], function (num) { + t.ok(is(num, ES.ToInteger(num)), num + ' returns itself'); + t.ok(is(-num, ES.ToInteger(-num)), '-' + num + ' returns itself'); + }); + t.equal(3, ES.ToInteger(Math.PI), 'pi returns 3'); + t['throws'](function () { return ES.ToInteger(uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.end(); +}); + +test('ToInt32', function (t) { + t.ok(is(0, ES.ToInt32(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity], function (num) { + t.ok(is(0, ES.ToInt32(num)), num + ' returns +0'); + t.ok(is(0, ES.ToInt32(-num)), '-' + num + ' returns +0'); + }); + t['throws'](function () { return ES.ToInt32(uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.ok(is(ES.ToInt32(0x100000000), 0), '2^32 returns +0'); + t.ok(is(ES.ToInt32(0x100000000 - 1), -1), '2^32 - 1 returns -1'); + t.ok(is(ES.ToInt32(0x80000000), -0x80000000), '2^31 returns -2^31'); + t.ok(is(ES.ToInt32(0x80000000 - 1), 0x80000000 - 1), '2^31 - 1 returns 2^31 - 1'); + forEach([0, Infinity, NaN, 0x100000000, 0x80000000, 0x10000, 0x42], function (num) { + t.ok(is(ES.ToInt32(num), ES.ToInt32(ES.ToUint32(num))), 'ToInt32(x) === ToInt32(ToUint32(x)) for 0x' + num.toString(16)); + t.ok(is(ES.ToInt32(-num), ES.ToInt32(ES.ToUint32(-num))), 'ToInt32(x) === ToInt32(ToUint32(x)) for -0x' + num.toString(16)); + }); + t.end(); +}); + +test('ToUint32', function (t) { + t.ok(is(0, ES.ToUint32(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity], function (num) { + t.ok(is(0, ES.ToUint32(num)), num + ' returns +0'); + t.ok(is(0, ES.ToUint32(-num)), '-' + num + ' returns +0'); + }); + t['throws'](function () { return ES.ToUint32(uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.ok(is(ES.ToUint32(0x100000000), 0), '2^32 returns +0'); + t.ok(is(ES.ToUint32(0x100000000 - 1), 0x100000000 - 1), '2^32 - 1 returns 2^32 - 1'); + t.ok(is(ES.ToUint32(0x80000000), 0x80000000), '2^31 returns 2^31'); + t.ok(is(ES.ToUint32(0x80000000 - 1), 0x80000000 - 1), '2^31 - 1 returns 2^31 - 1'); + forEach([0, Infinity, NaN, 0x100000000, 0x80000000, 0x10000, 0x42], function (num) { + t.ok(is(ES.ToUint32(num), ES.ToUint32(ES.ToInt32(num))), 'ToUint32(x) === ToUint32(ToInt32(x)) for 0x' + num.toString(16)); + t.ok(is(ES.ToUint32(-num), ES.ToUint32(ES.ToInt32(-num))), 'ToUint32(x) === ToUint32(ToInt32(x)) for -0x' + num.toString(16)); + }); + t.end(); +}); + +test('ToUint16', function (t) { + t.ok(is(0, ES.ToUint16(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity], function (num) { + t.ok(is(0, ES.ToUint16(num)), num + ' returns +0'); + t.ok(is(0, ES.ToUint16(-num)), '-' + num + ' returns +0'); + }); + t['throws'](function () { return ES.ToUint16(uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.ok(is(ES.ToUint16(0x100000000), 0), '2^32 returns +0'); + t.ok(is(ES.ToUint16(0x100000000 - 1), 0x10000 - 1), '2^32 - 1 returns 2^16 - 1'); + t.ok(is(ES.ToUint16(0x80000000), 0), '2^31 returns +0'); + t.ok(is(ES.ToUint16(0x80000000 - 1), 0x10000 - 1), '2^31 - 1 returns 2^16 - 1'); + t.ok(is(ES.ToUint16(0x10000), 0), '2^16 returns +0'); + t.ok(is(ES.ToUint16(0x10000 - 1), 0x10000 - 1), '2^16 - 1 returns 2^16 - 1'); + t.end(); +}); + +test('ToString', function (t) { + t['throws'](function () { return ES.ToString(uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.end(); +}); + +test('ToObject', function (t) { + t['throws'](function () { return ES.ToObject(undefined); }, TypeError, 'undefined throws'); + t['throws'](function () { return ES.ToObject(null); }, TypeError, 'null throws'); + forEach(numbers, function (number) { + var obj = ES.ToObject(number); + t.equal(typeof obj, 'object', 'number ' + number + ' coerces to object'); + t.equal(true, obj instanceof Number, 'object of ' + number + ' is Number object'); + t.ok(is(obj.valueOf(), number), 'object of ' + number + ' coerces to ' + number); + }); + t.end(); +}); + +test('CheckObjectCoercible', function (t) { + t['throws'](function () { return ES.CheckObjectCoercible(undefined); }, TypeError, 'undefined throws'); + t['throws'](function () { return ES.CheckObjectCoercible(null); }, TypeError, 'null throws'); + var checkCoercible = function (value) { + t.doesNotThrow(function () { return ES.CheckObjectCoercible(value); }, '"' + value + '" does not throw'); + }; + forEach(objects.concat(nonNullPrimitives), checkCoercible); + t.end(); +}); + +test('IsCallable', function (t) { + t.equal(true, ES.IsCallable(function () {}), 'function is callable'); + var nonCallables = [/a/g, {}, Object.prototype, NaN].concat(primitives); + forEach(nonCallables, function (nonCallable) { + t.equal(false, ES.IsCallable(nonCallable), nonCallable + ' is not callable'); + }); + t.end(); +}); + +test('SameValue', function (t) { + t.equal(true, ES.SameValue(NaN, NaN), 'NaN is SameValue as NaN'); + t.equal(false, ES.SameValue(0, -0), '+0 is not SameValue as -0'); + forEach(objects.concat(primitives), function (val) { + t.equal(val === val, ES.SameValue(val, val), '"' + val + '" is SameValue to itself'); + }); + t.end(); +}); + +test('Type', function (t) { + t.equal(ES.Type(), 'Undefined', 'Type() is Undefined'); + t.equal(ES.Type(undefined), 'Undefined', 'Type(undefined) is Undefined'); + t.equal(ES.Type(null), 'Null', 'Type(null) is Null'); + t.equal(ES.Type(true), 'Boolean', 'Type(true) is Boolean'); + t.equal(ES.Type(false), 'Boolean', 'Type(false) is Boolean'); + t.equal(ES.Type(0), 'Number', 'Type(0) is Number'); + t.equal(ES.Type(NaN), 'Number', 'Type(NaN) is Number'); + t.equal(ES.Type('abc'), 'String', 'Type("abc") is String'); + t.equal(ES.Type(function () {}), 'Object', 'Type(function () {}) is Object'); + t.equal(ES.Type({}), 'Object', 'Type({}) is Object'); + t.end(); +}); + +var bothDescriptor = function () { + return { '[[Get]]': function () {}, '[[Value]]': true }; +}; +var accessorDescriptor = function () { + return { + '[[Get]]': function () {}, + '[[Enumerable]]': true, + '[[Configurable]]': true + }; +}; +var mutatorDescriptor = function () { + return { + '[[Set]]': function () {}, + '[[Enumerable]]': true, + '[[Configurable]]': true + }; +}; +var dataDescriptor = function () { + return { + '[[Value]]': 42, + '[[Writable]]': false, + '[[Configurable]]': false + }; +}; +var genericDescriptor = function () { + return { + '[[Configurable]]': true, + '[[Enumerable]]': false + }; +}; + +test('IsPropertyDescriptor', function (t) { + forEach(primitives, function (primitive) { + t.equal(ES.IsPropertyDescriptor(primitive), false, primitive + ' is not a Property Descriptor'); + }); + + t.equal(ES.IsPropertyDescriptor({ invalid: true }), false, 'invalid keys not allowed on a Property Descriptor'); + + t.equal(ES.IsPropertyDescriptor({}), true, 'empty object is an incomplete Property Descriptor'); + + t.equal(ES.IsPropertyDescriptor(accessorDescriptor()), true, 'accessor descriptor is a Property Descriptor'); + t.equal(ES.IsPropertyDescriptor(mutatorDescriptor()), true, 'mutator descriptor is a Property Descriptor'); + t.equal(ES.IsPropertyDescriptor(dataDescriptor()), true, 'data descriptor is a Property Descriptor'); + t.equal(ES.IsPropertyDescriptor(genericDescriptor()), true, 'generic descriptor is a Property Descriptor'); + + t['throws'](function () { + ES.IsPropertyDescriptor(bothDescriptor()); + }, TypeError, 'a Property Descriptor can not be both a Data and an Accessor Descriptor'); + + t.end(); +}); + +test('IsAccessorDescriptor', function (t) { + forEach(nonNullPrimitives.concat(null), function (primitive) { + t['throws'](function () { ES.IsAccessorDescriptor(primitive); }, TypeError, primitive + ' is not a Property Descriptor'); + }); + + t.equal(ES.IsAccessorDescriptor(), false, 'no value is not an Accessor Descriptor'); + t.equal(ES.IsAccessorDescriptor(undefined), false, 'undefined value is not an Accessor Descriptor'); + + t.equal(ES.IsAccessorDescriptor(accessorDescriptor()), true, 'accessor descriptor is an Accessor Descriptor'); + t.equal(ES.IsAccessorDescriptor(mutatorDescriptor()), true, 'mutator descriptor is an Accessor Descriptor'); + t.equal(ES.IsAccessorDescriptor(dataDescriptor()), false, 'data descriptor is not an Accessor Descriptor'); + t.equal(ES.IsAccessorDescriptor(genericDescriptor()), false, 'generic descriptor is not an Accessor Descriptor'); + + t.end(); +}); + +test('IsDataDescriptor', function (t) { + forEach(nonNullPrimitives.concat(null), function (primitive) { + t['throws'](function () { ES.IsDataDescriptor(primitive); }, TypeError, primitive + ' is not a Property Descriptor'); + }); + + t.equal(ES.IsDataDescriptor(), false, 'no value is not a Data Descriptor'); + t.equal(ES.IsDataDescriptor(undefined), false, 'undefined value is not a Data Descriptor'); + + t.equal(ES.IsDataDescriptor(accessorDescriptor()), false, 'accessor descriptor is not a Data Descriptor'); + t.equal(ES.IsDataDescriptor(mutatorDescriptor()), false, 'mutator descriptor is not a Data Descriptor'); + t.equal(ES.IsDataDescriptor(dataDescriptor()), true, 'data descriptor is a Data Descriptor'); + t.equal(ES.IsDataDescriptor(genericDescriptor()), false, 'generic descriptor is not a Data Descriptor'); + + t.end(); +}); + +test('IsGenericDescriptor', function (t) { + forEach(nonNullPrimitives.concat(null), function (primitive) { + t['throws']( + function () { ES.IsGenericDescriptor(primitive); }, + TypeError, + primitive + ' is not a Property Descriptor' + ); + }); + + t.equal(ES.IsGenericDescriptor(), false, 'no value is not a Data Descriptor'); + t.equal(ES.IsGenericDescriptor(undefined), false, 'undefined value is not a Data Descriptor'); + + t.equal(ES.IsGenericDescriptor(accessorDescriptor()), false, 'accessor descriptor is not a generic Descriptor'); + t.equal(ES.IsGenericDescriptor(mutatorDescriptor()), false, 'mutator descriptor is not a generic Descriptor'); + t.equal(ES.IsGenericDescriptor(dataDescriptor()), false, 'data descriptor is not a generic Descriptor'); + + t.equal(ES.IsGenericDescriptor(genericDescriptor()), true, 'generic descriptor is a generic Descriptor'); + + t.end(); +}); + +test('FromPropertyDescriptor', function (t) { + t.equal(ES.FromPropertyDescriptor(), undefined, 'no value begets undefined'); + t.equal(ES.FromPropertyDescriptor(undefined), undefined, 'undefined value begets undefined'); + + forEach(nonNullPrimitives.concat(null), function (primitive) { + t['throws']( + function () { ES.FromPropertyDescriptor(primitive); }, + TypeError, + primitive + ' is not a Property Descriptor' + ); + }); + + var accessor = accessorDescriptor(); + t.deepEqual(ES.FromPropertyDescriptor(accessor), { + get: accessor['[[Get]]'], + set: accessor['[[Set]]'], + enumerable: !!accessor['[[Enumerable]]'], + configurable: !!accessor['[[Configurable]]'] + }); + + var mutator = mutatorDescriptor(); + t.deepEqual(ES.FromPropertyDescriptor(mutator), { + get: mutator['[[Get]]'], + set: mutator['[[Set]]'], + enumerable: !!mutator['[[Enumerable]]'], + configurable: !!mutator['[[Configurable]]'] + }); + var data = dataDescriptor(); + t.deepEqual(ES.FromPropertyDescriptor(data), { + value: data['[[Value]]'], + writable: data['[[Writable]]'], + enumerable: !!data['[[Enumerable]]'], + configurable: !!data['[[Configurable]]'] + }); + + t['throws']( + function () { ES.FromPropertyDescriptor(genericDescriptor()); }, + TypeError, + 'a complete Property Descriptor is required' + ); + + t.end(); +}); + +test('ToPropertyDescriptor', function (t) { + forEach(nonNullPrimitives.concat(null), function (primitive) { + t['throws']( + function () { ES.ToPropertyDescriptor(primitive); }, + TypeError, + primitive + ' is not an Object' + ); + }); + + var accessor = accessorDescriptor(); + t.deepEqual(ES.ToPropertyDescriptor({ + get: accessor['[[Get]]'], + enumerable: !!accessor['[[Enumerable]]'], + configurable: !!accessor['[[Configurable]]'] + }), accessor); + + var mutator = mutatorDescriptor(); + t.deepEqual(ES.ToPropertyDescriptor({ + set: mutator['[[Set]]'], + enumerable: !!mutator['[[Enumerable]]'], + configurable: !!mutator['[[Configurable]]'] + }), mutator); + + var data = dataDescriptor(); + t.deepEqual(ES.ToPropertyDescriptor({ + value: data['[[Value]]'], + writable: data['[[Writable]]'], + configurable: !!data['[[Configurable]]'] + }), data); + + var both = bothDescriptor(); + t['throws']( + function () { + ES.ToPropertyDescriptor({ get: both['[[Get]]'], value: both['[[Value]]'] }); + }, + TypeError, + 'data and accessor descriptors are mutually exclusive' + ); + + t['throws']( + function () { ES.ToPropertyDescriptor({ get: 'not callable' }); }, + TypeError, + '"get" must be undefined or callable' + ); + + t['throws']( + function () { ES.ToPropertyDescriptor({ set: 'not callable' }); }, + TypeError, + '"set" must be undefined or callable' + ); + + t.end(); +}); diff --git a/deps/npm/node_modules/es-abstract/test/es6.js b/deps/npm/node_modules/es-abstract/test/es6.js new file mode 100644 index 00000000000000..e7c9d98a243fdb --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/es6.js @@ -0,0 +1,18 @@ +'use strict'; + +var test = require('tape'); + +var ES = require('../'); +var ES6 = ES.ES6; +var ES2015 = ES.ES2015; +var ES6entry = require('../es6'); + +test('legacy es6 export', function (t) { + t.equal(ES6, ES2015, 'main ES6 === main ES2015'); + t.end(); +}); + +test('legacy es6 entry point', function (t) { + t.equal(ES6, ES6entry, 'main ES6 === ES6 entry point'); + t.end(); +}); diff --git a/deps/npm/node_modules/es-abstract/test/es7.js b/deps/npm/node_modules/es-abstract/test/es7.js new file mode 100644 index 00000000000000..ee57e153b05b8d --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/es7.js @@ -0,0 +1,18 @@ +'use strict'; + +var test = require('tape'); + +var ES = require('../'); +var ES7 = ES.ES7; +var ES2016 = ES.ES2016; +var ES7entry = require('../es7'); + +test('legacy es7 export', function (t) { + t.equal(ES7, ES2016, 'main ES7 === main ES2016'); + t.end(); +}); + +test('legacy es7 entry point', function (t) { + t.equal(ES7, ES7entry, 'main ES7 === ES7 entry point'); + t.end(); +}); diff --git a/deps/npm/node_modules/es-abstract/test/helpers/values.js b/deps/npm/node_modules/es-abstract/test/helpers/values.js new file mode 100644 index 00000000000000..02408dd6bde594 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/helpers/values.js @@ -0,0 +1,53 @@ +'use strict'; + +var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; + +var coercibleObject = { valueOf: function () { return 3; }, toString: function () { return 42; } }; +var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; +var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; +var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; +var objects = [{}, coercibleObject, toStringOnlyObject, valueOfOnlyObject]; +var nullPrimitives = [undefined, null]; +var nonIntegerNumbers = [-1.3, 0.2, 1.8, 1 / 3]; +var numbers = [0, -0, Infinity, -Infinity, 42]; +var strings = ['', 'foo']; +var booleans = [true, false]; +var symbols = hasSymbols ? [Symbol.iterator, Symbol('foo')] : []; +var nonSymbolPrimitives = [].concat(nullPrimitives, booleans, strings, numbers); +var nonNumberPrimitives = [].concat(nullPrimitives, booleans, strings, symbols); +var nonNullPrimitives = [].concat(booleans, strings, numbers, symbols); +var nonUndefinedPrimitives = [].concat(null, nonNullPrimitives); +var nonStrings = [].concat(nullPrimitives, booleans, numbers, symbols, objects); +var primitives = [].concat(nullPrimitives, nonNullPrimitives); +var nonPropertyKeys = [].concat(nullPrimitives, booleans, numbers, objects); +var propertyKeys = [].concat(strings, symbols); +var nonBooleans = [].concat(nullPrimitives, strings, symbols, numbers, objects); +var falsies = [].concat(nullPrimitives, false, '', 0, -0, NaN); +var truthies = [].concat(true, 'foo', 42, symbols, objects); + +module.exports = { + coercibleObject: coercibleObject, + valueOfOnlyObject: valueOfOnlyObject, + toStringOnlyObject: toStringOnlyObject, + uncoercibleObject: uncoercibleObject, + objects: objects, + nullPrimitives: nullPrimitives, + numbers: numbers, + strings: strings, + booleans: booleans, + symbols: symbols, + hasSymbols: hasSymbols, + nonSymbolPrimitives: nonSymbolPrimitives, + nonNumberPrimitives: nonNumberPrimitives, + nonNullPrimitives: nonNullPrimitives, + nonUndefinedPrimitives: nonUndefinedPrimitives, + nonStrings: nonStrings, + nonNumbers: nonNumberPrimitives.concat(objects), + nonIntegerNumbers: nonIntegerNumbers, + primitives: primitives, + nonPropertyKeys: nonPropertyKeys, + propertyKeys: propertyKeys, + nonBooleans: nonBooleans, + falsies: falsies, + truthies: truthies +}; diff --git a/deps/npm/node_modules/es-abstract/test/index.js b/deps/npm/node_modules/es-abstract/test/index.js new file mode 100644 index 00000000000000..63271ac2006c60 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/index.js @@ -0,0 +1,28 @@ +'use strict'; + +var ES = require('../'); +var test = require('tape'); + +var ESkeys = Object.keys(ES).sort(); +var ES6keys = Object.keys(ES.ES6).sort(); + +test('exposed properties', function (t) { + t.deepEqual(ESkeys, ES6keys.concat(['ES2017', 'ES7', 'ES2016', 'ES6', 'ES2015', 'ES5']).sort(), 'main ES object keys match ES6 keys'); + t.end(); +}); + +test('methods match', function (t) { + ES6keys.forEach(function (key) { + t.equal(ES.ES6[key], ES[key], 'method ' + key + ' on main ES object is ES6 method'); + }); + t.end(); +}); + +require('./GetIntrinsic'); + +require('./es5'); +require('./es6'); +require('./es2015'); +require('./es7'); +require('./es2016'); +require('./es2017'); diff --git a/deps/npm/node_modules/es-abstract/test/tests.js b/deps/npm/node_modules/es-abstract/test/tests.js new file mode 100644 index 00000000000000..df52c82c7aafd3 --- /dev/null +++ b/deps/npm/node_modules/es-abstract/test/tests.js @@ -0,0 +1,1610 @@ +'use strict'; + +var test = require('tape'); + +var forEach = require('foreach'); +var is = require('object-is'); +var debug = require('object-inspect'); +var assign = require('object.assign'); + +var v = require('./helpers/values'); +var diffOps = require('./diffOps'); + +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1; + +var getArraySubclassWithSpeciesConstructor = function getArraySubclass(speciesConstructor) { + var Bar = function Bar() { + var inst = []; + Object.setPrototypeOf(inst, Bar.prototype); + Object.defineProperty(inst, 'constructor', { value: Bar }); + return inst; + }; + Bar.prototype = Object.create(Array.prototype); + Object.setPrototypeOf(Bar, Array); + Object.defineProperty(Bar, Symbol.species, { value: speciesConstructor }); + + return Bar; +}; + +var hasSpecies = v.hasSymbols && Symbol.species; + +var hasGroups = 'groups' in (/a/).exec('a'); +var groups = function groups(matchObject) { + return hasGroups ? assign(matchObject, { groups: matchObject.groups }) : matchObject; +}; + +var es2015 = function ES2015(ES, ops, expectedMissing) { + test('has expected operations', function (t) { + var diff = diffOps(ES, ops, expectedMissing); + + t.deepEqual(diff.extra, [], 'no extra ops'); + + t.deepEqual(diff.missing, [], 'no unexpected missing ops'); + + t.end(); + }); + + test('ToPrimitive', function (t) { + t.test('primitives', function (st) { + var testPrimitive = function (primitive) { + st.ok(is(ES.ToPrimitive(primitive), primitive), debug(primitive) + ' is returned correctly'); + }; + forEach(v.primitives, testPrimitive); + st.end(); + }); + + t.test('objects', function (st) { + st.equal(ES.ToPrimitive(v.coercibleObject), 3, 'coercibleObject with no hint coerces to valueOf'); + st.ok(is(ES.ToPrimitive({}), '[object Object]'), '{} with no hint coerces to Object#toString'); + st.equal(ES.ToPrimitive(v.coercibleObject, Number), 3, 'coercibleObject with hint Number coerces to valueOf'); + st.ok(is(ES.ToPrimitive({}, Number), '[object Object]'), '{} with hint Number coerces to NaN'); + st.equal(ES.ToPrimitive(v.coercibleObject, String), 42, 'coercibleObject with hint String coerces to nonstringified toString'); + st.equal(ES.ToPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); + st.equal(ES.ToPrimitive(v.toStringOnlyObject), 7, 'toStringOnlyObject returns non-stringified toString'); + st.equal(ES.ToPrimitive(v.valueOfOnlyObject), 4, 'valueOfOnlyObject returns valueOf'); + st['throws'](function () { return ES.ToPrimitive(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws a TypeError'); + st.end(); + }); + + t.test('dates', function (st) { + var invalid = new Date(NaN); + st.equal(ES.ToPrimitive(invalid), Date.prototype.toString.call(invalid), 'invalid Date coerces to Date#toString'); + var now = new Date(); + st.equal(ES.ToPrimitive(now), Date.prototype.toString.call(now), 'Date coerces to Date#toString'); + st.end(); + }); + + t.end(); + }); + + test('ToBoolean', function (t) { + t.equal(false, ES.ToBoolean(undefined), 'undefined coerces to false'); + t.equal(false, ES.ToBoolean(null), 'null coerces to false'); + t.equal(false, ES.ToBoolean(false), 'false returns false'); + t.equal(true, ES.ToBoolean(true), 'true returns true'); + + t.test('numbers', function (st) { + forEach([0, -0, NaN], function (falsyNumber) { + st.equal(false, ES.ToBoolean(falsyNumber), 'falsy number ' + falsyNumber + ' coerces to false'); + }); + forEach([Infinity, 42, 1, -Infinity], function (truthyNumber) { + st.equal(true, ES.ToBoolean(truthyNumber), 'truthy number ' + truthyNumber + ' coerces to true'); + }); + + st.end(); + }); + + t.equal(false, ES.ToBoolean(''), 'empty string coerces to false'); + t.equal(true, ES.ToBoolean('foo'), 'nonempty string coerces to true'); + + t.test('objects', function (st) { + forEach(v.objects, function (obj) { + st.equal(true, ES.ToBoolean(obj), 'object coerces to true'); + }); + st.equal(true, ES.ToBoolean(v.uncoercibleObject), 'uncoercibleObject coerces to true'); + + st.end(); + }); + + t.end(); + }); + + test('ToNumber', function (t) { + t.ok(is(NaN, ES.ToNumber(undefined)), 'undefined coerces to NaN'); + t.ok(is(ES.ToNumber(null), 0), 'null coerces to +0'); + t.ok(is(ES.ToNumber(false), 0), 'false coerces to +0'); + t.equal(1, ES.ToNumber(true), 'true coerces to 1'); + + t.test('numbers', function (st) { + st.ok(is(NaN, ES.ToNumber(NaN)), 'NaN returns itself'); + forEach([0, -0, 42, Infinity, -Infinity], function (num) { + st.equal(num, ES.ToNumber(num), num + ' returns itself'); + }); + forEach(['foo', '0', '4a', '2.0', 'Infinity', '-Infinity'], function (numString) { + st.ok(is(+numString, ES.ToNumber(numString)), '"' + numString + '" coerces to ' + Number(numString)); + }); + st.end(); + }); + + t.test('objects', function (st) { + forEach(v.objects, function (object) { + st.ok(is(ES.ToNumber(object), ES.ToNumber(ES.ToPrimitive(object))), 'object ' + object + ' coerces to same as ToPrimitive of object does'); + }); + st['throws'](function () { return ES.ToNumber(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + st.end(); + }); + + t.test('binary literals', function (st) { + st.equal(ES.ToNumber('0b10'), 2, '0b10 is 2'); + st.equal(ES.ToNumber({ toString: function () { return '0b11'; } }), 3, 'Object that toStrings to 0b11 is 3'); + + st.equal(true, is(ES.ToNumber('0b12'), NaN), '0b12 is NaN'); + st.equal(true, is(ES.ToNumber({ toString: function () { return '0b112'; } }), NaN), 'Object that toStrings to 0b112 is NaN'); + st.end(); + }); + + t.test('octal literals', function (st) { + st.equal(ES.ToNumber('0o10'), 8, '0o10 is 8'); + st.equal(ES.ToNumber({ toString: function () { return '0o11'; } }), 9, 'Object that toStrings to 0o11 is 9'); + + st.equal(true, is(ES.ToNumber('0o18'), NaN), '0o18 is NaN'); + st.equal(true, is(ES.ToNumber({ toString: function () { return '0o118'; } }), NaN), 'Object that toStrings to 0o118 is NaN'); + st.end(); + }); + + t.test('signed hex numbers', function (st) { + st.equal(true, is(ES.ToNumber('-0xF'), NaN), '-0xF is NaN'); + st.equal(true, is(ES.ToNumber(' -0xF '), NaN), 'space-padded -0xF is NaN'); + st.equal(true, is(ES.ToNumber('+0xF'), NaN), '+0xF is NaN'); + st.equal(true, is(ES.ToNumber(' +0xF '), NaN), 'space-padded +0xF is NaN'); + + st.end(); + }); + + t.test('trimming of whitespace and non-whitespace characters', function (st) { + var whitespace = ' \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000'; + st.equal(0, ES.ToNumber(whitespace + 0 + whitespace), 'whitespace is trimmed'); + + // Zero-width space (zws), next line character (nel), and non-character (bom) are not whitespace. + var nonWhitespaces = { + '\\u0085': '\u0085', + '\\u200b': '\u200b', + '\\ufffe': '\ufffe' + }; + + forEach(nonWhitespaces, function (desc, nonWS) { + st.equal(true, is(ES.ToNumber(nonWS + 0 + nonWS), NaN), 'non-whitespace ' + desc + ' not trimmed'); + }); + + st.end(); + }); + + forEach(v.symbols, function (symbol) { + t['throws']( + function () { ES.ToNumber(symbol); }, + TypeError, + 'Symbols can’t be converted to a Number: ' + debug(symbol) + ); + }); + + t.test('dates', function (st) { + var invalid = new Date(NaN); + st.ok(is(ES.ToNumber(invalid), NaN), 'invalid Date coerces to NaN'); + var now = Date.now(); + st.equal(ES.ToNumber(new Date(now)), now, 'Date coerces to timestamp'); + st.end(); + }); + + t.end(); + }); + + test('ToInteger', function (t) { + t.ok(is(0, ES.ToInteger(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity, 42], function (num) { + t.ok(is(num, ES.ToInteger(num)), num + ' returns itself'); + t.ok(is(-num, ES.ToInteger(-num)), '-' + num + ' returns itself'); + }); + t.equal(3, ES.ToInteger(Math.PI), 'pi returns 3'); + t['throws'](function () { return ES.ToInteger(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.end(); + }); + + test('ToInt32', function (t) { + t.ok(is(0, ES.ToInt32(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity], function (num) { + t.ok(is(0, ES.ToInt32(num)), num + ' returns +0'); + t.ok(is(0, ES.ToInt32(-num)), '-' + num + ' returns +0'); + }); + t['throws'](function () { return ES.ToInt32(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.ok(is(ES.ToInt32(0x100000000), 0), '2^32 returns +0'); + t.ok(is(ES.ToInt32(0x100000000 - 1), -1), '2^32 - 1 returns -1'); + t.ok(is(ES.ToInt32(0x80000000), -0x80000000), '2^31 returns -2^31'); + t.ok(is(ES.ToInt32(0x80000000 - 1), 0x80000000 - 1), '2^31 - 1 returns 2^31 - 1'); + forEach([0, Infinity, NaN, 0x100000000, 0x80000000, 0x10000, 0x42], function (num) { + t.ok(is(ES.ToInt32(num), ES.ToInt32(ES.ToUint32(num))), 'ToInt32(x) === ToInt32(ToUint32(x)) for 0x' + num.toString(16)); + t.ok(is(ES.ToInt32(-num), ES.ToInt32(ES.ToUint32(-num))), 'ToInt32(x) === ToInt32(ToUint32(x)) for -0x' + num.toString(16)); + }); + t.end(); + }); + + test('ToUint32', function (t) { + t.ok(is(0, ES.ToUint32(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity], function (num) { + t.ok(is(0, ES.ToUint32(num)), num + ' returns +0'); + t.ok(is(0, ES.ToUint32(-num)), '-' + num + ' returns +0'); + }); + t['throws'](function () { return ES.ToUint32(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.ok(is(ES.ToUint32(0x100000000), 0), '2^32 returns +0'); + t.ok(is(ES.ToUint32(0x100000000 - 1), 0x100000000 - 1), '2^32 - 1 returns 2^32 - 1'); + t.ok(is(ES.ToUint32(0x80000000), 0x80000000), '2^31 returns 2^31'); + t.ok(is(ES.ToUint32(0x80000000 - 1), 0x80000000 - 1), '2^31 - 1 returns 2^31 - 1'); + forEach([0, Infinity, NaN, 0x100000000, 0x80000000, 0x10000, 0x42], function (num) { + t.ok(is(ES.ToUint32(num), ES.ToUint32(ES.ToInt32(num))), 'ToUint32(x) === ToUint32(ToInt32(x)) for 0x' + num.toString(16)); + t.ok(is(ES.ToUint32(-num), ES.ToUint32(ES.ToInt32(-num))), 'ToUint32(x) === ToUint32(ToInt32(x)) for -0x' + num.toString(16)); + }); + t.end(); + }); + + test('ToInt16', function (t) { + t.ok(is(0, ES.ToInt16(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity], function (num) { + t.ok(is(0, ES.ToInt16(num)), num + ' returns +0'); + t.ok(is(0, ES.ToInt16(-num)), '-' + num + ' returns +0'); + }); + t['throws'](function () { return ES.ToInt16(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.ok(is(ES.ToInt16(0x100000000), 0), '2^32 returns +0'); + t.ok(is(ES.ToInt16(0x100000000 - 1), -1), '2^32 - 1 returns -1'); + t.ok(is(ES.ToInt16(0x80000000), 0), '2^31 returns +0'); + t.ok(is(ES.ToInt16(0x80000000 - 1), -1), '2^31 - 1 returns -1'); + t.ok(is(ES.ToInt16(0x10000), 0), '2^16 returns +0'); + t.ok(is(ES.ToInt16(0x10000 - 1), -1), '2^16 - 1 returns -1'); + t.end(); + }); + + test('ToUint16', function (t) { + t.ok(is(0, ES.ToUint16(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity], function (num) { + t.ok(is(0, ES.ToUint16(num)), num + ' returns +0'); + t.ok(is(0, ES.ToUint16(-num)), '-' + num + ' returns +0'); + }); + t['throws'](function () { return ES.ToUint16(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.ok(is(ES.ToUint16(0x100000000), 0), '2^32 returns +0'); + t.ok(is(ES.ToUint16(0x100000000 - 1), 0x10000 - 1), '2^32 - 1 returns 2^16 - 1'); + t.ok(is(ES.ToUint16(0x80000000), 0), '2^31 returns +0'); + t.ok(is(ES.ToUint16(0x80000000 - 1), 0x10000 - 1), '2^31 - 1 returns 2^16 - 1'); + t.ok(is(ES.ToUint16(0x10000), 0), '2^16 returns +0'); + t.ok(is(ES.ToUint16(0x10000 - 1), 0x10000 - 1), '2^16 - 1 returns 2^16 - 1'); + t.end(); + }); + + test('ToInt8', function (t) { + t.ok(is(0, ES.ToInt8(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity], function (num) { + t.ok(is(0, ES.ToInt8(num)), num + ' returns +0'); + t.ok(is(0, ES.ToInt8(-num)), '-' + num + ' returns +0'); + }); + t['throws'](function () { return ES.ToInt8(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.ok(is(ES.ToInt8(0x100000000), 0), '2^32 returns +0'); + t.ok(is(ES.ToInt8(0x100000000 - 1), -1), '2^32 - 1 returns -1'); + t.ok(is(ES.ToInt8(0x80000000), 0), '2^31 returns +0'); + t.ok(is(ES.ToInt8(0x80000000 - 1), -1), '2^31 - 1 returns -1'); + t.ok(is(ES.ToInt8(0x10000), 0), '2^16 returns +0'); + t.ok(is(ES.ToInt8(0x10000 - 1), -1), '2^16 - 1 returns -1'); + t.ok(is(ES.ToInt8(0x100), 0), '2^8 returns +0'); + t.ok(is(ES.ToInt8(0x100 - 1), -1), '2^8 - 1 returns -1'); + t.ok(is(ES.ToInt8(0x10), 0x10), '2^4 returns 2^4'); + t.end(); + }); + + test('ToUint8', function (t) { + t.ok(is(0, ES.ToUint8(NaN)), 'NaN coerces to +0'); + forEach([0, Infinity], function (num) { + t.ok(is(0, ES.ToUint8(num)), num + ' returns +0'); + t.ok(is(0, ES.ToUint8(-num)), '-' + num + ' returns +0'); + }); + t['throws'](function () { return ES.ToUint8(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + t.ok(is(ES.ToUint8(0x100000000), 0), '2^32 returns +0'); + t.ok(is(ES.ToUint8(0x100000000 - 1), 0x100 - 1), '2^32 - 1 returns 2^8 - 1'); + t.ok(is(ES.ToUint8(0x80000000), 0), '2^31 returns +0'); + t.ok(is(ES.ToUint8(0x80000000 - 1), 0x100 - 1), '2^31 - 1 returns 2^8 - 1'); + t.ok(is(ES.ToUint8(0x10000), 0), '2^16 returns +0'); + t.ok(is(ES.ToUint8(0x10000 - 1), 0x100 - 1), '2^16 - 1 returns 2^8 - 1'); + t.ok(is(ES.ToUint8(0x100), 0), '2^8 returns +0'); + t.ok(is(ES.ToUint8(0x100 - 1), 0x100 - 1), '2^8 - 1 returns 2^16 - 1'); + t.ok(is(ES.ToUint8(0x10), 0x10), '2^4 returns 2^4'); + t.ok(is(ES.ToUint8(0x10 - 1), 0x10 - 1), '2^4 - 1 returns 2^4 - 1'); + t.end(); + }); + + test('ToUint8Clamp', function (t) { + t.ok(is(0, ES.ToUint8Clamp(NaN)), 'NaN coerces to +0'); + t.ok(is(0, ES.ToUint8Clamp(0)), '+0 returns +0'); + t.ok(is(0, ES.ToUint8Clamp(-0)), '-0 returns +0'); + t.ok(is(0, ES.ToUint8Clamp(-Infinity)), '-Infinity returns +0'); + t['throws'](function () { return ES.ToUint8Clamp(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + forEach([255, 256, 0x100000, Infinity], function (number) { + t.ok(is(255, ES.ToUint8Clamp(number)), number + ' coerces to 255'); + }); + t.equal(1, ES.ToUint8Clamp(1.49), '1.49 coerces to 1'); + t.equal(2, ES.ToUint8Clamp(1.5), '1.5 coerces to 2, because 2 is even'); + t.equal(2, ES.ToUint8Clamp(1.51), '1.51 coerces to 2'); + + t.equal(2, ES.ToUint8Clamp(2.49), '2.49 coerces to 2'); + t.equal(2, ES.ToUint8Clamp(2.5), '2.5 coerces to 2, because 2 is even'); + t.equal(3, ES.ToUint8Clamp(2.51), '2.51 coerces to 3'); + t.end(); + }); + + test('ToString', function (t) { + forEach(v.objects.concat(v.nonSymbolPrimitives), function (item) { + t.equal(ES.ToString(item), String(item), 'ES.ToString(' + debug(item) + ') ToStrings to String(' + debug(item) + ')'); + }); + + t['throws'](function () { return ES.ToString(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); + + forEach(v.symbols, function (symbol) { + t['throws'](function () { return ES.ToString(symbol); }, TypeError, debug(symbol) + ' throws'); + }); + t.end(); + }); + + test('ToObject', function (t) { + t['throws'](function () { return ES.ToObject(undefined); }, TypeError, 'undefined throws'); + t['throws'](function () { return ES.ToObject(null); }, TypeError, 'null throws'); + forEach(v.numbers, function (number) { + var obj = ES.ToObject(number); + t.equal(typeof obj, 'object', 'number ' + number + ' coerces to object'); + t.equal(true, obj instanceof Number, 'object of ' + number + ' is Number object'); + t.ok(is(obj.valueOf(), number), 'object of ' + number + ' coerces to ' + number); + }); + t.end(); + }); + + test('RequireObjectCoercible', function (t) { + t.equal(false, 'CheckObjectCoercible' in ES, 'CheckObjectCoercible -> RequireObjectCoercible in ES6'); + t['throws'](function () { return ES.RequireObjectCoercible(undefined); }, TypeError, 'undefined throws'); + t['throws'](function () { return ES.RequireObjectCoercible(null); }, TypeError, 'null throws'); + var isCoercible = function (value) { + t.doesNotThrow(function () { return ES.RequireObjectCoercible(value); }, debug(value) + ' does not throw'); + }; + forEach(v.objects.concat(v.nonNullPrimitives), isCoercible); + t.end(); + }); + + test('IsCallable', function (t) { + t.equal(true, ES.IsCallable(function () {}), 'function is callable'); + var nonCallables = [/a/g, {}, Object.prototype, NaN].concat(v.primitives); + forEach(nonCallables, function (nonCallable) { + t.equal(false, ES.IsCallable(nonCallable), debug(nonCallable) + ' is not callable'); + }); + t.end(); + }); + + test('SameValue', function (t) { + t.equal(true, ES.SameValue(NaN, NaN), 'NaN is SameValue as NaN'); + t.equal(false, ES.SameValue(0, -0), '+0 is not SameValue as -0'); + forEach(v.objects.concat(v.primitives), function (val) { + t.equal(val === val, ES.SameValue(val, val), debug(val) + ' is SameValue to itself'); + }); + t.end(); + }); + + test('SameValueZero', function (t) { + t.equal(true, ES.SameValueZero(NaN, NaN), 'NaN is SameValueZero as NaN'); + t.equal(true, ES.SameValueZero(0, -0), '+0 is SameValueZero as -0'); + forEach(v.objects.concat(v.primitives), function (val) { + t.equal(val === val, ES.SameValueZero(val, val), debug(val) + ' is SameValueZero to itself'); + }); + t.end(); + }); + + test('ToPropertyKey', function (t) { + forEach(v.objects.concat(v.nonSymbolPrimitives), function (value) { + t.equal(ES.ToPropertyKey(value), String(value), 'ToPropertyKey(value) === String(value) for non-Symbols'); + }); + + forEach(v.symbols, function (symbol) { + t.equal( + ES.ToPropertyKey(symbol), + symbol, + 'ToPropertyKey(' + debug(symbol) + ') === ' + debug(symbol) + ); + t.equal( + ES.ToPropertyKey(Object(symbol)), + symbol, + 'ToPropertyKey(' + debug(Object(symbol)) + ') === ' + debug(symbol) + ); + }); + + t.end(); + }); + + test('ToLength', function (t) { + t['throws'](function () { return ES.ToLength(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws a TypeError'); + t.equal(3, ES.ToLength(v.coercibleObject), 'coercibleObject coerces to 3'); + t.equal(42, ES.ToLength('42.5'), '"42.5" coerces to 42'); + t.equal(7, ES.ToLength(7.3), '7.3 coerces to 7'); + forEach([-0, -1, -42, -Infinity], function (negative) { + t.ok(is(0, ES.ToLength(negative)), negative + ' coerces to +0'); + }); + t.equal(MAX_SAFE_INTEGER, ES.ToLength(MAX_SAFE_INTEGER + 1), '2^53 coerces to 2^53 - 1'); + t.equal(MAX_SAFE_INTEGER, ES.ToLength(MAX_SAFE_INTEGER + 3), '2^53 + 2 coerces to 2^53 - 1'); + t.end(); + }); + + test('IsArray', function (t) { + t.equal(true, ES.IsArray([]), '[] is array'); + t.equal(false, ES.IsArray({}), '{} is not array'); + t.equal(false, ES.IsArray({ length: 1, 0: true }), 'arraylike object is not array'); + forEach(v.objects.concat(v.primitives), function (value) { + t.equal(false, ES.IsArray(value), debug(value) + ' is not array'); + }); + t.end(); + }); + + test('IsRegExp', function (t) { + forEach([/a/g, new RegExp('a', 'g')], function (regex) { + t.equal(true, ES.IsRegExp(regex), regex + ' is regex'); + }); + + forEach(v.objects.concat(v.primitives), function (nonRegex) { + t.equal(false, ES.IsRegExp(nonRegex), debug(nonRegex) + ' is not regex'); + }); + + t.test('Symbol.match', { skip: !v.hasSymbols || !Symbol.match }, function (st) { + var obj = {}; + obj[Symbol.match] = true; + st.equal(true, ES.IsRegExp(obj), 'object with truthy Symbol.match is regex'); + + var regex = /a/; + regex[Symbol.match] = false; + st.equal(false, ES.IsRegExp(regex), 'regex with falsy Symbol.match is not regex'); + + st.end(); + }); + + t.end(); + }); + + test('IsPropertyKey', function (t) { + forEach(v.numbers.concat(v.objects), function (notKey) { + t.equal(false, ES.IsPropertyKey(notKey), debug(notKey) + ' is not property key'); + }); + + t.equal(true, ES.IsPropertyKey('foo'), 'string is property key'); + + forEach(v.symbols, function (symbol) { + t.equal(true, ES.IsPropertyKey(symbol), debug(symbol) + ' is property key'); + }); + t.end(); + }); + + test('IsInteger', function (t) { + for (var i = -100; i < 100; i += 10) { + t.equal(true, ES.IsInteger(i), i + ' is integer'); + t.equal(false, ES.IsInteger(i + 0.2), (i + 0.2) + ' is not integer'); + } + t.equal(true, ES.IsInteger(-0), '-0 is integer'); + var notInts = v.nonNumbers.concat(v.nonIntegerNumbers, [Infinity, -Infinity, NaN, [], new Date()]); + forEach(notInts, function (notInt) { + t.equal(false, ES.IsInteger(notInt), debug(notInt) + ' is not integer'); + }); + t.equal(false, ES.IsInteger(v.uncoercibleObject), 'uncoercibleObject is not integer'); + t.end(); + }); + + test('IsExtensible', function (t) { + forEach(v.objects, function (object) { + t.equal(true, ES.IsExtensible(object), debug(object) + ' object is extensible'); + }); + forEach(v.primitives, function (primitive) { + t.equal(false, ES.IsExtensible(primitive), debug(primitive) + ' is not extensible'); + }); + if (Object.preventExtensions) { + t.equal(false, ES.IsExtensible(Object.preventExtensions({})), 'object with extensions prevented is not extensible'); + } + t.end(); + }); + + test('CanonicalNumericIndexString', function (t) { + var throwsOnNonString = function (notString) { + t['throws']( + function () { return ES.CanonicalNumericIndexString(notString); }, + TypeError, + debug(notString) + ' is not a string' + ); + }; + forEach(v.objects.concat(v.numbers), throwsOnNonString); + t.ok(is(-0, ES.CanonicalNumericIndexString('-0')), '"-0" returns -0'); + for (var i = -50; i < 50; i += 10) { + t.equal(i, ES.CanonicalNumericIndexString(String(i)), '"' + i + '" returns ' + i); + t.equal(undefined, ES.CanonicalNumericIndexString(String(i) + 'a'), '"' + i + 'a" returns undefined'); + } + t.end(); + }); + + test('IsConstructor', function (t) { + t.equal(true, ES.IsConstructor(function () {}), 'function is constructor'); + t.equal(false, ES.IsConstructor(/a/g), 'regex is not constructor'); + forEach(v.objects, function (object) { + t.equal(false, ES.IsConstructor(object), object + ' object is not constructor'); + }); + + try { + var foo = Function('return class Foo {}')(); // eslint-disable-line no-new-func + t.equal(ES.IsConstructor(foo), true, 'class is constructor'); + } catch (e) { + t.comment('SKIP: class syntax not supported.'); + } + t.end(); + }); + + test('Call', function (t) { + var receiver = {}; + var notFuncs = v.objects.concat(v.primitives).concat([/a/g, new RegExp('a', 'g')]); + t.plan(notFuncs.length + 4); + var throwsIfNotCallable = function (notFunc) { + t['throws']( + function () { return ES.Call(notFunc, receiver); }, + TypeError, + debug(notFunc) + ' (' + typeof notFunc + ') is not callable' + ); + }; + forEach(notFuncs, throwsIfNotCallable); + ES.Call(function (a, b) { + t.equal(this, receiver, 'context matches expected'); + t.deepEqual([a, b], [1, 2], 'named args are correct'); + t.equal(arguments.length, 3, 'extra argument was passed'); + t.equal(arguments[2], 3, 'extra argument was correct'); + }, receiver, [1, 2, 3]); + t.end(); + }); + + test('GetV', function (t) { + t['throws'](function () { return ES.GetV({ 7: 7 }, 7); }, TypeError, 'Throws a TypeError if `P` is not a property key'); + var obj = { a: function () {} }; + t.equal(ES.GetV(obj, 'a'), obj.a, 'returns property if it exists'); + t.equal(ES.GetV(obj, 'b'), undefined, 'returns undefiend if property does not exist'); + t.end(); + }); + + test('GetMethod', function (t) { + t['throws'](function () { return ES.GetMethod({ 7: 7 }, 7); }, TypeError, 'Throws a TypeError if `P` is not a property key'); + t.equal(ES.GetMethod({}, 'a'), undefined, 'returns undefined in property is undefined'); + t.equal(ES.GetMethod({ a: null }, 'a'), undefined, 'returns undefined if property is null'); + t.equal(ES.GetMethod({ a: undefined }, 'a'), undefined, 'returns undefined if property is undefined'); + var obj = { a: function () {} }; + t['throws'](function () { ES.GetMethod({ a: 'b' }, 'a'); }, TypeError, 'throws TypeError if property exists and is not callable'); + t.equal(ES.GetMethod(obj, 'a'), obj.a, 'returns property if it is callable'); + t.end(); + }); + + test('Get', function (t) { + t['throws'](function () { return ES.Get('a', 'a'); }, TypeError, 'Throws a TypeError if `O` is not an Object'); + t['throws'](function () { return ES.Get({ 7: 7 }, 7); }, TypeError, 'Throws a TypeError if `P` is not a property key'); + + var value = {}; + t.test('Symbols', { skip: !v.hasSymbols }, function (st) { + var sym = Symbol('sym'); + var obj = {}; + obj[sym] = value; + st.equal(ES.Get(obj, sym), value, 'returns property `P` if it exists on object `O`'); + st.end(); + }); + t.equal(ES.Get({ a: value }, 'a'), value, 'returns property `P` if it exists on object `O`'); + t.end(); + }); + + test('Type', { skip: !v.hasSymbols }, function (t) { + t.equal(ES.Type(Symbol.iterator), 'Symbol', 'Type(Symbol.iterator) is Symbol'); + t.end(); + }); + + test('SpeciesConstructor', function (t) { + t['throws'](function () { ES.SpeciesConstructor(null); }, TypeError); + t['throws'](function () { ES.SpeciesConstructor(undefined); }, TypeError); + + var defaultConstructor = function Foo() {}; + + t.equal( + ES.SpeciesConstructor({ constructor: undefined }, defaultConstructor), + defaultConstructor, + 'undefined constructor returns defaultConstructor' + ); + + t['throws']( + function () { return ES.SpeciesConstructor({ constructor: null }, defaultConstructor); }, + TypeError, + 'non-undefined non-object constructor throws' + ); + + t.test('with Symbol.species', { skip: !hasSpecies }, function (st) { + var Bar = function Bar() {}; + Bar[Symbol.species] = null; + + st.equal( + ES.SpeciesConstructor(new Bar(), defaultConstructor), + defaultConstructor, + 'undefined/null Symbol.species returns default constructor' + ); + + var Baz = function Baz() {}; + Baz[Symbol.species] = Bar; + st.equal( + ES.SpeciesConstructor(new Baz(), defaultConstructor), + Bar, + 'returns Symbol.species constructor value' + ); + + Baz[Symbol.species] = {}; + st['throws']( + function () { ES.SpeciesConstructor(new Baz(), defaultConstructor); }, + TypeError, + 'throws when non-constructor non-null non-undefined species value found' + ); + + st.end(); + }); + + t.end(); + }); + + var bothDescriptor = function () { + return { '[[Get]]': function () {}, '[[Value]]': true }; + }; + var accessorDescriptor = function () { + return { + '[[Get]]': function () {}, + '[[Enumerable]]': true, + '[[Configurable]]': true + }; + }; + var mutatorDescriptor = function () { + return { + '[[Set]]': function () {}, + '[[Enumerable]]': true, + '[[Configurable]]': true + }; + }; + var dataDescriptor = function () { + return { + '[[Value]]': 42, + '[[Writable]]': false + }; + }; + var genericDescriptor = function () { + return { + '[[Configurable]]': true, + '[[Enumerable]]': false + }; + }; + + test('IsPropertyDescriptor', function (t) { + forEach(v.nonUndefinedPrimitives, function (primitive) { + t.equal( + ES.IsPropertyDescriptor(primitive), + false, + debug(primitive) + ' is not a Property Descriptor' + ); + }); + + t.equal(ES.IsPropertyDescriptor({ invalid: true }), false, 'invalid keys not allowed on a Property Descriptor'); + + t.equal(ES.IsPropertyDescriptor({}), true, 'empty object is an incomplete Property Descriptor'); + + t.equal(ES.IsPropertyDescriptor(accessorDescriptor()), true, 'accessor descriptor is a Property Descriptor'); + t.equal(ES.IsPropertyDescriptor(mutatorDescriptor()), true, 'mutator descriptor is a Property Descriptor'); + t.equal(ES.IsPropertyDescriptor(dataDescriptor()), true, 'data descriptor is a Property Descriptor'); + t.equal(ES.IsPropertyDescriptor(genericDescriptor()), true, 'generic descriptor is a Property Descriptor'); + + t['throws'](function () { + ES.IsPropertyDescriptor(bothDescriptor()); + }, TypeError, 'a Property Descriptor can not be both a Data and an Accessor Descriptor'); + + t.end(); + }); + + test('IsAccessorDescriptor', function (t) { + forEach(v.nonUndefinedPrimitives, function (primitive) { + t['throws']( + function () { ES.IsAccessorDescriptor(primitive); }, + TypeError, + debug(primitive) + ' is not a Property Descriptor' + ); + }); + + t.equal(ES.IsAccessorDescriptor(), false, 'no value is not an Accessor Descriptor'); + t.equal(ES.IsAccessorDescriptor(undefined), false, 'undefined value is not an Accessor Descriptor'); + + t.equal(ES.IsAccessorDescriptor(accessorDescriptor()), true, 'accessor descriptor is an Accessor Descriptor'); + t.equal(ES.IsAccessorDescriptor(mutatorDescriptor()), true, 'mutator descriptor is an Accessor Descriptor'); + t.equal(ES.IsAccessorDescriptor(dataDescriptor()), false, 'data descriptor is not an Accessor Descriptor'); + t.equal(ES.IsAccessorDescriptor(genericDescriptor()), false, 'generic descriptor is not an Accessor Descriptor'); + + t.end(); + }); + + test('IsDataDescriptor', function (t) { + forEach(v.nonUndefinedPrimitives, function (primitive) { + t['throws']( + function () { ES.IsDataDescriptor(primitive); }, + TypeError, + debug(primitive) + ' is not a Property Descriptor' + ); + }); + + t.equal(ES.IsDataDescriptor(), false, 'no value is not a Data Descriptor'); + t.equal(ES.IsDataDescriptor(undefined), false, 'undefined value is not a Data Descriptor'); + + t.equal(ES.IsDataDescriptor(accessorDescriptor()), false, 'accessor descriptor is not a Data Descriptor'); + t.equal(ES.IsDataDescriptor(mutatorDescriptor()), false, 'mutator descriptor is not a Data Descriptor'); + t.equal(ES.IsDataDescriptor(dataDescriptor()), true, 'data descriptor is a Data Descriptor'); + t.equal(ES.IsDataDescriptor(genericDescriptor()), false, 'generic descriptor is not a Data Descriptor'); + + t.end(); + }); + + test('IsGenericDescriptor', function (t) { + forEach(v.nonUndefinedPrimitives, function (primitive) { + t['throws']( + function () { ES.IsGenericDescriptor(primitive); }, + TypeError, + debug(primitive) + ' is not a Property Descriptor' + ); + }); + + t.equal(ES.IsGenericDescriptor(), false, 'no value is not a Data Descriptor'); + t.equal(ES.IsGenericDescriptor(undefined), false, 'undefined value is not a Data Descriptor'); + + t.equal(ES.IsGenericDescriptor(accessorDescriptor()), false, 'accessor descriptor is not a generic Descriptor'); + t.equal(ES.IsGenericDescriptor(mutatorDescriptor()), false, 'mutator descriptor is not a generic Descriptor'); + t.equal(ES.IsGenericDescriptor(dataDescriptor()), false, 'data descriptor is not a generic Descriptor'); + + t.equal(ES.IsGenericDescriptor(genericDescriptor()), true, 'generic descriptor is a generic Descriptor'); + + t.end(); + }); + + test('FromPropertyDescriptor', function (t) { + t.equal(ES.FromPropertyDescriptor(), undefined, 'no value begets undefined'); + t.equal(ES.FromPropertyDescriptor(undefined), undefined, 'undefined value begets undefined'); + + forEach(v.nonUndefinedPrimitives, function (primitive) { + t['throws']( + function () { ES.FromPropertyDescriptor(primitive); }, + TypeError, + debug(primitive) + ' is not a Property Descriptor' + ); + }); + + var accessor = accessorDescriptor(); + t.deepEqual(ES.FromPropertyDescriptor(accessor), { + get: accessor['[[Get]]'], + set: accessor['[[Set]]'], + enumerable: !!accessor['[[Enumerable]]'], + configurable: !!accessor['[[Configurable]]'] + }); + + var mutator = mutatorDescriptor(); + t.deepEqual(ES.FromPropertyDescriptor(mutator), { + get: mutator['[[Get]]'], + set: mutator['[[Set]]'], + enumerable: !!mutator['[[Enumerable]]'], + configurable: !!mutator['[[Configurable]]'] + }); + var data = dataDescriptor(); + t.deepEqual(ES.FromPropertyDescriptor(data), { + value: data['[[Value]]'], + writable: data['[[Writable]]'], + enumerable: !!data['[[Enumerable]]'], + configurable: !!data['[[Configurable]]'] + }); + + t['throws']( + function () { ES.FromPropertyDescriptor(genericDescriptor()); }, + TypeError, + 'a complete Property Descriptor is required' + ); + + t.end(); + }); + + test('ToPropertyDescriptor', function (t) { + forEach(v.nonUndefinedPrimitives, function (primitive) { + t['throws']( + function () { ES.ToPropertyDescriptor(primitive); }, + TypeError, + debug(primitive) + ' is not an Object' + ); + }); + + var accessor = accessorDescriptor(); + t.deepEqual(ES.ToPropertyDescriptor({ + get: accessor['[[Get]]'], + enumerable: !!accessor['[[Enumerable]]'], + configurable: !!accessor['[[Configurable]]'] + }), accessor); + + var mutator = mutatorDescriptor(); + t.deepEqual(ES.ToPropertyDescriptor({ + set: mutator['[[Set]]'], + enumerable: !!mutator['[[Enumerable]]'], + configurable: !!mutator['[[Configurable]]'] + }), mutator); + + var data = dataDescriptor(); + t.deepEqual(ES.ToPropertyDescriptor({ + value: data['[[Value]]'], + writable: data['[[Writable]]'], + configurable: !!data['[[Configurable]]'] + }), assign(data, { '[[Configurable]]': false })); + + var both = bothDescriptor(); + t['throws']( + function () { + ES.FromPropertyDescriptor({ get: both['[[Get]]'], value: both['[[Value]]'] }); + }, + TypeError, + 'data and accessor descriptors are mutually exclusive' + ); + + t.end(); + }); + + test('CompletePropertyDescriptor', function (t) { + forEach(v.nonUndefinedPrimitives, function (primitive) { + t['throws']( + function () { ES.CompletePropertyDescriptor(primitive); }, + TypeError, + debug(primitive) + ' is not a Property Descriptor' + ); + }); + + var generic = genericDescriptor(); + t.deepEqual(ES.CompletePropertyDescriptor(generic), { + '[[Configurable]]': !!generic['[[Configurable]]'], + '[[Enumerable]]': !!generic['[[Enumerable]]'], + '[[Value]]': undefined, + '[[Writable]]': false + }, 'completes a Generic Descriptor'); + + var data = dataDescriptor(); + t.deepEqual(ES.CompletePropertyDescriptor(data), { + '[[Configurable]]': !!data['[[Configurable]]'], + '[[Enumerable]]': false, + '[[Value]]': data['[[Value]]'], + '[[Writable]]': !!data['[[Writable]]'] + }, 'completes a Data Descriptor'); + + var accessor = accessorDescriptor(); + t.deepEqual(ES.CompletePropertyDescriptor(accessor), { + '[[Get]]': accessor['[[Get]]'], + '[[Enumerable]]': !!accessor['[[Enumerable]]'], + '[[Configurable]]': !!accessor['[[Configurable]]'], + '[[Set]]': undefined + }, 'completes an Accessor Descriptor'); + + var mutator = mutatorDescriptor(); + t.deepEqual(ES.CompletePropertyDescriptor(mutator), { + '[[Set]]': mutator['[[Set]]'], + '[[Enumerable]]': !!mutator['[[Enumerable]]'], + '[[Configurable]]': !!mutator['[[Configurable]]'], + '[[Get]]': undefined + }, 'completes a mutator Descriptor'); + + t['throws']( + function () { ES.CompletePropertyDescriptor(bothDescriptor()); }, + TypeError, + 'data and accessor descriptors are mutually exclusive' + ); + + t.end(); + }); + + test('Set', function (t) { + forEach(v.primitives, function (primitive) { + t['throws']( + function () { ES.Set(primitive, '', null, false); }, + TypeError, + debug(primitive) + ' is not an Object' + ); + }); + + forEach(v.nonPropertyKeys, function (nonKey) { + t['throws']( + function () { ES.Set({}, nonKey, null, false); }, + TypeError, + debug(nonKey) + ' is not a Property Key' + ); + }); + + forEach(v.nonBooleans, function (nonBoolean) { + t['throws']( + function () { ES.Set({}, '', null, nonBoolean); }, + TypeError, + debug(nonBoolean) + ' is not a Boolean' + ); + }); + + var o = {}; + var value = {}; + ES.Set(o, 'key', value, true); + t.deepEqual(o, { key: value }, 'key is set'); + + t.test('nonwritable', { skip: !Object.defineProperty }, function (st) { + var obj = { a: value }; + Object.defineProperty(obj, 'a', { writable: false }); + + st['throws']( + function () { ES.Set(obj, 'a', value, true); }, + TypeError, + 'can not Set nonwritable property' + ); + + st.doesNotThrow( + function () { ES.Set(obj, 'a', value, false); }, + 'setting Throw to false prevents an exception' + ); + + st.end(); + }); + + t.test('nonconfigurable', { skip: !Object.defineProperty }, function (st) { + var obj = { a: value }; + Object.defineProperty(obj, 'a', { configurable: false }); + + ES.Set(obj, 'a', value, true); + st.deepEqual(obj, { a: value }, 'key is set'); + + st.end(); + }); + + t.end(); + }); + + test('HasOwnProperty', function (t) { + forEach(v.primitives, function (primitive) { + t['throws']( + function () { ES.HasOwnProperty(primitive, 'key'); }, + TypeError, + debug(primitive) + ' is not an Object' + ); + }); + + forEach(v.nonPropertyKeys, function (nonKey) { + t['throws']( + function () { ES.HasOwnProperty({}, nonKey); }, + TypeError, + debug(nonKey) + ' is not a Property Key' + ); + }); + + t.equal(ES.HasOwnProperty({}, 'toString'), false, 'inherited properties are not own'); + t.equal( + ES.HasOwnProperty({ toString: 1 }, 'toString'), + true, + 'shadowed inherited own properties are own' + ); + t.equal(ES.HasOwnProperty({ a: 1 }, 'a'), true, 'own properties are own'); + + t.end(); + }); + + test('HasProperty', function (t) { + forEach(v.primitives, function (primitive) { + t['throws']( + function () { ES.HasProperty(primitive, 'key'); }, + TypeError, + debug(primitive) + ' is not an Object' + ); + }); + + forEach(v.nonPropertyKeys, function (nonKey) { + t['throws']( + function () { ES.HasProperty({}, nonKey); }, + TypeError, + debug(nonKey) + ' is not a Property Key' + ); + }); + + t.equal(ES.HasProperty({}, 'nope'), false, 'object does not have nonexistent properties'); + t.equal(ES.HasProperty({}, 'toString'), true, 'object has inherited properties'); + t.equal( + ES.HasProperty({ toString: 1 }, 'toString'), + true, + 'object has shadowed inherited own properties' + ); + t.equal(ES.HasProperty({ a: 1 }, 'a'), true, 'object has own properties'); + + t.end(); + }); + + test('IsConcatSpreadable', function (t) { + forEach(v.primitives, function (primitive) { + t.equal(ES.IsConcatSpreadable(primitive), false, debug(primitive) + ' is not an Object'); + }); + + var hasSymbolConcatSpreadable = v.hasSymbols && Symbol.isConcatSpreadable; + t.test('Symbol.isConcatSpreadable', { skip: !hasSymbolConcatSpreadable }, function (st) { + forEach(v.falsies, function (falsy) { + var obj = {}; + obj[Symbol.isConcatSpreadable] = falsy; + st.equal( + ES.IsConcatSpreadable(obj), + false, + 'an object with ' + debug(falsy) + ' as Symbol.isConcatSpreadable is not concat spreadable' + ); + }); + + forEach(v.truthies, function (truthy) { + var obj = {}; + obj[Symbol.isConcatSpreadable] = truthy; + st.equal( + ES.IsConcatSpreadable(obj), + true, + 'an object with ' + debug(truthy) + ' as Symbol.isConcatSpreadable is concat spreadable' + ); + }); + + st.end(); + }); + + forEach(v.objects, function (object) { + t.equal( + ES.IsConcatSpreadable(object), + false, + 'non-array without Symbol.isConcatSpreadable is not concat spreadable' + ); + }); + + t.equal(ES.IsConcatSpreadable([]), true, 'arrays are concat spreadable'); + + t.end(); + }); + + test('Invoke', function (t) { + forEach(v.nonPropertyKeys, function (nonKey) { + t['throws']( + function () { ES.Invoke({}, nonKey); }, + TypeError, + debug(nonKey) + ' is not a Property Key' + ); + }); + + t['throws'](function () { ES.Invoke({ o: false }, 'o'); }, TypeError, 'fails on a non-function'); + + t.test('invoked callback', function (st) { + var aValue = {}; + var bValue = {}; + var obj = { + f: function (a) { + st.equal(arguments.length, 2, '2 args passed'); + st.equal(a, aValue, 'first arg is correct'); + st.equal(arguments[1], bValue, 'second arg is correct'); + } + }; + st.plan(3); + ES.Invoke(obj, 'f', aValue, bValue); + }); + + t.end(); + }); + + test('GetIterator', { skip: true }); + + test('IteratorNext', { skip: true }); + + test('IteratorComplete', { skip: true }); + + test('IteratorValue', { skip: true }); + + test('IteratorStep', { skip: true }); + + test('IteratorClose', { skip: true }); + + test('CreateIterResultObject', function (t) { + forEach(v.nonBooleans, function (nonBoolean) { + t['throws']( + function () { ES.CreateIterResultObject({}, nonBoolean); }, + TypeError, + '"done" argument must be a boolean; ' + debug(nonBoolean) + ' is not' + ); + }); + + var value = {}; + t.deepEqual(ES.CreateIterResultObject(value, true), { + value: value, + done: true + }, 'creates a "done" iteration result'); + t.deepEqual(ES.CreateIterResultObject(value, false), { + value: value, + done: false + }, 'creates a "not done" iteration result'); + + t.end(); + }); + + test('RegExpExec', function (t) { + forEach(v.primitives, function (primitive) { + t['throws']( + function () { ES.RegExpExec(primitive); }, + TypeError, + '"R" argument must be an object; ' + debug(primitive) + ' is not' + ); + }); + + forEach(v.nonStrings, function (nonString) { + t['throws']( + function () { ES.RegExpExec({}, nonString); }, + TypeError, + '"S" argument must be a String; ' + debug(nonString) + ' is not' + ); + }); + + t.test('gets and calls a callable "exec"', function (st) { + var str = '123'; + var o = { + exec: function (S) { + st.equal(this, o, '"exec" receiver is R'); + st.equal(S, str, '"exec" argument is S'); + + return null; + } + }; + st.plan(2); + ES.RegExpExec(o, str); + st.end(); + }); + + t.test('throws if a callable "exec" returns a non-null non-object', function (st) { + var str = '123'; + st.plan(v.nonNullPrimitives.length); + forEach(v.nonNullPrimitives, function (nonNullPrimitive) { + st['throws']( + function () { ES.RegExpExec({ exec: function () { return nonNullPrimitive; } }, str); }, + TypeError, + '"exec" method must return `null` or an Object; ' + debug(nonNullPrimitive) + ' is not' + ); + }); + st.end(); + }); + + t.test('actual regex that should match against a string', function (st) { + var S = 'aabc'; + var R = /a/g; + var match1 = ES.RegExpExec(R, S); + var match2 = ES.RegExpExec(R, S); + var match3 = ES.RegExpExec(R, S); + st.deepEqual(match1, assign(['a'], groups({ index: 0, input: S })), 'match object 1 is as expected'); + st.deepEqual(match2, assign(['a'], groups({ index: 1, input: S })), 'match object 2 is as expected'); + st.equal(match3, null, 'match 3 is null as expected'); + st.end(); + }); + + t.test('actual regex that should match against a string, with shadowed "exec"', function (st) { + var S = 'aabc'; + var R = /a/g; + R.exec = undefined; + var match1 = ES.RegExpExec(R, S); + var match2 = ES.RegExpExec(R, S); + var match3 = ES.RegExpExec(R, S); + st.deepEqual(match1, assign(['a'], groups({ index: 0, input: S })), 'match object 1 is as expected'); + st.deepEqual(match2, assign(['a'], groups({ index: 1, input: S })), 'match object 2 is as expected'); + st.equal(match3, null, 'match 3 is null as expected'); + st.end(); + }); + t.end(); + }); + + test('ArraySpeciesCreate', function (t) { + t.test('errors', function (st) { + var testNonNumber = function (nonNumber) { + st['throws']( + function () { ES.ArraySpeciesCreate([], nonNumber); }, + TypeError, + debug(nonNumber) + ' is not a number' + ); + }; + forEach(v.nonNumbers, testNonNumber); + + st['throws']( + function () { ES.ArraySpeciesCreate([], -1); }, + TypeError, + '-1 is not >= 0' + ); + st['throws']( + function () { ES.ArraySpeciesCreate([], -Infinity); }, + TypeError, + '-Infinity is not >= 0' + ); + + var testNonIntegers = function (nonInteger) { + st['throws']( + function () { ES.ArraySpeciesCreate([], nonInteger); }, + TypeError, + debug(nonInteger) + ' is not an integer' + ); + }; + forEach(v.nonIntegerNumbers, testNonIntegers); + + st.end(); + }); + + t.test('works with a non-array', function (st) { + forEach(v.objects.concat(v.primitives), function (nonArray) { + var arr = ES.ArraySpeciesCreate(nonArray, 0); + st.ok(ES.IsArray(arr), 'is an array'); + st.equal(arr.length, 0, 'length is correct'); + st.equal(arr.constructor, Array, 'constructor is correct'); + }); + + st.end(); + }); + + t.test('works with a normal array', function (st) { + var len = 2; + var orig = [1, 2, 3]; + var arr = ES.ArraySpeciesCreate(orig, len); + + st.ok(ES.IsArray(arr), 'is an array'); + st.equal(arr.length, len, 'length is correct'); + st.equal(arr.constructor, orig.constructor, 'constructor is correct'); + + st.end(); + }); + + t.test('-0 length produces +0 length', function (st) { + var len = -0; + st.ok(is(len, -0), '-0 is negative zero'); + st.notOk(is(len, 0), '-0 is not positive zero'); + + var orig = [1, 2, 3]; + var arr = ES.ArraySpeciesCreate(orig, len); + + st.equal(ES.IsArray(arr), true); + st.ok(is(arr.length, 0)); + st.equal(arr.constructor, orig.constructor); + + st.end(); + }); + + t.test('works with species construtor', { skip: !hasSpecies }, function (st) { + var sentinel = {}; + var Foo = function Foo(len) { + this.length = len; + this.sentinel = sentinel; + }; + var Bar = getArraySubclassWithSpeciesConstructor(Foo); + var bar = new Bar(); + + t.equal(ES.IsArray(bar), true, 'Bar instance is an array'); + + var arr = ES.ArraySpeciesCreate(bar, 3); + st.equal(arr.constructor, Foo, 'result used species constructor'); + st.equal(arr.length, 3, 'length property is correct'); + st.equal(arr.sentinel, sentinel, 'Foo constructor was exercised'); + + st.end(); + }); + + t.test('works with null species constructor', { skip: !hasSpecies }, function (st) { + var Bar = getArraySubclassWithSpeciesConstructor(null); + var bar = new Bar(); + + t.equal(ES.IsArray(bar), true, 'Bar instance is an array'); + + var arr = ES.ArraySpeciesCreate(bar, 3); + st.equal(arr.constructor, Array, 'result used default constructor'); + st.equal(arr.length, 3, 'length property is correct'); + + st.end(); + }); + + t.test('works with undefined species constructor', { skip: !hasSpecies }, function (st) { + var Bar = getArraySubclassWithSpeciesConstructor(); + var bar = new Bar(); + + t.equal(ES.IsArray(bar), true, 'Bar instance is an array'); + + var arr = ES.ArraySpeciesCreate(bar, 3); + st.equal(arr.constructor, Array, 'result used default constructor'); + st.equal(arr.length, 3, 'length property is correct'); + + st.end(); + }); + + t.test('throws with object non-construtor species constructor', { skip: !hasSpecies }, function (st) { + forEach(v.objects, function (obj) { + var Bar = getArraySubclassWithSpeciesConstructor(obj); + var bar = new Bar(); + + st.equal(ES.IsArray(bar), true, 'Bar instance is an array'); + + st['throws']( + function () { ES.ArraySpeciesCreate(bar, 3); }, + TypeError, + debug(obj) + ' is not a constructor' + ); + }); + + st.end(); + }); + + t.end(); + }); + + test('CreateDataProperty', function (t) { + forEach(v.primitives, function (primitive) { + t['throws']( + function () { ES.CreateDataProperty(primitive); }, + TypeError, + debug(primitive) + ' is not an object' + ); + }); + + forEach(v.nonPropertyKeys, function (nonPropertyKey) { + t['throws']( + function () { ES.CreateDataProperty({}, nonPropertyKey); }, + TypeError, + debug(nonPropertyKey) + ' is not a property key' + ); + }); + + var sentinel = {}; + forEach(v.propertyKeys, function (propertyKey) { + var obj = {}; + var status = ES.CreateDataProperty(obj, propertyKey, sentinel); + t.equal(status, true, 'status is true'); + t.equal( + obj[propertyKey], + sentinel, + debug(sentinel) + ' is installed on "' + debug(propertyKey) + '" on the object' + ); + + if (typeof Object.defineProperty === 'function') { + var nonWritable = Object.defineProperty({}, propertyKey, { configurable: true, writable: false }); + + var nonWritableStatus = ES.CreateDataProperty(nonWritable, propertyKey, sentinel); + t.equal(nonWritableStatus, false, 'create data property failed'); + t.notEqual( + nonWritable[propertyKey], + sentinel, + debug(sentinel) + ' is not installed on "' + debug(propertyKey) + '" on the object when key is nonwritable' + ); + + var nonConfigurable = Object.defineProperty({}, propertyKey, { configurable: false, writable: true }); + + var nonConfigurableStatus = ES.CreateDataProperty(nonConfigurable, propertyKey, sentinel); + t.equal(nonConfigurableStatus, false, 'create data property failed'); + t.notEqual( + nonConfigurable[propertyKey], + sentinel, + debug(sentinel) + ' is not installed on "' + debug(propertyKey) + '" on the object when key is nonconfigurable' + ); + } + }); + + t.end(); + }); + + test('CreateDataPropertyOrThrow', function (t) { + forEach(v.primitives, function (primitive) { + t['throws']( + function () { ES.CreateDataPropertyOrThrow(primitive); }, + TypeError, + debug(primitive) + ' is not an object' + ); + }); + + forEach(v.nonPropertyKeys, function (nonPropertyKey) { + t['throws']( + function () { ES.CreateDataPropertyOrThrow({}, nonPropertyKey); }, + TypeError, + debug(nonPropertyKey) + ' is not a property key' + ); + }); + + var sentinel = {}; + forEach(v.propertyKeys, function (propertyKey) { + var obj = {}; + var status = ES.CreateDataPropertyOrThrow(obj, propertyKey, sentinel); + t.equal(status, true, 'status is true'); + t.equal( + obj[propertyKey], + sentinel, + debug(sentinel) + ' is installed on "' + debug(propertyKey) + '" on the object' + ); + + if (typeof Object.preventExtensions === 'function') { + var notExtensible = {}; + Object.preventExtensions(notExtensible); + + t['throws']( + function () { ES.CreateDataPropertyOrThrow(notExtensible, propertyKey, sentinel); }, + TypeError, + 'can not install ' + debug(propertyKey) + ' on non-extensible object' + ); + t.notEqual( + notExtensible[propertyKey], + sentinel, + debug(sentinel) + ' is not installed on "' + debug(propertyKey) + '" on the object' + ); + } + }); + + t.end(); + }); + + test('ObjectCreate', function (t) { + forEach(v.nonNullPrimitives, function (value) { + t['throws']( + function () { ES.ObjectCreate(value); }, + TypeError, + debug(value) + ' is not null, or an object' + ); + }); + + t.test('proto arg', function (st) { + var Parent = function Parent() {}; + Parent.prototype.foo = {}; + var child = ES.ObjectCreate(Parent.prototype); + st.equal(child instanceof Parent, true, 'child is instanceof Parent'); + st.equal(child.foo, Parent.prototype.foo, 'child inherits properties from Parent.prototype'); + + st.end(); + }); + + t.test('internal slots arg', function (st) { + st.doesNotThrow(function () { ES.ObjectCreate(null, []); }, 'an empty slot list is valid'); + + st['throws']( + function () { ES.ObjectCreate(null, ['a']); }, + SyntaxError, + 'internal slots are not supported' + ); + + st.end(); + }); + + t.test('null proto', { skip: !Object.create }, function (st) { + st.equal('toString' in ({}), true, 'normal objects have toString'); + st.equal('toString' in ES.ObjectCreate(null), false, 'makes a null object'); + + st.end(); + }); + + t.test('null proto when no native Object.create', { skip: Object.create }, function (st) { + st['throws']( + function () { ES.ObjectCreate(null); }, + SyntaxError, + 'without a native Object.create, can not create null objects' + ); + + st.end(); + }); + + t.end(); + }); + + test('AdvanceStringIndex', function (t) { + forEach(v.nonStrings, function (nonString) { + t['throws']( + function () { ES.AdvanceStringIndex(nonString); }, + TypeError, + '"S" argument must be a String; ' + debug(nonString) + ' is not' + ); + }); + + var notInts = v.nonNumbers.concat( + v.nonIntegerNumbers, + [Infinity, -Infinity, NaN, [], new Date(), Math.pow(2, 53), -1] + ); + forEach(notInts, function (nonInt) { + t['throws']( + function () { ES.AdvanceStringIndex('abc', nonInt); }, + TypeError, + '"index" argument must be an integer, ' + debug(nonInt) + ' is not.' + ); + }); + + forEach(v.nonBooleans, function (nonBoolean) { + t['throws']( + function () { ES.AdvanceStringIndex('abc', 0, nonBoolean); }, + TypeError, + debug(nonBoolean) + ' is not a Boolean' + ); + }); + + var str = 'a\uD83D\uDCA9c'; + + t.test('non-unicode mode', function (st) { + for (var i = 0; i < str.length + 2; i += 1) { + st.equal(ES.AdvanceStringIndex(str, i, false), i + 1, i + ' advances to ' + (i + 1)); + } + + st.end(); + }); + + t.test('unicode mode', function (st) { + st.equal(ES.AdvanceStringIndex(str, 0, true), 1, '0 advances to 1'); + st.equal(ES.AdvanceStringIndex(str, 1, true), 3, '1 advances to 3'); + st.equal(ES.AdvanceStringIndex(str, 2, true), 3, '2 advances to 3'); + st.equal(ES.AdvanceStringIndex(str, 3, true), 4, '3 advances to 4'); + st.equal(ES.AdvanceStringIndex(str, 4, true), 5, '4 advances to 5'); + + st.end(); + }); + + t.test('lone surrogates', function (st) { + var halfPoo = 'a\uD83Dc'; + + st.equal(ES.AdvanceStringIndex(halfPoo, 0, true), 1, '0 advances to 1'); + st.equal(ES.AdvanceStringIndex(halfPoo, 1, true), 2, '1 advances to 2'); + st.equal(ES.AdvanceStringIndex(halfPoo, 2, true), 3, '2 advances to 3'); + st.equal(ES.AdvanceStringIndex(halfPoo, 3, true), 4, '3 advances to 4'); + + st.end(); + }); + + t.test('surrogate pairs', function (st) { + var lowestPair = String.fromCharCode('0xD800') + String.fromCharCode('0xDC00'); + var highestPair = String.fromCharCode('0xDBFF') + String.fromCharCode('0xDFFF'); + var poop = String.fromCharCode('0xD83D') + String.fromCharCode('0xDCA9'); + + st.equal(ES.AdvanceStringIndex(lowestPair, 0, true), 2, 'lowest surrogate pair, 0 -> 2'); + st.equal(ES.AdvanceStringIndex(highestPair, 0, true), 2, 'highest surrogate pair, 0 -> 2'); + st.equal(ES.AdvanceStringIndex(poop, 0, true), 2, 'poop, 0 -> 2'); + + st.end(); + }); + + t.end(); + }); +}; + +var es2016 = function ES2016(ES, ops, expectedMissing) { + es2015(ES, ops, expectedMissing); + + test('SameValueNonNumber', function (t) { + var willThrow = [ + [3, 4], + [NaN, 4], + [4, ''], + ['abc', true], + [{}, false] + ]; + forEach(willThrow, function (nums) { + t['throws'](function () { return ES.SameValueNonNumber.apply(ES, nums); }, TypeError, 'value must be same type and non-number'); + }); + + forEach(v.objects.concat(v.nonNumberPrimitives), function (val) { + t.equal(val === val, ES.SameValueNonNumber(val, val), debug(val) + ' is SameValueNonNumber to itself'); + }); + + t.end(); + }); +}; + +var es2017 = function E2017(ES, ops, expectedMissing) { + es2016(ES, ops, expectedMissing); + + test('ToIndex', function (t) { + t.ok(is(ES.ToIndex(), 0), 'no value gives 0'); + t.ok(is(ES.ToIndex(undefined), 0), 'undefined value gives 0'); + + t['throws'](function () { ES.ToIndex(-1); }, RangeError, 'negative numbers throw'); + + t['throws'](function () { ES.ToIndex(MAX_SAFE_INTEGER + 1); }, RangeError, 'too large numbers throw'); + + t.equal(ES.ToIndex(3), 3, 'numbers work'); + t.equal(ES.ToIndex(v.valueOfOnlyObject), 4, 'coercible objects are coerced'); + + t.end(); + }); +}; + +module.exports = { + es2015: es2015, + es2016: es2016, + es2017: es2017 +}; diff --git a/deps/npm/node_modules/es-to-primitive/.editorconfig b/deps/npm/node_modules/es-to-primitive/.editorconfig new file mode 100644 index 00000000000000..bc228f8269443b --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/deps/npm/node_modules/es-to-primitive/.eslintrc b/deps/npm/node_modules/es-to-primitive/.eslintrc new file mode 100644 index 00000000000000..09e0c6c26c6dc2 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/.eslintrc @@ -0,0 +1,14 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "complexity": [2, 14], + "func-name-matching": 0, + "id-length": [2, { "min": 1, "max": 24, "properties": "never" }], + "max-lines-per-function": [2, { "max": 68 }], + "max-statements": [2, 20], + "new-cap": [2, { "capIsNewExceptions": ["GetMethod"] }] + } +} diff --git a/deps/npm/node_modules/es-to-primitive/.jscs.json b/deps/npm/node_modules/es-to-primitive/.jscs.json new file mode 100644 index 00000000000000..32edc7054c7282 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/.jscs.json @@ -0,0 +1,175 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 12 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": false, + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array", "GetMethod"] + }, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} diff --git a/deps/npm/node_modules/es-to-primitive/.travis.yml b/deps/npm/node_modules/es-to-primitive/.travis.yml new file mode 100644 index 00000000000000..c9ee1ece78cb6c --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/.travis.yml @@ -0,0 +1,243 @@ +language: node_js +cache: + directories: + - "$(nvm cache dir)" +os: + - linux +node_js: + - "10.11" + - "9.11" + - "8.12" + - "7.10" + - "6.14" + - "5.12" + - "4.9" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.11" + - "0.10" + - "0.8" + - "0.6" +before_install: + - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' + - 'nvm install-latest-npm' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "lts/*" + env: PRETEST=true + - node_js: "lts/*" + env: POSTTEST=true + - node_js: "4" + env: COVERAGE=true + - node_js: "10.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true + - env: COVERAGE=true + - node_js: "0.6" diff --git a/deps/npm/node_modules/es-to-primitive/CHANGELOG.md b/deps/npm/node_modules/es-to-primitive/CHANGELOG.md new file mode 100644 index 00000000000000..962986969d1f79 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/CHANGELOG.md @@ -0,0 +1,38 @@ +1.2.0 / 2018-09-27 +================= + * [New] create ES2015 entry point/property, to replace ES6 + * [Fix] Ensure optional arguments are not part of the length (#29) + * [Deps] update `is-callable` + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`, `object-inspect`, `replace` + * [Tests] avoid util.inspect bug with `new Date(NaN)` on node v6.0 and v6.1. + * [Tests] up to `node` `v10.11`, `v9.11`, `v8.12`, `v6.14`, `v4.9` + +1.1.1 / 2016-01-03 +================= + * [Fix: ES5] fix coercion logic: ES5’s ToPrimitive does not coerce any primitive value, regardless of hint (#2) + +1.1.0 / 2015-12-27 +================= + * [New] add `Symbol.toPrimitive` support + * [Deps] update `is-callable`, `is-date-object` + * [Dev Deps] update `eslint`, `tape`, `semver`, `jscs`, `covert`, `nsp`, `@ljharb/eslint-config` + * [Dev Deps] remove unused deps + * [Tests] up to `node` `v5.3` + * [Tests] fix npm upgrades on older node versions + * [Tests] fix testling + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + +1.0.1 / 2016-01-03 +================= + * [Fix: ES5] fix coercion logic: ES5’s ToPrimitive does not coerce any primitive value, regardless of hint (#2) + * [Deps] update `is-callable`, `is-date-object` + * [Dev Deps] update `eslint`, `tape`, `semver`, `jscs`, `covert`, `nsp`, `@ljharb/eslint-config` + * [Dev Deps] remove unused deps + * [Tests] up to `node` `v5.3` + * [Tests] fix npm upgrades on older node versions + * [Tests] fix testling + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + +1.0.0 / 2015-03-19 +================= + * Initial release. diff --git a/deps/npm/node_modules/es-to-primitive/LICENSE b/deps/npm/node_modules/es-to-primitive/LICENSE new file mode 100644 index 00000000000000..fcf5754efe64ab --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/deps/npm/node_modules/es-to-primitive/Makefile b/deps/npm/node_modules/es-to-primitive/Makefile new file mode 100644 index 00000000000000..b9e4fe1aab3dde --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/Makefile @@ -0,0 +1,61 @@ +# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. +$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) + + # The files that need updating when incrementing the version number. +VERSIONED_FILES := *.js *.json README* + + +# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. +# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment +# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. +export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") +UTILS := semver +# Make sure that all required utilities can be located. +UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) + +# Default target (by virtue of being the first non '.'-prefixed in the file). +.PHONY: _no-target-specified +_no-target-specified: + $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) + +# Lists all targets defined in this makefile. +.PHONY: list +list: + @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort + +# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). +.PHONY: test +test: + @npm test + +.PHONY: _ensure-tag +_ensure-tag: +ifndef TAG + $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) +endif + +CHANGELOG_ERROR = $(error No CHANGELOG specified) +.PHONY: _ensure-changelog +_ensure-changelog: + @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) + +# Ensures that the git workspace is clean. +.PHONY: _ensure-clean +_ensure-clean: + @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } + +# Makes a release; invoke with `make TAG= release`. +.PHONY: release +release: _ensure-tag _ensure-changelog _ensure-clean + @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ + new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ + if printf "$$new_ver" | command grep -q '^[0-9]'; then \ + semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ + semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ + else \ + new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ + fi; \ + printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ + replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ + git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ + git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/deps/npm/node_modules/es-to-primitive/README.md b/deps/npm/node_modules/es-to-primitive/README.md new file mode 100644 index 00000000000000..1831ecf39564f8 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/README.md @@ -0,0 +1,51 @@ +# es-to-primitive [![Version Badge][npm-version-svg]][package-url] + +[![Build Status][travis-svg]][travis-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES2015 versions. +When different versions of the spec conflict, the default export will be the latest version of the abstract operation. +Alternative versions will also be available under an `es5`/`es2015` exported property if you require a specific version. + +## Example + +```js +var toPrimitive = require('es-to-primitive'); +var assert = require('assert'); + +assert(toPrimitive(function () {}) === String(function () {})); + +var date = new Date(); +assert(toPrimitive(date) === String(date)); + +assert(toPrimitive({ valueOf: function () { return 3; } }) === 3); + +assert(toPrimitive(['a', 'b', 3]) === String(['a', 'b', 3])); + +var sym = Symbol(); +assert(toPrimitive(Object(sym)) === sym); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/es-to-primitive +[npm-version-svg]: http://versionbadg.es/ljharb/es-to-primitive.svg +[travis-svg]: https://travis-ci.org/ljharb/es-to-primitive.svg +[travis-url]: https://travis-ci.org/ljharb/es-to-primitive +[deps-svg]: https://david-dm.org/ljharb/es-to-primitive.svg +[deps-url]: https://david-dm.org/ljharb/es-to-primitive +[dev-deps-svg]: https://david-dm.org/ljharb/es-to-primitive/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/es-to-primitive#info=devDependencies +[testling-svg]: https://ci.testling.com/ljharb/es-to-primitive.png +[testling-url]: https://ci.testling.com/ljharb/es-to-primitive +[npm-badge-png]: https://nodei.co/npm/es-to-primitive.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/es-to-primitive.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/es-to-primitive.svg +[downloads-url]: http://npm-stat.com/charts.html?package=es-to-primitive diff --git a/deps/npm/node_modules/es-to-primitive/es2015.js b/deps/npm/node_modules/es-to-primitive/es2015.js new file mode 100644 index 00000000000000..4a11a346c608c9 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/es2015.js @@ -0,0 +1,75 @@ +'use strict'; + +var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; + +var isPrimitive = require('./helpers/isPrimitive'); +var isCallable = require('is-callable'); +var isDate = require('is-date-object'); +var isSymbol = require('is-symbol'); + +var ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) { + if (typeof O === 'undefined' || O === null) { + throw new TypeError('Cannot call method on ' + O); + } + if (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) { + throw new TypeError('hint must be "string" or "number"'); + } + var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + var method, result, i; + for (i = 0; i < methodNames.length; ++i) { + method = O[methodNames[i]]; + if (isCallable(method)) { + result = method.call(O); + if (isPrimitive(result)) { + return result; + } + } + } + throw new TypeError('No default value'); +}; + +var GetMethod = function GetMethod(O, P) { + var func = O[P]; + if (func !== null && typeof func !== 'undefined') { + if (!isCallable(func)) { + throw new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function'); + } + return func; + } + return void 0; +}; + +// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive +module.exports = function ToPrimitive(input) { + if (isPrimitive(input)) { + return input; + } + var hint = 'default'; + if (arguments.length > 1) { + if (arguments[1] === String) { + hint = 'string'; + } else if (arguments[1] === Number) { + hint = 'number'; + } + } + + var exoticToPrim; + if (hasSymbols) { + if (Symbol.toPrimitive) { + exoticToPrim = GetMethod(input, Symbol.toPrimitive); + } else if (isSymbol(input)) { + exoticToPrim = Symbol.prototype.valueOf; + } + } + if (typeof exoticToPrim !== 'undefined') { + var result = exoticToPrim.call(input, hint); + if (isPrimitive(result)) { + return result; + } + throw new TypeError('unable to convert exotic object to primitive'); + } + if (hint === 'default' && (isDate(input) || isSymbol(input))) { + hint = 'string'; + } + return ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint); +}; diff --git a/deps/npm/node_modules/es-to-primitive/es5.js b/deps/npm/node_modules/es-to-primitive/es5.js new file mode 100644 index 00000000000000..602aa362c7e3e3 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/es5.js @@ -0,0 +1,45 @@ +'use strict'; + +var toStr = Object.prototype.toString; + +var isPrimitive = require('./helpers/isPrimitive'); + +var isCallable = require('is-callable'); + +// http://ecma-international.org/ecma-262/5.1/#sec-8.12.8 +var ES5internalSlots = { + '[[DefaultValue]]': function (O) { + var actualHint; + if (arguments.length > 1) { + actualHint = arguments[1]; + } else { + actualHint = toStr.call(O) === '[object Date]' ? String : Number; + } + + if (actualHint === String || actualHint === Number) { + var methods = actualHint === String ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + var value, i; + for (i = 0; i < methods.length; ++i) { + if (isCallable(O[methods[i]])) { + value = O[methods[i]](); + if (isPrimitive(value)) { + return value; + } + } + } + throw new TypeError('No default value'); + } + throw new TypeError('invalid [[DefaultValue]] hint supplied'); + } +}; + +// http://ecma-international.org/ecma-262/5.1/#sec-9.1 +module.exports = function ToPrimitive(input) { + if (isPrimitive(input)) { + return input; + } + if (arguments.length > 1) { + return ES5internalSlots['[[DefaultValue]]'](input, arguments[1]); + } + return ES5internalSlots['[[DefaultValue]]'](input); +}; diff --git a/deps/npm/node_modules/es-to-primitive/es6.js b/deps/npm/node_modules/es-to-primitive/es6.js new file mode 100644 index 00000000000000..2d1f4dc927a904 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/es6.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./es2015'); diff --git a/deps/npm/node_modules/es-to-primitive/helpers/isPrimitive.js b/deps/npm/node_modules/es-to-primitive/helpers/isPrimitive.js new file mode 100644 index 00000000000000..36691564527596 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/helpers/isPrimitive.js @@ -0,0 +1,3 @@ +module.exports = function isPrimitive(value) { + return value === null || (typeof value !== 'function' && typeof value !== 'object'); +}; diff --git a/deps/npm/node_modules/es-to-primitive/index.js b/deps/npm/node_modules/es-to-primitive/index.js new file mode 100644 index 00000000000000..e60d912e113325 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/index.js @@ -0,0 +1,17 @@ +'use strict'; + +var ES5 = require('./es5'); +var ES6 = require('./es6'); +var ES2015 = require('./es2015'); + +if (Object.defineProperty) { + Object.defineProperty(ES2015, 'ES5', { enumerable: false, value: ES5 }); + Object.defineProperty(ES2015, 'ES6', { enumerable: false, value: ES6 }); + Object.defineProperty(ES2015, 'ES2015', { enumerable: false, value: ES2015 }); +} else { + ES6.ES5 = ES5; + ES6.ES6 = ES6; + ES6.ES2015 = ES2015; +} + +module.exports = ES2015; diff --git a/deps/npm/node_modules/es-to-primitive/package.json b/deps/npm/node_modules/es-to-primitive/package.json new file mode 100644 index 00000000000000..c3191f047e29c2 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/package.json @@ -0,0 +1,86 @@ +{ + "name": "es-to-primitive", + "version": "1.2.0", + "author": "Jordan Harband", + "description": "ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES2015 versions.", + "license": "MIT", + "main": "index.js", + "scripts": { + "pretest": "npm run --silent lint", + "test": "npm run --silent tests-only", + "posttest": "npm run --silent security", + "tests-only": "node --es-staging test", + "coverage": "covert test/*.js", + "coverage-quiet": "covert test/*.js --quiet", + "lint": "npm run --silent jscs && npm run --silent eslint", + "jscs": "jscs test/*.js *.js", + "eslint": "eslint test/*.js *.js", + "security": "nsp check" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/es-to-primitive.git" + }, + "keywords": [ + "primitive", + "abstract", + "ecmascript", + "es5", + "es6", + "es2015", + "toPrimitive", + "coerce", + "type", + "object", + "string", + "number", + "boolean", + "symbol", + "null", + "undefined" + ], + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "devDependencies": { + "@ljharb/eslint-config": "^13.0.0", + "covert": "^1.1.0", + "eslint": "^5.6.0", + "foreach": "^2.0.5", + "function.prototype.name": "^1.1.0", + "jscs": "^3.0.7", + "nsp": "^3.2.1", + "object-inspect": "^1.6.0", + "object-is": "^1.0.1", + "replace": "^1.0.0", + "semver": "^5.5.1", + "tape": "^4.9.1" + }, + "testling": { + "files": "test", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } + +,"_resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz" +,"_integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==" +,"_from": "es-to-primitive@1.2.0" +} \ No newline at end of file diff --git a/deps/npm/node_modules/es-to-primitive/test/.eslintrc b/deps/npm/node_modules/es-to-primitive/test/.eslintrc new file mode 100644 index 00000000000000..9beb88c75250a8 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/test/.eslintrc @@ -0,0 +1,9 @@ +{ + "rules": { + "array-bracket-newline": 0, + "array-element-newline": 0, + "max-statements-per-line": [2, { "max": 3 }], + "no-magic-numbers": [0], + "sort-keys": [0] + } +} diff --git a/deps/npm/node_modules/es-to-primitive/test/es2015.js b/deps/npm/node_modules/es-to-primitive/test/es2015.js new file mode 100644 index 00000000000000..80f4083dd93152 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/test/es2015.js @@ -0,0 +1,151 @@ +'use strict'; + +var test = require('tape'); +var toPrimitive = require('../es2015'); +var is = require('object-is'); +var forEach = require('foreach'); +var functionName = require('function.prototype.name'); +var debug = require('object-inspect'); + +var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; +var hasSymbolToPrimitive = hasSymbols && typeof Symbol.toPrimitive === 'symbol'; + +test('function properties', function (t) { + t.equal(toPrimitive.length, 1, 'length is 1'); + t.equal(functionName(toPrimitive), 'ToPrimitive', 'name is ToPrimitive'); + + t.end(); +}); + +var primitives = [null, undefined, true, false, 0, -0, 42, NaN, Infinity, -Infinity, '', 'abc']; + +test('primitives', function (t) { + forEach(primitives, function (i) { + t.ok(is(toPrimitive(i), i), 'toPrimitive(' + debug(i) + ') returns the same value'); + t.ok(is(toPrimitive(i, String), i), 'toPrimitive(' + debug(i) + ', String) returns the same value'); + t.ok(is(toPrimitive(i, Number), i), 'toPrimitive(' + debug(i) + ', Number) returns the same value'); + }); + t.end(); +}); + +test('Symbols', { skip: !hasSymbols }, function (t) { + var symbols = [ + Symbol('foo'), + Symbol.iterator, + Symbol['for']('foo') // eslint-disable-line no-restricted-properties + ]; + forEach(symbols, function (sym) { + t.equal(toPrimitive(sym), sym, 'toPrimitive(' + debug(sym) + ') returns the same value'); + t.equal(toPrimitive(sym, String), sym, 'toPrimitive(' + debug(sym) + ', String) returns the same value'); + t.equal(toPrimitive(sym, Number), sym, 'toPrimitive(' + debug(sym) + ', Number) returns the same value'); + }); + + var primitiveSym = Symbol('primitiveSym'); + var objectSym = Object(primitiveSym); + t.equal(toPrimitive(objectSym), primitiveSym, 'toPrimitive(' + debug(objectSym) + ') returns ' + debug(primitiveSym)); + t.equal(toPrimitive(objectSym, String), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', String) returns ' + debug(primitiveSym)); + t.equal(toPrimitive(objectSym, Number), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', Number) returns ' + debug(primitiveSym)); + t.end(); +}); + +test('Arrays', function (t) { + var arrays = [[], ['a', 'b'], [1, 2]]; + forEach(arrays, function (arr) { + t.equal(toPrimitive(arr), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); + t.equal(toPrimitive(arr, String), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); + t.equal(toPrimitive(arr, Number), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); + }); + t.end(); +}); + +test('Dates', function (t) { + var dates = [new Date(), new Date(0), new Date(NaN)]; + forEach(dates, function (date) { + t.equal(toPrimitive(date), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date'); + t.equal(toPrimitive(date, String), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date'); + t.ok(is(toPrimitive(date, Number), Number(date)), 'toPrimitive(' + debug(date) + ') returns the number version of the date'); + }); + t.end(); +}); + +var coercibleObject = { valueOf: function () { return 3; }, toString: function () { return 42; } }; +var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; +var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; +var coercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return 42; } +}; +var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; +var uncoercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return function toStrFn() {}; } +}; + +test('Objects', function (t) { + t.equal(toPrimitive(coercibleObject), coercibleObject.valueOf(), 'coercibleObject with no hint coerces to valueOf'); + t.equal(toPrimitive(coercibleObject, Number), coercibleObject.valueOf(), 'coercibleObject with hint Number coerces to valueOf'); + t.equal(toPrimitive(coercibleObject, String), coercibleObject.toString(), 'coercibleObject with hint String coerces to non-stringified toString'); + + t.equal(toPrimitive(coercibleFnObject), coercibleFnObject.toString(), 'coercibleFnObject coerces to non-stringified toString'); + t.equal(toPrimitive(coercibleFnObject, Number), coercibleFnObject.toString(), 'coercibleFnObject with hint Number coerces to non-stringified toString'); + t.equal(toPrimitive(coercibleFnObject, String), coercibleFnObject.toString(), 'coercibleFnObject with hint String coerces to non-stringified toString'); + + t.equal(toPrimitive({}), '[object Object]', '{} with no hint coerces to Object#toString'); + t.equal(toPrimitive({}, Number), '[object Object]', '{} with hint Number coerces to Object#toString'); + t.equal(toPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); + + t.equal(toPrimitive(toStringOnlyObject), toStringOnlyObject.toString(), 'toStringOnlyObject returns non-stringified toString'); + t.equal(toPrimitive(toStringOnlyObject, Number), toStringOnlyObject.toString(), 'toStringOnlyObject with hint Number returns non-stringified toString'); + t.equal(toPrimitive(toStringOnlyObject, String), toStringOnlyObject.toString(), 'toStringOnlyObject with hint String returns non-stringified toString'); + + t.equal(toPrimitive(valueOfOnlyObject), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject returns valueOf'); + t.equal(toPrimitive(valueOfOnlyObject, Number), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint Number returns valueOf'); + t.equal(toPrimitive(valueOfOnlyObject, String), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint String returns non-stringified valueOf'); + + t.test('Symbol.toPrimitive', { skip: !hasSymbolToPrimitive }, function (st) { + var overriddenObject = { toString: st.fail, valueOf: st.fail }; + overriddenObject[Symbol.toPrimitive] = function (hint) { return String(hint); }; + + st.equal(toPrimitive(overriddenObject), 'default', 'object with Symbol.toPrimitive + no hint invokes that'); + st.equal(toPrimitive(overriddenObject, Number), 'number', 'object with Symbol.toPrimitive + hint Number invokes that'); + st.equal(toPrimitive(overriddenObject, String), 'string', 'object with Symbol.toPrimitive + hint String invokes that'); + + var nullToPrimitive = { toString: coercibleObject.toString, valueOf: coercibleObject.valueOf }; + nullToPrimitive[Symbol.toPrimitive] = null; + st.equal(toPrimitive(nullToPrimitive), toPrimitive(coercibleObject), 'object with no hint + null Symbol.toPrimitive ignores it'); + st.equal(toPrimitive(nullToPrimitive, Number), toPrimitive(coercibleObject, Number), 'object with hint Number + null Symbol.toPrimitive ignores it'); + st.equal(toPrimitive(nullToPrimitive, String), toPrimitive(coercibleObject, String), 'object with hint String + null Symbol.toPrimitive ignores it'); + + st.test('exceptions', function (sst) { + var nonFunctionToPrimitive = { toString: sst.fail, valueOf: sst.fail }; + nonFunctionToPrimitive[Symbol.toPrimitive] = {}; + sst['throws'](toPrimitive.bind(null, nonFunctionToPrimitive), TypeError, 'Symbol.toPrimitive returning a non-function throws'); + + var uncoercibleToPrimitive = { toString: sst.fail, valueOf: sst.fail }; + uncoercibleToPrimitive[Symbol.toPrimitive] = function (hint) { + return { toString: function () { return hint; } }; + }; + sst['throws'](toPrimitive.bind(null, uncoercibleToPrimitive), TypeError, 'Symbol.toPrimitive returning an object throws'); + + var throwingToPrimitive = { toString: sst.fail, valueOf: sst.fail }; + throwingToPrimitive[Symbol.toPrimitive] = function (hint) { throw new RangeError(hint); }; + sst['throws'](toPrimitive.bind(null, throwingToPrimitive), RangeError, 'Symbol.toPrimitive throwing throws'); + + sst.end(); + }); + + st.end(); + }); + + t.test('exceptions', function (st) { + st['throws'](toPrimitive.bind(null, uncoercibleObject), TypeError, 'uncoercibleObject throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleObject, Number), TypeError, 'uncoercibleObject with hint Number throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleObject, String), TypeError, 'uncoercibleObject with hint String throws a TypeError'); + + st['throws'](toPrimitive.bind(null, uncoercibleFnObject), TypeError, 'uncoercibleFnObject throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleFnObject, Number), TypeError, 'uncoercibleFnObject with hint Number throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleFnObject, String), TypeError, 'uncoercibleFnObject with hint String throws a TypeError'); + st.end(); + }); + t.end(); +}); diff --git a/deps/npm/node_modules/es-to-primitive/test/es5.js b/deps/npm/node_modules/es-to-primitive/test/es5.js new file mode 100644 index 00000000000000..8b80ff5bd968ad --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/test/es5.js @@ -0,0 +1,94 @@ +'use strict'; + +var test = require('tape'); +var toPrimitive = require('../es5'); +var is = require('object-is'); +var forEach = require('foreach'); +var functionName = require('function.prototype.name'); +var debug = require('object-inspect'); + +test('function properties', function (t) { + t.equal(toPrimitive.length, 1, 'length is 1'); + t.equal(functionName(toPrimitive), 'ToPrimitive', 'name is ToPrimitive'); + + t.end(); +}); + +var primitives = [null, undefined, true, false, 0, -0, 42, NaN, Infinity, -Infinity, '', 'abc']; + +test('primitives', function (t) { + forEach(primitives, function (i) { + t.ok(is(toPrimitive(i), i), 'toPrimitive(' + debug(i) + ') returns the same value'); + t.ok(is(toPrimitive(i, String), i), 'toPrimitive(' + debug(i) + ', String) returns the same value'); + t.ok(is(toPrimitive(i, Number), i), 'toPrimitive(' + debug(i) + ', Number) returns the same value'); + }); + t.end(); +}); + +test('Arrays', function (t) { + var arrays = [[], ['a', 'b'], [1, 2]]; + forEach(arrays, function (arr) { + t.ok(is(toPrimitive(arr), arr.toString()), 'toPrimitive(' + debug(arr) + ') returns toString of the array'); + t.equal(toPrimitive(arr, String), arr.toString(), 'toPrimitive(' + debug(arr) + ') returns toString of the array'); + t.ok(is(toPrimitive(arr, Number), arr.toString()), 'toPrimitive(' + debug(arr) + ') returns toString of the array'); + }); + t.end(); +}); + +test('Dates', function (t) { + var dates = [new Date(), new Date(0), new Date(NaN)]; + forEach(dates, function (date) { + t.equal(toPrimitive(date), date.toString(), 'toPrimitive(' + debug(date) + ') returns toString of the date'); + t.equal(toPrimitive(date, String), date.toString(), 'toPrimitive(' + debug(date) + ') returns toString of the date'); + t.ok(is(toPrimitive(date, Number), date.valueOf()), 'toPrimitive(' + debug(date) + ') returns valueOf of the date'); + }); + t.end(); +}); + +var coercibleObject = { valueOf: function () { return 3; }, toString: function () { return 42; } }; +var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; +var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; +var coercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return 42; } +}; +var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; +var uncoercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return function toStrFn() {}; } +}; + +test('Objects', function (t) { + t.equal(toPrimitive(coercibleObject), coercibleObject.valueOf(), 'coercibleObject with no hint coerces to valueOf'); + t.equal(toPrimitive(coercibleObject, String), coercibleObject.toString(), 'coercibleObject with hint String coerces to toString'); + t.equal(toPrimitive(coercibleObject, Number), coercibleObject.valueOf(), 'coercibleObject with hint Number coerces to valueOf'); + + t.equal(toPrimitive(coercibleFnObject), coercibleFnObject.toString(), 'coercibleFnObject coerces to toString'); + t.equal(toPrimitive(coercibleFnObject, String), coercibleFnObject.toString(), 'coercibleFnObject with hint String coerces to toString'); + t.equal(toPrimitive(coercibleFnObject, Number), coercibleFnObject.toString(), 'coercibleFnObject with hint Number coerces to toString'); + + t.ok(is(toPrimitive({}), '[object Object]'), '{} with no hint coerces to Object#toString'); + t.equal(toPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); + t.ok(is(toPrimitive({}, Number), '[object Object]'), '{} with hint Number coerces to Object#toString'); + + t.equal(toPrimitive(toStringOnlyObject), toStringOnlyObject.toString(), 'toStringOnlyObject returns toString'); + t.equal(toPrimitive(toStringOnlyObject, String), toStringOnlyObject.toString(), 'toStringOnlyObject with hint String returns toString'); + t.equal(toPrimitive(toStringOnlyObject, Number), toStringOnlyObject.toString(), 'toStringOnlyObject with hint Number returns toString'); + + t.equal(toPrimitive(valueOfOnlyObject), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject returns valueOf'); + t.equal(toPrimitive(valueOfOnlyObject, String), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint String returns valueOf'); + t.equal(toPrimitive(valueOfOnlyObject, Number), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint Number returns valueOf'); + + t.test('exceptions', function (st) { + st['throws'](toPrimitive.bind(null, uncoercibleObject), TypeError, 'uncoercibleObject throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleObject, String), TypeError, 'uncoercibleObject with hint String throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleObject, Number), TypeError, 'uncoercibleObject with hint Number throws a TypeError'); + + st['throws'](toPrimitive.bind(null, uncoercibleFnObject), TypeError, 'uncoercibleFnObject throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleFnObject, String), TypeError, 'uncoercibleFnObject with hint String throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleFnObject, Number), TypeError, 'uncoercibleFnObject with hint Number throws a TypeError'); + st.end(); + }); + + t.end(); +}); diff --git a/deps/npm/node_modules/es-to-primitive/test/es6.js b/deps/npm/node_modules/es-to-primitive/test/es6.js new file mode 100644 index 00000000000000..c6df63fb6dc086 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/test/es6.js @@ -0,0 +1,151 @@ +'use strict'; + +var test = require('tape'); +var toPrimitive = require('../es6'); +var is = require('object-is'); +var forEach = require('foreach'); +var functionName = require('function.prototype.name'); +var debug = require('object-inspect'); + +var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; +var hasSymbolToPrimitive = hasSymbols && typeof Symbol.toPrimitive === 'symbol'; + +test('function properties', function (t) { + t.equal(toPrimitive.length, 1, 'length is 1'); + t.equal(functionName(toPrimitive), 'ToPrimitive', 'name is ToPrimitive'); + + t.end(); +}); + +var primitives = [null, undefined, true, false, 0, -0, 42, NaN, Infinity, -Infinity, '', 'abc']; + +test('primitives', function (t) { + forEach(primitives, function (i) { + t.ok(is(toPrimitive(i), i), 'toPrimitive(' + debug(i) + ') returns the same value'); + t.ok(is(toPrimitive(i, String), i), 'toPrimitive(' + debug(i) + ', String) returns the same value'); + t.ok(is(toPrimitive(i, Number), i), 'toPrimitive(' + debug(i) + ', Number) returns the same value'); + }); + t.end(); +}); + +test('Symbols', { skip: !hasSymbols }, function (t) { + var symbols = [ + Symbol('foo'), + Symbol.iterator, + Symbol['for']('foo') // eslint-disable-line no-restricted-properties + ]; + forEach(symbols, function (sym) { + t.equal(toPrimitive(sym), sym, 'toPrimitive(' + debug(sym) + ') returns the same value'); + t.equal(toPrimitive(sym, String), sym, 'toPrimitive(' + debug(sym) + ', String) returns the same value'); + t.equal(toPrimitive(sym, Number), sym, 'toPrimitive(' + debug(sym) + ', Number) returns the same value'); + }); + + var primitiveSym = Symbol('primitiveSym'); + var objectSym = Object(primitiveSym); + t.equal(toPrimitive(objectSym), primitiveSym, 'toPrimitive(' + debug(objectSym) + ') returns ' + debug(primitiveSym)); + t.equal(toPrimitive(objectSym, String), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', String) returns ' + debug(primitiveSym)); + t.equal(toPrimitive(objectSym, Number), primitiveSym, 'toPrimitive(' + debug(objectSym) + ', Number) returns ' + debug(primitiveSym)); + t.end(); +}); + +test('Arrays', function (t) { + var arrays = [[], ['a', 'b'], [1, 2]]; + forEach(arrays, function (arr) { + t.equal(toPrimitive(arr), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); + t.equal(toPrimitive(arr, String), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); + t.equal(toPrimitive(arr, Number), String(arr), 'toPrimitive(' + debug(arr) + ') returns the string version of the array'); + }); + t.end(); +}); + +test('Dates', function (t) { + var dates = [new Date(), new Date(0), new Date(NaN)]; + forEach(dates, function (date) { + t.equal(toPrimitive(date), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date'); + t.equal(toPrimitive(date, String), String(date), 'toPrimitive(' + debug(date) + ') returns the string version of the date'); + t.ok(is(toPrimitive(date, Number), Number(date)), 'toPrimitive(' + debug(date) + ') returns the number version of the date'); + }); + t.end(); +}); + +var coercibleObject = { valueOf: function () { return 3; }, toString: function () { return 42; } }; +var valueOfOnlyObject = { valueOf: function () { return 4; }, toString: function () { return {}; } }; +var toStringOnlyObject = { valueOf: function () { return {}; }, toString: function () { return 7; } }; +var coercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return 42; } +}; +var uncoercibleObject = { valueOf: function () { return {}; }, toString: function () { return {}; } }; +var uncoercibleFnObject = { + valueOf: function () { return function valueOfFn() {}; }, + toString: function () { return function toStrFn() {}; } +}; + +test('Objects', function (t) { + t.equal(toPrimitive(coercibleObject), coercibleObject.valueOf(), 'coercibleObject with no hint coerces to valueOf'); + t.equal(toPrimitive(coercibleObject, Number), coercibleObject.valueOf(), 'coercibleObject with hint Number coerces to valueOf'); + t.equal(toPrimitive(coercibleObject, String), coercibleObject.toString(), 'coercibleObject with hint String coerces to non-stringified toString'); + + t.equal(toPrimitive(coercibleFnObject), coercibleFnObject.toString(), 'coercibleFnObject coerces to non-stringified toString'); + t.equal(toPrimitive(coercibleFnObject, Number), coercibleFnObject.toString(), 'coercibleFnObject with hint Number coerces to non-stringified toString'); + t.equal(toPrimitive(coercibleFnObject, String), coercibleFnObject.toString(), 'coercibleFnObject with hint String coerces to non-stringified toString'); + + t.equal(toPrimitive({}), '[object Object]', '{} with no hint coerces to Object#toString'); + t.equal(toPrimitive({}, Number), '[object Object]', '{} with hint Number coerces to Object#toString'); + t.equal(toPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); + + t.equal(toPrimitive(toStringOnlyObject), toStringOnlyObject.toString(), 'toStringOnlyObject returns non-stringified toString'); + t.equal(toPrimitive(toStringOnlyObject, Number), toStringOnlyObject.toString(), 'toStringOnlyObject with hint Number returns non-stringified toString'); + t.equal(toPrimitive(toStringOnlyObject, String), toStringOnlyObject.toString(), 'toStringOnlyObject with hint String returns non-stringified toString'); + + t.equal(toPrimitive(valueOfOnlyObject), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject returns valueOf'); + t.equal(toPrimitive(valueOfOnlyObject, Number), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint Number returns valueOf'); + t.equal(toPrimitive(valueOfOnlyObject, String), valueOfOnlyObject.valueOf(), 'valueOfOnlyObject with hint String returns non-stringified valueOf'); + + t.test('Symbol.toPrimitive', { skip: !hasSymbolToPrimitive }, function (st) { + var overriddenObject = { toString: st.fail, valueOf: st.fail }; + overriddenObject[Symbol.toPrimitive] = function (hint) { return String(hint); }; + + st.equal(toPrimitive(overriddenObject), 'default', 'object with Symbol.toPrimitive + no hint invokes that'); + st.equal(toPrimitive(overriddenObject, Number), 'number', 'object with Symbol.toPrimitive + hint Number invokes that'); + st.equal(toPrimitive(overriddenObject, String), 'string', 'object with Symbol.toPrimitive + hint String invokes that'); + + var nullToPrimitive = { toString: coercibleObject.toString, valueOf: coercibleObject.valueOf }; + nullToPrimitive[Symbol.toPrimitive] = null; + st.equal(toPrimitive(nullToPrimitive), toPrimitive(coercibleObject), 'object with no hint + null Symbol.toPrimitive ignores it'); + st.equal(toPrimitive(nullToPrimitive, Number), toPrimitive(coercibleObject, Number), 'object with hint Number + null Symbol.toPrimitive ignores it'); + st.equal(toPrimitive(nullToPrimitive, String), toPrimitive(coercibleObject, String), 'object with hint String + null Symbol.toPrimitive ignores it'); + + st.test('exceptions', function (sst) { + var nonFunctionToPrimitive = { toString: sst.fail, valueOf: sst.fail }; + nonFunctionToPrimitive[Symbol.toPrimitive] = {}; + sst['throws'](toPrimitive.bind(null, nonFunctionToPrimitive), TypeError, 'Symbol.toPrimitive returning a non-function throws'); + + var uncoercibleToPrimitive = { toString: sst.fail, valueOf: sst.fail }; + uncoercibleToPrimitive[Symbol.toPrimitive] = function (hint) { + return { toString: function () { return hint; } }; + }; + sst['throws'](toPrimitive.bind(null, uncoercibleToPrimitive), TypeError, 'Symbol.toPrimitive returning an object throws'); + + var throwingToPrimitive = { toString: sst.fail, valueOf: sst.fail }; + throwingToPrimitive[Symbol.toPrimitive] = function (hint) { throw new RangeError(hint); }; + sst['throws'](toPrimitive.bind(null, throwingToPrimitive), RangeError, 'Symbol.toPrimitive throwing throws'); + + sst.end(); + }); + + st.end(); + }); + + t.test('exceptions', function (st) { + st['throws'](toPrimitive.bind(null, uncoercibleObject), TypeError, 'uncoercibleObject throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleObject, Number), TypeError, 'uncoercibleObject with hint Number throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleObject, String), TypeError, 'uncoercibleObject with hint String throws a TypeError'); + + st['throws'](toPrimitive.bind(null, uncoercibleFnObject), TypeError, 'uncoercibleFnObject throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleFnObject, Number), TypeError, 'uncoercibleFnObject with hint Number throws a TypeError'); + st['throws'](toPrimitive.bind(null, uncoercibleFnObject, String), TypeError, 'uncoercibleFnObject with hint String throws a TypeError'); + st.end(); + }); + t.end(); +}); diff --git a/deps/npm/node_modules/es-to-primitive/test/index.js b/deps/npm/node_modules/es-to-primitive/test/index.js new file mode 100644 index 00000000000000..ad71f39e2581e7 --- /dev/null +++ b/deps/npm/node_modules/es-to-primitive/test/index.js @@ -0,0 +1,20 @@ +'use strict'; + +var toPrimitive = require('../'); +var ES5 = require('../es5'); +var ES6 = require('../es6'); +var ES2015 = require('../es2015'); + +var test = require('tape'); + +test('default export', function (t) { + t.equal(toPrimitive, ES2015, 'default export is ES2015'); + t.equal(toPrimitive.ES5, ES5, 'ES5 property has ES5 method'); + t.equal(toPrimitive.ES6, ES6, 'ES6 property has ES6 method'); + t.equal(toPrimitive.ES2015, ES2015, 'ES2015 property has ES2015 method'); + t.end(); +}); + +require('./es5'); +require('./es6'); +require('./es2015'); diff --git a/deps/npm/node_modules/extend/.eslintrc b/deps/npm/node_modules/extend/.eslintrc new file mode 100644 index 00000000000000..a34cf2831b7c38 --- /dev/null +++ b/deps/npm/node_modules/extend/.eslintrc @@ -0,0 +1,17 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "complexity": [2, 20], + "eqeqeq": [2, "allow-null"], + "func-name-matching": [1], + "max-depth": [1, 4], + "max-statements": [2, 26], + "no-extra-parens": [1], + "no-magic-numbers": [0], + "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"], + "sort-keys": [0], + } +} diff --git a/deps/npm/node_modules/find-npm-prefix/test/find-prefix.js~ b/deps/npm/node_modules/find-npm-prefix/test/find-prefix.js~ new file mode 100644 index 00000000000000..76886cec678c53 --- /dev/null +++ b/deps/npm/node_modules/find-npm-prefix/test/find-prefix.js~ @@ -0,0 +1,79 @@ +'use strict' +const Bluebird = require('bluebird') +const test = require('tap').test +const requireInject = require('require-inject') +const findPrefix = requireInject('../find-prefix.js', { + fs: { + readdir: mockReaddir + } +}) + +test('find-prefix', t => { + const tests = { + '/Users/example/code/test1/node_modules': '/Users/example/code/test1', + '/Users/example/code/test1/node_modules/node_modules': '/Users/example/code/test1', + '/Users/example/code/test1/sub1': '/Users/example/code/test1', + '/Users/example/code/test1/sub1/sub1a': '/Users/example/code/test1', + '/Users/example/code/test2': '/Users/example/code/test2', + '/Users/example/code/test2/sub2': '/Users/example/code/test2', + '/Users/example/code': '/Users/example/code', + '/Users/example': '/Users/example', + '/does/not/exist': '/does/not/exist' + } + t.plan(Object.keys(tests).length) + return Bluebird.map(Object.keys(tests), dir => { + return findPrefix(dir).then(pre => { + t.is(pre, tests[dir], dir) + }) + }) +}) + +test('fail-prefix', t => { + return findPrefix('/Users/example/eperm').then(pre => { + t.fail('no eperm') + }).catch(err => { + t.is(err.code, 'EPERM', 'got perm error') + }) +}) + +const fixture = { + 'Users': { + 'example': { + 'code': { + 'test1': { + 'node_modules': { + 'node_modules': {} + }, + 'sub1': { + 'sub1a': {} + } + }, + 'test2': { + 'package.json': {}, + 'sub2': {} + } + } + } + } +} + +function mockReaddir (dir, cb) { + if (/eperm/.test(dir)) { + const err = new Error('Can not read: ' + dir) + err.code = 'EPERM' + return cb(err) + } + const parts = dir.split(/\//).slice(1) + let cwd = fixture + let part + while (part = parts.shift()) { + if (part in cwd) { + cwd = cwd[part] + } else { + const err = new Error('Does not exist: ' + dir + ' * ' + part) + err.code = 'ENOENT' + return cb(err) + } + } + return cb(null, Object.keys(cwd)) +} diff --git a/deps/npm/node_modules/fs-minipass/index.js b/deps/npm/node_modules/fs-minipass/index.js index 0f15c810ebf5f9..6bb7f102d80226 100644 --- a/deps/npm/node_modules/fs-minipass/index.js +++ b/deps/npm/node_modules/fs-minipass/index.js @@ -6,7 +6,7 @@ const fs = require('fs') // for writev const binding = process.binding('fs') const writeBuffers = binding.writeBuffers -const FSReqWrap = binding.FSReqWrap +const FSReqWrap = binding.FSReqWrap || binding.FSReqCallback const _autoClose = Symbol('_autoClose') const _close = Symbol('_close') diff --git a/deps/npm/node_modules/fs-minipass/package.json b/deps/npm/node_modules/fs-minipass/package.json index c2f925e8895a60..dd3186653953b8 100644 --- a/deps/npm/node_modules/fs-minipass/package.json +++ b/deps/npm/node_modules/fs-minipass/package.json @@ -1,8 +1,8 @@ { "_from": "fs-minipass@^1.2.5", - "_id": "fs-minipass@1.2.5", + "_id": "fs-minipass@1.2.6", "_inBundle": false, - "_integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", + "_integrity": "sha512-crhvyXcMejjv3Z5d2Fa9sf5xLYVCF5O1c71QxbVnbLsmYMBEvDAftewesN/HhY03YRoA7zOMxjNGrF5svGaaeQ==", "_location": "/fs-minipass", "_phantomChildren": {}, "_requested": { @@ -18,10 +18,10 @@ "_requiredBy": [ "/tar" ], - "_resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", - "_shasum": "06c277218454ec288df77ada54a03b8702aacb9d", + "_resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.6.tgz", + "_shasum": "2c5cc30ded81282bfe8a0d7c7c1853ddeb102c07", "_spec": "fs-minipass@^1.2.5", - "_where": "/Users/rebecca/code/npm/node_modules/tar", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/tar", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -38,7 +38,7 @@ "description": "fs read and write streams based on minipass", "devDependencies": { "mutate-fs": "^2.0.1", - "tap": "^10.7.2" + "tap": "^13.1.9" }, "files": [ "index.js" @@ -53,10 +53,13 @@ "url": "git+https://github.com/npm/fs-minipass.git" }, "scripts": { - "postpublish": "git push origin --all; git push origin --tags", + "postpublish": "git push origin --follow-tags", "postversion": "npm publish", "preversion": "npm test", - "test": "tap test/*.js --100 -J" + "test": "tap" }, - "version": "1.2.5" + "tap": { + "check-coverage": true + }, + "version": "1.2.6" } diff --git a/deps/npm/node_modules/fstream/.npmignore b/deps/npm/node_modules/fstream/.npmignore deleted file mode 100644 index 494272a81afb6f..00000000000000 --- a/deps/npm/node_modules/fstream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -.*.swp -node_modules/ -examples/deep-copy/ -examples/path/ -examples/filter-copy/ diff --git a/deps/npm/node_modules/fstream/lib/writer.js b/deps/npm/node_modules/fstream/lib/writer.js index 140e449e06dd5b..3f10547820fad9 100644 --- a/deps/npm/node_modules/fstream/lib/writer.js +++ b/deps/npm/node_modules/fstream/lib/writer.js @@ -147,7 +147,7 @@ Writer.prototype._stat = function (current) { // if it's a type change, then we need to clobber or error. // if it's not a type change, then let the impl take care of it. - if (currentType !== self.type) { + if (currentType !== self.type || self.type === 'File' && current.nlink > 1) { return rimraf(self._path, function (er) { if (er) return self.error(er) self._old = null diff --git a/deps/npm/node_modules/fstream/package.json b/deps/npm/node_modules/fstream/package.json index 25418b6709e64a..f90ce2c450ee86 100644 --- a/deps/npm/node_modules/fstream/package.json +++ b/deps/npm/node_modules/fstream/package.json @@ -1,8 +1,8 @@ { "_from": "fstream@^1.0.0", - "_id": "fstream@1.0.11", + "_id": "fstream@1.0.12", "_inBundle": false, - "_integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "_integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", "_location": "/fstream", "_phantomChildren": {}, "_requested": { @@ -19,10 +19,10 @@ "/node-gyp", "/node-gyp/tar" ], - "_resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "_shasum": "5c1fb1f117477114f0632a0eb4b71b3cb0fd3171", + "_resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", + "_shasum": "4e8ba8ee2d48be4f7d0de505455548eae5932045", "_spec": "fstream@^1.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/node-gyp", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/node-gyp", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -58,5 +58,5 @@ "scripts": { "test": "standard && tap examples/*.js" }, - "version": "1.0.11" + "version": "1.0.12" } diff --git a/deps/npm/node_modules/function-bind/.editorconfig b/deps/npm/node_modules/function-bind/.editorconfig new file mode 100644 index 00000000000000..ac29adef0361c6 --- /dev/null +++ b/deps/npm/node_modules/function-bind/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 120 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/deps/npm/node_modules/function-bind/.eslintrc b/deps/npm/node_modules/function-bind/.eslintrc new file mode 100644 index 00000000000000..9b33d8edffcc82 --- /dev/null +++ b/deps/npm/node_modules/function-bind/.eslintrc @@ -0,0 +1,15 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": 0, + "indent": [2, 4], + "max-nested-callbacks": [2, 3], + "max-params": [2, 3], + "max-statements": [2, 20], + "no-new-func": [1], + "strict": [0] + } +} diff --git a/deps/npm/node_modules/function-bind/.jscs.json b/deps/npm/node_modules/function-bind/.jscs.json new file mode 100644 index 00000000000000..773f4ced19400f --- /dev/null +++ b/deps/npm/node_modules/function-bind/.jscs.json @@ -0,0 +1,175 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 8 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": "asc-insensitive", + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] + }, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} diff --git a/deps/npm/node_modules/function-bind/.npmignore b/deps/npm/node_modules/function-bind/.npmignore new file mode 100644 index 00000000000000..dbb555fd1f9f59 --- /dev/null +++ b/deps/npm/node_modules/function-bind/.npmignore @@ -0,0 +1,22 @@ +# gitignore +.DS_Store +.monitor +.*.swp +.nodemonignore +releases +*.log +*.err +fleet.json +public/browserify +bin/*.json +.bin +build +compile +.lock-wscript +coverage +node_modules + +# Only apps should have lockfiles +npm-shrinkwrap.json +package-lock.json +yarn.lock diff --git a/deps/npm/node_modules/function-bind/.travis.yml b/deps/npm/node_modules/function-bind/.travis.yml new file mode 100644 index 00000000000000..85f70d2464f393 --- /dev/null +++ b/deps/npm/node_modules/function-bind/.travis.yml @@ -0,0 +1,168 @@ +language: node_js +os: + - linux +node_js: + - "8.4" + - "7.10" + - "6.11" + - "5.12" + - "4.8" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" +before_install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; else npm install -g npm; fi; fi' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "node" + env: PRETEST=true + - node_js: "4" + env: COVERAGE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true diff --git a/deps/acorn-plugins/acorn-bigint/LICENSE b/deps/npm/node_modules/function-bind/LICENSE similarity index 96% rename from deps/acorn-plugins/acorn-bigint/LICENSE rename to deps/npm/node_modules/function-bind/LICENSE index 7c2b27a19c033c..5b1b5dc3683d91 100644 --- a/deps/acorn-plugins/acorn-bigint/LICENSE +++ b/deps/npm/node_modules/function-bind/LICENSE @@ -1,4 +1,4 @@ -Copyright (C) 2017-2018 by Adrian Heine +Copyright (c) 2013 Raynos. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/deps/npm/node_modules/function-bind/README.md b/deps/npm/node_modules/function-bind/README.md new file mode 100644 index 00000000000000..81862a02cb940c --- /dev/null +++ b/deps/npm/node_modules/function-bind/README.md @@ -0,0 +1,48 @@ +# function-bind + + + + + +Implementation of function.prototype.bind + +## Example + +I mainly do this for unit tests I run on phantomjs. +PhantomJS does not have Function.prototype.bind :( + +```js +Function.prototype.bind = require("function-bind") +``` + +## Installation + +`npm install function-bind` + +## Contributors + + - Raynos + +## MIT Licenced + + [travis-svg]: https://travis-ci.org/Raynos/function-bind.svg + [travis-url]: https://travis-ci.org/Raynos/function-bind + [npm-badge-svg]: https://badge.fury.io/js/function-bind.svg + [npm-url]: https://npmjs.org/package/function-bind + [5]: https://coveralls.io/repos/Raynos/function-bind/badge.png + [6]: https://coveralls.io/r/Raynos/function-bind + [7]: https://gemnasium.com/Raynos/function-bind.png + [8]: https://gemnasium.com/Raynos/function-bind + [deps-svg]: https://david-dm.org/Raynos/function-bind.svg + [deps-url]: https://david-dm.org/Raynos/function-bind + [dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg + [dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies + [11]: https://ci.testling.com/Raynos/function-bind.png + [12]: https://ci.testling.com/Raynos/function-bind diff --git a/deps/npm/node_modules/function-bind/implementation.js b/deps/npm/node_modules/function-bind/implementation.js new file mode 100644 index 00000000000000..cc4daec1b080a1 --- /dev/null +++ b/deps/npm/node_modules/function-bind/implementation.js @@ -0,0 +1,52 @@ +'use strict'; + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var slice = Array.prototype.slice; +var toStr = Object.prototype.toString; +var funcType = '[object Function]'; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.call(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slice.call(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + args.concat(slice.call(arguments)) + ); + if (Object(result) === result) { + return result; + } + return this; + } else { + return target.apply( + that, + args.concat(slice.call(arguments)) + ); + } + }; + + var boundLength = Math.max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs.push('$' + i); + } + + bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; diff --git a/deps/npm/node_modules/function-bind/index.js b/deps/npm/node_modules/function-bind/index.js new file mode 100644 index 00000000000000..3bb6b9609889f8 --- /dev/null +++ b/deps/npm/node_modules/function-bind/index.js @@ -0,0 +1,5 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = Function.prototype.bind || implementation; diff --git a/deps/npm/node_modules/function-bind/package.json b/deps/npm/node_modules/function-bind/package.json new file mode 100644 index 00000000000000..426db8c4d8705e --- /dev/null +++ b/deps/npm/node_modules/function-bind/package.json @@ -0,0 +1,67 @@ +{ + "name": "function-bind", + "version": "1.1.1", + "description": "Implementation of Function.prototype.bind", + "keywords": [ + "function", + "bind", + "shim", + "es5" + ], + "author": "Raynos ", + "repository": "git://github.com/Raynos/function-bind.git", + "main": "index", + "homepage": "https://github.com/Raynos/function-bind", + "contributors": [ + { + "name": "Raynos" + }, + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "bugs": { + "url": "https://github.com/Raynos/function-bind/issues", + "email": "raynos2@gmail.com" + }, + "dependencies": {}, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "covert": "^1.1.0", + "eslint": "^4.5.0", + "jscs": "^3.0.7", + "tape": "^4.8.0" + }, + "license": "MIT", + "scripts": { + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "npm run coverage -- --quiet", + "tests-only": "node test", + "coverage": "covert test/*.js", + "lint": "npm run jscs && npm run eslint", + "jscs": "jscs *.js */*.js", + "eslint": "eslint *.js */*.js" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "ie/8..latest", + "firefox/16..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + } + +,"_resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" +,"_integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" +,"_from": "function-bind@1.1.1" +} \ No newline at end of file diff --git a/deps/npm/node_modules/function-bind/test/.eslintrc b/deps/npm/node_modules/function-bind/test/.eslintrc new file mode 100644 index 00000000000000..8a56d5b72fb008 --- /dev/null +++ b/deps/npm/node_modules/function-bind/test/.eslintrc @@ -0,0 +1,9 @@ +{ + "rules": { + "array-bracket-newline": 0, + "array-element-newline": 0, + "max-statements-per-line": [2, { "max": 2 }], + "no-invalid-this": 0, + "no-magic-numbers": 0, + } +} diff --git a/deps/npm/node_modules/function-bind/test/index.js b/deps/npm/node_modules/function-bind/test/index.js new file mode 100644 index 00000000000000..2edecce2f0fa5a --- /dev/null +++ b/deps/npm/node_modules/function-bind/test/index.js @@ -0,0 +1,252 @@ +// jscs:disable requireUseStrict + +var test = require('tape'); + +var functionBind = require('../implementation'); +var getCurrentContext = function () { return this; }; + +test('functionBind is a function', function (t) { + t.equal(typeof functionBind, 'function'); + t.end(); +}); + +test('non-functions', function (t) { + var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g]; + t.plan(nonFunctions.length); + for (var i = 0; i < nonFunctions.length; ++i) { + try { functionBind.call(nonFunctions[i]); } catch (ex) { + t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i])); + } + } + t.end(); +}); + +test('without a context', function (t) { + t.test('binds properly', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }) + }; + namespace.func(1, 2, 3); + st.deepEqual(args, [1, 2, 3]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('binds properly, and still supplies bound arguments', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, undefined, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.deepEqual(args, [1, 2, 3, 4, 5, 6]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('returns properly', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('called as a constructor', function (st) { + var thunkify = function (value) { + return function () { return value; }; + }; + st.test('returns object value', function (sst) { + var expectedReturnValue = [1, 2, 3]; + var Constructor = functionBind.call(thunkify(expectedReturnValue), null); + var result = new Constructor(); + sst.equal(result, expectedReturnValue); + sst.end(); + }); + + st.test('does not return primitive value', function (sst) { + var Constructor = functionBind.call(thunkify(42), null); + var result = new Constructor(); + sst.notEqual(result, 42); + sst.end(); + }); + + st.test('object from bound constructor is instance of original and bound constructor', function (sst) { + var A = function (x) { + this.name = x || 'A'; + }; + var B = functionBind.call(A, null, 'B'); + + var result = new B(); + sst.ok(result instanceof B, 'result is instance of bound constructor'); + sst.ok(result instanceof A, 'result is instance of original constructor'); + sst.end(); + }); + + st.end(); + }); + + t.end(); +}); + +test('with a context', function (t) { + t.test('with no bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext) + }; + namespace.func(1, 2, 3); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3], 'supplies passed arguments'); + st.end(); + }); + + t.test('with bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments'); + st.end(); + }); + + t.test('returns properly', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('passes the correct arguments when called as a constructor', function (st) { + var expected = { name: 'Correct' }; + var namespace = { + Func: functionBind.call(function (arg) { + return arg; + }, { name: 'Incorrect' }) + }; + var returned = new namespace.Func(expected); + st.equal(returned, expected, 'returns the right arg when called as a constructor'); + st.end(); + }); + + t.test('has the new instance\'s context when called as a constructor', function (st) { + var actualContext; + var expectedContext = { foo: 'bar' }; + var namespace = { + Func: functionBind.call(function () { + actualContext = this; + }, expectedContext) + }; + var result = new namespace.Func(); + st.equal(result instanceof namespace.Func, true); + st.notEqual(actualContext, expectedContext); + st.end(); + }); + + t.end(); +}); + +test('bound function length', function (t) { + t.test('sets a correct length without thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); +}); diff --git a/deps/npm/node_modules/graceful-fs/package.json b/deps/npm/node_modules/graceful-fs/package.json index a17913f2210437..eabcee1a8b3461 100644 --- a/deps/npm/node_modules/graceful-fs/package.json +++ b/deps/npm/node_modules/graceful-fs/package.json @@ -1,19 +1,19 @@ { - "_from": "graceful-fs@4.1.15", - "_id": "graceful-fs@4.1.15", + "_from": "graceful-fs@^4.1.15", + "_id": "graceful-fs@4.2.0", "_inBundle": false, - "_integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "_integrity": "sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==", "_location": "/graceful-fs", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "graceful-fs@4.1.15", + "raw": "graceful-fs@^4.1.15", "name": "graceful-fs", "escapedName": "graceful-fs", - "rawSpec": "4.1.15", + "rawSpec": "^4.1.15", "saveSpec": null, - "fetchSpec": "4.1.15" + "fetchSpec": "^4.1.15" }, "_requiredBy": [ "#USER", @@ -22,6 +22,7 @@ "/cacache", "/cmd-shim", "/configstore", + "/cp-file", "/flat-cache", "/fs-vacuum", "/fs-write-stream-atomic", @@ -31,31 +32,32 @@ "/load-json-file", "/node-gyp", "/npm-lifecycle", - "/npm-registry-client", - "/npm-registry-fetch/cacache", + "/package-hash", "/pkg-conf/load-json-file", "/read-cmd-shim", "/read-installed", "/read-package-json", "/readdir-scoped-modules", "/sha", + "/test-exclude/load-json-file", "/write-file-atomic" ], - "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "_shasum": "ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00", - "_spec": "graceful-fs@4.1.15", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz", + "_shasum": "8d8fdc73977cb04104721cb53666c1ca64cd328b", + "_spec": "graceful-fs@^4.1.15", + "_where": "/Users/isaacs/dev/npm/cli", "bugs": { "url": "https://github.com/isaacs/node-graceful-fs/issues" }, "bundleDependencies": false, + "dependencies": {}, "deprecated": false, "description": "A drop-in replacement for fs, making various improvements.", "devDependencies": { "import-fresh": "^2.0.0", "mkdirp": "^0.5.0", "rimraf": "^2.2.8", - "tap": "^12.0.1" + "tap": "^12.7.0" }, "directories": { "test": "test" @@ -92,10 +94,10 @@ "url": "git+https://github.com/isaacs/node-graceful-fs.git" }, "scripts": { - "postpublish": "git push origin --all; git push origin --tags", + "postpublish": "git push origin --follow-tags", "postversion": "npm publish", "preversion": "npm test", "test": "node test.js | tap -" }, - "version": "4.1.15" + "version": "4.2.0" } diff --git a/deps/npm/node_modules/graceful-fs/polyfills.js b/deps/npm/node_modules/graceful-fs/polyfills.js index b964ed0806ceeb..ab692016c90b04 100644 --- a/deps/npm/node_modules/graceful-fs/polyfills.js +++ b/deps/npm/node_modules/graceful-fs/polyfills.js @@ -272,18 +272,24 @@ function patch (fs) { } } - function statFix (orig) { if (!orig) return orig // Older versions of Node erroneously returned signed integers for // uid + gid. - return function (target, cb) { - return orig.call(fs, target, function (er, stats) { - if (!stats) return cb.apply(this, arguments) - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 + return function (target, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + function callback (er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + } if (cb) cb.apply(this, arguments) - }) + } + return options ? orig.call(fs, target, options, callback) + : orig.call(fs, target, callback) } } @@ -291,8 +297,9 @@ function patch (fs) { if (!orig) return orig // Older versions of Node erroneously returned signed integers for // uid + gid. - return function (target) { - var stats = orig.call(fs, target) + return function (target, options) { + var stats = options ? orig.call(fs, target, options) + : orig.call(fs, target) if (stats.uid < 0) stats.uid += 0x100000000 if (stats.gid < 0) stats.gid += 0x100000000 return stats; diff --git a/deps/npm/node_modules/has-symbols/.eslintrc b/deps/npm/node_modules/has-symbols/.eslintrc new file mode 100644 index 00000000000000..f78f6f181f67dc --- /dev/null +++ b/deps/npm/node_modules/has-symbols/.eslintrc @@ -0,0 +1,10 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-statements-per-line": [2, { "max": 2 }], + "no-magic-numbers": 0 + } +} diff --git a/deps/npm/node_modules/has-symbols/.npmignore b/deps/npm/node_modules/has-symbols/.npmignore new file mode 100644 index 00000000000000..5148e527a7e286 --- /dev/null +++ b/deps/npm/node_modules/has-symbols/.npmignore @@ -0,0 +1,37 @@ +# Logs +logs +*.log +npm-debug.log* + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules +jspm_packages + +# Optional npm cache directory +.npm + +# Optional REPL history +.node_repl_history diff --git a/deps/npm/node_modules/has-symbols/.travis.yml b/deps/npm/node_modules/has-symbols/.travis.yml new file mode 100644 index 00000000000000..3b3331a3b488a0 --- /dev/null +++ b/deps/npm/node_modules/has-symbols/.travis.yml @@ -0,0 +1,113 @@ +language: node_js +node_js: + - "6.6" + - "6.5" + - "6.4" + - "6.3" + - "6.2" + - "6.1" + - "6.0" + - "5.12" + - "5.11" + - "5.10" + - "5.9" + - "5.8" + - "5.7" + - "5.6" + - "5.5" + - "5.4" + - "5.3" + - "5.2" + - "5.1" + - "5.0" + - "4.5" + - "4.4" + - "4.3" + - "4.2" + - "4.1" + - "4.0" + - "iojs-v3.3" + - "iojs-v3.2" + - "iojs-v3.1" + - "iojs-v3.0" + - "iojs-v2.5" + - "iojs-v2.4" + - "iojs-v2.3" + - "iojs-v2.2" + - "iojs-v2.1" + - "iojs-v2.0" + - "iojs-v1.8" + - "iojs-v1.7" + - "iojs-v1.6" + - "iojs-v1.5" + - "iojs-v1.4" + - "iojs-v1.3" + - "iojs-v1.2" + - "iojs-v1.1" + - "iojs-v1.0" + - "0.12" + - "0.11" + - "0.10" + - "0.9" + - "0.8" + - "0.6" + - "0.4" +before_install: + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi' +script: + - 'if [ -n "${LINT-}" ]; then npm run lint ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "node" + env: LINT=true + allow_failures: + - node_js: "6.5" + - node_js: "6.4" + - node_js: "6.3" + - node_js: "6.2" + - node_js: "6.1" + - node_js: "6.0" + - node_js: "5.11" + - node_js: "5.10" + - node_js: "5.9" + - node_js: "5.8" + - node_js: "5.7" + - node_js: "5.6" + - node_js: "5.5" + - node_js: "5.4" + - node_js: "5.3" + - node_js: "5.2" + - node_js: "5.1" + - node_js: "5.0" + - node_js: "4.4" + - node_js: "4.3" + - node_js: "4.2" + - node_js: "4.1" + - node_js: "4.0" + - node_js: "iojs-v3.2" + - node_js: "iojs-v3.1" + - node_js: "iojs-v3.0" + - node_js: "iojs-v2.4" + - node_js: "iojs-v2.3" + - node_js: "iojs-v2.2" + - node_js: "iojs-v2.1" + - node_js: "iojs-v2.0" + - node_js: "iojs-v1.7" + - node_js: "iojs-v1.6" + - node_js: "iojs-v1.5" + - node_js: "iojs-v1.4" + - node_js: "iojs-v1.3" + - node_js: "iojs-v1.2" + - node_js: "iojs-v1.1" + - node_js: "iojs-v1.0" + - node_js: "0.11" + - node_js: "0.9" + - node_js: "0.6" + - node_js: "0.4" diff --git a/deps/npm/node_modules/has-symbols/CHANGELOG.md b/deps/npm/node_modules/has-symbols/CHANGELOG.md new file mode 100644 index 00000000000000..da7f9da7ea2077 --- /dev/null +++ b/deps/npm/node_modules/has-symbols/CHANGELOG.md @@ -0,0 +1,3 @@ +1.0.0 / 2016-09-19 +================= + * Initial release. diff --git a/deps/npm/node_modules/has-symbols/LICENSE b/deps/npm/node_modules/has-symbols/LICENSE new file mode 100644 index 00000000000000..df31cbf3c064d0 --- /dev/null +++ b/deps/npm/node_modules/has-symbols/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/deps/npm/node_modules/has-symbols/README.md b/deps/npm/node_modules/has-symbols/README.md new file mode 100644 index 00000000000000..b27b31acbc71bc --- /dev/null +++ b/deps/npm/node_modules/has-symbols/README.md @@ -0,0 +1,45 @@ +# has-symbols [![Version Badge][2]][1] + +[![Build Status][3]][4] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Determine if the JS environment has Symbol support. Supports spec, or shams. + +## Example + +```js +var hasSymbols = require('has-symbols'); + +hasSymbols() === true; // if the environment has native Symbol support. Not polyfillable, not forgeable. + +var hasSymbolsKinda = require('has-symbols/shams'); +hasSymbolsKinda() === true; // if the environment has a Symbol sham that mostly follows the spec. +``` + +## Supported Symbol shams + - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols) + - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js) + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/has-symbols +[2]: http://versionbadg.es/ljharb/has-symbols.svg +[3]: https://travis-ci.org/ljharb/has-symbols.svg +[4]: https://travis-ci.org/ljharb/has-symbols +[5]: https://david-dm.org/ljharb/has-symbols.svg +[6]: https://david-dm.org/ljharb/has-symbols +[7]: https://david-dm.org/ljharb/has-symbols/dev-status.svg +[8]: https://david-dm.org/ljharb/has-symbols#info=devDependencies +[9]: https://ci.testling.com/ljharb/has-symbols.png +[10]: https://ci.testling.com/ljharb/has-symbols +[11]: https://nodei.co/npm/has-symbols.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/has-symbols.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/has-symbols.svg +[downloads-url]: http://npm-stat.com/charts.html?package=has-symbols diff --git a/deps/npm/node_modules/has-symbols/index.js b/deps/npm/node_modules/has-symbols/index.js new file mode 100644 index 00000000000000..f72159e0ac7dcd --- /dev/null +++ b/deps/npm/node_modules/has-symbols/index.js @@ -0,0 +1,13 @@ +'use strict'; + +var origSymbol = global.Symbol; +var hasSymbolSham = require('./shams'); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; diff --git a/deps/npm/node_modules/has-symbols/package.json b/deps/npm/node_modules/has-symbols/package.json new file mode 100644 index 00000000000000..0999461218e0d0 --- /dev/null +++ b/deps/npm/node_modules/has-symbols/package.json @@ -0,0 +1,82 @@ +{ + "name": "has-symbols", + "version": "1.0.0", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepublish": "safe-publish-latest", + "pretest": "npm run --silent lint", + "test": "npm run --silent tests-only", + "posttest": "npm run --silent security", + "tests-only": "npm run --silent test:stock && npm run --silent test:staging && npm run --silent test:shams", + "test:stock": "node test", + "test:staging": "node --harmony --es-staging test", + "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", + "test:shams:corejs": "node test/shams/core-js.js", + "test:shams:getownpropertysymbols": "node test/shams/get-own-property-symbols.js", + "lint": "eslint *.js", + "security": "nsp check" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/has-symbols.git" + }, + "keywords": [ + "Symbol", + "symbols", + "typeof", + "sham", + "polyfill", + "native", + "core-js", + "ES6" + ], + "dependencies": {}, + "devDependencies": { + "tape": "^4.6.0", + "nsp": "^2.6.1", + "safe-publish-latest": "^1.0.1", + "eslint": "^3.5.0", + "@ljharb/eslint-config": "^8.0.0", + "get-own-property-symbols": "^0.9.2", + "core-js": "^2.4.1" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } + +,"_resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz" +,"_integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" +,"_from": "has-symbols@1.0.0" +} \ No newline at end of file diff --git a/deps/npm/node_modules/has-symbols/shams.js b/deps/npm/node_modules/has-symbols/shams.js new file mode 100644 index 00000000000000..f6c1ff4a236371 --- /dev/null +++ b/deps/npm/node_modules/has-symbols/shams.js @@ -0,0 +1,42 @@ +'use strict'; + +/* eslint complexity: [2, 17], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; diff --git a/deps/npm/node_modules/has-symbols/test/index.js b/deps/npm/node_modules/has-symbols/test/index.js new file mode 100644 index 00000000000000..352129ca356c8c --- /dev/null +++ b/deps/npm/node_modules/has-symbols/test/index.js @@ -0,0 +1,22 @@ +'use strict'; + +var test = require('tape'); +var hasSymbols = require('../'); +var runSymbolTests = require('./tests'); + +test('interface', function (t) { + t.equal(typeof hasSymbols, 'function', 'is a function'); + t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean'); + t.end(); +}); + +test('Symbols are supported', { skip: !hasSymbols() }, function (t) { + runSymbolTests(t); + t.end(); +}); + +test('Symbols are not supported', { skip: hasSymbols() }, function (t) { + t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined'); + t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist'); + t.end(); +}); diff --git a/deps/npm/node_modules/has-symbols/test/shams/core-js.js b/deps/npm/node_modules/has-symbols/test/shams/core-js.js new file mode 100644 index 00000000000000..df5365c23ed741 --- /dev/null +++ b/deps/npm/node_modules/has-symbols/test/shams/core-js.js @@ -0,0 +1,28 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + return; +} + +var hasSymbols = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); + require('core-js/fn/symbol'); + require('core-js/fn/symbol/to-string-tag'); + + require('../tests')(t); + + var hasSymbolsAfter = hasSymbols(); + t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/deps/npm/node_modules/has-symbols/test/shams/get-own-property-symbols.js b/deps/npm/node_modules/has-symbols/test/shams/get-own-property-symbols.js new file mode 100644 index 00000000000000..9191b248baa14b --- /dev/null +++ b/deps/npm/node_modules/has-symbols/test/shams/get-own-property-symbols.js @@ -0,0 +1,28 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + return; +} + +var hasSymbols = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); + + require('get-own-property-symbols'); + + require('../tests')(t); + + var hasSymbolsAfter = hasSymbols(); + t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/deps/npm/node_modules/has-symbols/test/tests.js b/deps/npm/node_modules/has-symbols/test/tests.js new file mode 100644 index 00000000000000..93ff0eae90f039 --- /dev/null +++ b/deps/npm/node_modules/has-symbols/test/tests.js @@ -0,0 +1,54 @@ +'use strict'; + +module.exports = function runSymbolTests(t) { + t.equal(typeof Symbol, 'function', 'global Symbol is a function'); + + if (typeof Symbol !== 'function') { return false }; + + t.notEqual(Symbol(), Symbol(), 'two symbols are not equal'); + + /* + t.equal( + Symbol.prototype.toString.call(Symbol('foo')), + Symbol.prototype.toString.call(Symbol('foo')), + 'two symbols with the same description stringify the same' + ); + */ + + var foo = Symbol('foo'); + + /* + t.notEqual( + String(foo), + String(Symbol('bar')), + 'two symbols with different descriptions do not stringify the same' + ); + */ + + t.equal(typeof Symbol.prototype.toString, 'function', 'Symbol#toString is a function'); + // t.equal(String(foo), Symbol.prototype.toString.call(foo), 'Symbol#toString equals String of the same symbol'); + + t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function'); + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + t.notEqual(typeof sym, 'string', 'Symbol is not a string'); + t.equal(Object.prototype.toString.call(sym), '[object Symbol]', 'symbol primitive Object#toStrings properly'); + t.equal(Object.prototype.toString.call(symObj), '[object Symbol]', 'symbol primitive Object#toStrings properly'); + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { t.fail('symbol property key was found in for..in of object'); } + + t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object'); + t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object'); + t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'one own symbol on symbol-valued object'); + t.equal(Object.prototype.propertyIsEnumerable.call(obj, sym), true, 'symbol is enumerable'); + t.deepEqual(Object.getOwnPropertyDescriptor(obj, sym), { + configurable: true, + enumerable: true, + value: 42, + writable: true + }, 'property descriptor is correct'); +}; diff --git a/deps/npm/node_modules/has/LICENSE-MIT b/deps/npm/node_modules/has/LICENSE-MIT new file mode 100644 index 00000000000000..ae7014d385df3d --- /dev/null +++ b/deps/npm/node_modules/has/LICENSE-MIT @@ -0,0 +1,22 @@ +Copyright (c) 2013 Thiago de Arruda + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/has/README.md b/deps/npm/node_modules/has/README.md new file mode 100644 index 00000000000000..635e3a4baab00b --- /dev/null +++ b/deps/npm/node_modules/has/README.md @@ -0,0 +1,18 @@ +# has + +> Object.prototype.hasOwnProperty.call shortcut + +## Installation + +```sh +npm install --save has +``` + +## Usage + +```js +var has = require('has'); + +has({}, 'hasOwnProperty'); // false +has(Object.prototype, 'hasOwnProperty'); // true +``` diff --git a/deps/npm/node_modules/has/package.json b/deps/npm/node_modules/has/package.json new file mode 100644 index 00000000000000..86203ce1659660 --- /dev/null +++ b/deps/npm/node_modules/has/package.json @@ -0,0 +1,52 @@ +{ + "name": "has", + "description": "Object.prototype.hasOwnProperty.call shortcut", + "version": "1.0.3", + "homepage": "https://github.com/tarruda/has", + "author": { + "name": "Thiago de Arruda", + "email": "tpadilha84@gmail.com" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "repository": { + "type": "git", + "url": "git://github.com/tarruda/has.git" + }, + "bugs": { + "url": "https://github.com/tarruda/has/issues" + }, + "license": "MIT", + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/tarruda/has/blob/master/LICENSE-MIT" + } + ], + "main": "./src", + "dependencies": { + "function-bind": "^1.1.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "eslint": "^4.19.1", + "tape": "^4.9.0" + }, + "engines": { + "node": ">= 0.4.0" + }, + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "tape test" + } + +,"_resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz" +,"_integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==" +,"_from": "has@1.0.3" +} \ No newline at end of file diff --git a/deps/npm/node_modules/has/src/index.js b/deps/npm/node_modules/has/src/index.js new file mode 100644 index 00000000000000..dd92dd9094edb0 --- /dev/null +++ b/deps/npm/node_modules/has/src/index.js @@ -0,0 +1,5 @@ +'use strict'; + +var bind = require('function-bind'); + +module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); diff --git a/deps/npm/node_modules/has/test/index.js b/deps/npm/node_modules/has/test/index.js new file mode 100644 index 00000000000000..43d480b2c2e763 --- /dev/null +++ b/deps/npm/node_modules/has/test/index.js @@ -0,0 +1,10 @@ +'use strict'; + +var test = require('tape'); +var has = require('../'); + +test('has', function (t) { + t.equal(has({}, 'hasOwnProperty'), false, 'object literal does not have own property "hasOwnProperty"'); + t.equal(has(Object.prototype, 'hasOwnProperty'), true, 'Object.prototype has own property "hasOwnProperty"'); + t.end(); +}); diff --git a/deps/npm/node_modules/is-callable/.editorconfig b/deps/npm/node_modules/is-callable/.editorconfig new file mode 100644 index 00000000000000..bc228f8269443b --- /dev/null +++ b/deps/npm/node_modules/is-callable/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/deps/npm/node_modules/is-callable/.eslintrc b/deps/npm/node_modules/is-callable/.eslintrc new file mode 100644 index 00000000000000..db619b50ce084d --- /dev/null +++ b/deps/npm/node_modules/is-callable/.eslintrc @@ -0,0 +1,11 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": 0, + "max-statements": [2, 12], + "max-statements-per-line": [2, { "max": 2 }] + } +} diff --git a/deps/npm/node_modules/is-callable/.istanbul.yml b/deps/npm/node_modules/is-callable/.istanbul.yml new file mode 100644 index 00000000000000..9affe0bc3e67ab --- /dev/null +++ b/deps/npm/node_modules/is-callable/.istanbul.yml @@ -0,0 +1,47 @@ +verbose: false +instrumentation: + root: . + extensions: + - .js + - .jsx + default-excludes: true + excludes: [] + variable: __coverage__ + compact: true + preserve-comments: false + complete-copy: false + save-baseline: false + baseline-file: ./coverage/coverage-baseline.raw.json + include-all-sources: false + include-pid: false + es-modules: false + auto-wrap: false +reporting: + print: summary + reports: + - html + dir: ./coverage + summarizer: pkg + report-config: {} + watermarks: + statements: [50, 80] + functions: [50, 80] + branches: [50, 80] + lines: [50, 80] +hooks: + hook-run-in-context: false + post-require-hook: null + handle-sigint: false +check: + global: + statements: 100 + lines: 100 + branches: 100 + functions: 100 + excludes: [] + each: + statements: 100 + lines: 100 + branches: 100 + functions: 100 + excludes: [] diff --git a/deps/npm/node_modules/is-callable/.jscs.json b/deps/npm/node_modules/is-callable/.jscs.json new file mode 100644 index 00000000000000..759bd65c52915d --- /dev/null +++ b/deps/npm/node_modules/is-callable/.jscs.json @@ -0,0 +1,175 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 1 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": "asc-insensitive", + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] + }, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} diff --git a/deps/npm/node_modules/is-callable/.travis.yml b/deps/npm/node_modules/is-callable/.travis.yml new file mode 100644 index 00000000000000..767256c8dd4843 --- /dev/null +++ b/deps/npm/node_modules/is-callable/.travis.yml @@ -0,0 +1,225 @@ +language: node_js +os: + - linux +node_js: + - "10.4" + - "9.11" + - "8.11" + - "7.10" + - "6.14" + - "5.12" + - "4.9" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" +before_install: + - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' + - 'nvm install-latest-npm' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "lts/*" + env: PRETEST=true + - node_js: "lts/*" + env: POSTTEST=true + - node_js: "4" + env: COVERAGE=true + - node_js: "10.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true + - env: COVERAGE=true diff --git a/deps/npm/node_modules/is-callable/CHANGELOG.md b/deps/npm/node_modules/is-callable/CHANGELOG.md new file mode 100644 index 00000000000000..58286a0535b74d --- /dev/null +++ b/deps/npm/node_modules/is-callable/CHANGELOG.md @@ -0,0 +1,56 @@ +1.1.4 / 2018-07-02 +================= + * [Fix] improve `class` and arrow function detection (#30, #31) + * [Tests] on all latest node minors; improve matrix + * [Dev Deps] update all dev deps + +1.1.3 / 2016-02-27 +================= + * [Fix] ensure “class “ doesn’t screw up “class” detection + * [Tests] up to `node` `v5.7`, `v4.3` + * [Dev Deps] update to `eslint` v2, `@ljharb/eslint-config`, `jscs` + +1.1.2 / 2016-01-15 +================= + * [Fix] Make sure comments don’t screw up “class” detection (#4) + * [Tests] up to `node` `v5.3` + * [Tests] Add `parallelshell`, run both `--es-staging` and stock tests at once + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` + * [Refactor] convert `isNonES6ClassFn` into `isES6ClassFn` + +1.1.1 / 2015-11-30 +================= + * [Fix] do not throw when a non-function has a function in its [[Prototype]] (#2) + * [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`, `jscs`, `nsp`, `semver` + * [Tests] up to `node` `v5.1` + * [Tests] no longer allow node 0.8 to fail. + * [Tests] fix npm upgrades in older nodes + +1.1.0 / 2015-10-02 +================= + * [Fix] Some browsers report TypedArray constructors as `typeof object` + * [New] return false for "class" constructors, when possible. + * [Tests] up to `io.js` `v3.3`, `node` `v4.1` + * [Dev Deps] update `eslint`, `editorconfig-tools`, `nsp`, `tape`, `semver`, `jscs`, `covert`, `make-arrow-function` + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + +1.0.4 / 2015-01-30 +================= + * If @@toStringTag is not present, use the old-school Object#toString test. + +1.0.3 / 2015-01-29 +================= + * Add tests to ensure arrow functions are callable. + * Refactor to aid optimization of non-try/catch code. + +1.0.2 / 2015-01-29 +================= + * Fix broken package.json + +1.0.1 / 2015-01-29 +================= + * Add early exit for typeof not "function" + +1.0.0 / 2015-01-29 +================= + * Initial release. diff --git a/deps/npm/node_modules/is-callable/LICENSE b/deps/npm/node_modules/is-callable/LICENSE new file mode 100644 index 00000000000000..fcf5754efe64ab --- /dev/null +++ b/deps/npm/node_modules/is-callable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/deps/npm/node_modules/is-callable/Makefile b/deps/npm/node_modules/is-callable/Makefile new file mode 100644 index 00000000000000..b9e4fe1aab3dde --- /dev/null +++ b/deps/npm/node_modules/is-callable/Makefile @@ -0,0 +1,61 @@ +# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. +$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) + + # The files that need updating when incrementing the version number. +VERSIONED_FILES := *.js *.json README* + + +# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. +# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment +# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. +export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") +UTILS := semver +# Make sure that all required utilities can be located. +UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) + +# Default target (by virtue of being the first non '.'-prefixed in the file). +.PHONY: _no-target-specified +_no-target-specified: + $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) + +# Lists all targets defined in this makefile. +.PHONY: list +list: + @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort + +# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). +.PHONY: test +test: + @npm test + +.PHONY: _ensure-tag +_ensure-tag: +ifndef TAG + $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) +endif + +CHANGELOG_ERROR = $(error No CHANGELOG specified) +.PHONY: _ensure-changelog +_ensure-changelog: + @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) + +# Ensures that the git workspace is clean. +.PHONY: _ensure-clean +_ensure-clean: + @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } + +# Makes a release; invoke with `make TAG= release`. +.PHONY: release +release: _ensure-tag _ensure-changelog _ensure-clean + @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ + new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ + if printf "$$new_ver" | command grep -q '^[0-9]'; then \ + semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ + semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ + else \ + new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ + fi; \ + printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ + replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ + git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ + git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/deps/npm/node_modules/is-callable/README.md b/deps/npm/node_modules/is-callable/README.md new file mode 100644 index 00000000000000..0cb65879972bfb --- /dev/null +++ b/deps/npm/node_modules/is-callable/README.md @@ -0,0 +1,59 @@ +# is-callable [![Version Badge][2]][1] + +[![Build Status][3]][4] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +[![browser support][9]][10] + +Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag. + +## Example + +```js +var isCallable = require('is-callable'); +var assert = require('assert'); + +assert.notOk(isCallable(undefined)); +assert.notOk(isCallable(null)); +assert.notOk(isCallable(false)); +assert.notOk(isCallable(true)); +assert.notOk(isCallable([])); +assert.notOk(isCallable({})); +assert.notOk(isCallable(/a/g)); +assert.notOk(isCallable(new RegExp('a', 'g'))); +assert.notOk(isCallable(new Date())); +assert.notOk(isCallable(42)); +assert.notOk(isCallable(NaN)); +assert.notOk(isCallable(Infinity)); +assert.notOk(isCallable(new Number(42))); +assert.notOk(isCallable('foo')); +assert.notOk(isCallable(Object('foo'))); + +assert.ok(isCallable(function () {})); +assert.ok(isCallable(function* () {})); +assert.ok(isCallable(x => x * x)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-callable +[2]: http://versionbadg.es/ljharb/is-callable.svg +[3]: https://travis-ci.org/ljharb/is-callable.svg +[4]: https://travis-ci.org/ljharb/is-callable +[5]: https://david-dm.org/ljharb/is-callable.svg +[6]: https://david-dm.org/ljharb/is-callable +[7]: https://david-dm.org/ljharb/is-callable/dev-status.svg +[8]: https://david-dm.org/ljharb/is-callable#info=devDependencies +[9]: https://ci.testling.com/ljharb/is-callable.png +[10]: https://ci.testling.com/ljharb/is-callable +[11]: https://nodei.co/npm/is-callable.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/is-callable.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/is-callable.svg +[downloads-url]: http://npm-stat.com/charts.html?package=is-callable diff --git a/deps/npm/node_modules/is-callable/index.js b/deps/npm/node_modules/is-callable/index.js new file mode 100644 index 00000000000000..d9820b51fd4ad5 --- /dev/null +++ b/deps/npm/node_modules/is-callable/index.js @@ -0,0 +1,37 @@ +'use strict'; + +var fnToStr = Function.prototype.toString; + +var constructorRegex = /^\s*class\b/; +var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e) { + return false; // not a function + } +}; + +var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { return false; } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } +}; +var toStr = Object.prototype.toString; +var fnClass = '[object Function]'; +var genClass = '[object GeneratorFunction]'; +var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + +module.exports = function isCallable(value) { + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + if (typeof value === 'function' && !value.prototype) { return true; } + if (hasToStringTag) { return tryFunctionObject(value); } + if (isES6ClassFn(value)) { return false; } + var strClass = toStr.call(value); + return strClass === fnClass || strClass === genClass; +}; diff --git a/deps/npm/node_modules/is-callable/package.json b/deps/npm/node_modules/is-callable/package.json new file mode 100644 index 00000000000000..50531dfc901657 --- /dev/null +++ b/deps/npm/node_modules/is-callable/package.json @@ -0,0 +1,98 @@ +{ + "name": "is-callable", + "version": "1.1.4", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "description": "Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag.", + "license": "MIT", + "main": "index.js", + "scripts": { + "pretest": "npm run --silent lint", + "test": "npm run --silent tests-only", + "posttest": "npm run --silent security", + "tests-only": "npm run --silent test:stock && npm run --silent test:staging", + "test:stock": "node test.js", + "test:staging": "node --es-staging test.js", + "coverage": "npm run --silent istanbul", + "covert": "covert test.js", + "covert:quiet": "covert test.js --quiet", + "istanbul": "npm run --silent istanbul:clean && npm run --silent istanbul:std && npm run --silent istanbul:harmony && npm run --silent istanbul:merge && istanbul check", + "istanbul:clean": "rimraf coverage coverage-std coverage-harmony", + "istanbul:merge": "istanbul-merge --out coverage/coverage.raw.json coverage-harmony/coverage.raw.json coverage-std/coverage.raw.json && istanbul report html", + "istanbul:harmony": "node --harmony ./node_modules/istanbul/lib/cli.js cover test.js --dir coverage-harmony", + "istanbul:std": "istanbul cover test.js --report html --dir coverage-std", + "prelint": "editorconfig-tools check *", + "lint": "npm run jscs && npm run eslint", + "jscs": "jscs *.js", + "eslint": "eslint *.js", + "security": "nsp check" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/is-callable.git" + }, + "keywords": [ + "Function", + "function", + "callable", + "generator", + "generator function", + "arrow", + "arrow function", + "ES6", + "toStringTag", + "@@toStringTag" + ], + "dependencies": {}, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "covert": "^1.1.0", + "editorconfig-tools": "^0.1.1", + "eslint": "^4.19.1", + "foreach": "^2.0.5", + "istanbul": "1.1.0-alpha.1", + "istanbul-merge": "^1.1.1", + "jscs": "^3.0.7", + "make-arrow-function": "^1.1.0", + "make-generator-function": "^1.1.0", + "nsp": "^3.2.1", + "rimraf": "^2.6.2", + "semver": "^5.5.0", + "tape": "^4.9.1" + }, + "testling": { + "files": "test.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } + +,"_resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz" +,"_integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" +,"_from": "is-callable@1.1.4" +} \ No newline at end of file diff --git a/deps/npm/node_modules/is-callable/test.js b/deps/npm/node_modules/is-callable/test.js new file mode 100644 index 00000000000000..f5be51d82e212d --- /dev/null +++ b/deps/npm/node_modules/is-callable/test.js @@ -0,0 +1,158 @@ +'use strict'; + +/* eslint no-magic-numbers: 1 */ + +var test = require('tape'); +var isCallable = require('./'); +var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; +var genFn = require('make-generator-function'); +var arrowFn = require('make-arrow-function')(); +var weirdlyCommentedArrowFn; +var asyncFn; +var asyncArrowFn; +try { + /* eslint no-new-func: 0 */ + weirdlyCommentedArrowFn = Function('return cl/*/**/=>/**/ass - 1;')(); + asyncFn = Function('return async function foo() {};')(); + asyncArrowFn = Function('return async () => {};')(); +} catch (e) { /**/ } +var forEach = require('foreach'); + +var noop = function () {}; +var classFake = function classFake() { }; // eslint-disable-line func-name-matching +var returnClass = function () { return ' class '; }; +var return3 = function () { return 3; }; +/* for coverage */ +noop(); +classFake(); +returnClass(); +return3(); +/* end for coverage */ + +var invokeFunction = function invokeFunctionString(str) { + var result; + try { + /* eslint-disable no-new-func */ + var fn = Function(str); + /* eslint-enable no-new-func */ + result = fn(); + } catch (e) {} + return result; +}; + +var classConstructor = invokeFunction('"use strict"; return class Foo {}'); + +var commentedClass = invokeFunction('"use strict"; return class/*kkk*/\n//blah\n Bar\n//blah\n {}'); +var commentedClassOneLine = invokeFunction('"use strict"; return class/**/A{}'); +var classAnonymous = invokeFunction('"use strict"; return class{}'); +var classAnonymousCommentedOneLine = invokeFunction('"use strict"; return class/*/*/{}'); + +test('not callables', function (t) { + t.test('non-number/string primitives', function (st) { + st.notOk(isCallable(), 'undefined is not callable'); + st.notOk(isCallable(null), 'null is not callable'); + st.notOk(isCallable(false), 'false is not callable'); + st.notOk(isCallable(true), 'true is not callable'); + st.end(); + }); + + t.notOk(isCallable([]), 'array is not callable'); + t.notOk(isCallable({}), 'object is not callable'); + t.notOk(isCallable(/a/g), 'regex literal is not callable'); + t.notOk(isCallable(new RegExp('a', 'g')), 'regex object is not callable'); + t.notOk(isCallable(new Date()), 'new Date() is not callable'); + + t.test('numbers', function (st) { + st.notOk(isCallable(42), 'number is not callable'); + st.notOk(isCallable(Object(42)), 'number object is not callable'); + st.notOk(isCallable(NaN), 'NaN is not callable'); + st.notOk(isCallable(Infinity), 'Infinity is not callable'); + st.end(); + }); + + t.test('strings', function (st) { + st.notOk(isCallable('foo'), 'string primitive is not callable'); + st.notOk(isCallable(Object('foo')), 'string object is not callable'); + st.end(); + }); + + t.test('non-function with function in its [[Prototype]] chain', function (st) { + var Foo = function Bar() {}; + Foo.prototype = noop; + st.equal(true, isCallable(Foo), 'sanity check: Foo is callable'); + st.equal(false, isCallable(new Foo()), 'instance of Foo is not callable'); + st.end(); + }); + + t.end(); +}); + +test('@@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (t) { + var fakeFunction = { + toString: function () { return String(return3); }, + valueOf: return3 + }; + fakeFunction[Symbol.toStringTag] = 'Function'; + t.equal(String(fakeFunction), String(return3)); + t.equal(Number(fakeFunction), return3()); + t.notOk(isCallable(fakeFunction), 'fake Function with @@toStringTag "Function" is not callable'); + t.end(); +}); + +var typedArrayNames = [ + 'Int8Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Int16Array', + 'Uint16Array', + 'Int32Array', + 'Uint32Array', + 'Float32Array', + 'Float64Array' +]; + +test('Functions', function (t) { + t.ok(isCallable(noop), 'function is callable'); + t.ok(isCallable(classFake), 'function with name containing "class" is callable'); + t.ok(isCallable(returnClass), 'function with string " class " is callable'); + t.ok(isCallable(isCallable), 'isCallable is callable'); + t.end(); +}); + +test('Typed Arrays', function (st) { + forEach(typedArrayNames, function (typedArray) { + /* istanbul ignore if : covered in node 0.6 */ + if (typeof global[typedArray] === 'undefined') { + st.comment('# SKIP typed array "' + typedArray + '" not supported'); + } else { + st.ok(isCallable(global[typedArray]), typedArray + ' is callable'); + } + }); + st.end(); +}); + +test('Generators', { skip: !genFn }, function (t) { + t.ok(isCallable(genFn), 'generator function is callable'); + t.end(); +}); + +test('Arrow functions', { skip: !arrowFn }, function (t) { + t.ok(isCallable(arrowFn), 'arrow function is callable'); + t.ok(isCallable(weirdlyCommentedArrowFn), 'weirdly commented arrow functions are callable'); + t.end(); +}); + +test('"Class" constructors', { skip: !classConstructor || !commentedClass || !commentedClassOneLine || !classAnonymous }, function (t) { + t.notOk(isCallable(classConstructor), 'class constructors are not callable'); + t.notOk(isCallable(commentedClass), 'class constructors with comments in the signature are not callable'); + t.notOk(isCallable(commentedClassOneLine), 'one-line class constructors with comments in the signature are not callable'); + t.notOk(isCallable(classAnonymous), 'anonymous class constructors are not callable'); + t.notOk(isCallable(classAnonymousCommentedOneLine), 'anonymous one-line class constructors with comments in the signature are not callable'); + t.end(); +}); + +test('`async function`s', { skip: !asyncFn }, function (t) { + t.ok(isCallable(asyncFn), '`async function`s are callable'); + t.ok(isCallable(asyncArrowFn), '`async` arrow functions are callable'); + t.end(); +}); diff --git a/deps/npm/node_modules/is-date-object/.eslintrc b/deps/npm/node_modules/is-date-object/.eslintrc new file mode 100644 index 00000000000000..1228f975c99738 --- /dev/null +++ b/deps/npm/node_modules/is-date-object/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-statements": [2, 12] + } +} diff --git a/deps/npm/node_modules/is-date-object/.jscs.json b/deps/npm/node_modules/is-date-object/.jscs.json new file mode 100644 index 00000000000000..9f49765bf6aeff --- /dev/null +++ b/deps/npm/node_modules/is-date-object/.jscs.json @@ -0,0 +1,121 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"], + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": "allButReserved", + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": true, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 1 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "validateOrderInObjectKeys": "asc-insensitive" +} diff --git a/deps/npm/node_modules/is-date-object/.npmignore b/deps/npm/node_modules/is-date-object/.npmignore new file mode 100644 index 00000000000000..59d842baa84c8b --- /dev/null +++ b/deps/npm/node_modules/is-date-object/.npmignore @@ -0,0 +1,28 @@ +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# Commenting this out is preferred by some people, see +# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- +node_modules + +# Users Environment Variables +.lock-wscript diff --git a/deps/npm/node_modules/is-date-object/.travis.yml b/deps/npm/node_modules/is-date-object/.travis.yml new file mode 100644 index 00000000000000..4c29ed58ba7fba --- /dev/null +++ b/deps/npm/node_modules/is-date-object/.travis.yml @@ -0,0 +1,58 @@ +language: node_js +node_js: + - "4.1" + - "4.0" + - "iojs-v3.3" + - "iojs-v3.2" + - "iojs-v3.1" + - "iojs-v3.0" + - "iojs-v2.5" + - "iojs-v2.4" + - "iojs-v2.3" + - "iojs-v2.2" + - "iojs-v2.1" + - "iojs-v2.0" + - "iojs-v1.8" + - "iojs-v1.7" + - "iojs-v1.6" + - "iojs-v1.5" + - "iojs-v1.4" + - "iojs-v1.3" + - "iojs-v1.2" + - "iojs-v1.1" + - "iojs-v1.0" + - "0.12" + - "0.11" + - "0.10" + - "0.9" + - "0.8" + - "0.6" + - "0.4" +before_install: + - '[ "${TRAVIS_NODE_VERSION}" = "0.6" ] || npm install -g npm@1.4.28 && npm install -g npm' +sudo: false +matrix: + fast_finish: true + allow_failures: + - node_js: "4.0" + - node_js: "iojs-v3.2" + - node_js: "iojs-v3.1" + - node_js: "iojs-v3.0" + - node_js: "iojs-v2.4" + - node_js: "iojs-v2.3" + - node_js: "iojs-v2.2" + - node_js: "iojs-v2.1" + - node_js: "iojs-v2.0" + - node_js: "iojs-v1.7" + - node_js: "iojs-v1.6" + - node_js: "iojs-v1.5" + - node_js: "iojs-v1.4" + - node_js: "iojs-v1.3" + - node_js: "iojs-v1.2" + - node_js: "iojs-v1.1" + - node_js: "iojs-v1.0" + - node_js: "0.11" + - node_js: "0.9" + - node_js: "0.8" + - node_js: "0.6" + - node_js: "0.4" diff --git a/deps/npm/node_modules/is-date-object/CHANGELOG.md b/deps/npm/node_modules/is-date-object/CHANGELOG.md new file mode 100644 index 00000000000000..4a7eab61bb1b26 --- /dev/null +++ b/deps/npm/node_modules/is-date-object/CHANGELOG.md @@ -0,0 +1,10 @@ +1.0.1 / 2015-09-27 +================= + * [Fix] If `@@toStringTag` is not present, use the old-school `Object#toString` test + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + * [Dev Deps] update `is`, `eslint`, `@ljharb/eslint-config`, `semver`, `tape`, `jscs`, `nsp`, `covert` + * [Tests] up to `io.js` `v3.3`, `node` `v4.1` + +1.0.0 / 2015-01-28 +================= + * Initial release. diff --git a/deps/npm/node_modules/is-date-object/LICENSE b/deps/npm/node_modules/is-date-object/LICENSE new file mode 100644 index 00000000000000..fcf5754efe64ab --- /dev/null +++ b/deps/npm/node_modules/is-date-object/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/deps/npm/node_modules/is-date-object/Makefile b/deps/npm/node_modules/is-date-object/Makefile new file mode 100644 index 00000000000000..b9e4fe1aab3dde --- /dev/null +++ b/deps/npm/node_modules/is-date-object/Makefile @@ -0,0 +1,61 @@ +# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. +$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) + + # The files that need updating when incrementing the version number. +VERSIONED_FILES := *.js *.json README* + + +# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. +# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment +# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. +export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") +UTILS := semver +# Make sure that all required utilities can be located. +UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) + +# Default target (by virtue of being the first non '.'-prefixed in the file). +.PHONY: _no-target-specified +_no-target-specified: + $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) + +# Lists all targets defined in this makefile. +.PHONY: list +list: + @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort + +# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). +.PHONY: test +test: + @npm test + +.PHONY: _ensure-tag +_ensure-tag: +ifndef TAG + $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) +endif + +CHANGELOG_ERROR = $(error No CHANGELOG specified) +.PHONY: _ensure-changelog +_ensure-changelog: + @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) + +# Ensures that the git workspace is clean. +.PHONY: _ensure-clean +_ensure-clean: + @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } + +# Makes a release; invoke with `make TAG= release`. +.PHONY: release +release: _ensure-tag _ensure-changelog _ensure-clean + @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ + new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ + if printf "$$new_ver" | command grep -q '^[0-9]'; then \ + semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ + semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ + else \ + new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ + fi; \ + printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ + replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ + git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ + git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/deps/npm/node_modules/is-date-object/README.md b/deps/npm/node_modules/is-date-object/README.md new file mode 100644 index 00000000000000..55b0c59673e603 --- /dev/null +++ b/deps/npm/node_modules/is-date-object/README.md @@ -0,0 +1,53 @@ +# is-date-object [![Version Badge][2]][1] + +[![Build Status][3]][4] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +[![browser support][9]][10] + +Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag. + +## Example + +```js +var isDate = require('is-date-object'); +var assert = require('assert'); + +assert.notOk(isDate(undefined)); +assert.notOk(isDate(null)); +assert.notOk(isDate(false)); +assert.notOk(isDate(true)); +assert.notOk(isDate(42)); +assert.notOk(isDate('foo')); +assert.notOk(isDate(function () {})); +assert.notOk(isDate([])); +assert.notOk(isDate({})); +assert.notOk(isDate(/a/g)); +assert.notOk(isDate(new RegExp('a', 'g'))); + +assert.ok(isDate(new Date())); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-date-object +[2]: http://versionbadg.es/ljharb/is-date-object.svg +[3]: https://travis-ci.org/ljharb/is-date-object.svg +[4]: https://travis-ci.org/ljharb/is-date-object +[5]: https://david-dm.org/ljharb/is-date-object.svg +[6]: https://david-dm.org/ljharb/is-date-object +[7]: https://david-dm.org/ljharb/is-date-object/dev-status.svg +[8]: https://david-dm.org/ljharb/is-date-object#info=devDependencies +[9]: https://ci.testling.com/ljharb/is-date-object.png +[10]: https://ci.testling.com/ljharb/is-date-object +[11]: https://nodei.co/npm/is-date-object.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/is-date-object.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/is-date-object.svg +[downloads-url]: http://npm-stat.com/charts.html?package=is-date-object diff --git a/deps/npm/node_modules/is-date-object/index.js b/deps/npm/node_modules/is-date-object/index.js new file mode 100644 index 00000000000000..fe0d7ecd7c145c --- /dev/null +++ b/deps/npm/node_modules/is-date-object/index.js @@ -0,0 +1,20 @@ +'use strict'; + +var getDay = Date.prototype.getDay; +var tryDateObject = function tryDateObject(value) { + try { + getDay.call(value); + return true; + } catch (e) { + return false; + } +}; + +var toStr = Object.prototype.toString; +var dateClass = '[object Date]'; +var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + +module.exports = function isDateObject(value) { + if (typeof value !== 'object' || value === null) { return false; } + return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass; +}; diff --git a/deps/npm/node_modules/is-date-object/package.json b/deps/npm/node_modules/is-date-object/package.json new file mode 100644 index 00000000000000..20c0b95086f586 --- /dev/null +++ b/deps/npm/node_modules/is-date-object/package.json @@ -0,0 +1,66 @@ +{ + "name": "is-date-object", + "version": "1.0.1", + "author": "Jordan Harband", + "description": "Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", + "license": "MIT", + "main": "index.js", + "scripts": { + "test": "npm run lint && node --harmony --es-staging test.js && npm run security", + "coverage": "covert test.js", + "coverage-quiet": "covert test.js --quiet", + "lint": "npm run jscs && npm run eslint", + "jscs": "jscs test.js *.js", + "eslint": "eslint test.js *.js", + "security": "nsp package" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/is-date-object.git" + }, + "keywords": [ + "Date", + "ES6", + "toStringTag", + "@@toStringTag", + "Date object" + ], + "dependencies": {}, + "devDependencies": { + "foreach": "^2.0.5", + "is": "^3.1.0", + "tape": "^4.2.0", + "indexof": "^0.0.1", + "covert": "^1.1.0", + "jscs": "^2.1.1", + "nsp": "^1.1.0", + "eslint": "^1.5.1", + "@ljharb/eslint-config": "^1.2.0", + "semver": "^5.0.3" + }, + "testling": { + "files": "test.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } + +,"_resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz" +,"_integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" +,"_from": "is-date-object@1.0.1" +} \ No newline at end of file diff --git a/deps/npm/node_modules/is-date-object/test.js b/deps/npm/node_modules/is-date-object/test.js new file mode 100644 index 00000000000000..29f0917bc4a33c --- /dev/null +++ b/deps/npm/node_modules/is-date-object/test.js @@ -0,0 +1,33 @@ +'use strict'; + +var test = require('tape'); +var isDate = require('./'); +var hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol'; + +test('not Dates', function (t) { + t.notOk(isDate(), 'undefined is not Date'); + t.notOk(isDate(null), 'null is not Date'); + t.notOk(isDate(false), 'false is not Date'); + t.notOk(isDate(true), 'true is not Date'); + t.notOk(isDate(42), 'number is not Date'); + t.notOk(isDate('foo'), 'string is not Date'); + t.notOk(isDate([]), 'array is not Date'); + t.notOk(isDate({}), 'object is not Date'); + t.notOk(isDate(function () {}), 'function is not Date'); + t.notOk(isDate(/a/g), 'regex literal is not Date'); + t.notOk(isDate(new RegExp('a', 'g')), 'regex object is not Date'); + t.end(); +}); + +test('@@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (t) { + var realDate = new Date(); + var fakeDate = { toString: function () { return String(realDate); }, valueOf: function () { return realDate.getTime(); } }; + fakeDate[Symbol.toStringTag] = 'Date'; + t.notOk(isDate(fakeDate), 'fake Date with @@toStringTag "Date" is not Date'); + t.end(); +}); + +test('Dates', function (t) { + t.ok(isDate(new Date()), 'new Date() is Date'); + t.end(); +}); diff --git a/deps/npm/node_modules/is-regex/.eslintrc b/deps/npm/node_modules/is-regex/.eslintrc new file mode 100644 index 00000000000000..fbb8e9de537b9e --- /dev/null +++ b/deps/npm/node_modules/is-regex/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": [1] + } +} diff --git a/deps/npm/node_modules/is-regex/.jscs.json b/deps/npm/node_modules/is-regex/.jscs.json new file mode 100644 index 00000000000000..7296cbab09bdf5 --- /dev/null +++ b/deps/npm/node_modules/is-regex/.jscs.json @@ -0,0 +1,175 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 1 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": "asc-insensitive", + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] + }, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} diff --git a/deps/npm/node_modules/is-regex/.npmignore b/deps/npm/node_modules/is-regex/.npmignore new file mode 100644 index 00000000000000..a72b52ebe89779 --- /dev/null +++ b/deps/npm/node_modules/is-regex/.npmignore @@ -0,0 +1,15 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +npm-debug.log +node_modules diff --git a/deps/npm/node_modules/is-regex/.travis.yml b/deps/npm/node_modules/is-regex/.travis.yml new file mode 100644 index 00000000000000..41137a89a59196 --- /dev/null +++ b/deps/npm/node_modules/is-regex/.travis.yml @@ -0,0 +1,165 @@ +language: node_js +os: + - linux +node_js: + - "7.5" + - "6.9" + - "5.12" + - "4.7" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" +before_install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "node" + env: PRETEST=true + - node_js: "node" + env: POSTTEST=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7" + env: TEST=true + os: osx + - node_js: "6" + env: TEST=true + os: osx + - node_js: "5" + env: TEST=true + os: osx + - node_js: "4" + env: TEST=true + os: osx + - node_js: "iojs" + env: TEST=true + os: osx + - node_js: "0.12" + env: TEST=true + os: osx + - node_js: "0.10" + env: TEST=true + os: osx + - node_js: "0.8" + env: TEST=true + os: osx + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true diff --git a/deps/npm/node_modules/is-regex/CHANGELOG.md b/deps/npm/node_modules/is-regex/CHANGELOG.md new file mode 100644 index 00000000000000..6d73800022da37 --- /dev/null +++ b/deps/npm/node_modules/is-regex/CHANGELOG.md @@ -0,0 +1,27 @@ +1.0.4 / 2016-02-18 +================= + * [Fix] ensure that `lastIndex` is not mutated (#3) + * [Refactor] when try/catch is needed, bail early if the value lacks an own `lastIndex` data property + * [Refactor] use an early return instead of a ternary + * [Refactor] bail earlier when the value is falsy + * Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + * [Dev Deps] update `tape`, `jscs`, `editorconfig-tools`, `eslint`, `semver`, `replace`, `nsp`, `covert`, `@ljharb/eslint-config` + * [Tests] on all the node and io.js versions; improve test matri + * [Tests] Fix tests for faked @@toStringTag + +1.0.3 / 2015-01-29 +================= + * If @@toStringTag is not present, use the old-school Object#toString test. + +1.0.2 / 2015-01-29 +================= + * Improve optimization by separating the try/catch, and bailing out early when not typeof "object". + +1.0.1 / 2015-01-28 +================= + * Update `jscs`, `tape`, `covert` + * Use RegExp#exec to test if something is a regex, which works even with ES6 @@toStringTag. + +1.0.0 / 2014-05-19 +================= + * Initial release. diff --git a/deps/npm/node_modules/is-regex/LICENSE b/deps/npm/node_modules/is-regex/LICENSE new file mode 100644 index 00000000000000..47b7b5078fce38 --- /dev/null +++ b/deps/npm/node_modules/is-regex/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/is-regex/Makefile b/deps/npm/node_modules/is-regex/Makefile new file mode 100644 index 00000000000000..b9e4fe1aab3dde --- /dev/null +++ b/deps/npm/node_modules/is-regex/Makefile @@ -0,0 +1,61 @@ +# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. +$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) + + # The files that need updating when incrementing the version number. +VERSIONED_FILES := *.js *.json README* + + +# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. +# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment +# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. +export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") +UTILS := semver +# Make sure that all required utilities can be located. +UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) + +# Default target (by virtue of being the first non '.'-prefixed in the file). +.PHONY: _no-target-specified +_no-target-specified: + $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) + +# Lists all targets defined in this makefile. +.PHONY: list +list: + @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort + +# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). +.PHONY: test +test: + @npm test + +.PHONY: _ensure-tag +_ensure-tag: +ifndef TAG + $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) +endif + +CHANGELOG_ERROR = $(error No CHANGELOG specified) +.PHONY: _ensure-changelog +_ensure-changelog: + @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) + +# Ensures that the git workspace is clean. +.PHONY: _ensure-clean +_ensure-clean: + @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } + +# Makes a release; invoke with `make TAG= release`. +.PHONY: release +release: _ensure-tag _ensure-changelog _ensure-clean + @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ + new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ + if printf "$$new_ver" | command grep -q '^[0-9]'; then \ + semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ + semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ + else \ + new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ + fi; \ + printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ + replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ + git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ + git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/deps/npm/node_modules/is-regex/README.md b/deps/npm/node_modules/is-regex/README.md new file mode 100644 index 00000000000000..dab42912bbdfb7 --- /dev/null +++ b/deps/npm/node_modules/is-regex/README.md @@ -0,0 +1,53 @@ +#is-regex [![Version Badge][2]][1] + +[![Build Status][3]][4] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +[![browser support][9]][10] + +Is this value a JS regex? +This module works cross-realm/iframe, and despite ES6 @@toStringTag. + +## Example + +```js +var isRegex = require('is-regex'); +var assert = require('assert'); + +assert.notOk(isRegex(undefined)); +assert.notOk(isRegex(null)); +assert.notOk(isRegex(false)); +assert.notOk(isRegex(true)); +assert.notOk(isRegex(42)); +assert.notOk(isRegex('foo')); +assert.notOk(isRegex(function () {})); +assert.notOk(isRegex([])); +assert.notOk(isRegex({})); + +assert.ok(isRegex(/a/g)); +assert.ok(isRegex(new RegExp('a', 'g'))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-regex +[2]: http://versionbadg.es/ljharb/is-regex.svg +[3]: https://travis-ci.org/ljharb/is-regex.svg +[4]: https://travis-ci.org/ljharb/is-regex +[5]: https://david-dm.org/ljharb/is-regex.svg +[6]: https://david-dm.org/ljharb/is-regex +[7]: https://david-dm.org/ljharb/is-regex/dev-status.svg +[8]: https://david-dm.org/ljharb/is-regex#info=devDependencies +[9]: https://ci.testling.com/ljharb/is-regex.png +[10]: https://ci.testling.com/ljharb/is-regex +[11]: https://nodei.co/npm/is-regex.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/is-regex.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/is-regex.svg +[downloads-url]: http://npm-stat.com/charts.html?package=is-regex diff --git a/deps/npm/node_modules/is-regex/index.js b/deps/npm/node_modules/is-regex/index.js new file mode 100644 index 00000000000000..be6513390f7d38 --- /dev/null +++ b/deps/npm/node_modules/is-regex/index.js @@ -0,0 +1,39 @@ +'use strict'; + +var has = require('has'); +var regexExec = RegExp.prototype.exec; +var gOPD = Object.getOwnPropertyDescriptor; + +var tryRegexExecCall = function tryRegexExec(value) { + try { + var lastIndex = value.lastIndex; + value.lastIndex = 0; + + regexExec.call(value); + return true; + } catch (e) { + return false; + } finally { + value.lastIndex = lastIndex; + } +}; +var toStr = Object.prototype.toString; +var regexClass = '[object RegExp]'; +var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + +module.exports = function isRegex(value) { + if (!value || typeof value !== 'object') { + return false; + } + if (!hasToStringTag) { + return toStr.call(value) === regexClass; + } + + var descriptor = gOPD(value, 'lastIndex'); + var hasLastIndexDataProperty = descriptor && has(descriptor, 'value'); + if (!hasLastIndexDataProperty) { + return false; + } + + return tryRegexExecCall(value); +}; diff --git a/deps/npm/node_modules/is-regex/package.json b/deps/npm/node_modules/is-regex/package.json new file mode 100644 index 00000000000000..697123805ac3e2 --- /dev/null +++ b/deps/npm/node_modules/is-regex/package.json @@ -0,0 +1,77 @@ +{ + "name": "is-regex", + "version": "1.0.4", + "description": "Is this value a JS regex? Works cross-realm/iframe, and despite ES6 @@toStringTag", + "author": "Jordan Harband", + "license": "MIT", + "main": "index.js", + "scripts": { + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "node --harmony --es-staging test.js", + "posttest": "npm run security", + "coverage": "covert test.js", + "coverage-quiet": "covert test.js --quiet", + "lint": "npm run jscs && npm run eslint", + "jscs": "jscs *.js", + "eslint": "eslint test.js *.js", + "eccheck": "editorconfig-tools check *.js **/*.js > /dev/null", + "security": "nsp check" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/is-regex.git" + }, + "bugs": { + "url": "https://github.com/ljharb/is-regex/issues" + }, + "homepage": "https://github.com/ljharb/is-regex", + "keywords": [ + "regex", + "regexp", + "is", + "regular expression", + "regular", + "expression" + ], + "dependencies": { + "has": "^1.0.1" + }, + "devDependencies": { + "tape": "^4.6.3", + "covert": "^1.1.0", + "jscs": "^3.0.7", + "editorconfig-tools": "^0.1.1", + "nsp": "^2.6.2", + "eslint": "^3.15.0", + "@ljharb/eslint-config": "^11.0.0", + "semver": "^5.3.0", + "replace": "^0.3.0" + }, + "testling": { + "files": "test.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..12.0", + "opera/15.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } + +,"_resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz" +,"_integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=" +,"_from": "is-regex@1.0.4" +} \ No newline at end of file diff --git a/deps/npm/node_modules/is-regex/test.js b/deps/npm/node_modules/is-regex/test.js new file mode 100644 index 00000000000000..8d390038dae33d --- /dev/null +++ b/deps/npm/node_modules/is-regex/test.js @@ -0,0 +1,58 @@ +'use strict'; + +var test = require('tape'); +var isRegex = require('./'); +var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + +test('not regexes', function (t) { + t.notOk(isRegex(), 'undefined is not regex'); + t.notOk(isRegex(null), 'null is not regex'); + t.notOk(isRegex(false), 'false is not regex'); + t.notOk(isRegex(true), 'true is not regex'); + t.notOk(isRegex(42), 'number is not regex'); + t.notOk(isRegex('foo'), 'string is not regex'); + t.notOk(isRegex([]), 'array is not regex'); + t.notOk(isRegex({}), 'object is not regex'); + t.notOk(isRegex(function () {}), 'function is not regex'); + t.end(); +}); + +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { + var regex = /a/g; + var fakeRegex = { + toString: function () { return String(regex); }, + valueOf: function () { return regex; } + }; + fakeRegex[Symbol.toStringTag] = 'RegExp'; + t.notOk(isRegex(fakeRegex), 'fake RegExp with @@toStringTag "RegExp" is not regex'); + t.end(); +}); + +test('regexes', function (t) { + t.ok(isRegex(/a/g), 'regex literal is regex'); + t.ok(isRegex(new RegExp('a', 'g')), 'regex object is regex'); + t.end(); +}); + +test('does not mutate regexes', function (t) { + t.test('lastIndex is a marker object', function (st) { + var regex = /a/; + var marker = {}; + regex.lastIndex = marker; + st.equal(regex.lastIndex, marker, 'lastIndex is the marker object'); + st.ok(isRegex(regex), 'is regex'); + st.equal(regex.lastIndex, marker, 'lastIndex is the marker object after isRegex'); + st.end(); + }); + + t.test('lastIndex is nonzero', function (st) { + var regex = /a/; + regex.lastIndex = 3; + st.equal(regex.lastIndex, 3, 'lastIndex is 3'); + st.ok(isRegex(regex), 'is regex'); + st.equal(regex.lastIndex, 3, 'lastIndex is 3 after isRegex'); + st.end(); + }); + + t.end(); +}); diff --git a/deps/npm/node_modules/is-symbol/.editorconfig b/deps/npm/node_modules/is-symbol/.editorconfig new file mode 100644 index 00000000000000..572e9793f03233 --- /dev/null +++ b/deps/npm/node_modules/is-symbol/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; diff --git a/deps/npm/node_modules/is-symbol/.eslintrc b/deps/npm/node_modules/is-symbol/.eslintrc new file mode 100644 index 00000000000000..5f511fd05f5435 --- /dev/null +++ b/deps/npm/node_modules/is-symbol/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-statements": [2, 14] + } +} diff --git a/deps/npm/node_modules/is-symbol/.jscs.json b/deps/npm/node_modules/is-symbol/.jscs.json new file mode 100644 index 00000000000000..759bd65c52915d --- /dev/null +++ b/deps/npm/node_modules/is-symbol/.jscs.json @@ -0,0 +1,175 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 1 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": "asc-insensitive", + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] + }, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} diff --git a/deps/npm/node_modules/is-symbol/.nvmrc b/deps/npm/node_modules/is-symbol/.nvmrc new file mode 100644 index 00000000000000..64f5a0a6813a4f --- /dev/null +++ b/deps/npm/node_modules/is-symbol/.nvmrc @@ -0,0 +1 @@ +node diff --git a/deps/npm/node_modules/is-symbol/.travis.yml b/deps/npm/node_modules/is-symbol/.travis.yml new file mode 100644 index 00000000000000..c671d5ea89c498 --- /dev/null +++ b/deps/npm/node_modules/is-symbol/.travis.yml @@ -0,0 +1,241 @@ +language: node_js +os: + - linux +node_js: + - "10.11" + - "9.11" + - "8.12" + - "7.10" + - "6.14" + - "5.12" + - "4.9" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" +before_install: + - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' + - 'nvm install-latest-npm' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "lts/*" + env: PRETEST=true + - node_js: "lts/*" + env: POSTTEST=true + - node_js: "4" + env: COVERAGE=true + - node_js: "10.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true + - env: COVERAGE=true diff --git a/deps/npm/node_modules/is-symbol/CHANGELOG.md b/deps/npm/node_modules/is-symbol/CHANGELOG.md new file mode 100644 index 00000000000000..a7b8baf8db733f --- /dev/null +++ b/deps/npm/node_modules/is-symbol/CHANGELOG.md @@ -0,0 +1,12 @@ +1.0.2 / 2018-09-20 +================= + * [Refactor] use `has-symbols` and `object-inspect` + * [Tests] test on all the node minor versions + +1.0.1 / 2015-01-26 +================= + * Corrected description + +1.0.0 / 2015-01-24 +================= + * Initial release diff --git a/deps/npm/node_modules/is-symbol/LICENSE b/deps/npm/node_modules/is-symbol/LICENSE new file mode 100644 index 00000000000000..fcf5754efe64ab --- /dev/null +++ b/deps/npm/node_modules/is-symbol/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/deps/npm/node_modules/is-symbol/Makefile b/deps/npm/node_modules/is-symbol/Makefile new file mode 100644 index 00000000000000..b9e4fe1aab3dde --- /dev/null +++ b/deps/npm/node_modules/is-symbol/Makefile @@ -0,0 +1,61 @@ +# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. +$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) + + # The files that need updating when incrementing the version number. +VERSIONED_FILES := *.js *.json README* + + +# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. +# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment +# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. +export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") +UTILS := semver +# Make sure that all required utilities can be located. +UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) + +# Default target (by virtue of being the first non '.'-prefixed in the file). +.PHONY: _no-target-specified +_no-target-specified: + $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) + +# Lists all targets defined in this makefile. +.PHONY: list +list: + @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort + +# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). +.PHONY: test +test: + @npm test + +.PHONY: _ensure-tag +_ensure-tag: +ifndef TAG + $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) +endif + +CHANGELOG_ERROR = $(error No CHANGELOG specified) +.PHONY: _ensure-changelog +_ensure-changelog: + @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) + +# Ensures that the git workspace is clean. +.PHONY: _ensure-clean +_ensure-clean: + @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } + +# Makes a release; invoke with `make TAG= release`. +.PHONY: release +release: _ensure-tag _ensure-changelog _ensure-clean + @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ + new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ + if printf "$$new_ver" | command grep -q '^[0-9]'; then \ + semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ + semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ + else \ + new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ + fi; \ + printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ + replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ + git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ + git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/deps/npm/node_modules/is-symbol/README.md b/deps/npm/node_modules/is-symbol/README.md new file mode 100644 index 00000000000000..8544c8c0937c1a --- /dev/null +++ b/deps/npm/node_modules/is-symbol/README.md @@ -0,0 +1,46 @@ +#is-symbol [![Version Badge][2]][1] + +[![Build Status][3]][4] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +[![browser support][9]][10] + +Is this an ES6 Symbol value? + +## Example + +```js +var isSymbol = require('is-symbol'); +assert(!isSymbol(function () {})); +assert(!isSymbol(null)); +assert(!isSymbol(function* () { yield 42; return Infinity; }); + +assert(isSymbol(Symbol.iterator)); +assert(isSymbol(Symbol('foo'))); +assert(isSymbol(Symbol.for('foo'))); +assert(isSymbol(Object(Symbol('foo')))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/is-symbol +[2]: http://versionbadg.es/ljharb/is-symbol.svg +[3]: https://travis-ci.org/ljharb/is-symbol.svg +[4]: https://travis-ci.org/ljharb/is-symbol +[5]: https://david-dm.org/ljharb/is-symbol.svg +[6]: https://david-dm.org/ljharb/is-symbol +[7]: https://david-dm.org/ljharb/is-symbol/dev-status.svg +[8]: https://david-dm.org/ljharb/is-symbol#info=devDependencies +[9]: https://ci.testling.com/ljharb/is-symbol.png +[10]: https://ci.testling.com/ljharb/is-symbol +[11]: https://nodei.co/npm/is-symbol.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/is-symbol.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/is-symbol.svg +[downloads-url]: http://npm-stat.com/charts.html?package=is-symbol diff --git a/deps/npm/node_modules/is-symbol/index.js b/deps/npm/node_modules/is-symbol/index.js new file mode 100644 index 00000000000000..3d653e27f5fc63 --- /dev/null +++ b/deps/npm/node_modules/is-symbol/index.js @@ -0,0 +1,35 @@ +'use strict'; + +var toStr = Object.prototype.toString; +var hasSymbols = require('has-symbols')(); + +if (hasSymbols) { + var symToStr = Symbol.prototype.toString; + var symStringRegex = /^Symbol\(.*\)$/; + var isSymbolObject = function isRealSymbolObject(value) { + if (typeof value.valueOf() !== 'symbol') { + return false; + } + return symStringRegex.test(symToStr.call(value)); + }; + + module.exports = function isSymbol(value) { + if (typeof value === 'symbol') { + return true; + } + if (toStr.call(value) !== '[object Symbol]') { + return false; + } + try { + return isSymbolObject(value); + } catch (e) { + return false; + } + }; +} else { + + module.exports = function isSymbol(value) { + // this environment does not support Symbols. + return false && value; + }; +} diff --git a/deps/npm/node_modules/is-symbol/package.json b/deps/npm/node_modules/is-symbol/package.json new file mode 100644 index 00000000000000..5e124e2194a73d --- /dev/null +++ b/deps/npm/node_modules/is-symbol/package.json @@ -0,0 +1,72 @@ +{ + "name": "is-symbol", + "version": "1.0.2", + "description": "Determine if a value is an ES6 Symbol or not.", + "main": "index.js", + "scripts": { + "prepublish": "safe-publish-latest", + "pretest": "npm run lint", + "tests-only": "node --es-staging --harmony test", + "test": "npm run tests-only", + "posttest": "npm run security", + "coverage": "covert test", + "lint": "npm run jscs && npm run eslint", + "jscs": "jscs *.js */*.js", + "eslint": "eslint *.js */*.js", + "security": "nsp check" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/is-symbol.git" + }, + "keywords": [ + "symbol", + "es6", + "is", + "Symbol" + ], + "author": "Jordan Harband", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/is-symbol/issues" + }, + "dependencies": { + "has-symbols": "^1.0.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "covert": "^1.1.0", + "eslint": "^4.19.1", + "jscs": "^3.0.7", + "nsp": "^3.2.1", + "object-inspect": "^1.6.0", + "safe-publish-latest": "^1.1.2", + "semver": "^5.5.0", + "tape": "^4.9.0" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } + +,"_resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz" +,"_integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==" +,"_from": "is-symbol@1.0.2" +} \ No newline at end of file diff --git a/deps/npm/node_modules/is-symbol/test/.eslintrc b/deps/npm/node_modules/is-symbol/test/.eslintrc new file mode 100644 index 00000000000000..1ac0d47b38544d --- /dev/null +++ b/deps/npm/node_modules/is-symbol/test/.eslintrc @@ -0,0 +1,7 @@ +{ + "rules": { + "max-statements-per-line": [2, { "max": 2 }], + "no-restricted-properties": 0, + "symbol-description": 0, + } +} diff --git a/deps/npm/node_modules/is-symbol/test/index.js b/deps/npm/node_modules/is-symbol/test/index.js new file mode 100644 index 00000000000000..46dfa439d9bfe8 --- /dev/null +++ b/deps/npm/node_modules/is-symbol/test/index.js @@ -0,0 +1,91 @@ +'use strict'; + +var test = require('tape'); +var isSymbol = require('../index'); + +var forEach = function (arr, func) { + var i; + for (i = 0; i < arr.length; ++i) { + func(arr[i], i, arr); + } +}; + +var hasSymbols = require('has-symbols')(); +var inspect = require('object-inspect'); +var debug = function (v, m) { return inspect(v) + ' ' + m; }; + +test('non-symbol values', function (t) { + var nonSymbols = [ + true, + false, + Object(true), + Object(false), + null, + undefined, + {}, + [], + /a/g, + 'string', + 42, + new Date(), + function () {}, + NaN + ]; + t.plan(nonSymbols.length); + forEach(nonSymbols, function (nonSymbol) { + t.equal(false, isSymbol(nonSymbol), debug(nonSymbol, 'is not a symbol')); + }); + t.end(); +}); + +test('faked symbol values', function (t) { + t.test('real symbol valueOf', { skip: !hasSymbols }, function (st) { + var fakeSymbol = { valueOf: function () { return Symbol('foo'); } }; + st.equal(false, isSymbol(fakeSymbol), 'object with valueOf returning a symbol is not a symbol'); + st.end(); + }); + + t.test('faked @@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (st) { + var fakeSymbol = { valueOf: function () { return Symbol('foo'); } }; + fakeSymbol[Symbol.toStringTag] = 'Symbol'; + st.equal(false, isSymbol(fakeSymbol), 'object with fake Symbol @@toStringTag and valueOf returning a symbol is not a symbol'); + var notSoFakeSymbol = { valueOf: function () { return 42; } }; + notSoFakeSymbol[Symbol.toStringTag] = 'Symbol'; + st.equal(false, isSymbol(notSoFakeSymbol), 'object with fake Symbol @@toStringTag and valueOf not returning a symbol is not a symbol'); + st.end(); + }); + + var fakeSymbolString = { toString: function () { return 'Symbol(foo)'; } }; + t.equal(false, isSymbol(fakeSymbolString), 'object with toString returning Symbol(foo) is not a symbol'); + + t.end(); +}); + +test('Symbol support', { skip: !hasSymbols }, function (t) { + t.test('well-known Symbols', function (st) { + var isWellKnown = function filterer(name) { + return name !== 'for' && name !== 'keyFor' && !(name in filterer); + }; + var wellKnownSymbols = Object.getOwnPropertyNames(Symbol).filter(isWellKnown); + wellKnownSymbols.forEach(function (name) { + var sym = Symbol[name]; + st.equal(true, isSymbol(sym), debug(sym, ' is a symbol')); + }); + st.end(); + }); + + t.test('user-created symbols', function (st) { + var symbols = [ + Symbol(), + Symbol('foo'), + Symbol['for']('foo'), + Object(Symbol('object')) + ]; + symbols.forEach(function (sym) { + st.equal(true, isSymbol(sym), debug(sym, ' is a symbol')); + }); + st.end(); + }); + + t.end(); +}); diff --git a/deps/npm/node_modules/isstream/.jshintrc b/deps/npm/node_modules/isstream/.jshintrc new file mode 100644 index 00000000000000..c8ef3ca4097f82 --- /dev/null +++ b/deps/npm/node_modules/isstream/.jshintrc @@ -0,0 +1,59 @@ +{ + "predef": [ ] + , "bitwise": false + , "camelcase": false + , "curly": false + , "eqeqeq": false + , "forin": false + , "immed": false + , "latedef": false + , "noarg": true + , "noempty": true + , "nonew": true + , "plusplus": false + , "quotmark": true + , "regexp": false + , "undef": true + , "unused": true + , "strict": false + , "trailing": true + , "maxlen": 120 + , "asi": true + , "boss": true + , "debug": true + , "eqnull": true + , "esnext": true + , "evil": true + , "expr": true + , "funcscope": false + , "globalstrict": false + , "iterator": false + , "lastsemic": true + , "laxbreak": true + , "laxcomma": true + , "loopfunc": true + , "multistr": false + , "onecase": false + , "proto": false + , "regexdash": false + , "scripturl": true + , "smarttabs": false + , "shadow": false + , "sub": true + , "supernew": false + , "validthis": true + , "browser": true + , "couch": false + , "devel": false + , "dojo": false + , "mootools": false + , "node": true + , "nonstandard": true + , "prototypejs": false + , "rhino": false + , "worker": true + , "wsh": false + , "nomen": false + , "onevar": false + , "passfail": false +} \ No newline at end of file diff --git a/deps/npm/node_modules/minizlib/index.js b/deps/npm/node_modules/minizlib/index.js index c91a59c92dbd32..df486965c7e82e 100644 --- a/deps/npm/node_modules/minizlib/index.js +++ b/deps/npm/node_modules/minizlib/index.js @@ -2,11 +2,13 @@ const assert = require('assert') const Buffer = require('buffer').Buffer -const binding = process.binding('zlib') +const realZlib = require('zlib') const constants = exports.constants = require('./constants.js') const MiniPass = require('minipass') +const OriginalBufferConcat = Buffer.concat + class ZlibError extends Error { constructor (msg, errno) { super('zlib: ' + msg) @@ -54,24 +56,19 @@ const strategies = new Set([ // true or false if there is anything in the queue when // you call the .write() method. const _opts = Symbol('opts') -const _chunkSize = Symbol('chunkSize') const _flushFlag = Symbol('flushFlag') const _finishFlush = Symbol('finishFlush') const _handle = Symbol('handle') -const _hadError = Symbol('hadError') -const _buffer = Symbol('buffer') -const _offset = Symbol('offset') +const _onError = Symbol('onError') const _level = Symbol('level') const _strategy = Symbol('strategy') const _ended = Symbol('ended') -const _writeState = Symbol('writeState') class Zlib extends MiniPass { constructor (opts, mode) { super(opts) this[_ended] = false this[_opts] = opts = opts || {} - this[_chunkSize] = opts.chunkSize || constants.Z_DEFAULT_CHUNK if (opts.flush && !validFlushFlags.has(opts.flush)) { throw new TypeError('Invalid flush flag: ' + opts.flush) } @@ -119,18 +116,17 @@ class Zlib extends MiniPass { } } - this[_handle] = new binding.Zlib(mode) + this[_handle] = new realZlib[mode](opts) - this[_hadError] = false - this[_handle].onerror = (message, errno) => { + this[_onError] = (err) => { // there is no way to cleanly recover. // continuing only obscures problems. this.close() - this[_hadError] = true - const error = new ZlibError(message, errno) + const error = new ZlibError(err.message, err.errno) this.emit('error', error) } + this[_handle].on('error', this[_onError]) const level = typeof opts.level === 'number' ? opts.level : constants.Z_DEFAULT_COMPRESSION @@ -138,30 +134,9 @@ class Zlib extends MiniPass { var strategy = typeof opts.strategy === 'number' ? opts.strategy : constants.Z_DEFAULT_STRATEGY - this[_writeState] = new Uint32Array(2); - const window = opts.windowBits || constants.Z_DEFAULT_WINDOWBITS - const memLevel = opts.memLevel || constants.Z_DEFAULT_MEMLEVEL - // API changed in node v9 /* istanbul ignore next */ - if (/^v[0-8]\./.test(process.version)) { - this[_handle].init(window, - level, - memLevel, - strategy, - opts.dictionary) - } else { - this[_handle].init(window, - level, - memLevel, - strategy, - this[_writeState], - () => {}, - opts.dictionary) - } - this[_buffer] = Buffer.allocUnsafe(this[_chunkSize]) - this[_offset] = 0 this[_level] = level this[_strategy] = strategy @@ -196,9 +171,18 @@ class Zlib extends MiniPass { if (this[_level] !== level || this[_strategy] !== strategy) { this.flush(constants.Z_SYNC_FLUSH) assert(this[_handle], 'zlib binding closed') + // .params() calls .flush(), but the latter is always async in the + // core zlib. We override .flush() temporarily to intercept that and + // flush synchronously. + const origFlush = this[_handle].flush + this[_handle].flush = (flushFlag, cb) => { + this[_handle].flush = origFlush + this.flush(flushFlag) + cb() + } this[_handle].params(level, strategy) /* istanbul ignore else */ - if (!this[_hadError]) { + if (this[_handle]) { this[_level] = level this[_strategy] = strategy } @@ -244,64 +228,51 @@ class Zlib extends MiniPass { if (typeof chunk === 'string') chunk = Buffer.from(chunk, encoding) - let availInBefore = chunk && chunk.length - let availOutBefore = this[_chunkSize] - this[_offset] - let inOff = 0 // the offset of the input buffer - const flushFlag = this[_flushFlag] - let writeReturn = true - assert(this[_handle], 'zlib binding closed') - do { - let res = this[_handle].writeSync( - flushFlag, - chunk, // in - inOff, // in_off - availInBefore, // in_len - this[_buffer], // out - this[_offset], //out_off - availOutBefore // out_len - ) - - if (this[_hadError]) - break - - // API changed in v9 - /* istanbul ignore next */ - let availInAfter = res ? res[0] : this[_writeState][1] - /* istanbul ignore next */ - let availOutAfter = res ? res[1] : this[_writeState][0] - - const have = availOutBefore - availOutAfter - assert(have >= 0, 'have should not go down') - - if (have > 0) { - const out = this[_buffer].slice( - this[_offset], this[_offset] + have - ) - - this[_offset] += have - // serve some output to the consumer. - writeReturn = super.write(out) && writeReturn - } - // exhausted the output buffer, or used all the input create a new one. - if (availOutAfter === 0 || this[_offset] >= this[_chunkSize]) { - availOutBefore = this[_chunkSize] - this[_offset] = 0 - this[_buffer] = Buffer.allocUnsafe(this[_chunkSize]) + // _processChunk tries to .close() the native handle after it's done, so we + // intercept that by temporarily making it a no-op. + const nativeHandle = this[_handle]._handle + const originalNativeClose = nativeHandle.close + nativeHandle.close = () => {} + const originalClose = this[_handle].close + this[_handle].close = () => {} + // It also calls `Buffer.concat()` at the end, which may be convenient + // for some, but which we are not interested in as it slows us down. + Buffer.concat = (args) => args + let result + try { + result = this[_handle]._processChunk(chunk, this[_flushFlag]) + } catch (err) { + this[_onError](err) + } finally { + Buffer.concat = OriginalBufferConcat + if (this[_handle]) { + // Core zlib resets `_handle` to null after attempting to close the + // native handle. Our no-op handler prevented actual closure, but we + // need to restore the `._handle` property. + this[_handle]._handle = nativeHandle + nativeHandle.close = originalNativeClose + this[_handle].close = originalClose + // `_processChunk()` adds an 'error' listener. If we don't remove it + // after each call, these handlers start piling up. + this[_handle].removeAllListeners('error') } + } - if (availOutAfter === 0) { - // Not actually done. Need to reprocess. - // Also, update the availInBefore to the availInAfter value, - // so that if we have to hit it a third (fourth, etc.) time, - // it'll have the correct byte counts. - inOff += (availInBefore - availInAfter) - availInBefore = availInAfter - continue + let writeReturn + if (result) { + if (Array.isArray(result) && result.length > 0) { + // The first buffer is always `handle._outBuffer`, which would be + // re-used for later invocations; so, we always have to copy that one. + writeReturn = super.write(Buffer.from(result[0])) + for (let i = 1; i < result.length; i++) { + writeReturn = super.write(result[i]) + } + } else { + writeReturn = super.write(Buffer.from(result)) } - break - } while (!this[_hadError]) + } if (cb) cb() @@ -312,46 +283,46 @@ class Zlib extends MiniPass { // minimal 2-byte header class Deflate extends Zlib { constructor (opts) { - super(opts, constants.DEFLATE) + super(opts, 'Deflate') } } class Inflate extends Zlib { constructor (opts) { - super(opts, constants.INFLATE) + super(opts, 'Inflate') } } // gzip - bigger header, same deflate compression class Gzip extends Zlib { constructor (opts) { - super(opts, constants.GZIP) + super(opts, 'Gzip') } } class Gunzip extends Zlib { constructor (opts) { - super(opts, constants.GUNZIP) + super(opts, 'Gunzip') } } // raw - no header class DeflateRaw extends Zlib { constructor (opts) { - super(opts, constants.DEFLATERAW) + super(opts, 'DeflateRaw') } } class InflateRaw extends Zlib { constructor (opts) { - super(opts, constants.INFLATERAW) + super(opts, 'InflateRaw') } } // auto-detect header. class Unzip extends Zlib { constructor (opts) { - super(opts, constants.UNZIP) + super(opts, 'Unzip') } } diff --git a/deps/npm/node_modules/minizlib/package.json b/deps/npm/node_modules/minizlib/package.json index f3a57e9f1d8216..0e6e4f4670752c 100644 --- a/deps/npm/node_modules/minizlib/package.json +++ b/deps/npm/node_modules/minizlib/package.json @@ -1,27 +1,27 @@ { - "_from": "minizlib@^1.1.1", - "_id": "minizlib@1.1.1", + "_from": "minizlib@^1.2.1", + "_id": "minizlib@1.2.1", "_inBundle": false, - "_integrity": "sha512-TrfjCjk4jLhcJyGMYymBH6oTXcWjYbUAXTHDbtnWHjZC25h0cdajHuPE1zxb4DVmu8crfh+HwH/WMuyLG0nHBg==", + "_integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", "_location": "/minizlib", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "minizlib@^1.1.1", + "raw": "minizlib@^1.2.1", "name": "minizlib", "escapedName": "minizlib", - "rawSpec": "^1.1.1", + "rawSpec": "^1.2.1", "saveSpec": null, - "fetchSpec": "^1.1.1" + "fetchSpec": "^1.2.1" }, "_requiredBy": [ "/tar" ], - "_resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.1.tgz", - "_shasum": "6734acc045a46e61d596a43bb9d9cd326e19cc42", - "_spec": "minizlib@^1.1.1", - "_where": "/Users/zkat/Documents/code/work/npm/node_modules/tar", + "_resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", + "_shasum": "dd27ea6136243c7c880684e8672bb3a45fd9b614", + "_spec": "minizlib@^1.2.1", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/tar", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -37,7 +37,7 @@ "deprecated": false, "description": "A small fast zlib stream built on [minipass](http://npm.im/minipass) and Node.js's zlib binding.", "devDependencies": { - "tap": "^10.7.2" + "tap": "^12.0.1" }, "files": [ "index.js", @@ -67,5 +67,5 @@ "preversion": "npm test", "test": "tap test/*.js --100 -J" }, - "version": "1.1.1" + "version": "1.2.1" } diff --git a/deps/npm/node_modules/move-concurrently/README.md~ b/deps/npm/node_modules/move-concurrently/README.md~ new file mode 100644 index 00000000000000..7d04d45955d5a1 --- /dev/null +++ b/deps/npm/node_modules/move-concurrently/README.md~ @@ -0,0 +1,52 @@ +# move-concurrently + +Move files and directories. + +``` +const move = require('move-concurrently') +move('/path/to/thing', '/new/path/thing'), err => { + if (err) throw err + // thing is now moved! +}) +``` + +Uses `rename` to move things as fast as possible. + +If you `move` across devices or on filesystems that don't support renaming +large directories. That is, situations that result in `rename` returning +the `EXDEV` error, then `move` will fallback to copy + delete. + +When recursively copying directories it will first try to rename the +contents before falling back to copying. While this will be slightly slower +in true cross-device scenarios, it is MUCH faster in cases where the +filesystem can't handle directory renames. + +When copying ownership is maintained when running as root. Permissions are +always maintained. On Windows, if symlinks are unavailable then junctions +will be used. + +## INTERFACE + +### move(from, to, options) → Promise + +Recursively moves `from` to `to` and resolves its promise when finished. +If `to` already exists then the promise will be rejected with an `EEXIST` +error. + +Starts by trying to rename `from` to `to`. + +Options are: + +* maxConcurrency – (Default: `1`) The maximum number of concurrent copies to do at once. +* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires + an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory + fails then we'll try making a junction instead. + +Options can also include dependency injection: + +* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's. +* fs - (Default: `require('fs')`) The filesystem module to use. Can be used + to use `graceful-fs` or to inject a mock. +* writeStreamAtomic - (Default: `require('fs-write-stream-atomic')`) The + implementation of `writeStreamAtomic` to use. Used to inject a mock. +* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock. diff --git a/deps/npm/node_modules/mute-stream/.nyc_output/33508.json b/deps/npm/node_modules/mute-stream/.nyc_output/33508.json new file mode 100644 index 00000000000000..9e26dfeeb6e641 --- /dev/null +++ b/deps/npm/node_modules/mute-stream/.nyc_output/33508.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/deps/npm/node_modules/mute-stream/.nyc_output/33510.json b/deps/npm/node_modules/mute-stream/.nyc_output/33510.json new file mode 100644 index 00000000000000..1d04442328beff --- /dev/null +++ b/deps/npm/node_modules/mute-stream/.nyc_output/33510.json @@ -0,0 +1 @@ +{"./mute.js":{"path":"./mute.js","s":{"1":1,"2":1,"3":1,"4":7,"5":7,"6":7,"7":7,"8":7,"9":7,"10":7,"11":7,"12":1,"13":1,"14":1,"15":10,"16":1,"17":6,"18":1,"19":1,"20":5,"21":1,"22":1,"23":8,"24":1,"25":2,"26":1,"27":5,"28":1,"29":5,"30":1,"31":2,"32":2,"33":1,"34":2,"35":2,"36":1,"37":2,"38":2,"39":1,"40":25,"41":13,"42":5,"43":8,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":8,"51":0,"52":0,"53":0,"54":8,"55":20,"56":1,"57":2,"58":2,"59":0,"60":2,"61":2,"62":0,"63":2,"64":1,"65":3,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":1,"73":1,"74":1},"b":{"1":[7,5],"2":[7,7],"3":[3,5],"4":[3,2],"5":[4,1],"6":[0,1],"7":[4,1],"8":[0,1],"9":[2,0],"10":[2,0],"11":[13,12],"12":[5,8],"13":[0,8],"14":[0,0],"15":[0,8],"16":[8,0,0],"17":[2,0],"18":[0,2],"19":[2,1],"20":[0,2],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0]},"f":{"1":7,"2":10,"3":6,"4":5,"5":8,"6":2,"7":5,"8":5,"9":2,"10":2,"11":2,"12":25,"13":2,"14":3,"15":0},"fnMap":{"1":{"name":"MuteStream","line":7,"loc":{"start":{"line":7,"column":0},"end":{"line":7,"column":27}}},"2":{"name":"(anonymous_2)","line":29,"loc":{"start":{"line":29,"column":28},"end":{"line":29,"column":40}}},"3":{"name":"(anonymous_3)","line":33,"loc":{"start":{"line":33,"column":30},"end":{"line":33,"column":42}}},"4":{"name":"onPipe","line":44,"loc":{"start":{"line":44,"column":0},"end":{"line":44,"column":22}}},"5":{"name":"getIsTTY","line":55,"loc":{"start":{"line":55,"column":0},"end":{"line":55,"column":21}}},"6":{"name":"setIsTTY","line":63,"loc":{"start":{"line":63,"column":0},"end":{"line":63,"column":26}}},"7":{"name":"(anonymous_7)","line":73,"loc":{"start":{"line":73,"column":7},"end":{"line":73,"column":19}}},"8":{"name":"(anonymous_8)","line":80,"loc":{"start":{"line":80,"column":7},"end":{"line":80,"column":19}}},"9":{"name":"(anonymous_9)","line":87,"loc":{"start":{"line":87,"column":28},"end":{"line":87,"column":53}}},"10":{"name":"(anonymous_10)","line":92,"loc":{"start":{"line":92,"column":29},"end":{"line":92,"column":41}}},"11":{"name":"(anonymous_11)","line":96,"loc":{"start":{"line":96,"column":30},"end":{"line":96,"column":42}}},"12":{"name":"(anonymous_12)","line":100,"loc":{"start":{"line":100,"column":29},"end":{"line":100,"column":42}}},"13":{"name":"(anonymous_13)","line":124,"loc":{"start":{"line":124,"column":27},"end":{"line":124,"column":40}}},"14":{"name":"proxy","line":136,"loc":{"start":{"line":136,"column":0},"end":{"line":136,"column":20}}},"15":{"name":"(anonymous_15)","line":136,"loc":{"start":{"line":136,"column":29},"end":{"line":136,"column":41}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":30}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":27}},"3":{"start":{"line":7,"column":0},"end":{"line":20,"column":1}},"4":{"start":{"line":8,"column":2},"end":{"line":8,"column":20}},"5":{"start":{"line":9,"column":2},"end":{"line":9,"column":19}},"6":{"start":{"line":10,"column":2},"end":{"line":10,"column":38}},"7":{"start":{"line":11,"column":2},"end":{"line":11,"column":20}},"8":{"start":{"line":12,"column":2},"end":{"line":12,"column":31}},"9":{"start":{"line":13,"column":2},"end":{"line":13,"column":29}},"10":{"start":{"line":18,"column":2},"end":{"line":18,"column":36}},"11":{"start":{"line":19,"column":2},"end":{"line":19,"column":26}},"12":{"start":{"line":22,"column":0},"end":{"line":22,"column":54}},"13":{"start":{"line":24,"column":0},"end":{"line":27,"column":2}},"14":{"start":{"line":29,"column":0},"end":{"line":31,"column":1}},"15":{"start":{"line":30,"column":2},"end":{"line":30,"column":19}},"16":{"start":{"line":33,"column":0},"end":{"line":35,"column":1}},"17":{"start":{"line":34,"column":2},"end":{"line":34,"column":20}},"18":{"start":{"line":37,"column":0},"end":{"line":42,"column":2}},"19":{"start":{"line":44,"column":0},"end":{"line":46,"column":1}},"20":{"start":{"line":45,"column":2},"end":{"line":45,"column":17}},"21":{"start":{"line":48,"column":0},"end":{"line":53,"column":2}},"22":{"start":{"line":55,"column":0},"end":{"line":60,"column":1}},"23":{"start":{"line":56,"column":2},"end":{"line":59,"column":9}},"24":{"start":{"line":63,"column":0},"end":{"line":70,"column":1}},"25":{"start":{"line":64,"column":2},"end":{"line":69,"column":4}},"26":{"start":{"line":72,"column":0},"end":{"line":77,"column":44}},"27":{"start":{"line":74,"column":4},"end":{"line":76,"column":23}},"28":{"start":{"line":79,"column":0},"end":{"line":84,"column":44}},"29":{"start":{"line":81,"column":4},"end":{"line":83,"column":23}},"30":{"start":{"line":87,"column":0},"end":{"line":90,"column":1}},"31":{"start":{"line":88,"column":2},"end":{"line":88,"column":19}},"32":{"start":{"line":89,"column":2},"end":{"line":89,"column":56}},"33":{"start":{"line":92,"column":0},"end":{"line":94,"column":1}},"34":{"start":{"line":93,"column":2},"end":{"line":93,"column":41}},"35":{"start":{"line":93,"column":17},"end":{"line":93,"column":41}},"36":{"start":{"line":96,"column":0},"end":{"line":98,"column":1}},"37":{"start":{"line":97,"column":2},"end":{"line":97,"column":42}},"38":{"start":{"line":97,"column":17},"end":{"line":97,"column":42}},"39":{"start":{"line":100,"column":0},"end":{"line":122,"column":1}},"40":{"start":{"line":101,"column":2},"end":{"line":120,"column":3}},"41":{"start":{"line":102,"column":4},"end":{"line":102,"column":34}},"42":{"start":{"line":102,"column":23},"end":{"line":102,"column":34}},"43":{"start":{"line":103,"column":4},"end":{"line":119,"column":5}},"44":{"start":{"line":104,"column":6},"end":{"line":108,"column":7}},"45":{"start":{"line":105,"column":8},"end":{"line":105,"column":42}},"46":{"start":{"line":106,"column":8},"end":{"line":106,"column":42}},"47":{"start":{"line":107,"column":8},"end":{"line":107,"column":29}},"48":{"start":{"line":109,"column":6},"end":{"line":109,"column":29}},"49":{"start":{"line":110,"column":6},"end":{"line":110,"column":33}},"50":{"start":{"line":112,"column":6},"end":{"line":117,"column":7}},"51":{"start":{"line":114,"column":8},"end":{"line":114,"column":32}},"52":{"start":{"line":115,"column":8},"end":{"line":115,"column":39}},"53":{"start":{"line":116,"column":8},"end":{"line":116,"column":41}},"54":{"start":{"line":118,"column":6},"end":{"line":118,"column":50}},"55":{"start":{"line":121,"column":2},"end":{"line":121,"column":22}},"56":{"start":{"line":124,"column":0},"end":{"line":134,"column":1}},"57":{"start":{"line":125,"column":2},"end":{"line":131,"column":3}},"58":{"start":{"line":126,"column":4},"end":{"line":130,"column":5}},"59":{"start":{"line":127,"column":6},"end":{"line":127,"column":50}},"60":{"start":{"line":129,"column":6},"end":{"line":129,"column":14}},"61":{"start":{"line":132,"column":2},"end":{"line":132,"column":29}},"62":{"start":{"line":132,"column":9},"end":{"line":132,"column":29}},"63":{"start":{"line":133,"column":2},"end":{"line":133,"column":18}},"64":{"start":{"line":136,"column":0},"end":{"line":141,"column":2}},"65":{"start":{"line":136,"column":22},"end":{"line":141,"column":1}},"66":{"start":{"line":137,"column":2},"end":{"line":137,"column":20}},"67":{"start":{"line":138,"column":2},"end":{"line":138,"column":19}},"68":{"start":{"line":139,"column":2},"end":{"line":139,"column":43}},"69":{"start":{"line":139,"column":18},"end":{"line":139,"column":43}},"70":{"start":{"line":140,"column":2},"end":{"line":140,"column":43}},"71":{"start":{"line":140,"column":18},"end":{"line":140,"column":43}},"72":{"start":{"line":143,"column":0},"end":{"line":143,"column":47}},"73":{"start":{"line":144,"column":0},"end":{"line":144,"column":55}},"74":{"start":{"line":145,"column":0},"end":{"line":145,"column":43}}},"branchMap":{"1":{"line":9,"type":"binary-expr","locations":[{"start":{"line":9,"column":9},"end":{"line":9,"column":13}},{"start":{"line":9,"column":17},"end":{"line":9,"column":19}}]},"2":{"line":18,"type":"binary-expr","locations":[{"start":{"line":18,"column":17},"end":{"line":18,"column":28}},{"start":{"line":18,"column":32},"end":{"line":18,"column":36}}]},"3":{"line":56,"type":"cond-expr","locations":[{"start":{"line":56,"column":25},"end":{"line":56,"column":41}},{"start":{"line":57,"column":10},"end":{"line":58,"column":15}}]},"4":{"line":57,"type":"cond-expr","locations":[{"start":{"line":57,"column":24},"end":{"line":57,"column":39}},{"start":{"line":58,"column":10},"end":{"line":58,"column":15}}]},"5":{"line":74,"type":"cond-expr","locations":[{"start":{"line":74,"column":25},"end":{"line":74,"column":40}},{"start":{"line":75,"column":12},"end":{"line":76,"column":21}}]},"6":{"line":75,"type":"cond-expr","locations":[{"start":{"line":75,"column":24},"end":{"line":75,"column":38}},{"start":{"line":76,"column":12},"end":{"line":76,"column":21}}]},"7":{"line":81,"type":"cond-expr","locations":[{"start":{"line":81,"column":25},"end":{"line":81,"column":43}},{"start":{"line":82,"column":12},"end":{"line":83,"column":21}}]},"8":{"line":82,"type":"cond-expr","locations":[{"start":{"line":82,"column":24},"end":{"line":82,"column":41}},{"start":{"line":83,"column":12},"end":{"line":83,"column":21}}]},"9":{"line":93,"type":"if","locations":[{"start":{"line":93,"column":2},"end":{"line":93,"column":2}},{"start":{"line":93,"column":2},"end":{"line":93,"column":2}}]},"10":{"line":97,"type":"if","locations":[{"start":{"line":97,"column":2},"end":{"line":97,"column":2}},{"start":{"line":97,"column":2},"end":{"line":97,"column":2}}]},"11":{"line":101,"type":"if","locations":[{"start":{"line":101,"column":2},"end":{"line":101,"column":2}},{"start":{"line":101,"column":2},"end":{"line":101,"column":2}}]},"12":{"line":102,"type":"if","locations":[{"start":{"line":102,"column":4},"end":{"line":102,"column":4}},{"start":{"line":102,"column":4},"end":{"line":102,"column":4}}]},"13":{"line":103,"type":"if","locations":[{"start":{"line":103,"column":4},"end":{"line":103,"column":4}},{"start":{"line":103,"column":4},"end":{"line":103,"column":4}}]},"14":{"line":104,"type":"if","locations":[{"start":{"line":104,"column":6},"end":{"line":104,"column":6}},{"start":{"line":104,"column":6},"end":{"line":104,"column":6}}]},"15":{"line":112,"type":"if","locations":[{"start":{"line":112,"column":6},"end":{"line":112,"column":6}},{"start":{"line":112,"column":6},"end":{"line":112,"column":6}}]},"16":{"line":112,"type":"binary-expr","locations":[{"start":{"line":112,"column":10},"end":{"line":112,"column":22}},{"start":{"line":112,"column":26},"end":{"line":112,"column":42}},{"start":{"line":113,"column":10},"end":{"line":113,"column":39}}]},"17":{"line":125,"type":"if","locations":[{"start":{"line":125,"column":2},"end":{"line":125,"column":2}},{"start":{"line":125,"column":2},"end":{"line":125,"column":2}}]},"18":{"line":126,"type":"if","locations":[{"start":{"line":126,"column":4},"end":{"line":126,"column":4}},{"start":{"line":126,"column":4},"end":{"line":126,"column":4}}]},"19":{"line":126,"type":"binary-expr","locations":[{"start":{"line":126,"column":8},"end":{"line":126,"column":9}},{"start":{"line":126,"column":13},"end":{"line":126,"column":25}}]},"20":{"line":132,"type":"if","locations":[{"start":{"line":132,"column":2},"end":{"line":132,"column":2}},{"start":{"line":132,"column":2},"end":{"line":132,"column":2}}]},"21":{"line":139,"type":"if","locations":[{"start":{"line":139,"column":2},"end":{"line":139,"column":2}},{"start":{"line":139,"column":2},"end":{"line":139,"column":2}}]},"22":{"line":139,"type":"binary-expr","locations":[{"start":{"line":139,"column":6},"end":{"line":139,"column":7}},{"start":{"line":139,"column":11},"end":{"line":139,"column":16}}]},"23":{"line":140,"type":"if","locations":[{"start":{"line":140,"column":2},"end":{"line":140,"column":2}},{"start":{"line":140,"column":2},"end":{"line":140,"column":2}}]},"24":{"line":140,"type":"binary-expr","locations":[{"start":{"line":140,"column":6},"end":{"line":140,"column":7}},{"start":{"line":140,"column":11},"end":{"line":140,"column":16}}]}}}} \ No newline at end of file diff --git a/deps/npm/node_modules/node-gyp/.jshintrc b/deps/npm/node_modules/node-gyp/.jshintrc new file mode 100644 index 00000000000000..52475ba2e6c155 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/.jshintrc @@ -0,0 +1,7 @@ +{ + "asi": true, + "laxcomma": true, + "es5": true, + "node": true, + "strict": false +} diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py index a08cc154d73980..c2fb6f995c12f4 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 @@ -969,7 +969,9 @@ def _ValidateSettings(validators, settings, stderr): _Enumeration(['NotSet', 'Win32', # /env win32 'Itanium', # /env ia64 - 'X64'])) # /env x64 + 'X64', # /env x64 + 'ARM64', # /env arm64 + ])) _Same(_midl, 'EnableErrorChecks', _Enumeration(['EnableCustom', 'None', # /error none 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 3901ba94161e6c..1b383dffe87184 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 @@ -1885,6 +1885,8 @@ def _InitNinjaFlavor(params, target_list, target_dicts): configuration = '$(Configuration)' if params.get('target_arch') == 'x64': configuration += '_x64' + if params.get('target_arch') == 'arm64': + configuration += '_arm64' spec['msvs_external_builder_out_dir'] = os.path.join( gyp.common.RelativePath(params['options'].toplevel_dir, gyp_dir), ninja_generator.ComputeOutputDir(params), 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 ca67b122f0b9b1..b1a51b978481b8 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 @@ -237,7 +237,11 @@ def GetExtension(self): def GetVSMacroEnv(self, base_to_build=None, config=None): """Get a dict of variables mapping internal VS macro names to their gyp equivalents.""" - target_platform = 'Win32' if self.GetArch(config) == 'x86' else 'x64' + target_arch = self.GetArch(config) + if target_arch == 'x86': + target_platform = 'Win32' + else: + target_platform = target_arch target_name = self.spec.get('product_prefix', '') + \ self.spec.get('product_name', self.spec['target_name']) target_dir = base_to_build + '\\' if base_to_build else '' @@ -299,7 +303,7 @@ def GetArch(self, config): if not platform: # If no specific override, use the configuration's. platform = configuration_platform # Map from platform to architecture. - return {'Win32': 'x86', 'x64': 'x64'}.get(platform, 'x86') + return {'Win32': 'x86', 'x64': 'x64', 'ARM64': 'arm64'}.get(platform, 'x86') def _TargetConfig(self, config): """Returns the target-specific configuration.""" @@ -563,7 +567,10 @@ def GetLdflags(self, config, gyp_to_build_path, expand_special, 'VCLinkerTool', append=ldflags) self._GetDefFileAsLdflags(ldflags, gyp_to_build_path) ld('GenerateDebugInformation', map={'true': '/DEBUG'}) - ld('TargetMachine', map={'1': 'X86', '17': 'X64', '3': 'ARM'}, + # TODO: These 'map' values come from machineTypeOption enum, + # and does not have an official value for ARM64 in VS2017 (yet). + # It needs to verify the ARM64 value when machineTypeOption is updated. + ld('TargetMachine', map={'1': 'X86', '17': 'X64', '3': 'ARM', '18': 'ARM64'}, prefix='/MACHINE:') ldflags.extend(self._GetAdditionalLibraryDirectories( 'VCLinkerTool', config, gyp_to_build_path)) @@ -860,7 +867,9 @@ def midl(name, default=None): ('iid', iid), ('proxy', proxy)] # TODO(scottmg): Are there configuration settings to set these flags? - target_platform = 'win32' if self.GetArch(config) == 'x86' else 'x64' + target_platform = self.GetArch(config) + if target_platform == 'x86': + target_platform = 'win32' flags = ['/char', 'signed', '/env', target_platform, '/Oicf'] return outdir, output, variables, flags diff --git a/deps/npm/node_modules/node-gyp/lib/build.js b/deps/npm/node_modules/node-gyp/lib/build.js index 2f8e14c37429d7..fdb328b84252bc 100644 --- a/deps/npm/node_modules/node-gyp/lib/build.js +++ b/deps/npm/node_modules/node-gyp/lib/build.js @@ -210,9 +210,13 @@ function build (gyp, argv, callback) { // Specify the build type, Release by default if (win) { + // Convert .gypi config target_arch to MSBuild /Platform + // Since there are many ways to state '32-bit Intel', default to it. + // N.B. msbuild's Condition string equality tests are case-insensitive. var archLower = arch.toLowerCase() var p = archLower === 'x64' ? 'x64' : - (archLower === 'arm' ? 'ARM' : 'Win32') + (archLower === 'arm' ? 'ARM' : + (archLower === 'arm64' ? 'ARM64' : 'Win32')) argv.push('/p:Configuration=' + buildType + ';Platform=' + p) if (jobs) { var j = parseInt(jobs, 10) diff --git a/deps/npm/node_modules/node-gyp/lib/configure.js b/deps/npm/node_modules/node-gyp/lib/configure.js index 6ff19559cd423f..88444dc5e17c20 100644 --- a/deps/npm/node_modules/node-gyp/lib/configure.js +++ b/deps/npm/node_modules/node-gyp/lib/configure.js @@ -142,6 +142,9 @@ function configure (gyp, argv, callback) { // set the target_arch variable variables.target_arch = gyp.opts.arch || process.arch || 'ia32' + if (variables.target_arch == 'arm64') { + defaults['msvs_configuration_platform'] = 'ARM64' + } // set the node development directory variables.nodedir = nodeDir diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/.npmignore b/deps/npm/node_modules/node-gyp/node_modules/tar/.npmignore deleted file mode 100644 index c167ad5b1c12f8..00000000000000 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -.*.swp -node_modules -examples/extract/ -test/tmp/ -test/fixtures/ diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js index 600ad782f0f61d..1c66ebdaf0c157 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js +++ b/deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js @@ -38,6 +38,7 @@ function Parse () { me._stream = new BlockStream(512) me.position = 0 me._ended = false + me._hardLinks = {} me._stream.on("error", function (e) { me.emit("error", e) @@ -251,6 +252,11 @@ Parse.prototype._startEntry = function (c) { if (onend) entry.on("end", onend) this._entry = entry + + if (entry.type === "Link") { + this._hardLinks[entry.path] = entry + } + var me = this entry.on("pause", function () { diff --git a/deps/npm/node_modules/node-gyp/node_modules/tar/package.json b/deps/npm/node_modules/node-gyp/node_modules/tar/package.json index 2ab77e47f328d6..6e7fb2ed71093d 100644 --- a/deps/npm/node_modules/node-gyp/node_modules/tar/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/tar/package.json @@ -1,8 +1,8 @@ { "_from": "tar@^2.0.0", - "_id": "tar@2.2.1", + "_id": "tar@2.2.2", "_inBundle": false, - "_integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "_integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", "_location": "/node-gyp/tar", "_phantomChildren": {}, "_requested": { @@ -18,10 +18,10 @@ "_requiredBy": [ "/node-gyp" ], - "_resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "_shasum": "8e4d2a256c0e2185c6b18ad694aec968b83cb1d1", + "_resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", + "_shasum": "0ca8848562c7299b8b446ff6a4d60cdbb23edc40", "_spec": "tar@^2.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/node-gyp", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/node-gyp", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -33,7 +33,7 @@ "bundleDependencies": false, "dependencies": { "block-stream": "*", - "fstream": "^1.0.2", + "fstream": "^1.0.12", "inherits": "2" }, "deprecated": false, @@ -55,5 +55,5 @@ "scripts": { "test": "tap test/*.js" }, - "version": "2.2.1" + "version": "2.2.2" } diff --git a/deps/npm/node_modules/node-gyp/package.json b/deps/npm/node_modules/node-gyp/package.json index ba6913209c47d8..df3a5dfb5e74ec 100644 --- a/deps/npm/node_modules/node-gyp/package.json +++ b/deps/npm/node_modules/node-gyp/package.json @@ -1,5 +1,5 @@ { - "_from": "node-gyp@latest", + "_from": "node-gyp@3", "_id": "node-gyp@3.8.0", "_inBundle": false, "_integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==", @@ -7,18 +7,18 @@ "_phantomChildren": { "abbrev": "1.1.1", "block-stream": "0.0.9", - "fstream": "1.0.11", + "fstream": "1.0.12", "inherits": "2.0.3" }, "_requested": { - "type": "tag", + "type": "range", "registry": true, - "raw": "node-gyp@latest", + "raw": "node-gyp@3", "name": "node-gyp", "escapedName": "node-gyp", - "rawSpec": "latest", + "rawSpec": "3", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "3" }, "_requiredBy": [ "#USER", @@ -27,8 +27,8 @@ ], "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", "_shasum": "540304261c330e80d0d5edce253a68cb3964218c", - "_spec": "node-gyp@latest", - "_where": "/Users/zkat/Documents/code/work/npm", + "_spec": "node-gyp@3", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Nathan Rajlich", "email": "nathan@tootallnate.net", diff --git a/deps/npm/node_modules/normalize-package-data/node_modules/resolve/.eslintrc b/deps/npm/node_modules/normalize-package-data/node_modules/resolve/.eslintrc new file mode 100644 index 00000000000000..8b5748ab63b58d --- /dev/null +++ b/deps/npm/node_modules/normalize-package-data/node_modules/resolve/.eslintrc @@ -0,0 +1,31 @@ +{ + "extends": "@ljharb", + "root": true, + "rules": { + "array-bracket-newline": 0, + "array-element-newline": 0, + "indent": [2, 4], + "strict": 0, + "complexity": 0, + "consistent-return": 0, + "curly": 0, + "dot-notation": [2, { "allowKeywords": true }], + "func-name-matching": 0, + "func-style": 0, + "global-require": 0, + "id-length": [2, { "min": 1, "max": 30 }], + "max-lines-per-function": 0, + "max-nested-callbacks": 0, + "max-params": 0, + "max-statements-per-line": [2, { "max": 2 }], + "max-statements": 0, + "no-magic-numbers": 0, + "no-console": 0, + "no-shadow": 0, + "no-unused-vars": [2, { "vars": "all", "args": "none" }], + "no-use-before-define": 0, + "object-curly-newline": 0, + "operator-linebreak": [2, "before"], + "sort-keys": 0, + } +} diff --git a/deps/npm/node_modules/normalize-package-data/node_modules/resolve/test/.eslintrc b/deps/npm/node_modules/normalize-package-data/node_modules/resolve/test/.eslintrc new file mode 100644 index 00000000000000..ddd262df503c72 --- /dev/null +++ b/deps/npm/node_modules/normalize-package-data/node_modules/resolve/test/.eslintrc @@ -0,0 +1,5 @@ +{ + "rules": { + "max-lines": 0 + } +} diff --git a/deps/npm/node_modules/npm-packlist/index.js b/deps/npm/node_modules/npm-packlist/index.js index 777b58590d11e7..8bfd257794f9e0 100644 --- a/deps/npm/node_modules/npm-packlist/index.js +++ b/deps/npm/node_modules/npm-packlist/index.js @@ -34,6 +34,7 @@ const defaultRules = [ 'npm-debug.log', '**/.npmrc', '.*.swp', + '.DS_Store', '**/.DS_Store/**', '._*', '**/._*/**', @@ -90,6 +91,16 @@ const npmWalker = Class => class Walker extends Class { } } + onReaddir (entries) { + if (!this.parent) { + entries = entries.filter(e => + e !== '.git' && + !(e === 'node_modules' && this.bundled.length === 0) + ) + } + return super.onReaddir(entries) + } + filterEntry (entry, partial) { // get the partial path from the root of the walk const p = this.path.substr(this.root.length + 1) @@ -147,6 +158,14 @@ const npmWalker = Class => class Walker extends Class { // if there's a bin, browser or main, make sure we don't ignore it // also, don't ignore the package.json itself! + // + // Weird side-effect of this: a readme (etc) file will be included + // if it exists anywhere within a folder with a package.json file. + // The original intent was only to include these files in the root, + // but now users in the wild are dependent on that behavior for + // localized documentation and other use cases. Adding a `/` to + // these rules, while tempting and arguably more "correct", is a + // breaking change. const rules = [ pkg.browser ? '!' + pkg.browser : '', pkg.main ? '!' + pkg.main : '', @@ -234,15 +253,20 @@ const walkSync = options => { return walker.result } -// package.json first, node_modules last, files before folders, alphasort -const sort = (a, b) => - a === 'package.json' ? -1 - : b === 'package.json' ? 1 - : /^node_modules/.test(a) && !/^node_modules/.test(b) ? 1 - : /^node_modules/.test(b) && !/^node_modules/.test(a) ? -1 - : path.dirname(a) === '.' && path.dirname(b) !== '.' ? -1 - : path.dirname(b) === '.' && path.dirname(a) !== '.' ? 1 - : a.localeCompare(b) +// optimize for compressibility +// extname, then basename, then locale alphabetically +// https://twitter.com/isntitvacant/status/1131094910923231232 +const sort = (a, b) => { + const exta = path.extname(a).toLowerCase() + const extb = path.extname(b).toLowerCase() + const basea = path.basename(a).toLowerCase() + const baseb = path.basename(b).toLowerCase() + + return exta.localeCompare(extb) || + basea.localeCompare(baseb) || + a.localeCompare(b) +} + module.exports = walk walk.sync = walkSync diff --git a/deps/npm/node_modules/npm-packlist/package.json b/deps/npm/node_modules/npm-packlist/package.json index c5be026edaff92..d72eef9cae7392 100644 --- a/deps/npm/node_modules/npm-packlist/package.json +++ b/deps/npm/node_modules/npm-packlist/package.json @@ -1,29 +1,29 @@ { - "_from": "npm-packlist@latest", - "_id": "npm-packlist@1.4.1", + "_from": "npm-packlist@^1.4.3", + "_id": "npm-packlist@1.4.4", "_inBundle": false, - "_integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", + "_integrity": "sha512-zTLo8UcVYtDU3gdeaFu2Xu0n0EvelfHDGuqtNIn5RO7yQj4H1TqNdBc/yZjxnWA0PVB8D3Woyp0i5B43JwQ6Vw==", "_location": "/npm-packlist", "_phantomChildren": {}, "_requested": { - "type": "tag", + "type": "range", "registry": true, - "raw": "npm-packlist@latest", + "raw": "npm-packlist@^1.4.3", "name": "npm-packlist", "escapedName": "npm-packlist", - "rawSpec": "latest", + "rawSpec": "^1.4.3", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "^1.4.3" }, "_requiredBy": [ "#USER", "/", "/pacote" ], - "_resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz", - "_shasum": "19064cdf988da80ea3cee45533879d90192bbfbc", - "_spec": "npm-packlist@latest", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.4.tgz", + "_shasum": "866224233850ac534b63d1a6e76050092b5d2f44", + "_spec": "npm-packlist@^1.4.3", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -42,7 +42,7 @@ "devDependencies": { "mkdirp": "^0.5.1", "rimraf": "^2.6.1", - "tap": "^12.0.1" + "tap": "^14.2.1" }, "directories": { "test": "test" @@ -59,10 +59,11 @@ "url": "git+https://github.com/npm/npm-packlist.git" }, "scripts": { - "postpublish": "git push origin --all; git push origin --tags", + "postpublish": "git push origin --follow-tags", "postversion": "npm publish", "preversion": "npm test", - "test": "tap test/*.js --100 -J" + "snap": "tap", + "test": "tap" }, - "version": "1.4.1" + "version": "1.4.4" } diff --git a/deps/npm/node_modules/object-keys/.editorconfig b/deps/npm/node_modules/object-keys/.editorconfig new file mode 100644 index 00000000000000..572e9793f03233 --- /dev/null +++ b/deps/npm/node_modules/object-keys/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; diff --git a/deps/npm/node_modules/object-keys/.eslintrc b/deps/npm/node_modules/object-keys/.eslintrc new file mode 100644 index 00000000000000..9a8d5b0e95e361 --- /dev/null +++ b/deps/npm/node_modules/object-keys/.eslintrc @@ -0,0 +1,17 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "complexity": [2, 23], + "id-length": [2, { "min": 1, "max": 40 }], + "max-params": [2, 3], + "max-statements": [2, 23], + "max-statements-per-line": [2, { "max": 2 }], + "no-extra-parens": [1], + "no-invalid-this": [1], + "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "LabeledStatement", "WithStatement"], + "operator-linebreak": [2, "after"] + } +} diff --git a/deps/npm/node_modules/object-keys/.jscs.json b/deps/npm/node_modules/object-keys/.jscs.json new file mode 100644 index 00000000000000..76f7cb186e68da --- /dev/null +++ b/deps/npm/node_modules/object-keys/.jscs.json @@ -0,0 +1,174 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 7 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": "asc-insensitive", + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] + }, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} diff --git a/deps/npm/node_modules/object-keys/.travis.yml b/deps/npm/node_modules/object-keys/.travis.yml new file mode 100644 index 00000000000000..767256c8dd4843 --- /dev/null +++ b/deps/npm/node_modules/object-keys/.travis.yml @@ -0,0 +1,225 @@ +language: node_js +os: + - linux +node_js: + - "10.4" + - "9.11" + - "8.11" + - "7.10" + - "6.14" + - "5.12" + - "4.9" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" +before_install: + - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' + - 'nvm install-latest-npm' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "lts/*" + env: PRETEST=true + - node_js: "lts/*" + env: POSTTEST=true + - node_js: "4" + env: COVERAGE=true + - node_js: "10.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "10.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "9.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.13" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.12" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true + - env: COVERAGE=true diff --git a/deps/npm/node_modules/object-keys/CHANGELOG.md b/deps/npm/node_modules/object-keys/CHANGELOG.md new file mode 100644 index 00000000000000..27123c475ef665 --- /dev/null +++ b/deps/npm/node_modules/object-keys/CHANGELOG.md @@ -0,0 +1,220 @@ +1.0.12 / 2018-06-18 +================= + * [Fix] avoid accessing `window.applicationCache`, to avoid issues with latest Chrome on HTTP (#46) + +1.0.11 / 2016-07-05 +================= + * [Fix] exclude keys regarding the style (eg. `pageYOffset`) on `window` to avoid reflow (#32) + +1.0.10 / 2016-07-04 +================= + * [Fix] exclude `height` and `width` keys on `window` to avoid reflow (#31) + * [Fix] In IE 6, `window.external` makes `Object.keys` throw + * [Tests] up to `node` `v6.2`, `v5.10`, `v4.4` + * [Tests] use pretest/posttest for linting/security + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` + * [Dev Deps] remove unused eccheck script + dep + +1.0.9 / 2015-10-19 +================= + * [Fix] Blacklist 'frame' property on window (#16, #17) + * [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` + +1.0.8 / 2015-10-14 +================= + * [Fix] wrap automation equality bug checking in try/catch, per [es5-shim#327](https://github.com/es-shims/es5-shim/issues/327) + * [Fix] Blacklist 'window.frameElement' per [es5-shim#322](https://github.com/es-shims/es5-shim/issues/322) + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + * [Tests] up to `io.js` `v3.3`, `node` `v4.2` + * [Dev Deps] update `eslint`, `tape`, `@ljharb/eslint-config`, `jscs` + +1.0.7 / 2015-07-18 +================= + * [Fix] A proper fix for 176f03335e90d5c8d0d8125a99f27819c9b9cdad / https://github.com/es-shims/es5-shim/issues/275 that doesn't break dontEnum/constructor fixes in IE 8. + * [Fix] Remove deprecation message in Chrome by touching deprecated window properties (#15) + * [Tests] Improve test output for automation equality bugfix + * [Tests] Test on `io.js` `v2.4` + +1.0.6 / 2015-07-09 +================= + * [Fix] Use an object lookup rather than ES5's `indexOf` (#14) + * [Tests] ES3 browsers don't have `Array.isArray` + * [Tests] Fix `no-shadow` rule, as well as an IE 8 bug caused by engine NFE shadowing bugs. + +1.0.5 / 2015-07-03 +================= + * [Fix] Fix a flabbergasting IE 8 bug where `localStorage.constructor.prototype === localStorage` throws + * [Tests] Test up to `io.js` `v2.3` + * [Dev Deps] Update `nsp`, `eslint` + +1.0.4 / 2015-05-23 +================= + * Fix a Safari 5.0 bug with `Object.keys` not working with `arguments` + * Test on latest `node` and `io.js` + * Update `jscs`, `tape`, `eslint`, `nsp`, `is`, `editorconfig-tools`, `covert` + +1.0.3 / 2015-01-06 +================= + * Revert "Make `object-keys` more robust against later environment tampering" to maintain ES3 compliance + +1.0.2 / 2014-12-28 +================= + * Update lots of dev dependencies + * Tweaks to README + * Make `object-keys` more robust against later environment tampering + +1.0.1 / 2014-09-03 +================= + * Update URLs and badges in README + +1.0.0 / 2014-08-26 +================= + * v1.0.0 + +0.6.1 / 2014-08-25 +================= + * v0.6.1 + * Updating dependencies (tape, covert, is) + * Update badges in readme + * Use separate var statements + +0.6.0 / 2014-04-23 +================= + * v0.6.0 + * Updating dependencies (tape, covert) + * Make sure boxed primitives, and arguments objects, work properly in ES3 browsers + * Improve test matrix: test all node versions, but only latest two stables are a failure + * Remove internal foreach shim. + +0.5.1 / 2014-03-09 +================= + * 0.5.1 + * Updating dependencies (tape, covert, is) + * Removing forEach from the module (but keeping it in tests) + +0.5.0 / 2014-01-30 +================= + * 0.5.0 + * Explicitly returning the shim, instead of returning native Object.keys when present + * Adding a changelog. + * Cleaning up IIFE wrapping + * Testing on node 0.4 through 0.11 + +0.4.0 / 2013-08-14 +================== + + * v0.4.0 + * In Chrome 4-10 and Safari 4, typeof (new RegExp) === 'function' + * If it's a string, make sure to use charAt instead of brackets. + * Only use Function#call if necessary. + * Making sure the context tests actually run. + * Better function detection + * Adding the android browser + * Fixing testling files + * Updating tape + * Removing the "is" dependency. + * Making an isArguments shim. + * Adding a local forEach shim and tests. + * Updating paths. + * Moving the shim test. + * v0.3.0 + +0.3.0 / 2013-05-18 +================== + + * README tweak. + * Fixing constructor enum issue. Fixes [#5](https://github.com/ljharb/object-keys/issues/5). + * Adding a test for [#5](https://github.com/ljharb/object-keys/issues/5) + * Updating readme. + * Updating dependencies. + * Giving credit to lodash. + * Make sure that a prototype's constructor property is not enumerable. Fixes [#3](https://github.com/ljharb/object-keys/issues/3). + * Adding additional tests to handle arguments objects, and to skip "prototype" in functions. Fixes [#2](https://github.com/ljharb/object-keys/issues/2). + * Fixing a typo on this test for [#3](https://github.com/ljharb/object-keys/issues/3). + * Adding node 0.10 to travis. + * Adding an IE < 9 test per [#3](https://github.com/ljharb/object-keys/issues/3) + * Adding an iOS 5 mobile Safari test per [#2](https://github.com/ljharb/object-keys/issues/2) + * Moving "indexof" and "is" to be dev dependencies. + * Making sure the shim works with functions. + * Flattening the tests. + +0.2.0 / 2013-05-10 +================== + + * v0.2.0 + * Object.keys should work with arrays. + +0.1.8 / 2013-05-10 +================== + + * v0.1.8 + * Upgrading dependencies. + * Using a simpler check. + * Fixing a bug in hasDontEnumBug browsers. + * Using the newest tape! + * Fixing this error test. + * "undefined" is probably a reserved word in ES3. + * Better test message. + +0.1.7 / 2013-04-17 +================== + + * Upgrading "is" once more. + * The key "null" is breaking some browsers. + +0.1.6 / 2013-04-17 +================== + + * v0.1.6 + * Upgrading "is" + +0.1.5 / 2013-04-14 +================== + + * Bumping version. + * Adding more testling browsers. + * Updating "is" + +0.1.4 / 2013-04-08 +================== + + * Using "is" instead of "is-extended". + +0.1.3 / 2013-04-07 +================== + + * Using "foreach" instead of my own shim. + * Removing "tap"; I'll just wait for "tape" to fix its node 0.10 bug. + +0.1.2 / 2013-04-03 +================== + + * Adding dependency status; moving links to an index at the bottom. + * Upgrading is-extended; version 0.1.2 + * Adding an npm version badge. + +0.1.1 / 2013-04-01 +================== + + * Adding Travis CI. + * Bumping the version. + * Adding indexOf since IE sucks. + * Adding a forEach shim since older browsers don't have Array#forEach. + * Upgrading tape - 0.3.2 uses Array#map + * Using explicit end instead of plan. + * Can't test with Array.isArray in older browsers. + * Using is-extended. + * Fixing testling files. + * JSHint/JSLint-ing. + * Removing an unused object. + * Using strict mode. + +0.1.0 / 2013-03-30 +================== + + * Changing the exports should have meant a higher version bump. + * Oops, fixing the repo URL. + * Adding more tests. + * 0.0.2 + * Merge branch 'export_one_thing'; closes [#1](https://github.com/ljharb/object-keys/issues/1) + * Move shim export to a separate file. diff --git a/deps/npm/node_modules/object-keys/LICENSE b/deps/npm/node_modules/object-keys/LICENSE new file mode 100644 index 00000000000000..28553fdd06841b --- /dev/null +++ b/deps/npm/node_modules/object-keys/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2013 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/deps/npm/node_modules/object-keys/README.md b/deps/npm/node_modules/object-keys/README.md new file mode 100644 index 00000000000000..dbcf1a8c3d4188 --- /dev/null +++ b/deps/npm/node_modules/object-keys/README.md @@ -0,0 +1,75 @@ +#object-keys [![Version Badge][npm-version-svg]][package-url] + +[![Build Status][travis-svg]][travis-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +[![browser support][testling-svg]][testling-url] + +An Object.keys shim. Invoke its "shim" method to shim Object.keys if it is unavailable. + +Most common usage: +```js +var keys = Object.keys || require('object-keys'); +``` + +## Example + +```js +var keys = require('object-keys'); +var assert = require('assert'); +var obj = { + a: true, + b: true, + c: true +}; + +assert.deepEqual(keys(obj), ['a', 'b', 'c']); +``` + +```js +var keys = require('object-keys'); +var assert = require('assert'); +/* when Object.keys is not present */ +delete Object.keys; +var shimmedKeys = keys.shim(); +assert.equal(shimmedKeys, keys); +assert.deepEqual(Object.keys(obj), keys(obj)); +``` + +```js +var keys = require('object-keys'); +var assert = require('assert'); +/* when Object.keys is present */ +var shimmedKeys = keys.shim(); +assert.equal(shimmedKeys, Object.keys); +assert.deepEqual(Object.keys(obj), keys(obj)); +``` + +## Source +Implementation taken directly from [es5-shim][es5-shim-url], with modifications, including from [lodash][lodash-url]. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/object-keys +[npm-version-svg]: http://versionbadg.es/ljharb/object-keys.svg +[travis-svg]: https://travis-ci.org/ljharb/object-keys.svg +[travis-url]: https://travis-ci.org/ljharb/object-keys +[deps-svg]: https://david-dm.org/ljharb/object-keys.svg +[deps-url]: https://david-dm.org/ljharb/object-keys +[dev-deps-svg]: https://david-dm.org/ljharb/object-keys/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/object-keys#info=devDependencies +[testling-svg]: https://ci.testling.com/ljharb/object-keys.png +[testling-url]: https://ci.testling.com/ljharb/object-keys +[es5-shim-url]: https://github.com/es-shims/es5-shim/blob/master/es5-shim.js#L542-589 +[lodash-url]: https://github.com/lodash/lodash +[npm-badge-png]: https://nodei.co/npm/object-keys.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/object-keys.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/object-keys.svg +[downloads-url]: http://npm-stat.com/charts.html?package=object-keys diff --git a/deps/npm/node_modules/object-keys/index.js b/deps/npm/node_modules/object-keys/index.js new file mode 100644 index 00000000000000..3f2463eb8040c1 --- /dev/null +++ b/deps/npm/node_modules/object-keys/index.js @@ -0,0 +1,141 @@ +'use strict'; + +// modified from https://github.com/es-shims/es5-shim +var has = Object.prototype.hasOwnProperty; +var toStr = Object.prototype.toString; +var slice = Array.prototype.slice; +var isArgs = require('./isArguments'); +var isEnumerable = Object.prototype.propertyIsEnumerable; +var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); +var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); +var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' +]; +var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; +}; +var excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true +}; +var hasAutomationEqualityBug = (function () { + /* global window */ + if (typeof window === 'undefined') { return false; } + for (var k in window) { + try { + if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { + try { + equalsConstructorPrototype(window[k]); + } catch (e) { + return true; + } + } + } catch (e) { + return true; + } + } + return false; +}()); +var equalsConstructorPrototypeIfNotBuggy = function (o) { + /* global window */ + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o); + } + try { + return equalsConstructorPrototype(o); + } catch (e) { + return false; + } +}; + +var keysShim = function keys(object) { + var isObject = object !== null && typeof object === 'object'; + var isFunction = toStr.call(object) === '[object Function]'; + var isArguments = isArgs(object); + var isString = isObject && toStr.call(object) === '[object String]'; + var theKeys = []; + + if (!isObject && !isFunction && !isArguments) { + throw new TypeError('Object.keys called on a non-object'); + } + + var skipProto = hasProtoEnumBug && isFunction; + if (isString && object.length > 0 && !has.call(object, 0)) { + for (var i = 0; i < object.length; ++i) { + theKeys.push(String(i)); + } + } + + if (isArguments && object.length > 0) { + for (var j = 0; j < object.length; ++j) { + theKeys.push(String(j)); + } + } else { + for (var name in object) { + if (!(skipProto && name === 'prototype') && has.call(object, name)) { + theKeys.push(String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + + for (var k = 0; k < dontEnums.length; ++k) { + if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { + theKeys.push(dontEnums[k]); + } + } + } + return theKeys; +}; + +keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = (function () { + // Safari 5.0 bug + return (Object.keys(arguments) || '').length === 2; + }(1, 2)); + if (!keysWorksWithArguments) { + var originalKeys = Object.keys; + Object.keys = function keys(object) { // eslint-disable-line func-name-matching + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } else { + return originalKeys(object); + } + }; + } + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; +}; + +module.exports = keysShim; diff --git a/deps/npm/node_modules/object-keys/isArguments.js b/deps/npm/node_modules/object-keys/isArguments.js new file mode 100644 index 00000000000000..f2a2a9014d925e --- /dev/null +++ b/deps/npm/node_modules/object-keys/isArguments.js @@ -0,0 +1,17 @@ +'use strict'; + +var toStr = Object.prototype.toString; + +module.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === '[object Arguments]'; + if (!isArgs) { + isArgs = str !== '[object Array]' && + value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + toStr.call(value.callee) === '[object Function]'; + } + return isArgs; +}; diff --git a/deps/npm/node_modules/object-keys/package.json b/deps/npm/node_modules/object-keys/package.json new file mode 100644 index 00000000000000..e988c2db4cbc79 --- /dev/null +++ b/deps/npm/node_modules/object-keys/package.json @@ -0,0 +1,94 @@ +{ + "name": "object-keys", + "version": "1.0.12", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net" + }, + { + "name": "Ivan Starkov", + "email": "istarkov@gmail.com" + }, + { + "name": "Gary Katsevman", + "email": "git@gkatsev.com" + } + ], + "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/es-shims/es5-shim", + "license": "MIT", + "main": "index.js", + "scripts": { + "pretest": "npm run --silent lint", + "test": "npm run --silent tests-only", + "posttest": "npm run --silent security", + "tests-only": "node test/index.js", + "coverage": "covert test/*.js", + "coverage-quiet": "covert test/*.js --quiet", + "lint": "npm run --silent jscs && npm run --silent eslint", + "jscs": "jscs test/*.js *.js", + "eslint": "eslint test/*.js *.js", + "security": "nsp check" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/object-keys.git" + }, + "keywords": [ + "Object.keys", + "keys", + "ES5", + "shim" + ], + "dependencies": {}, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "covert": "^1.1.0", + "eslint": "^4.19.1", + "foreach": "^2.0.5", + "indexof": "^0.0.1", + "is": "^3.2.1", + "jscs": "^3.0.7", + "nsp": "^3.2.1", + "tape": "^4.9.1" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } + +,"_resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz" +,"_integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" +,"_from": "object-keys@1.0.12" +} \ No newline at end of file diff --git a/deps/npm/node_modules/object-keys/test/index.js b/deps/npm/node_modules/object-keys/test/index.js new file mode 100644 index 00000000000000..5402465a19b5b6 --- /dev/null +++ b/deps/npm/node_modules/object-keys/test/index.js @@ -0,0 +1,5 @@ +'use strict'; + +require('./isArguments'); + +require('./shim'); diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/.editorconfig b/deps/npm/node_modules/object.getownpropertydescriptors/.editorconfig new file mode 100644 index 00000000000000..572e9793f03233 --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/.eslintrc b/deps/npm/node_modules/object.getownpropertydescriptors/.eslintrc new file mode 100644 index 00000000000000..97ada3121bac03 --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/.eslintrc @@ -0,0 +1,10 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": [2, { "min": 1, "max": 30 }], + "new-cap": [2, { "capIsNewExceptions": ["IsCallable", "RequireObjectCoercible", "ToObject"] }] + } +} diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/.jscs.json b/deps/npm/node_modules/object.getownpropertydescriptors/.jscs.json new file mode 100644 index 00000000000000..7296cbab09bdf5 --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/.jscs.json @@ -0,0 +1,175 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 1 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": "asc-insensitive", + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] + }, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/.npmignore b/deps/npm/node_modules/object.getownpropertydescriptors/.npmignore new file mode 100644 index 00000000000000..59d842baa84c8b --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/.npmignore @@ -0,0 +1,28 @@ +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# Commenting this out is preferred by some people, see +# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- +node_modules + +# Users Environment Variables +.lock-wscript diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/.travis.yml b/deps/npm/node_modules/object.getownpropertydescriptors/.travis.yml new file mode 100644 index 00000000000000..54ec28b3c4d854 --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/.travis.yml @@ -0,0 +1,96 @@ +language: node_js +node_js: + - "6.2" + - "6.1" + - "6.0" + - "5.12" + - "5.11" + - "5.10" + - "5.9" + - "5.8" + - "5.7" + - "5.6" + - "5.5" + - "5.4" + - "5.3" + - "5.2" + - "5.1" + - "5.0" + - "4.4" + - "4.3" + - "4.2" + - "4.1" + - "4.0" + - "iojs-v3.3" + - "iojs-v3.2" + - "iojs-v3.1" + - "iojs-v3.0" + - "iojs-v2.5" + - "iojs-v2.4" + - "iojs-v2.3" + - "iojs-v2.2" + - "iojs-v2.1" + - "iojs-v2.0" + - "iojs-v1.8" + - "iojs-v1.7" + - "iojs-v1.6" + - "iojs-v1.5" + - "iojs-v1.4" + - "iojs-v1.3" + - "iojs-v1.2" + - "iojs-v1.1" + - "iojs-v1.0" + - "0.12" + - "0.11" + - "0.10" + - "0.9" + - "0.8" + - "0.6" + - "0.4" +before_install: + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi' +script: + - 'if [ "${TRAVIS_NODE_VERSION}" != "4.4" ]; then npm run tests-only ; else npm test ; fi' +sudo: false +matrix: + fast_finish: true + allow_failures: + - node_js: "6.1" + - node_js: "6.0" + - node_js: "5.11" + - node_js: "5.10" + - node_js: "5.9" + - node_js: "5.8" + - node_js: "5.7" + - node_js: "5.6" + - node_js: "5.5" + - node_js: "5.4" + - node_js: "5.3" + - node_js: "5.2" + - node_js: "5.1" + - node_js: "5.0" + - node_js: "4.3" + - node_js: "4.2" + - node_js: "4.1" + - node_js: "4.0" + - node_js: "iojs-v3.2" + - node_js: "iojs-v3.1" + - node_js: "iojs-v3.0" + - node_js: "iojs-v2.4" + - node_js: "iojs-v2.3" + - node_js: "iojs-v2.2" + - node_js: "iojs-v2.1" + - node_js: "iojs-v2.0" + - node_js: "iojs-v1.7" + - node_js: "iojs-v1.6" + - node_js: "iojs-v1.5" + - node_js: "iojs-v1.4" + - node_js: "iojs-v1.3" + - node_js: "iojs-v1.2" + - node_js: "iojs-v1.1" + - node_js: "iojs-v1.0" + - node_js: "0.11" + - node_js: "0.9" + - node_js: "0.6" + - node_js: "0.4" diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/CHANGELOG.md b/deps/npm/node_modules/object.getownpropertydescriptors/CHANGELOG.md new file mode 100644 index 00000000000000..d7c2d15033b3dd --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/CHANGELOG.md @@ -0,0 +1,51 @@ +2.0.3 / 2016-07-26 +================= + * [Fix] Update implementation to not return `undefined` descriptors + * [Deps] update `es-abstract` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `jscs`, `nsp`, `tape`, `semver` + * [Dev Deps] remove unused eccheck script + dep + * [Tests] up to `node` `v6.3`, `v5.12`, `v4.4` + * [Tests] use pretest/posttest for linting/security + * Update to stage 4 + +2.0.2 / 2016-01-27 +================= + * [Fix] ensure that `Object.getOwnPropertyDescriptors` does not fail when `Object.prototype` has a poisoned setter (#1, #2) + +2.0.1 / 2016-01-27 +================= + * [Deps] move `@es-shims/api` to dev deps + +2.0.0 / 2016-01-27 +================= + * [Breaking] implement the es-shims API + * [Deps] update `define-properties`, `es-abstract` + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` + * [Tests] fix npm upgrades in older nodes + * [Tests] up to `node` `v5.5` + * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG + +1.0.4 / 2015-07-20 +================= + * [Tests] Test on `io.js` `v2.4` + * [Deps, Dev Deps] Update `define-properties`, `tape`, `eslint`, `semver` + +1.0.3 / 2015-06-28 +================= + * Increase robustness by caching `Array#{concat, reduce}` + * [Deps] Update `define_properties` + * [Dev Deps] Update `eslint`, `semver`, `nsp` + * [Tests] Test up to `io.js` `v2.3` + +1.0.2 / 2015-05-23 +================= + * Update `es-abstract`, `tape`, `eslint`, `jscs`, `semver`, `covert` + * Test up to `io.js` `v2.0` + +1.0.1 / 2015-03-20 +================= + * Update `es-abstract`, `editorconfig-tools`, `nsp`, `eslint`, `semver`, `replace` + +1.0.0 / 2015-02-17 +================= + * v1.0.0 diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/LICENSE b/deps/npm/node_modules/object.getownpropertydescriptors/LICENSE new file mode 100644 index 00000000000000..fcf5754efe64ab --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/Makefile b/deps/npm/node_modules/object.getownpropertydescriptors/Makefile new file mode 100644 index 00000000000000..b9e4fe1aab3dde --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/Makefile @@ -0,0 +1,61 @@ +# Since we rely on paths relative to the makefile location, abort if make isn't being run from there. +$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in)) + + # The files that need updating when incrementing the version number. +VERSIONED_FILES := *.js *.json README* + + +# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly. +# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment +# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests. +export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH") +UTILS := semver +# Make sure that all required utilities can be located. +UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS))) + +# Default target (by virtue of being the first non '.'-prefixed in the file). +.PHONY: _no-target-specified +_no-target-specified: + $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests) + +# Lists all targets defined in this makefile. +.PHONY: list +list: + @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort + +# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS). +.PHONY: test +test: + @npm test + +.PHONY: _ensure-tag +_ensure-tag: +ifndef TAG + $(error Please invoke with `make TAG= release`, where is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number) +endif + +CHANGELOG_ERROR = $(error No CHANGELOG specified) +.PHONY: _ensure-changelog +_ensure-changelog: + @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGELOG.md' > /dev/null) || (echo no CHANGELOG.md specified && exit 2) + +# Ensures that the git workspace is clean. +.PHONY: _ensure-clean +_ensure-clean: + @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGELOG.md')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } + +# Makes a release; invoke with `make TAG= release`. +.PHONY: release +release: _ensure-tag _ensure-changelog _ensure-clean + @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ + new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ + if printf "$$new_ver" | command grep -q '^[0-9]'; then \ + semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ + semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ + else \ + new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ + fi; \ + printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ + replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \ + git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGELOG.md && \ + git tag -a -m "v$$new_ver" "v$$new_ver" diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/README.md b/deps/npm/node_modules/object.getownpropertydescriptors/README.md new file mode 100644 index 00000000000000..0fc6c185a11d7c --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/README.md @@ -0,0 +1,99 @@ +#object.getownpropertydescriptors [![Version Badge][npm-version-svg]][package-url] + +[![Build Status][travis-svg]][travis-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +[![browser support][testling-svg]][testling-url] + +An ES2017 spec-compliant shim for `Object.getOwnPropertyDescriptors` that works in ES5. +Invoke its "shim" method to shim `Object.getOwnPropertyDescriptors` if it is unavailable, and if `Object.getOwnPropertyDescriptor` is available. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://github.com/tc39/ecma262/pull/582). + +## Example + +```js +var getDescriptors = require('object.getownpropertydescriptors'); +var assert = require('assert'); +var obj = { normal: Infinity }; +var enumDescriptor = { + enumerable: false, + writable: false, + configurable: true, + value: true +}; +var writableDescriptor = { + enumerable: true, + writable: true, + configurable: true, + value: 42 +}; +var symbol = Symbol(); +var symDescriptor = { + enumerable: true, + writable: true, + configurable: false, + value: [symbol] +}; + +Object.defineProperty(obj, 'enumerable', enumDescriptor); +Object.defineProperty(obj, 'writable', writableDescriptor); +Object.defineProperty(obj, 'symbol', symDescriptor); + +var descriptors = getDescriptors(obj); + +assert.deepEqual(descriptors, { + normal: { + enumerable: true, + writable: true, + configurable: true, + value: Infinity + }, + enumerable: enumDescriptor, + writable: writableDescriptor, + symbol: symDescriptor +}); +``` + +```js +var getDescriptors = require('object.getownpropertydescriptors'); +var assert = require('assert'); +/* when Object.getOwnPropertyDescriptors is not present */ +delete Object.getOwnPropertyDescriptors; +var shimmedDescriptors = getDescriptors.shim(); +assert.equal(shimmedDescriptors, getDescriptors); +assert.deepEqual(shimmedDescriptors(obj), getDescriptors(obj)); +``` + +```js +var getDescriptors = require('object.getownpropertydescriptors'); +var assert = require('assert'); +/* when Object.getOwnPropertyDescriptors is present */ +var shimmedDescriptors = getDescriptors.shim(); +assert.notEqual(shimmedDescriptors, getDescriptors); +assert.deepEqual(shimmedDescriptors(obj), getDescriptors(obj)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/object.getownpropertydescriptors +[npm-version-svg]: http://versionbadg.es/ljharb/object.getownpropertydescriptors.svg +[travis-svg]: https://travis-ci.org/ljharb/object.getownpropertydescriptors.svg +[travis-url]: https://travis-ci.org/ljharb/object.getownpropertydescriptors +[deps-svg]: https://david-dm.org/ljharb/object.getownpropertydescriptors.svg +[deps-url]: https://david-dm.org/ljharb/object.getownpropertydescriptors +[dev-deps-svg]: https://david-dm.org/ljharb/object.getownpropertydescriptors/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/object.getownpropertydescriptors#info=devDependencies +[testling-svg]: https://ci.testling.com/ljharb/object.getownpropertydescriptors.png +[testling-url]: https://ci.testling.com/ljharb/object.getownpropertydescriptors +[npm-badge-png]: https://nodei.co/npm/object.getownpropertydescriptors.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/object.getownpropertydescriptors.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/object.getownpropertydescriptors.svg +[downloads-url]: http://npm-stat.com/charts.html?package=object.getownpropertydescriptors diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/implementation.js b/deps/npm/node_modules/object.getownpropertydescriptors/implementation.js new file mode 100644 index 00000000000000..784c22c99ca3bc --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/implementation.js @@ -0,0 +1,44 @@ +'use strict'; + +var ES = require('es-abstract/es7'); + +var defineProperty = Object.defineProperty; +var getDescriptor = Object.getOwnPropertyDescriptor; +var getOwnNames = Object.getOwnPropertyNames; +var getSymbols = Object.getOwnPropertySymbols; +var concat = Function.call.bind(Array.prototype.concat); +var reduce = Function.call.bind(Array.prototype.reduce); +var getAll = getSymbols ? function (obj) { + return concat(getOwnNames(obj), getSymbols(obj)); +} : getOwnNames; + +var isES5 = ES.IsCallable(getDescriptor) && ES.IsCallable(getOwnNames); + +var safePut = function put(obj, prop, val) { // eslint-disable-line max-params + if (defineProperty && prop in obj) { + defineProperty(obj, prop, { + configurable: true, + enumerable: true, + value: val, + writable: true + }); + } else { + obj[prop] = val; + } +}; + +module.exports = function getOwnPropertyDescriptors(value) { + ES.RequireObjectCoercible(value); + if (!isES5) { + throw new TypeError('getOwnPropertyDescriptors requires Object.getOwnPropertyDescriptor'); + } + + var O = ES.ToObject(value); + return reduce(getAll(O), function (acc, key) { + var descriptor = getDescriptor(O, key); + if (typeof descriptor !== 'undefined') { + safePut(acc, key, descriptor); + } + return acc; + }, {}); +}; diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/index.js b/deps/npm/node_modules/object.getownpropertydescriptors/index.js new file mode 100644 index 00000000000000..bf2aec5d5006de --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/index.js @@ -0,0 +1,15 @@ +'use strict'; + +var define = require('define-properties'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +define(implementation, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = implementation; diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/package.json b/deps/npm/node_modules/object.getownpropertydescriptors/package.json new file mode 100644 index 00000000000000..fb1bdfa934009f --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/package.json @@ -0,0 +1,107 @@ +{ + "_from": "object.getownpropertydescriptors@^2.0.3", + "_id": "object.getownpropertydescriptors@2.0.3", + "_inBundle": false, + "_integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "_location": "/object.getownpropertydescriptors", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "object.getownpropertydescriptors@^2.0.3", + "name": "object.getownpropertydescriptors", + "escapedName": "object.getownpropertydescriptors", + "rawSpec": "^2.0.3", + "saveSpec": null, + "fetchSpec": "^2.0.3" + }, + "_requiredBy": [ + "/util-promisify" + ], + "_resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "_shasum": "8758c846f5b407adab0f236e0986f14b051caa16", + "_spec": "object.getownpropertydescriptors@^2.0.3", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/util-promisify", + "author": { + "name": "Jordan Harband" + }, + "bugs": { + "url": "https://github.com/ljharb/object.getownpropertydescriptors/issues" + }, + "bundleDependencies": false, + "dependencies": { + "define-properties": "^1.1.2", + "es-abstract": "^1.5.1" + }, + "deprecated": false, + "description": "ES2017 spec-compliant shim for `Object.getOwnPropertyDescriptors` that works in ES5.", + "devDependencies": { + "@es-shims/api": "^1.2.0", + "@ljharb/eslint-config": "^6.0.0", + "covert": "^1.1.0", + "eslint": "^3.1.1", + "jscs": "^3.0.7", + "nsp": "^2.6.1", + "replace": "^0.3.0", + "semver": "^5.3.0", + "tape": "^4.6.0" + }, + "engines": { + "node": ">= 0.8" + }, + "homepage": "https://github.com/ljharb/object.getownpropertydescriptors#readme", + "keywords": [ + "Object.getOwnPropertyDescriptors", + "descriptor", + "property descriptor", + "ES8", + "ES2017", + "shim", + "polyfill", + "getOwnPropertyDescriptor", + "es-shim API" + ], + "license": "MIT", + "main": "index.js", + "name": "object.getownpropertydescriptors", + "repository": { + "type": "git", + "url": "git://github.com/ljharb/object.getownpropertydescriptors.git" + }, + "scripts": { + "coverage": "covert test/*.js", + "coverage:quiet": "covert test/*.js --quiet", + "eslint": "eslint test/*.js *.js", + "jscs": "jscs test/*.js *.js", + "lint": "npm run --silent jscs && npm run --silent eslint", + "posttest": "npm run --silent security", + "pretest": "npm run --silent lint && es-shim-api", + "security": "nsp check", + "test": "npm run --silent tests-only", + "test:module": "node test/index.js", + "test:shimmed": "node test/shimmed.js", + "tests-only": "npm run --silent test:shimmed && npm run --silent test:module" + }, + "testling": { + "files": [ + "test/index.js", + "test/shimmed.js" + ], + "browsers": [ + "iexplore/9.0..latest", + "firefox/4.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/5.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/12.0..latest", + "opera/next", + "safari/5.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "version": "2.0.3" +} diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/polyfill.js b/deps/npm/node_modules/object.getownpropertydescriptors/polyfill.js new file mode 100644 index 00000000000000..0424acfb1c862f --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/polyfill.js @@ -0,0 +1,7 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = function getPolyfill() { + return typeof Object.getOwnPropertyDescriptors === 'function' ? Object.getOwnPropertyDescriptors : implementation; +}; diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/shim.js b/deps/npm/node_modules/object.getownpropertydescriptors/shim.js new file mode 100644 index 00000000000000..799c7d3c2477a8 --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/shim.js @@ -0,0 +1,14 @@ +'use strict'; + +var getPolyfill = require('./polyfill'); +var define = require('define-properties'); + +module.exports = function shimGetOwnPropertyDescriptors() { + var polyfill = getPolyfill(); + define( + Object, + { getOwnPropertyDescriptors: polyfill }, + { getOwnPropertyDescriptors: function () { return Object.getOwnPropertyDescriptors !== polyfill; } } + ); + return polyfill; +}; diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/test/.eslintrc b/deps/npm/node_modules/object.getownpropertydescriptors/test/.eslintrc new file mode 100644 index 00000000000000..e9ca97953e783d --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/test/.eslintrc @@ -0,0 +1,8 @@ +{ + "rules": { + "max-nested-callbacks": [2, 3], + "max-statements": [2, 15], + "max-statements-per-line": [2, { "max": 2 }], + "no-invalid-this": [1] + } +} diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/test/index.js b/deps/npm/node_modules/object.getownpropertydescriptors/test/index.js new file mode 100644 index 00000000000000..618a205064d935 --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/test/index.js @@ -0,0 +1,17 @@ +'use strict'; + +var getDescriptors = require('../'); +var test = require('tape'); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad object/this value', function (st) { + st.throws(function () { return getDescriptors(undefined); }, TypeError, 'undefined is not an object'); + st.throws(function () { return getDescriptors(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(getDescriptors, t); + + t.end(); +}); diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/test/shimmed.js b/deps/npm/node_modules/object.getownpropertydescriptors/test/shimmed.js new file mode 100644 index 00000000000000..c9af4c1d3853f7 --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/test/shimmed.js @@ -0,0 +1,35 @@ +'use strict'; + +var getDescriptors = require('../'); +getDescriptors.shim(); + +var test = require('tape'); +var defineProperties = require('define-properties'); +var runTests = require('./tests'); +var isEnumerable = Object.prototype.propertyIsEnumerable; +var functionsHaveNames = function f() {}.name === 'f'; + +test('shimmed', function (t) { + t.equal(Object.getOwnPropertyDescriptors.length, 1, 'Object.getOwnPropertyDescriptors has a length of 1'); + t.test('Function name', { skip: !functionsHaveNames }, function (st) { + st.equal(Object.getOwnPropertyDescriptors.name, 'getOwnPropertyDescriptors', 'Object.getOwnPropertyDescriptors has name "getOwnPropertyDescriptors"'); + st.end(); + }); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(Object, 'getOwnPropertyDescriptors'), 'Object.getOwnPropertyDescriptors is not enumerable'); + et.end(); + }); + + var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); + + t.test('bad object/this value', { skip: !supportsStrictMode }, function (st) { + st.throws(function () { return getDescriptors(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st.throws(function () { return getDescriptors(null, 'a'); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(Object.getOwnPropertyDescriptors, t); + + t.end(); +}); diff --git a/deps/npm/node_modules/object.getownpropertydescriptors/test/tests.js b/deps/npm/node_modules/object.getownpropertydescriptors/test/tests.js new file mode 100644 index 00000000000000..b9aa29edf71cb0 --- /dev/null +++ b/deps/npm/node_modules/object.getownpropertydescriptors/test/tests.js @@ -0,0 +1,127 @@ +'use strict'; + +module.exports = function (getDescriptors, t) { + var enumDescriptor = { + configurable: true, + enumerable: false, + value: true, + writable: false + }; + var writableDescriptor = { + configurable: true, + enumerable: true, + value: 42, + writable: true + }; + + t.test('works with Object.prototype poisoned setter', { skip: !Object.defineProperty }, function (st) { + var key = 'foo'; + + var obj = {}; + obj[key] = 42; + + var expected = {}; + expected[key] = { + configurable: true, + enumerable: true, + value: 42, + writable: true + }; + + /* eslint-disable no-extend-native, accessor-pairs */ + Object.defineProperty(Object.prototype, key, { configurable: true, set: function (v) { throw new Error(v); } }); + /* eslint-enable no-extend-native, accessor-pairs */ + + var hasOwnNamesBug = false; + try { + Object.getOwnPropertyNames(obj); + } catch (e) { + // v8 in node 0.6 - 0.12 has a bug :-( + hasOwnNamesBug = true; + st.comment('SKIP: this engine has a bug with Object.getOwnPropertyNames: it can not handle a throwing setter on Object.prototype.'); + } + + if (!hasOwnNamesBug) { + st.doesNotThrow(function () { + var result = getDescriptors(obj); + st.deepEqual(result, expected, 'got expected descriptors'); + }); + } + + /* eslint-disable no-extend-native */ + delete Object.prototype[key]; + /* eslint-enable no-extend-native */ + st.end(); + }); + + t.test('gets all expected non-Symbol descriptors', function (st) { + var obj = { normal: Infinity }; + Object.defineProperty(obj, 'enumerable', enumDescriptor); + Object.defineProperty(obj, 'writable', writableDescriptor); + + var descriptors = getDescriptors(obj); + + st.deepEqual(descriptors, { + enumerable: enumDescriptor, + normal: { + configurable: true, + enumerable: true, + value: Infinity, + writable: true + }, + writable: writableDescriptor + }); + st.end(); + }); + + var supportsSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol'; + t.test('gets Symbol descriptors too', { skip: !supportsSymbols }, function (st) { + var symbol = Symbol(); + var symDescriptor = { + configurable: false, + enumerable: true, + value: [symbol], + writable: true + }; + var obj = { normal: Infinity }; + Object.defineProperty(obj, 'enumerable', enumDescriptor); + Object.defineProperty(obj, 'writable', writableDescriptor); + Object.defineProperty(obj, 'symbol', symDescriptor); + + var descriptors = getDescriptors(obj); + + st.deepEqual(descriptors, { + enumerable: enumDescriptor, + normal: { + configurable: true, + enumerable: true, + value: Infinity, + writable: true + }, + symbol: symDescriptor, + writable: writableDescriptor + }); + st.end(); + }); + + /* global Proxy */ + var supportsProxy = typeof Proxy === 'function'; + t.test('Proxies that return an undefined descriptor', { skip: !supportsProxy }, function (st) { + var obj = { foo: true }; + var fooDescriptor = Object.getOwnPropertyDescriptor(obj, 'foo'); + + var proxy = new Proxy(obj, { + getOwnPropertyDescriptor: function (target, key) { + return Object.getOwnPropertyDescriptor(target, key); + }, + ownKeys: function () { + return [ + 'foo', + 'bar' + ]; + } + }); + st.deepEqual(getDescriptors(proxy), { foo: fooDescriptor }, 'object has no descriptors'); + st.end(); + }); +}; diff --git a/deps/npm/node_modules/pacote/CHANGELOG.md b/deps/npm/node_modules/pacote/CHANGELOG.md index 1c8feb9a793773..433c0f470f51c0 100644 --- a/deps/npm/node_modules/pacote/CHANGELOG.md +++ b/deps/npm/node_modules/pacote/CHANGELOG.md @@ -2,6 +2,18 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [9.5.1](https://github.com/zkat/pacote/compare/v9.5.0...v9.5.1) (2019-06-17) + + +### Bug Fixes + +* **audit:** npm audit fix ([127a28b](https://github.com/zkat/pacote/commit/127a28b)) +* **errors:** Fix "TypeError: err.code.match is not a function" error ([#170](https://github.com/zkat/pacote/issues/170)) ([92f5e4c](https://github.com/zkat/pacote/commit/92f5e4c)) +* **git:** limit retry times, avoid unlimited retries ([#172](https://github.com/zkat/pacote/issues/172)) ([8bbd051](https://github.com/zkat/pacote/commit/8bbd051)) + + + # [9.5.0](https://github.com/zkat/pacote/compare/v9.4.1...v9.5.0) (2019-02-18) diff --git a/deps/npm/node_modules/pacote/lib/util/git.js b/deps/npm/node_modules/pacote/lib/util/git.js index 997404dd23cbdb..7991833abed0e3 100644 --- a/deps/npm/node_modules/pacote/lib/util/git.js +++ b/deps/npm/node_modules/pacote/lib/util/git.js @@ -40,8 +40,10 @@ const GIT_TRANSIENT_ERRORS = [ const GIT_TRANSIENT_ERROR_RE = new RegExp(GIT_TRANSIENT_ERRORS) -function shouldRetry (error) { - return GIT_TRANSIENT_ERROR_RE.test(error) +const GIT_TRANSIENT_ERROR_MAX_RETRY_NUMBER = 3 + +function shouldRetry (error, number) { + return GIT_TRANSIENT_ERROR_RE.test(error) && (number < GIT_TRANSIENT_ERROR_MAX_RETRY_NUMBER) } const GIT_ = 'GIT_' @@ -188,7 +190,7 @@ function execGit (gitArgs, gitOpts, opts) { opts.log.silly('pacote', 'Retrying git command: ' + gitArgs.join(' ') + ' attempt # ' + number) } return execFileAsync(gitPath, gitArgs, mkOpts(gitOpts, opts)).catch((err) => { - if (shouldRetry(err)) { + if (shouldRetry(err, number)) { retry(err) } else { throw err @@ -219,7 +221,7 @@ function spawnGit (gitArgs, gitOpts, opts) { child.stderr.on('data', d => { stderr += d }) return finished(child, true).catch(err => { - if (shouldRetry(stderr)) { + if (shouldRetry(stderr, number)) { retry(err) } else { err.stderr = stderr diff --git a/deps/npm/node_modules/pacote/lib/with-tarball-stream.js b/deps/npm/node_modules/pacote/lib/with-tarball-stream.js index abeba738a1c664..0d84696d66932b 100644 --- a/deps/npm/node_modules/pacote/lib/with-tarball-stream.js +++ b/deps/npm/node_modules/pacote/lib/with-tarball-stream.js @@ -107,7 +107,7 @@ function withTarballStream (spec, opts, streamHandler) { // Retry once if we have a cache, to clear up any weird conditions. // Don't retry network errors, though -- make-fetch-happen has already // taken care of making sure we're all set on that front. - if (opts.cache && err.code && !err.code.match(/^E\d{3}$/)) { + if (opts.cache && err.code && !String(err.code).match(/^E\d{3}$/)) { if (err.code === 'EINTEGRITY' || err.code === 'Z_DATA_ERROR') { opts.log.warn('tarball', `tarball data for ${spec} (${opts.integrity}) seems to be corrupted. Trying one more time.`) } diff --git a/deps/npm/node_modules/pacote/package.json b/deps/npm/node_modules/pacote/package.json index 896afe5a77dd24..2fd3d4151f4e3a 100644 --- a/deps/npm/node_modules/pacote/package.json +++ b/deps/npm/node_modules/pacote/package.json @@ -1,21 +1,21 @@ { - "_from": "pacote@latest", - "_id": "pacote@9.5.0", + "_from": "pacote@^9.5.1", + "_id": "pacote@9.5.1", "_inBundle": false, - "_integrity": "sha512-aUplXozRbzhaJO48FaaeClmN+2Mwt741MC6M3bevIGZwdCaP7frXzbUOfOWa91FPHoLITzG0hYaKY363lxO3bg==", + "_integrity": "sha512-Zqvczvf/zZ7QNosdE9uTC7SRuvSs9tFqRkF6cJl+2HH7COBnx4BRAGpeXJlrbN+mM0CMHpbi620xdEHhCflghA==", "_location": "/pacote", "_phantomChildren": { "safe-buffer": "5.1.2" }, "_requested": { - "type": "tag", + "type": "range", "registry": true, - "raw": "pacote@latest", + "raw": "pacote@^9.5.1", "name": "pacote", "escapedName": "pacote", - "rawSpec": "latest", + "rawSpec": "^9.5.1", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "^9.5.1" }, "_requiredBy": [ "#USER", @@ -23,10 +23,10 @@ "/libcipm", "/libnpm" ], - "_resolved": "https://registry.npmjs.org/pacote/-/pacote-9.5.0.tgz", - "_shasum": "85f3013a3f6dd51c108b0ccabd3de8102ddfaeda", - "_spec": "pacote@latest", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/pacote/-/pacote-9.5.1.tgz", + "_shasum": "adb0d23daeef6d0b813ab5891d0c6459ccec998d", + "_spec": "pacote@^9.5.1", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Kat Marchán", "email": "kzm@sykosomatic.org" @@ -79,12 +79,12 @@ "devDependencies": { "nock": "^10.0.3", "npmlog": "^4.1.2", - "nyc": "^13.1.0", + "nyc": "^14.1.1", "require-inject": "^1.4.3", "standard": "^12.0.1", "standard-version": "^4.4.0", "tacks": "^1.2.7", - "tap": "^12.1.0", + "tap": "^12.7.0", "tar-stream": "^1.6.2", "weallbehave": "^1.2.0", "weallcontribute": "^1.0.7" @@ -116,5 +116,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "9.5.0" + "version": "9.5.1" } diff --git a/deps/npm/node_modules/psl/.eslintrc b/deps/npm/node_modules/psl/.eslintrc new file mode 100644 index 00000000000000..ebbcf70bf8531a --- /dev/null +++ b/deps/npm/node_modules/psl/.eslintrc @@ -0,0 +1,11 @@ +{ + "rules": { + "indent": [ 2, 2 ], + "padding-line-between-statements": "off", + "hapi/hapi-no-var": false + }, + "extends": "hapi", + "env": { + "mocha": true + } +} diff --git a/deps/npm/node_modules/qs/.eslintrc b/deps/npm/node_modules/qs/.eslintrc new file mode 100644 index 00000000000000..b7a87b93dfd730 --- /dev/null +++ b/deps/npm/node_modules/qs/.eslintrc @@ -0,0 +1,19 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "complexity": 0, + "consistent-return": 1, + "func-name-matching": 0, + "id-length": [2, { "min": 1, "max": 25, "properties": "never" }], + "indent": [2, 4], + "max-params": [2, 12], + "max-statements": [2, 45], + "no-continue": 1, + "no-magic-numbers": 0, + "no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"], + "operator-linebreak": [2, "before"], + } +} diff --git a/deps/npm/node_modules/qs/test/.eslintrc b/deps/npm/node_modules/qs/test/.eslintrc new file mode 100644 index 00000000000000..20175d64d9dbf7 --- /dev/null +++ b/deps/npm/node_modules/qs/test/.eslintrc @@ -0,0 +1,15 @@ +{ + "rules": { + "array-bracket-newline": 0, + "array-element-newline": 0, + "consistent-return": 2, + "max-lines": 0, + "max-nested-callbacks": [2, 3], + "max-statements": 0, + "no-buffer-constructor": 0, + "no-extend-native": 0, + "no-magic-numbers": 0, + "object-curly-newline": 0, + "sort-keys": 0 + } +} diff --git a/deps/npm/node_modules/query-string/index.d.ts b/deps/npm/node_modules/query-string/index.d.ts new file mode 100644 index 00000000000000..90b3658aee1088 --- /dev/null +++ b/deps/npm/node_modules/query-string/index.d.ts @@ -0,0 +1,143 @@ +export interface ParseOptions { + /** + * Decode the keys and values. URI components are decoded with [`decode-uri-component`](https://github.com/SamVerschueren/decode-uri-component). + * + * @default true + */ + readonly decode?: boolean; + + /** + * @default 'none' + * + * - `bracket`: Parse arrays with bracket representation: + * + * + * queryString.parse('foo[]=1&foo[]=2&foo[]=3', {arrayFormat: 'bracket'}); + * //=> foo: [1, 2, 3] + * + * - `index`: Parse arrays with index representation: + * + * + * queryString.parse('foo[0]=1&foo[1]=2&foo[3]=3', {arrayFormat: 'index'}); + * //=> foo: [1, 2, 3] + * + * - `comma`: Parse arrays with elements separated by comma: + * + * + * queryString.parse('foo=1,2,3', {arrayFormat: 'comma'}); + * //=> foo: [1, 2, 3] + * + * - `none`: Parse arrays with elements using duplicate keys: + * + * + * queryString.parse('foo=1&foo=2&foo=3'); + * //=> foo: [1, 2, 3] + */ + readonly arrayFormat?: 'bracket' | 'index' | 'comma' | 'none'; +} + +export interface ParsedQuery { + readonly [key: string]: string | string[] | null | undefined; +} + +/** + * Parse a query string into an object. Leading `?` or `#` are ignored, so you can pass `location.search` or `location.hash` directly. + * + * The returned object is created with [`Object.create(null)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create) and thus does not have a `prototype`. + * + * @param query - The query string to parse. + */ +export function parse(query: string, options?: ParseOptions): ParsedQuery; + +export interface ParsedUrl { + readonly url: string; + readonly query: ParsedQuery; +} + +/** + * Extract the URL and the query string as an object. + * + * @param url - The URL to parse. + * + * @example + * + * queryString.parseUrl('https://foo.bar?foo=bar'); + * //=> {url: 'https://foo.bar', query: {foo: 'bar'}} + */ +export function parseUrl(url: string, options?: ParseOptions): ParsedUrl; + +export interface StringifyOptions { + /** + * Strictly encode URI components with [`strict-uri-encode`](https://github.com/kevva/strict-uri-encode). It uses [`encodeURIComponent`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) if set to `false`. You probably [don't care](https://github.com/sindresorhus/query-string/issues/42) about this option. + * + * @default true + */ + readonly strict?: boolean; + + /** + * [URL encode](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) the keys and values. + * + * @default true + */ + readonly encode?: boolean; + + /** + * @default 'none' + * + * - `bracket`: Serialize arrays using bracket representation: + * + * + * queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'bracket'}); + * //=> 'foo[]=1&foo[]=2&foo[]=3' + * + * - `index`: Serialize arrays using index representation: + * + * + * queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'index'}); + * //=> 'foo[0]=1&foo[1]=2&foo[3]=3' + * + * - `comma`: Serialize arrays by separating elements with comma: + * + * + * queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'comma'}); + * //=> 'foo=1,2,3' + * + * - `none`: Serialize arrays by using duplicate keys: + * + * + * queryString.stringify({foo: [1, 2, 3]}); + * //=> 'foo=1&foo=2&foo=3' + */ + readonly arrayFormat?: 'bracket' | 'index' | 'comma' | 'none'; + + /** + * Supports both `Function` as a custom sorting function or `false` to disable sorting. + * + * If omitted, keys are sorted using `Array#sort`, which means, converting them to strings and comparing strings in Unicode code point order. + * + * @example + * + * const order = ['c', 'a', 'b']; + * queryString.stringify({a: 1, b: 2, c: 3}, { + * sort: (itemLeft, itemRight) => order.indexOf(itemLeft) - order.indexOf(itemRight) + * }); + * // => 'c=3&a=1&b=2' + * + * queryString.stringify({b: 1, c: 2, a: 3}, {sort: false}); + * // => 'b=1&c=2&a=3' + */ + readonly sort?: ((itemLeft: string, itemRight: string) => number) | false; +} + +/** + * Stringify an object into a query string and sorting the keys. + */ +export function stringify( + object: {[key: string]: unknown}, + options?: StringifyOptions +): string; + +/** + * Extract a query string from a URL that can be passed into `.parse()`. + */ +export function extract(url: string): string; diff --git a/deps/npm/node_modules/query-string/index.js b/deps/npm/node_modules/query-string/index.js index 6a1b3c2a30eb64..3cb1adf8d30450 100644 --- a/deps/npm/node_modules/query-string/index.js +++ b/deps/npm/node_modules/query-string/index.js @@ -5,35 +5,59 @@ const decodeComponent = require('decode-uri-component'); function encoderForArrayFormat(options) { switch (options.arrayFormat) { case 'index': - return (key, value, index) => { - return value === null ? [ - encode(key, options), - '[', - index, - ']' - ].join('') : [ - encode(key, options), - '[', - encode(index, options), - ']=', - encode(value, options) - ].join(''); + return key => (result, value) => { + const index = result.length; + if (value === undefined) { + return result; + } + + if (value === null) { + return [...result, [encode(key, options), '[', index, ']'].join('')]; + } + + return [ + ...result, + [encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join('') + ]; }; + case 'bracket': - return (key, value) => { - return value === null ? [encode(key, options), '[]'].join('') : [ - encode(key, options), - '[]=', - encode(value, options) - ].join(''); + return key => (result, value) => { + if (value === undefined) { + return result; + } + + if (value === null) { + return [...result, [encode(key, options), '[]'].join('')]; + } + + return [...result, [encode(key, options), '[]=', encode(value, options)].join('')]; + }; + + case 'comma': + return key => (result, value, index) => { + if (!value) { + return result; + } + + if (index === 0) { + return [[encode(key, options), '=', encode(value, options)].join('')]; + } + + return [[result, encode(value, options)].join(',')]; }; + default: - return (key, value) => { - return value === null ? encode(key, options) : [ - encode(key, options), - '=', - encode(value, options) - ].join(''); + return key => (result, value) => { + if (value === undefined) { + return result; + } + + if (value === null) { + return [...result, encode(key, options)]; + } + + return [...result, [encode(key, options), '=', encode(value, options)].join('')]; }; } } @@ -59,6 +83,7 @@ function parserForArrayFormat(options) { accumulator[key][result[1]] = value; }; + case 'bracket': return (key, value, accumulator) => { result = /(\[\])$/.exec(key); @@ -76,6 +101,14 @@ function parserForArrayFormat(options) { accumulator[key] = [].concat(accumulator[key], value); }; + + case 'comma': + return (key, value, accumulator) => { + const isArray = typeof value === 'string' && value.split('').indexOf(',') > -1; + const newValue = isArray ? value.split(',') : value; + accumulator[key] = newValue; + }; + default: return (key, value, accumulator) => { if (accumulator[key] === undefined) { @@ -128,7 +161,10 @@ function extract(input) { } function parse(input, options) { - options = Object.assign({decode: true, arrayFormat: 'none'}, options); + options = Object.assign({ + decode: true, + arrayFormat: 'none' + }, options); const formatter = parserForArrayFormat(options); @@ -171,8 +207,8 @@ function parse(input, options) { exports.extract = extract; exports.parse = parse; -exports.stringify = (obj, options) => { - if (!obj) { +exports.stringify = (object, options) => { + if (!object) { return ''; } @@ -183,14 +219,14 @@ exports.stringify = (obj, options) => { }, options); const formatter = encoderForArrayFormat(options); - const keys = Object.keys(obj); + const keys = Object.keys(object); if (options.sort !== false) { keys.sort(options.sort); } return keys.map(key => { - const value = obj[key]; + const value = object[key]; if (value === undefined) { return ''; @@ -201,17 +237,9 @@ exports.stringify = (obj, options) => { } if (Array.isArray(value)) { - const result = []; - - for (const value2 of value.slice()) { - if (value2 === undefined) { - continue; - } - - result.push(formatter(key, value2, result.length)); - } - - return result.join('&'); + return value + .reduce(formatter(key), []) + .join('&'); } return encode(key, options) + '=' + encode(value, options); diff --git a/deps/npm/node_modules/query-string/package.json b/deps/npm/node_modules/query-string/package.json index 8f9b91b4fba931..cd62b3cf54fba2 100644 --- a/deps/npm/node_modules/query-string/package.json +++ b/deps/npm/node_modules/query-string/package.json @@ -1,27 +1,27 @@ { - "_from": "query-string@6.2.0", - "_id": "query-string@6.2.0", + "_from": "query-string@6.4.0", + "_id": "query-string@6.4.0", "_inBundle": false, - "_integrity": "sha512-5wupExkIt8RYL4h/FE+WTg3JHk62e6fFPWtAZA9J5IWK1PfTfKkMS93HBUHcFpeYi9KsY5pFbh+ldvEyaz5MyA==", + "_integrity": "sha512-Werid2I41/tJTqOGPJ3cC3vwrIh/8ZupBQbp7BSsqXzr+pTin3aMJ/EZb8UEuk7ZO3VqQFvq2qck/ihc6wqIdw==", "_location": "/query-string", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "query-string@6.2.0", + "raw": "query-string@6.4.0", "name": "query-string", "escapedName": "query-string", - "rawSpec": "6.2.0", + "rawSpec": "6.4.0", "saveSpec": null, - "fetchSpec": "6.2.0" + "fetchSpec": "6.4.0" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/query-string/-/query-string-6.2.0.tgz", - "_shasum": "468edeb542b7e0538f9f9b1aeb26f034f19c86e1", - "_spec": "query-string@6.2.0", + "_resolved": "https://registry.npmjs.org/query-string/-/query-string-6.4.0.tgz", + "_shasum": "1566c0cec3a2da2d82c222ed3f9e2a921dba5e6a", + "_spec": "query-string@6.4.0", "_where": "/Users/aeschright/code/cli", "author": { "name": "Sindre Sorhus", @@ -39,16 +39,18 @@ "deprecated": false, "description": "Parse and stringify URL query strings", "devDependencies": { - "ava": "^0.25.0", + "ava": "^1.3.1", "deep-equal": "^1.0.1", "fast-check": "^1.5.0", - "xo": "^0.23.0" + "tsd-check": "^0.3.0", + "xo": "^0.24.0" }, "engines": { "node": ">=6" }, "files": [ - "index.js" + "index.js", + "index.d.ts" ], "homepage": "https://github.com/sindresorhus/query-string#readme", "keywords": [ @@ -73,7 +75,7 @@ "url": "git+https://github.com/sindresorhus/query-string.git" }, "scripts": { - "test": "xo && ava" + "test": "xo && ava && tsd-check" }, - "version": "6.2.0" + "version": "6.4.0" } diff --git a/deps/npm/node_modules/query-string/readme.md b/deps/npm/node_modules/query-string/readme.md index 5fa1cfbde4306a..fda9323cdecf93 100644 --- a/deps/npm/node_modules/query-string/readme.md +++ b/deps/npm/node_modules/query-string/readme.md @@ -2,12 +2,6 @@ > Parse and stringify URL [query strings](https://en.wikipedia.org/wiki/Query_string) ---- - -

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

- ---- - ## Install @@ -15,7 +9,7 @@ $ npm install query-string ``` -This module targets Node.js 6 or later and the latest version of Chrome, Firefox, and Safari. If you want support for older browsers, or, [if your project is using create-react-app](https://github.com/sindresorhus/query-string/pull/148#issuecomment-399656020), use version 5: `npm install query-string@5`. +This module targets Node.js 6 or later and the latest version of Chrome, Firefox, and Safari. If you want support for older browsers, or, [if your project is using create-react-app v1](https://github.com/sindresorhus/query-string/pull/148#issuecomment-399656020), use version 5: `npm install query-string@5`. @@ -56,120 +50,138 @@ console.log(location.search); ## API -### .parse(*string*, *[options]*) +### .parse(string, [options]) Parse a query string into an object. Leading `?` or `#` are ignored, so you can pass `location.search` or `location.hash` directly. The returned object is created with [`Object.create(null)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create) and thus does not have a `prototype`. -#### decode +#### options + +Type: `Object` + +##### decode Type: `boolean`
Default: `true` -Decode the keys and values. URI components are decoded with [`decode-uri-component`](https://github.com/SamVerschueren/decode-uri-component). +Decode the keys and values. URL components are decoded with [`decode-uri-component`](https://github.com/SamVerschueren/decode-uri-component). -#### arrayFormat +##### arrayFormat Type: `string`
-Default: `'none'` - -Supports both `index` for an indexed array representation or `bracket` for a *bracketed* array representation. +Default: `none` -- `bracket`: stands for parsing correctly arrays with bracket representation on the query string, such as: +- `bracket`: Parse arrays with bracket representation: ```js queryString.parse('foo[]=1&foo[]=2&foo[]=3', {arrayFormat: 'bracket'}); -//=> foo: [1,2,3] +//=> foo: [1, 2, 3] ``` -- `index`: stands for parsing taking the index into account, such as: +- `index`: Parse arrays with index representation: ```js queryString.parse('foo[0]=1&foo[1]=2&foo[3]=3', {arrayFormat: 'index'}); -//=> foo: [1,2,3] +//=> foo: [1, 2, 3] +``` + +- `comma`: Parse arrays with elements separated by comma: + +```js +queryString.parse('foo=1,2,3', {arrayFormat: 'comma'}); +//=> foo: [1, 2, 3] ``` -- `none`: is the **default** option and removes any bracket representation, such as: +- `none`: Parse arrays with elements using duplicate keys: ```js queryString.parse('foo=1&foo=2&foo=3'); -//=> foo: [1,2,3] +//=> foo: [1, 2, 3] ``` -### .stringify(*object*, *[options]*) +### .stringify(object, [options]) + +Stringify an object into a query string and sorting the keys. + +#### options -Stringify an object into a query string, sorting the keys. +Type: `Object` -#### strict +##### strict Type: `boolean`
Default: `true` -Strictly encode URI components with [strict-uri-encode](https://github.com/kevva/strict-uri-encode). It uses [encodeURIComponent](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) -if set to false. You probably [don't care](https://github.com/sindresorhus/query-string/issues/42) about this option. +Strictly encode URI components with [strict-uri-encode](https://github.com/kevva/strict-uri-encode). It uses [encodeURIComponent](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) if set to false. You probably [don't care](https://github.com/sindresorhus/query-string/issues/42) about this option. -#### encode +##### encode Type: `boolean`
Default: `true` [URL encode](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) the keys and values. -#### arrayFormat +##### arrayFormat Type: `string`
-Default: `'none'` +Default: `none` -Supports both `index` for an indexed array representation or `bracket` for a *bracketed* array representation. +- `bracket`: Serialize arrays using bracket representation: -- `bracket`: stands for parsing correctly arrays with bracket representation on the query string, such as: +```js +queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'bracket'}); +//=> 'foo[]=1&foo[]=2&foo[]=3' +``` + +- `index`: Serialize arrays using index representation: ```js -queryString.stringify({foo: [1,2,3]}, {arrayFormat: 'bracket'}); -// => foo[]=1&foo[]=2&foo[]=3 +queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'index'}); +//=> 'foo[0]=1&foo[1]=2&foo[3]=3' ``` -- `index`: stands for parsing taking the index into account, such as: +- `comma`: Serialize arrays by separating elements with comma: ```js -queryString.stringify({foo: [1,2,3]}, {arrayFormat: 'index'}); -// => foo[0]=1&foo[1]=2&foo[3]=3 +queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'comma'}); +//=> 'foo=1,2,3' ``` -- `none`: is the __default__ option and removes any bracket representation, such as: +- `none`: Serialize arrays by using duplicate keys: ```js -queryString.stringify({foo: [1,2,3]}); -// => foo=1&foo=2&foo=3 +queryString.stringify({foo: [1, 2, 3]}); +//=> 'foo=1&foo=2&foo=3' ``` -#### sort +##### sort -Type: `Function` `boolean` +Type: `Function | boolean` Supports both `Function` as a custom sorting function or `false` to disable sorting. ```js const order = ['c', 'a', 'b']; -queryString.stringify({ a: 1, b: 2, c: 3}, { - sort: (m, n) => order.indexOf(m) >= order.indexOf(n) + +queryString.stringify({a: 1, b: 2, c: 3}, { + sort: (a, b) => order.indexOf(a) - order.indexOf(b) }); -// => 'c=3&a=1&b=2' +//=> 'c=3&a=1&b=2' ``` ```js -queryString.stringify({ b: 1, c: 2, a: 3}, {sort: false}); -// => 'c=3&a=1&b=2' +queryString.stringify({b: 1, c: 2, a: 3}, {sort: false}); +//=> 'b=1&c=2&a=3' ``` -If omitted, keys are sorted using `Array#sort`, which means, converting them to strings and comparing strings in Unicode code point order. +If omitted, keys are sorted using `Array#sort()`, which means, converting them to strings and comparing strings in Unicode code point order. -### .extract(*string*) +### .extract(string) Extract a query string from a URL that can be passed into `.parse()`. -### .parseUrl(*string*, *[options]*) +### .parseUrl(string, [options]) Extract the URL and the query string as an object. diff --git a/deps/npm/node_modules/read-package-tree/README.md b/deps/npm/node_modules/read-package-tree/README.md index c8edffd2bcc2e4..aa0cc934cf47e7 100644 --- a/deps/npm/node_modules/read-package-tree/README.md +++ b/deps/npm/node_modules/read-package-tree/README.md @@ -29,6 +29,9 @@ rpt('/path/to/pkg/root', function (node, kidName) { // error: // } }) + +// or promise-style +rpt('/path/to/pkg/root').then(data => { ... }) ``` That's it. It doesn't figure out if dependencies are met, it doesn't diff --git a/deps/npm/node_modules/read-package-tree/package.json b/deps/npm/node_modules/read-package-tree/package.json index 948f096620033a..2173171af80ff6 100644 --- a/deps/npm/node_modules/read-package-tree/package.json +++ b/deps/npm/node_modules/read-package-tree/package.json @@ -1,8 +1,8 @@ { "_from": "read-package-tree@latest", - "_id": "read-package-tree@5.2.2", + "_id": "read-package-tree@5.3.1", "_inBundle": false, - "_integrity": "sha512-rW3XWUUkhdKmN2JKB4FL563YAgtINifso5KShykufR03nJ5loGFlkUMe1g/yxmqX073SoYYTsgXu7XdDinKZuA==", + "_integrity": "sha512-mLUDsD5JVtlZxjSlPPx1RETkNjjvQYuweKwNVt1Sn8kP5Jh44pvYuUHCp6xSVDZWbNxVxG5lyZJ921aJH61sTw==", "_location": "/read-package-tree", "_phantomChildren": {}, "_requested": { @@ -20,10 +20,10 @@ "/", "/licensee" ], - "_resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.2.2.tgz", - "_shasum": "4b6a0ef2d943c1ea36a578214c9a7f6b7424f7a8", + "_resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.3.1.tgz", + "_shasum": "a32cb64c7f31eb8a6f31ef06f9cedf74068fe636", "_spec": "read-package-tree@latest", - "_where": "/Users/zkat/Documents/code/work/npm", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -34,11 +34,9 @@ }, "bundleDependencies": false, "dependencies": { - "debuglog": "^1.0.1", - "dezalgo": "^1.0.0", - "once": "^1.3.0", "read-package-json": "^2.0.0", - "readdir-scoped-modules": "^1.0.0" + "readdir-scoped-modules": "^1.0.0", + "util-promisify": "^2.1.0" }, "deprecated": false, "description": "Read the contents of node_modules.", @@ -46,13 +44,14 @@ "archy": "^1.0.0", "mkdirp": "^0.5.1", "tacks": "^1.2.1", - "tap": "^12.5.2" + "tap": "^12.7.0" }, "directories": { "test": "test" }, "files": [ - "rpt.js" + "rpt.js", + "realpath.js" ], "homepage": "https://github.com/npm/read-package-tree", "license": "ISC", @@ -63,7 +62,14 @@ "url": "git+https://github.com/npm/read-package-tree.git" }, "scripts": { - "test": "tap test/*.js" + "postpublish": "git push origin --follow-tags", + "postversion": "npm publish", + "preversion": "npm test", + "snap": "TAP_SNAPSHOT=1 tap test/*.js --100", + "test": "tap test/*.js --100" }, - "version": "5.2.2" + "tap": { + "100": true + }, + "version": "5.3.1" } diff --git a/deps/npm/node_modules/read-package-tree/realpath.js b/deps/npm/node_modules/read-package-tree/realpath.js new file mode 100644 index 00000000000000..70c666064ec894 --- /dev/null +++ b/deps/npm/node_modules/read-package-tree/realpath.js @@ -0,0 +1,94 @@ +// look up the realpath, but cache stats to minimize overhead +// If the parent folder is in the realpath cache, then we just +// lstat the child, since there's no need to do a full realpath +// This is not a separate module, and is much simpler than Node's +// built-in fs.realpath, because we only care about symbolic links, +// so we can handle many fewer edge cases. + +const fs = require('fs') +/* istanbul ignore next */ +const promisify = require('util').promisify || require('util-promisify') +const readlink = promisify(fs.readlink) +const lstat = promisify(fs.lstat) +const { resolve, basename, dirname } = require('path') + +const realpathCached = (path, rpcache, stcache, depth) => { + // just a safety against extremely deep eloops + /* istanbul ignore next */ + if (depth > 2000) + throw eloop(path) + + path = resolve(path) + if (rpcache.has(path)) + return Promise.resolve(rpcache.get(path)) + + const dir = dirname(path) + const base = basename(path) + + if (base && rpcache.has(dir)) + return realpathChild(dir, base, rpcache, stcache, depth) + + // if it's the root, then we know it's real + if (!base) { + rpcache.set(dir, dir) + return Promise.resolve(dir) + } + + // the parent, what is that? + // find out, and then come back. + return realpathCached(dir, rpcache, stcache, depth + 1).then(() => + realpathCached(path, rpcache, stcache, depth + 1)) +} + +const lstatCached = (path, stcache) => { + if (stcache.has(path)) + return Promise.resolve(stcache.get(path)) + + const p = lstat(path).then(st => { + stcache.set(path, st) + return st + }) + stcache.set(path, p) + return p +} + +// This is a slight fib, as it doesn't actually occur during a stat syscall. +// But file systems are giant piles of lies, so whatever. +const eloop = path => + Object.assign(new Error( + `ELOOP: too many symbolic links encountered, stat '${path}'`), { + errno: -62, + syscall: 'stat', + code: 'ELOOP', + path: path, + }) + +const realpathChild = (dir, base, rpcache, stcache, depth) => { + const realdir = rpcache.get(dir) + // that unpossible + /* istanbul ignore next */ + if (typeof realdir === 'undefined') + throw new Error('in realpathChild without parent being in realpath cache') + + const realish = resolve(realdir, base) + return lstatCached(realish, stcache).then(st => { + if (!st.isSymbolicLink()) { + rpcache.set(resolve(dir, base), realish) + return realish + } + + let res + return readlink(realish).then(target => { + const resolved = res = resolve(realdir, target) + if (realish === resolved) + throw eloop(realish) + + return realpathCached(resolved, rpcache, stcache, depth + 1) + }).then(real => { + rpcache.set(resolve(dir, base), real) + return real + }) + }) +} + +module.exports = realpathCached diff --git a/deps/npm/node_modules/read-package-tree/rpt.js b/deps/npm/node_modules/read-package-tree/rpt.js index fd43be9c22c0c3..b12a09dfb3b202 100644 --- a/deps/npm/node_modules/read-package-tree/rpt.js +++ b/deps/npm/node_modules/read-package-tree/rpt.js @@ -1,249 +1,169 @@ -var fs = require('fs') -var rpj = require('read-package-json') -var path = require('path') -var dz = require('dezalgo') -var once = require('once') -var readdir = require('readdir-scoped-modules') -var debug = require('debuglog')('rpt') - -function asyncForEach (items, todo, done) { - var remaining = items.length - if (remaining === 0) return done() - var seenErr - items.forEach(function (item) { - todo(item, handleComplete) - }) - function handleComplete (err) { - if (seenErr) return - if (err) { - seenErr = true - return done(err) - } - if (--remaining === 0) done() +const fs = require('fs') +/* istanbul ignore next */ +const promisify = require('util').promisify || require('util-promisify') +const { resolve, basename, dirname, join } = require('path') +const rpj = promisify(require('read-package-json')) +const readdir = promisify(require('readdir-scoped-modules')) +const realpath = require('./realpath.js') + +let ID = 0 +class Node { + constructor (pkg, logical, physical, er, cache) { + // should be impossible. + const cached = cache.get(physical) + /* istanbul ignore next */ + if (cached && !cached.then) + throw new Error('re-creating already instantiated node') + + cache.set(physical, this) + + const parent = basename(dirname(logical)) + if (parent.charAt(0) === '@') + this.name = `${parent}/${basename(logical)}` + else + this.name = basename(logical) + this.path = logical + this.realpath = physical + this.error = er + this.id = ID++ + this.package = pkg || {} + this.parent = null + this.isLink = false + this.children = [] } } -function dpath (p) { - if (!p) return '' - if (p.indexOf(process.cwd()) === 0) { - p = p.substr(process.cwd().length + 1) +class Link extends Node { + constructor (pkg, logical, physical, realpath, er, cache) { + super(pkg, logical, physical, er, cache) + + // if the target has started, but not completed, then + // a Promise will be in the cache to indicate this. + const cachedTarget = cache.get(realpath) + if (cachedTarget && cachedTarget.then) + cachedTarget.then(node => { + this.target = node + this.children = node.children + }) + + this.target = cachedTarget || new Node(pkg, logical, realpath, er, cache) + this.realpath = realpath + this.isLink = true + this.error = er + this.children = this.target.children } - return p -} - -module.exports = rpt - -rpt.Node = Node -rpt.Link = Link - -var ID = 0 -function Node (pkg, logical, physical, er, cache, fromLink) { - if (!(this instanceof Node)) { - return new Node(pkg, logical, physical, er, cache) - } - - var node = cache[physical] || this - if (fromLink && cache[physical]) return cache[physical] - - debug(node.constructor.name, dpath(physical), pkg && pkg._id) - - const parent = path.basename(path.dirname(logical)) - if (parent[0] === '@') { - node.name = parent + '/' + path.basename(logical) - } else { - node.name = path.basename(logical) - } - node.path = logical - node.realpath = physical - node.error = er - if (!cache[physical]) { - node.id = ID++ - node.package = pkg || {} - node.parent = null - node.isLink = false - node.children = [] - } - return cache[physical] = node } -Node.prototype.package = null -Node.prototype.path = '' -Node.prototype.realpath = '' -Node.prototype.children = null -Node.prototype.error = null - -function Link (pkg, logical, physical, realpath, er, cache) { - if (cache[physical]) return cache[physical] - - if (!(this instanceof Link)) { - return new Link(pkg, logical, physical, realpath, er, cache) - } - - cache[physical] = this - - debug(this.constructor.name, dpath(physical), pkg && pkg._id) - - const parent = path.basename(path.dirname(logical)) - if (parent[0] === '@') { - this.name = parent + '/' + path.basename(logical) - } else { - this.name = path.basename(logical) - } - this.id = ID++ - this.path = logical - this.realpath = realpath - this.package = pkg || {} - this.parent = null - this.target = new Node(this.package, logical, realpath, er, cache, true) - this.isLink = true - this.children = this.target.children - this.error = er -} - -Link.prototype = Object.create(Node.prototype, { - constructor: { value: Link } -}) -Link.prototype.target = null -Link.prototype.realpath = '' - -function loadNode (logical, physical, cache, cb) { - debug('loadNode', dpath(logical)) - return fs.realpath(physical, thenReadPackageJson) - - var realpath - function thenReadPackageJson (er, real) { - if (er) { - var node = new Node(null, logical, physical, er, cache) - return cb(null, node) - } - debug('realpath l=%j p=%j real=%j', dpath(logical), dpath(physical), dpath(real)) - var pj = path.join(real, 'package.json') - realpath = real - return rpj(pj, thenCreateNode) - } - function thenCreateNode (er, pkg) { - pkg = pkg || null - var node - if (physical === realpath) { - node = new Node(pkg, logical, physical, er, cache) - } else { - node = new Link(pkg, logical, physical, realpath, er, cache) - } - - cb(null, node) - } +// this is the way it is to expose a timing issue which is difficult to +// test otherwise. The creation of a Node may take slightly longer than +// the creation of a Link that targets it. If the Node has _begun_ its +// creation phase (and put a Promise in the cache) then the Link will +// get a Promise as its cachedTarget instead of an actual Node object. +// This is not a problem, because it gets resolved prior to returning +// the tree or attempting to load children. However, it IS remarkably +// difficult to get to happen in a test environment to verify reliably. +// Hence this kludge. +const newNode = (pkg, logical, physical, er, cache) => + process.env._TEST_RPT_SLOW_LINK_TARGET_ === '1' + ? new Promise(res => setTimeout(() => + res(new Node(pkg, logical, physical, er, cache)), 10)) + : new Node(pkg, logical, physical, er, cache) + +const loadNode = (logical, physical, cache, rpcache, stcache) => { + // cache temporarily holds a promise placeholder so we + // don't try to create the same node multiple times. + // this is very rare to encounter, given the aggressive + // caching on fs.realpath and fs.lstat calls, but + // it can happen in theory. + const cached = cache.get(physical) + /* istanbul ignore next */ + if (cached) + return Promise.resolve(cached) + + const p = realpath(physical, rpcache, stcache, 0).then(real => + rpj(join(real, 'package.json')) + .then(pkg => [pkg, null], er => [null, er]) + .then(([pkg, er]) => + physical === real ? newNode(pkg, logical, physical, er, cache) + : new Link(pkg, logical, physical, real, er, cache) + ), + // if the realpath fails, don't bother with the rest + er => new Node(null, logical, physical, er, cache)) + + cache.set(physical, p) + return p } -function loadChildren (node, cache, filterWith, cb) { - debug('loadChildren', dpath(node.path)) - // needed 'cause we process all kids async-like and errors - // short circuit, so we have to be sure that after an error - // the cbs from other kids don't result in calling cb a second - // (or more) time. - cb = once(cb) - var nm = path.join(node.path, 'node_modules') - var rm - return fs.realpath(path.join(node.path, 'node_modules'), thenReaddir) - - function thenReaddir (er, real_nm) { - if (er) return cb(null, node) - rm = real_nm - readdir(nm, thenLoadKids) - } - - function thenLoadKids (er, kids) { - // If there are no children, that's fine, just return - if (er) return cb(null, node) - - kids = kids.filter(function (kid) { - return kid[0] !== '.' && (!filterWith || filterWith(node, kid)) +const loadChildren = (node, cache, filterWith, rpcache, stcache) => { + // if a Link target has started, but not completed, then + // a Promise will be in the cache to indicate this. + // + // XXX When we can one day loadChildren on the link *target* instead of + // the link itself, to match real dep resolution, then we may end up with + // a node target in the cache that isn't yet done resolving when we get + // here. For now, though, this line will never be reached, so it's hidden + // + // if (node.then) + // return node.then(node => loadChildren(node, cache, filterWith, rpcache, stcache)) + + const nm = join(node.path, 'node_modules') + return realpath(nm, rpcache, stcache, 0) + .then(rm => readdir(rm).then(kids => [rm, kids])) + .then(([rm, kids]) => Promise.all( + kids.filter(kid => + kid.charAt(0) !== '.' && (!filterWith || filterWith(node, kid))) + .map(kid => loadNode(join(nm, kid), join(rm, kid), cache, rpcache, stcache))) + ).then(kidNodes => { + kidNodes.forEach(k => k.parent = node) + node.children.push.apply(node.children, kidNodes.sort((a, b) => + (a.package.name ? a.package.name.toLowerCase() : a.path) + .localeCompare( + (b.package.name ? b.package.name.toLowerCase() : b.path) + ))) + return node }) - - asyncForEach(kids, thenLoadNode, thenSortChildren) - } - function thenLoadNode (kid, done) { - var kidPath = path.join(nm, kid) - var kidRealPath = path.join(rm, kid) - loadNode(kidPath, kidRealPath, cache, andAddNode(done)) - } - function andAddNode (done) { - return function (er, kid) { - if (er) return done(er) - node.children.push(kid) - kid.parent = node - done() - } - } - function thenSortChildren (er) { - sortChildren(node) - cb(er, node) - } + .catch(() => node) } -function sortChildren (node) { - node.children = node.children.sort(function (a, b) { - a = a.package.name ? a.package.name.toLowerCase() : a.path - b = b.package.name ? b.package.name.toLowerCase() : b.path - return a > b ? 1 : -1 - }) +const loadTree = (node, did, cache, filterWith, rpcache, stcache) => { + // impossible except in pathological ELOOP cases + /* istanbul ignore next */ + if (did.has(node.realpath)) + return Promise.resolve(node) + + did.add(node.realpath) + + // load children on the target, not the link + return loadChildren(node, cache, filterWith, rpcache, stcache) + .then(node => Promise.all( + node.children + .filter(kid => !did.has(kid.realpath)) + .map(kid => loadTree(kid, did, cache, filterWith, rpcache, stcache)) + )).then(() => node) } -function loadTree (node, did, cache, filterWith, cb) { - debug('loadTree', dpath(node.path), !!cache[node.path]) - - if (did[node.realpath]) { - return dz(cb)(null, node) +// XXX Drop filterWith and/or cb in next semver major bump +const rpt = (root, filterWith, cb) => { + if (!cb && typeof filterWith === 'function') { + cb = filterWith + filterWith = null } - did[node.realpath] = true + const cache = new Map() + // we can assume that the cwd is real enough + const cwd = process.cwd() + const rpcache = new Map([[ cwd, cwd ]]) + const stcache = new Map() + const p = realpath(root, rpcache, stcache, 0) + .then(realRoot => loadNode(root, realRoot, cache, rpcache, stcache)) + .then(node => loadTree(node, new Set(), cache, filterWith, rpcache, stcache)) - // needed 'cause we process all kids async-like and errors - // short circuit, so we have to be sure that after an error - // the cbs from other kids don't result in calling cb a second - // (or more) time. - cb = once(cb) - return loadChildren(node, cache, filterWith, thenProcessChildren) - - function thenProcessChildren (er, node) { - if (er) return cb(er) - - var kids = node.children.filter(function (kid) { - return !did[kid.realpath] - }) + if (typeof cb === 'function') + p.then(tree => cb(null, tree), cb) - return asyncForEach(kids, loadTreeForKid, cb) - } - function loadTreeForKid (kid, done) { - loadTree(kid, did, cache, filterWith, done) - } + return p } -function rpt (root, filterWith, cb) { - if (!cb) { - cb = filterWith - filterWith = null - } - var cache = Object.create(null) - var topErr - var tree - return fs.realpath(root, thenLoadNode) - - function thenLoadNode (er, realRoot) { - if (er) return cb(er) - debug('rpt', dpath(realRoot)) - loadNode(root, realRoot, cache, thenLoadTree) - } - function thenLoadTree(er, node) { - // even if there's an error, it's fine, as long as we got a node - if (node) { - topErr = er - tree = node - loadTree(node, {}, cache, filterWith, thenHandleErrors) - } else { - cb(er) - } - } - function thenHandleErrors (er) { - cb(topErr && topErr.code !== 'ENOENT' ? topErr : er, tree) - } -} +rpt.Node = Node +rpt.Link = Link +module.exports = rpt diff --git a/deps/npm/node_modules/readable-stream/README.md b/deps/npm/node_modules/readable-stream/README.md index 791576af683ad4..28ccae16165828 100644 --- a/deps/npm/node_modules/readable-stream/README.md +++ b/deps/npm/node_modules/readable-stream/README.md @@ -15,7 +15,7 @@ npm install --save readable-stream This package is a mirror of the streams implementations in Node.js. -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.14.2/docs/api/stream.html). +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.15.3/docs/api/stream.html). If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/readable-stream/lib/_stream_readable.js index b9b1b742cc594b..33f478d7e8c25a 100644 --- a/deps/npm/node_modules/readable-stream/lib/_stream_readable.js +++ b/deps/npm/node_modules/readable-stream/lib/_stream_readable.js @@ -141,7 +141,8 @@ function ReadableState(options, stream, isDuplex) { this.needReadable = false; this.emittedReadable = false; this.readableListening = false; - this.resumeScheduled = false; // Should close be emitted on destroy. Defaults to true. + this.resumeScheduled = false; + this.paused = true; // Should close be emitted on destroy. Defaults to true. this.emitClose = options.emitClose !== false; // has it been destroyed @@ -543,13 +544,35 @@ function maybeReadMore(stream, state) { } function maybeReadMore_(stream, state) { - var len = state.length; - - while (!state.reading && !state.ended && state.length < state.highWaterMark) { + // Attempt to read more data if we should. + // + // The conditions for reading more data are (one of): + // - Not enough data buffered (state.length < state.highWaterMark). The loop + // is responsible for filling the buffer with enough data if such data + // is available. If highWaterMark is 0 and we are not in the flowing mode + // we should _not_ attempt to buffer any extra data. We'll get more data + // when the stream consumer calls read() instead. + // - No data in the buffer, and the stream is in flowing mode. In this mode + // the loop below is responsible for ensuring read() is called. Failing to + // call read here would abort the flow and there's no other mechanism for + // continuing the flow if the stream consumer has just subscribed to the + // 'data' event. + // + // In addition to the above conditions to keep reading data, the following + // conditions prevent the data from being read: + // - The stream has ended (state.ended). + // - There is already a pending 'read' operation (state.reading). This is a + // case where the the stream has called the implementation defined _read() + // method, but they are processing the call asynchronously and have _not_ + // called push() with new data. In this case we skip performing more + // read()s. The execution ends in this method again after the _read() ends + // up calling push() with more data. + while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { + var len = state.length; debug('maybeReadMore read 0'); stream.read(0); if (len === state.length) // didn't get any data, stop spinning. - break;else len = state.length; + break; } state.readingMore = false; @@ -822,9 +845,14 @@ Readable.prototype.removeAllListeners = function (ev) { }; function updateReadableListening(self) { - self._readableState.readableListening = self.listenerCount('readable') > 0; // crude way to check if we should resume - - if (self.listenerCount('data') > 0) { + var state = self._readableState; + state.readableListening = self.listenerCount('readable') > 0; + + if (state.resumeScheduled && !state.paused) { + // flowing needs to be set to true now, otherwise + // the upcoming resume will not flow. + state.flowing = true; // crude way to check if we should resume + } else if (self.listenerCount('data') > 0) { self.resume(); } } @@ -848,6 +876,7 @@ Readable.prototype.resume = function () { resume(this, state); } + state.paused = false; return this; }; @@ -880,6 +909,7 @@ Readable.prototype.pause = function () { this.emit('pause'); } + this._readableState.paused = true; return this; }; diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/readable-stream/lib/_stream_writable.js index 9abbad6bc2cbe7..b35447aedc3a95 100644 --- a/deps/npm/node_modules/readable-stream/lib/_stream_writable.js +++ b/deps/npm/node_modules/readable-stream/lib/_stream_writable.js @@ -103,8 +103,8 @@ function WritableState(options, stream, isDuplex) { options = options || {}; // Duplex streams are both readable and writable, but share // the same options object. // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. + // values for the readable and the writable sides of the duplex stream, + // e.g. options.readableObjectMode vs. options.writableObjectMode, etc. if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream // contains buffers or objects. @@ -445,7 +445,7 @@ function onwrite(stream, er) { onwriteStateUpdate(state); if (er) onwriteError(stream, state, sync, er, cb);else { // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); + var finished = needFinish(state) || stream.destroyed; if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { clearBuffer(stream, state); diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/async_iterator.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/async_iterator.js index 79a6e1e11e0101..9fb615a2f3bc44 100644 --- a/deps/npm/node_modules/readable-stream/lib/internal/streams/async_iterator.js +++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/async_iterator.js @@ -47,6 +47,11 @@ function onReadable(iter) { function wrapForNext(lastPromise, iter) { return function (resolve, reject) { lastPromise.then(function () { + if (iter[kEnded]) { + resolve(createIterResult(undefined, true)); + return; + } + iter[kHandlePromise](resolve, reject); }, reject); }; @@ -70,7 +75,7 @@ var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPro } if (this[kEnded]) { - return Promise.resolve(createIterResult(null, true)); + return Promise.resolve(createIterResult(undefined, true)); } if (this[kStream].destroyed) { @@ -83,7 +88,7 @@ var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPro if (_this[kError]) { reject(_this[kError]); } else { - resolve(createIterResult(null, true)); + resolve(createIterResult(undefined, true)); } }); }); @@ -128,7 +133,7 @@ var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPro return; } - resolve(createIterResult(null, true)); + resolve(createIterResult(undefined, true)); }); }); }), _Object$setPrototypeO), AsyncIteratorPrototype); @@ -151,9 +156,6 @@ var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterat }), _defineProperty(_Object$create, kEnded, { value: stream._readableState.endEmitted, writable: true - }), _defineProperty(_Object$create, kLastPromise, { - value: null, - writable: true }), _defineProperty(_Object$create, kHandlePromise, { value: function value(resolve, reject) { var data = iterator[kStream].read(); @@ -170,6 +172,7 @@ var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterat }, writable: true }), _Object$create)); + iterator[kLastPromise] = null; finished(stream, function (err) { if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') { var reject = iterator[kLastReject]; // reject if we are waiting for data in the Promise @@ -192,7 +195,7 @@ var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterat iterator[kLastPromise] = null; iterator[kLastResolve] = null; iterator[kLastReject] = null; - resolve(createIterResult(null, true)); + resolve(createIterResult(undefined, true)); } iterator[kEnded] = true; diff --git a/deps/npm/node_modules/readable-stream/lib/internal/streams/end-of-stream.js b/deps/npm/node_modules/readable-stream/lib/internal/streams/end-of-stream.js index cf23d53b5af3a4..831f286d98fa95 100644 --- a/deps/npm/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +++ b/deps/npm/node_modules/readable-stream/lib/internal/streams/end-of-stream.js @@ -4,27 +4,30 @@ var ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE; -function noop() {} - -function isRequest(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -} - function once(callback) { var called = false; - return function (err) { + return function () { if (called) return; called = true; - callback.call(this, err); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + callback.apply(this, args); }; } +function noop() {} + +function isRequest(stream) { + return stream.setHeader && typeof stream.abort === 'function'; +} + function eos(stream, opts, callback) { if (typeof opts === 'function') return eos(stream, null, opts); if (!opts) opts = {}; callback = once(callback || noop); - var ws = stream._writableState; - var rs = stream._readableState; var readable = opts.readable || opts.readable !== false && stream.readable; var writable = opts.writable || opts.writable !== false && stream.writable; @@ -32,13 +35,19 @@ function eos(stream, opts, callback) { if (!stream.writable) onfinish(); }; + var writableEnded = stream._writableState && stream._writableState.finished; + var onfinish = function onfinish() { writable = false; + writableEnded = true; if (!readable) callback.call(stream); }; + var readableEnded = stream._readableState && stream._readableState.endEmitted; + var onend = function onend() { readable = false; + readableEnded = true; if (!writable) callback.call(stream); }; @@ -47,12 +56,16 @@ function eos(stream, opts, callback) { }; var onclose = function onclose() { - if (readable && !(rs && rs.ended)) { - return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE()); + var err; + + if (readable && !readableEnded) { + if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); } - if (writable && !(ws && ws.ended)) { - return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE()); + if (writable && !writableEnded) { + if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); } }; @@ -64,7 +77,7 @@ function eos(stream, opts, callback) { stream.on('complete', onfinish); stream.on('abort', onclose); if (stream.req) onrequest();else stream.on('request', onrequest); - } else if (writable && !ws) { + } else if (writable && !stream._writableState) { // legacy streams stream.on('end', onlegacyfinish); stream.on('close', onlegacyfinish); diff --git a/deps/npm/node_modules/readable-stream/package.json b/deps/npm/node_modules/readable-stream/package.json index 71ce7faf4b4b1e..e2cd943594977b 100644 --- a/deps/npm/node_modules/readable-stream/package.json +++ b/deps/npm/node_modules/readable-stream/package.json @@ -1,28 +1,30 @@ { - "_from": "readable-stream@3.1.1", - "_id": "readable-stream@3.1.1", + "_from": "readable-stream@3.3.0", + "_id": "readable-stream@3.3.0", "_inBundle": false, - "_integrity": "sha512-DkN66hPyqDhnIQ6Jcsvx9bFjhw214O4poMBcIMgPVpQvNy9a0e0Uhg5SqySyDKAmUlwt8LonTBz1ezOnM8pUdA==", + "_integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", "_location": "/readable-stream", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "readable-stream@3.1.1", + "raw": "readable-stream@3.3.0", "name": "readable-stream", "escapedName": "readable-stream", - "rawSpec": "3.1.1", + "rawSpec": "3.3.0", "saveSpec": null, - "fetchSpec": "3.1.1" + "fetchSpec": "3.3.0" }, "_requiredBy": [ "#USER", - "/" + "/", + "/bl", + "/tar-stream" ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.1.1.tgz", - "_shasum": "ed6bbc6c5ba58b090039ff18ce670515795aeb06", - "_spec": "readable-stream@3.1.1", - "_where": "/Users/aeschright/code/cli", + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", + "_shasum": "cb8011aad002eb717bf040291feba8569c986fb9", + "_spec": "readable-stream@3.3.0", + "_where": "/Users/isaacs/dev/npm/cli", "browser": { "util": false, "worker_threads": false, @@ -92,5 +94,5 @@ "test-browsers": "airtap --sauce-connect --loopback airtap.local -- test/browser.js", "update-browser-errors": "babel -o errors-browser.js errors.js" }, - "version": "3.1.1" + "version": "3.3.0" } diff --git a/deps/npm/node_modules/readable-stream/readable.js b/deps/npm/node_modules/readable-stream/readable.js index aeec0df5b34eef..9e0ca120ded827 100644 --- a/deps/npm/node_modules/readable-stream/readable.js +++ b/deps/npm/node_modules/readable-stream/readable.js @@ -1,13 +1,8 @@ var Stream = require('stream'); if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream; - exports = module.exports = Stream.Readable; - exports.Readable = Stream.Readable; - exports.Writable = Stream.Writable; - exports.Duplex = Stream.Duplex; - exports.Transform = Stream.Transform; - exports.PassThrough = Stream.PassThrough; - exports.Stream = Stream; + module.exports = Stream.Readable; + Object.assign(module.exports, Stream); + module.exports.Stream = Stream; } else { exports = module.exports = require('./lib/_stream_readable.js'); exports.Stream = Stream || exports; diff --git a/deps/npm/node_modules/readable-stream/yarn.lock b/deps/npm/node_modules/readable-stream/yarn.lock deleted file mode 100644 index e52970fc95b8c7..00000000000000 --- a/deps/npm/node_modules/readable-stream/yarn.lock +++ /dev/null @@ -1,6423 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/cli@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.2.0.tgz#505ed8d351daee6a88918da02c046c18c8c5a24f" - integrity sha512-FLteTkEoony0DX8NbnT51CmwmLBzINdlXmiJCSqCLmqWCDA/xk8EITPWqwDnVLbuK0bsZONt/grqHnQzQ15j0Q== - dependencies: - commander "^2.8.1" - convert-source-map "^1.1.0" - fs-readdir-recursive "^1.1.0" - glob "^7.0.0" - lodash "^4.17.10" - mkdirp "^0.5.1" - output-file-sync "^2.0.0" - slash "^2.0.0" - source-map "^0.5.0" - optionalDependencies: - chokidar "^2.0.3" - -"@babel/code-frame@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" - integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA== - dependencies: - "@babel/highlight" "^7.0.0" - -"@babel/core@^7.2.0": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.2.2.tgz#07adba6dde27bb5ad8d8672f15fde3e08184a687" - integrity sha512-59vB0RWt09cAct5EIe58+NzGP4TFSD3Bz//2/ELy3ZeTeKF6VTD1AXlH8BGGbCX0PuobZBsIzO7IAI9PH67eKw== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.2.2" - "@babel/helpers" "^7.2.0" - "@babel/parser" "^7.2.2" - "@babel/template" "^7.2.2" - "@babel/traverse" "^7.2.2" - "@babel/types" "^7.2.2" - convert-source-map "^1.1.0" - debug "^4.1.0" - json5 "^2.1.0" - lodash "^4.17.10" - resolve "^1.3.2" - semver "^5.4.1" - source-map "^0.5.0" - -"@babel/generator@^7.2.2": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.2.2.tgz#18c816c70962640eab42fe8cae5f3947a5c65ccc" - integrity sha512-I4o675J/iS8k+P38dvJ3IBGqObLXyQLTxtrR4u9cSUJOURvafeEWb/pFMOTwtNrmq73mJzyF6ueTbO1BtN0Zeg== - dependencies: - "@babel/types" "^7.2.2" - jsesc "^2.5.1" - lodash "^4.17.10" - source-map "^0.5.0" - trim-right "^1.0.1" - -"@babel/helper-annotate-as-pure@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" - integrity sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-builder-binary-assignment-operator-visitor@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz#6b69628dfe4087798e0c4ed98e3d4a6b2fbd2f5f" - integrity sha512-qNSR4jrmJ8M1VMM9tibvyRAHXQs2PmaksQF7c1CGJNipfe3D8p+wgNwgso/P2A2r2mdgBWAXljNWR0QRZAMW8w== - dependencies: - "@babel/helper-explode-assignable-expression" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-call-delegate@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz#6a957f105f37755e8645343d3038a22e1449cc4a" - integrity sha512-YEtYZrw3GUK6emQHKthltKNZwszBcHK58Ygcis+gVUrF4/FmTVr5CCqQNSfmvg2y+YDEANyYoaLz/SHsnusCwQ== - dependencies: - "@babel/helper-hoist-variables" "^7.0.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-define-map@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz#3b74caec329b3c80c116290887c0dd9ae468c20c" - integrity sha512-yPPcW8dc3gZLN+U1mhYV91QU3n5uTbx7DUdf8NnPbjS0RMwBuHi9Xt2MUgppmNz7CJxTBWsGczTiEp1CSOTPRg== - dependencies: - "@babel/helper-function-name" "^7.1.0" - "@babel/types" "^7.0.0" - lodash "^4.17.10" - -"@babel/helper-explode-assignable-expression@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz#537fa13f6f1674df745b0c00ec8fe4e99681c8f6" - integrity sha512-NRQpfHrJ1msCHtKjbzs9YcMmJZOg6mQMmGRB+hbamEdG5PNpaSm95275VD92DvJKuyl0s2sFiDmMZ+EnnvufqA== - dependencies: - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-function-name@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" - integrity sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw== - dependencies: - "@babel/helper-get-function-arity" "^7.0.0" - "@babel/template" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-get-function-arity@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" - integrity sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-hoist-variables@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz#46adc4c5e758645ae7a45deb92bab0918c23bb88" - integrity sha512-Ggv5sldXUeSKsuzLkddtyhyHe2YantsxWKNi7A+7LeD12ExRDWTRk29JCXpaHPAbMaIPZSil7n+lq78WY2VY7w== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-member-expression-to-functions@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f" - integrity sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-module-imports@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" - integrity sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-module-transforms@^7.1.0": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.2.2.tgz#ab2f8e8d231409f8370c883d20c335190284b963" - integrity sha512-YRD7I6Wsv+IHuTPkAmAS4HhY0dkPobgLftHp0cRGZSdrRvmZY8rFvae/GVu3bD00qscuvK3WPHB3YdNpBXUqrA== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/helper-simple-access" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.0.0" - "@babel/template" "^7.2.2" - "@babel/types" "^7.2.2" - lodash "^4.17.10" - -"@babel/helper-optimise-call-expression@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5" - integrity sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-plugin-utils@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" - integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== - -"@babel/helper-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.0.0.tgz#2c1718923b57f9bbe64705ffe5640ac64d9bdb27" - integrity sha512-TR0/N0NDCcUIUEbqV6dCO+LptmmSQFQ7q70lfcEB4URsjD0E1HzicrwUH+ap6BAQ2jhCX9Q4UqZy4wilujWlkg== - dependencies: - lodash "^4.17.10" - -"@babel/helper-remap-async-to-generator@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz#361d80821b6f38da75bd3f0785ece20a88c5fe7f" - integrity sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-wrap-function" "^7.1.0" - "@babel/template" "^7.1.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-replace-supers@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.1.0.tgz#5fc31de522ec0ef0899dc9b3e7cf6a5dd655f362" - integrity sha512-BvcDWYZRWVuDeXTYZWxekQNO5D4kO55aArwZOTFXw6rlLQA8ZaDicJR1sO47h+HrnCiDFiww0fSPV0d713KBGQ== - dependencies: - "@babel/helper-member-expression-to-functions" "^7.0.0" - "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-simple-access@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c" - integrity sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w== - dependencies: - "@babel/template" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/helper-split-export-declaration@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz#3aae285c0311c2ab095d997b8c9a94cad547d813" - integrity sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-wrap-function@^7.1.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz#c4e0012445769e2815b55296ead43a958549f6fa" - integrity sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ== - dependencies: - "@babel/helper-function-name" "^7.1.0" - "@babel/template" "^7.1.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.2.0" - -"@babel/helpers@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.2.0.tgz#8335f3140f3144270dc63c4732a4f8b0a50b7a21" - integrity sha512-Fr07N+ea0dMcMN8nFpuK6dUIT7/ivt9yKQdEEnjVS83tG2pHwPi03gYmk/tyuwONnZ+sY+GFFPlWGgCtW1hF9A== - dependencies: - "@babel/template" "^7.1.2" - "@babel/traverse" "^7.1.5" - "@babel/types" "^7.2.0" - -"@babel/highlight@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" - integrity sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw== - dependencies: - chalk "^2.0.0" - esutils "^2.0.2" - js-tokens "^4.0.0" - -"@babel/parser@^7.2.2": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.2.2.tgz#37ebdbc88a2e1ebc6c8dd3d35ea9436e3e39e477" - integrity sha512-UNTmQ5cSLDeBGBl+s7JeowkqIHgmFAGBnLDdIzFmUNSuS5JF0XBcN59jsh/vJO/YjfsBqMxhMjoFGmNExmf0FA== - -"@babel/plugin-proposal-async-generator-functions@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e" - integrity sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-remap-async-to-generator" "^7.1.0" - "@babel/plugin-syntax-async-generators" "^7.2.0" - -"@babel/plugin-proposal-json-strings@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz#568ecc446c6148ae6b267f02551130891e29f317" - integrity sha512-MAFV1CA/YVmYwZG0fBQyXhmj0BHCB5egZHCKWIFVv/XCxAeVGIHfos3SwDck4LvCllENIAg7xMKOG5kH0dzyUg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-json-strings" "^7.2.0" - -"@babel/plugin-proposal-object-rest-spread@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.2.0.tgz#88f5fec3e7ad019014c97f7ee3c992f0adbf7fb8" - integrity sha512-1L5mWLSvR76XYUQJXkd/EEQgjq8HHRP6lQuZTTg0VA4tTGPpGemmCdAfQIz1rzEuWAm+ecP8PyyEm30jC1eQCg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.2.0" - -"@babel/plugin-proposal-optional-catch-binding@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz#135d81edb68a081e55e56ec48541ece8065c38f5" - integrity sha512-mgYj3jCcxug6KUcX4OBoOJz3CMrwRfQELPQ5560F70YQUBZB7uac9fqaWamKR1iWUzGiK2t0ygzjTScZnVz75g== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" - -"@babel/plugin-proposal-unicode-property-regex@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.2.0.tgz#abe7281fe46c95ddc143a65e5358647792039520" - integrity sha512-LvRVYb7kikuOtIoUeWTkOxQEV1kYvL5B6U3iWEGCzPNRus1MzJweFqORTj+0jkxozkTSYNJozPOddxmqdqsRpw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - regexpu-core "^4.2.0" - -"@babel/plugin-syntax-async-generators@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz#69e1f0db34c6f5a0cf7e2b3323bf159a76c8cb7f" - integrity sha512-1ZrIRBv2t0GSlcwVoQ6VgSLpLgiN/FVQUzt9znxo7v2Ov4jJrs8RY8tv0wvDmFN3qIdMKWrmMMW6yZ0G19MfGg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-syntax-json-strings@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz#72bd13f6ffe1d25938129d2a186b11fd62951470" - integrity sha512-5UGYnMSLRE1dqqZwug+1LISpA403HzlSfsg6P9VXU6TBjcSHeNlw4DxDx7LgpF+iKZoOG/+uzqoRHTdcUpiZNg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-syntax-object-rest-spread@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz#3b7a3e733510c57e820b9142a6579ac8b0dfad2e" - integrity sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-syntax-optional-catch-binding@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz#a94013d6eda8908dfe6a477e7f9eda85656ecf5c" - integrity sha512-bDe4xKNhb0LI7IvZHiA13kff0KEfaGX/Hv4lMA9+7TEc63hMNvfKo6ZFpXhKuEp+II/q35Gc4NoMeDZyaUbj9w== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-arrow-functions@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz#9aeafbe4d6ffc6563bf8f8372091628f00779550" - integrity sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-async-to-generator@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.2.0.tgz#68b8a438663e88519e65b776f8938f3445b1a2ff" - integrity sha512-CEHzg4g5UraReozI9D4fblBYABs7IM6UerAVG7EJVrTLC5keh00aEuLUT+O40+mJCEzaXkYfTCUKIyeDfMOFFQ== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-remap-async-to-generator" "^7.1.0" - -"@babel/plugin-transform-block-scoped-functions@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz#5d3cc11e8d5ddd752aa64c9148d0db6cb79fd190" - integrity sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-block-scoping@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.2.0.tgz#f17c49d91eedbcdf5dd50597d16f5f2f770132d4" - integrity sha512-vDTgf19ZEV6mx35yiPJe4fS02mPQUUcBNwWQSZFXSzTSbsJFQvHt7DqyS3LK8oOWALFOsJ+8bbqBgkirZteD5Q== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - lodash "^4.17.10" - -"@babel/plugin-transform-classes@^7.2.0", "@babel/plugin-transform-classes@^7.2.2": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.2.2.tgz#6c90542f210ee975aa2aa8c8b5af7fa73a126953" - integrity sha512-gEZvgTy1VtcDOaQty1l10T3jQmJKlNVxLDCs+3rCVPr6nMkODLELxViq5X9l+rfxbie3XrfrMCYYY6eX3aOcOQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-define-map" "^7.1.0" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.0.0" - globals "^11.1.0" - -"@babel/plugin-transform-computed-properties@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz#83a7df6a658865b1c8f641d510c6f3af220216da" - integrity sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-destructuring@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.2.0.tgz#e75269b4b7889ec3a332cd0d0c8cff8fed0dc6f3" - integrity sha512-coVO2Ayv7g0qdDbrNiadE4bU7lvCd9H539m2gMknyVjjMdwF/iCOM7R+E8PkntoqLkltO0rk+3axhpp/0v68VQ== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-dotall-regex@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.2.0.tgz#f0aabb93d120a8ac61e925ea0ba440812dbe0e49" - integrity sha512-sKxnyHfizweTgKZf7XsXu/CNupKhzijptfTM+bozonIuyVrLWVUvYjE2bhuSBML8VQeMxq4Mm63Q9qvcvUcciQ== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - regexpu-core "^4.1.3" - -"@babel/plugin-transform-duplicate-keys@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.2.0.tgz#d952c4930f312a4dbfff18f0b2914e60c35530b3" - integrity sha512-q+yuxW4DsTjNceUiTzK0L+AfQ0zD9rWaTLiUqHA8p0gxx7lu1EylenfzjeIWNkPy6e/0VG/Wjw9uf9LueQwLOw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-exponentiation-operator@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz#a63868289e5b4007f7054d46491af51435766008" - integrity sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A== - dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-for-of@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.2.0.tgz#ab7468befa80f764bb03d3cb5eef8cc998e1cad9" - integrity sha512-Kz7Mt0SsV2tQk6jG5bBv5phVbkd0gd27SgYD4hH1aLMJRchM0dzHaXvrWhVZ+WxAlDoAKZ7Uy3jVTW2mKXQ1WQ== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-function-name@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.2.0.tgz#f7930362829ff99a3174c39f0afcc024ef59731a" - integrity sha512-kWgksow9lHdvBC2Z4mxTsvc7YdY7w/V6B2vy9cTIPtLEE9NhwoWivaxdNM/S37elu5bqlLP/qOY906LukO9lkQ== - dependencies: - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-literals@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz#690353e81f9267dad4fd8cfd77eafa86aba53ea1" - integrity sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-modules-amd@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz#82a9bce45b95441f617a24011dc89d12da7f4ee6" - integrity sha512-mK2A8ucqz1qhrdqjS9VMIDfIvvT2thrEsIQzbaTdc5QFzhDjQv2CkJJ5f6BXIkgbmaoax3zBr2RyvV/8zeoUZw== - dependencies: - "@babel/helper-module-transforms" "^7.1.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-modules-commonjs@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.2.0.tgz#c4f1933f5991d5145e9cfad1dfd848ea1727f404" - integrity sha512-V6y0uaUQrQPXUrmj+hgnks8va2L0zcZymeU7TtWEgdRLNkceafKXEduv7QzgQAE4lT+suwooG9dC7LFhdRAbVQ== - dependencies: - "@babel/helper-module-transforms" "^7.1.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-simple-access" "^7.1.0" - -"@babel/plugin-transform-modules-systemjs@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.2.0.tgz#912bfe9e5ff982924c81d0937c92d24994bb9068" - integrity sha512-aYJwpAhoK9a+1+O625WIjvMY11wkB/ok0WClVwmeo3mCjcNRjt+/8gHWrB5i+00mUju0gWsBkQnPpdvQ7PImmQ== - dependencies: - "@babel/helper-hoist-variables" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-modules-umd@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz#7678ce75169f0877b8eb2235538c074268dd01ae" - integrity sha512-BV3bw6MyUH1iIsGhXlOK6sXhmSarZjtJ/vMiD9dNmpY8QXFFQTj+6v92pcfy1iqa8DeAfJFwoxcrS/TUZda6sw== - dependencies: - "@babel/helper-module-transforms" "^7.1.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-new-target@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz#ae8fbd89517fa7892d20e6564e641e8770c3aa4a" - integrity sha512-yin069FYjah+LbqfGeTfzIBODex/e++Yfa0rH0fpfam9uTbuEeEOx5GLGr210ggOV77mVRNoeqSYqeuaqSzVSw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-object-super@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz#b35d4c10f56bab5d650047dad0f1d8e8814b6598" - integrity sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.1.0" - -"@babel/plugin-transform-parameters@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.2.0.tgz#0d5ad15dc805e2ea866df4dd6682bfe76d1408c2" - integrity sha512-kB9+hhUidIgUoBQ0MsxMewhzr8i60nMa2KgeJKQWYrqQpqcBYtnpR+JgkadZVZoaEZ/eKu9mclFaVwhRpLNSzA== - dependencies: - "@babel/helper-call-delegate" "^7.1.0" - "@babel/helper-get-function-arity" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-regenerator@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0.tgz#5b41686b4ed40bef874d7ed6a84bdd849c13e0c1" - integrity sha512-sj2qzsEx8KDVv1QuJc/dEfilkg3RRPvPYx/VnKLtItVQRWt1Wqf5eVCOLZm29CiGFfYYsA3VPjfizTCV0S0Dlw== - dependencies: - regenerator-transform "^0.13.3" - -"@babel/plugin-transform-shorthand-properties@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz#6333aee2f8d6ee7e28615457298934a3b46198f0" - integrity sha512-QP4eUM83ha9zmYtpbnyjTLAGKQritA5XW/iG9cjtuOI8s1RuL/3V6a3DeSHfKutJQ+ayUfeZJPcnCYEQzaPQqg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-spread@^7.2.0": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz#3103a9abe22f742b6d406ecd3cd49b774919b406" - integrity sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-sticky-regex@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz#a1e454b5995560a9c1e0d537dfc15061fd2687e1" - integrity sha512-KKYCoGaRAf+ckH8gEL3JHUaFVyNHKe3ASNsZ+AlktgHevvxGigoIttrEJb8iKN03Q7Eazlv1s6cx2B2cQ3Jabw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - -"@babel/plugin-transform-template-literals@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.2.0.tgz#d87ed01b8eaac7a92473f608c97c089de2ba1e5b" - integrity sha512-FkPix00J9A/XWXv4VoKJBMeSkyY9x/TqIh76wzcdfl57RJJcf8CehQ08uwfhCDNtRQYtHQKBTwKZDEyjE13Lwg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-typeof-symbol@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz#117d2bcec2fbf64b4b59d1f9819894682d29f2b2" - integrity sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-unicode-regex@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.2.0.tgz#4eb8db16f972f8abb5062c161b8b115546ade08b" - integrity sha512-m48Y0lMhrbXEJnVUaYly29jRXbQ3ksxPrS1Tg8t+MHqzXhtBYAvI51euOBaoAlZLPHsieY9XPVMf80a5x0cPcA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-regex" "^7.0.0" - regexpu-core "^4.1.3" - -"@babel/polyfill@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.0.0.tgz#c8ff65c9ec3be6a1ba10113ebd40e8750fb90bff" - integrity sha512-dnrMRkyyr74CRelJwvgnnSUDh2ge2NCTyHVwpOdvRMHtJUyxLtMAfhBN3s64pY41zdw0kgiLPh6S20eb1NcX6Q== - dependencies: - core-js "^2.5.7" - regenerator-runtime "^0.11.1" - -"@babel/preset-env@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.2.0.tgz#a5030e7e4306af5a295dd5d7c78dc5464af3fee2" - integrity sha512-haGR38j5vOGVeBatrQPr3l0xHbs14505DcM57cbJy48kgMFvvHHoYEhHuRV+7vi559yyAUAVbTWzbK/B/pzJng== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-async-generator-functions" "^7.2.0" - "@babel/plugin-proposal-json-strings" "^7.2.0" - "@babel/plugin-proposal-object-rest-spread" "^7.2.0" - "@babel/plugin-proposal-optional-catch-binding" "^7.2.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.2.0" - "@babel/plugin-syntax-async-generators" "^7.2.0" - "@babel/plugin-syntax-object-rest-spread" "^7.2.0" - "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" - "@babel/plugin-transform-arrow-functions" "^7.2.0" - "@babel/plugin-transform-async-to-generator" "^7.2.0" - "@babel/plugin-transform-block-scoped-functions" "^7.2.0" - "@babel/plugin-transform-block-scoping" "^7.2.0" - "@babel/plugin-transform-classes" "^7.2.0" - "@babel/plugin-transform-computed-properties" "^7.2.0" - "@babel/plugin-transform-destructuring" "^7.2.0" - "@babel/plugin-transform-dotall-regex" "^7.2.0" - "@babel/plugin-transform-duplicate-keys" "^7.2.0" - "@babel/plugin-transform-exponentiation-operator" "^7.2.0" - "@babel/plugin-transform-for-of" "^7.2.0" - "@babel/plugin-transform-function-name" "^7.2.0" - "@babel/plugin-transform-literals" "^7.2.0" - "@babel/plugin-transform-modules-amd" "^7.2.0" - "@babel/plugin-transform-modules-commonjs" "^7.2.0" - "@babel/plugin-transform-modules-systemjs" "^7.2.0" - "@babel/plugin-transform-modules-umd" "^7.2.0" - "@babel/plugin-transform-new-target" "^7.0.0" - "@babel/plugin-transform-object-super" "^7.2.0" - "@babel/plugin-transform-parameters" "^7.2.0" - "@babel/plugin-transform-regenerator" "^7.0.0" - "@babel/plugin-transform-shorthand-properties" "^7.2.0" - "@babel/plugin-transform-spread" "^7.2.0" - "@babel/plugin-transform-sticky-regex" "^7.2.0" - "@babel/plugin-transform-template-literals" "^7.2.0" - "@babel/plugin-transform-typeof-symbol" "^7.2.0" - "@babel/plugin-transform-unicode-regex" "^7.2.0" - browserslist "^4.3.4" - invariant "^2.2.2" - js-levenshtein "^1.1.3" - semver "^5.3.0" - -"@babel/template@^7.1.0", "@babel/template@^7.1.2", "@babel/template@^7.2.2": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.2.2.tgz#005b3fdf0ed96e88041330379e0da9a708eb2907" - integrity sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.2.2" - "@babel/types" "^7.2.2" - -"@babel/traverse@^7.1.0", "@babel/traverse@^7.1.5", "@babel/traverse@^7.2.2": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.2.2.tgz#961039de1f9bcb946d807efe2dba9c92e859d188" - integrity sha512-E5Bn9FSwHpSkUhthw/XEuvFZxIgrqb9M8cX8j5EUQtrUG5DQUy6bFyl7G7iQ1D1Czudor+xkmp81JbLVVM0Sjg== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.2.2" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.0.0" - "@babel/parser" "^7.2.2" - "@babel/types" "^7.2.2" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.10" - -"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.2.2": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.2.2.tgz#44e10fc24e33af524488b716cdaee5360ea8ed1e" - integrity sha512-fKCuD6UFUMkR541eDWL+2ih/xFZBXPOg/7EQFeTluMDebfqR4jrpaCjLhkWlQS4hT6nRa2PMEgXKbRB5/H2fpg== - dependencies: - esutils "^2.0.2" - lodash "^4.17.10" - to-fast-properties "^2.0.0" - -"@sindresorhus/is@^0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" - integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow== - -JSONStream@^1.0.3: - version "1.3.5" - resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" - integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== - dependencies: - jsonparse "^1.2.0" - through ">=2.2.7 <3" - -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - -accepts@~1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" - integrity sha1-63d99gEXI6OxTopywIBcjoZ0a9I= - dependencies: - mime-types "~2.1.18" - negotiator "0.6.1" - -acorn-dynamic-import@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz#482210140582a36b83c3e342e1cfebcaa9240948" - integrity sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw== - -acorn-node@^1.2.0, acorn-node@^1.3.0, acorn-node@^1.5.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/acorn-node/-/acorn-node-1.6.2.tgz#b7d7ceca6f22e6417af933a62cad4de01048d5d2" - integrity sha512-rIhNEZuNI8ibQcL7ANm/mGyPukIaZsRNX9psFNQURyJW0nu6k8wjSDld20z6v2mDBWqX13pIEnk9gGZJHIlEXg== - dependencies: - acorn "^6.0.2" - acorn-dynamic-import "^4.0.0" - acorn-walk "^6.1.0" - xtend "^4.0.1" - -acorn-walk@^6.1.0: - version "6.1.1" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.1.1.tgz#d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913" - integrity sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw== - -acorn@^5.2.1: - version "5.7.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" - integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== - -acorn@^6.0.2: - version "6.0.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.4.tgz#77377e7353b72ec5104550aa2d2097a2fd40b754" - integrity sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg== - -adm-zip@~0.4.x: - version "0.4.13" - resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.13.tgz#597e2f8cc3672151e1307d3e95cddbc75672314a" - integrity sha512-fERNJX8sOXfel6qCBCMPvZLzENBEhZTzKqg6vrOW5pvoEaQuJhRU4ndTAh6lHOxn1I6jnz2NHra56ZODM751uw== - -airtap@0.0.9: - version "0.0.9" - resolved "https://registry.yarnpkg.com/airtap/-/airtap-0.0.9.tgz#de0b2f3c0b7371ef5fe5c65b179e0de675e4f047" - integrity sha512-TlwVCtNx6ylUfSglscKAoP5h2IdygnyjOKT50eftSDYhMfwNRZZwoAzFYimIEW8P/jcOef6VhMfm66ahpRBQ2Q== - dependencies: - batch "~0.6.1" - body-parser "~1.18.3" - browserify "~13.3.0" - browserify-istanbul "~3.0.1" - chalk "^2.3.1" - commander "~2.16.0" - compression "~1.7.1" - convert-source-map "~1.5.1" - debug "~3.1.0" - express "~4.16.2" - express-state "~1.4.0" - find-nearest-file "~1.1.0" - firefox-profile "~1.1.0" - globs-to-files "~1.0.0" - hbs "~4.0.1" - highlight.js "~9.12.0" - http-proxy "~1.17.0" - humanize-duration "~3.15.0" - load-script "~1.0.0" - lodash "~4.17.5" - mkdirp "~0.5.1" - opener "~1.4.3" - sauce-browsers "~2.0.0" - server-destroy "~1.0.1" - shell-quote "~1.6.1" - split2 "^2.2.0" - stack-mapper "~0.2.2" - stacktrace-js "~2.0.0" - superagent "~3.8.2" - tap-finished "~0.0.1" - tap-parser "~5.4.0" - watchify "~3.11.0" - wd "~1.10.0" - yamljs "~0.3.0" - -ajv@^5.1.0: - version "5.5.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" - integrity sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU= - dependencies: - co "^4.6.0" - fast-deep-equal "^1.0.0" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.3.0" - -ajv@^6.5.5: - version "6.6.1" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.6.1.tgz#6360f5ed0d80f232cc2b294c362d5dc2e538dd61" - integrity sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww== - dependencies: - fast-deep-equal "^2.0.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - integrity sha1-DNkKVhCT810KmSVsIrcGlDP60Rc= - dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" - -amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -anymatch@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" - integrity sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA== - dependencies: - micromatch "^2.1.5" - normalize-path "^2.0.0" - -anymatch@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" - integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== - dependencies: - micromatch "^3.1.4" - normalize-path "^2.1.1" - -append-transform@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" - integrity sha1-126/jKlNJ24keja61EpLdKthGZE= - dependencies: - default-require-extensions "^1.0.0" - -aproba@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - -archiver-utils@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-1.3.0.tgz#e50b4c09c70bf3d680e32ff1b7994e9f9d895174" - integrity sha1-5QtMCccL89aA4y/xt5lOn52JUXQ= - dependencies: - glob "^7.0.0" - graceful-fs "^4.1.0" - lazystream "^1.0.0" - lodash "^4.8.0" - normalize-path "^2.0.0" - readable-stream "^2.0.0" - -archiver@2.1.1, archiver@~2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/archiver/-/archiver-2.1.1.tgz#ff662b4a78201494a3ee544d3a33fe7496509ebc" - integrity sha1-/2YrSnggFJSj7lRNOjP+dJZQnrw= - dependencies: - archiver-utils "^1.3.0" - async "^2.0.0" - buffer-crc32 "^0.2.1" - glob "^7.0.0" - lodash "^4.8.0" - readable-stream "^2.0.0" - tar-stream "^1.5.0" - zip-stream "^1.2.0" - -archy@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" - integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= - -are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" - integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8= - dependencies: - arr-flatten "^1.0.1" - -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= - -arr-flatten@^1.0.1, arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= - -array-filter@~0.0.0: - version "0.0.1" - resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec" - integrity sha1-fajPLiZijtcygDWB/SH2fKzS7uw= - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= - -array-map@0.0.0, array-map@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662" - integrity sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI= - -array-reduce@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b" - integrity sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys= - -array-uniq@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= - -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" - integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM= - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= - -arrify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= - -asn1.js@^4.0.0: - version "4.10.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" - integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -asn1@~0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" - integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= - -assert@^1.4.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" - integrity sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE= - dependencies: - util "0.10.3" - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= - -async-each@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" - integrity sha1-GdOGodntxufByF04iu28xW0zYC0= - -async@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/async/-/async-2.0.1.tgz#b709cc0280a9c36f09f4536be823c838a9049e25" - integrity sha1-twnMAoCpw28J9FNr6CPIOKkEniU= - dependencies: - lodash "^4.8.0" - -async@^1.4.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= - -async@^2.0.0, async@^2.5.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" - integrity sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ== - dependencies: - lodash "^4.17.10" - -async@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d" - integrity sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw== - dependencies: - lodash "^4.14.0" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - -asyncreduce@~0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/asyncreduce/-/asyncreduce-0.1.4.tgz#18210e01978bfdcba043955497a5cd315c0a6a41" - integrity sha1-GCEOAZeL/cugQ5VUl6XNMVwKakE= - dependencies: - runnel "~0.5.0" - -atob@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - -aws4@^1.6.0, aws4@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" - integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== - -babel-code-frame@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-generator@^6.18.0: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.17.4" - source-map "^0.5.7" - trim-right "^1.0.1" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= - dependencies: - babel-runtime "^6.22.0" - -babel-runtime@^6.22.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-template@^6.16.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - -babel-traverse@^6.18.0, babel-traverse@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= - dependencies: - babel-code-frame "^6.26.0" - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - debug "^2.6.8" - globals "^9.18.0" - invariant "^2.2.2" - lodash "^4.17.4" - -babel-types@^6.18.0, babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" - -babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -base64-js@^1.0.2: - version "1.3.0" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" - integrity sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw== - -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -batch@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" - integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY= - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - dependencies: - tweetnacl "^0.14.3" - -binary-extensions@^1.0.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.12.0.tgz#c2d780f53d45bba8317a8902d4ceeaf3a6385b14" - integrity sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg== - -bind-obj-methods@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/bind-obj-methods/-/bind-obj-methods-2.0.0.tgz#0178140dbe7b7bb67dc74892ace59bc0247f06f0" - integrity sha512-3/qRXczDi2Cdbz6jE+W3IflJOutRVica8frpBn14de1mBOkzDo+6tY33kNhvkw54Kn3PzRRD2VnGbGPcTAk4sw== - -bl@^1.0.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.2.tgz#a160911717103c07410cef63ef51b397c025af9c" - integrity sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA== - dependencies: - readable-stream "^2.3.5" - safe-buffer "^5.1.1" - -bl@^2.0.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/bl/-/bl-2.1.2.tgz#591182cb9f3f2eff3beb1e76dabedfb5c5fa9a26" - integrity sha512-DvC0x+PxmSJNx8wXoFV15pC2+GOJ3ohb4F1REq3X32a2Z3nEBpR1Guu740M7ouYAImFj4BXDNilLNZbygtG9lQ== - dependencies: - readable-stream "^2.3.5" - safe-buffer "^5.1.1" - -bluebird@^3.5.1: - version "3.5.3" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.3.tgz#7d01c6f9616c9a51ab0f8c549a79dfe6ec33efa7" - integrity sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw== - -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: - version "4.11.8" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" - integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== - -body-parser@1.18.3, body-parser@~1.18.3: - version "1.18.3" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4" - integrity sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ= - dependencies: - bytes "3.0.0" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.2" - http-errors "~1.6.3" - iconv-lite "0.4.23" - on-finished "~2.3.0" - qs "6.5.2" - raw-body "2.3.3" - type-is "~1.6.16" - -boom@4.x.x: - version "4.3.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31" - integrity sha1-T4owBctKfjiJ90kDD9JbluAdLjE= - dependencies: - hoek "4.x.x" - -boom@5.x.x: - version "5.2.0" - resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02" - integrity sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw== - dependencies: - hoek "4.x.x" - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc= - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - -braces@^2.3.0, braces@^2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== - dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" - -brorand@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= - -browser-pack@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/browser-pack/-/browser-pack-6.1.0.tgz#c34ba10d0b9ce162b5af227c7131c92c2ecd5774" - integrity sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA== - dependencies: - JSONStream "^1.0.3" - combine-source-map "~0.8.0" - defined "^1.0.0" - safe-buffer "^5.1.1" - through2 "^2.0.0" - umd "^3.0.0" - -browser-resolve@^1.11.0, browser-resolve@^1.7.0: - version "1.11.3" - resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" - integrity sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ== - dependencies: - resolve "1.1.7" - -browserify-aes@^1.0.0, browserify-aes@^1.0.4: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserify-cipher@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" - integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -browserify-istanbul@~3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/browserify-istanbul/-/browserify-istanbul-3.0.1.tgz#1a2dd63c0c81a12391a80a466fbef917eb12de07" - integrity sha1-Gi3WPAyBoSORqApGb775F+sS3gc= - dependencies: - istanbul-lib-instrument "^1.8.0" - minimatch "^3.0.4" - object-assign "^4.1.1" - through "^2.3.8" - -browserify-rsa@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" - integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= - dependencies: - bn.js "^4.1.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" - integrity sha1-qk62jl17ZYuqa/alfmMMvXqT0pg= - dependencies: - bn.js "^4.1.1" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.2" - elliptic "^6.0.0" - inherits "^2.0.1" - parse-asn1 "^5.0.0" - -browserify-zlib@^0.1.4, browserify-zlib@~0.1.2: - version "0.1.4" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" - integrity sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0= - dependencies: - pako "~0.2.0" - -browserify-zlib@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" - integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== - dependencies: - pako "~1.0.5" - -browserify@^16.1.0: - version "16.2.3" - resolved "https://registry.yarnpkg.com/browserify/-/browserify-16.2.3.tgz#7ee6e654ba4f92bce6ab3599c3485b1cc7a0ad0b" - integrity sha512-zQt/Gd1+W+IY+h/xX2NYMW4orQWhqSwyV+xsblycTtpOuB27h1fZhhNQuipJ4t79ohw4P4mMem0jp/ZkISQtjQ== - dependencies: - JSONStream "^1.0.3" - assert "^1.4.0" - browser-pack "^6.0.1" - browser-resolve "^1.11.0" - browserify-zlib "~0.2.0" - buffer "^5.0.2" - cached-path-relative "^1.0.0" - concat-stream "^1.6.0" - console-browserify "^1.1.0" - constants-browserify "~1.0.0" - crypto-browserify "^3.0.0" - defined "^1.0.0" - deps-sort "^2.0.0" - domain-browser "^1.2.0" - duplexer2 "~0.1.2" - events "^2.0.0" - glob "^7.1.0" - has "^1.0.0" - htmlescape "^1.1.0" - https-browserify "^1.0.0" - inherits "~2.0.1" - insert-module-globals "^7.0.0" - labeled-stream-splicer "^2.0.0" - mkdirp "^0.5.0" - module-deps "^6.0.0" - os-browserify "~0.3.0" - parents "^1.0.1" - path-browserify "~0.0.0" - process "~0.11.0" - punycode "^1.3.2" - querystring-es3 "~0.2.0" - read-only-stream "^2.0.0" - readable-stream "^2.0.2" - resolve "^1.1.4" - shasum "^1.0.0" - shell-quote "^1.6.1" - stream-browserify "^2.0.0" - stream-http "^2.0.0" - string_decoder "^1.1.1" - subarg "^1.0.0" - syntax-error "^1.1.1" - through2 "^2.0.0" - timers-browserify "^1.0.1" - tty-browserify "0.0.1" - url "~0.11.0" - util "~0.10.1" - vm-browserify "^1.0.0" - xtend "^4.0.0" - -browserify@~13.3.0: - version "13.3.0" - resolved "https://registry.yarnpkg.com/browserify/-/browserify-13.3.0.tgz#b5a9c9020243f0c70e4675bec8223bc627e415ce" - integrity sha1-tanJAgJD8McORnW+yCI7xifkFc4= - dependencies: - JSONStream "^1.0.3" - assert "^1.4.0" - browser-pack "^6.0.1" - browser-resolve "^1.11.0" - browserify-zlib "~0.1.2" - buffer "^4.1.0" - cached-path-relative "^1.0.0" - concat-stream "~1.5.1" - console-browserify "^1.1.0" - constants-browserify "~1.0.0" - crypto-browserify "^3.0.0" - defined "^1.0.0" - deps-sort "^2.0.0" - domain-browser "~1.1.0" - duplexer2 "~0.1.2" - events "~1.1.0" - glob "^7.1.0" - has "^1.0.0" - htmlescape "^1.1.0" - https-browserify "~0.0.0" - inherits "~2.0.1" - insert-module-globals "^7.0.0" - labeled-stream-splicer "^2.0.0" - module-deps "^4.0.8" - os-browserify "~0.1.1" - parents "^1.0.1" - path-browserify "~0.0.0" - process "~0.11.0" - punycode "^1.3.2" - querystring-es3 "~0.2.0" - read-only-stream "^2.0.0" - readable-stream "^2.0.2" - resolve "^1.1.4" - shasum "^1.0.0" - shell-quote "^1.6.1" - stream-browserify "^2.0.0" - stream-http "^2.0.0" - string_decoder "~0.10.0" - subarg "^1.0.0" - syntax-error "^1.1.1" - through2 "^2.0.0" - timers-browserify "^1.0.1" - tty-browserify "~0.0.0" - url "~0.11.0" - util "~0.10.1" - vm-browserify "~0.0.1" - xtend "^4.0.0" - -browserslist@^4.3.4: - version "4.3.6" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.3.6.tgz#0f9d9081afc66b36f477c6bdf3813f784f42396a" - integrity sha512-kMGKs4BTzRWviZ8yru18xBpx+CyHG9eqgRbj9XbE3IMgtczf4aiA0Y1YCpVdvUieKGZ03kolSPXqTcscBCb9qw== - dependencies: - caniuse-lite "^1.0.30000921" - electron-to-chromium "^1.3.92" - node-releases "^1.1.1" - -buf-compare@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/buf-compare/-/buf-compare-1.0.1.tgz#fef28da8b8113a0a0db4430b0b6467b69730b34a" - integrity sha1-/vKNqLgROgoNtEMLC2Rntpcws0o= - -buffer-alloc-unsafe@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" - integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== - -buffer-alloc@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" - integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== - dependencies: - buffer-alloc-unsafe "^1.1.0" - buffer-fill "^1.0.0" - -buffer-crc32@^0.2.1: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= - -buffer-fill@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" - integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= - -buffer-from@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-0.1.2.tgz#15f4b9bcef012044df31142c14333caf6e0260d0" - integrity sha512-RiWIenusJsmI2KcvqQABB83tLxCByE3upSP8QU3rJDMVFGPWLvPQJt/O1Su9moRWeH7d+Q2HYb68f6+v+tw2vg== - -buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= - -buffer@^4.1.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" - integrity sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg= - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - -buffer@^5.0.2, buffer@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.2.1.tgz#dd57fa0f109ac59c602479044dca7b8b3d0b71d6" - integrity sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg== - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - -builtin-modules@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= - -builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= - -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - -cacheable-request@^2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d" - integrity sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0= - dependencies: - clone-response "1.0.2" - get-stream "3.0.0" - http-cache-semantics "3.8.1" - keyv "3.0.0" - lowercase-keys "1.0.0" - normalize-url "2.0.1" - responselike "1.0.2" - -cached-path-relative@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/cached-path-relative/-/cached-path-relative-1.0.2.tgz#a13df4196d26776220cc3356eb147a52dba2c6db" - integrity sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg== - -caching-transform@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/caching-transform/-/caching-transform-1.0.1.tgz#6dbdb2f20f8d8fbce79f3e94e9d1742dcdf5c0a1" - integrity sha1-bb2y8g+Nj7znnz6U6dF0Lc31wKE= - dependencies: - md5-hex "^1.2.0" - mkdirp "^0.5.1" - write-file-atomic "^1.1.4" - -camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - integrity sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk= - -camelcase@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= - -caniuse-lite@^1.0.30000921: - version "1.0.30000921" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000921.tgz#7a607c1623444b22351d834e093aedda3c42fbe8" - integrity sha512-Bu09ciy0lMWLgpYC77I0YGuI8eFRBPPzaSOYJK1jTI64txCphYCqnWbxJYjHABYVt/TYX/p3jNjLBR87u1Bfpw== - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= - -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - integrity sha1-qg0yYptu6XIgBBHL1EYckHvCt60= - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - -chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^2.0.0, chalk@^2.3.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" - integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chokidar@^1.0.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" - integrity sha1-eY5ol3gVHIB2tLNg5e3SjNortGg= - dependencies: - anymatch "^1.3.0" - async-each "^1.0.0" - glob-parent "^2.0.0" - inherits "^2.0.1" - is-binary-path "^1.0.0" - is-glob "^2.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.0.0" - optionalDependencies: - fsevents "^1.0.0" - -chokidar@^2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.4.tgz#356ff4e2b0e8e43e322d18a372460bbcf3accd26" - integrity sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ== - dependencies: - anymatch "^2.0.0" - async-each "^1.0.0" - braces "^2.3.0" - glob-parent "^3.1.0" - inherits "^2.0.1" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - lodash.debounce "^4.0.8" - normalize-path "^2.1.1" - path-is-absolute "^1.0.0" - readdirp "^2.0.0" - upath "^1.0.5" - optionalDependencies: - fsevents "^1.2.2" - -chownr@^1.0.1, chownr@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" - integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g== - -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -clean-yaml-object@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz#63fb110dc2ce1a84dc21f6d9334876d010ae8b68" - integrity sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g= - -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - integrity sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE= - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" - -cliui@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" - integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ== - dependencies: - string-width "^2.1.1" - strip-ansi "^4.0.0" - wrap-ansi "^2.0.0" - -clone-response@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" - integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= - dependencies: - mimic-response "^1.0.0" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -color-support@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" - integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== - -combine-source-map@^0.8.0, combine-source-map@~0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/combine-source-map/-/combine-source-map-0.8.0.tgz#a58d0df042c186fcf822a8e8015f5450d2d79a8b" - integrity sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos= - dependencies: - convert-source-map "~1.1.0" - inline-source-map "~0.6.0" - lodash.memoize "~3.0.3" - source-map "~0.5.3" - -combined-stream@^1.0.6, combined-stream@~1.0.5, combined-stream@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828" - integrity sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w== - dependencies: - delayed-stream "~1.0.0" - -commander@^2.8.1: - version "2.19.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" - integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== - -commander@~2.16.0: - version "2.16.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.16.0.tgz#f16390593996ceb4f3eeb020b31d78528f7f8a50" - integrity sha512-sVXqklSaotK9at437sFlFpyOcJonxe0yST/AG9DkQKUdIE6IqGIMv4SfAQSKaJbSdVEJYItASCrBiVQHq1HQew== - -commander@~2.17.1: - version "2.17.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" - integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= - -component-emitter@^1.2.0, component-emitter@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" - integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= - -compress-commons@^1.2.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-1.2.2.tgz#524a9f10903f3a813389b0225d27c48bb751890f" - integrity sha1-UkqfEJA/OoEzibAiXSfEi7dRiQ8= - dependencies: - buffer-crc32 "^0.2.1" - crc32-stream "^2.0.0" - normalize-path "^2.0.0" - readable-stream "^2.0.0" - -compressible@~2.0.14: - version "2.0.15" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.15.tgz#857a9ab0a7e5a07d8d837ed43fe2defff64fe212" - integrity sha512-4aE67DL33dSW9gw4CI2H/yTxqHLNcxp0yS6jB+4h+wr3e43+1z7vm0HU9qXOH8j+qjKuL8+UtkOxYQSMq60Ylw== - dependencies: - mime-db ">= 1.36.0 < 2" - -compression@~1.7.1: - version "1.7.3" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.3.tgz#27e0e176aaf260f7f2c2813c3e440adb9f1993db" - integrity sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg== - dependencies: - accepts "~1.3.5" - bytes "3.0.0" - compressible "~2.0.14" - debug "2.6.9" - on-headers "~1.0.1" - safe-buffer "5.1.2" - vary "~1.1.2" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -concat-stream@^1.6.0, concat-stream@^1.6.1, concat-stream@~1.6.0: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -concat-stream@~1.5.0, concat-stream@~1.5.1: - version "1.5.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266" - integrity sha1-cIl4Yk2FavQaWnQd790mHadSwmY= - dependencies: - inherits "~2.0.1" - readable-stream "~2.0.0" - typedarray "~0.0.5" - -console-browserify@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" - integrity sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA= - dependencies: - date-now "^0.1.4" - -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= - -constants-browserify@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= - -content-disposition@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" - integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ= - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== - -convert-source-map@^1.1.0, convert-source-map@^1.5.1: - version "1.6.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" - integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A== - dependencies: - safe-buffer "~5.1.1" - -convert-source-map@~1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.1.3.tgz#4829c877e9fe49b3161f3bf3673888e204699860" - integrity sha1-SCnId+n+SbMWHzvzZziI4gRpmGA= - -convert-source-map@~1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" - integrity sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU= - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= - -cookie@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" - integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s= - -cookiejar@^2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c" - integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA== - -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= - -core-assert@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/core-assert/-/core-assert-0.2.1.tgz#f85e2cf9bfed28f773cc8b3fa5c5b69bdc02fe3f" - integrity sha1-+F4s+b/tKPdzzIs/pcW2m9wC/j8= - dependencies: - buf-compare "^1.0.0" - is-error "^2.2.0" - -core-js@^2.4.0, core-js@^2.5.7: - version "2.6.0" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.0.tgz#1e30793e9ee5782b307e37ffa22da0eacddd84d4" - integrity sha512-kLRC6ncVpuEW/1kwrOXYX6KQASCVtrh1gQr/UiaVgFlf9WE5Vp+lNe5+h3LuMr5PAucWnnEXwH0nQHRH/gpGtw== - -core-util-is@1.0.2, core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -coveralls@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.2.tgz#f5a0bcd90ca4e64e088b710fa8dda640aea4884f" - integrity sha512-Tv0LKe/MkBOilH2v7WBiTBdudg2ChfGbdXafc/s330djpF3zKOmuehTeRwjXWc7pzfj9FrDUTA7tEx6Div8NFw== - dependencies: - growl "~> 1.10.0" - js-yaml "^3.11.0" - lcov-parse "^0.0.10" - log-driver "^1.2.7" - minimist "^1.2.0" - request "^2.85.0" - -crc32-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-2.0.0.tgz#e3cdd3b4df3168dd74e3de3fbbcb7b297fe908f4" - integrity sha1-483TtN8xaN10494/u8t7KX/pCPQ= - dependencies: - crc "^3.4.4" - readable-stream "^2.0.0" - -crc@^3.4.4: - version "3.8.0" - resolved "https://registry.yarnpkg.com/crc/-/crc-3.8.0.tgz#ad60269c2c856f8c299e2c4cc0de4556914056c6" - integrity sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ== - dependencies: - buffer "^5.1.0" - -create-ecdh@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" - integrity sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw== - dependencies: - bn.js "^4.1.0" - elliptic "^6.0.0" - -create-hash@^1.1.0, create-hash@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -cross-spawn@^4: - version "4.0.2" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" - integrity sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE= - dependencies: - lru-cache "^4.0.1" - which "^1.2.9" - -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -cryptiles@3.x.x: - version "3.1.4" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.4.tgz#769a68c95612b56faadfcebf57ac86479cbe8322" - integrity sha512-8I1sgZHfVwcSOY6mSGpVU3lw/GSIZvusg8dD2+OGehCJpOhQRLNcH0qb9upQnOH4XhgxxFJSg6E2kx95deb1Tw== - dependencies: - boom "5.x.x" - -crypto-browserify@^3.0.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= - dependencies: - assert-plus "^1.0.0" - -date-now@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" - integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= - -debug-log@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f" - integrity sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8= - -debug@2.6.9, debug@^2.1.2, debug@^2.1.3, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@=3.1.0, debug@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - -debug@^3.1.0: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - -debug@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87" - integrity sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg== - dependencies: - ms "^2.1.1" - -decamelize@^1.0.0, decamelize@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= - -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= - -decompress-response@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" - integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= - dependencies: - mimic-response "^1.0.0" - -deep-equal@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" - integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU= - -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - -deep-strict-equal@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/deep-strict-equal/-/deep-strict-equal-0.2.0.tgz#4a078147a8ab57f6a0d4f5547243cd22f44eb4e4" - integrity sha1-SgeBR6irV/ag1PVUckPNIvROtOQ= - dependencies: - core-assert "^0.2.0" - -default-require-extensions@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" - integrity sha1-836hXT4T/9m0N9M+GnW1+5eHTLg= - dependencies: - strip-bom "^2.0.0" - -define-properties@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - dependencies: - object-keys "^1.0.12" - -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - -defined@^1.0.0, defined@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" - integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= - -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - -deps-sort@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/deps-sort/-/deps-sort-2.0.0.tgz#091724902e84658260eb910748cccd1af6e21fb5" - integrity sha1-CRckkC6EZYJg65EHSMzNGvbiH7U= - dependencies: - JSONStream "^1.0.3" - shasum "^1.0.0" - subarg "^1.0.0" - through2 "^2.0.0" - -des.js@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" - integrity sha1-wHTS4qpqipoH29YfmhXCzYPsjsw= - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= - -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= - dependencies: - repeating "^2.0.0" - -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - -detective@^4.0.0: - version "4.7.1" - resolved "https://registry.yarnpkg.com/detective/-/detective-4.7.1.tgz#0eca7314338442febb6d65da54c10bb1c82b246e" - integrity sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig== - dependencies: - acorn "^5.2.1" - defined "^1.0.0" - -detective@^5.0.2: - version "5.1.0" - resolved "https://registry.yarnpkg.com/detective/-/detective-5.1.0.tgz#7a20d89236d7b331ccea65832e7123b5551bb7cb" - integrity sha512-TFHMqfOvxlgrfVzTEkNBSh9SvSNX/HfF4OFI2QFGCyPm02EsyILqnUeb5P6q7JZ3SFNTBL5t2sePRgrN4epUWQ== - dependencies: - acorn-node "^1.3.0" - defined "^1.0.0" - minimist "^1.1.1" - -diff@^1.3.2: - version "1.4.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" - integrity sha1-fyjS657nsVqX79ic5j3P2qPMur8= - -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - -domain-browser@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" - integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== - -domain-browser@~1.1.0: - version "1.1.7" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" - integrity sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw= - -duplexer2@^0.1.2, duplexer2@~0.1.0, duplexer2@~0.1.2: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" - integrity sha1-ixLauHjA1p4+eJEFFmKjL8a93ME= - dependencies: - readable-stream "^2.0.2" - -duplexer2@~0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" - integrity sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds= - dependencies: - readable-stream "~1.1.9" - -duplexer3@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" - integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= - -duplexify@^3.5.0, duplexify@^3.6.0: - version "3.6.1" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.6.1.tgz#b1a7a29c4abfd639585efaecce80d666b1e34125" - integrity sha512-vM58DwdnKmty+FSPzT14K9JXb90H+j5emaR4KYbr2KTIz00WHGbWOe5ghQTx233ZCLZtrGDALzKwcjEtSt35mA== - dependencies: - end-of-stream "^1.0.0" - inherits "^2.0.1" - readable-stream "^2.0.0" - stream-shift "^1.0.0" - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - -electron-to-chromium@^1.3.92: - version "1.3.92" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.92.tgz#9027b5abaea400045edd652c0e4838675c814399" - integrity sha512-En051LMzMl3/asMWGZEtU808HOoVWIpmmZx1Ep8N+TT9e7z/X8RcLeBU2kLSNLGQ+5SuKELzMx+MVuTBXk6Q9w== - -elliptic@^6.0.0: - version "6.4.1" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.1.tgz#c2d0b7776911b86722c632c3c06c60f2f819939a" - integrity sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ== - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - -end-of-stream@^1.0.0, end-of-stream@^1.1.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" - integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q== - dependencies: - once "^1.4.0" - -error-ex@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -error-stack-parser@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-2.0.2.tgz#4ae8dbaa2bf90a8b450707b9149dcabca135520d" - integrity sha512-E1fPutRDdIj/hohG0UpT5mayXNCxXP9d+snxFsPU9X0XgccOumKraa3juDMwTUyi7+Bu5+mCGagjg4IYeNbOdw== - dependencies: - stackframe "^1.0.4" - -es-abstract@^1.5.0, es-abstract@^1.5.1: - version "1.12.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" - integrity sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA== - dependencies: - es-to-primitive "^1.1.1" - function-bind "^1.1.1" - has "^1.0.1" - is-callable "^1.1.3" - is-regex "^1.0.4" - -es-to-primitive@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" - integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.3, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= - -eventemitter3@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.0.tgz#090b4d6cdbd645ed10bf750d4b5407942d7ba163" - integrity sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA== - -events-to-array@^1.0.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/events-to-array/-/events-to-array-1.1.2.tgz#2d41f563e1fe400ed4962fe1a4d5c6a7539df7f6" - integrity sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y= - -events@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/events/-/events-2.1.0.tgz#2a9a1e18e6106e0e812aa9ebd4a819b3c29c0ba5" - integrity sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg== - -events@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" - integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ= - -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s= - dependencies: - is-posix-bracket "^0.1.0" - -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc= - dependencies: - fill-range "^2.1.0" - -express-state@~1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/express-state/-/express-state-1.4.0.tgz#3ae100132ae11fdfef836fe190cab7ba729d227d" - integrity sha1-OuEAEyrhH9/vg2/hkMq3unKdIn0= - dependencies: - serialize-javascript "^1.1.0" - -express@~4.16.2: - version "4.16.4" - resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e" - integrity sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg== - dependencies: - accepts "~1.3.5" - array-flatten "1.1.1" - body-parser "1.18.3" - content-disposition "0.5.2" - content-type "~1.0.4" - cookie "0.3.1" - cookie-signature "1.0.6" - debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "1.1.1" - fresh "0.5.2" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.2" - path-to-regexp "0.1.7" - proxy-addr "~2.0.4" - qs "6.5.2" - range-parser "~1.2.0" - safe-buffer "5.1.2" - send "0.16.2" - serve-static "1.13.2" - setprototypeof "1.1.0" - statuses "~1.4.0" - type-is "~1.6.16" - utils-merge "1.0.1" - vary "~1.1.2" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extend@^3.0.0, extend@~3.0.1, extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE= - dependencies: - is-extglob "^1.0.0" - -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= - -fast-deep-equal@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" - integrity sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ= - -fast-deep-equal@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" - integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= - -fast-json-stable-stringify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" - integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= - -filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" - integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY= - -fill-range@^2.1.0: - version "2.2.4" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" - integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q== - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^3.0.0" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - -finalhandler@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105" - integrity sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.2" - statuses "~1.4.0" - unpipe "~1.0.0" - -find-cache-dir@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9" - integrity sha1-yN765XyKUqinhPnjHFfHQumToLk= - dependencies: - commondir "^1.0.1" - mkdirp "^0.5.1" - pkg-dir "^1.0.0" - -find-nearest-file@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/find-nearest-file/-/find-nearest-file-1.1.0.tgz#e29441740329a2015f7655faecd7b85e02cad686" - integrity sha512-NMsS0ITOwpBPrHOyO7YUtDhaVEGUKS0kBJDVaWZPuCzO7JMW+uzFQQVts/gPyIV9ioyNWDb5LjhHWXVf1OnBDA== - -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - -find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= - dependencies: - locate-path "^2.0.0" - -firefox-profile@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/firefox-profile/-/firefox-profile-1.1.0.tgz#50090d1ff62dce3052cc7f46d1243c6a487db47a" - integrity sha512-wUIE4QeAjwoHvFbomWmXgKyYtV4/oZxDcJG4znxtGGa/0BhKkd3HzeOf3tAsMWPq1ExARZxCRRiNw1BL3FuPqA== - dependencies: - adm-zip "~0.4.x" - archiver "~2.1.0" - async "~2.5.0" - fs-extra "~4.0.2" - ini "~1.3.3" - jetpack-id "1.0.0" - lazystream "~1.0.0" - lodash "~4.17.2" - minimist "^1.1.1" - uuid "^3.0.0" - xml2js "~0.4.4" - -follow-redirects@^1.0.0: - version "1.5.10" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" - integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ== - dependencies: - debug "=3.1.0" - -for-each@~0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" - integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== - dependencies: - is-callable "^1.1.3" - -for-in@^1.0.1, for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= - -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4= - dependencies: - for-in "^1.0.1" - -foreach-shim@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/foreach-shim/-/foreach-shim-0.1.1.tgz#be61d75f46abb7176f5abd295e35885751b71d94" - integrity sha1-vmHXX0artxdvWr0pXjWIV1G3HZQ= - -foreachasync@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/foreachasync/-/foreachasync-3.0.0.tgz#5502987dc8714be3392097f32e0071c9dee07cf6" - integrity sha1-VQKYfchxS+M5IJfzLgBxyd7gfPY= - -foreground-child@^1.3.3, foreground-child@^1.5.3, foreground-child@^1.5.6: - version "1.5.6" - resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-1.5.6.tgz#4fd71ad2dfde96789b980a5c0a295937cb2f5ce9" - integrity sha1-T9ca0t/elnibmApcCilZN8svXOk= - dependencies: - cross-spawn "^4" - signal-exit "^3.0.0" - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= - -form-data@^2.3.1, form-data@~2.3.1, form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -formidable@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.2.1.tgz#70fb7ca0290ee6ff961090415f4b3df3d2082659" - integrity sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg== - -forwarded@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" - integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= - dependencies: - map-cache "^0.2.2" - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= - -from2@^2.1.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" - integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.0" - -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - -fs-exists-cached@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-exists-cached/-/fs-exists-cached-1.0.0.tgz#cf25554ca050dc49ae6656b41de42258989dcbce" - integrity sha1-zyVVTKBQ3EmuZla0HeQiWJidy84= - -fs-extra@~4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" - integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-minipass@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" - integrity sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ== - dependencies: - minipass "^2.2.1" - -fs-readdir-recursive@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" - integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA== - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fsevents@^1.0.0, fsevents@^1.2.2: - version "1.2.4" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" - integrity sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg== - dependencies: - nan "^2.9.2" - node-pre-gyp "^0.10.0" - -function-bind@^1.0.2, function-bind@^1.1.1, function-bind@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -function-loop@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/function-loop/-/function-loop-1.0.1.tgz#8076bb305e8e6a3cceee2920765f330d190f340c" - integrity sha1-gHa7MF6OajzO7ikgdl8zDRkPNAw= - -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -get-assigned-identifiers@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz#6dbf411de648cbaf8d9169ebb0d2d576191e2ff1" - integrity sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ== - -get-caller-file@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" - integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== - -get-stream@3.0.0, get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= - -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= - dependencies: - assert-plus "^1.0.0" - -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" - integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q= - dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" - -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" - integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg= - dependencies: - is-glob "^2.0.0" - -glob-parent@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" - integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= - dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" - -glob@^5.0.10: - version "5.0.15" - resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" - integrity sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E= - dependencies: - inflight "^1.0.4" - inherits "2" - minimatch "2 || 3" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.0.0, glob@^7.0.5, glob@^7.0.6, glob@^7.1.0, glob@^7.1.2, glob@~7.1.2: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^11.1.0: - version "11.9.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.9.0.tgz#bde236808e987f290768a93d065060d78e6ab249" - integrity sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg== - -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== - -globs-to-files@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/globs-to-files/-/globs-to-files-1.0.0.tgz#54490f6d1f4b9fd2de9d99445146ffb37550380d" - integrity sha1-VEkPbR9Ln9LenZlEUUb/s3VQOA0= - dependencies: - array-uniq "~1.0.2" - asyncreduce "~0.1.4" - glob "^5.0.10" - xtend "^4.0.0" - -got@^8.2.0: - version "8.3.2" - resolved "https://registry.yarnpkg.com/got/-/got-8.3.2.tgz#1d23f64390e97f776cac52e5b936e5f514d2e937" - integrity sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw== - dependencies: - "@sindresorhus/is" "^0.7.0" - cacheable-request "^2.1.1" - decompress-response "^3.3.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - into-stream "^3.1.0" - is-retry-allowed "^1.1.0" - isurl "^1.0.0-alpha5" - lowercase-keys "^1.0.0" - mimic-response "^1.0.0" - p-cancelable "^0.4.0" - p-timeout "^2.0.1" - pify "^3.0.0" - safe-buffer "^5.1.1" - timed-out "^4.0.1" - url-parse-lax "^3.0.0" - url-to-options "^1.0.1" - -graceful-fs@^4.1.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: - version "4.1.15" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" - integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== - -"growl@~> 1.10.0": - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - -gunzip-maybe@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/gunzip-maybe/-/gunzip-maybe-1.4.1.tgz#39c72ed89d1b49ba708e18776500488902a52027" - integrity sha512-qtutIKMthNJJgeHQS7kZ9FqDq59/Wn0G2HYCRNjpup7yKfVI6/eqwpmroyZGFoCYaG+sW6psNVb4zoLADHpp2g== - dependencies: - browserify-zlib "^0.1.4" - is-deflate "^1.0.0" - is-gzip "^1.0.0" - peek-stream "^1.1.0" - pumpify "^1.3.3" - through2 "^2.0.3" - -handlebars@4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.5.tgz#92c6ed6bb164110c50d4d8d0fbddc70806c6f8e7" - integrity sha1-ksbta7FkEQxQ1NjQ+93HCAbG+Oc= - dependencies: - async "^1.4.0" - optimist "^0.6.1" - source-map "^0.4.4" - optionalDependencies: - uglify-js "^2.6" - -handlebars@^4.0.3: - version "4.0.12" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.12.tgz#2c15c8a96d46da5e266700518ba8cb8d919d5bc5" - integrity sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA== - dependencies: - async "^2.5.0" - optimist "^0.6.1" - source-map "^0.6.1" - optionalDependencies: - uglify-js "^3.1.4" - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - -har-validator@~5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" - integrity sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0= - dependencies: - ajv "^5.1.0" - har-schema "^2.0.0" - -har-validator@~5.1.0: - version "5.1.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" - integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== - dependencies: - ajv "^6.5.5" - har-schema "^2.0.0" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= - dependencies: - ansi-regex "^2.0.0" - -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -has-symbol-support-x@^1.4.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" - integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== - -has-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" - integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= - -has-to-string-tag-x@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" - integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== - dependencies: - has-symbol-support-x "^1.4.1" - -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= - -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -has@^1.0.0, has@^1.0.1, has@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hash-base@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" - integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg= - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - -hawk@~6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038" - integrity sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ== - dependencies: - boom "4.x.x" - cryptiles "3.x.x" - hoek "4.x.x" - sntp "2.x.x" - -hbs@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/hbs/-/hbs-4.0.1.tgz#4bfd98650dc8c9dac44b3ca9adf9c098e8bc33b6" - integrity sha1-S/2YZQ3IydrESzyprfnAmOi8M7Y= - dependencies: - handlebars "4.0.5" - walk "2.3.9" - -highlight.js@~9.12.0: - version "9.12.0" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.12.0.tgz#e6d9dbe57cbefe60751f02af336195870c90c01e" - integrity sha1-5tnb5Xy+/mB1HwKvM2GVhwyQwB4= - -hmac-drbg@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -hoek@4.x.x: - version "4.2.1" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb" - integrity sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA== - -hosted-git-info@^2.1.4: - version "2.7.1" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" - integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== - -htmlescape@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/htmlescape/-/htmlescape-1.1.1.tgz#3a03edc2214bca3b66424a3e7959349509cb0351" - integrity sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E= - -http-cache-semantics@3.8.1: - version "3.8.1" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" - integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== - -http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3: - version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" - integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - -http-proxy@~1.17.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.17.0.tgz#7ad38494658f84605e2f6db4436df410f4e5be9a" - integrity sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g== - dependencies: - eventemitter3 "^3.0.0" - follow-redirects "^1.0.0" - requires-port "^1.0.0" - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -https-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" - integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= - -https-browserify@~0.0.0: - version "0.0.1" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" - integrity sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI= - -humanize-duration@~3.15.0: - version "3.15.3" - resolved "https://registry.yarnpkg.com/humanize-duration/-/humanize-duration-3.15.3.tgz#600a939bd9d9a16b696e907b3fc08d1a4f15e8c9" - integrity sha512-BMz6w8p3NVa6QP9wDtqUkXfwgBqDaZ5z/np0EYdoWrLqL849Onp6JWMXMhbHtuvO9jUThLN5H1ThRQ8dUWnYkA== - -hyperquest@^2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/hyperquest/-/hyperquest-2.1.3.tgz#523127d7a343181b40bf324e231d2576edf52633" - integrity sha512-fUuDOrB47PqNK/BAMOS13v41UoaqIxqSLHX6CAbOD7OfT+/GCWO1/vPLfTNutOeXrv1ikuaZ3yux+33Z9vh+rw== - dependencies: - buffer-from "^0.1.1" - duplexer2 "~0.0.2" - through2 "~0.6.3" - -iconv-lite@0.4.23: - version "0.4.23" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" - integrity sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -iconv-lite@^0.4.4: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -ieee754@^1.1.4: - version "1.1.12" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b" - integrity sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA== - -ignore-walk@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" - integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ== - dependencies: - minimatch "^3.0.4" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= - -indexof@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" - integrity sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10= - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -inherits@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" - integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= - -ini@~1.3.0, ini@~1.3.3: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== - -inline-source-map@~0.6.0: - version "0.6.2" - resolved "https://registry.yarnpkg.com/inline-source-map/-/inline-source-map-0.6.2.tgz#f9393471c18a79d1724f863fa38b586370ade2a5" - integrity sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU= - dependencies: - source-map "~0.5.3" - -insert-module-globals@^7.0.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/insert-module-globals/-/insert-module-globals-7.2.0.tgz#ec87e5b42728479e327bd5c5c71611ddfb4752ba" - integrity sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw== - dependencies: - JSONStream "^1.0.3" - acorn-node "^1.5.2" - combine-source-map "^0.8.0" - concat-stream "^1.6.1" - is-buffer "^1.1.0" - path-is-absolute "^1.0.1" - process "~0.11.0" - through2 "^2.0.0" - undeclared-identifiers "^1.1.2" - xtend "^4.0.0" - -into-stream@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6" - integrity sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY= - dependencies: - from2 "^2.1.1" - p-is-promise "^1.1.0" - -invariant@^2.2.2: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== - dependencies: - loose-envify "^1.0.0" - -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= - -ipaddr.js@1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.8.0.tgz#eaa33d6ddd7ace8f7f6fe0c9ca0440e706738b1e" - integrity sha1-6qM9bd16zo9/b+DJygRA5wZzix4= - -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== - dependencies: - kind-of "^6.0.0" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= - -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= - dependencies: - binary-extensions "^1.0.0" - -is-buffer@^1.1.0, is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-builtin-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" - integrity sha1-VAVy0096wxGfj3bDDLwbHgN6/74= - dependencies: - builtin-modules "^1.0.0" - -is-callable@^1.1.3, is-callable@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" - integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== - -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== - dependencies: - kind-of "^6.0.0" - -is-date-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" - integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY= - -is-deflate@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-deflate/-/is-deflate-1.0.0.tgz#c862901c3c161fb09dac7cdc7e784f80e98f2f14" - integrity sha1-yGKQHDwWH7CdrHzcfnhPgOmPLxQ= - -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - -is-dotfile@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" - integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE= - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ= - dependencies: - is-primitive "^2.0.0" - -is-error@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/is-error/-/is-error-2.2.1.tgz#684a96d84076577c98f4cdb40c6d26a5123bf19c" - integrity sha1-aEqW2EB2V3yY9M20DG0mpRI78Zw= - -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA= - -is-extglob@^2.1.0, is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - -is-finite@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" - integrity sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko= - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM= - dependencies: - is-extglob "^1.0.0" - -is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" - integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= - dependencies: - is-extglob "^2.1.0" - -is-glob@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" - integrity sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A= - dependencies: - is-extglob "^2.1.1" - -is-gzip@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-gzip/-/is-gzip-1.0.0.tgz#6ca8b07b99c77998025900e555ced8ed80879a83" - integrity sha1-bKiwe5nHeZgCWQDlVc7Y7YCHmoM= - -is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= - dependencies: - kind-of "^3.0.2" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= - dependencies: - kind-of "^3.0.2" - -is-number@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" - integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== - -is-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470" - integrity sha1-iVJojF7C/9awPsyF52ngKQMINHA= - -is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= - -is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q= - -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" - integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= - -is-regex@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" - integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE= - dependencies: - has "^1.0.1" - -is-retry-allowed@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" - integrity sha1-EaBgVotnM5REAz0BJaYaINVk+zQ= - -is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= - -is-symbol@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" - integrity sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw== - dependencies: - has-symbols "^1.0.0" - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= - -is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= - -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -isarray@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.4.tgz#38e7bcbb0f3ba1b7933c86ba1894ddfc3781bbb7" - integrity sha512-GMxXOiUirWg1xTKRipM0Ek07rX+ubx4nNVElTJdNLYmNO/2YrDkgJGw9CljXn+r4EWiDQg/8lsRdHyg2PJuUaA== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= - -istanbul-lib-coverage@^1.1.2, istanbul-lib-coverage@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0" - integrity sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ== - -istanbul-lib-hook@^1.1.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.2.tgz#bc6bf07f12a641fbf1c85391d0daa8f0aea6bf86" - integrity sha512-/Jmq7Y1VeHnZEQ3TL10VHyb564mn6VrQXHchON9Jf/AEcmQ3ZIiyD1BVzNOKTZf/G3gE+kiGK6SmpF9y3qGPLw== - dependencies: - append-transform "^0.4.0" - -istanbul-lib-instrument@^1.10.0, istanbul-lib-instrument@^1.8.0: - version "1.10.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz#1f55ed10ac3c47f2bdddd5307935126754d0a9ca" - integrity sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A== - dependencies: - babel-generator "^6.18.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - babylon "^6.18.0" - istanbul-lib-coverage "^1.2.1" - semver "^5.3.0" - -istanbul-lib-report@^1.1.3: - version "1.1.5" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz#f2a657fc6282f96170aaf281eb30a458f7f4170c" - integrity sha512-UsYfRMoi6QO/doUshYNqcKJqVmFe9w51GZz8BS3WB0lYxAllQYklka2wP9+dGZeHYaWIdcXUx8JGdbqaoXRXzw== - dependencies: - istanbul-lib-coverage "^1.2.1" - mkdirp "^0.5.1" - path-parse "^1.0.5" - supports-color "^3.1.2" - -istanbul-lib-source-maps@^1.2.3: - version "1.2.6" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.6.tgz#37b9ff661580f8fca11232752ee42e08c6675d8f" - integrity sha512-TtbsY5GIHgbMsMiRw35YBHGpZ1DVFEO19vxxeiDMYaeOFOCzfnYVxvl6pOUIZR4dtPhAGpSMup8OyF8ubsaqEg== - dependencies: - debug "^3.1.0" - istanbul-lib-coverage "^1.2.1" - mkdirp "^0.5.1" - rimraf "^2.6.1" - source-map "^0.5.3" - -istanbul-reports@^1.4.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.5.1.tgz#97e4dbf3b515e8c484caea15d6524eebd3ff4e1a" - integrity sha512-+cfoZ0UXzWjhAdzosCPP3AN8vvef8XDkWtTfgaN+7L3YTpNYITnCaEkceo5SEYy644VkHka/P1FvkWvrG/rrJw== - dependencies: - handlebars "^4.0.3" - -isurl@^1.0.0-alpha5: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" - integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== - dependencies: - has-to-string-tag-x "^1.2.0" - is-object "^1.0.1" - -jetpack-id@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/jetpack-id/-/jetpack-id-1.0.0.tgz#2cf9fbae46d8074fc16b7de0071c8efebca473a6" - integrity sha1-LPn7rkbYB0/Ba33gBxyO/rykc6Y= - -js-levenshtein@^1.1.3: - version "1.1.4" - resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.4.tgz#3a56e3cbf589ca0081eb22cd9ba0b1290a16d26e" - integrity sha512-PxfGzSs0ztShKrUYPIn5r0MtyAhYcCwmndozzpz8YObbPnD1jFxzlBGbRnX2mIu6Z13xN6+PTu05TQFnZFlzow== - -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= - -js-yaml@^3.11.0, js-yaml@^3.2.7, js-yaml@^3.3.1: - version "3.12.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" - integrity sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= - -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= - -json-buffer@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" - integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= - -json-schema-traverse@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" - integrity sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A= - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= - -json-stable-stringify@~0.0.0: - version "0.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz#611c23e814db375527df851193db59dd2af27f45" - integrity sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U= - dependencies: - jsonify "~0.0.0" - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - -json5@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850" - integrity sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ== - dependencies: - minimist "^1.2.0" - -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= - optionalDependencies: - graceful-fs "^4.1.6" - -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= - -jsonparse@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" - integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - -keyv@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373" - integrity sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA== - dependencies: - json-buffer "3.0.0" - -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= - dependencies: - is-buffer "^1.1.5" - -kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" - integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== - -labeled-stream-splicer@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/labeled-stream-splicer/-/labeled-stream-splicer-2.0.1.tgz#9cffa32fd99e1612fd1d86a8db962416d5292926" - integrity sha512-MC94mHZRvJ3LfykJlTUipBqenZz1pacOZEMhhQ8dMGcDHs0SBE5GbsavUXV7YtP3icBW17W0Zy1I0lfASmo9Pg== - dependencies: - inherits "^2.0.1" - isarray "^2.0.4" - stream-splicer "^2.0.0" - -lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - integrity sha1-odePw6UEdMuAhF07O24dpJpEbo4= - -lazystream@^1.0.0, lazystream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" - integrity sha1-9plf4PggOS9hOWvolGJAe7dxaOQ= - dependencies: - readable-stream "^2.0.5" - -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= - dependencies: - invert-kv "^1.0.0" - -lcov-parse@^0.0.10: - version "0.0.10" - resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" - integrity sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM= - -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - -load-script@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/load-script/-/load-script-1.0.0.tgz#0491939e0bee5643ee494a7e3da3d2bac70c6ca4" - integrity sha1-BJGTngvuVkPuSUp+PaPSuscMbKQ= - -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - -lodash.debounce@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" - integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= - -lodash.memoize@~3.0.3: - version "3.0.4" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-3.0.4.tgz#2dcbd2c287cbc0a55cc42328bd0c736150d53e3f" - integrity sha1-LcvSwofLwKVcxCMovQxzYVDVPj8= - -lodash@4.17.10: - version "4.17.10" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" - integrity sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg== - -lodash@^4.14.0, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.8.0, lodash@~4.17.2, lodash@~4.17.5: - version "4.17.11" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" - integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== - -log-driver@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" - integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg== - -lolex@^2.6.0: - version "2.7.5" - resolved "https://registry.yarnpkg.com/lolex/-/lolex-2.7.5.tgz#113001d56bfc7e02d56e36291cc5c413d1aa0733" - integrity sha512-l9x0+1offnKKIzYVjyXU2SiwhXDLekRzKyhnbyldPHvC7BvLPVpdNUNR2KeMAiCN2D/kLNttZgQD5WjSxuBx3Q== - -longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - integrity sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc= - -loose-envify@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -lowercase-keys@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" - integrity sha1-TjNms55/VFfjXxMkvfb4jQv8cwY= - -lowercase-keys@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" - integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== - -lru-cache@^4.0.1: - version "4.1.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= - dependencies: - object-visit "^1.0.0" - -math-random@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac" - integrity sha1-izqsWIuKZuSXXjzepn97sylgH6w= - -md5-hex@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-1.3.0.tgz#d2c4afe983c4370662179b8cad145219135046c4" - integrity sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ= - dependencies: - md5-o-matic "^0.1.1" - -md5-o-matic@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/md5-o-matic/-/md5-o-matic-0.1.1.tgz#822bccd65e117c514fab176b25945d54100a03c3" - integrity sha1-givM1l4RfFFPqxdrJZRdVBAKA8M= - -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= - -mem@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" - integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= - dependencies: - mimic-fn "^1.0.0" - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= - -merge-source-map@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.1.0.tgz#2fdde7e6020939f70906a68f2d7ae685e4c8c646" - integrity sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw== - dependencies: - source-map "^0.6.1" - -methods@^1.1.1, methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= - -micromatch@^2.1.5, micromatch@^2.3.11: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU= - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" - -micromatch@^3.1.10, micromatch@^3.1.4: - version "3.1.10" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.2" - -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - -"mime-db@>= 1.36.0 < 2", mime-db@~1.37.0: - version "1.37.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8" - integrity sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg== - -mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.19: - version "2.1.21" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.21.tgz#28995aa1ecb770742fe6ae7e58f9181c744b3f96" - integrity sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg== - dependencies: - mime-db "~1.37.0" - -mime@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" - integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== - -mime@^1.4.1: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== - -mimic-response@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" - integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== - -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= - -"minimatch@2 || 3", minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - -minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0, minimist@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= - -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= - -minipass@^2.2.0, minipass@^2.2.1, minipass@^2.3.0, minipass@^2.3.4: - version "2.3.5" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" - integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minizlib@^1.1.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" - integrity sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA== - dependencies: - minipass "^2.2.1" - -mixin-deep@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" - integrity sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ== - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= - dependencies: - minimist "0.0.8" - -module-deps@^4.0.8: - version "4.1.1" - resolved "https://registry.yarnpkg.com/module-deps/-/module-deps-4.1.1.tgz#23215833f1da13fd606ccb8087b44852dcb821fd" - integrity sha1-IyFYM/HaE/1gbMuAh7RIUty4If0= - dependencies: - JSONStream "^1.0.3" - browser-resolve "^1.7.0" - cached-path-relative "^1.0.0" - concat-stream "~1.5.0" - defined "^1.0.0" - detective "^4.0.0" - duplexer2 "^0.1.2" - inherits "^2.0.1" - parents "^1.0.0" - readable-stream "^2.0.2" - resolve "^1.1.3" - stream-combiner2 "^1.1.1" - subarg "^1.0.0" - through2 "^2.0.0" - xtend "^4.0.0" - -module-deps@^6.0.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/module-deps/-/module-deps-6.2.0.tgz#d41a2e790245ce319171e4e7c4d8c73993ba3cd5" - integrity sha512-hKPmO06so6bL/ZvqVNVqdTVO8UAYsi3tQWlCa+z9KuWhoN4KDQtb5hcqQQv58qYiDE21wIvnttZEPiDgEbpwbA== - dependencies: - JSONStream "^1.0.3" - browser-resolve "^1.7.0" - cached-path-relative "^1.0.0" - concat-stream "~1.6.0" - defined "^1.0.0" - detective "^5.0.2" - duplexer2 "^0.1.2" - inherits "^2.0.1" - parents "^1.0.0" - readable-stream "^2.0.2" - resolve "^1.4.0" - stream-combiner2 "^1.1.1" - subarg "^1.0.0" - through2 "^2.0.0" - xtend "^4.0.0" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== - -nan@^2.9.2: - version "2.11.1" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.1.tgz#90e22bccb8ca57ea4cd37cc83d3819b52eea6766" - integrity sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA== - -nanomatch@^1.2.9: - version "1.2.13" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" - integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -needle@^2.2.1: - version "2.2.4" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.4.tgz#51931bff82533b1928b7d1d69e01f1b00ffd2a4e" - integrity sha512-HyoqEb4wr/rsoaIDfTH2aVL9nWtQqba2/HvMv+++m8u0dz808MaagKILxtfeSN7QU7nvbQ79zk3vYOJp9zsNEA== - dependencies: - debug "^2.1.2" - iconv-lite "^0.4.4" - sax "^1.2.4" - -negotiator@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" - integrity sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk= - -node-pre-gyp@^0.10.0: - version "0.10.3" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" - integrity sha512-d1xFs+C/IPS8Id0qPTZ4bUT8wWryfR/OzzAFxweG+uLN85oPzyo2Iw6bVlLQ/JOdgNonXLCoRyqDzDWq4iw72A== - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4" - -node-releases@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.1.tgz#8fff8aea1cfcad1fb4205f805149054fbf73cafd" - integrity sha512-2UXrBr6gvaebo5TNF84C66qyJJ6r0kxBObgZIDX3D3/mt1ADKiHux3NJPWisq0wxvJJdkjECH+9IIKYViKj71Q== - dependencies: - semver "^5.3.0" - -nopt@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" - integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= - dependencies: - abbrev "1" - osenv "^0.1.4" - -normalize-package-data@^2.3.2: - version "2.4.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" - integrity sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw== - dependencies: - hosted-git-info "^2.1.4" - is-builtin-module "^1.0.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-path@^2.0.0, normalize-path@^2.0.1, normalize-path@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= - dependencies: - remove-trailing-separator "^1.0.1" - -normalize-url@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6" - integrity sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw== - dependencies: - prepend-http "^2.0.0" - query-string "^5.0.1" - sort-keys "^2.0.0" - -npm-bundled@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.5.tgz#3c1732b7ba936b3a10325aef616467c0ccbcc979" - integrity sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g== - -npm-packlist@^1.1.6: - version "1.1.12" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.12.tgz#22bde2ebc12e72ca482abd67afc51eb49377243a" - integrity sha512-WJKFOVMeAlsU/pjXuqVdzU0WfgtIBCupkEVwn+1Y0ERAbUfWw8R4GjgVbaKnUjRoD2FoQbHOCbOyT5Mbs9Lw4g== - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= - dependencies: - path-key "^2.0.0" - -npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - -nyc@^11.0.0, nyc@^11.7.2: - version "11.9.0" - resolved "https://registry.yarnpkg.com/nyc/-/nyc-11.9.0.tgz#4106e89e8fbe73623a1fc8b6ecb7abaa271ae1e4" - integrity sha512-w8OdJAhXL5izerzZMdqzYKMj/pgHJyY3qEPYBjLLxrhcVoHEY9pU5ENIiZyCgG9OR7x3VcUMoD40o6PtVpfR4g== - dependencies: - archy "^1.0.0" - arrify "^1.0.1" - caching-transform "^1.0.0" - convert-source-map "^1.5.1" - debug-log "^1.0.1" - default-require-extensions "^1.0.0" - find-cache-dir "^0.1.1" - find-up "^2.1.0" - foreground-child "^1.5.3" - glob "^7.0.6" - istanbul-lib-coverage "^1.1.2" - istanbul-lib-hook "^1.1.0" - istanbul-lib-instrument "^1.10.0" - istanbul-lib-report "^1.1.3" - istanbul-lib-source-maps "^1.2.3" - istanbul-reports "^1.4.0" - md5-hex "^1.2.0" - merge-source-map "^1.1.0" - micromatch "^3.1.10" - mkdirp "^0.5.0" - resolve-from "^2.0.0" - rimraf "^2.6.2" - signal-exit "^3.0.1" - spawn-wrap "^1.4.2" - test-exclude "^4.2.0" - yargs "11.1.0" - yargs-parser "^8.0.0" - -oauth-sign@~0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" - integrity sha1-Rqarfwrq2N6unsBWV4C31O/rnUM= - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -object-assign@^4.1.0, object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-inspect@~1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.6.0.tgz#c70b6cbf72f274aab4c34c0c82f5167bf82cf15b" - integrity sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ== - -object-keys@^1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" - integrity sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag== - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= - dependencies: - isobject "^3.0.0" - -object.getownpropertydescriptors@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" - integrity sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY= - dependencies: - define-properties "^1.1.2" - es-abstract "^1.5.1" - -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo= - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - -object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= - dependencies: - isobject "^3.0.1" - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= - dependencies: - ee-first "1.1.1" - -on-headers@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" - integrity sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c= - -once@^1.3.0, once@^1.3.1, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -opener@^1.4.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed" - integrity sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA== - -opener@~1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/opener/-/opener-1.4.3.tgz#5c6da2c5d7e5831e8ffa3964950f8d6674ac90b8" - integrity sha1-XG2ixdflgx6P+jlklQ+NZnSskLg= - -optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - -os-browserify@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.1.2.tgz#49ca0293e0b19590a5f5de10c7f265a617d8fe54" - integrity sha1-ScoCk+CxlZCl9d4Qx/JlphfY/lQ= - -os-browserify@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" - integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= - -os-homedir@^1.0.0, os-homedir@^1.0.1, os-homedir@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= - -os-locale@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" - integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== - dependencies: - execa "^0.7.0" - lcid "^1.0.0" - mem "^1.1.0" - -os-tmpdir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - -osenv@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" - integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - -outpipe@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/outpipe/-/outpipe-1.1.1.tgz#50cf8616365e87e031e29a5ec9339a3da4725fa2" - integrity sha1-UM+GFjZeh+Ax4ppeyTOaPaRyX6I= - dependencies: - shell-quote "^1.4.2" - -output-file-sync@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-2.0.1.tgz#f53118282f5f553c2799541792b723a4c71430c0" - integrity sha512-mDho4qm7WgIXIGf4eYU1RHN2UU5tPfVYVSRwDJw0uTmj35DQUt/eNp19N7v6T3SrR0ESTEf2up2CGO73qI35zQ== - dependencies: - graceful-fs "^4.1.11" - is-plain-obj "^1.1.0" - mkdirp "^0.5.1" - -own-or-env@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/own-or-env/-/own-or-env-1.0.1.tgz#54ce601d3bf78236c5c65633aa1c8ec03f8007e4" - integrity sha512-y8qULRbRAlL6x2+M0vIe7jJbJx/kmUTzYonRAa2ayesR2qWLswninkVyeJe4x3IEXhdgoNodzjQRKAoEs6Fmrw== - dependencies: - own-or "^1.0.0" - -own-or@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/own-or/-/own-or-1.0.0.tgz#4e877fbeda9a2ec8000fbc0bcae39645ee8bf8dc" - integrity sha1-Tod/vtqaLsgAD7wLyuOWRe6L+Nw= - -p-cancelable@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0" - integrity sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ== - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= - -p-is-promise@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" - integrity sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4= - -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= - dependencies: - p-limit "^1.1.0" - -p-timeout@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-2.0.1.tgz#d8dd1979595d2dc0139e1fe46b8b646cb3cdf038" - integrity sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA== - dependencies: - p-finally "^1.0.0" - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - -pako@~0.2.0: - version "0.2.9" - resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" - integrity sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU= - -pako@~1.0.5: - version "1.0.7" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.7.tgz#2473439021b57f1516c82f58be7275ad8ef1bb27" - integrity sha512-3HNK5tW4x8o5mO8RuHZp3Ydw9icZXx0RANAOMzlMzx7LVXhMJ4mo3MOBpzyd7r/+RUu8BmndP47LXT+vzjtWcQ== - -parents@^1.0.0, parents@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parents/-/parents-1.0.1.tgz#fedd4d2bf193a77745fe71e371d73c3307d9c751" - integrity sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E= - dependencies: - path-platform "~0.11.15" - -parse-asn1@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.1.tgz#f6bf293818332bd0dab54efb16087724745e6ca8" - integrity sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw== - dependencies: - asn1.js "^4.0.0" - browserify-aes "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw= - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= - dependencies: - error-ex "^1.2.0" - -parseurl@~1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" - integrity sha1-/CidTtiZMRlGDBViUyYs3I3mW/M= - -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= - -path-browserify@~0.0.0: - version "0.0.1" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" - integrity sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ== - -path-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= - -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= - dependencies: - pinkie-promise "^2.0.0" - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - -path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -path-key@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= - -path-parse@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - -path-platform@~0.11.15: - version "0.11.15" - resolved "https://registry.yarnpkg.com/path-platform/-/path-platform-0.11.15.tgz#e864217f74c36850f0852b78dc7bf7d4a5721bf2" - integrity sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I= - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= - -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -pbkdf2@^3.0.3: - version "3.0.17" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" - integrity sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -peek-stream@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/peek-stream/-/peek-stream-1.1.3.tgz#3b35d84b7ccbbd262fff31dc10da56856ead6d67" - integrity sha512-FhJ+YbOSBb9/rIl2ZeE/QHEsWn7PqNYt8ARAY3kIgNGOk13g9FGyIY6JIl/xB/3TFRVoTv5as0l11weORrTekA== - dependencies: - buffer-from "^1.0.0" - duplexify "^3.5.0" - through2 "^2.0.3" - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= - -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= - -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= - -pkg-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" - integrity sha1-ektQio1bstYp1EcFb/TpyTFM89Q= - dependencies: - find-up "^1.0.0" - -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= - -prepend-http@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" - integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= - -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= - -private@^0.1.6: - version "0.1.8" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" - integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== - -process-nextick-args@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" - integrity sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M= - -process-nextick-args@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" - integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== - -process@~0.11.0: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= - -proxy-addr@~2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93" - integrity sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA== - dependencies: - forwarded "~0.1.2" - ipaddr.js "1.8.0" - -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= - -psl@^1.1.24: - version "1.1.31" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.31.tgz#e9aa86d0101b5b105cbe93ac6b784cd547276184" - integrity sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw== - -public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" - integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - safe-buffer "^5.1.2" - -pump@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/pump/-/pump-1.0.3.tgz#5dfe8311c33bbf6fc18261f9f34702c47c08a954" - integrity sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -pump@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" - integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -pumpify@^1.3.3: - version "1.5.1" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" - integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== - dependencies: - duplexify "^3.6.0" - inherits "^2.0.3" - pump "^2.0.0" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= - -punycode@^1.3.2, punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= - -punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -q@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" - integrity sha1-VXBbzZPF82c1MMLCy8DCs63cKG4= - -qs@6.5.2, qs@~6.5.1, qs@~6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== - -qs@^6.5.1: - version "6.6.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.6.0.tgz#a99c0f69a8d26bf7ef012f871cdabb0aee4424c2" - integrity sha512-KIJqT9jQJDQx5h5uAVPimw6yVg2SekOKu959OCtktD3FjzbpvaPr8i4zzg07DOMz+igA4W/aNM7OV8H37pFYfA== - -query-string@^5.0.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" - integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== - dependencies: - decode-uri-component "^0.2.0" - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" - -querystring-es3@~0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= - -randomatic@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed" - integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw== - dependencies: - is-number "^4.0.0" - kind-of "^6.0.0" - math-random "^1.0.1" - -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80" - integrity sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A== - dependencies: - safe-buffer "^5.1.0" - -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - -range-parser@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= - -raw-body@2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3" - integrity sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw== - dependencies: - bytes "3.0.0" - http-errors "1.6.3" - iconv-lite "0.4.23" - unpipe "1.0.0" - -rc@^1.2.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -read-only-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-only-stream/-/read-only-stream-2.0.0.tgz#2724fd6a8113d73764ac288d4386270c1dbf17f0" - integrity sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A= - dependencies: - readable-stream "^2.0.2" - -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - -"readable-stream@>=1.0.33-1 <1.1.0-0": - version "1.0.34" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" - integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readable-stream@^2, readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" - integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@~1.1.9: - version "1.1.14" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readable-stream@~2.0.0: - version "2.0.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" - integrity sha1-j5A0HmilPMySh4jaz80Rs265t44= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - string_decoder "~0.10.x" - util-deprecate "~1.0.1" - -readdirp@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" - integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== - dependencies: - graceful-fs "^4.1.11" - micromatch "^3.1.10" - readable-stream "^2.0.2" - -regenerate-unicode-properties@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz#107405afcc4a190ec5ed450ecaa00ed0cafa7a4c" - integrity sha512-s5NGghCE4itSlUS+0WUj88G6cfMVMmH8boTPNvABf8od+2dhT9WDlWu8n01raQAJZMOK8Ch6jSexaRO7swd6aw== - dependencies: - regenerate "^1.4.0" - -regenerate@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" - integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== - -regenerator-runtime@^0.11.0, regenerator-runtime@^0.11.1: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== - -regenerator-transform@^0.13.3: - version "0.13.3" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb" - integrity sha512-5ipTrZFSq5vU2YoGoww4uaRVAK4wyYC4TSICibbfEPOruUu8FFP7ErV0BjmbIOEpn3O/k9na9UEdYR/3m7N6uA== - dependencies: - private "^0.1.6" - -regex-cache@^0.4.2: - version "0.4.4" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" - integrity sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ== - dependencies: - is-equal-shallow "^0.1.3" - -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -regexpu-core@^4.1.3, regexpu-core@^4.2.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.4.0.tgz#8d43e0d1266883969720345e70c275ee0aec0d32" - integrity sha512-eDDWElbwwI3K0Lo6CqbQbA6FwgtCz4kYTarrri1okfkRLZAqstU+B3voZBCjg8Fl6iq0gXrJG6MvRgLthfvgOA== - dependencies: - regenerate "^1.4.0" - regenerate-unicode-properties "^7.0.0" - regjsgen "^0.5.0" - regjsparser "^0.6.0" - unicode-match-property-ecmascript "^1.0.4" - unicode-match-property-value-ecmascript "^1.0.2" - -regjsgen@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.0.tgz#a7634dc08f89209c2049adda3525711fb97265dd" - integrity sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA== - -regjsparser@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.0.tgz#f1e6ae8b7da2bae96c99399b868cd6c933a2ba9c" - integrity sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ== - dependencies: - jsesc "~0.5.0" - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= - -repeat-element@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" - integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== - -repeat-string@^1.5.2, repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= - dependencies: - is-finite "^1.0.0" - -request@2.85.0: - version "2.85.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.85.0.tgz#5a03615a47c61420b3eb99b7dba204f83603e1fa" - integrity sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.6.0" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.1" - forever-agent "~0.6.1" - form-data "~2.3.1" - har-validator "~5.0.3" - hawk "~6.0.2" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.17" - oauth-sign "~0.8.2" - performance-now "^2.1.0" - qs "~6.5.1" - safe-buffer "^5.1.1" - stringstream "~0.0.5" - tough-cookie "~2.3.3" - tunnel-agent "^0.6.0" - uuid "^3.1.0" - -request@^2.85.0: - version "2.88.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" - integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.0" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.4.3" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= - -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= - -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= - -resolve-from@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57" - integrity sha1-lICrIOlP+h2egKgEx+oUdhGWa1c= - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= - -resolve@1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= - -resolve@^1.1.3, resolve@^1.1.4, resolve@^1.3.2, resolve@^1.4.0: - version "1.8.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" - integrity sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA== - dependencies: - path-parse "^1.0.5" - -resolve@~1.7.1: - version "1.7.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3" - integrity sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw== - dependencies: - path-parse "^1.0.5" - -responselike@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" - integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= - dependencies: - lowercase-keys "^1.0.0" - -resumer@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" - integrity sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k= - dependencies: - through "~2.3.4" - -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== - -right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - integrity sha1-YTObci/mo1FWiSENJOFMlhSGE+8= - dependencies: - align-text "^0.1.1" - -rimraf@^2.6.1, rimraf@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" - integrity sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w== - dependencies: - glob "^7.0.5" - -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -runnel@~0.5.0: - version "0.5.3" - resolved "https://registry.yarnpkg.com/runnel/-/runnel-0.5.3.tgz#f9362b165a05fc6f5e46e458f77a1f7ecdc0daec" - integrity sha1-+TYrFloF/G9eRuRY93offs3A2uw= - -safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= - dependencies: - ret "~0.1.10" - -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -sauce-browsers@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/sauce-browsers/-/sauce-browsers-2.0.0.tgz#a3ecd9252fd431b499a2df37b30b78fd57136612" - integrity sha512-IW+G/5ceUFRITwSqL9L9Pyg68VJerAGK4Nf1ubiZw5oAVNvH59lpBiHEaDfbr6MyZqUfVGExfihyHmbfbnlV7A== - dependencies: - got "^8.2.0" - -sax@>=0.6.0, sax@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== - -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1: - version "5.6.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" - integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== - -send@0.16.2: - version "0.16.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" - integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw== - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.6.2" - mime "1.4.1" - ms "2.0.0" - on-finished "~2.3.0" - range-parser "~1.2.0" - statuses "~1.4.0" - -serialize-javascript@^1.1.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.5.0.tgz#1aa336162c88a890ddad5384baebc93a655161fe" - integrity sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ== - -serve-static@1.13.2: - version "1.13.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" - integrity sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.2" - send "0.16.2" - -server-destroy@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/server-destroy/-/server-destroy-1.0.1.tgz#f13bf928e42b9c3e79383e61cc3998b5d14e6cdd" - integrity sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0= - -set-blocking@^2.0.0, set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= - -set-value@^0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" - integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE= - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.1" - to-object-path "^0.3.0" - -set-value@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" - integrity sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg== - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== - -sha.js@^2.4.0, sha.js@^2.4.8, sha.js@~2.4.4: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -shasum@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/shasum/-/shasum-1.0.2.tgz#e7012310d8f417f4deb5712150e5678b87ae565f" - integrity sha1-5wEjENj0F/TetXEhUOVni4euVl8= - dependencies: - json-stable-stringify "~0.0.0" - sha.js "~2.4.4" - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - dependencies: - shebang-regex "^1.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - -shell-quote@^1.4.2, shell-quote@^1.6.1, shell-quote@~1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" - integrity sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c= - dependencies: - array-filter "~0.0.0" - array-map "~0.0.0" - array-reduce "~0.0.0" - jsonify "~0.0.0" - -signal-exit@^3.0.0, signal-exit@^3.0.1, signal-exit@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= - -simple-concat@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.0.tgz#7344cbb8b6e26fb27d66b2fc86f9f6d5997521c6" - integrity sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY= - -slash@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" - integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== - -slide@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" - integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^3.1.0" - -sntp@2.x.x: - version "2.1.0" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8" - integrity sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg== - dependencies: - hoek "4.x.x" - -sort-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" - integrity sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg= - dependencies: - is-plain-obj "^1.0.0" - -source-map-cjs@~0.1.31: - version "0.1.32" - resolved "https://registry.yarnpkg.com/source-map-cjs/-/source-map-cjs-0.1.32.tgz#b113f00065b484f4d3a1123ef084046a56228ce7" - integrity sha1-sRPwAGW0hPTToRI+8IQEalYijOc= - -source-map-resolve@^0.5.0: - version "0.5.2" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" - integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== - dependencies: - atob "^2.1.1" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-support@^0.5.5: - version "0.5.9" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f" - integrity sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-url@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= - -source-map@0.5.6: - version "0.5.6" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" - integrity sha1-dc449SvwczxafwwRjYEzSiu19BI= - -source-map@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" - integrity sha1-66T12pwNyZneaAMti092FzZSA2s= - dependencies: - amdefine ">=0.0.4" - -source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1, source-map@~0.5.3: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= - -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -spawn-wrap@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.4.2.tgz#cff58e73a8224617b6561abdc32586ea0c82248c" - integrity sha512-vMwR3OmmDhnxCVxM8M+xO/FtIp6Ju/mNaDfCMMW7FDcLRTPFWUswec4LXJHTJE2hwTI9O0YBfygu4DalFl7Ylg== - dependencies: - foreground-child "^1.5.6" - mkdirp "^0.5.0" - os-homedir "^1.0.1" - rimraf "^2.6.2" - signal-exit "^3.0.2" - which "^1.3.0" - -spdx-correct@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" - integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" - integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== - -spdx-expression-parse@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" - integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz#a59efc09784c2a5bada13cfeaf5c75dd214044d2" - integrity sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg== - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - dependencies: - extend-shallow "^3.0.0" - -split2@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/split2/-/split2-2.2.0.tgz#186b2575bcf83e85b7d18465756238ee4ee42493" - integrity sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw== - dependencies: - through2 "^2.0.2" - -split@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/split/-/split-0.1.2.tgz#f0710744c453d551fc7143ead983da6014e336cc" - integrity sha1-8HEHRMRT1VH8cUPq2YPaYBTjNsw= - dependencies: - through "1" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - -sshpk@^1.7.0: - version "1.15.2" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.15.2.tgz#c946d6bd9b1a39d0e8635763f5242d6ed6dcb629" - integrity sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -stack-generator@^2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/stack-generator/-/stack-generator-2.0.3.tgz#bb74385c67ffc4ccf3c4dee5831832d4e509c8a0" - integrity sha512-kdzGoqrnqsMxOEuXsXyQTmvWXZmG0f3Ql2GDx5NtmZs59sT2Bt9Vdyq0XdtxUi58q/+nxtbF9KOQ9HkV1QznGg== - dependencies: - stackframe "^1.0.4" - -stack-mapper@~0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/stack-mapper/-/stack-mapper-0.2.2.tgz#789029054937b7d47c1b5b67612cbb1e7cfe7071" - integrity sha1-eJApBUk3t9R8G1tnYSy7Hnz+cHE= - dependencies: - array-map "0.0.0" - foreach-shim "~0.1.1" - isarray "0.0.1" - source-map-cjs "~0.1.31" - -stack-utils@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" - integrity sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA== - -stackframe@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.0.4.tgz#357b24a992f9427cba6b545d96a14ed2cbca187b" - integrity sha512-to7oADIniaYwS3MhtCa/sQhrxidCCQiF/qp4/m5iN3ipf0Y7Xlri0f6eG29r08aL7JYl8n32AF3Q5GYBZ7K8vw== - -stacktrace-gps@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/stacktrace-gps/-/stacktrace-gps-3.0.2.tgz#33f8baa4467323ab2bd1816efa279942ba431ccc" - integrity sha512-9o+nWhiz5wFnrB3hBHs2PTyYrS60M1vvpSzHxwxnIbtY2q9Nt51hZvhrG1+2AxD374ecwyS+IUwfkHRE/2zuGg== - dependencies: - source-map "0.5.6" - stackframe "^1.0.4" - -stacktrace-js@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/stacktrace-js/-/stacktrace-js-2.0.0.tgz#776ca646a95bc6c6b2b90776536a7fc72c6ddb58" - integrity sha1-d2ymRqlbxsayuQd2U2p/xyxt21g= - dependencies: - error-stack-parser "^2.0.1" - stack-generator "^2.0.1" - stacktrace-gps "^3.0.1" - -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -"statuses@>= 1.4.0 < 2": - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - -statuses@~1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" - integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew== - -stream-browserify@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" - integrity sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds= - dependencies: - inherits "~2.0.1" - readable-stream "^2.0.2" - -stream-combiner2@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe" - integrity sha1-+02KFCDqNidk4hrUeAOXvry0HL4= - dependencies: - duplexer2 "~0.1.0" - readable-stream "^2.0.2" - -stream-http@^2.0.0: - version "2.8.3" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" - integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw== - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.1" - readable-stream "^2.3.6" - to-arraybuffer "^1.0.0" - xtend "^4.0.0" - -stream-shift@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" - integrity sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI= - -stream-splicer@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/stream-splicer/-/stream-splicer-2.0.0.tgz#1b63be438a133e4b671cc1935197600175910d83" - integrity sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM= - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.2" - -strict-uri-encode@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" - integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= - -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string.prototype.trim@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz#d04de2c89e137f4d7d206f086b5ed2fae6be8cea" - integrity sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo= - dependencies: - define-properties "^1.1.2" - es-abstract "^1.5.0" - function-bind "^1.0.2" - -string_decoder@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" - integrity sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w== - dependencies: - safe-buffer "~5.1.0" - -string_decoder@~0.10.0, string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -stringstream@~0.0.5: - version "0.0.6" - resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.6.tgz#7880225b0d4ad10e30927d167a1d6f2fd3b33a72" - integrity sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA== - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= - dependencies: - is-utf8 "^0.2.0" - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - -subarg@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/subarg/-/subarg-1.0.0.tgz#f62cf17581e996b48fc965699f54c06ae268b8d2" - integrity sha1-9izxdYHplrSPyWVpn1TAauJouNI= - dependencies: - minimist "^1.1.0" - -superagent@~3.8.2: - version "3.8.3" - resolved "https://registry.yarnpkg.com/superagent/-/superagent-3.8.3.tgz#460ea0dbdb7d5b11bc4f78deba565f86a178e128" - integrity sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA== - dependencies: - component-emitter "^1.2.0" - cookiejar "^2.1.0" - debug "^3.1.0" - extend "^3.0.0" - form-data "^2.3.1" - formidable "^1.2.0" - methods "^1.1.1" - mime "^1.4.1" - qs "^6.5.1" - readable-stream "^2.3.5" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= - -supports-color@^3.1.2: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= - dependencies: - has-flag "^1.0.0" - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -syntax-error@^1.1.1: - version "1.4.0" - resolved "https://registry.yarnpkg.com/syntax-error/-/syntax-error-1.4.0.tgz#2d9d4ff5c064acb711594a3e3b95054ad51d907c" - integrity sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w== - dependencies: - acorn-node "^1.2.0" - -tap-finished@~0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/tap-finished/-/tap-finished-0.0.1.tgz#08b5b543fdc04830290c6c561279552e71c4bd67" - integrity sha1-CLW1Q/3ASDApDGxWEnlVLnHEvWc= - dependencies: - tap-parser "~0.2.0" - through "~2.3.4" - -tap-mocha-reporter@^3.0.7: - version "3.0.7" - resolved "https://registry.yarnpkg.com/tap-mocha-reporter/-/tap-mocha-reporter-3.0.7.tgz#235e57893b500861ea5d0924965dadfb2f05eaa7" - integrity sha512-GHVXJ38C3oPRpM3YUc43JlGdpVZYiKeT1fmAd3HH2+J+ZWwsNAUFvRRdoGsXLw9+gU9o+zXpBqhS/oXyRQYwlA== - dependencies: - color-support "^1.1.0" - debug "^2.1.3" - diff "^1.3.2" - escape-string-regexp "^1.0.3" - glob "^7.0.5" - js-yaml "^3.3.1" - tap-parser "^5.1.0" - unicode-length "^1.0.0" - optionalDependencies: - readable-stream "^2.1.5" - -tap-parser@^5.1.0, tap-parser@~5.4.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/tap-parser/-/tap-parser-5.4.0.tgz#6907e89725d7b7fa6ae41ee2c464c3db43188aec" - integrity sha512-BIsIaGqv7uTQgTW1KLTMNPSEQf4zDDPgYOBRdgOfuB+JFOLRBfEu6cLa/KvMvmqggu1FKXDfitjLwsq4827RvA== - dependencies: - events-to-array "^1.0.1" - js-yaml "^3.2.7" - optionalDependencies: - readable-stream "^2" - -tap-parser@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/tap-parser/-/tap-parser-7.0.0.tgz#54db35302fda2c2ccc21954ad3be22b2cba42721" - integrity sha512-05G8/LrzqOOFvZhhAk32wsGiPZ1lfUrl+iV7+OkKgfofZxiceZWMHkKmow71YsyVQ8IvGBP2EjcIjE5gL4l5lA== - dependencies: - events-to-array "^1.0.1" - js-yaml "^3.2.7" - minipass "^2.2.0" - -tap-parser@~0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/tap-parser/-/tap-parser-0.2.1.tgz#8e1e823f2114ee21d032e2f31e4fb642a296f50b" - integrity sha1-jh6CPyEU7iHQMuLzHk+2QqKW9Qs= - dependencies: - split "~0.1.2" - -tap@^11.0.0: - version "11.1.5" - resolved "https://registry.yarnpkg.com/tap/-/tap-11.1.5.tgz#31bbef84c7a2ca78b2f811edf5fabd336c0ec846" - integrity sha512-rOmL7+8U5v7E8ADxFF9SYbGIrqdYPeJy8d6eFMStEXIasJ85tjv8F9M4SSry314eIvqRv/aKf/0YVrkoMj/byQ== - dependencies: - bind-obj-methods "^2.0.0" - bluebird "^3.5.1" - clean-yaml-object "^0.1.0" - color-support "^1.1.0" - coveralls "^3.0.1" - foreground-child "^1.3.3" - fs-exists-cached "^1.0.0" - function-loop "^1.0.1" - glob "^7.0.0" - isexe "^2.0.0" - js-yaml "^3.11.0" - minipass "^2.3.0" - mkdirp "^0.5.1" - nyc "^11.7.2" - opener "^1.4.1" - os-homedir "^1.0.2" - own-or "^1.0.0" - own-or-env "^1.0.1" - rimraf "^2.6.2" - signal-exit "^3.0.0" - source-map-support "^0.5.5" - stack-utils "^1.0.0" - tap-mocha-reporter "^3.0.7" - tap-parser "^7.0.0" - tmatch "^3.1.0" - trivial-deferred "^1.0.1" - tsame "^1.1.2" - write-file-atomic "^2.3.0" - yapool "^1.0.0" - -tape@^4.9.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/tape/-/tape-4.9.1.tgz#1173d7337e040c76fbf42ec86fcabedc9b3805c9" - integrity sha512-6fKIXknLpoe/Jp4rzHKFPpJUHDHDqn8jus99IfPnHIjyz78HYlefTGD3b5EkbQzuLfaEvmfPK3IolLgq2xT3kw== - dependencies: - deep-equal "~1.0.1" - defined "~1.0.0" - for-each "~0.3.3" - function-bind "~1.1.1" - glob "~7.1.2" - has "~1.0.3" - inherits "~2.0.3" - minimist "~1.2.0" - object-inspect "~1.6.0" - resolve "~1.7.1" - resumer "~0.0.0" - string.prototype.trim "~1.1.2" - through "~2.3.8" - -tar-fs@^1.16.2: - version "1.16.3" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-1.16.3.tgz#966a628841da2c4010406a82167cbd5e0c72d509" - integrity sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw== - dependencies: - chownr "^1.0.1" - mkdirp "^0.5.1" - pump "^1.0.0" - tar-stream "^1.1.2" - -tar-stream@^1.1.2, tar-stream@^1.5.0: - version "1.6.2" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" - integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A== - dependencies: - bl "^1.0.0" - buffer-alloc "^1.2.0" - end-of-stream "^1.0.0" - fs-constants "^1.0.0" - readable-stream "^2.3.0" - to-buffer "^1.1.1" - xtend "^4.0.0" - -tar@^4: - version "4.4.8" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" - integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ== - dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.3.4" - minizlib "^1.1.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.2" - -test-exclude@^4.2.0: - version "4.2.3" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.3.tgz#a9a5e64474e4398339245a0a769ad7c2f4a97c20" - integrity sha512-SYbXgY64PT+4GAL2ocI3HwPa4Q4TBKm0cwAVeKOt/Aoc0gSpNRjJX8w0pA1LMKZ3LBmd8pYBqApFNQLII9kavA== - dependencies: - arrify "^1.0.1" - micromatch "^2.3.11" - object-assign "^4.1.0" - read-pkg-up "^1.0.1" - require-main-filename "^1.0.1" - -through2@^2.0.0, through2@^2.0.2, through2@^2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" - integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== - dependencies: - readable-stream "~2.3.6" - xtend "~4.0.1" - -through2@~0.6.3: - version "0.6.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" - integrity sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg= - dependencies: - readable-stream ">=1.0.33-1 <1.1.0-0" - xtend ">=4.0.0 <4.1.0-0" - -through@1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/through/-/through-1.1.2.tgz#344a5425a3773314ca7e0eb6512fbafaf76c0bfe" - integrity sha1-NEpUJaN3MxTKfg62US+6+vdsC/4= - -"through@>=2.2.7 <3", through@^2.3.8, through@~2.3.4, through@~2.3.8: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= - -timed-out@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" - integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= - -timers-browserify@^1.0.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-1.4.2.tgz#c9c58b575be8407375cb5e2462dacee74359f41d" - integrity sha1-ycWLV1voQHN1y14kYtrO50NZ9B0= - dependencies: - process "~0.11.0" - -tmatch@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/tmatch/-/tmatch-3.1.0.tgz#701264fd7582d0144a80c85af3358cca269c71e3" - integrity sha512-W3MSATOCN4pVu2qFxmJLIArSifeSOFqnfx9hiUaVgOmeRoI2NbU7RNga+6G+L8ojlFeQge+ZPCclWyUpQ8UeNQ== - -to-arraybuffer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= - -to-buffer@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" - integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg== - -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= - -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= - dependencies: - kind-of "^3.0.2" - -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -tough-cookie@~2.3.3: - version "2.3.4" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" - integrity sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA== - dependencies: - punycode "^1.4.1" - -tough-cookie@~2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" - integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== - dependencies: - psl "^1.1.24" - punycode "^1.4.1" - -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= - -trivial-deferred@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trivial-deferred/-/trivial-deferred-1.0.1.tgz#376d4d29d951d6368a6f7a0ae85c2f4d5e0658f3" - integrity sha1-N21NKdlR1jaKb3oK6FwvTV4GWPM= - -tsame@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/tsame/-/tsame-1.1.2.tgz#5ce0002acf685942789c63018797a2aa5e6b03c5" - integrity sha512-ovCs24PGjmByVPr9tSIOs/yjUX9sJl0grEmOsj9dZA/UknQkgPOKcUqM84aSCvt9awHuhc/boMzTg3BHFalxWw== - -tty-browserify@0.0.1, tty-browserify@~0.0.0: - version "0.0.1" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811" - integrity sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw== - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= - -type-is@~1.6.16: - version "1.6.16" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" - integrity sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.18" - -typedarray@^0.0.6, typedarray@~0.0.5: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= - -uglify-js@^2.6: - version "2.8.29" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" - integrity sha1-KcVzMUgFe7Th913zW3qcty5qWd0= - dependencies: - source-map "~0.5.1" - yargs "~3.10.0" - optionalDependencies: - uglify-to-browserify "~1.0.0" - -uglify-js@^3.1.4: - version "3.4.9" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3" - integrity sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q== - dependencies: - commander "~2.17.1" - source-map "~0.6.1" - -uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - integrity sha1-bgkk1r2mta/jSeOabWMoUKD4grc= - -umd@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/umd/-/umd-3.0.3.tgz#aa9fe653c42b9097678489c01000acb69f0b26cf" - integrity sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow== - -undeclared-identifiers@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/undeclared-identifiers/-/undeclared-identifiers-1.1.2.tgz#7d850a98887cff4bd0bf64999c014d08ed6d1acc" - integrity sha512-13EaeocO4edF/3JKime9rD7oB6QI8llAGhgn5fKOPyfkJbRb6NFv9pYV6dFEmpa4uRjKeBqLZP8GpuzqHlKDMQ== - dependencies: - acorn-node "^1.3.0" - get-assigned-identifiers "^1.2.0" - simple-concat "^1.0.0" - xtend "^4.0.1" - -unicode-canonical-property-names-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" - integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== - -unicode-length@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/unicode-length/-/unicode-length-1.0.3.tgz#5ada7a7fed51841a418a328cf149478ac8358abb" - integrity sha1-Wtp6f+1RhBpBijKM8UlHisg1irs= - dependencies: - punycode "^1.3.2" - strip-ansi "^3.0.1" - -unicode-match-property-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" - integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg== - dependencies: - unicode-canonical-property-names-ecmascript "^1.0.4" - unicode-property-aliases-ecmascript "^1.0.4" - -unicode-match-property-value-ecmascript@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz#9f1dc76926d6ccf452310564fd834ace059663d4" - integrity sha512-Rx7yODZC1L/T8XKo/2kNzVAQaRE88AaMvI1EF/Xnj3GW2wzN6fop9DDWuFAKUVFH7vozkz26DzP0qyWLKLIVPQ== - -unicode-property-aliases-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz#5a533f31b4317ea76f17d807fa0d116546111dd0" - integrity sha512-2WSLa6OdYd2ng8oqiGIWnJqyFArvhn+5vgx5GTxMbUYjCYKUcuKS62YLFF0R/BDGlB1yzXjQOLtPAfHsgirEpg== - -union-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" - integrity sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ= - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^0.4.3" - -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -upath@^1.0.5: - version "1.1.0" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" - integrity sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw== - -uri-js@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" - integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== - dependencies: - punycode "^2.1.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - -url-parse-lax@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" - integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= - dependencies: - prepend-http "^2.0.0" - -url-to-options@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" - integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= - -url@~0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -use@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - -util-deprecate@^1.0.1, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -util-promisify@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/util-promisify/-/util-promisify-2.1.0.tgz#3c2236476c4d32c5ff3c47002add7c13b9a82a53" - integrity sha1-PCI2R2xNMsX/PEcAKt18E7moKlM= - dependencies: - object.getownpropertydescriptors "^2.0.3" - -util@0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk= - dependencies: - inherits "2.0.1" - -util@~0.10.1: - version "0.10.4" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" - integrity sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A== - dependencies: - inherits "2.0.3" - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= - -uuid@^3.0.0, uuid@^3.1.0, uuid@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== - -validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -vargs@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/vargs/-/vargs-0.1.0.tgz#6b6184da6520cc3204ce1b407cac26d92609ebff" - integrity sha1-a2GE2mUgzDIEzhtAfKwm2SYJ6/8= - -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -vm-browserify@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.0.tgz#bd76d6a23323e2ca8ffa12028dc04559c75f9019" - integrity sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw== - -vm-browserify@~0.0.1: - version "0.0.4" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" - integrity sha1-XX6kW7755Kb/ZflUOOCofDV9WnM= - dependencies: - indexof "0.0.1" - -walk@2.3.9: - version "2.3.9" - resolved "https://registry.yarnpkg.com/walk/-/walk-2.3.9.tgz#31b4db6678f2ae01c39ea9fb8725a9031e558a7b" - integrity sha1-MbTbZnjyrgHDnqn7hyWpAx5Vins= - dependencies: - foreachasync "^3.0.0" - -watchify@~3.11.0: - version "3.11.0" - resolved "https://registry.yarnpkg.com/watchify/-/watchify-3.11.0.tgz#03f1355c643955e7ab8dcbf399f624644221330f" - integrity sha512-7jWG0c3cKKm2hKScnSAMUEUjRJKXUShwMPk0ASVhICycQhwND3IMAdhJYmc1mxxKzBUJTSF5HZizfrKrS6BzkA== - dependencies: - anymatch "^1.3.0" - browserify "^16.1.0" - chokidar "^1.0.0" - defined "^1.0.0" - outpipe "^1.1.0" - through2 "^2.0.0" - xtend "^4.0.0" - -wd@~1.10.0: - version "1.10.3" - resolved "https://registry.yarnpkg.com/wd/-/wd-1.10.3.tgz#395ac7eb58a98e556369f8f8e5f845d91fb152a3" - integrity sha512-ffqqZDtFFLeg5u/4pw2vYKECW+z+vW6vc+7rcqF15uu1/rmw3BydV84BONNc9DIcQ5Z7gQFS/hAuMvj53eVtSg== - dependencies: - archiver "2.1.1" - async "2.0.1" - lodash "4.17.10" - mkdirp "^0.5.1" - q "1.4.1" - request "2.85.0" - vargs "0.1.0" - -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= - -which@^1.2.9, which@^1.3.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -wide-align@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - integrity sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0= - -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - integrity sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8= - -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= - -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -write-file-atomic@^1.1.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-1.3.4.tgz#f807a4f0b1d9e913ae7a48112e6cc3af1991b45f" - integrity sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8= - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - slide "^1.1.5" - -write-file-atomic@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" - integrity sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA== - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - -xml2js@~0.4.4: - version "0.4.19" - resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7" - integrity sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q== - dependencies: - sax ">=0.6.0" - xmlbuilder "~9.0.1" - -xmlbuilder@~9.0.1: - version "9.0.7" - resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" - integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= - -"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= - -y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= - -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= - -yallist@^3.0.0, yallist@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" - integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== - -yamljs@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/yamljs/-/yamljs-0.3.0.tgz#dc060bf267447b39f7304e9b2bfbe8b5a7ddb03b" - integrity sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ== - dependencies: - argparse "^1.0.7" - glob "^7.0.5" - -yapool@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/yapool/-/yapool-1.0.0.tgz#f693f29a315b50d9a9da2646a7a6645c96985b6a" - integrity sha1-9pPymjFbUNmp2iZGp6ZkXJaYW2o= - -yargs-parser@^8.0.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950" - integrity sha512-yP+6QqN8BmrgW2ggLtTbdrOyBNSI7zBa4IykmiV5R1wl1JWNxQvWhMfMdmzIYtKU7oP3OOInY/tl2ov3BDjnJQ== - dependencies: - camelcase "^4.1.0" - -yargs-parser@^9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" - integrity sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc= - dependencies: - camelcase "^4.1.0" - -yargs@11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" - integrity sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A== - dependencies: - cliui "^4.0.0" - decamelize "^1.1.1" - find-up "^2.1.0" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^9.0.2" - -yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - integrity sha1-9+572FfdfB0tOMDnTvvWgdFDH9E= - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" - -zip-stream@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-1.2.0.tgz#a8bc45f4c1b49699c6b90198baacaacdbcd4ba04" - integrity sha1-qLxF9MG0lpnGuQGYuqyqzbzUugQ= - dependencies: - archiver-utils "^1.3.0" - compress-commons "^1.2.0" - lodash "^4.8.0" - readable-stream "^2.0.0" diff --git a/deps/npm/node_modules/readdir-scoped-modules/.travis.yml b/deps/npm/node_modules/readdir-scoped-modules/.travis.yml deleted file mode 100644 index e1bcee1acd90c1..00000000000000 --- a/deps/npm/node_modules/readdir-scoped-modules/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -before_script: npm install -g npm@latest -node_js: - - '0.8' - - '0.10' - - '0.12' - - 'iojs' diff --git a/deps/npm/node_modules/readdir-scoped-modules/package.json b/deps/npm/node_modules/readdir-scoped-modules/package.json index 92afa2d9929e85..08e6e67b29a6bd 100644 --- a/deps/npm/node_modules/readdir-scoped-modules/package.json +++ b/deps/npm/node_modules/readdir-scoped-modules/package.json @@ -1,34 +1,31 @@ { - "_args": [ - [ - "readdir-scoped-modules@1.0.2", - "/Users/rebecca/code/npm" - ] - ], - "_from": "readdir-scoped-modules@1.0.2", - "_id": "readdir-scoped-modules@1.0.2", + "_from": "readdir-scoped-modules@*", + "_id": "readdir-scoped-modules@1.1.0", "_inBundle": false, - "_integrity": "sha1-n6+jfShr5dksuuve4DDcm19AZ0c=", + "_integrity": "sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw==", "_location": "/readdir-scoped-modules", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "readdir-scoped-modules@1.0.2", + "raw": "readdir-scoped-modules@*", "name": "readdir-scoped-modules", "escapedName": "readdir-scoped-modules", - "rawSpec": "1.0.2", + "rawSpec": "*", "saveSpec": null, - "fetchSpec": "1.0.2" + "fetchSpec": "*" }, "_requiredBy": [ + "#USER", "/", + "/npm-registry-mock", "/read-installed", "/read-package-tree" ], - "_resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz", - "_spec": "1.0.2", - "_where": "/Users/rebecca/code/npm", + "_resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz", + "_shasum": "8d45407b4f870a0dcaebc0e28670d18e74514309", + "_spec": "readdir-scoped-modules@*", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -37,12 +34,14 @@ "bugs": { "url": "https://github.com/npm/readdir-scoped-modules/issues" }, + "bundleDependencies": false, "dependencies": { "debuglog": "^1.0.1", "dezalgo": "^1.0.0", "graceful-fs": "^4.1.2", "once": "^1.3.0" }, + "deprecated": false, "description": "Like `fs.readdir` but handling `@org/module` dirs as if they were a single entry.", "devDependencies": { "tap": "^1.2.0" @@ -50,6 +49,9 @@ "directories": { "test": "test" }, + "files": [ + "readdir.js" + ], "homepage": "https://github.com/npm/readdir-scoped-modules", "license": "ISC", "main": "readdir.js", @@ -61,5 +63,5 @@ "scripts": { "test": "tap test/*.js" }, - "version": "1.0.2" + "version": "1.1.0" } diff --git a/deps/npm/node_modules/readdir-scoped-modules/readdir.js b/deps/npm/node_modules/readdir-scoped-modules/readdir.js index efbe5526d8ccf1..806d7870518521 100644 --- a/deps/npm/node_modules/readdir-scoped-modules/readdir.js +++ b/deps/npm/node_modules/readdir-scoped-modules/readdir.js @@ -5,6 +5,7 @@ var path = require ('path') var debug = require ('debuglog') ('rds') module . exports = readdir +readdir.sync = readdirSync function readdir (dir, cb) { fs . readdir (dir, function (er, kids) { @@ -26,6 +27,18 @@ function readdir (dir, cb) { }) } +function readdirSync (dir) { + var kids = fs . readdirSync (dir) + debug ('dir=%j, kids=%j', dir, kids) + var data = readScopesSync (dir, kids) + // Sort for bonus consistency points + data = data . sort (function (a, b) { + return a > b ? 1 : -1 + }) + + return data +} + // Turn [ 'a', '@scope' ] into // ['a', '@scope/foo', '@scope/bar'] function readScopes (root, kids, cb) { @@ -69,3 +82,40 @@ function readScopes (root, kids, cb) { cb (null, kids) } } + +function readScopesSync (root, kids) { + var scopes = kids . filter (function (kid) { + return kid . charAt (0) === '@' + }) + + kids = kids . filter (function (kid) { + return kid . charAt (0) !== '@' + }) + + debug ('scopes=%j', scopes) + + if (scopes . length === 0) + return kids + + var l = scopes . length + scopes . forEach (function (scope) { + var scopedir = path . resolve (root, scope) + debug ('root=%j scope=%j scopedir=%j', root, scope, scopedir) + then (scope, fs . readdirSync (scopedir)) + }) + + function then (scope, scopekids) { + // XXX: Not sure how old this node bug is. Maybe superstition? + scopekids = scopekids . filter (function (scopekid) { + return !(scopekid === '.' || scopekid === '..' || !scopekid) + }) + + kids . push . apply (kids, scopekids . map (function (scopekid) { + return scope + '/' + scopekid + })) + + debug ('scope=%j scopekids=%j kids=%j', scope, scopekids, kids) + } + + return kids +} diff --git a/deps/npm/node_modules/readdir-scoped-modules/test/basic.js b/deps/npm/node_modules/readdir-scoped-modules/test/basic.js deleted file mode 100644 index 715c40d584b57d..00000000000000 --- a/deps/npm/node_modules/readdir-scoped-modules/test/basic.js +++ /dev/null @@ -1,14 +0,0 @@ -var test = require ('tap') . test -var readdir = require ('../readdir.js') - -test ('basic', function (t) { - // should not get {a,b}/{x,y}, but SHOULD get @org/ and @scope children - var expect = [ '@org/x', '@org/y', '@scope/x', '@scope/y', 'a', 'b' ] - - readdir (__dirname + '/fixtures', function (er, kids) { - if (er) - throw er - t.same(kids, expect) - t.end() - }) -}) diff --git a/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/@org/x/.keep b/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/@org/x/.keep deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/@org/y/.keep b/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/@org/y/.keep deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/@scope/x/.keep b/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/@scope/x/.keep deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/@scope/y/.keep b/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/@scope/y/.keep deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/a/x/.keep b/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/a/x/.keep deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/a/y/.keep b/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/a/y/.keep deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/b/x/.keep b/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/b/x/.keep deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/b/y/.keep b/deps/npm/node_modules/readdir-scoped-modules/test/fixtures/b/y/.keep deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/deps/npm/node_modules/require-directory/.jshintrc b/deps/npm/node_modules/require-directory/.jshintrc new file mode 100644 index 00000000000000..e14e4dcbd2975e --- /dev/null +++ b/deps/npm/node_modules/require-directory/.jshintrc @@ -0,0 +1,67 @@ +{ + "maxerr" : 50, + "bitwise" : true, + "camelcase" : true, + "curly" : true, + "eqeqeq" : true, + "forin" : true, + "immed" : true, + "indent" : 2, + "latedef" : true, + "newcap" : true, + "noarg" : true, + "noempty" : true, + "nonew" : true, + "plusplus" : true, + "quotmark" : true, + "undef" : true, + "unused" : true, + "strict" : true, + "trailing" : true, + "maxparams" : false, + "maxdepth" : false, + "maxstatements" : false, + "maxcomplexity" : false, + "maxlen" : false, + "asi" : false, + "boss" : false, + "debug" : false, + "eqnull" : true, + "es5" : false, + "esnext" : false, + "moz" : false, + "evil" : false, + "expr" : true, + "funcscope" : true, + "globalstrict" : true, + "iterator" : true, + "lastsemic" : false, + "laxbreak" : false, + "laxcomma" : false, + "loopfunc" : false, + "multistr" : false, + "proto" : false, + "scripturl" : false, + "smarttabs" : false, + "shadow" : false, + "sub" : false, + "supernew" : false, + "validthis" : false, + "browser" : true, + "couch" : false, + "devel" : true, + "dojo" : false, + "jquery" : false, + "mootools" : false, + "node" : true, + "nonstandard" : false, + "prototypejs" : false, + "rhino" : false, + "worker" : false, + "wsh" : false, + "yui" : false, + "nomen" : true, + "onevar" : true, + "passfail" : false, + "white" : true +} diff --git a/deps/npm/node_modules/sha/.npmignore b/deps/npm/node_modules/sha/.npmignore deleted file mode 100644 index fcfd9449475544..00000000000000 --- a/deps/npm/node_modules/sha/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -test -.gitignore -.travis.yml \ No newline at end of file diff --git a/deps/npm/node_modules/sha/README.md b/deps/npm/node_modules/sha/README.md index a2b300cc0366b6..43742bf4797926 100644 --- a/deps/npm/node_modules/sha/README.md +++ b/deps/npm/node_modules/sha/README.md @@ -3,8 +3,8 @@ Check and get file hashes (using any algorithm) [![Build Status](https://img.shields.io/travis/ForbesLindesay/sha/master.svg)](https://travis-ci.org/ForbesLindesay/sha) -[![Dependency Status](https://img.shields.io/gemnasium/ForbesLindesay/sha.svg)](https://gemnasium.com/ForbesLindesay/sha) -[![NPM version](https://img.shields.io/npm/v/sha.svg)](http://badge.fury.io/js/sha) +[![Dependency Status](https://img.shields.io/david/ForbesLindesay/sha.svg)](https://david-dm.org/ForbesLindesay/sha) +[![NPM version](https://img.shields.io/npm/v/sha.svg)](https://www.npmjs.com/package/sha) ## Installation diff --git a/deps/npm/node_modules/sha/index.js b/deps/npm/node_modules/sha/index.js index 44e7b4b5182734..3aed3e9ccf190a 100644 --- a/deps/npm/node_modules/sha/index.js +++ b/deps/npm/node_modules/sha/index.js @@ -1,6 +1,6 @@ 'use strict' -var Transform = require('stream').Transform || require('readable-stream').Transform +var Transform = require('stream').Transform var crypto = require('crypto') var fs = require('graceful-fs') diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/.travis.yml b/deps/npm/node_modules/sha/node_modules/readable-stream/.travis.yml deleted file mode 100644 index 40992555bf5cc0..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/.travis.yml +++ /dev/null @@ -1,55 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.10' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.11' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.12' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 1 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 2 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 3 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 6 - env: TASK=test - - node_js: 7 - env: TASK=test - - node_js: 8 - env: TASK=test - - node_js: 9 - env: TASK=test -script: "npm run $TASK" -env: - global: - - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= - - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/CONTRIBUTING.md b/deps/npm/node_modules/sha/node_modules/readable-stream/CONTRIBUTING.md deleted file mode 100644 index f478d58dca85b2..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/CONTRIBUTING.md +++ /dev/null @@ -1,38 +0,0 @@ -# Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. - -## Moderation Policy - -The [Node.js Moderation Policy] applies to this WG. - -## Code of Conduct - -The [Node.js Code of Conduct][] applies to this WG. - -[Node.js Code of Conduct]: -https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md -[Node.js Moderation Policy]: -https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/GOVERNANCE.md b/deps/npm/node_modules/sha/node_modules/readable-stream/GOVERNANCE.md deleted file mode 100644 index 16ffb93f24bece..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/GOVERNANCE.md +++ /dev/null @@ -1,136 +0,0 @@ -### Streams Working Group - -The Node.js Streams is jointly governed by a Working Group -(WG) -that is responsible for high-level guidance of the project. - -The WG has final authority over this project including: - -* Technical direction -* Project governance and process (including this policy) -* Contribution policy -* GitHub repository hosting -* Conduct guidelines -* Maintaining the list of additional Collaborators - -For the current list of WG members, see the project -[README.md](./README.md#current-project-team-members). - -### Collaborators - -The readable-stream GitHub repository is -maintained by the WG and additional Collaborators who are added by the -WG on an ongoing basis. - -Individuals making significant and valuable contributions are made -Collaborators and given commit-access to the project. These -individuals are identified by the WG and their addition as -Collaborators is discussed during the WG meeting. - -_Note:_ If you make a significant contribution and are not considered -for commit-access log an issue or contact a WG member directly and it -will be brought up in the next WG meeting. - -Modifications of the contents of the readable-stream repository are -made on -a collaborative basis. Anybody with a GitHub account may propose a -modification via pull request and it will be considered by the project -Collaborators. All pull requests must be reviewed and accepted by a -Collaborator with sufficient expertise who is able to take full -responsibility for the change. In the case of pull requests proposed -by an existing Collaborator, an additional Collaborator is required -for sign-off. Consensus should be sought if additional Collaborators -participate and there is disagreement around a particular -modification. See _Consensus Seeking Process_ below for further detail -on the consensus model used for governance. - -Collaborators may opt to elevate significant or controversial -modifications, or modifications that have not found consensus to the -WG for discussion by assigning the ***WG-agenda*** tag to a pull -request or issue. The WG should serve as the final arbiter where -required. - -For the current list of Collaborators, see the project -[README.md](./README.md#members). - -### WG Membership - -WG seats are not time-limited. There is no fixed size of the WG. -However, the expected target is between 6 and 12, to ensure adequate -coverage of important areas of expertise, balanced with the ability to -make decisions efficiently. - -There is no specific set of requirements or qualifications for WG -membership beyond these rules. - -The WG may add additional members to the WG by unanimous consensus. - -A WG member may be removed from the WG by voluntary resignation, or by -unanimous consensus of all other WG members. - -Changes to WG membership should be posted in the agenda, and may be -suggested as any other agenda item (see "WG Meetings" below). - -If an addition or removal is proposed during a meeting, and the full -WG is not in attendance to participate, then the addition or removal -is added to the agenda for the subsequent meeting. This is to ensure -that all members are given the opportunity to participate in all -membership decisions. If a WG member is unable to attend a meeting -where a planned membership decision is being made, then their consent -is assumed. - -No more than 1/3 of the WG members may be affiliated with the same -employer. If removal or resignation of a WG member, or a change of -employment by a WG member, creates a situation where more than 1/3 of -the WG membership shares an employer, then the situation must be -immediately remedied by the resignation or removal of one or more WG -members affiliated with the over-represented employer(s). - -### WG Meetings - -The WG meets occasionally on a Google Hangout On Air. A designated moderator -approved by the WG runs the meeting. Each meeting should be -published to YouTube. - -Items are added to the WG agenda that are considered contentious or -are modifications of governance, contribution policy, WG membership, -or release process. - -The intention of the agenda is not to approve or review all patches; -that should happen continuously on GitHub and be handled by the larger -group of Collaborators. - -Any community member or contributor can ask that something be added to -the next meeting's agenda by logging a GitHub Issue. Any Collaborator, -WG member or the moderator can add the item to the agenda by adding -the ***WG-agenda*** tag to the issue. - -Prior to each WG meeting the moderator will share the Agenda with -members of the WG. WG members can add any items they like to the -agenda at the beginning of each meeting. The moderator and the WG -cannot veto or remove items. - -The WG may invite persons or representatives from certain projects to -participate in a non-voting capacity. - -The moderator is responsible for summarizing the discussion of each -agenda item and sends it as a pull request after the meeting. - -### Consensus Seeking Process - -The WG follows a -[Consensus -Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) -decision-making model. - -When an agenda item has appeared to reach a consensus the moderator -will ask "Does anyone object?" as a final call for dissent from the -consensus. - -If an agenda item cannot reach a consensus a WG member can call for -either a closing vote or a vote to table the issue to the next -meeting. The call for a vote must be seconded by a majority of the WG -or else the discussion will continue. Simple majority wins. - -Note that changes to WG membership require a majority consensus. See -"WG Membership" above. diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/LICENSE b/deps/npm/node_modules/sha/node_modules/readable-stream/LICENSE deleted file mode 100644 index 2873b3b2e59507..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/README.md b/deps/npm/node_modules/sha/node_modules/readable-stream/README.md deleted file mode 100644 index 23fe3f3e3009a2..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# readable-stream - -***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) - -```bash -npm install --save readable-stream -``` - -***Node-core streams for userland*** - -This package is a mirror of the Streams2 and Streams3 implementations in -Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -# Streams Working Group - -`readable-stream` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -
-## Team Members - -* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> - - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> - - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D -* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> -* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> - - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E -* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/deps/npm/node_modules/sha/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md deleted file mode 100644 index c141a99c26c638..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +++ /dev/null @@ -1,58 +0,0 @@ -# streams WG Meeting 2015-01-30 - -## Links - -* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg -* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 -* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ - -## Agenda - -Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. - -* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) -* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) -* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) -* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) - -## Minutes - -### adopt a charter - -* group: +1's all around - -### What versioning scheme should be adopted? -* group: +1’s 3.0.0 -* domenic+group: pulling in patches from other sources where appropriate -* mikeal: version independently, suggesting versions for io.js -* mikeal+domenic: work with TC to notify in advance of changes -simpler stream creation - -### streamline creation of streams -* sam: streamline creation of streams -* domenic: nice simple solution posted - but, we lose the opportunity to change the model - may not be backwards incompatible (double check keys) - - **action item:** domenic will check - -### remove implicit flowing of streams on(‘data’) -* add isFlowing / isPaused -* mikeal: worrying that we’re documenting polyfill methods – confuses users -* domenic: more reflective API is probably good, with warning labels for users -* new section for mad scientists (reflective stream access) -* calvin: name the “third state” -* mikeal: maybe borrow the name from whatwg? -* domenic: we’re missing the “third state” -* consensus: kind of difficult to name the third state -* mikeal: figure out differences in states / compat -* mathias: always flow on data – eliminates third state - * explore what it breaks - -**action items:** -* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) -* ask rod/build for infrastructure -* **chris**: explore the “flow on data” approach -* add isPaused/isFlowing -* add new docs section -* move isPaused to that section diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/duplex-browser.js b/deps/npm/node_modules/sha/node_modules/readable-stream/duplex-browser.js deleted file mode 100644 index f8b2db83dbe733..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/duplex-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_duplex.js'); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/duplex.js b/deps/npm/node_modules/sha/node_modules/readable-stream/duplex.js deleted file mode 100644 index 46924cbfdf5387..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Duplex diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index a1ca813e5acbd8..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/**/ - -module.exports = Duplex; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -{ - // avoid scope creep, the keys array can then be collected - var keys = objectKeys(Writable.prototype); - for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; - } -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - pna.nextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -Object.defineProperty(Duplex.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined || this._writableState === undefined) { - return false; - } - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - this._writableState.destroyed = value; - } -}); - -Duplex.prototype._destroy = function (err, cb) { - this.push(null); - this.end(); - - pna.nextTick(cb, err); -}; \ No newline at end of file diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index a9c835884828d8..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index bf34ac65e1108f..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,1019 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -module.exports = Readable; - -/**/ -var isArray = require('isarray'); -/**/ - -/**/ -var Duplex; -/**/ - -Readable.ReadableState = ReadableState; - -/**/ -var EE = require('events').EventEmitter; - -var EElistenerCount = function (emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -/**/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var debugUtil = require('util'); -var debug = void 0; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function () {}; -} -/**/ - -var BufferList = require('./internal/streams/BufferList'); -var destroyImpl = require('./internal/streams/destroy'); -var StringDecoder; - -util.inherits(Readable, Stream); - -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; - -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); - - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} - -function ReadableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var readableHwm = options.readableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - - // has it been destroyed - this.destroyed = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - if (!(this instanceof Readable)) return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - if (options) { - if (typeof options.read === 'function') this._read = options.read; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - - Stream.call(this); -} - -Object.defineProperty(Readable.prototype, 'destroyed', { - get: function () { - if (this._readableState === undefined) { - return false; - } - return this._readableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - } -}); - -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; -Readable.prototype._destroy = function (err, cb) { - this.push(null); - cb(err); -}; - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; - } - skipChunkCheck = true; - } - } else { - skipChunkCheck = true; - } - - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; - -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - var state = stream._readableState; - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (addToFront) { - if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); - } else if (state.ended) { - stream.emit('error', new Error('stream.push() after EOF')); - } else { - state.reading = false; - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); - } - } - } else if (!addToFront) { - state.reading = false; - } - } - - return needMoreData(state); -} - -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); - } - maybeReadMore(stream, state); -} - -function chunkInvalid(state, chunk) { - var er; - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); -} - -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 8MB -var MAX_HWM = 0x800000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } - // If we're asking for more than the current hwm, then raise the hwm. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; - // Don't have enough - if (!state.ended) { - state.needReadable = true; - return 0; - } - return state.length; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - - if (n !== 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (!state.reading) n = howMuchToRead(nOrig, state); - } - - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } else { - state.length -= n; - } - - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); - } - - if (ret !== null) this.emit('data', ret); - - return ret; -}; - -function onEofChunk(stream, state) { - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - pna.nextTick(maybeReadMore_, stream, state); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break;else len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - this.emit('error', new Error('_read() is not implemented')); -}; - -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - - // If the user pushes more data while we're writing to dest then we'll end up - // in ondata again. However, we only want to increase awaitDrain once because - // dest will only emit one 'drain' event for the multiple writes. - // => Introduce a guard on increasing awaitDrain. - var increasedAwaitDrain = false; - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - increasedAwaitDrain = false; - var ret = dest.write(chunk); - if (false === ret && !increasedAwaitDrain) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', src._readableState.awaitDrain); - src._readableState.awaitDrain++; - increasedAwaitDrain = true; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); - } - - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function () { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { hasUnpiped: false }; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this, unpipeInfo); - }return this; - } - - // try to find the right one. - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - - dest.emit('unpipe', this, unpipeInfo); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data') { - // Start flowing on next tick if stream isn't explicitly paused - if (this._readableState.flowing !== false) this.resume(); - } else if (ev === 'readable') { - var state = this._readableState; - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.emittedReadable = false; - if (!state.reading) { - pna.nextTick(nReadingNextTick, this); - } else if (state.length) { - emitReadable(this); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - pna.nextTick(resume_, stream, state); - } -} - -function resume_(stream, state) { - if (!state.reading) { - debug('resume read 0'); - stream.read(0); - } - - state.resumeScheduled = false; - state.awaitDrain = 0; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} - -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - while (state.flowing && stream.read() !== null) {} -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var _this = this; - - var state = this._readableState; - var paused = false; - - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); - } - - _this.push(null); - }); - - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - - var ret = _this.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function (method) { - return function () { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - this._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return this; -}; - -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._readableState.highWaterMark; - } -}); - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = fromListPartial(n, state.buffer, state.decoder); - } - - return ret; -} - -// Extracts only enough buffered data to satisfy the amount requested. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromListPartial(n, list, hasStrings) { - var ret; - if (n < list.head.data.length) { - // slice is the same for buffers and strings - ret = list.head.data.slice(0, n); - list.head.data = list.head.data.slice(n); - } else if (n === list.head.data.length) { - // first chunk is a perfect match - ret = list.shift(); - } else { - // result spans more than one buffer - ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); - } - return ret; -} - -// Copies a specified amount of characters from the list of buffered data -// chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBufferString(n, list) { - var p = list.head; - var c = 1; - var ret = p.data; - n -= ret.length; - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = str.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -// Copies a specified amount of bytes from the list of buffered data chunks. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function copyFromBuffer(n, list) { - var ret = Buffer.allocUnsafe(n); - var p = list.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) list.head = p.next;else list.head = list.tail = null; - } else { - list.head = p; - p.data = buf.slice(nb); - } - break; - } - ++c; - } - list.length -= c; - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - pna.nextTick(endReadableNT, state, stream); - } -} - -function endReadableNT(state, stream) { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } -} - -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 5d1f8b876d98c7..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -util.inherits(Transform, Duplex); - -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) { - return this.emit('error', new Error('write callback called multiple times')); - } - - ts.writechunk = null; - ts.writecb = null; - - if (data != null) // single equals check for both `null` and `undefined` - this.push(data); - - cb(er); - - var rs = this._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); - } -} - -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - - Duplex.call(this, options); - - this._transformState = { - afterTransform: afterTransform.bind(this), - needTransform: false, - transforming: false, - writecb: null, - writechunk: null, - writeencoding: null - }; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - - if (typeof options.flush === 'function') this._flush = options.flush; - } - - // When the writable side finishes, then flush out anything remaining. - this.on('prefinish', prefinish); -} - -function prefinish() { - var _this = this; - - if (typeof this._flush === 'function') { - this._flush(function (er, data) { - done(_this, er, data); - }); - } else { - done(this, null, null); - } -} - -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - throw new Error('_transform() is not implemented'); -}; - -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - -Transform.prototype._destroy = function (err, cb) { - var _this2 = this; - - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - _this2.emit('close'); - }); -}; - -function done(stream, er, data) { - if (er) return stream.emit('error', er); - - if (data != null) // single equals check for both `null` and `undefined` - stream.push(data); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); - - if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); - - return stream.push(null); -} \ No newline at end of file diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index b3f4e85a2f6e35..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,687 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -module.exports = Writable; - -/* */ -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* */ - -/**/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; -/**/ - -/**/ -var Duplex; -/**/ - -Writable.WritableState = WritableState; - -/**/ -var util = require('core-util-is'); -util.inherits = require('inherits'); -/**/ - -/**/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -/**/ - -var Buffer = require('safe-buffer').Buffer; -var OurUint8Array = global.Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ - -var destroyImpl = require('./internal/streams/destroy'); - -util.inherits(Writable, Stream); - -function nop() {} - -function WritableState(options, stream) { - Duplex = Duplex || require('./_stream_duplex'); - - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - var isDuplex = stream instanceof Duplex; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var writableHwm = options.writableHighWaterMark; - var defaultHwm = this.objectMode ? 16 : 16 * 1024; - - if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; - - // cast to ints. - this.highWaterMark = Math.floor(this.highWaterMark); - - // if _final has been called - this.finalCalled = false; - - // drain event flag. - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // has it been destroyed - this.destroyed = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // count buffered requests - this.bufferedRequestCount = 0; - - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} - -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; - -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function () { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); - -// Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. -var realHasInstance; -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function (object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function (object) { - return object instanceof this; - }; -} - -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { - return new Writable(options); - } - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - if (options) { - if (typeof options.write === 'function') this._write = options.write; - - if (typeof options.writev === 'function') this._writev = options.writev; - - if (typeof options.destroy === 'function') this._destroy = options.destroy; - - if (typeof options.final === 'function') this._final = options.final; - } - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe, not readable')); -}; - -function writeAfterEnd(stream, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - pna.nextTick(cb, er); -} - -// Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. -function validChunk(stream, state, chunk, cb) { - var valid = true; - var er = false; - - if (chunk === null) { - er = new TypeError('May not write null values to stream'); - } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - if (er) { - stream.emit('error', er); - pna.nextTick(cb, er); - valid = false; - } - return valid; -} - -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - var isBuf = !state.objectMode && _isUint8Array(chunk); - - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - - if (typeof cb !== 'function') cb = nop; - - if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function () { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function () { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; - -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - return chunk; -} - -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function () { - return this._writableState.highWaterMark; - } -}); - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - pna.nextTick(cb, er); - // this can emit finish, and it will always happen - // after error - pna.nextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - stream.emit('error', er); - // this can emit finish, but finish must - // always follow error - finishMaybe(stream, state); - } -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state); - - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - - if (sync) { - /**/ - asyncWrite(afterWrite, stream, state, finished, cb); - /**/ - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - - var count = 0; - var allBuffers = true; - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - buffer.allBuffers = allBuffers; - - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - - if (entry === null) state.lastBufferedRequest = null; - } - - state.bufferedRequest = entry; - state.bufferProcessing = false; -} - -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new Error('_write() is not implemented')); -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) endWritable(this, state, cb); -}; - -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - if (err) { - stream.emit('error', err); - } - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); -} -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function') { - state.pendingcb++; - state.finalCalled = true; - pna.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } -} - -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - prefinish(stream, state); - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - } - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} - -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = corkReq; - } else { - state.corkedRequestsFree = corkReq; - } -} - -Object.defineProperty(Writable.prototype, 'destroyed', { - get: function () { - if (this._writableState === undefined) { - return false; - } - return this._writableState.destroyed; - }, - set: function (value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._writableState.destroyed = value; - } -}); - -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; -Writable.prototype._destroy = function (err, cb) { - this.end(); - cb(err); -}; \ No newline at end of file diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/BufferList.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/BufferList.js deleted file mode 100644 index aefc68bd90b9c2..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/BufferList.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var Buffer = require('safe-buffer').Buffer; -var util = require('util'); - -function copyBuffer(src, target, offset) { - src.copy(target, offset); -} - -module.exports = function () { - function BufferList() { - _classCallCheck(this, BufferList); - - this.head = null; - this.tail = null; - this.length = 0; - } - - BufferList.prototype.push = function push(v) { - var entry = { data: v, next: null }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - }; - - BufferList.prototype.unshift = function unshift(v) { - var entry = { data: v, next: this.head }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; - }; - - BufferList.prototype.shift = function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; - }; - - BufferList.prototype.clear = function clear() { - this.head = this.tail = null; - this.length = 0; - }; - - BufferList.prototype.join = function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - while (p = p.next) { - ret += s + p.data; - }return ret; - }; - - BufferList.prototype.concat = function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - if (this.length === 1) return this.head.data; - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - return ret; - }; - - return BufferList; -}(); - -if (util && util.inspect && util.inspect.custom) { - module.exports.prototype[util.inspect.custom] = function () { - var obj = util.inspect({ length: this.length }); - return this.constructor.name + ' ' + obj; - }; -} \ No newline at end of file diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/destroy.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/destroy.js deleted file mode 100644 index 5a0a0d88cec6f3..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/destroy.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -/**/ - -var pna = require('process-nextick-args'); -/**/ - -// undocumented cb() API, needed for core, not for public API -function destroy(err, cb) { - var _this = this; - - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { - pna.nextTick(emitErrorNT, this, err); - } - return this; - } - - // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - if (this._readableState) { - this._readableState.destroyed = true; - } - - // if this is a duplex stream mark the writable part as destroyed as well - if (this._writableState) { - this._writableState.destroyed = true; - } - - this._destroy(err || null, function (err) { - if (!cb && err) { - pna.nextTick(emitErrorNT, _this, err); - if (_this._writableState) { - _this._writableState.errorEmitted = true; - } - } else if (cb) { - cb(err); - } - }); - - return this; -} - -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; - } -} - -function emitErrorNT(self, err) { - self.emit('error', err); -} - -module.exports = { - destroy: destroy, - undestroy: undestroy -}; \ No newline at end of file diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream-browser.js deleted file mode 100644 index 9332a3fdae7060..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('events').EventEmitter; diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream.js b/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream.js deleted file mode 100644 index ce2ad5b6ee57f4..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/lib/internal/streams/stream.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('stream'); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/package.json b/deps/npm/node_modules/sha/node_modules/readable-stream/package.json deleted file mode 100644 index 3f5e9beb37c601..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_from": "readable-stream@^2.0.2", - "_id": "readable-stream@2.3.6", - "_inBundle": false, - "_integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "_location": "/sha/readable-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "readable-stream@^2.0.2", - "name": "readable-stream", - "escapedName": "readable-stream", - "rawSpec": "^2.0.2", - "saveSpec": null, - "fetchSpec": "^2.0.2" - }, - "_requiredBy": [ - "/sha" - ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "_shasum": "b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf", - "_spec": "readable-stream@^2.0.2", - "_where": "/Users/aeschright/code/cli/node_modules/sha", - "browser": { - "util": false, - "./readable.js": "./readable-browser.js", - "./writable.js": "./writable-browser.js", - "./duplex.js": "./duplex-browser.js", - "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" - }, - "bugs": { - "url": "https://github.com/nodejs/readable-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "deprecated": false, - "description": "Streams3, a user-land copy of the stream library from Node.js", - "devDependencies": { - "assert": "^1.4.0", - "babel-polyfill": "^6.9.1", - "buffer": "^4.9.0", - "lolex": "^2.3.2", - "nyc": "^6.4.0", - "tap": "^0.7.0", - "tape": "^4.8.0" - }, - "homepage": "https://github.com/nodejs/readable-stream#readme", - "keywords": [ - "readable", - "stream", - "pipe" - ], - "license": "MIT", - "main": "readable.js", - "name": "readable-stream", - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "cover": "nyc npm test", - "report": "nyc report --reporter=lcov", - "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js" - }, - "version": "2.3.6" -} diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/passthrough.js b/deps/npm/node_modules/sha/node_modules/readable-stream/passthrough.js deleted file mode 100644 index ffd791d7ff275a..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').PassThrough diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/readable-browser.js b/deps/npm/node_modules/sha/node_modules/readable-stream/readable-browser.js deleted file mode 100644 index e50372592ee6c6..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/readable-browser.js +++ /dev/null @@ -1,7 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/readable.js b/deps/npm/node_modules/sha/node_modules/readable-stream/readable.js deleted file mode 100644 index ec89ec53306497..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,19 +0,0 @@ -var Stream = require('stream'); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream; - exports = module.exports = Stream.Readable; - exports.Readable = Stream.Readable; - exports.Writable = Stream.Writable; - exports.Duplex = Stream.Duplex; - exports.Transform = Stream.Transform; - exports.PassThrough = Stream.PassThrough; - exports.Stream = Stream; -} else { - exports = module.exports = require('./lib/_stream_readable.js'); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = require('./lib/_stream_writable.js'); - exports.Duplex = require('./lib/_stream_duplex.js'); - exports.Transform = require('./lib/_stream_transform.js'); - exports.PassThrough = require('./lib/_stream_passthrough.js'); -} diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/transform.js b/deps/npm/node_modules/sha/node_modules/readable-stream/transform.js deleted file mode 100644 index b1baba26da03dc..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./readable').Transform diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/writable-browser.js b/deps/npm/node_modules/sha/node_modules/readable-stream/writable-browser.js deleted file mode 100644 index ebdde6a85dcb19..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/writable-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/_stream_writable.js'); diff --git a/deps/npm/node_modules/sha/node_modules/readable-stream/writable.js b/deps/npm/node_modules/sha/node_modules/readable-stream/writable.js deleted file mode 100644 index 3211a6f80d1abc..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/readable-stream/writable.js +++ /dev/null @@ -1,8 +0,0 @@ -var Stream = require("stream") -var Writable = require("./lib/_stream_writable.js") - -if (process.env.READABLE_STREAM === 'disable') { - module.exports = Stream && Stream.Writable || Writable -} else { - module.exports = Writable -} diff --git a/deps/npm/node_modules/sha/node_modules/string_decoder/.travis.yml b/deps/npm/node_modules/sha/node_modules/string_decoder/.travis.yml deleted file mode 100644 index 3347a725465058..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/string_decoder/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.10' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.11' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.12' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 1 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 2 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 3 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 6 - env: TASK=test - - node_js: 7 - env: TASK=test - - node_js: 8 - env: TASK=test - - node_js: 9 - env: TASK=test diff --git a/deps/npm/node_modules/sha/node_modules/string_decoder/LICENSE b/deps/npm/node_modules/sha/node_modules/string_decoder/LICENSE deleted file mode 100644 index 2873b3b2e59507..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" diff --git a/deps/npm/node_modules/sha/node_modules/string_decoder/README.md b/deps/npm/node_modules/sha/node_modules/string_decoder/README.md deleted file mode 100644 index 5fd58315ed5880..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/string_decoder/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# string_decoder - -***Node-core v8.9.4 string_decoder for userland*** - - -[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) -[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) - - -```bash -npm install --save string_decoder -``` - -***Node-core string_decoder for userland*** - -This package is a mirror of the string_decoder implementation in Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/). - -As of version 1.0.0 **string_decoder** uses semantic versioning. - -## Previous versions - -Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. - -## Update - -The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. - -## Streams Working Group - -`string_decoder` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - -See [readable-stream](https://github.com/nodejs/readable-stream) for -more details. diff --git a/deps/npm/node_modules/sha/node_modules/string_decoder/lib/string_decoder.js b/deps/npm/node_modules/sha/node_modules/string_decoder/lib/string_decoder.js deleted file mode 100644 index 2e89e63f7933e4..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/string_decoder/lib/string_decoder.js +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/**/ - -var Buffer = require('safe-buffer').Buffer; -/**/ - -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; - } -}; - -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; - } - } -}; - -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.StringDecoder = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} - -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; - } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; - -StringDecoder.prototype.end = utf8End; - -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. If an invalid byte is detected, -2 is returned. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return byte >> 6 === 0x02 ? -1 : -2; -} - -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; - } - return nb; - } - return 0; -} - -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'; - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'; - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'; - } - } - } -} - -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; -} - -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} - -// For UTF-8, a replacement character is added when ending on a partial -// character. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'; - return r; -} - -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); -} - -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); - } - return r; -} - -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} \ No newline at end of file diff --git a/deps/npm/node_modules/sha/node_modules/string_decoder/package.json b/deps/npm/node_modules/sha/node_modules/string_decoder/package.json deleted file mode 100644 index 8bd2cfa9ab49da..00000000000000 --- a/deps/npm/node_modules/sha/node_modules/string_decoder/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "string_decoder@~1.1.1", - "_id": "string_decoder@1.1.1", - "_inBundle": false, - "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "_location": "/sha/string_decoder", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "string_decoder@~1.1.1", - "name": "string_decoder", - "escapedName": "string_decoder", - "rawSpec": "~1.1.1", - "saveSpec": null, - "fetchSpec": "~1.1.1" - }, - "_requiredBy": [ - "/sha/readable-stream" - ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8", - "_spec": "string_decoder@~1.1.1", - "_where": "/Users/aeschright/code/cli/node_modules/sha/node_modules/readable-stream", - "bugs": { - "url": "https://github.com/nodejs/string_decoder/issues" - }, - "bundleDependencies": false, - "dependencies": { - "safe-buffer": "~5.1.0" - }, - "deprecated": false, - "description": "The string_decoder module from Node core", - "devDependencies": { - "babel-polyfill": "^6.23.0", - "core-util-is": "^1.0.2", - "inherits": "^2.0.3", - "tap": "~0.4.8" - }, - "homepage": "https://github.com/nodejs/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "main": "lib/string_decoder.js", - "name": "string_decoder", - "repository": { - "type": "git", - "url": "git://github.com/nodejs/string_decoder.git" - }, - "scripts": { - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", - "test": "tap test/parallel/*.js && node test/verify-dependencies" - }, - "version": "1.1.1" -} diff --git a/deps/npm/node_modules/sha/package.json b/deps/npm/node_modules/sha/package.json index 982780769bdfcf..43b78423286e91 100644 --- a/deps/npm/node_modules/sha/package.json +++ b/deps/npm/node_modules/sha/package.json @@ -1,43 +1,43 @@ { - "_args": [ - [ - "sha@2.0.1", - "/Users/rebecca/code/npm" - ] - ], - "_from": "sha@2.0.1", - "_id": "sha@2.0.1", + "_from": "sha@3.0.0", + "_id": "sha@3.0.0", "_inBundle": false, - "_integrity": "sha1-YDCCL70smCOUn49y7WQR7lzyWq4=", + "_integrity": "sha512-DOYnM37cNsLNSGIG/zZWch5CKIRNoLdYUQTQlcgkRkoYIUwDYjqDyye16YcDZg/OPdcbUgTKMjc4SY6TB7ZAPw==", "_location": "/sha", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "sha@2.0.1", + "raw": "sha@3.0.0", "name": "sha", "escapedName": "sha", - "rawSpec": "2.0.1", + "rawSpec": "3.0.0", "saveSpec": null, - "fetchSpec": "2.0.1" + "fetchSpec": "3.0.0" }, "_requiredBy": [ + "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/sha/-/sha-2.0.1.tgz", - "_spec": "2.0.1", - "_where": "/Users/rebecca/code/npm", + "_resolved": "https://registry.npmjs.org/sha/-/sha-3.0.0.tgz", + "_shasum": "b2f2f90af690c16a3a839a6a6c680ea51fedd1ae", + "_spec": "sha@3.0.0", + "_where": "/Users/aeschright/code/cli", "bugs": { "url": "https://github.com/ForbesLindesay/sha/issues" }, + "bundleDependencies": false, "dependencies": { - "graceful-fs": "^4.1.2", - "readable-stream": "^2.0.2" + "graceful-fs": "^4.1.2" }, + "deprecated": false, "description": "Check and get file hashes", "devDependencies": { "mocha": "~1.9.0" }, + "files": [ + "index.js" + ], "homepage": "https://github.com/ForbesLindesay/sha#readme", "license": "(BSD-2-Clause OR MIT)", "name": "sha", @@ -48,5 +48,5 @@ "scripts": { "test": "mocha -R spec" }, - "version": "2.0.1" + "version": "3.0.0" } diff --git a/deps/npm/node_modules/tar/lib/large-numbers.js b/deps/npm/node_modules/tar/lib/large-numbers.js index ff49992630fbee..3e5c99255a494a 100644 --- a/deps/npm/node_modules/tar/lib/large-numbers.js +++ b/deps/npm/node_modules/tar/lib/large-numbers.js @@ -1,12 +1,13 @@ 'use strict' // Tar can encode large and negative numbers using a leading byte of -// 0xff for negative, and 0x80 for positive. The trailing byte in the -// section will always be 0x20, or in some implementations 0x00. -// this module encodes and decodes these things. +// 0xff for negative, and 0x80 for positive. const encode = exports.encode = (num, buf) => { - buf[buf.length - 1] = 0x20 - if (num < 0) + if (!Number.isSafeInteger(num)) + // The number is so large that javascript cannot represent it with integer + // precision. + throw TypeError('cannot encode number outside of javascript safe integer range') + else if (num < 0) encodeNegative(num, buf) else encodePositive(num, buf) @@ -15,13 +16,10 @@ const encode = exports.encode = (num, buf) => { const encodePositive = (num, buf) => { buf[0] = 0x80 - for (var i = buf.length - 2; i > 0; i--) { - if (num === 0) - buf[i] = 0 - else { - buf[i] = num % 0x100 - num = Math.floor(num / 0x100) - } + + for (var i = buf.length; i > 1; i--) { + buf[i-1] = num & 0xff + num = Math.floor(num / 0x100) } } @@ -29,21 +27,16 @@ const encodeNegative = (num, buf) => { buf[0] = 0xff var flipped = false num = num * -1 - for (var i = buf.length - 2; i > 0; i--) { - var byte - if (num === 0) - byte = 0 - else { - byte = num % 0x100 - num = Math.floor(num / 0x100) - } + for (var i = buf.length; i > 1; i--) { + var byte = num & 0xff + num = Math.floor(num / 0x100) if (flipped) - buf[i] = onesComp(byte) + buf[i-1] = onesComp(byte) else if (byte === 0) - buf[i] = 0 + buf[i-1] = 0 else { flipped = true - buf[i] = twosComp(byte) + buf[i-1] = twosComp(byte) } } } @@ -51,8 +44,20 @@ const encodeNegative = (num, buf) => { const parse = exports.parse = (buf) => { var post = buf[buf.length - 1] var pre = buf[0] - return pre === 0x80 ? pos(buf.slice(1, buf.length - 1)) - : twos(buf.slice(1, buf.length - 1)) + var value; + if (pre === 0x80) + value = pos(buf.slice(1, buf.length)) + else if (pre === 0xff) + value = twos(buf) + else + throw TypeError('invalid base256 encoding') + + if (!Number.isSafeInteger(value)) + // The number is so large that javascript cannot represent it with integer + // precision. + throw TypeError('parsed number outside of javascript safe integer range') + + return value } const twos = (buf) => { @@ -71,9 +76,9 @@ const twos = (buf) => { f = twosComp(byte) } if (f !== 0) - sum += f * Math.pow(256, len - i - 1) + sum -= f * Math.pow(256, len - i - 1) } - return sum * -1 + return sum } const pos = (buf) => { diff --git a/deps/npm/node_modules/tar/lib/mkdir.js b/deps/npm/node_modules/tar/lib/mkdir.js index 382329ef513739..c6a154c24fe600 100644 --- a/deps/npm/node_modules/tar/lib/mkdir.js +++ b/deps/npm/node_modules/tar/lib/mkdir.js @@ -69,7 +69,7 @@ const mkdir = module.exports = (dir, opt, cb) => { return done() if (dir === cwd) - return fs.lstat(dir, (er, st) => { + return fs.stat(dir, (er, st) => { if (er || !st.isDirectory()) er = new CwdError(dir, er && er.code || 'ENOTDIR') done(er) @@ -154,7 +154,7 @@ const mkdirSync = module.exports.sync = (dir, opt) => { let ok = false let code = 'ENOTDIR' try { - ok = fs.lstatSync(dir).isDirectory() + ok = fs.statSync(dir).isDirectory() } catch (er) { code = er.code } finally { diff --git a/deps/npm/node_modules/tar/node_modules/chownr/README.md b/deps/npm/node_modules/tar/node_modules/chownr/README.md deleted file mode 100644 index 70e9a54a32b8e0..00000000000000 --- a/deps/npm/node_modules/tar/node_modules/chownr/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Like `chown -R`. - -Takes the same arguments as `fs.chown()` diff --git a/deps/npm/node_modules/tar/node_modules/chownr/chownr.js b/deps/npm/node_modules/tar/node_modules/chownr/chownr.js deleted file mode 100644 index 7e63928827e2c6..00000000000000 --- a/deps/npm/node_modules/tar/node_modules/chownr/chownr.js +++ /dev/null @@ -1,88 +0,0 @@ -'use strict' -const fs = require('fs') -const path = require('path') - -/* istanbul ignore next */ -const LCHOWN = fs.lchown ? 'lchown' : 'chown' -/* istanbul ignore next */ -const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync' - -// fs.readdir could only accept an options object as of node v6 -const nodeVersion = process.version -let readdir = (path, options, cb) => fs.readdir(path, options, cb) -let readdirSync = (path, options) => fs.readdirSync(path, options) -/* istanbul ignore next */ -if (/^v4\./.test(nodeVersion)) - readdir = (path, options, cb) => fs.readdir(path, cb) - -const chownrKid = (p, child, uid, gid, cb) => { - if (typeof child === 'string') - return fs.lstat(path.resolve(p, child), (er, stats) => { - if (er) - return cb(er) - stats.name = child - chownrKid(p, stats, uid, gid, cb) - }) - - if (child.isDirectory()) { - chownr(path.resolve(p, child.name), uid, gid, er => { - if (er) - return cb(er) - fs[LCHOWN](path.resolve(p, child.name), uid, gid, cb) - }) - } else - fs[LCHOWN](path.resolve(p, child.name), uid, gid, cb) -} - - -const chownr = (p, uid, gid, cb) => { - readdir(p, { withFileTypes: true }, (er, children) => { - // any error other than ENOTDIR or ENOTSUP means it's not readable, - // or doesn't exist. give up. - if (er && er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP') - return cb(er) - if (er || !children.length) return fs[LCHOWN](p, uid, gid, cb) - - let len = children.length - let errState = null - const then = er => { - if (errState) return - if (er) return cb(errState = er) - if (-- len === 0) return fs[LCHOWN](p, uid, gid, cb) - } - - children.forEach(child => chownrKid(p, child, uid, gid, then)) - }) -} - -const chownrKidSync = (p, child, uid, gid) => { - if (typeof child === 'string') { - const stats = fs.lstatSync(path.resolve(p, child)) - stats.name = child - child = stats - } - - if (child.isDirectory()) - chownrSync(path.resolve(p, child.name), uid, gid) - - fs[LCHOWNSYNC](path.resolve(p, child.name), uid, gid) -} - -const chownrSync = (p, uid, gid) => { - let children - try { - children = readdirSync(p, { withFileTypes: true }) - } catch (er) { - if (er && er.code === 'ENOTDIR' && er.code !== 'ENOTSUP') - return fs[LCHOWNSYNC](p, uid, gid) - throw er - } - - if (children.length) - children.forEach(child => chownrKidSync(p, child, uid, gid)) - - return fs[LCHOWNSYNC](p, uid, gid) -} - -module.exports = chownr -chownr.sync = chownrSync diff --git a/deps/npm/node_modules/tar/node_modules/chownr/package.json b/deps/npm/node_modules/tar/node_modules/chownr/package.json deleted file mode 100644 index 41e75b7fa66791..00000000000000 --- a/deps/npm/node_modules/tar/node_modules/chownr/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "chownr@^1.1.1", - "_id": "chownr@1.1.1", - "_inBundle": false, - "_integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", - "_location": "/tar/chownr", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "chownr@^1.1.1", - "name": "chownr", - "escapedName": "chownr", - "rawSpec": "^1.1.1", - "saveSpec": null, - "fetchSpec": "^1.1.1" - }, - "_requiredBy": [ - "/tar" - ], - "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", - "_shasum": "54726b8b8fff4df053c42187e801fb4412df1494", - "_spec": "chownr@^1.1.1", - "_where": "/Users/zkat/Documents/code/work/npm/node_modules/tar", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/chownr/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "like `chown -R`", - "devDependencies": { - "mkdirp": "0.3", - "rimraf": "", - "tap": "^12.0.1" - }, - "files": [ - "chownr.js" - ], - "homepage": "https://github.com/isaacs/chownr#readme", - "license": "ISC", - "main": "chownr.js", - "name": "chownr", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/chownr.git" - }, - "scripts": { - "postpublish": "git push origin --all; git push origin --tags", - "postversion": "npm publish", - "preversion": "npm test", - "test": "tap test/*.js --cov" - }, - "version": "1.1.1" -} diff --git a/deps/npm/node_modules/tar/package.json b/deps/npm/node_modules/tar/package.json index 9d96d30ebed6d9..a41cc80aae14d5 100644 --- a/deps/npm/node_modules/tar/package.json +++ b/deps/npm/node_modules/tar/package.json @@ -1,31 +1,31 @@ { - "_from": "tar@4.4.8", - "_id": "tar@4.4.8", + "_from": "tar@latest", + "_id": "tar@4.4.10", "_inBundle": false, - "_integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", + "_integrity": "sha512-g2SVs5QIxvo6OLp0GudTqEf05maawKUxXru104iaayWA09551tFCTI8f1Asb4lPfkBr91k07iL4c11XO3/b0tA==", "_location": "/tar", "_phantomChildren": { "safe-buffer": "5.1.2" }, "_requested": { - "type": "version", + "type": "tag", "registry": true, - "raw": "tar@4.4.8", + "raw": "tar@latest", "name": "tar", "escapedName": "tar", - "rawSpec": "4.4.8", + "rawSpec": "latest", "saveSpec": null, - "fetchSpec": "4.4.8" + "fetchSpec": "latest" }, "_requiredBy": [ "#USER", "/", "/pacote" ], - "_resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", - "_shasum": "b19eec3fde2a96e64666df9fdb40c5ca1bc3747d", - "_spec": "tar@4.4.8", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/tar/-/tar-4.4.10.tgz", + "_shasum": "946b2810b9a5e0b26140cf78bea6b0b0d689eba1", + "_spec": "tar@latest", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -38,11 +38,11 @@ "dependencies": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", + "minipass": "^2.3.5", + "minizlib": "^1.2.1", "mkdirp": "^0.5.0", "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" + "yallist": "^3.0.3" }, "deprecated": false, "description": "tar for node", @@ -51,8 +51,8 @@ "end-of-stream": "^1.4.1", "events-to-array": "^1.1.2", "mutate-fs": "^2.1.1", - "rimraf": "^2.6.2", - "tap": "^12.0.1", + "rimraf": "^2.6.3", + "tap": "^14.2.0", "tar-fs": "^1.16.3", "tar-stream": "^1.6.2" }, @@ -73,10 +73,14 @@ "scripts": { "bench": "for i in benchmarks/*/*.js; do echo $i; for j in {1..5}; do node $i || break; done; done", "genparse": "node scripts/generate-parse-fixtures.js", - "postpublish": "git push origin --all; git push origin --tags", + "postpublish": "git push origin --follow-tags", "postversion": "npm publish", "preversion": "npm test", - "test": "tap test/*.js --100 -J --coverage-report=text -c" + "test": "tap" }, - "version": "4.4.8" + "tap": { + "coverage-map": "map.js", + "check-coverage": true + }, + "version": "4.4.10" } diff --git a/deps/npm/node_modules/through2/.nyc_output/28dcebf0-9c4a-47bb-900e-93fcef37bbe2.json b/deps/npm/node_modules/through2/.nyc_output/28dcebf0-9c4a-47bb-900e-93fcef37bbe2.json new file mode 100644 index 00000000000000..78548b9a4a5f03 --- /dev/null +++ b/deps/npm/node_modules/through2/.nyc_output/28dcebf0-9c4a-47bb-900e-93fcef37bbe2.json @@ -0,0 +1 @@ +{"/Users/rvagg/git/through2/through2.js":{"path":"/Users/rvagg/git/through2/through2.js","statementMap":{"0":{"start":{"line":1,"column":16},"end":{"line":1,"column":52}},"1":{"start":{"line":2,"column":16},"end":{"line":2,"column":40}},"2":{"start":{"line":5,"column":2},"end":{"line":5,"column":28}},"3":{"start":{"line":6,"column":2},"end":{"line":6,"column":25}},"4":{"start":{"line":9,"column":0},"end":{"line":9,"column":41}},"5":{"start":{"line":11,"column":0},"end":{"line":21,"column":1}},"6":{"start":{"line":12,"column":2},"end":{"line":12,"column":29}},"7":{"start":{"line":12,"column":23},"end":{"line":12,"column":29}},"8":{"start":{"line":13,"column":2},"end":{"line":13,"column":24}},"9":{"start":{"line":15,"column":13},"end":{"line":15,"column":17}},"10":{"start":{"line":16,"column":2},"end":{"line":20,"column":4}},"11":{"start":{"line":17,"column":4},"end":{"line":18,"column":29}},"12":{"start":{"line":18,"column":6},"end":{"line":18,"column":29}},"13":{"start":{"line":19,"column":4},"end":{"line":19,"column":22}},"14":{"start":{"line":25,"column":2},"end":{"line":25,"column":23}},"15":{"start":{"line":32,"column":2},"end":{"line":46,"column":3}},"16":{"start":{"line":33,"column":4},"end":{"line":37,"column":5}},"17":{"start":{"line":34,"column":6},"end":{"line":34,"column":27}},"18":{"start":{"line":35,"column":6},"end":{"line":35,"column":25}},"19":{"start":{"line":36,"column":6},"end":{"line":36,"column":20}},"20":{"start":{"line":39,"column":4},"end":{"line":40,"column":22}},"21":{"start":{"line":40,"column":6},"end":{"line":40,"column":22}},"22":{"start":{"line":42,"column":4},"end":{"line":43,"column":18}},"23":{"start":{"line":43,"column":6},"end":{"line":43,"column":18}},"24":{"start":{"line":45,"column":4},"end":{"line":45,"column":47}},"25":{"start":{"line":51,"column":0},"end":{"line":60,"column":2}},"26":{"start":{"line":52,"column":11},"end":{"line":52,"column":44}},"27":{"start":{"line":54,"column":2},"end":{"line":54,"column":27}},"28":{"start":{"line":56,"column":2},"end":{"line":57,"column":21}},"29":{"start":{"line":57,"column":4},"end":{"line":57,"column":21}},"30":{"start":{"line":59,"column":2},"end":{"line":59,"column":11}},"31":{"start":{"line":65,"column":0},"end":{"line":83,"column":2}},"32":{"start":{"line":67,"column":4},"end":{"line":68,"column":35}},"33":{"start":{"line":68,"column":6},"end":{"line":68,"column":35}},"34":{"start":{"line":70,"column":4},"end":{"line":70,"column":55}},"35":{"start":{"line":72,"column":4},"end":{"line":72,"column":49}},"36":{"start":{"line":75,"column":2},"end":{"line":75,"column":42}},"37":{"start":{"line":77,"column":2},"end":{"line":77,"column":43}},"38":{"start":{"line":79,"column":2},"end":{"line":80,"column":37}},"39":{"start":{"line":80,"column":4},"end":{"line":80,"column":37}},"40":{"start":{"line":82,"column":2},"end":{"line":82,"column":17}},"41":{"start":{"line":86,"column":0},"end":{"line":95,"column":2}},"42":{"start":{"line":87,"column":11},"end":{"line":87,"column":100}},"43":{"start":{"line":89,"column":2},"end":{"line":89,"column":27}},"44":{"start":{"line":91,"column":2},"end":{"line":92,"column":21}},"45":{"start":{"line":92,"column":4},"end":{"line":92,"column":21}},"46":{"start":{"line":94,"column":2},"end":{"line":94,"column":11}}},"fnMap":{"0":{"name":"DestroyableTransform","decl":{"start":{"line":4,"column":9},"end":{"line":4,"column":29}},"loc":{"start":{"line":4,"column":36},"end":{"line":7,"column":1}},"line":4},"1":{"name":"(anonymous_1)","decl":{"start":{"line":11,"column":41},"end":{"line":11,"column":42}},"loc":{"start":{"line":11,"column":55},"end":{"line":21,"column":1}},"line":11},"2":{"name":"(anonymous_2)","decl":{"start":{"line":16,"column":19},"end":{"line":16,"column":20}},"loc":{"start":{"line":16,"column":30},"end":{"line":20,"column":3}},"line":16},"3":{"name":"noop","decl":{"start":{"line":24,"column":9},"end":{"line":24,"column":13}},"loc":{"start":{"line":24,"column":37},"end":{"line":26,"column":1}},"line":24},"4":{"name":"through2","decl":{"start":{"line":31,"column":9},"end":{"line":31,"column":17}},"loc":{"start":{"line":31,"column":30},"end":{"line":47,"column":1}},"line":31},"5":{"name":"(anonymous_5)","decl":{"start":{"line":32,"column":9},"end":{"line":32,"column":10}},"loc":{"start":{"line":32,"column":46},"end":{"line":46,"column":3}},"line":32},"6":{"name":"(anonymous_6)","decl":{"start":{"line":51,"column":26},"end":{"line":51,"column":27}},"loc":{"start":{"line":51,"column":63},"end":{"line":60,"column":1}},"line":51},"7":{"name":"(anonymous_7)","decl":{"start":{"line":65,"column":31},"end":{"line":65,"column":32}},"loc":{"start":{"line":65,"column":68},"end":{"line":83,"column":1}},"line":65},"8":{"name":"Through2","decl":{"start":{"line":66,"column":11},"end":{"line":66,"column":19}},"loc":{"start":{"line":66,"column":31},"end":{"line":73,"column":3}},"line":66},"9":{"name":"(anonymous_9)","decl":{"start":{"line":86,"column":30},"end":{"line":86,"column":31}},"loc":{"start":{"line":86,"column":67},"end":{"line":95,"column":1}},"line":86}},"branchMap":{"0":{"loc":{"start":{"line":12,"column":2},"end":{"line":12,"column":29}},"type":"if","locations":[{"start":{"line":12,"column":2},"end":{"line":12,"column":29}},{"start":{"line":12,"column":2},"end":{"line":12,"column":29}}],"line":12},"1":{"loc":{"start":{"line":17,"column":4},"end":{"line":18,"column":29}},"type":"if","locations":[{"start":{"line":17,"column":4},"end":{"line":18,"column":29}},{"start":{"line":17,"column":4},"end":{"line":18,"column":29}}],"line":17},"2":{"loc":{"start":{"line":33,"column":4},"end":{"line":37,"column":5}},"type":"if","locations":[{"start":{"line":33,"column":4},"end":{"line":37,"column":5}},{"start":{"line":33,"column":4},"end":{"line":37,"column":5}}],"line":33},"3":{"loc":{"start":{"line":39,"column":4},"end":{"line":40,"column":22}},"type":"if","locations":[{"start":{"line":39,"column":4},"end":{"line":40,"column":22}},{"start":{"line":39,"column":4},"end":{"line":40,"column":22}}],"line":39},"4":{"loc":{"start":{"line":42,"column":4},"end":{"line":43,"column":18}},"type":"if","locations":[{"start":{"line":42,"column":4},"end":{"line":43,"column":18}},{"start":{"line":42,"column":4},"end":{"line":43,"column":18}}],"line":42},"5":{"loc":{"start":{"line":56,"column":2},"end":{"line":57,"column":21}},"type":"if","locations":[{"start":{"line":56,"column":2},"end":{"line":57,"column":21}},{"start":{"line":56,"column":2},"end":{"line":57,"column":21}}],"line":56},"6":{"loc":{"start":{"line":67,"column":4},"end":{"line":68,"column":35}},"type":"if","locations":[{"start":{"line":67,"column":4},"end":{"line":68,"column":35}},{"start":{"line":67,"column":4},"end":{"line":68,"column":35}}],"line":67},"7":{"loc":{"start":{"line":79,"column":2},"end":{"line":80,"column":37}},"type":"if","locations":[{"start":{"line":79,"column":2},"end":{"line":80,"column":37}},{"start":{"line":79,"column":2},"end":{"line":80,"column":37}}],"line":79},"8":{"loc":{"start":{"line":91,"column":2},"end":{"line":92,"column":21}},"type":"if","locations":[{"start":{"line":91,"column":2},"end":{"line":92,"column":21}},{"start":{"line":91,"column":2},"end":{"line":92,"column":21}}],"line":91}},"s":{"0":1,"1":1,"2":16,"3":16,"4":1,"5":1,"6":3,"7":1,"8":2,"9":2,"10":2,"11":2,"12":0,"13":2,"14":0,"15":3,"16":15,"17":8,"18":8,"19":8,"20":15,"21":2,"22":15,"23":14,"24":15,"25":1,"26":6,"27":6,"28":6,"29":1,"30":6,"31":1,"32":16,"33":7,"34":9,"35":9,"36":8,"37":8,"38":8,"39":0,"40":8,"41":1,"42":1,"43":1,"44":1,"45":0,"46":1},"f":{"0":16,"1":3,"2":2,"3":0,"4":3,"5":15,"6":6,"7":8,"8":16,"9":1},"b":{"0":[1,2],"1":[0,2],"2":[8,7],"3":[2,13],"4":[14,1],"5":[1,5],"6":[7,9],"7":[0,8],"8":[0,1]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"0e6d9c139041e468222a5271346b1d4b44840ea4","contentHash":"e8d9fa1f16cd3fbb5bfdcbe9002323f0"}} \ No newline at end of file diff --git a/deps/npm/node_modules/util-promisify/.npmignore b/deps/npm/node_modules/util-promisify/.npmignore new file mode 100644 index 00000000000000..3c3629e647f5dd --- /dev/null +++ b/deps/npm/node_modules/util-promisify/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/deps/npm/node_modules/util-promisify/.travis.yml b/deps/npm/node_modules/util-promisify/.travis.yml new file mode 100644 index 00000000000000..58e15d6302e26e --- /dev/null +++ b/deps/npm/node_modules/util-promisify/.travis.yml @@ -0,0 +1,8 @@ +sudo: false +language: node_js +node_js: + - 4 + - 5 + - 6 + - 7 + - 8 diff --git a/deps/npm/node_modules/util-promisify/LICENSE b/deps/npm/node_modules/util-promisify/LICENSE new file mode 100644 index 00000000000000..d17113b221c0c3 --- /dev/null +++ b/deps/npm/node_modules/util-promisify/LICENSE @@ -0,0 +1,1072 @@ +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +The Node.js license applies to all parts of Node.js that are not externally +maintained libraries. + +The externally maintained libraries used by Node.js are: + +- c-ares, located at deps/cares, is licensed as follows: + """ + Copyright 1998 by the Massachusetts Institute of Technology. + Copyright (C) 2007-2013 by Daniel Stenberg + + Permission to use, copy, modify, and distribute this + software and its documentation for any purpose and without + fee is hereby granted, provided that the above copyright + notice appear in all copies and that both that copyright + notice and this permission notice appear in supporting + documentation, and that the name of M.I.T. not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + M.I.T. makes no representations about the suitability of + this software for any purpose. It is provided "as is" + without express or implied warranty. + """ + +- HTTP Parser, located at deps/http_parser, is licensed as follows: + """ + http_parser.c is based on src/http/ngx_http_parse.c from NGINX copyright + Igor Sysoev. + + Additional changes are licensed under the same terms as NGINX and + copyright Joyent, Inc. and other Node contributors. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + """ + +- ICU, located at deps/icu-small, is licensed as follows: + """ + COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later) + + Copyright © 1991-2016 Unicode, Inc. All rights reserved. + Distributed under the Terms of Use in http://www.unicode.org/copyright.html + + Permission is hereby granted, free of charge, to any person obtaining + a copy of the Unicode data files and any associated documentation + (the "Data Files") or Unicode software and any associated documentation + (the "Software") to deal in the Data Files or Software + without restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, and/or sell copies of + the Data Files or Software, and to permit persons to whom the Data Files + or Software are furnished to do so, provided that either + (a) this copyright and permission notice appear with all copies + of the Data Files or Software, or + (b) this copyright and permission notice appear in associated + Documentation. + + THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF + ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT OF THIRD PARTY RIGHTS. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS + NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL + DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THE DATA FILES OR SOFTWARE. + + Except as contained in this notice, the name of a copyright holder + shall not be used in advertising or otherwise to promote the sale, + use or other dealings in these Data Files or Software without prior + written authorization of the copyright holder. + + --------------------- + + Third-Party Software Licenses + + This section contains third-party software notices and/or additional + terms for licensed third-party software components included within ICU + libraries. + + 1. ICU License - ICU 1.8.1 to ICU 57.1 + + COPYRIGHT AND PERMISSION NOTICE + + Copyright (c) 1995-2016 International Business Machines Corporation and others + All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, and/or sell copies of the Software, and to permit persons + to whom the Software is furnished to do so, provided that the above + copyright notice(s) and this permission notice appear in all copies of + the Software and that both the above copyright notice(s) and this + permission notice appear in supporting documentation. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT + OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY + SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER + RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF + CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + Except as contained in this notice, the name of a copyright holder + shall not be used in advertising or otherwise to promote the sale, use + or other dealings in this Software without prior written authorization + of the copyright holder. + + All trademarks and registered trademarks mentioned herein are the + property of their respective owners. + + 2. Chinese/Japanese Word Break Dictionary Data (cjdict.txt) + + # The Google Chrome software developed by Google is licensed under + # the BSD license. Other software included in this distribution is + # provided under other licenses, as set forth below. + # + # The BSD License + # http://opensource.org/licenses/bsd-license.php + # Copyright (C) 2006-2008, Google Inc. + # + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are met: + # + # Redistributions of source code must retain the above copyright notice, + # this list of conditions and the following disclaimer. + # Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following + # disclaimer in the documentation and/or other materials provided with + # the distribution. + # Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # + # + # The word list in cjdict.txt are generated by combining three word lists + # listed below with further processing for compound word breaking. The + # frequency is generated with an iterative training against Google web + # corpora. + # + # * Libtabe (Chinese) + # - https://sourceforge.net/project/?group_id=1519 + # - Its license terms and conditions are shown below. + # + # * IPADIC (Japanese) + # - http://chasen.aist-nara.ac.jp/chasen/distribution.html + # - Its license terms and conditions are shown below. + # + # ---------COPYING.libtabe ---- BEGIN-------------------- + # + # /* + # * Copyrighy (c) 1999 TaBE Project. + # * Copyright (c) 1999 Pai-Hsiang Hsiao. + # * All rights reserved. + # * + # * Redistribution and use in source and binary forms, with or without + # * modification, are permitted provided that the following conditions + # * are met: + # * + # * . Redistributions of source code must retain the above copyright + # * notice, this list of conditions and the following disclaimer. + # * . Redistributions in binary form must reproduce the above copyright + # * notice, this list of conditions and the following disclaimer in + # * the documentation and/or other materials provided with the + # * distribution. + # * . Neither the name of the TaBE Project nor the names of its + # * contributors may be used to endorse or promote products derived + # * from this software without specific prior written permission. + # * + # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + # * OF THE POSSIBILITY OF SUCH DAMAGE. + # */ + # + # /* + # * Copyright (c) 1999 Computer Systems and Communication Lab, + # * Institute of Information Science, Academia + # * Sinica. All rights reserved. + # * + # * Redistribution and use in source and binary forms, with or without + # * modification, are permitted provided that the following conditions + # * are met: + # * + # * . Redistributions of source code must retain the above copyright + # * notice, this list of conditions and the following disclaimer. + # * . Redistributions in binary form must reproduce the above copyright + # * notice, this list of conditions and the following disclaimer in + # * the documentation and/or other materials provided with the + # * distribution. + # * . Neither the name of the Computer Systems and Communication Lab + # * nor the names of its contributors may be used to endorse or + # * promote products derived from this software without specific + # * prior written permission. + # * + # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + # * OF THE POSSIBILITY OF SUCH DAMAGE. + # */ + # + # Copyright 1996 Chih-Hao Tsai @ Beckman Institute, + # University of Illinois + # c-tsai4@uiuc.edu http://casper.beckman.uiuc.edu/~c-tsai4 + # + # ---------------COPYING.libtabe-----END-------------------------------- + # + # + # ---------------COPYING.ipadic-----BEGIN------------------------------- + # + # Copyright 2000, 2001, 2002, 2003 Nara Institute of Science + # and Technology. All Rights Reserved. + # + # Use, reproduction, and distribution of this software is permitted. + # Any copy of this software, whether in its original form or modified, + # must include both the above copyright notice and the following + # paragraphs. + # + # Nara Institute of Science and Technology (NAIST), + # the copyright holders, disclaims all warranties with regard to this + # software, including all implied warranties of merchantability and + # fitness, in no event shall NAIST be liable for + # any special, indirect or consequential damages or any damages + # whatsoever resulting from loss of use, data or profits, whether in an + # action of contract, negligence or other tortuous action, arising out + # of or in connection with the use or performance of this software. + # + # A large portion of the dictionary entries + # originate from ICOT Free Software. The following conditions for ICOT + # Free Software applies to the current dictionary as well. + # + # Each User may also freely distribute the Program, whether in its + # original form or modified, to any third party or parties, PROVIDED + # that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear + # on, or be attached to, the Program, which is distributed substantially + # in the same form as set out herein and that such intended + # distribution, if actually made, will neither violate or otherwise + # contravene any of the laws and regulations of the countries having + # jurisdiction over the User or the intended distribution itself. + # + # NO WARRANTY + # + # The program was produced on an experimental basis in the course of the + # research and development conducted during the project and is provided + # to users as so produced on an experimental basis. Accordingly, the + # program is provided without any warranty whatsoever, whether express, + # implied, statutory or otherwise. The term "warranty" used herein + # includes, but is not limited to, any warranty of the quality, + # performance, merchantability and fitness for a particular purpose of + # the program and the nonexistence of any infringement or violation of + # any right of any third party. + # + # Each user of the program will agree and understand, and be deemed to + # have agreed and understood, that there is no warranty whatsoever for + # the program and, accordingly, the entire risk arising from or + # otherwise connected with the program is assumed by the user. + # + # Therefore, neither ICOT, the copyright holder, or any other + # organization that participated in or was otherwise related to the + # development of the program and their respective officials, directors, + # officers and other employees shall be held liable for any and all + # damages, including, without limitation, general, special, incidental + # and consequential damages, arising out of or otherwise in connection + # with the use or inability to use the program or any product, material + # or result produced or otherwise obtained by using the program, + # regardless of whether they have been advised of, or otherwise had + # knowledge of, the possibility of such damages at any time during the + # project or thereafter. Each user will be deemed to have agreed to the + # foregoing by his or her commencement of use of the program. The term + # "use" as used herein includes, but is not limited to, the use, + # modification, copying and distribution of the program and the + # production of secondary products from the program. + # + # In the case where the program, whether in its original form or + # modified, was distributed or delivered to or received by a user from + # any person, organization or entity other than ICOT, unless it makes or + # grants independently of ICOT any specific warranty to the user in + # writing, such person, organization or entity, will also be exempted + # from and not be held liable to the user for any such damages as noted + # above as far as the program is concerned. + # + # ---------------COPYING.ipadic-----END---------------------------------- + + 3. Lao Word Break Dictionary Data (laodict.txt) + + # Copyright (c) 2013 International Business Machines Corporation + # and others. All Rights Reserved. + # + # Project: http://code.google.com/p/lao-dictionary/ + # Dictionary: http://lao-dictionary.googlecode.com/git/Lao-Dictionary.txt + # License: http://lao-dictionary.googlecode.com/git/Lao-Dictionary-LICENSE.txt + # (copied below) + # + # This file is derived from the above dictionary, with slight + # modifications. + # ---------------------------------------------------------------------- + # Copyright (C) 2013 Brian Eugene Wilson, Robert Martin Campbell. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, + # are permitted provided that the following conditions are met: + # + # + # Redistributions of source code must retain the above copyright notice, this + # list of conditions and the following disclaimer. Redistributions in + # binary form must reproduce the above copyright notice, this list of + # conditions and the following disclaimer in the documentation and/or + # other materials provided with the distribution. + # + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + # OF THE POSSIBILITY OF SUCH DAMAGE. + # -------------------------------------------------------------------------- + + 4. Burmese Word Break Dictionary Data (burmesedict.txt) + + # Copyright (c) 2014 International Business Machines Corporation + # and others. All Rights Reserved. + # + # This list is part of a project hosted at: + # github.com/kanyawtech/myanmar-karen-word-lists + # + # -------------------------------------------------------------------------- + # Copyright (c) 2013, LeRoy Benjamin Sharon + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions + # are met: Redistributions of source code must retain the above + # copyright notice, this list of conditions and the following + # disclaimer. Redistributions in binary form must reproduce the + # above copyright notice, this list of conditions and the following + # disclaimer in the documentation and/or other materials provided + # with the distribution. + # + # Neither the name Myanmar Karen Word Lists, nor the names of its + # contributors may be used to endorse or promote products derived + # from this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS + # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + # SUCH DAMAGE. + # -------------------------------------------------------------------------- + + 5. Time Zone Database + + ICU uses the public domain data and code derived from Time Zone + Database for its time zone support. The ownership of the TZ database + is explained in BCP 175: Procedure for Maintaining the Time Zone + Database section 7. + + # 7. Database Ownership + # + # The TZ database itself is not an IETF Contribution or an IETF + # document. Rather it is a pre-existing and regularly updated work + # that is in the public domain, and is intended to remain in the + # public domain. Therefore, BCPs 78 [RFC5378] and 79 [RFC3979] do + # not apply to the TZ Database or contributions that individuals make + # to it. Should any claims be made and substantiated against the TZ + # Database, the organization that is providing the IANA + # Considerations defined in this RFC, under the memorandum of + # understanding with the IETF, currently ICANN, may act in accordance + # with all competent court orders. No ownership claims will be made + # by ICANN or the IETF Trust on the database or the code. Any person + # making a contribution to the database or code waives all rights to + # future claims in that contribution or in the TZ Database. + """ + +- libuv, located at deps/uv, is licensed as follows: + """ + libuv is part of the Node project: http://nodejs.org/ + libuv may be distributed alone under Node's license: + + ==== + + Copyright Joyent, Inc. and other Node contributors. All rights reserved. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + + ==== + + This license applies to all parts of libuv that are not externally + maintained libraries. + + The externally maintained libraries used by libuv are: + + - tree.h (from FreeBSD), copyright Niels Provos. Two clause BSD license. + + - inet_pton and inet_ntop implementations, contained in src/inet.c, are + copyright the Internet Systems Consortium, Inc., and licensed under the ISC + license. + + - stdint-msvc2008.h (from msinttypes), copyright Alexander Chemeris. Three + clause BSD license. + + - pthread-fixes.h, pthread-fixes.c, copyright Google Inc. and Sony Mobile + Communications AB. Three clause BSD license. + + - android-ifaddrs.h, android-ifaddrs.c, copyright Berkeley Software Design + Inc, Kenneth MacKay and Emergya (Cloud4all, FP7/2007-2013, grant agreement + n° 289016). Three clause BSD license. + """ + +- OpenSSL, located at deps/openssl, is licensed as follows: + """ + Copyright (c) 1998-2016 The OpenSSL Project. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. All advertising materials mentioning features or use of this + software must display the following acknowledgment: + "This product includes software developed by the OpenSSL Project + for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + + 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + openssl-core@openssl.org. + + 5. Products derived from this software may not be called "OpenSSL" + nor may "OpenSSL" appear in their names without prior written + permission of the OpenSSL Project. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + "This product includes software developed by the OpenSSL Project + for use in the OpenSSL Toolkit (http://www.openssl.org/)" + + THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + ==================================================================== + + This product includes cryptographic software written by Eric Young + (eay@cryptsoft.com). This product includes software written by Tim + Hudson (tjh@cryptsoft.com). + """ + +- Punycode.js, located at lib/punycode.js, is licensed as follows: + """ + Copyright Mathias Bynens + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + """ + +- V8, located at deps/v8, is licensed as follows: + """ + This license applies to all parts of V8 that are not externally + maintained libraries. The externally maintained libraries used by V8 + are: + + - PCRE test suite, located in + test/mjsunit/third_party/regexp-pcre/regexp-pcre.js. This is based on the + test suite from PCRE-7.3, which is copyrighted by the University + of Cambridge and Google, Inc. The copyright notice and license + are embedded in regexp-pcre.js. + + - Layout tests, located in test/mjsunit/third_party/object-keys. These are + based on layout tests from webkit.org which are copyrighted by + Apple Computer, Inc. and released under a 3-clause BSD license. + + - Strongtalk assembler, the basis of the files assembler-arm-inl.h, + assembler-arm.cc, assembler-arm.h, assembler-ia32-inl.h, + assembler-ia32.cc, assembler-ia32.h, assembler-x64-inl.h, + assembler-x64.cc, assembler-x64.h, assembler-mips-inl.h, + assembler-mips.cc, assembler-mips.h, assembler.cc and assembler.h. + This code is copyrighted by Sun Microsystems Inc. and released + under a 3-clause BSD license. + + - Valgrind client API header, located at third_party/valgrind/valgrind.h + This is release under the BSD license. + + These libraries have their own licenses; we recommend you read them, + as their terms may differ from the terms below. + + Further license information can be found in LICENSE files located in + sub-directories. + + Copyright 2014, the V8 project authors. All rights reserved. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + """ + +- zlib, located at deps/zlib, is licensed as follows: + """ + zlib.h -- interface of the 'zlib' general purpose compression library + version 1.2.8, April 28th, 2013 + + Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + """ + +- npm, located at deps/npm, is licensed as follows: + """ + The npm application + Copyright (c) npm, Inc. and Contributors + Licensed on the terms of The Artistic License 2.0 + + Node package dependencies of the npm application + Copyright (c) their respective copyright owners + Licensed on their respective license terms + + The npm public registry at https://registry.npmjs.org + and the npm website at https://www.npmjs.com + Operated by npm, Inc. + Use governed by terms published on https://www.npmjs.com + + "Node.js" + Trademark Joyent, Inc., https://joyent.com + Neither npm nor npm, Inc. are affiliated with Joyent, Inc. + + The Node.js application + Project of Node Foundation, https://nodejs.org + + The npm Logo + Copyright (c) Mathias Pettersson and Brian Hammond + + "Gubblebum Blocky" typeface + Copyright (c) Tjarda Koster, https://jelloween.deviantart.com + Used with permission + + -------- + + The Artistic License 2.0 + + Copyright (c) 2000-2006, The Perl Foundation. + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + This license establishes the terms under which a given free software + Package may be copied, modified, distributed, and/or redistributed. + The intent is that the Copyright Holder maintains some artistic + control over the development of that Package while still keeping the + Package available as open source and free software. + + You are always permitted to make arrangements wholly outside of this + license directly with the Copyright Holder of a given Package. If the + terms of this license do not permit the full use that you propose to + make of the Package, you should contact the Copyright Holder and seek + a different licensing arrangement. + + Definitions + + "Copyright Holder" means the individual(s) or organization(s) + named in the copyright notice for the entire Package. + + "Contributor" means any party that has contributed code or other + material to the Package, in accordance with the Copyright Holder's + procedures. + + "You" and "your" means any person who would like to copy, + distribute, or modify the Package. + + "Package" means the collection of files distributed by the + Copyright Holder, and derivatives of that collection and/or of + those files. A given Package may consist of either the Standard + Version, or a Modified Version. + + "Distribute" means providing a copy of the Package or making it + accessible to anyone else, or in the case of a company or + organization, to others outside of your company or organization. + + "Distributor Fee" means any fee that you charge for Distributing + this Package or providing support for this Package to another + party. It does not mean licensing fees. + + "Standard Version" refers to the Package if it has not been + modified, or has been modified only in ways explicitly requested + by the Copyright Holder. + + "Modified Version" means the Package, if it has been changed, and + such changes were not explicitly requested by the Copyright + Holder. + + "Original License" means this Artistic License as Distributed with + the Standard Version of the Package, in its current version or as + it may be modified by The Perl Foundation in the future. + + "Source" form means the source code, documentation source, and + configuration files for the Package. + + "Compiled" form means the compiled bytecode, object code, binary, + or any other form resulting from mechanical transformation or + translation of the Source form. + + Permission for Use and Modification Without Distribution + + (1) You are permitted to use the Standard Version and create and use + Modified Versions for any purpose without restriction, provided that + you do not Distribute the Modified Version. + + Permissions for Redistribution of the Standard Version + + (2) You may Distribute verbatim copies of the Source form of the + Standard Version of this Package in any medium without restriction, + either gratis or for a Distributor Fee, provided that you duplicate + all of the original copyright notices and associated disclaimers. At + your discretion, such verbatim copies may or may not include a + Compiled form of the Package. + + (3) You may apply any bug fixes, portability changes, and other + modifications made available from the Copyright Holder. The resulting + Package will still be considered the Standard Version, and as such + will be subject to the Original License. + + Distribution of Modified Versions of the Package as Source + + (4) You may Distribute your Modified Version as Source (either gratis + or for a Distributor Fee, and with or without a Compiled form of the + Modified Version) provided that you clearly document how it differs + from the Standard Version, including, but not limited to, documenting + any non-standard features, executables, or modules, and provided that + you do at least ONE of the following: + + (a) make the Modified Version available to the Copyright Holder + of the Standard Version, under the Original License, so that the + Copyright Holder may include your modifications in the Standard + Version. + + (b) ensure that installation of your Modified Version does not + prevent the user installing or running the Standard Version. In + addition, the Modified Version must bear a name that is different + from the name of the Standard Version. + + (c) allow anyone who receives a copy of the Modified Version to + make the Source form of the Modified Version available to others + under + + (i) the Original License or + + (ii) a license that permits the licensee to freely copy, + modify and redistribute the Modified Version using the same + licensing terms that apply to the copy that the licensee + received, and requires that the Source form of the Modified + Version, and of any works derived from it, be made freely + available in that license fees are prohibited but Distributor + Fees are allowed. + + Distribution of Compiled Forms of the Standard Version + or Modified Versions without the Source + + (5) You may Distribute Compiled forms of the Standard Version without + the Source, provided that you include complete instructions on how to + get the Source of the Standard Version. Such instructions must be + valid at the time of your distribution. If these instructions, at any + time while you are carrying out such distribution, become invalid, you + must provide new instructions on demand or cease further distribution. + If you provide valid instructions or cease distribution within thirty + days after you become aware that the instructions are invalid, then + you do not forfeit any of your rights under this license. + + (6) You may Distribute a Modified Version in Compiled form without + the Source, provided that you comply with Section 4 with respect to + the Source of the Modified Version. + + Aggregating or Linking the Package + + (7) You may aggregate the Package (either the Standard Version or + Modified Version) with other packages and Distribute the resulting + aggregation provided that you do not charge a licensing fee for the + Package. Distributor Fees are permitted, and licensing fees for other + components in the aggregation are permitted. The terms of this license + apply to the use and Distribution of the Standard or Modified Versions + as included in the aggregation. + + (8) You are permitted to link Modified and Standard Versions with + other works, to embed the Package in a larger work of your own, or to + build stand-alone binary or bytecode versions of applications that + include the Package, and Distribute the result without restriction, + provided the result does not expose a direct interface to the Package. + + Items That are Not Considered Part of a Modified Version + + (9) Works (including, but not limited to, modules and scripts) that + merely extend or make use of the Package, do not, by themselves, cause + the Package to be a Modified Version. In addition, such works are not + considered parts of the Package itself, and are not subject to the + terms of this license. + + General Provisions + + (10) Any use, modification, and distribution of the Standard or + Modified Versions is governed by this Artistic License. By using, + modifying or distributing the Package, you accept this license. Do not + use, modify, or distribute the Package, if you do not accept this + license. + + (11) If your Modified Version has been derived from a Modified + Version made by someone other than you, you are nevertheless required + to ensure that your Modified Version complies with the requirements of + this license. + + (12) This license does not grant you the right to use any trademark, + service mark, tradename, or logo of the Copyright Holder. + + (13) This license includes the non-exclusive, worldwide, + free-of-charge patent license to make, have made, use, offer to sell, + sell, import and otherwise transfer the Package with respect to any + patent claims licensable by the Copyright Holder that are necessarily + infringed by the Package. If you institute patent litigation + (including a cross-claim or counterclaim) against any party alleging + that the Package constitutes direct or contributory patent + infringement, then this Artistic License to you shall terminate on the + date that such litigation is filed. + + (14) Disclaimer of Warranty: + THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS + IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED + WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR + NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL + LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL + DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF + ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + -------- + """ + +- GYP, located at tools/gyp, is licensed as follows: + """ + Copyright (c) 2009 Google Inc. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + """ + +- marked, located at tools/doc/node_modules/marked, is licensed as follows: + """ + Copyright (c) 2011-2014, Christopher Jeffrey (https://github.com/chjj/) + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + """ + +- cpplint.py, located at tools/cpplint.py, is licensed as follows: + """ + Copyright (c) 2009 Google Inc. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + """ + +- ESLint, located at tools/eslint, is licensed as follows: + """ + ESLint + Copyright jQuery Foundation and other contributors, https://jquery.org/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + """ + +- gtest, located at deps/gtest, is licensed as follows: + """ + Copyright 2008, Google Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + """ diff --git a/deps/npm/node_modules/util-promisify/README.md b/deps/npm/node_modules/util-promisify/README.md new file mode 100644 index 00000000000000..18c84207beacbc --- /dev/null +++ b/deps/npm/node_modules/util-promisify/README.md @@ -0,0 +1,42 @@ + +# util-promisify + +Node 8's [`require('util').promisify`](https://nodejs.org/api/util.html#util_util_promisify_original) as a node module, so you can use it right now! + +Supports [all major node versions](https://github.com/nodejs/LTS#lts-schedule1). + +[![build status](https://travis-ci.org/juliangruber/util-promisify.svg?branch=master)](http://travis-ci.org/juliangruber/util-promisify) +[![downloads](https://img.shields.io/npm/dm/util-promisify.svg)](https://www.npmjs.org/package/util-promisify) +[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/util-promisify.svg)](https://greenkeeper.io/) + +## Usage + +```js +const promisify = require('util-promisify'); +const fs = require('fs'); + +const stat = promisify(fs.stat); + +stat('/tmp/').then(s => { + // ... +}); +``` + +## Installation + +```bash +$ npm install util-promisify +``` + +## API + +See `util.promisify`'s [API docs](https://nodejs.org/api/util.html#util_util_promisify_original). + +### promisify(original) +### (Symbol) promisify.custom + +If available, the Symbol is reexported from node core's `util` module. + +## License + +MIT diff --git a/deps/npm/node_modules/util-promisify/index.js b/deps/npm/node_modules/util-promisify/index.js new file mode 100644 index 00000000000000..2d2719ed1f794d --- /dev/null +++ b/deps/npm/node_modules/util-promisify/index.js @@ -0,0 +1,91 @@ +'use strict'; + +const ObjectGetOwnPropertyDescriptors = require('object.getownpropertydescriptors'); +const util = require('util'); +const timers = require('timers'); + +const kCustomPromisifiedSymbol = util.promisify && util.promisify.custom || Symbol('util.promisify.custom'); +//const kCustomPromisifyArgsSymbol = Symbol('customPromisifyArgs'); + +function promisify(orig) { + if (typeof orig !== 'function') { + //const errors = require('internal/errors'); + //throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'original', 'function'); + var err = TypeError(`The "original" argument must be of type function`); + err.code = 'ERR_INVALID_ARG_TYPE'; + err.name = `TypeError [${err.code}]`; + throw err + } + + if (orig === timers.setTimeout || orig === timers.setImmediate) { + const _orig = orig + orig = function () { + var args = []; + for (var i = 0; i < arguments.length; i ++) args.push(arguments[i]); + const _cb = args.pop() + const cb = function () { + var args = []; + for (var i = 0; i < arguments.length; i ++) args.push(arguments[i]); + _cb.apply(null, [null].concat(args)) + } + _orig.apply(timers, [cb].concat(args)) + } + } + + if (orig[kCustomPromisifiedSymbol]) { + const fn = orig[kCustomPromisifiedSymbol]; + if (typeof fn !== 'function') { + throw new TypeError('The [util.promisify.custom] property must be ' + + 'a function'); + } + Object.defineProperty(fn, kCustomPromisifiedSymbol, { + value: fn, enumerable: false, writable: false, configurable: true + }); + return fn; + } + + // Names to create an object from in case the callback receives multiple + // arguments, e.g. ['stdout', 'stderr'] for child_process.exec. + //const argumentNames = orig[kCustomPromisifyArgsSymbol]; + + function fn() { + var args = []; + for (var i = 0; i < arguments.length; i ++) args.push(arguments[i]); + + let resolve, reject; + const promise = new Promise(function (_resolve, _reject) { + resolve = _resolve; + reject = _reject; + }); + try { + orig.apply(this, args.concat(function (err) { + var values = []; + for (var i = 1; i < arguments.length; i++) values.push(arguments[i]); + if (err) { + reject(err); + //} else if (argumentNames !== undefined && values.length > 1) { + // const obj = {}; + // for (var i = 0; i < argumentNames.length; i++) + // obj[argumentNames[i]] = values[i]; + // resolve(obj); + } else { + resolve(values[0]); + } + })); + } catch (err) { + reject(err); + } + return promise; + } + + Object.setPrototypeOf(fn, Object.getPrototypeOf(orig)); + + Object.defineProperty(fn, kCustomPromisifiedSymbol, { + value: fn, enumerable: false, writable: false, configurable: true + }); + return Object.defineProperties(fn, ObjectGetOwnPropertyDescriptors(orig)); +} + +promisify.custom = kCustomPromisifiedSymbol; + +module.exports = promisify; diff --git a/deps/npm/node_modules/util-promisify/package.json b/deps/npm/node_modules/util-promisify/package.json new file mode 100644 index 00000000000000..404bd92be6ebaa --- /dev/null +++ b/deps/npm/node_modules/util-promisify/package.json @@ -0,0 +1,45 @@ +{ + "_from": "util-promisify@^2.1.0", + "_id": "util-promisify@2.1.0", + "_inBundle": false, + "_integrity": "sha1-PCI2R2xNMsX/PEcAKt18E7moKlM=", + "_location": "/util-promisify", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "util-promisify@^2.1.0", + "name": "util-promisify", + "escapedName": "util-promisify", + "rawSpec": "^2.1.0", + "saveSpec": null, + "fetchSpec": "^2.1.0" + }, + "_requiredBy": [ + "/read-package-tree" + ], + "_resolved": "https://registry.npmjs.org/util-promisify/-/util-promisify-2.1.0.tgz", + "_shasum": "3c2236476c4d32c5ff3c47002add7c13b9a82a53", + "_spec": "util-promisify@^2.1.0", + "_where": "/Users/isaacs/dev/npm/cli/node_modules/read-package-tree", + "bugs": { + "url": "https://github.com/juliangruber/util-promisify/issues" + }, + "bundleDependencies": false, + "dependencies": { + "object.getownpropertydescriptors": "^2.0.3" + }, + "deprecated": false, + "description": "Node 8's util.promisify, as a node module", + "homepage": "https://github.com/juliangruber/util-promisify#readme", + "license": "MIT", + "name": "util-promisify", + "repository": { + "type": "git", + "url": "git+https://github.com/juliangruber/util-promisify.git" + }, + "scripts": { + "test": "node test" + }, + "version": "2.1.0" +} diff --git a/deps/npm/node_modules/util-promisify/test/common.js b/deps/npm/node_modules/util-promisify/test/common.js new file mode 100644 index 00000000000000..72262b7feb36aa --- /dev/null +++ b/deps/npm/node_modules/util-promisify/test/common.js @@ -0,0 +1,56 @@ +const mustCallChecks = []; + +function runCallChecks(exitCode) { + if (exitCode !== 0) return; + + const failed = mustCallChecks.filter(function(context) { + return context.actual !== context.expected; + }); + + failed.forEach(function(context) { + console.log('Mismatched %s function calls. Expected %d, actual %d.', + context.name, + context.expected, + context.actual); + console.log(context.stack.split('\n').slice(2).join('\n')); + }); + + if (failed.length) process.exit(1); +} + +exports.mustCall = function(fn, expected) { + if (typeof fn === 'number') { + expected = fn; + fn = noop; + } else if (fn === undefined) { + fn = noop; + } + + if (expected === undefined) + expected = 1; + else if (typeof expected !== 'number') + throw new TypeError(`Invalid expected value: ${expected}`); + + const context = { + expected: expected, + actual: 0, + stack: (new Error()).stack, + name: fn.name || '' + }; + + // add the exit listener only once to avoid listener leak warnings + if (mustCallChecks.length === 0) process.on('exit', runCallChecks); + + mustCallChecks.push(context); + + return function() { + context.actual++; + return fn.apply(this, arguments); + }; +}; + +// Crash the process on unhandled rejections. +exports.crashOnUnhandledRejection = function() { + process.on('unhandledRejection', + (err) => process.nextTick(() => { throw err; })); +}; diff --git a/deps/npm/node_modules/util-promisify/test/index.js b/deps/npm/node_modules/util-promisify/test/index.js new file mode 100644 index 00000000000000..a8e8491628baa5 --- /dev/null +++ b/deps/npm/node_modules/util-promisify/test/index.js @@ -0,0 +1,194 @@ +'use strict'; + +const common = require('./common'); +const assert = require('assert'); +const fs = require('fs'); +const vm = require('vm'); +const promisify = require('..'); +//const customPromisifyArgs = require('..').customPromisifyArgs; + +const stat = promisify(fs.stat); + +{ + const promise = stat(__filename); + assert(promise instanceof Promise); + promise.then(common.mustCall((value) => { + assert.deepStrictEqual(value, fs.statSync(__filename)); + })); +} + +{ + const promise = stat('/dontexist'); + promise.catch(common.mustCall((error) => { + assert(error.message.includes('ENOENT: no such file or directory, stat')); + })); +} + +{ + function fn() {} + function promisifedFn() {} + fn[promisify.custom] = promisifedFn; + assert.strictEqual(promisify(fn), promisifedFn); + assert.strictEqual(promisify(promisify(fn)), promisifedFn); +} + +{ + function fn() {} + fn[promisify.custom] = 42; + assert.throws( + () => promisify(fn), + (err) => err instanceof TypeError && + err.message === 'The [util.promisify.custom] property must ' + + 'be a function'); +} + +/*{ + const firstValue = 5; + const secondValue = 17; + + function fn(callback) { + callback(null, firstValue, secondValue); + } + + fn[customPromisifyArgs] = ['first', 'second']; + + promisify(fn)().then(common.mustCall((obj) => { + assert.deepStrictEqual(obj, {first: firstValue, second: secondValue}); + })); +}*/ + +{ + const fn = vm.runInNewContext('(function() {})'); + assert.notStrictEqual(Object.getPrototypeOf(promisify(fn)), + Function.prototype); +} + +{ + function fn(callback) { + callback(null, 'foo', 'bar'); + } + promisify(fn)().then(common.mustCall((value) => { + assert.deepStrictEqual(value, 'foo'); + })); +} + +{ + function fn(callback) { + callback(null); + } + promisify(fn)().then(common.mustCall((value) => { + assert.strictEqual(value, undefined); + })); +} + +{ + function fn(callback) { + callback(); + } + promisify(fn)().then(common.mustCall((value) => { + assert.strictEqual(value, undefined); + })); +} + +{ + function fn(err, val, callback) { + callback(err, val); + } + promisify(fn)(null, 42).then(common.mustCall((value) => { + assert.strictEqual(value, 42); + })); +} + +{ + function fn(err, val, callback) { + callback(err, val); + } + promisify(fn)(new Error('oops'), null).catch(common.mustCall((err) => { + assert.strictEqual(err.message, 'oops'); + })); +} + +if (Number(process.version[1]) >= 7) eval` +{ + + function fn(err, val, callback) { + callback(err, val); + } + + (async () => { + const value = await promisify(fn)(null, 42); + assert.strictEqual(value, 42); + })(); +}` + +{ + const o = {}; + const fn = promisify(function(cb) { + + cb(null, this === o); + }); + + o.fn = fn; + + o.fn().then(common.mustCall(function(val) { + assert(val); + })); +} + +if (Number(process.version[1]) >= 7) eval` +{ + const err = new Error('Should not have called the callback with the error.'); + const stack = err.stack; + + const fn = promisify(function(cb) { + cb(null); + cb(err); + }); + + (async () => { + await fn(); + await Promise.resolve(); + return assert.strictEqual(stack, err.stack); + })(); +}` + +{ + function c() { } + const a = promisify(function() { }); + const b = promisify(a); + assert.notStrictEqual(c, a); + assert.strictEqual(a, b); +} + +{ + let errToThrow; + const thrower = promisify(function(a, b, c, cb) { + errToThrow = new Error(); + throw errToThrow; + }); + thrower(1, 2, 3) + .then(assert.fail) + .then(assert.fail, (e) => assert.strictEqual(e, errToThrow)); +} + +{ + const err = new Error(); + + const a = promisify((cb) => cb(err))(); + const b = promisify(() => { throw err; })(); + + Promise.all([ + a.then(assert.fail, function(e) { + assert.strictEqual(err, e); + }), + b.then(assert.fail, function(e) { + assert.strictEqual(err, e); + }) + ]); +} + +if (Number(process.version[1]) >= 8) +{ + const coreUtil = require('util'); + assert.strictEqual(coreUtil.promisify.custom, promisify.custom); +} diff --git a/deps/npm/node_modules/util-promisify/test/timers.js b/deps/npm/node_modules/util-promisify/test/timers.js new file mode 100644 index 00000000000000..de12be034d3043 --- /dev/null +++ b/deps/npm/node_modules/util-promisify/test/timers.js @@ -0,0 +1,38 @@ +'use strict'; +const common = require('./common'); +const assert = require('assert'); +const timers = require('timers'); +const promisify = require('..'); + +common.crashOnUnhandledRejection(); + +const setTimeout = promisify(timers.setTimeout); +const setImmediate = promisify(timers.setImmediate); + +{ + const promise = setTimeout(1); + promise.then(common.mustCall((value) => { + assert.strictEqual(value, undefined); + })); +} + +{ + const promise = setTimeout(1, 'foobar'); + promise.then(common.mustCall((value) => { + assert.strictEqual(value, 'foobar'); + })); +} + +{ + const promise = setImmediate(); + promise.then(common.mustCall((value) => { + assert.strictEqual(value, undefined); + })); +} + +{ + const promise = setImmediate('foobar'); + promise.then(common.mustCall((value) => { + assert.strictEqual(value, 'foobar'); + })); +} diff --git a/deps/npm/node_modules/validate-npm-package-name/.nyc_output/aa4ee25ac41a9c3c7ee37ce965e6d1ac.json b/deps/npm/node_modules/validate-npm-package-name/.nyc_output/aa4ee25ac41a9c3c7ee37ce965e6d1ac.json new file mode 100644 index 00000000000000..8540780a8efbe5 --- /dev/null +++ b/deps/npm/node_modules/validate-npm-package-name/.nyc_output/aa4ee25ac41a9c3c7ee37ce965e6d1ac.json @@ -0,0 +1 @@ +{"/Users/chris/projects/npm/validate-npm-package-name/index.js":{"path":"/Users/chris/projects/npm/validate-npm-package-name/index.js","statementMap":{"0":{"start":{"line":3,"column":27},"end":{"line":3,"column":68}},"1":{"start":{"line":4,"column":15},"end":{"line":4,"column":34}},"2":{"start":{"line":5,"column":16},"end":{"line":8,"column":1}},"3":{"start":{"line":10,"column":15},"end":{"line":91,"column":1}},"4":{"start":{"line":11,"column":17},"end":{"line":11,"column":19}},"5":{"start":{"line":12,"column":15},"end":{"line":12,"column":17}},"6":{"start":{"line":14,"column":2},"end":{"line":17,"column":3}},"7":{"start":{"line":15,"column":4},"end":{"line":15,"column":38}},"8":{"start":{"line":16,"column":4},"end":{"line":16,"column":33}},"9":{"start":{"line":19,"column":2},"end":{"line":22,"column":3}},"10":{"start":{"line":20,"column":4},"end":{"line":20,"column":43}},"11":{"start":{"line":21,"column":4},"end":{"line":21,"column":33}},"12":{"start":{"line":24,"column":2},"end":{"line":27,"column":3}},"13":{"start":{"line":25,"column":4},"end":{"line":25,"column":40}},"14":{"start":{"line":26,"column":4},"end":{"line":26,"column":33}},"15":{"start":{"line":29,"column":2},"end":{"line":31,"column":3}},"16":{"start":{"line":30,"column":4},"end":{"line":30,"column":56}},"17":{"start":{"line":33,"column":2},"end":{"line":35,"column":3}},"18":{"start":{"line":34,"column":4},"end":{"line":34,"column":50}},"19":{"start":{"line":37,"column":2},"end":{"line":39,"column":3}},"20":{"start":{"line":38,"column":4},"end":{"line":38,"column":55}},"21":{"start":{"line":41,"column":2},"end":{"line":43,"column":3}},"22":{"start":{"line":42,"column":4},"end":{"line":42,"column":65}},"23":{"start":{"line":46,"column":2},"end":{"line":50,"column":4}},"24":{"start":{"line":47,"column":4},"end":{"line":49,"column":5}},"25":{"start":{"line":48,"column":6},"end":{"line":48,"column":61}},"26":{"start":{"line":55,"column":2},"end":{"line":59,"column":4}},"27":{"start":{"line":56,"column":4},"end":{"line":58,"column":5}},"28":{"start":{"line":57,"column":6},"end":{"line":57,"column":55}},"29":{"start":{"line":63,"column":2},"end":{"line":65,"column":3}},"30":{"start":{"line":64,"column":4},"end":{"line":64,"column":72}},"31":{"start":{"line":68,"column":2},"end":{"line":70,"column":3}},"32":{"start":{"line":69,"column":4},"end":{"line":69,"column":63}},"33":{"start":{"line":72,"column":2},"end":{"line":74,"column":3}},"34":{"start":{"line":73,"column":4},"end":{"line":73,"column":78}},"35":{"start":{"line":76,"column":2},"end":{"line":88,"column":3}},"36":{"start":{"line":78,"column":20},"end":{"line":78,"column":52}},"37":{"start":{"line":79,"column":4},"end":{"line":85,"column":5}},"38":{"start":{"line":80,"column":17},"end":{"line":80,"column":29}},"39":{"start":{"line":81,"column":16},"end":{"line":81,"column":28}},"40":{"start":{"line":82,"column":6},"end":{"line":84,"column":7}},"41":{"start":{"line":83,"column":8},"end":{"line":83,"column":37}},"42":{"start":{"line":87,"column":4},"end":{"line":87,"column":64}},"43":{"start":{"line":90,"column":2},"end":{"line":90,"column":31}},"44":{"start":{"line":93,"column":0},"end":{"line":93,"column":52}},"45":{"start":{"line":95,"column":11},"end":{"line":105,"column":1}},"46":{"start":{"line":96,"column":15},"end":{"line":101,"column":3}},"47":{"start":{"line":102,"column":2},"end":{"line":102,"column":53}},"48":{"start":{"line":102,"column":31},"end":{"line":102,"column":53}},"49":{"start":{"line":103,"column":2},"end":{"line":103,"column":49}},"50":{"start":{"line":103,"column":29},"end":{"line":103,"column":49}},"51":{"start":{"line":104,"column":2},"end":{"line":104,"column":15}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":10,"column":32},"end":{"line":10,"column":33}},"loc":{"start":{"line":10,"column":48},"end":{"line":91,"column":1}}},"1":{"name":"(anonymous_1)","decl":{"start":{"line":46,"column":20},"end":{"line":46,"column":21}},"loc":{"start":{"line":46,"column":47},"end":{"line":50,"column":3}}},"2":{"name":"(anonymous_2)","decl":{"start":{"line":55,"column":19},"end":{"line":55,"column":20}},"loc":{"start":{"line":55,"column":38},"end":{"line":59,"column":3}}},"3":{"name":"(anonymous_3)","decl":{"start":{"line":95,"column":11},"end":{"line":95,"column":12}},"loc":{"start":{"line":95,"column":39},"end":{"line":105,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":14,"column":2},"end":{"line":17,"column":3}},"type":"if","locations":[{"start":{"line":14,"column":2},"end":{"line":17,"column":3}},{"start":{"line":14,"column":2},"end":{"line":17,"column":3}}]},"1":{"loc":{"start":{"line":19,"column":2},"end":{"line":22,"column":3}},"type":"if","locations":[{"start":{"line":19,"column":2},"end":{"line":22,"column":3}},{"start":{"line":19,"column":2},"end":{"line":22,"column":3}}]},"2":{"loc":{"start":{"line":24,"column":2},"end":{"line":27,"column":3}},"type":"if","locations":[{"start":{"line":24,"column":2},"end":{"line":27,"column":3}},{"start":{"line":24,"column":2},"end":{"line":27,"column":3}}]},"3":{"loc":{"start":{"line":29,"column":2},"end":{"line":31,"column":3}},"type":"if","locations":[{"start":{"line":29,"column":2},"end":{"line":31,"column":3}},{"start":{"line":29,"column":2},"end":{"line":31,"column":3}}]},"4":{"loc":{"start":{"line":33,"column":2},"end":{"line":35,"column":3}},"type":"if","locations":[{"start":{"line":33,"column":2},"end":{"line":35,"column":3}},{"start":{"line":33,"column":2},"end":{"line":35,"column":3}}]},"5":{"loc":{"start":{"line":37,"column":2},"end":{"line":39,"column":3}},"type":"if","locations":[{"start":{"line":37,"column":2},"end":{"line":39,"column":3}},{"start":{"line":37,"column":2},"end":{"line":39,"column":3}}]},"6":{"loc":{"start":{"line":41,"column":2},"end":{"line":43,"column":3}},"type":"if","locations":[{"start":{"line":41,"column":2},"end":{"line":43,"column":3}},{"start":{"line":41,"column":2},"end":{"line":43,"column":3}}]},"7":{"loc":{"start":{"line":47,"column":4},"end":{"line":49,"column":5}},"type":"if","locations":[{"start":{"line":47,"column":4},"end":{"line":49,"column":5}},{"start":{"line":47,"column":4},"end":{"line":49,"column":5}}]},"8":{"loc":{"start":{"line":56,"column":4},"end":{"line":58,"column":5}},"type":"if","locations":[{"start":{"line":56,"column":4},"end":{"line":58,"column":5}},{"start":{"line":56,"column":4},"end":{"line":58,"column":5}}]},"9":{"loc":{"start":{"line":63,"column":2},"end":{"line":65,"column":3}},"type":"if","locations":[{"start":{"line":63,"column":2},"end":{"line":65,"column":3}},{"start":{"line":63,"column":2},"end":{"line":65,"column":3}}]},"10":{"loc":{"start":{"line":68,"column":2},"end":{"line":70,"column":3}},"type":"if","locations":[{"start":{"line":68,"column":2},"end":{"line":70,"column":3}},{"start":{"line":68,"column":2},"end":{"line":70,"column":3}}]},"11":{"loc":{"start":{"line":72,"column":2},"end":{"line":74,"column":3}},"type":"if","locations":[{"start":{"line":72,"column":2},"end":{"line":74,"column":3}},{"start":{"line":72,"column":2},"end":{"line":74,"column":3}}]},"12":{"loc":{"start":{"line":76,"column":2},"end":{"line":88,"column":3}},"type":"if","locations":[{"start":{"line":76,"column":2},"end":{"line":88,"column":3}},{"start":{"line":76,"column":2},"end":{"line":88,"column":3}}]},"13":{"loc":{"start":{"line":79,"column":4},"end":{"line":85,"column":5}},"type":"if","locations":[{"start":{"line":79,"column":4},"end":{"line":85,"column":5}},{"start":{"line":79,"column":4},"end":{"line":85,"column":5}}]},"14":{"loc":{"start":{"line":82,"column":6},"end":{"line":84,"column":7}},"type":"if","locations":[{"start":{"line":82,"column":6},"end":{"line":84,"column":7}},{"start":{"line":82,"column":6},"end":{"line":84,"column":7}}]},"15":{"loc":{"start":{"line":82,"column":10},"end":{"line":82,"column":78}},"type":"binary-expr","locations":[{"start":{"line":82,"column":10},"end":{"line":82,"column":43}},{"start":{"line":82,"column":47},"end":{"line":82,"column":78}}]},"16":{"loc":{"start":{"line":97,"column":25},"end":{"line":97,"column":69}},"type":"binary-expr","locations":[{"start":{"line":97,"column":25},"end":{"line":97,"column":44}},{"start":{"line":97,"column":48},"end":{"line":97,"column":69}}]},"17":{"loc":{"start":{"line":102,"column":2},"end":{"line":102,"column":53}},"type":"if","locations":[{"start":{"line":102,"column":2},"end":{"line":102,"column":53}},{"start":{"line":102,"column":2},"end":{"line":102,"column":53}}]},"18":{"loc":{"start":{"line":103,"column":2},"end":{"line":103,"column":49}},"type":"if","locations":[{"start":{"line":103,"column":2},"end":{"line":103,"column":49}},{"start":{"line":103,"column":2},"end":{"line":103,"column":49}}]}},"s":{"0":1,"1":1,"2":1,"3":1,"4":22,"5":22,"6":22,"7":0,"8":0,"9":22,"10":0,"11":0,"12":22,"13":0,"14":0,"15":22,"16":2,"17":22,"18":1,"19":22,"20":1,"21":22,"22":2,"23":22,"24":44,"25":2,"26":22,"27":726,"28":1,"29":22,"30":1,"31":22,"32":1,"33":22,"34":2,"35":22,"36":6,"37":6,"38":5,"39":5,"40":5,"41":2,"42":4,"43":20,"44":1,"45":1,"46":22,"47":22,"48":17,"49":22,"50":12,"51":22},"f":{"0":22,"1":44,"2":726,"3":22},"b":{"0":[0,22],"1":[0,22],"2":[0,22],"3":[2,20],"4":[1,21],"5":[1,21],"6":[2,20],"7":[2,42],"8":[1,725],"9":[1,21],"10":[1,21],"11":[2,20],"12":[6,16],"13":[5,1],"14":[2,3],"15":[5,2],"16":[22,12],"17":[17,5],"18":[12,10]},"_coverageSchema":"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c","hash":"7a01205bc1fdf589bdf194d23f1405400131fa00","contentHash":"8b2210ff664cab8b0916540357b1d2f9_10.1.2"}} \ No newline at end of file diff --git a/deps/npm/node_modules/validate-npm-package-name/.nyc_output/bb918173e62b9517f55b630902d07ef4.json b/deps/npm/node_modules/validate-npm-package-name/.nyc_output/bb918173e62b9517f55b630902d07ef4.json new file mode 100644 index 00000000000000..9e26dfeeb6e641 --- /dev/null +++ b/deps/npm/node_modules/validate-npm-package-name/.nyc_output/bb918173e62b9517f55b630902d07ef4.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/deps/npm/node_modules/write-file-atomic/CHANGELOG.md b/deps/npm/node_modules/write-file-atomic/CHANGELOG.md index 61fb4d22330e49..920ae2cb4d1fdb 100644 --- a/deps/npm/node_modules/write-file-atomic/CHANGELOG.md +++ b/deps/npm/node_modules/write-file-atomic/CHANGELOG.md @@ -1,3 +1,8 @@ +# 2.4.3 + +* Ignore errors raised by `fs.closeSync` when cleaning up after a write + error. + # 2.4.2 * A pair of patches to fix some fd leaks. We would leak fds with sync use diff --git a/deps/npm/node_modules/write-file-atomic/index.js b/deps/npm/node_modules/write-file-atomic/index.js index fe9fdfb9db221c..64ae987c011a9f 100644 --- a/deps/npm/node_modules/write-file-atomic/index.js +++ b/deps/npm/node_modules/write-file-atomic/index.js @@ -209,7 +209,6 @@ function writeFileSync (filename, data, options) { var removeOnExitHandler = onExit(cleanup) try { - fd = fs.openSync(tmpfile, 'w', options.mode) if (Buffer.isBuffer(data)) { fs.writeSync(fd, data, 0, data.length, 0) @@ -225,7 +224,13 @@ function writeFileSync (filename, data, options) { fs.renameSync(tmpfile, filename) removeOnExitHandler() } catch (err) { - if (fd) fs.closeSync(fd) + if (fd) { + try { + fs.closeSync(fd) + } catch (ex) { + // ignore close errors at this stage, error may have closed fd already. + } + } removeOnExitHandler() cleanup() throw err diff --git a/deps/npm/node_modules/write-file-atomic/package.json b/deps/npm/node_modules/write-file-atomic/package.json index f8f55fbd22bfc2..bffa0bbbb3472f 100644 --- a/deps/npm/node_modules/write-file-atomic/package.json +++ b/deps/npm/node_modules/write-file-atomic/package.json @@ -1,31 +1,32 @@ { - "_from": "write-file-atomic@^2.3.0", - "_id": "write-file-atomic@2.4.2", + "_from": "write-file-atomic@^2.4.2", + "_id": "write-file-atomic@2.4.3", "_inBundle": false, - "_integrity": "sha512-s0b6vB3xIVRLWywa6X9TOMA7k9zio0TMOsl9ZnDkliA/cfJlpHXAscj0gbHVJiTdIuAYpIyqS5GW91fqm6gG5g==", + "_integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", "_location": "/write-file-atomic", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "write-file-atomic@^2.3.0", + "raw": "write-file-atomic@^2.4.2", "name": "write-file-atomic", "escapedName": "write-file-atomic", - "rawSpec": "^2.3.0", + "rawSpec": "^2.4.2", "saveSpec": null, - "fetchSpec": "^2.3.0" + "fetchSpec": "^2.4.2" }, "_requiredBy": [ "#USER", "/", "/bin-links", + "/caching-transform", "/configstore", "/tap" ], - "_resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.2.tgz", - "_shasum": "a7181706dfba17855d221140a9c06e15fcdd87b9", - "_spec": "write-file-atomic@^2.3.0", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", + "_shasum": "1fd2e9ae1df3e75b8d8c367443c692d4ca81f481", + "_spec": "write-file-atomic@^2.4.2", + "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Rebecca Turner", "email": "me@re-becca.org", @@ -65,7 +66,10 @@ "url": "git+ssh://git@github.com/iarna/write-file-atomic.git" }, "scripts": { + "postpublish": "git push origin --follow-tags", + "postversion": "npm publish", + "preversion": "npm test", "test": "standard && tap --100 test/*.js" }, - "version": "2.4.2" + "version": "2.4.3" } diff --git a/deps/npm/node_modules/xtend/.jshintrc b/deps/npm/node_modules/xtend/.jshintrc new file mode 100644 index 00000000000000..77887b5f0f2efc --- /dev/null +++ b/deps/npm/node_modules/xtend/.jshintrc @@ -0,0 +1,30 @@ +{ + "maxdepth": 4, + "maxstatements": 200, + "maxcomplexity": 12, + "maxlen": 80, + "maxparams": 5, + + "curly": true, + "eqeqeq": true, + "immed": true, + "latedef": false, + "noarg": true, + "noempty": true, + "nonew": true, + "undef": true, + "unused": "vars", + "trailing": true, + + "quotmark": true, + "expr": true, + "asi": true, + + "browser": false, + "esnext": true, + "devel": false, + "node": false, + "nonstandard": false, + + "predef": ["require", "module", "__dirname", "__filename"] +} diff --git a/deps/npm/package.json b/deps/npm/package.json index 24827e59cfd9a1..80143f7c53cb65 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "6.9.0", + "version": "6.10.0", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ @@ -40,9 +40,9 @@ "aproba": "^2.0.0", "archy": "~1.0.0", "bin-links": "^1.1.2", - "bluebird": "^3.5.3", + "bluebird": "^3.5.5", "byte-size": "^5.0.1", - "cacache": "^11.3.2", + "cacache": "^11.3.3", "call-limit": "~1.1.0", "chownr": "^1.1.1", "ci-info": "^2.0.0", @@ -61,7 +61,7 @@ "fs-write-stream-atomic": "~1.0.10", "gentle-fs": "^2.0.1", "glob": "^7.1.3", - "graceful-fs": "^4.1.15", + "graceful-fs": "^4.2.0", "has-unicode": "~2.0.1", "hosted-git-info": "^2.7.1", "iferr": "^1.0.2", @@ -96,7 +96,7 @@ "npm-install-checks": "~3.0.0", "npm-lifecycle": "^2.1.0", "npm-package-arg": "^6.1.0", - "npm-packlist": "^1.4.1", + "npm-packlist": "^1.4.4", "npm-pick-manifest": "^2.2.3", "npm-registry-fetch": "^3.9.0", "npm-user-validate": "~1.0.0", @@ -104,30 +104,31 @@ "once": "~1.4.0", "opener": "^1.5.1", "osenv": "^0.1.5", - "pacote": "^9.5.0", + "pacote": "^9.5.1", "path-is-inside": "~1.0.2", "promise-inflight": "~1.0.1", "qrcode-terminal": "^0.12.0", - "query-string": "^6.2.0", + "query-string": "^6.4.0", "qw": "~1.0.1", "read": "~1.0.7", "read-cmd-shim": "~1.0.1", "read-installed": "~4.0.3", "read-package-json": "^2.0.13", - "read-package-tree": "^5.2.2", - "readable-stream": "^3.1.1", + "read-package-tree": "^5.3.1", + "readable-stream": "^3.3.0", + "readdir-scoped-modules": "^1.1.0", "request": "^2.88.0", "retry": "^0.12.0", "rimraf": "^2.6.3", "safe-buffer": "^5.1.2", "semver": "^5.6.0", - "sha": "~2.0.1", + "sha": "^3.0.0", "slide": "~1.1.6", "sorted-object": "~2.0.1", "sorted-union-stream": "~2.1.3", "ssri": "^6.0.1", "stringify-package": "^1.0.0", - "tar": "^4.4.8", + "tar": "^4.4.10", "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0", "uid-number": "0.0.6", @@ -140,7 +141,7 @@ "validate-npm-package-name": "~3.0.0", "which": "^1.3.1", "worker-farm": "^1.6.0", - "write-file-atomic": "^2.4.2" + "write-file-atomic": "^2.4.3" }, "bundleDependencies": [ "abbrev", @@ -269,26 +270,28 @@ "devDependencies": { "deep-equal": "^1.0.1", "get-stream": "^4.1.0", - "licensee": "^6.1.0", + "licensee": "^7.0.2", "marked": "^0.6.0", "marked-man": "^0.2.1", - "npm-registry-couchapp": "^2.7.1", - "npm-registry-mock": "^1.1.0", + "npm-registry-couchapp": "^2.7.2", + "npm-registry-mock": "^1.2.1", "require-inject": "^1.4.4", "sprintf-js": "^1.1.2", "standard": "^11.0.1", - "tacks": "^1.2.7", - "tap": "^12.5.3", - "tar-stream": "^2.0.0" + "tacks": "^1.3.0", + "tap": "^12.7.0", + "tar-stream": "^2.0.1" }, "scripts": { "dumpconf": "env | grep npm | sort | uniq", "prepare": "node bin/npm-cli.js rebuild && node bin/npm-cli.js --no-audit --no-timing prune --prefix=. --no-global && rimraf test/*/*/node_modules && make -j4 doc", "preversion": "bash scripts/update-authors.sh && git add AUTHORS && git commit -m \"update AUTHORS\" || true", "licenses": "licensee --production --errors-only", - "tap": "tap --reporter=classic --timeout 300", - "tap-cover": "tap --reporter=classic --nyc-arg='--cache' --coverage --timeout 600", - "test": "standard && npm run test-tap", + "tap": "tap -J --timeout 300", + "tap-cover": "tap -J --nyc-arg=--cache --coverage --timeout 600", + "pretest": "standard", + "test": "npm run test-tap --", + "posttest": "rimraf test/npm_cache*", "test-coverage": "npm run tap-cover -- \"test/tap/*.js\" \"test/network/*.js\" \"test/broken-under-*/*.js\"", "test-tap": "npm run tap -- \"test/tap/*.js\" \"test/network/*.js\" \"test/broken-under-*/*.js\"", "test-node": "tap --timeout 240 \"test/tap/*.js\" \"test/network/*.js\" \"test/broken-under-nyc*/*.js\"" diff --git a/deps/npm/test/common-config.js b/deps/npm/test/common-config.js new file mode 100644 index 00000000000000..003150335483a3 --- /dev/null +++ b/deps/npm/test/common-config.js @@ -0,0 +1,90 @@ +if (module === require.main) { + console.log('1..1') + console.log('ok 1 setup done') + process.exit(0) +} + +var fs = require('graceful-fs') +var path = require('path') +var userconfigSrc = path.resolve(__dirname, 'fixtures', 'config', 'userconfig') +exports.userconfig = userconfigSrc + '-with-gc' +exports.globalconfig = path.resolve(__dirname, 'fixtures', 'config', 'globalconfig') + +// if this hasn't been written yet, then do it now. +try { + fs.statSync(exports.userconfig) +} catch (er) { + var uc = fs.readFileSync(userconfigSrc) + var gcini = 'globalconfig = ' + exports.globalconfig + '\n' + // atomic! + fs.writeFileSync(exports.userconfig + '.' + process.pid, gcini + uc) + fs.renameSync(exports.userconfig + '.' + process.pid, exports.userconfig) +} + +exports.builtin = path.resolve(__dirname, 'fixtures', 'config', 'builtin') +exports.malformed = path.resolve(__dirname, 'fixtures', 'config', 'malformed') +exports.ucData = + { globalconfig: exports.globalconfig, + email: 'i@izs.me', + 'env-thing': 'asdf', + 'init.author.name': 'Isaac Z. Schlueter', + 'init.author.email': 'i@izs.me', + 'init.author.url': 'http://blog.izs.me/', + 'init.version': '1.2.3', + 'npm:publishtest': true, + '_npmjs.org:couch': 'https://admin:password@localhost:5984/registry', + 'npm-www:nocache': '1', + nodedir: '/Users/isaacs/dev/js/node-v0.8', + 'sign-git-tag': true, + message: 'v%s', + 'strict-ssl': false, + 'tmp': path.normalize(process.env.HOME + '/.tmp'), + _auth: 'dXNlcm5hbWU6cGFzc3dvcmQ=', + _token: + { AuthSession: 'yabba-dabba-doodle', + version: '1', + expires: '1345001053415', + path: '/', + httponly: true } } + +// set the userconfig in the env +// unset anything else that npm might be trying to foist on us +Object.keys(process.env).forEach(function (k) { + if (k.match(/^npm_config_/i)) { + delete process.env[k] + } +}) +process.env.npm_config_userconfig = exports.userconfig +process.env.npm_config_other_env_thing = '1000' +process.env.random_env_var = 'asdf' +process.env.npm_config__underbar_env_thing = 'underful' +process.env.NPM_CONFIG_UPPERCASE_ENV_THING = '42' + +exports.envData = { + userconfig: exports.userconfig, + '_underbar-env-thing': 'underful', + 'uppercase-env-thing': '42', + 'other-env-thing': '1000' +} +exports.envDataFix = { + userconfig: exports.userconfig, + '_underbar-env-thing': 'underful', + 'uppercase-env-thing': 42, + 'other-env-thing': 1000 +} + +var projectConf = path.resolve(__dirname, '..', '.npmrc') +try { + fs.statSync(projectConf) +} catch (er) { + // project conf not found, probably working with packed npm + fs.writeFileSync(projectConf, '') +} + +var projectRc = path.join(__dirname, 'fixtures', 'config', '.npmrc') +try { + fs.statSync(projectRc) +} catch (er) { + // project conf not found, probably working with packed npm + fs.writeFileSync(projectRc, 'just = testing') +} diff --git a/deps/npm/test/common-tap.js b/deps/npm/test/common-tap.js index 37d5efe9f86c82..d54a8699954514 100644 --- a/deps/npm/test/common-tap.js +++ b/deps/npm/test/common-tap.js @@ -1,6 +1,7 @@ 'use strict' /* eslint-disable camelcase */ +const configCommon = require('./common-config.js') var fs = require('graceful-fs') var readCmdShim = require('read-cmd-shim') var isWindows = require('../lib/utils/is-windows.js') @@ -17,9 +18,32 @@ if (!global.setImmediate || !require('timers').setImmediate) { var spawn = require('child_process').spawn var path = require('path') -var port = exports.port = 1337 +// provide a working dir unique to each test +const main = require.main.filename +exports.pkg = path.resolve(path.dirname(main), path.basename(main, '.js')) +const mkdirp = require('mkdirp') +const rimraf = require('rimraf') +mkdirp.sync(exports.pkg) +require('tap').teardown(() => { + try { + rimraf.sync(exports.pkg) + } catch (e) { + if (process.platform !== 'win32') { + throw e + } + } +}) + +// space these out to help prevent collisions +const testId = 3 * (+process.env.TAP_CHILD_ID || 0) + +var port = exports.port = 15443 + testId exports.registry = 'http://localhost:' + port +exports.altPort = 7331 + testId + +exports.gitPort = 4321 + testId + var fakeRegistry = require('./fake-registry.js') exports.fakeRegistry = fakeRegistry @@ -29,10 +53,10 @@ ourenv.npm_config_progress = 'false' ourenv.npm_config_metrics = 'false' ourenv.npm_config_audit = 'false' -var npm_config_cache = path.resolve(__dirname, 'npm_cache') +var npm_config_cache = path.resolve(__dirname, 'npm_cache_' + testId) ourenv.npm_config_cache = exports.npm_config_cache = npm_config_cache -ourenv.npm_config_userconfig = exports.npm_config_userconfig = path.join(__dirname, 'fixtures', 'config', 'userconfig') -ourenv.npm_config_globalconfig = exports.npm_config_globalconfig = path.join(__dirname, 'fixtures', 'config', 'globalconfig') +ourenv.npm_config_userconfig = exports.npm_config_userconfig = configCommon.userconfig +ourenv.npm_config_globalconfig = exports.npm_config_globalconfig = configCommon.globalconfig ourenv.npm_config_global_style = 'false' ourenv.npm_config_legacy_bundling = 'false' ourenv.npm_config_fetch_retries = '0' @@ -114,6 +138,9 @@ exports.makeGitRepo = function (params, cb) { git.chainableExec(['init'], opts), git.chainableExec(['config', 'user.name', user], opts), git.chainableExec(['config', 'user.email', email], opts), + // don't time out tests waiting for a gpg passphrase or 2fa + git.chainableExec(['config', 'commit.gpgsign', 'false'], opts), + git.chainableExec(['config', 'tag.forceSignAnnotated', 'false'], opts), git.chainableExec(['add'].concat(added), opts), git.chainableExec(['commit', '-m', message], opts) ] diff --git a/deps/npm/test/fake-registry.js b/deps/npm/test/fake-registry.js index 7566443e64cf19..e09e154c76514e 100644 --- a/deps/npm/test/fake-registry.js +++ b/deps/npm/test/fake-registry.js @@ -1,7 +1,14 @@ 'use strict' const common = require('./common-tap.js') const Bluebird = require('bluebird') -const log = require('npmlog') +const silentLogger = { + http: () => {}, + silly: () => {} +} + +const log = process.env.TAP_CHILD_ID + ? silentLogger + : require('npmlog') const http = require('http') const EventEmitter = require('events') diff --git a/deps/npm/test/fixtures/config/userconfig-with-gc b/deps/npm/test/fixtures/config/userconfig-with-gc new file mode 100644 index 00000000000000..cf774bb883d966 --- /dev/null +++ b/deps/npm/test/fixtures/config/userconfig-with-gc @@ -0,0 +1,23 @@ +globalconfig = /Users/isaacs/dev/npm/cli/test/fixtures/config/globalconfig +email = i@izs.me +env-thing = ${random_env_var} +init.author.name = Isaac Z. Schlueter +init.author.email = i@izs.me +init.author.url = http://blog.izs.me/ +init.version = 1.2.3 +npm:publishtest = true +_npmjs.org:couch = https://admin:password@localhost:5984/registry +npm-www:nocache = 1 +nodedir = /Users/isaacs/dev/js/node-v0.8 +sign-git-tag = true +message = v%s +strict-ssl = false +tmp = ~/.tmp +_auth = dXNlcm5hbWU6cGFzc3dvcmQ= + +[_token] +AuthSession = yabba-dabba-doodle +version = 1 +expires = 1345001053415 +path = / +httponly = true diff --git a/deps/npm/test/need-npm5-update/ignore-shrinkwrap.js b/deps/npm/test/need-npm5-update/ignore-shrinkwrap.js index 9468162eeef863..4980b659fd23f4 100644 --- a/deps/npm/test/need-npm5-update/ignore-shrinkwrap.js +++ b/deps/npm/test/need-npm5-update/ignore-shrinkwrap.js @@ -24,7 +24,7 @@ var json = { name: 'ignore-shrinkwrap', version: '0.0.0', dependencies: { - 'npm-test-ignore-shrinkwrap-file': 'http://localhost:1337/package.js' + 'npm-test-ignore-shrinkwrap-file': 'http://localhost:' + common.port + '/package.js' } } @@ -34,8 +34,8 @@ var shrinkwrap = { dependencies: { 'npm-test-ignore-shrinkwrap-file': { version: '1.2.3', - from: 'http://localhost:1337/shrinkwrap.js', - resolved: 'http://localhost:1337/shrinkwrap.js', + from: 'http://localhost:' + common.port + '/shrinkwrap.js', + resolved: 'http://localhost:' + common.port + '/shrinkwrap.js', dependencies: { opener: { version: '1.3.0', diff --git a/deps/npm/test/need-npm5-update/peer-deps-invalid.js b/deps/npm/test/need-npm5-update/peer-deps-invalid.js index 39ad612e5a9bef..15fda253ecc48c 100644 --- a/deps/npm/test/need-npm5-update/peer-deps-invalid.js +++ b/deps/npm/test/need-npm5-update/peer-deps-invalid.js @@ -18,8 +18,8 @@ var json = { name: 'peer-deps-invalid', version: '0.0.0', dependencies: { - 'npm-test-peer-deps-file': 'http://localhost:1337/ok.js', - 'npm-test-peer-deps-file-invalid': 'http://localhost:1337/invalid.js' + 'npm-test-peer-deps-file': 'http://localhost:' + common.port + '/ok.js', + 'npm-test-peer-deps-file-invalid': 'http://localhost:' + common.port + '/invalid.js' } } diff --git a/deps/npm/test/network/registry.js b/deps/npm/test/network/registry.js index 3dbe23ffd25bdc..d7e11c6007111f 100644 --- a/deps/npm/test/network/registry.js +++ b/deps/npm/test/network/registry.js @@ -2,7 +2,7 @@ // This verifies that the server-side stuff still works. var common = require('../common-tap') -var test = require('tap').test +var t = require('tap') var npmExec = require.resolve('../../bin/npm-cli.js') var path = require('path') @@ -17,16 +17,15 @@ if (v[0] === 0 && v[1] < 10) { process.versions.node ) } else { - which('couchdb', function (er) { - if (er) { - console.error('WARNING: need couch to run test: ' + er.message) - } else { - runTests() - } - }) + try { + which.sync('couchdb') + t.test(runTests) + } catch (er) { + console.error('WARNING: need couch to run test: ' + er.message) + } } -function runTests () { +function runTests (t) { var env = Object.assign({ TAP: 1 }, process.env) env.npm = npmExec // TODO: fix tap and / or nyc to handle nested invocations properly @@ -39,10 +38,8 @@ function runTests () { common.npm(['install'], opts, function (err, code) { if (err) { throw err } if (code) { - return test('need install to work', function (t) { - t.fail('install failed with: ' + code) - t.end() - }) + t.fail('install failed with: ' + code) + return t.end() } else { opts = { cwd: ca, @@ -52,10 +49,8 @@ function runTests () { common.npm(['test', '--', '-Rtap', '--no-coverage'], opts, function (err, code) { if (err) { throw err } if (code) { - return test('need test to work', function (t) { - t.fail('test failed with: ' + code) - t.end() - }) + t.fail('test failed with: ' + code) + return t.end() } opts = { cwd: ca, @@ -63,8 +58,9 @@ function runTests () { stdio: 'inherit' } common.npm(['prune', '--production'], opts, function (err, code) { - if (err) { throw err } - process.exit(code || 0) + t.ifError(err) + t.equal(code, 0) + return t.end() }) }) } diff --git a/deps/npm/test/tap/404-parent.js b/deps/npm/test/tap/404-parent.js index 67835efc1df102..539ead7a45e0e8 100644 --- a/deps/npm/test/tap/404-parent.js +++ b/deps/npm/test/tap/404-parent.js @@ -6,7 +6,7 @@ var path = require('path') var fs = require('fs') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var pkg = path.resolve(__dirname, '404-parent') +const pkg = common.pkg var mr = require('npm-registry-mock') test('404-parent: if parent exists, specify parent in error message', function (t) { @@ -42,6 +42,9 @@ function setup () { function performInstall (cb) { mr({port: common.port}, function (er, s) { // create mock registry. + if (er) { + return cb(er) + } s.get('/test-npm-404-parent-test') .many().reply(404, {'error': 'version not found'}) npm.load({ diff --git a/deps/npm/test/tap/404-private-registry-scoped.js b/deps/npm/test/tap/404-private-registry-scoped.js index f8a8c5b05a5721..5565f7a404e9cc 100644 --- a/deps/npm/test/tap/404-private-registry-scoped.js +++ b/deps/npm/test/tap/404-private-registry-scoped.js @@ -1,12 +1,11 @@ var test = require('tap').test -var path = require('path') var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') var mr = common.fakeRegistry.compat var server -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg function setup () { cleanup() diff --git a/deps/npm/test/tap/404-private-registry.js b/deps/npm/test/tap/404-private-registry.js index da6e446918f924..869125eba18f0b 100644 --- a/deps/npm/test/tap/404-private-registry.js +++ b/deps/npm/test/tap/404-private-registry.js @@ -7,7 +7,7 @@ var mr = common.fakeRegistry.compat var server var packageName = path.basename(__filename, '.js') -var testdir = path.join(__dirname, packageName) +var testdir = common.pkg function setup () { cleanup() diff --git a/deps/npm/test/tap/404.js b/deps/npm/test/tap/404.js index 710780ad26e60c..450b0c2816fba0 100644 --- a/deps/npm/test/tap/404.js +++ b/deps/npm/test/tap/404.js @@ -9,7 +9,7 @@ const common = require('../common-tap.js') const e404 = /test-npm-404@latest' is not in the npm registry/ const invalidPackage = /Your package name is not valid, because[\s\S]+1\. name can only contain URL-friendly characters/ -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/access.js b/deps/npm/test/tap/access.js index d400b4d33b134c..db03cbfc9e80bb 100644 --- a/deps/npm/test/tap/access.js +++ b/deps/npm/test/tap/access.js @@ -9,7 +9,8 @@ const mr = require('npm-registry-mock') const test = require('tap').test const common = require('../common-tap.js') -const pkg = path.resolve(__dirname, 'access') +const pkg = common.pkg + let server const scoped = { @@ -63,7 +64,7 @@ test('npm access public on current package', function (t) { test('npm access public when no package passed and no package.json', function (t) { // need to simulate a missing package.json - var missing = path.join(__dirname, 'access-public-missing-guard') + var missing = path.join(pkg, 'access-public-missing-guard') mkdirp.sync(path.join(missing, 'node_modules')) common.npm([ @@ -83,7 +84,7 @@ test('npm access public when no package passed and no package.json', function (t test('npm access public when no package passed and invalid package.json', function (t) { // need to simulate a missing package.json - var invalid = path.join(__dirname, 'access-public-invalid-package') + var invalid = path.join(pkg, 'access-public-invalid-package') mkdirp.sync(path.join(invalid, 'node_modules')) // it's hard to force `read-package-json` to break w/o ENOENT, but this will do it fs.writeFileSync(path.join(invalid, 'package.json'), '{\n') @@ -380,7 +381,7 @@ test('npm access ls-packages on user', function (t) { test('npm access ls-packages with no package specified or package.json', function (t) { // need to simulate a missing package.json - var missing = path.join(__dirname, 'access-missing-guard') + var missing = path.join(pkg, 'access-missing-guard') mkdirp.sync(path.join(missing, 'node_modules')) var serverPackages = { diff --git a/deps/npm/test/tap/add-named-update-protocol-port.js b/deps/npm/test/tap/add-named-update-protocol-port.js index 37851e10686a14..2876b6cdbc4803 100644 --- a/deps/npm/test/tap/add-named-update-protocol-port.js +++ b/deps/npm/test/tap/add-named-update-protocol-port.js @@ -15,7 +15,7 @@ var fooPkg = { name: packageName, version: '0.0.0', dist: { - tarball: 'https://localhost:1338/registry/' + packageName + '/-/' + packageName + '-0.0.0.tgz', + tarball: 'https://localhost:' + common.altPort + '/registry/' + packageName + '/-/' + packageName + '-0.0.0.tgz', shasum: '356a192b7913b04c54574d18c28d46e6395428ab' } } @@ -30,7 +30,7 @@ var fooiPkg = { name: iPackageName, version: '0.0.0', dist: { - tarball: 'http://127.0.0.1:1338/registry/' + iPackageName + '/-/' + iPackageName + '-0.0.0.tgz', + tarball: 'http://127.0.0.1:' + common.altPort + '/registry/' + iPackageName + '/-/' + iPackageName + '-0.0.0.tgz', shasum: '356a192b7913b04c54574d18c28d46e6395428ab' } } @@ -39,13 +39,13 @@ var fooiPkg = { test('setup', function (t) { mr({ - port: 1337, + port: common.port, throwOnUnmatched: true }, function (err, s) { t.ifError(err, 'registry mocked successfully') server1 = s mr({ - port: 1338, + port: common.altPort, throwOnUnmatched: true }, function (err, s) { t.ifError(err, 'registry mocked successfully') @@ -67,7 +67,7 @@ test('tarball paths should update port if updating protocol', function (t) { 'add', packageName + '@0.0.0', '--registry', - 'http://localhost:1337/registry' + 'http://localhost:' + common.port + '/registry' ], {}, function (er, code, stdout, stderr) { @@ -92,7 +92,7 @@ test('tarball paths should NOT update if different hostname', function (t) { 'add', iPackageName + '@0.0.0', '--registry', - 'http://localhost:1337/registry' + 'http://localhost:' + common.port + '/registry' ], {}, function (er, code, stdout, stderr) { diff --git a/deps/npm/test/tap/add-remote-git-file.js b/deps/npm/test/tap/add-remote-git-file.js index 20392af8770be8..7d64609072dda0 100644 --- a/deps/npm/test/tap/add-remote-git-file.js +++ b/deps/npm/test/tap/add-remote-git-file.js @@ -13,8 +13,8 @@ var npm = require('../../lib/npm.js') var fetchPackageMetadata = require('../../lib/fetch-package-metadata.js') var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'add-remote-git-file') -var repo = resolve(__dirname, 'add-remote-git-file-repo') +var pkg = common.pkg +var repo = common.pkg + '-repo' var git var cloneURL = 'git+file://' + resolve(pkg, 'child.git') diff --git a/deps/npm/test/tap/add-remote-git-shrinkwrap.js b/deps/npm/test/tap/add-remote-git-shrinkwrap.js index c7fb2f9b961aa0..0daf2922e76455 100644 --- a/deps/npm/test/tap/add-remote-git-shrinkwrap.js +++ b/deps/npm/test/tap/add-remote-git-shrinkwrap.js @@ -9,8 +9,8 @@ var test = require('tap').test var npm = require('../../lib/npm.js') var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'add-remote-git-shrinkwrap') -var repo = resolve(__dirname, 'add-remote-git-shrinkwrap-repo') +var pkg = common.pkg +var repo = pkg + '-repo' var daemon var daemonPID @@ -20,7 +20,7 @@ var pjParent = JSON.stringify({ name: 'parent', version: '1.2.3', dependencies: { - 'child': 'git://localhost:1234/child.git#master' + 'child': 'git://localhost:' + common.gitPort + '/child.git#master' } }, null, 2) + '\n' @@ -73,7 +73,7 @@ test('shrinkwrap gets correct _from and _resolved (#7121)', function (t) { t.notOk(stderr, 'no error output') var treeish = stdout.trim() - t.like(shrinkwrap, {dependencies: {child: {version: 'git://localhost:1234/child.git#' + treeish}}}, + t.like(shrinkwrap, {dependencies: {child: {version: 'git://localhost:' + common.gitPort + '/child.git#' + treeish}}}, 'npm shrinkwrapped resolved correctly' ) @@ -114,7 +114,7 @@ function setup (cb) { '--export-all', '--base-path=.', '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: pkg, diff --git a/deps/npm/test/tap/add-remote-git-submodule.js b/deps/npm/test/tap/add-remote-git-submodule.js index 6e26712c561778..43b30f7a65bcb5 100644 --- a/deps/npm/test/tap/add-remote-git-submodule.js +++ b/deps/npm/test/tap/add-remote-git-submodule.js @@ -9,12 +9,12 @@ var test = require('tap').test var npm = require('../../lib/npm.js') var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'add-remote-git-submodule') -var repos = resolve(__dirname, 'add-remote-git-submodule-repos') +var pkg = common.pkg +var repos = pkg + '-repos' var subwt = resolve(repos, 'subwt') var topwt = resolve(repos, 'topwt') -var suburl = 'git://localhost:1234/sub.git' -var topurl = 'git://localhost:1234/top.git' +var suburl = 'git://localhost:' + common.gitPort + '/sub.git' +var topurl = 'git://localhost:' + common.gitPort + '/top.git' var daemon var daemonPID @@ -97,7 +97,7 @@ function setup (cb) { '--export-all', '--base-path=.', '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: repos, diff --git a/deps/npm/test/tap/add-remote-git.js b/deps/npm/test/tap/add-remote-git.js index 24abf33a773fd2..44294924f15a77 100644 --- a/deps/npm/test/tap/add-remote-git.js +++ b/deps/npm/test/tap/add-remote-git.js @@ -9,8 +9,8 @@ var test = require('tap').test var npm = require('../../lib/npm.js') var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'add-remote-git') -var repo = resolve(__dirname, 'add-remote-git-repo') +var pkg = common.pkg +var repo = pkg + '-repo' var daemon var daemonPID @@ -20,7 +20,7 @@ var pjParent = JSON.stringify({ name: 'parent', version: '1.2.3', dependencies: { - child: 'git://localhost:1234/child.git' + child: 'git://localhost:' + common.gitPort + '/child.git' } }, null, 2) + '\n' @@ -61,6 +61,7 @@ test('clean', function (t) { }) function bootstrap () { + cleanup() mkdirp.sync(pkg) fs.writeFileSync(resolve(pkg, 'package.json'), pjParent) } @@ -81,12 +82,12 @@ function setup (cb) { '--export-all', '--base-path=.', '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: pkg, env: process.env, - stdio: ['pipe', 'pipe', 'pipe'] + stdio: ['pipe', 1, 'pipe'] } ) d.stderr.on('data', childFinder) diff --git a/deps/npm/test/tap/adduser-always-auth.js b/deps/npm/test/tap/adduser-always-auth.js index d327e35a9e547a..26541eebbc7b64 100644 --- a/deps/npm/test/tap/adduser-always-auth.js +++ b/deps/npm/test/tap/adduser-always-auth.js @@ -6,8 +6,8 @@ var mr = require('npm-registry-mock') var test = require('tap').test var common = require('../common-tap.js') -var opts = {cwd: __dirname} -var outfile = path.resolve(__dirname, '_npmrc') +var opts = { cwd: common.pkg } +var outfile = path.resolve(common.pkg, '_npmrc') var responses = { 'Username': 'u\n', 'Password': 'p\n', @@ -98,7 +98,7 @@ test('npm login --scope uses :registry as its URI', function (t) ], opts, function (err, code) { - t.notOk(code, 'exited OK') + t.equal(code, 0, 'exited OK') t.notOk(err, 'no error output') var config = fs.readFileSync(outfile, 'utf8') t.like(config, new RegExp(scope + ':registry=' + uri), 'scope:registry is set') diff --git a/deps/npm/test/tap/adduser-legacy-auth.js b/deps/npm/test/tap/adduser-legacy-auth.js index 49015878f7d8ea..e46901c2b95fe5 100644 --- a/deps/npm/test/tap/adduser-legacy-auth.js +++ b/deps/npm/test/tap/adduser-legacy-auth.js @@ -7,8 +7,8 @@ var mr = require('npm-registry-mock') var test = require('tap').test var common = require('../common-tap.js') -var opts = { cwd: __dirname } -var pkg = path.resolve(__dirname, 'adduser-legacy-auth') +var opts = { cwd: common.pkg } +var pkg = common.pkg var outfile = path.resolve(pkg, '_npmrc') var contents = '_auth=' + Buffer.from('u:x').toString('base64') + '\n' + @@ -42,6 +42,7 @@ function mocks (server) { } test('setup', function (t) { + rimraf.sync(pkg) mkdirp(pkg, function (er) { t.ifError(er, pkg + ' made successfully') @@ -65,8 +66,8 @@ test('npm login', function (t) { opts, function (err, code, stdout, stderr) { if (err) throw err - t.is(code, 0, 'exited OK') t.is(stderr, '', 'no error output') + t.is(code, 0, 'exited OK') var config = fs.readFileSync(outfile, 'utf8') t.like(config, /:always-auth=false/, 'always-auth is scoped and false (by default)') s.close() diff --git a/deps/npm/test/tap/adduser-oauth.js b/deps/npm/test/tap/adduser-oauth.js index 04065048c425bb..241fef2a2ed7fa 100644 --- a/deps/npm/test/tap/adduser-oauth.js +++ b/deps/npm/test/tap/adduser-oauth.js @@ -7,8 +7,8 @@ var mr = require('npm-registry-mock') var test = require('tap').test var common = require('../common-tap.js') -var opts = { cwd: __dirname } -var pkg = path.resolve(__dirname, 'adduser-oauth') +var opts = { cwd: common.pkg } +var pkg = common.pkg var fakeBrowser = path.resolve(pkg, '_script.sh') var configfile = path.resolve(pkg, '_npmrc') var outfile = path.resolve(pkg, '_outfile') diff --git a/deps/npm/test/tap/adduser-saml.js b/deps/npm/test/tap/adduser-saml.js index 530ebb52b3c0ef..17a1a9f7b3de6b 100644 --- a/deps/npm/test/tap/adduser-saml.js +++ b/deps/npm/test/tap/adduser-saml.js @@ -7,8 +7,8 @@ var mr = require('npm-registry-mock') var test = require('tap').test var common = require('../common-tap.js') -var opts = { cwd: __dirname } -var pkg = path.resolve(__dirname, 'adduser-saml') +var opts = { cwd: common.pkg } +var pkg = common.pkg var fakeBrowser = path.resolve(pkg, '_script.sh') var configfile = path.resolve(pkg, '_npmrc') var outfile = path.resolve(pkg, '_outfile') diff --git a/deps/npm/test/tap/aliases.js b/deps/npm/test/tap/aliases.js index 19f0b1293e9358..0a0a9dfd953b1f 100644 --- a/deps/npm/test/tap/aliases.js +++ b/deps/npm/test/tap/aliases.js @@ -15,7 +15,7 @@ const { Dir, File } = Tacks const readdirAsync = BB.promisify(fs.readdir) const readFileAsync = BB.promisify(fs.readFile) -const testDir = path.join(__dirname, path.basename(__filename, '.js')) +const testDir = common.pkg let server test('setup', t => { @@ -98,12 +98,12 @@ test('installs an npm: protocol alias package', t => { bar: { version: '1.2.3', from: 'bar@npm:foo@1.2.3', - resolved: 'http://localhost:1337/foo/-/foo-1.2.3.tgz' + resolved: 'http://localhost:' + common.port + '/foo/-/foo-1.2.3.tgz' }, foo: { version: '1.2.3', from: 'foo@1.2.3', - resolved: 'http://localhost:1337/foo/-/foo-1.2.3.tgz' + resolved: 'http://localhost:' + common.port + '/foo/-/foo-1.2.3.tgz' } } }, 'both dependencies listed correctly') @@ -149,12 +149,12 @@ test('installs an npm: protocol alias package', t => { bar: { version: '1.2.4', from: 'bar@npm:foo@1.2.4', - resolved: 'http://localhost:1337/foo/-/foo-1.2.4.tgz' + resolved: 'http://localhost:' + common.port + '/foo/-/foo-1.2.4.tgz' }, foo: { version: '1.2.4', from: 'foo@1.2.4', - resolved: 'http://localhost:1337/foo/-/foo-1.2.4.tgz' + resolved: 'http://localhost:' + common.port + '/foo/-/foo-1.2.4.tgz' } } }, 'ls shows updated packages') diff --git a/deps/npm/test/tap/all-package-metadata-cache-stream-unit.js b/deps/npm/test/tap/all-package-metadata-cache-stream-unit.js index 0b4dd0e26d5ce2..9c1babd59c96c8 100644 --- a/deps/npm/test/tap/all-package-metadata-cache-stream-unit.js +++ b/deps/npm/test/tap/all-package-metadata-cache-stream-unit.js @@ -1,6 +1,6 @@ 'use strict' -require('../common-tap.js') +const common = require('../common-tap.js') const getStream = require('get-stream') const mkdirp = require('mkdirp') @@ -13,7 +13,7 @@ const {File} = Tacks const _createCacheEntryStream = require('../../lib/search/all-package-metadata.js')._createCacheEntryStream -const PKG_DIR = path.resolve(__dirname, 'create-cache-entry-stream') +const PKG_DIR = common.pkg const CACHE_DIR = path.resolve(PKG_DIR, 'cache') function setup () { diff --git a/deps/npm/test/tap/all-package-metadata-entry-stream-unit.js b/deps/npm/test/tap/all-package-metadata-entry-stream-unit.js index 4e916229cd852d..e693e6b33d76e4 100644 --- a/deps/npm/test/tap/all-package-metadata-entry-stream-unit.js +++ b/deps/npm/test/tap/all-package-metadata-entry-stream-unit.js @@ -14,7 +14,7 @@ const {File} = Tacks const _createEntryStream = require('../../lib/search/all-package-metadata.js')._createEntryStream -const PKG_DIR = path.resolve(__dirname, 'create-entry-update-stream') +const PKG_DIR = common.pkg const CACHE_DIR = path.resolve(PKG_DIR, 'cache') let server diff --git a/deps/npm/test/tap/all-package-metadata-update-stream-unit.js b/deps/npm/test/tap/all-package-metadata-update-stream-unit.js index 2c08ac347ed697..782bdf231c88db 100644 --- a/deps/npm/test/tap/all-package-metadata-update-stream-unit.js +++ b/deps/npm/test/tap/all-package-metadata-update-stream-unit.js @@ -11,7 +11,7 @@ const mr = require('npm-registry-mock') var _createEntryUpdateStream = require('../../lib/search/all-package-metadata.js')._createEntryUpdateStream -var PKG_DIR = path.resolve(__dirname, 'create-entry-update-stream') +var PKG_DIR = common.pkg var CACHE_DIR = path.resolve(PKG_DIR, 'cache') var server diff --git a/deps/npm/test/tap/all-package-metadata-write-stream-unit.js b/deps/npm/test/tap/all-package-metadata-write-stream-unit.js index 94bb7413f1b321..b258b40dfe666f 100644 --- a/deps/npm/test/tap/all-package-metadata-write-stream-unit.js +++ b/deps/npm/test/tap/all-package-metadata-write-stream-unit.js @@ -12,7 +12,7 @@ const ms = require('mississippi') const _createCacheWriteStream = require('../../lib/search/all-package-metadata.js')._createCacheWriteStream -const PKG_DIR = path.resolve(__dirname, 'create-cache-write-stream') +const PKG_DIR = common.pkg const CACHE_DIR = path.resolve(PKG_DIR, 'cache') function setup () { diff --git a/deps/npm/test/tap/all-package-metadata.js b/deps/npm/test/tap/all-package-metadata.js index 99d3fa26c52b87..ec605c3486bb9d 100644 --- a/deps/npm/test/tap/all-package-metadata.js +++ b/deps/npm/test/tap/all-package-metadata.js @@ -15,7 +15,7 @@ const File = Tacks.File const allPackageMetadata = require('../../lib/search/all-package-metadata.js') -const PKG_DIR = path.resolve(__dirname, path.basename(__filename, '.js'), 'update-index') +const PKG_DIR = path.resolve(common.pkg, 'update-index') const CACHE_DIR = path.resolve(PKG_DIR, 'cache', '_cacache') let cacheBase let cachePath diff --git a/deps/npm/test/tap/anon-cli-metrics.js b/deps/npm/test/tap/anon-cli-metrics.js index 100ca526cf1688..d021cf62bc92f0 100644 --- a/deps/npm/test/tap/anon-cli-metrics.js +++ b/deps/npm/test/tap/anon-cli-metrics.js @@ -9,7 +9,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/audit-fix.js b/deps/npm/test/tap/audit-fix.js index 7e955682890055..a832078ae9369e 100644 --- a/deps/npm/test/tap/audit-fix.js +++ b/deps/npm/test/tap/audit-fix.js @@ -13,7 +13,7 @@ const test = tap.test const Dir = Tacks.Dir const File = Tacks.File -const testDir = path.join(__dirname, path.basename(__filename, '.js')) +const testDir = common.pkg const EXEC_OPTS = { cwd: testDir } diff --git a/deps/npm/test/tap/audit.js b/deps/npm/test/tap/audit.js index 3384579f77ba70..631eedf276e37e 100644 --- a/deps/npm/test/tap/audit.js +++ b/deps/npm/test/tap/audit.js @@ -12,21 +12,10 @@ const test = tap.test const Dir = Tacks.Dir const File = Tacks.File -const testDir = path.join(__dirname, path.basename(__filename, '.js')) +const testDir = common.pkg const EXEC_OPTS = { cwd: testDir } -tap.tearDown(function () { - process.chdir(__dirname) - try { - rimraf.sync(testDir) - } catch (e) { - if (process.platform !== 'win32') { - throw e - } - } -}) - function tmock (t) { return mr({port: common.port}).then(s => { t.tearDown(function () { @@ -263,6 +252,209 @@ test('exits with non-zero exit code for vulnerabilities at the `audit-level` fla }) }) +test('exits with zero exit code for vulnerabilities in devDependencies when running with production flag', t => { + const fixture = new Tacks(new Dir({ + 'package.json': new File({ + name: 'foo', + version: '1.0.0', + dependencies: { + gooddep: '1.0.0' + }, + devDependencies: { + baddep: '1.0.0' + } + }) + })) + fixture.create(testDir) + return tmock(t).then(srv => { + srv.filteringRequestBody(req => 'ok') + srv.post('/-/npm/v1/security/audits/quick', 'ok').reply(200, 'yeah') + srv.get('/gooddep').twice().reply(200, { + name: 'gooddep', + 'dist-tags': { + 'latest': '1.2.3' + }, + versions: { + '1.0.0': { + name: 'gooddep', + version: '1.0.0', + _hasShrinkwrap: false, + dist: { + shasum: 'deadbeef', + tarball: common.registry + '/idk/-/idk-1.0.0.tgz' + } + }, + '1.2.3': { + name: 'gooddep', + version: '1.2.3', + _hasShrinkwrap: false, + dist: { + shasum: 'deadbeef', + tarball: common.registry + '/idk/-/idk-1.2.3.tgz' + } + } + } + }) + srv.get('/baddep').twice().reply(200, { + name: 'baddep', + 'dist-tags': { + 'latest': '1.2.3' + }, + versions: { + '1.0.0': { + name: 'baddep', + version: '1.0.0', + _hasShrinkwrap: false, + dist: { + shasum: 'deadbeef', + tarball: common.registry + '/idk/-/idk-1.0.0.tgz' + } + }, + '1.2.3': { + name: 'baddep', + version: '1.2.3', + _hasShrinkwrap: false, + dist: { + shasum: 'deadbeef', + tarball: common.registry + '/idk/-/idk-1.2.3.tgz' + } + } + } + }) + return common.npm([ + 'install', + '--audit', + '--json', + '--production', + '--package-lock-only', + '--registry', common.registry, + '--cache', path.join(testDir, 'npm-cache') + ], EXEC_OPTS).then(([code, stdout, stderr]) => { + srv.filteringRequestBody(req => 'ok') + srv.post('/-/npm/v1/security/audits', 'ok').reply(200, { + actions: [], + metadata: { + vulnerabilities: {} + } + }) + return common.npm([ + 'audit', + '--json', + '--production', + '--registry', common.registry, + '--cache', path.join(testDir, 'npm-cache') + ], EXEC_OPTS).then(([code, stdout, stderr]) => { + t.equal(code, 0, 'exited OK') + }) + }) + }) +}) + +test('exits with non-zero exit code for vulnerabilities in dependencies when running with production flag', t => { + const fixture = new Tacks(new Dir({ + 'package.json': new File({ + name: 'foo', + version: '1.0.0', + dependencies: { + baddep: '1.0.0' + }, + devDependencies: { + gooddep: '1.0.0' + } + }) + })) + fixture.create(testDir) + return tmock(t).then(srv => { + srv.filteringRequestBody(req => 'ok') + srv.post('/-/npm/v1/security/audits/quick', 'ok').reply(200, 'yeah') + srv.get('/baddep').twice().reply(200, { + name: 'baddep', + 'dist-tags': { + 'latest': '1.2.3' + }, + versions: { + '1.0.0': { + name: 'baddep', + version: '1.0.0', + _hasShrinkwrap: false, + dist: { + shasum: 'deadbeef', + tarball: common.registry + '/idk/-/idk-1.0.0.tgz' + } + }, + '1.2.3': { + name: 'baddep', + version: '1.2.3', + _hasShrinkwrap: false, + dist: { + shasum: 'deadbeef', + tarball: common.registry + '/idk/-/idk-1.2.3.tgz' + } + } + } + }) + srv.get('/gooddep').twice().reply(200, { + name: 'gooddep', + 'dist-tags': { + 'latest': '1.2.3' + }, + versions: { + '1.0.0': { + name: 'gooddep', + version: '1.0.0', + _hasShrinkwrap: false, + dist: { + shasum: 'deadbeef', + tarball: common.registry + '/idk/-/idk-1.0.0.tgz' + } + }, + '1.2.3': { + name: 'gooddep', + version: '1.2.3', + _hasShrinkwrap: false, + dist: { + shasum: 'deadbeef', + tarball: common.registry + '/idk/-/idk-1.2.3.tgz' + } + } + } + }) + return common.npm([ + 'install', + '--audit', + '--json', + '--production', + '--package-lock-only', + '--registry', common.registry, + '--cache', path.join(testDir, 'npm-cache') + ], EXEC_OPTS).then(([code, stdout, stderr]) => { + srv.filteringRequestBody(req => 'ok') + srv.post('/-/npm/v1/security/audits', 'ok').reply(200, { + actions: [{ + action: 'update', + module: 'baddep', + target: '1.2.3', + resolves: [{path: 'baddep'}] + }], + metadata: { + vulnerabilities: { + low: 1 + } + } + }) + return common.npm([ + 'audit', + '--json', + '--production', + '--registry', common.registry, + '--cache', path.join(testDir, 'npm-cache') + ], EXEC_OPTS).then(([code, stdout, stderr]) => { + t.equal(code, 1, 'exited OK') + }) + }) + }) +}) + test('cleanup', t => { return rimraf(testDir) }) diff --git a/deps/npm/test/tap/auto-prune.js b/deps/npm/test/tap/auto-prune.js index 3fa5d5d05b3609..8d129c4a83b21d 100644 --- a/deps/npm/test/tap/auto-prune.js +++ b/deps/npm/test/tap/auto-prune.js @@ -7,7 +7,7 @@ const File = Tacks.File const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/bearer-token-check.js b/deps/npm/test/tap/bearer-token-check.js index e3af793e602e5b..21c6b0beb2c2f0 100644 --- a/deps/npm/test/tap/bearer-token-check.js +++ b/deps/npm/test/tap/bearer-token-check.js @@ -11,7 +11,7 @@ var test = require('tap').test var common = require('../common-tap.js') var toNerfDart = require('../../lib/config/nerf-dart.js') -var pkg = resolve(__dirname, 'install-bearer-check') +var pkg = common.pkg var outfile = resolve(pkg, '_npmrc') var modules = resolve(pkg, 'node_modules') var tarballPath = '/scoped-underscore/-/scoped-underscore-1.3.1.tgz' diff --git a/deps/npm/test/tap/bin.js b/deps/npm/test/tap/bin.js index 33320bc21f59a1..bf2397777ce402 100644 --- a/deps/npm/test/tap/bin.js +++ b/deps/npm/test/tap/bin.js @@ -2,12 +2,12 @@ var path = require('path') var test = require('tap').test var rimraf = require('rimraf') var common = require('../common-tap.js') -var opts = { cwd: __dirname } -var binDir = '../../node_modules/.bin' -var fixture = path.resolve(__dirname, binDir) +var opts = { cwd: common.pkg } +var binDir = '../../../node_modules/.bin' +var fixture = path.resolve(common.pkg, binDir) test('setup', function (t) { - rimraf.sync(path.join(__dirname, 'node_modules')) + rimraf.sync(path.join(common.pkg, 'node_modules')) t.end() }) diff --git a/deps/npm/test/tap/bitbucket-https-url-with-creds-package.js b/deps/npm/test/tap/bitbucket-https-url-with-creds-package.js index ce65f15b28fba6..4177d5f89fcb76 100644 --- a/deps/npm/test/tap/bitbucket-https-url-with-creds-package.js +++ b/deps/npm/test/tap/bitbucket-https-url-with-creds-package.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'bitbucket-https-url-with-creds-package') +var pkg = common.pkg var json = { name: 'bitbucket-https-url-with-creds-package', diff --git a/deps/npm/test/tap/bitbucket-https-url-with-creds.js b/deps/npm/test/tap/bitbucket-https-url-with-creds.js index ae87d858487528..09f7e0e8e54889 100644 --- a/deps/npm/test/tap/bitbucket-https-url-with-creds.js +++ b/deps/npm/test/tap/bitbucket-https-url-with-creds.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'bitbucket-https-url-with-creds') +var pkg = common.pkg var json = { name: 'bitbucket-https-url-with-creds', diff --git a/deps/npm/test/tap/bitbucket-shortcut-package.js b/deps/npm/test/tap/bitbucket-shortcut-package.js index 8c418d37dcd0a8..bf1a39068ec875 100644 --- a/deps/npm/test/tap/bitbucket-shortcut-package.js +++ b/deps/npm/test/tap/bitbucket-shortcut-package.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'bitbucket-shortcut-package') +var pkg = common.pkg var json = { name: 'bitbucket-shortcut-package', diff --git a/deps/npm/test/tap/bitbucket-shortcut.js b/deps/npm/test/tap/bitbucket-shortcut.js index f8167fdd2dce23..c81554e2d9d208 100644 --- a/deps/npm/test/tap/bitbucket-shortcut.js +++ b/deps/npm/test/tap/bitbucket-shortcut.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'bitbucket-shortcut') +var pkg = common.pkg var json = { name: 'bitbucket-shortcut', diff --git a/deps/npm/test/tap/bugs.js b/deps/npm/test/tap/bugs.js index 4d2ee37e132d19..8e2685220dd936 100644 --- a/deps/npm/test/tap/bugs.js +++ b/deps/npm/test/tap/bugs.js @@ -8,15 +8,15 @@ var rimraf = require('rimraf') var fs = require('fs') var path = require('path') var join = path.join -var outFile = path.join(__dirname, '/_output') +var outFile = path.join(common.pkg, '/_output') -var opts = { cwd: __dirname } +var opts = { cwd: common.pkg } test('setup', function (t) { var s = '#!/usr/bin/env bash\n' + - 'echo "$@" > ' + JSON.stringify(__dirname) + '/_output\n' - fs.writeFileSync(join(__dirname, '/_script.sh'), s, 'ascii') - fs.chmodSync(join(__dirname, '/_script.sh'), '0755') + 'echo "$@" > ' + JSON.stringify(common.pkg) + '/_output\n' + fs.writeFileSync(join(common.pkg, '/_script.sh'), s, 'ascii') + fs.chmodSync(join(common.pkg, '/_script.sh'), '0755') t.pass('made script') t.end() }) @@ -28,7 +28,7 @@ test('npm bugs underscore', function (t) { 'bugs', 'underscore', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -52,7 +52,7 @@ test('npm bugs optimist - github (https://)', function (t) { 'bugs', 'optimist', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -76,7 +76,7 @@ test('npm bugs npm-test-peer-deps - no repo', function (t) { 'bugs', 'npm-test-peer-deps', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -100,7 +100,7 @@ test('npm bugs test-repo-url-http - non-github (http://)', function (t) { 'bugs', 'test-repo-url-http', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -124,7 +124,7 @@ test('npm bugs test-repo-url-https - gitlab (https://)', function (t) { 'bugs', 'test-repo-url-https', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -148,7 +148,7 @@ test('npm bugs test-repo-url-ssh - gitlab (ssh://)', function (t) { 'bugs', 'test-repo-url-ssh', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -166,7 +166,7 @@ test('npm bugs test-repo-url-ssh - gitlab (ssh://)', function (t) { }) test('cleanup', function (t) { - fs.unlinkSync(join(__dirname, '/_script.sh')) + rimraf.sync(common.pkg) t.pass('cleaned up') t.end() }) diff --git a/deps/npm/test/tap/build-already-built.js b/deps/npm/test/tap/build-already-built.js index 8a66f66e69f933..1e7359a558fa32 100644 --- a/deps/npm/test/tap/build-already-built.js +++ b/deps/npm/test/tap/build-already-built.js @@ -10,7 +10,8 @@ var requireInject = require('require-inject') var npm = require('../../lib/npm.js') -var PKG_DIR = path.resolve(__dirname, 'build-already-built') +const common = require('../common-tap.js') +var PKG_DIR = common.pkg var fakePkg = 'foo' test('setup', function (t) { diff --git a/deps/npm/test/tap/builtin-config.js b/deps/npm/test/tap/builtin-config.js index b960ed0383b7b6..dddd40565101a8 100644 --- a/deps/npm/test/tap/builtin-config.js +++ b/deps/npm/test/tap/builtin-config.js @@ -10,7 +10,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var folder = path.resolve(__dirname, 'builtin-config') +var folder = common.pkg var test = require('tap').test var npm = path.resolve(__dirname, '../..') var spawn = require('child_process').spawn diff --git a/deps/npm/test/tap/bundled-dependencies-nonarray.js b/deps/npm/test/tap/bundled-dependencies-nonarray.js index 924e1b27b60a3a..fdc32c2883af14 100644 --- a/deps/npm/test/tap/bundled-dependencies-nonarray.js +++ b/deps/npm/test/tap/bundled-dependencies-nonarray.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var dir = path.resolve(__dirname, path.basename(__filename, '.js')) +var dir = common.pkg var pkg = path.resolve(dir, 'pkg-with-bundled') var dep = path.resolve(dir, 'a-bundled-dep') diff --git a/deps/npm/test/tap/bundled-dependencies.js b/deps/npm/test/tap/bundled-dependencies.js index c6d67e3c503a57..6dbfa8cb08d74f 100644 --- a/deps/npm/test/tap/bundled-dependencies.js +++ b/deps/npm/test/tap/bundled-dependencies.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var mkdirp = require('mkdirp') var fs = require('graceful-fs') var tar = require('tar') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-bundled-deps') var targetpath = path.resolve(basepath, 'target') var Tacks = require('tacks') diff --git a/deps/npm/test/tap/bundled-transitive-deps.js b/deps/npm/test/tap/bundled-transitive-deps.js index fe591490626365..d3f296ab1612f5 100644 --- a/deps/npm/test/tap/bundled-transitive-deps.js +++ b/deps/npm/test/tap/bundled-transitive-deps.js @@ -9,7 +9,7 @@ var common = require('../common-tap.js') var npm = require('../../lib/npm.js') var tar = require('tar') var mkdirp = require('mkdirp') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var packed = path.join(testdir, 'packed') var fixture = new Tacks( diff --git a/deps/npm/test/tap/cache-add-unpublished.js b/deps/npm/test/tap/cache-add-unpublished.js index 0e8a9de8bfa67a..08592a50deebb3 100644 --- a/deps/npm/test/tap/cache-add-unpublished.js +++ b/deps/npm/test/tap/cache-add-unpublished.js @@ -11,7 +11,7 @@ test('cache add', function (t) { 'cache', 'add', 'superfoo', - '--registry=http://localhost:1337/' + '--registry=http://localhost:' + common.port + '/' ], {}, function (er, c, so, se) { @@ -31,7 +31,7 @@ function setup (cb) { res.statusCode = 404 res.end('{"error":"not_found"}\n') }) - s.listen(1337, function () { + s.listen(common.port, function () { cb(null, s) }) } diff --git a/deps/npm/test/tap/cache-shasum-fork.js b/deps/npm/test/tap/cache-shasum-fork.js index 1e92d437560d71..3bc2a5d2a59ae9 100644 --- a/deps/npm/test/tap/cache-shasum-fork.js +++ b/deps/npm/test/tap/cache-shasum-fork.js @@ -14,7 +14,7 @@ var common = require('../common-tap.js') var forkPath = path.resolve( __dirname, '..', 'fixtures', 'forked-underscore-1.5.1.tgz' ) -var pkg = path.resolve(__dirname, 'cache-shasum-fork') +var pkg = common.pkg var cache = path.join(pkg, 'cache') var server diff --git a/deps/npm/test/tap/check-cpu-reqs.js b/deps/npm/test/tap/check-cpu-reqs.js index 4d8c3dc6551c4b..0a36492430badf 100644 --- a/deps/npm/test/tap/check-cpu-reqs.js +++ b/deps/npm/test/tap/check-cpu-reqs.js @@ -7,7 +7,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installFrom = path.join(base, 'from') var installIn = path.join(base, 'in') diff --git a/deps/npm/test/tap/check-engine-reqs.js b/deps/npm/test/tap/check-engine-reqs.js index 8dd9b8231fb5ed..7cbbcd354f9973 100644 --- a/deps/npm/test/tap/check-engine-reqs.js +++ b/deps/npm/test/tap/check-engine-reqs.js @@ -7,7 +7,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installFrom = path.join(base, 'from') var installIn = path.join(base, 'in') diff --git a/deps/npm/test/tap/check-install-self.js b/deps/npm/test/tap/check-install-self.js index 2cde1606a91e05..e7591b55e09393 100644 --- a/deps/npm/test/tap/check-install-self.js +++ b/deps/npm/test/tap/check-install-self.js @@ -7,7 +7,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installFrom = path.join(base, 'from') var installIn = path.join(base, 'in') diff --git a/deps/npm/test/tap/check-os-reqs.js b/deps/npm/test/tap/check-os-reqs.js index 5d0c1ecf78b07c..6c43fa61aa637f 100644 --- a/deps/npm/test/tap/check-os-reqs.js +++ b/deps/npm/test/tap/check-os-reqs.js @@ -7,7 +7,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installFrom = path.join(base, 'from') var installIn = path.join(base, 'in') diff --git a/deps/npm/test/tap/check-permissions.js b/deps/npm/test/tap/check-permissions.js index 0a5f2e038adf13..74e49fb65fb6c4 100644 --- a/deps/npm/test/tap/check-permissions.js +++ b/deps/npm/test/tap/check-permissions.js @@ -8,7 +8,8 @@ var writableFallback = require('../../lib/install/writable.js').fsOpenImplementa var exists = require('../../lib/install/exists.js').fsAccessImplementation var existsFallback = require('../../lib/install/exists.js').fsStatImplementation -var testBase = path.resolve(__dirname, 'check-permissions') +const common = require('../common-tap.js') +var testBase = common.pkg var existingDir = path.resolve(testBase, 'exists') var nonExistingDir = path.resolve(testBase, 'does-not-exist') var writableDir = path.resolve(testBase, 'writable') diff --git a/deps/npm/test/tap/ci-header.js b/deps/npm/test/tap/ci-header.js index dc20cc53c305a0..530da3bf3a72a7 100644 --- a/deps/npm/test/tap/ci-header.js +++ b/deps/npm/test/tap/ci-header.js @@ -8,7 +8,7 @@ var Dir = Tacks.Dir var chain = require('slide').chain var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/ci.js b/deps/npm/test/tap/ci.js index 9d69e3e5eb5240..9150f26efeedce 100644 --- a/deps/npm/test/tap/ci.js +++ b/deps/npm/test/tap/ci.js @@ -12,7 +12,7 @@ const test = require('tap').test const Dir = Tacks.Dir const File = Tacks.File -const testDir = path.join(__dirname, 'ci') +const testDir = common.pkg const EXEC_OPTS = { cwd: testDir } @@ -44,25 +44,27 @@ test('setup', () => { const fixture = new Tacks(Dir({ 'package.json': File(PKG) })) - fixture.create(testDir) - return mr({port: common.port}) + return rimraf(testDir).then(() => { + fixture.create(testDir) + return mr({port: common.port}) + }) .then((server) => { SERVER = server return common.npm([ 'install', '--registry', common.registry ], EXEC_OPTS) - .then(() => fs.readFileAsync( - path.join(testDir, 'package-lock.json'), - 'utf8') - ) - .then((lock) => { - RAW_LOCKFILE = lock - }) - .then(() => common.npm(['ls', '--json'], EXEC_OPTS)) - .then((ret) => { - TREE = scrubFrom(JSON.parse(ret[1])) - }) + }) + .then(() => fs.readFileAsync( + path.join(testDir, 'package-lock.json'), + 'utf8') + ) + .then((lock) => { + RAW_LOCKFILE = lock + }) + .then(() => common.npm(['ls', '--json'], EXEC_OPTS)) + .then((ret) => { + TREE = scrubFrom(JSON.parse(ret[1])) }) }) diff --git a/deps/npm/test/tap/circular-dep.js b/deps/npm/test/tap/circular-dep.js index d7f66eacef1ac9..a08c41bf4a9af3 100644 --- a/deps/npm/test/tap/circular-dep.js +++ b/deps/npm/test/tap/circular-dep.js @@ -11,7 +11,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.resolve(__dirname, 'circular-dep') +var pkg = common.pkg var minimist = path.join(pkg, 'minimist') var EXEC_OPTS = { diff --git a/deps/npm/test/tap/config-basic.js b/deps/npm/test/tap/config-basic.js index 0483695cf5f25c..a95e94db29fd66 100644 --- a/deps/npm/test/tap/config-basic.js +++ b/deps/npm/test/tap/config-basic.js @@ -1,6 +1,6 @@ var test = require('tap').test +var common = require('../common-config.js') var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') var path = require('path') var projectData = { @@ -58,15 +58,7 @@ var expectSources = { } function isDeeplyDetails (t, aa, bb, msg, seen) { - if (aa == null && bb == null) return t.pass(msg) - if (typeof bb !== 'object') return t.is(aa, bb, msg) - if (!seen) seen = [] - for (var kk in seen) if (seen[kk] === aa || seen[kk] === bb) return - seen.push(aa, bb) - t.is(Object.keys(aa).length, Object.keys(bb).length, msg + ': # of elements') - Object.keys(bb).forEach(function (key) { - isDeeplyDetails(t, aa[key], bb[key], msg + ' -> ' + key, seen) - }) + return t.same(aa, bb, msg) } test('no builtin', function (t) { diff --git a/deps/npm/test/tap/config-builtin.js b/deps/npm/test/tap/config-builtin.js index 885d099a1fc305..713522d6ccfa23 100644 --- a/deps/npm/test/tap/config-builtin.js +++ b/deps/npm/test/tap/config-builtin.js @@ -1,6 +1,6 @@ var test = require('tap').test var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') +var common = require('../common-config.js') var path = require('path') var ucData = common.ucData diff --git a/deps/npm/test/tap/config-certfile.js b/deps/npm/test/tap/config-certfile.js index 4b960672ad79e5..904a8c0147718b 100644 --- a/deps/npm/test/tap/config-certfile.js +++ b/deps/npm/test/tap/config-certfile.js @@ -1,4 +1,4 @@ -require('./00-config-setup.js') +require('../common-config.js') var path = require('path') var fs = require('fs') diff --git a/deps/npm/test/tap/config-credentials.js b/deps/npm/test/tap/config-credentials.js index f6f00ee0e65183..d8f6770666e2dd 100644 --- a/deps/npm/test/tap/config-credentials.js +++ b/deps/npm/test/tap/config-credentials.js @@ -1,7 +1,7 @@ var test = require('tap').test var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') +var common = require('../common-config.js') var URI = 'https://registry.lvh.me:8661/' diff --git a/deps/npm/test/tap/config-edit.js b/deps/npm/test/tap/config-edit.js index 7d6eb2588d48b6..a4f78a262c8b9a 100644 --- a/deps/npm/test/tap/config-edit.js +++ b/deps/npm/test/tap/config-edit.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'npm-global-edit') +var pkg = common.pkg var editorSrc = function () { /* #!/usr/bin/env node diff --git a/deps/npm/test/tap/config-envReplace.js b/deps/npm/test/tap/config-envReplace.js index 0b4f628d67339a..f65609f050f751 100644 --- a/deps/npm/test/tap/config-envReplace.js +++ b/deps/npm/test/tap/config-envReplace.js @@ -8,7 +8,8 @@ const ini = require('ini') const test = require('tap').test const npmconf = require('../../lib/config/core.js') -const packagePath = path.resolve(__dirname, 'config-envReplace') +const common = require('../common-tap.js') +const packagePath = common.pkg const packageJsonFile = JSON.stringify({ name: 'config-envReplace' diff --git a/deps/npm/test/tap/config-list.js b/deps/npm/test/tap/config-list.js index 05402d4bbe6ee5..7559214a727a57 100644 --- a/deps/npm/test/tap/config-list.js +++ b/deps/npm/test/tap/config-list.js @@ -5,7 +5,7 @@ var rimraf = require('rimraf') var mkdirp = require('mkdirp') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'config-list') +var pkg = common.pkg var opts = { cwd: pkg, env: common.emptyEnv() } var npmrc = path.resolve(pkg, '.npmrc') var npmrcContents = ` diff --git a/deps/npm/test/tap/config-malformed.js b/deps/npm/test/tap/config-malformed.js index 4f74ea5387e59c..0d859e00340f33 100644 --- a/deps/npm/test/tap/config-malformed.js +++ b/deps/npm/test/tap/config-malformed.js @@ -1,7 +1,7 @@ var test = require('tap').test var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') +var common = require('../common-config.js') test('with malformed', function (t) { npmconf.load({}, common.malformed, function (er, conf) { diff --git a/deps/npm/test/tap/config-new-cafile.js b/deps/npm/test/tap/config-new-cafile.js index 9cffb19008ed4b..bd5792f3e3ff7d 100644 --- a/deps/npm/test/tap/config-new-cafile.js +++ b/deps/npm/test/tap/config-new-cafile.js @@ -1,4 +1,4 @@ -require('./00-config-setup.js') +const common = require('../common-tap.js') var path = require('path') var fs = require('graceful-fs') @@ -8,8 +8,9 @@ var rimraf = require('rimraf') var osenv = require('osenv') var npmconf = require('../../lib/config/core.js') -var dir = path.resolve(__dirname, 'config-new-cafile') +var dir = common.pkg var beep = path.resolve(dir, 'beep.pem') +var npmrc = path.resolve(dir, 'npmrc') test('setup', function (t) { bootstrap() @@ -18,7 +19,7 @@ test('setup', function (t) { test('can set new cafile when old is gone', function (t) { t.plan(5) - npmconf.load(function (error, conf) { + npmconf.load({ userconfig: npmrc }, function (error, conf) { npmconf.loaded = false t.ifError(error) conf.set('cafile', beep, 'user') @@ -26,7 +27,7 @@ test('can set new cafile when old is gone', function (t) { t.ifError(error) t.equal(conf.get('cafile'), beep) rimraf.sync(beep) - npmconf.load(function (error, conf) { + npmconf.load({ userconfig: npmrc }, function (error, conf) { if (error) { throw error } @@ -47,6 +48,7 @@ test('cleanup', function (t) { function bootstrap () { mkdirp.sync(dir) + fs.writeFileSync(npmrc, '') fs.writeFileSync(beep, '') } diff --git a/deps/npm/test/tap/config-private.js b/deps/npm/test/tap/config-private.js index 91582921e6dffa..e6bf9d2e83cee3 100644 --- a/deps/npm/test/tap/config-private.js +++ b/deps/npm/test/tap/config-private.js @@ -5,7 +5,7 @@ var rimraf = require('rimraf') var mkdirp = require('mkdirp') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'config-private') +var pkg = common.pkg var opts = { cwd: pkg } test('setup', function (t) { diff --git a/deps/npm/test/tap/config-project.js b/deps/npm/test/tap/config-project.js index b9e8b7ac04a2ef..0f7be913c097fa 100644 --- a/deps/npm/test/tap/config-project.js +++ b/deps/npm/test/tap/config-project.js @@ -3,7 +3,7 @@ var path = require('path') var fix = path.resolve(__dirname, '..', 'fixtures', 'config') var projectRc = path.resolve(fix, '.npmrc') var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') +var common = require('../common-config.js') var projectData = { just: 'testing' } diff --git a/deps/npm/test/tap/config-save.js b/deps/npm/test/tap/config-save.js index a7f85d6015e4bb..23dc7b59607859 100644 --- a/deps/npm/test/tap/config-save.js +++ b/deps/npm/test/tap/config-save.js @@ -1,13 +1,15 @@ var fs = require('fs') var ini = require('ini') -var test = require('tap').test +var t = require('tap') +const test = t.test +var common = require('../common-config.js') +var commonTap = require('../common-tap.js') var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') var expectConf = [ 'globalconfig = ' + common.globalconfig, 'email = i@izs.me', - 'env-thing = asdf', + 'env-thing = foo', 'init.author.name = Isaac Z. Schlueter', 'init.author.email = i@izs.me', 'init.author.url = http://blog.izs.me/', @@ -32,7 +34,7 @@ var expectConf = [ var expectFile = [ 'globalconfig = ' + common.globalconfig, 'email = i@izs.me', - 'env-thing = asdf', + 'env-thing = foo', 'init.author.name = Isaac Z. Schlueter', 'init.author.email = i@izs.me', 'init.author.url = http://blog.izs.me/', @@ -54,6 +56,10 @@ var expectFile = [ '' ].join('\n') +const userconfig = commonTap.pkg + '/userconfig' +fs.writeFileSync(userconfig, fs.readFileSync(common.userconfig)) +process.env.npm_config_userconfig = userconfig + test('saving configs', function (t) { npmconf.load(function (er, conf) { if (er) throw er diff --git a/deps/npm/test/tap/correct-mkdir.js b/deps/npm/test/tap/correct-mkdir.js index 2c93f943ad5c46..c69f8b00b55d53 100644 --- a/deps/npm/test/tap/correct-mkdir.js +++ b/deps/npm/test/tap/correct-mkdir.js @@ -1,9 +1,9 @@ /* eslint-disable camelcase */ var test = require('tap').test var assert = require('assert') -var path = require('path') var requireInject = require('require-inject') -var cache_dir = path.resolve(__dirname, 'correct-mkdir') +const common = require('../common-tap.js') +var cache_dir = common.pkg test('correct-mkdir: no race conditions', function (t) { var mock_fs = {} diff --git a/deps/npm/test/tap/cruft-test.js b/deps/npm/test/tap/cruft-test.js index 0cbcc6f56c61d6..4f2ed6c0d0a713 100644 --- a/deps/npm/test/tap/cruft-test.js +++ b/deps/npm/test/tap/cruft-test.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var cruft = path.join(base, 'node_modules', 'cruuuft') var pkg = { name: 'example', diff --git a/deps/npm/test/tap/debug-logs.js b/deps/npm/test/tap/debug-logs.js index a6997352636fe2..0e951c4bb082be 100644 --- a/deps/npm/test/tap/debug-logs.js +++ b/deps/npm/test/tap/debug-logs.js @@ -8,7 +8,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') @@ -66,16 +66,28 @@ test('example', function (t) { t.matches(path.relative(cachedir, logfile), /^_logs/, 'debug log is inside the cache in _logs') } - // we run a bunch concurrently, this will actually create > than our limit as the check is done - // when the command starts - var todo = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] + // we run a bunch concurrently, this will actually create > than our limit + // as the check is done when the command starts + // + // It has to be > the log count (10) but also significantly higher than + // the number of cores on the machine, or else some might be able to get + // to the log folder pruning logic in parallel, resulting in FEWER files + // than we expect being present at the end. + var procCount = Math.max(require('os').cpus().length * 2, 12) + var todo = new Array(procCount).join(',').split(',').map((v, k) => k) asyncMap(todo, function (num, next) { + // another way would be to just simulate this? + // var f = path.join(cachedir, '_logs', num + '-debug.log') + // require('fs').writeFile(f, 'log ' + num, next) common.npm(['run', '--logs-max=10', 'false'], conf, function (err, code) { if (err) throw err t.is(code, 1, 'run #' + num + ' errored as expected') next() }) }, function () { + var files = glob.sync(path.join(cachedir, '_logs', '*')) + t.ok(files.length > 10, 'there should be more than 10 log files') + // now we do one more and that should clean up the list common.npm(['run', '--logs-max=10', 'false'], conf, function (err, code) { if (err) throw err diff --git a/deps/npm/test/tap/dedupe-git-semver.js b/deps/npm/test/tap/dedupe-git-semver.js index 21e372e24b0d0e..35bb2c87d80e78 100644 --- a/deps/npm/test/tap/dedupe-git-semver.js +++ b/deps/npm/test/tap/dedupe-git-semver.js @@ -36,7 +36,8 @@ const npm = requireInject.installGlobally('../../lib/npm.js', { } }) -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const common = require('../common-tap.js') +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const tmpdir = path.join(basedir, 'tmp') diff --git a/deps/npm/test/tap/dedupe-scoped.js b/deps/npm/test/tap/dedupe-scoped.js index 9d5ff9ac4c0034..957f67e141c40c 100644 --- a/deps/npm/test/tap/dedupe-scoped.js +++ b/deps/npm/test/tap/dedupe-scoped.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var pkg = join(__dirname, 'dedupe-scoped') +var pkg = common.pkg var modules = join(pkg, 'node_modules') var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/dedupe.js b/deps/npm/test/tap/dedupe.js index b6c601cbad37e3..109f81656237bf 100644 --- a/deps/npm/test/tap/dedupe.js +++ b/deps/npm/test/tap/dedupe.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, 'dedupe') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/dist-tag.js b/deps/npm/test/tap/dist-tag.js index 3631a598e9c684..0567964d35a230 100644 --- a/deps/npm/test/tap/dist-tag.js +++ b/deps/npm/test/tap/dist-tag.js @@ -7,7 +7,7 @@ var mr = require('npm-registry-mock') var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'dist-tag') +var pkg = common.pkg var server var scoped = { diff --git a/deps/npm/test/tap/do-not-remove-other-bins.js b/deps/npm/test/tap/do-not-remove-other-bins.js index 6fec728d43bcc3..4e6b0d27b2f537 100644 --- a/deps/npm/test/tap/do-not-remove-other-bins.js +++ b/deps/npm/test/tap/do-not-remove-other-bins.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap') -var base = path.resolve(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installPath = path.resolve(base, 'install') var installBin = path.resolve(installPath, 'node_modules', '.bin') var packageApath = path.resolve(base, 'packageA') diff --git a/deps/npm/test/tap/doctor.js b/deps/npm/test/tap/doctor.js index 26c74833e2bfcf..6ee05746960d6a 100644 --- a/deps/npm/test/tap/doctor.js +++ b/deps/npm/test/tap/doctor.js @@ -13,7 +13,7 @@ const which = require('which') const Dir = Tacks.Dir const File = Tacks.File -const ROOT = path.join(__dirname, path.basename(__filename, '.js')) +const ROOT = common.pkg const CACHE = path.join(ROOT, 'cache') const TMP = path.join(ROOT, 'tmp') const PREFIX = path.join(ROOT, 'global-prefix') diff --git a/deps/npm/test/tap/extraneous-dep-cycle-ls-ok.js b/deps/npm/test/tap/extraneous-dep-cycle-ls-ok.js index d483b3e22ac332..11f52209ed8359 100644 --- a/deps/npm/test/tap/extraneous-dep-cycle-ls-ok.js +++ b/deps/npm/test/tap/extraneous-dep-cycle-ls-ok.js @@ -8,7 +8,7 @@ var rimraf = require('rimraf') var common = require('../common-tap') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var pathModA = path.join(pkg, 'node_modules', 'moduleA') var pathModB = path.join(pkg, 'node_modules', 'moduleB') diff --git a/deps/npm/test/tap/false-name.js b/deps/npm/test/tap/false-name.js index 1e2a4d43ddbb93..301be4fc8ef945 100644 --- a/deps/npm/test/tap/false-name.js +++ b/deps/npm/test/tap/false-name.js @@ -18,7 +18,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'false-name') +var pkg = common.pkg var cache = path.join(pkg, 'cache') var server diff --git a/deps/npm/test/tap/fetch-package-metadata.js b/deps/npm/test/tap/fetch-package-metadata.js index 2fc501369e52f1..9a45fb57a92deb 100644 --- a/deps/npm/test/tap/fetch-package-metadata.js +++ b/deps/npm/test/tap/fetch-package-metadata.js @@ -11,7 +11,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg function setup (cb) { cleanup() @@ -56,7 +56,7 @@ test('fetch-package-metadata provides resolved metadata', function (t) { function thenVerifyMetadata (err, pkg) { t.ifError(err, 'fetched metadata') - t.equals(pkg._resolved, 'http://localhost:1337/test-package/-/test-package-0.0.0.tgz', '_resolved') + t.equals(pkg._resolved, 'http://localhost:' + common.port + '/test-package/-/test-package-0.0.0.tgz', '_resolved') t.equals(pkg._integrity, 'sha1-sNMrbEXCWcV4uiADdisgUTG9+9E=', '_integrity') server.close() t.end() diff --git a/deps/npm/test/tap/full-warning-messages.js b/deps/npm/test/tap/full-warning-messages.js index c986695d67e994..945cf66a629dd1 100644 --- a/deps/npm/test/tap/full-warning-messages.js +++ b/deps/npm/test/tap/full-warning-messages.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var fs = require('graceful-fs') var common = require('../common-tap') -var base = path.resolve(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var modA = path.resolve(base, 'modA') var modB = path.resolve(base, 'modB') diff --git a/deps/npm/test/tap/gently-rm-cmdshims.js b/deps/npm/test/tap/gently-rm-cmdshims.js index 304c6956bdfd60..6726fe76d8dbae 100644 --- a/deps/npm/test/tap/gently-rm-cmdshims.js +++ b/deps/npm/test/tap/gently-rm-cmdshims.js @@ -7,7 +7,8 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var npm = require('../../lib/npm.js') -var work = path.join(__dirname, path.basename(__filename, '.js')) +const common = require('../common-tap.js') +var work = common.pkg var doremove = path.join(work, 'doremove') var dontremove = path.join(work, 'dontremove') var example_json = { diff --git a/deps/npm/test/tap/gently-rm-linked-module.js b/deps/npm/test/tap/gently-rm-linked-module.js index 877c683c9f04e6..ab595e10c740f7 100644 --- a/deps/npm/test/tap/gently-rm-linked-module.js +++ b/deps/npm/test/tap/gently-rm-linked-module.js @@ -1,6 +1,5 @@ var common = require('../common-tap.js') -var basename = require('path').basename var resolve = require('path').resolve var fs = require('graceful-fs') var test = require('tap').test @@ -11,7 +10,7 @@ var Dir = Tacks.Dir var Symlink = Tacks.Symlink var isWindows = require('../../lib/utils/is-windows.js') -var base = resolve(__dirname, basename(__filename, '.js')) +var base = common.pkg var fixture = new Tacks(Dir({ 'working-dir': Dir({ 'node_modules': Dir({}) // so it doesn't try to install into npm's own node_modules diff --git a/deps/npm/test/tap/gently-rm-overeager.js b/deps/npm/test/tap/gently-rm-overeager.js index 7299b2c3f4ce11..91a3768aff705a 100644 --- a/deps/npm/test/tap/gently-rm-overeager.js +++ b/deps/npm/test/tap/gently-rm-overeager.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var pkg = path.join(testdir, 'gently-rm-overeager') var dep = path.join(testdir, 'test-whoops') diff --git a/deps/npm/test/tap/gently-rm-symlinked-global-dir.js b/deps/npm/test/tap/gently-rm-symlinked-global-dir.js index 8ac290091ca5c1..0a27dae5c5e955 100644 --- a/deps/npm/test/tap/gently-rm-symlinked-global-dir.js +++ b/deps/npm/test/tap/gently-rm-symlinked-global-dir.js @@ -7,10 +7,10 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var isWindows = require('../../lib/utils/is-windows.js') -var pkg = resolve(__dirname, 'gently-rm-linked') -var dep = resolve(__dirname, 'test-linked') -var glb = resolve(__dirname, 'test-global') -var lnk = resolve(__dirname, 'test-global-link') +var pkg = resolve(common.pkg, 'package') +var dep = resolve(common.pkg, 'test-linked') +var glb = resolve(common.pkg, 'test-global') +var lnk = resolve(common.pkg, 'test-global-link') var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/gist-short-shortcut-package.js b/deps/npm/test/tap/gist-short-shortcut-package.js index 4074995ee5cc49..d7c70b16b029fc 100644 --- a/deps/npm/test/tap/gist-short-shortcut-package.js +++ b/deps/npm/test/tap/gist-short-shortcut-package.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gist-short-shortcut-package') +var pkg = common.pkg var json = { name: 'gist-short-shortcut-package', diff --git a/deps/npm/test/tap/gist-short-shortcut.js b/deps/npm/test/tap/gist-short-shortcut.js index 875c30e0365124..04bf5bd42a9859 100644 --- a/deps/npm/test/tap/gist-short-shortcut.js +++ b/deps/npm/test/tap/gist-short-shortcut.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gist-short-shortcut') +var pkg = common.pkg var json = { name: 'gist-short-shortcut', diff --git a/deps/npm/test/tap/gist-shortcut-package.js b/deps/npm/test/tap/gist-shortcut-package.js index dd6f41359e9edd..9851e80b0e07ac 100644 --- a/deps/npm/test/tap/gist-shortcut-package.js +++ b/deps/npm/test/tap/gist-shortcut-package.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gist-shortcut-package') +var pkg = common.pkg var json = { name: 'gist-shortcut-package', diff --git a/deps/npm/test/tap/gist-shortcut.js b/deps/npm/test/tap/gist-shortcut.js index 8ad5ef001ce237..9958a996e076c9 100644 --- a/deps/npm/test/tap/gist-shortcut.js +++ b/deps/npm/test/tap/gist-shortcut.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gist-shortcut') +var pkg = common.pkg var json = { name: 'gist-shortcut', diff --git a/deps/npm/test/tap/git-dependency-install-link.js b/deps/npm/test/tap/git-dependency-install-link.js index 1bf839f3028910..462df8973fead1 100644 --- a/deps/npm/test/tap/git-dependency-install-link.js +++ b/deps/npm/test/tap/git-dependency-install-link.js @@ -11,9 +11,9 @@ var mr = require('npm-registry-mock') var npm = require('../../lib/npm.js') var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'git-dependency-install-link') -var repo = resolve(__dirname, 'git-dependency-install-link-repo') -var prefix = resolve(__dirname, 'git-dependency-install-link-prefix') +var pkg = common.pkg +var repo = pkg + '-repo' +var prefix = pkg + '-prefix' var cache = resolve(pkg, 'cache') var daemon @@ -32,7 +32,7 @@ var pjParent = JSON.stringify({ name: 'parent', version: '1.2.3', dependencies: { - 'child': 'git://localhost:1234/child.git' + 'child': 'git://localhost:' + common.gitPort + '/child.git' } }, null, 2) + '\n' @@ -139,7 +139,7 @@ function setup (cb) { '--export-all', '--base-path=.', '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: pkg, diff --git a/deps/npm/test/tap/git-npmignore.js b/deps/npm/test/tap/git-npmignore.js index 19d014c3d9a929..42c1637b18013b 100644 --- a/deps/npm/test/tap/git-npmignore.js +++ b/deps/npm/test/tap/git-npmignore.js @@ -1,7 +1,6 @@ /* eslint-disable camelcase */ var child_process = require('child_process') var readdir = require('graceful-fs').readdirSync -var path = require('path') var resolve = require('path').resolve var rimraf = require('rimraf') @@ -42,7 +41,7 @@ var fixture = new Tacks(Dir({ }) })) -var testdir = resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var cachedir = resolve(testdir, 'cache') var dep = resolve(testdir, 'deps', 'gitch') var packname = 'gitch-1.0.0.tgz' diff --git a/deps/npm/test/tap/git-prepare.js b/deps/npm/test/tap/git-prepare.js index 1a61056b4beda1..9112828ce40cde 100644 --- a/deps/npm/test/tap/git-prepare.js +++ b/deps/npm/test/tap/git-prepare.js @@ -11,7 +11,7 @@ const mr = require('npm-registry-mock') const npm = require('../../lib/npm.js') const common = require('../common-tap.js') -const testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +const testdir = common.pkg const repo = path.join(testdir, 'repo') const prefix = path.join(testdir, 'prefix') const cache = path.join(testdir, 'cache') @@ -37,7 +37,7 @@ const fixture = new Tacks(Dir({ name: 'parent', version: '1.2.3', dependencies: { - 'child': 'git://localhost:1234/child.git' + 'child': 'git://localhost:' + common.gitPort + '/child.git' } }) }), @@ -144,7 +144,7 @@ function setup (cb) { '--export-all', '--base-path=.', '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: repo, diff --git a/deps/npm/test/tap/github-shortcut-package.js b/deps/npm/test/tap/github-shortcut-package.js index 73385436b78930..a084479e1791e1 100644 --- a/deps/npm/test/tap/github-shortcut-package.js +++ b/deps/npm/test/tap/github-shortcut-package.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'github-shortcut-package') +var pkg = common.pkg var json = { name: 'github-shortcut-package', diff --git a/deps/npm/test/tap/github-shortcut.js b/deps/npm/test/tap/github-shortcut.js index 641d64f3b92fea..90f4655149bb9d 100644 --- a/deps/npm/test/tap/github-shortcut.js +++ b/deps/npm/test/tap/github-shortcut.js @@ -13,7 +13,7 @@ const test = require('tap').test const common = require('../common-tap.js') -const pkg = path.resolve(__dirname, 'github-shortcut') +const pkg = common.pkg const json = { name: 'github-shortcut', diff --git a/deps/npm/test/tap/gitlab-shortcut-package.js b/deps/npm/test/tap/gitlab-shortcut-package.js index 1dd1ba99fbd295..54632f8370403b 100644 --- a/deps/npm/test/tap/gitlab-shortcut-package.js +++ b/deps/npm/test/tap/gitlab-shortcut-package.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gitlab-shortcut-package') +var pkg = common.pkg var json = { name: 'gitlab-shortcut-package', diff --git a/deps/npm/test/tap/gitlab-shortcut.js b/deps/npm/test/tap/gitlab-shortcut.js index 6b2bfbc3edd86e..724178867aedec 100644 --- a/deps/npm/test/tap/gitlab-shortcut.js +++ b/deps/npm/test/tap/gitlab-shortcut.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gitlab-shortcut') +var pkg = common.pkg var json = { name: 'gitlab-shortcut', diff --git a/deps/npm/test/tap/graceful-restart.js b/deps/npm/test/tap/graceful-restart.js index 56513fbf7ebbb2..740561bd79efa4 100644 --- a/deps/npm/test/tap/graceful-restart.js +++ b/deps/npm/test/tap/graceful-restart.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'graceful-restart') +var pkg = common.pkg var outGraceless = [ 'prerestart', diff --git a/deps/npm/test/tap/ignore-install-link.js b/deps/npm/test/tap/ignore-install-link.js index 684c6a05b24c09..129df3c2717ca1 100644 --- a/deps/npm/test/tap/ignore-install-link.js +++ b/deps/npm/test/tap/ignore-install-link.js @@ -9,7 +9,7 @@ var fs = require('fs') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var root = path.resolve(__dirname, 'ignore-install-link') +var root = common.pkg var pkg = path.resolve(root, 'pkg') var dep = path.resolve(root, 'dep') var target = path.resolve(pkg, 'node_modules', 'dep') diff --git a/deps/npm/test/tap/ignore-scripts.js b/deps/npm/test/tap/ignore-scripts.js index 785921d7eb2d67..f5af4553c26c0f 100644 --- a/deps/npm/test/tap/ignore-scripts.js +++ b/deps/npm/test/tap/ignore-scripts.js @@ -9,7 +9,7 @@ var common = require('../common-tap') // ignore-scripts/package.json has scripts that always exit with non-zero error // codes. -var pkg = path.resolve(__dirname, 'ignore-scripts') +var pkg = common.pkg var gypfile = 'bad_binding_file\n' var json = { diff --git a/deps/npm/test/tap/init-interrupt.js b/deps/npm/test/tap/init-interrupt.js index b0c7643ddf044d..114bb2bacba274 100644 --- a/deps/npm/test/tap/init-interrupt.js +++ b/deps/npm/test/tap/init-interrupt.js @@ -2,7 +2,6 @@ // if 'npm init' is interrupted with ^C, don't report // 'init written successfully' var test = require('tap').test -var path = require('path') var osenv = require('osenv') var rimraf = require('rimraf') var npmlog = require('npmlog') @@ -10,7 +9,8 @@ var requireInject = require('require-inject') var npm = require('../../lib/npm.js') -var PKG_DIR = path.resolve(__dirname, 'init-interrupt') +const common = require('../common-tap.js') +var PKG_DIR = common.pkg test('setup', function (t) { cleanup() diff --git a/deps/npm/test/tap/install-at-locally.js b/deps/npm/test/tap/install-at-locally.js index fa0190ceb3ee28..705c2df1196424 100644 --- a/deps/npm/test/tap/install-at-locally.js +++ b/deps/npm/test/tap/install-at-locally.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-at-locally') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, stdio: [0, 1, 2] } diff --git a/deps/npm/test/tap/install-at-sub-path-locally.js b/deps/npm/test/tap/install-at-sub-path-locally.js index e16b75179ebaf2..08b64746af6786 100644 --- a/deps/npm/test/tap/install-at-sub-path-locally.js +++ b/deps/npm/test/tap/install-at-sub-path-locally.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-at-sub-path-locally') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, stdio: [0, 1, 2] } diff --git a/deps/npm/test/tap/install-bad-dep-format.js b/deps/npm/test/tap/install-bad-dep-format.js index 94c7d175fde459..d01996f1552127 100644 --- a/deps/npm/test/tap/install-bad-dep-format.js +++ b/deps/npm/test/tap/install-bad-dep-format.js @@ -21,7 +21,7 @@ test('invalid url format returns appropriate error', function (t) { setup(json) common.npm(['install'], {}, function (err, code, stdout, stderr) { t.ifError(err, 'install ran without error') - t.equals(code, 1, 'inall exited with code 1') + t.equals(code, 1, 'install exited with code 1') t.match(stderr, /ERR.*Unsupported URL Type/, 'Error should report that invalid url-style formats are used') @@ -43,12 +43,12 @@ function cleanup () { process.chdir(osenv.tmpdir()) var pkgs = [json] pkgs.forEach(function (json) { - rimraf.sync(path.resolve(__dirname, json.name)) + rimraf.sync(path.resolve(common.pkg, json.name)) }) } function mkPkg (json) { - var pkgPath = path.resolve(__dirname, json.name) + var pkgPath = path.resolve(common.pkg, json.name) mkdirp.sync(pkgPath) fs.writeFileSync( path.join(pkgPath, 'package.json'), diff --git a/deps/npm/test/tap/install-bad-man.js b/deps/npm/test/tap/install-bad-man.js index 226d0b24fc06d2..98c8e9a7e04538 100644 --- a/deps/npm/test/tap/install-bad-man.js +++ b/deps/npm/test/tap/install-bad-man.js @@ -8,8 +8,8 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'install-bad-man') -var target = resolve(__dirname, 'install-bad-man-target') +var pkg = common.pkg +var target = pkg + '-target' var EXEC_OPTS = { cwd: target diff --git a/deps/npm/test/tap/install-before.js b/deps/npm/test/tap/install-before.js index c99b996c43029d..05a254a1ef1ce9 100644 --- a/deps/npm/test/tap/install-before.js +++ b/deps/npm/test/tap/install-before.js @@ -12,7 +12,7 @@ const { test } = require('tap') const { Dir, File } = Tacks -const testDir = path.join(__dirname, path.basename(__filename, '.js')) +const testDir = common.pkg let server test('setup', t => { diff --git a/deps/npm/test/tap/install-bin-null.js b/deps/npm/test/tap/install-bin-null.js index f45528a75acf45..7a87a2e0bbc270 100644 --- a/deps/npm/test/tap/install-bin-null.js +++ b/deps/npm/test/tap/install-bin-null.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-bin-null') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-cli-only-development.js b/deps/npm/test/tap/install-cli-only-development.js index ff9d05f547f26a..a68c0f8aac0a25 100644 --- a/deps/npm/test/tap/install-cli-only-development.js +++ b/deps/npm/test/tap/install-cli-only-development.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-cli-development') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-cli-only-production.js b/deps/npm/test/tap/install-cli-only-production.js index 40328d773539f2..e43692d3d7c9cf 100644 --- a/deps/npm/test/tap/install-cli-only-production.js +++ b/deps/npm/test/tap/install-cli-only-production.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-cli-only-production') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-cli-only-shrinkwrap.js b/deps/npm/test/tap/install-cli-only-shrinkwrap.js index aa731909d3539d..e3a4685d9c459d 100644 --- a/deps/npm/test/tap/install-cli-only-shrinkwrap.js +++ b/deps/npm/test/tap/install-cli-only-shrinkwrap.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-cli-production-nosave.js b/deps/npm/test/tap/install-cli-production-nosave.js index cf69ad3fae05db..46b3460b7232c1 100644 --- a/deps/npm/test/tap/install-cli-production-nosave.js +++ b/deps/npm/test/tap/install-cli-production-nosave.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, 'install-cli-production-nosave') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-cli-production.js b/deps/npm/test/tap/install-cli-production.js index a1fdac6e880d5a..4c88add92fffcf 100644 --- a/deps/npm/test/tap/install-cli-production.js +++ b/deps/npm/test/tap/install-cli-production.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-cli-production') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-cli-unicode.js b/deps/npm/test/tap/install-cli-unicode.js index 01a5f4a471dc06..2691db96d06777 100644 --- a/deps/npm/test/tap/install-cli-unicode.js +++ b/deps/npm/test/tap/install-cli-unicode.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.resolve(__dirname, 'install-cli-unicode') +var pkg = common.pkg function hasOnlyAscii (s) { return /^[\000-\177]*$/.test(s) diff --git a/deps/npm/test/tap/install-contributors-count.js b/deps/npm/test/tap/install-contributors-count.js index 52fba0fd249999..ead925081330bb 100644 --- a/deps/npm/test/tap/install-contributors-count.js +++ b/deps/npm/test/tap/install-contributors-count.js @@ -1,12 +1,11 @@ 'use strict' -var path = require('path') var test = require('tap').test var Tacks = require('tacks') var Dir = Tacks.Dir var File = Tacks.File var common = require('../common-tap.js') -var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks(Dir({ node_modules: Dir({ a: Dir({ diff --git a/deps/npm/test/tap/install-dep-classification.js b/deps/npm/test/tap/install-dep-classification.js index 153a7f3927ec19..3c65459d345fbc 100644 --- a/deps/npm/test/tap/install-dep-classification.js +++ b/deps/npm/test/tap/install-dep-classification.js @@ -7,7 +7,7 @@ const Dir = Tacks.Dir const common = require('../common-tap.js') const fs = require('fs') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/install-duplicate-deps-warning.js b/deps/npm/test/tap/install-duplicate-deps-warning.js index 017a5cdfe117cb..2b10d8aa319646 100644 --- a/deps/npm/test/tap/install-duplicate-deps-warning.js +++ b/deps/npm/test/tap/install-duplicate-deps-warning.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var json = { dependencies: { diff --git a/deps/npm/test/tap/install-from-local.js b/deps/npm/test/tap/install-from-local.js index 3cac382a70d38c..a3e63b359dbea2 100644 --- a/deps/npm/test/tap/install-from-local.js +++ b/deps/npm/test/tap/install-from-local.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap') -var root = path.join(__dirname, 'install-from-local') +var root = common.pkg var pkg = path.join(root, 'package-with-local-paths') var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-into-likenamed-folder.js b/deps/npm/test/tap/install-into-likenamed-folder.js index 187d5fbf11bca9..c7bc86f3baaf48 100644 --- a/deps/npm/test/tap/install-into-likenamed-folder.js +++ b/deps/npm/test/tap/install-into-likenamed-folder.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var moduleDir = path.join(base, 'example-src') var destDir = path.join(base, 'example') var moduleJson = { diff --git a/deps/npm/test/tap/install-link-scripts.js b/deps/npm/test/tap/install-link-scripts.js index acc88b4b2ccdc9..bff4dd5ef0106e 100644 --- a/deps/npm/test/tap/install-link-scripts.js +++ b/deps/npm/test/tap/install-link-scripts.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-link-scripts') +var pkg = common.pkg var tmp = path.join(pkg, 'tmp') var dep = path.join(pkg, 'dep') diff --git a/deps/npm/test/tap/install-local-dep-cycle.js b/deps/npm/test/tap/install-local-dep-cycle.js index 1f76ad9598a2d0..a66f04bce4715d 100644 --- a/deps/npm/test/tap/install-local-dep-cycle.js +++ b/deps/npm/test/tap/install-local-dep-cycle.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var baseJSON = { name: 'base', diff --git a/deps/npm/test/tap/install-man.js b/deps/npm/test/tap/install-man.js index d24819ca7887d1..720b4c217b3757 100644 --- a/deps/npm/test/tap/install-man.js +++ b/deps/npm/test/tap/install-man.js @@ -8,8 +8,8 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'install-man') -var target = resolve(__dirname, 'install-man-target') +var pkg = common.pkg +var target = pkg + '-target' common.pendIfWindows('man pages do not get installed on Windows') diff --git a/deps/npm/test/tap/install-noargs-dev.js b/deps/npm/test/tap/install-noargs-dev.js index ec9c7e3687eef8..4716dc2243b537 100644 --- a/deps/npm/test/tap/install-noargs-dev.js +++ b/deps/npm/test/tap/install-noargs-dev.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, 'install-noargs-dev') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-package-json-order.js b/deps/npm/test/tap/install-package-json-order.js index 93977c6c3dc441..ae000ff6738df3 100644 --- a/deps/npm/test/tap/install-package-json-order.js +++ b/deps/npm/test/tap/install-package-json-order.js @@ -5,7 +5,8 @@ var mkdirp = require('mkdirp') var spawn = require('child_process').spawn var npm = require.resolve('../../bin/npm-cli.js') var node = process.execPath -var pkg = path.resolve(__dirname, 'install-package-json-order') +const common = require('../common-tap.js') +var pkg = common.pkg var workdir = path.join(pkg, 'workdir') var tmp = path.join(pkg, 'tmp') var cache = path.join(pkg, 'cache') diff --git a/deps/npm/test/tap/install-package-lock-only.js b/deps/npm/test/tap/install-package-lock-only.js index 1610988851c12c..6e98f27b30021e 100644 --- a/deps/npm/test/tap/install-package-lock-only.js +++ b/deps/npm/test/tap/install-package-lock-only.js @@ -8,7 +8,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/install-parse-error.js b/deps/npm/test/tap/install-parse-error.js index 1330195ead9f06..1a72c336de0714 100644 --- a/deps/npm/test/tap/install-parse-error.js +++ b/deps/npm/test/tap/install-parse-error.js @@ -1,12 +1,11 @@ 'use strict' -var path = require('path') var test = require('tap').test var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks(Dir({ 'package.json': File( diff --git a/deps/npm/test/tap/install-property-conflicts.js b/deps/npm/test/tap/install-property-conflicts.js index 8f293885abf401..c8f58e139fbccd 100644 --- a/deps/npm/test/tap/install-property-conflicts.js +++ b/deps/npm/test/tap/install-property-conflicts.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'install-property-conflicts') +var pkg = common.pkg var target = resolve(pkg, '_target') var EXEC_OPTS = { diff --git a/deps/npm/test/tap/install-report-just-installed.js b/deps/npm/test/tap/install-report-just-installed.js index 0a2cde2562ac78..23b373b2694050 100644 --- a/deps/npm/test/tap/install-report-just-installed.js +++ b/deps/npm/test/tap/install-report-just-installed.js @@ -1,12 +1,11 @@ 'use strict' -var path = require('path') var test = require('tap').test var Tacks = require('tacks') var Dir = Tacks.Dir var File = Tacks.File var common = require('../common-tap.js') -var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks(Dir({ node_modules: Dir({ a: Dir({ diff --git a/deps/npm/test/tap/install-save-consistent-newlines.js b/deps/npm/test/tap/install-save-consistent-newlines.js index 6250377445a79f..acea57c987bfb9 100644 --- a/deps/npm/test/tap/install-save-consistent-newlines.js +++ b/deps/npm/test/tap/install-save-consistent-newlines.js @@ -11,7 +11,7 @@ const test = require('tap').test const common = require('../common-tap.js') -const pkg = path.join(__dirname, 'install-save-consistent-newlines') +const pkg = common.pkg const EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-save-exact.js b/deps/npm/test/tap/install-save-exact.js index 14e32f0f84b62c..3d57ead361be8f 100644 --- a/deps/npm/test/tap/install-save-exact.js +++ b/deps/npm/test/tap/install-save-exact.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, 'install-save-exact') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-save-local.js b/deps/npm/test/tap/install-save-local.js index 5965281bf29677..8f4f5ecb0023e6 100644 --- a/deps/npm/test/tap/install-save-local.js +++ b/deps/npm/test/tap/install-save-local.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var root = path.join(__dirname, 'install-save-local') +var root = common.pkg var pkg = path.join(root, 'package') var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-save-prefix.js b/deps/npm/test/tap/install-save-prefix.js index b669c5fb7ef706..001e24d873558a 100644 --- a/deps/npm/test/tap/install-save-prefix.js +++ b/deps/npm/test/tap/install-save-prefix.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, 'install-save-prefix') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-scoped-already-installed.js b/deps/npm/test/tap/install-scoped-already-installed.js index 58966b047c4308..707d82a44353ed 100644 --- a/deps/npm/test/tap/install-scoped-already-installed.js +++ b/deps/npm/test/tap/install-scoped-already-installed.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap') -var root = path.join(__dirname, 'install-scoped-already-installed') +var root = common.pkg var pkg = path.join(root, 'package-with-scoped-paths') var modules = path.join(pkg, 'node_modules') diff --git a/deps/npm/test/tap/install-scoped-link.js b/deps/npm/test/tap/install-scoped-link.js index 9171b8f46f4397..920e7e3d4531af 100644 --- a/deps/npm/test/tap/install-scoped-link.js +++ b/deps/npm/test/tap/install-scoped-link.js @@ -12,8 +12,8 @@ var escapeExecPath = require('../../lib/utils/escape-exec-path') var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-scoped-link') -var work = path.join(__dirname, 'install-scoped-link-TEST') +var pkg = common.pkg +var work = pkg + '-TEST' var modules = path.join(work, 'node_modules') var EXEC_OPTS = { cwd: work } diff --git a/deps/npm/test/tap/install-scoped-with-bundled-dependency.js b/deps/npm/test/tap/install-scoped-with-bundled-dependency.js index bd197ae036591c..76f440dc6c158d 100644 --- a/deps/npm/test/tap/install-scoped-with-bundled-dependency.js +++ b/deps/npm/test/tap/install-scoped-with-bundled-dependency.js @@ -6,7 +6,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/install-scoped-with-peer-dependency.js b/deps/npm/test/tap/install-scoped-with-peer-dependency.js index 7f60c732210927..477a04a1055dd3 100644 --- a/deps/npm/test/tap/install-scoped-with-peer-dependency.js +++ b/deps/npm/test/tap/install-scoped-with-peer-dependency.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-scoped-with-peer-dependency') +var pkg = common.pkg var local = path.join(pkg, 'package') var EXEC_OPTS = { } diff --git a/deps/npm/test/tap/install-shrinkwrapped-git.js b/deps/npm/test/tap/install-shrinkwrapped-git.js index 7bbb4f6e5fb755..7e50aa713d570c 100644 --- a/deps/npm/test/tap/install-shrinkwrapped-git.js +++ b/deps/npm/test/tap/install-shrinkwrapped-git.js @@ -11,7 +11,7 @@ var npm = require('../../lib/npm') var common = require('../common-tap') var chain = require('slide').chain -var mockPath = resolve(__dirname, 'install-shrinkwrapped') +var mockPath = common.pkg var parentPath = resolve(mockPath, 'parent') var parentNodeModulesPath = path.join(parentPath, 'node_modules') var outdatedNodeModulesPath = resolve(mockPath, 'node-modules-backup') @@ -53,11 +53,11 @@ test('shrinkwrapped git dependency got updated', function (t) { if (err) { throw err } chain([ // Install & shrinkwrap child package's first commit - [npm.commands.install, ['git://localhost:1234/child.git#' + refs[0]]], + [npm.commands.install, ['git://localhost:' + common.gitPort + '/child.git#' + refs[0]]], // Backup node_modules with the first commit [fs.rename, parentNodeModulesPath, outdatedNodeModulesPath], // Install & shrinkwrap child package's latest commit - [npm.commands.install, ['git://localhost:1234/child.git#' + refs[1].substr(0, 8)]], + [npm.commands.install, ['git://localhost:' + common.gitPort + '/child.git#' + refs[1].substr(0, 8)]], // Restore node_modules with the first commit [rimraf, parentNodeModulesPath], [fs.rename, outdatedNodeModulesPath, parentNodeModulesPath], @@ -68,15 +68,15 @@ test('shrinkwrapped git dependency got updated', function (t) { t.similar(pkglock, { dependencies: { child: { - version: `git://localhost:1234/child.git#${refs[1]}`, - from: `git://localhost:1234/child.git#${refs[1].substr(0, 8)}` + version: `git://localhost:${common.gitPort}/child.git#${refs[1]}`, + from: `git://localhost:${common.gitPort}/child.git#${refs[1].substr(0, 8)}` } } }, 'version and from fields are correct in git-based pkglock dep') var childPackageJSON = require(path.join(parentNodeModulesPath, 'child', 'package.json')) t.equal( childPackageJSON._resolved, - 'git://localhost:1234/child.git#' + refs[1], + 'git://localhost:' + common.gitPort + '/child.git#' + refs[1], "Child package wasn't updated" ) t.end() @@ -153,7 +153,7 @@ function startGitDaemon (cb) { '--export-all', '--base-path=' + mockPath, // Path to the dir that contains child.git '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: parentPath, diff --git a/deps/npm/test/tap/install-test-cli-without-package-lock.js b/deps/npm/test/tap/install-test-cli-without-package-lock.js index ea3d75feb6af88..468277d74d209f 100644 --- a/deps/npm/test/tap/install-test-cli-without-package-lock.js +++ b/deps/npm/test/tap/install-test-cli-without-package-lock.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/install-windows-newlines.js b/deps/npm/test/tap/install-windows-newlines.js index 1c69b204ad02be..b56c7645ebf421 100644 --- a/deps/npm/test/tap/install-windows-newlines.js +++ b/deps/npm/test/tap/install-windows-newlines.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-windows-newlines') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, stdio: [0, 1, 2] } diff --git a/deps/npm/test/tap/install-with-dev-dep-duplicate.js b/deps/npm/test/tap/install-with-dev-dep-duplicate.js index 2d31b8fad7abd8..b3a58987631b4d 100644 --- a/deps/npm/test/tap/install-with-dev-dep-duplicate.js +++ b/deps/npm/test/tap/install-with-dev-dep-duplicate.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'dev-dep-duplicate') +var pkg = common.pkg var json = { author: 'Anders Janmyr', diff --git a/deps/npm/test/tap/invalid-dep-version-filtering.js b/deps/npm/test/tap/invalid-dep-version-filtering.js index 19ab5d209dd5c4..502610f231ce4e 100644 --- a/deps/npm/test/tap/invalid-dep-version-filtering.js +++ b/deps/npm/test/tap/invalid-dep-version-filtering.js @@ -7,7 +7,7 @@ var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var cachedir = path.join(testdir, 'cache') var fixture = new Tacks(Dir({ diff --git a/deps/npm/test/tap/it.js b/deps/npm/test/tap/it.js index b0dddb8f919deb..9b716139a3814a 100644 --- a/deps/npm/test/tap/it.js +++ b/deps/npm/test/tap/it.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = join(__dirname, 'run-script') +var pkg = common.pkg var installed = join(pkg, 'node_modules', 'underscore', 'package.json') var json = { diff --git a/deps/npm/test/tap/legacy-ignore-nested-nm.js b/deps/npm/test/tap/legacy-ignore-nested-nm.js index 095c41efa146ba..6a57b72b604881 100644 --- a/deps/npm/test/tap/legacy-ignore-nested-nm.js +++ b/deps/npm/test/tap/legacy-ignore-nested-nm.js @@ -4,7 +4,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-ignore-nested-nm') var modulepath = path.resolve(basepath, 'node_modules') var installedpath = path.resolve(modulepath, 'npm-test-ignore-nested-nm') diff --git a/deps/npm/test/tap/legacy-missing-bindir.js b/deps/npm/test/tap/legacy-missing-bindir.js index 2285f8d2a7556d..398ef0e7acc517 100644 --- a/deps/npm/test/tap/legacy-missing-bindir.js +++ b/deps/npm/test/tap/legacy-missing-bindir.js @@ -5,7 +5,7 @@ var test = require('tap').test var common = require('../common-tap.js') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-missing-bindir') var modulepath = path.resolve(basepath, 'node_modules') var installedpath = path.resolve(modulepath, 'npm-test-missing-bindir') diff --git a/deps/npm/test/tap/legacy-no-auth-leak.js b/deps/npm/test/tap/legacy-no-auth-leak.js index f837239250222b..ce1adaeca756a5 100644 --- a/deps/npm/test/tap/legacy-no-auth-leak.js +++ b/deps/npm/test/tap/legacy-no-auth-leak.js @@ -1,8 +1,7 @@ 'use strict' var test = require('tap').test var common = require('../common-tap.js') -var path = require('path') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir diff --git a/deps/npm/test/tap/legacy-platform-all.js b/deps/npm/test/tap/legacy-platform-all.js index 2bfb19a45782bd..01c7be7ec1c861 100644 --- a/deps/npm/test/tap/legacy-platform-all.js +++ b/deps/npm/test/tap/legacy-platform-all.js @@ -4,7 +4,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-platform-all') var modulepath = path.resolve(basepath, 'node_modules') var Tacks = require('tacks') @@ -33,6 +33,7 @@ var fixture = new Tacks( ], cpu: [ 'arm', + 'arm64', 'mips', 'ia32', 'x64', diff --git a/deps/npm/test/tap/legacy-platform.js b/deps/npm/test/tap/legacy-platform.js index 4e94148b213097..619d2e4330c59b 100644 --- a/deps/npm/test/tap/legacy-platform.js +++ b/deps/npm/test/tap/legacy-platform.js @@ -4,7 +4,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-platform') var modulepath = path.resolve(basepath, 'node_modules') var Tacks = require('tacks') diff --git a/deps/npm/test/tap/legacy-private.js b/deps/npm/test/tap/legacy-private.js index 5e7817bf6a13a7..44a1094cd0cc6b 100644 --- a/deps/npm/test/tap/legacy-private.js +++ b/deps/npm/test/tap/legacy-private.js @@ -4,7 +4,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-private') var modulepath = path.resolve(basepath, 'node_modules') var Tacks = require('tacks') diff --git a/deps/npm/test/tap/legacy-test-package.js b/deps/npm/test/tap/legacy-test-package.js index d94666b43e2e4e..3c807e50491c72 100644 --- a/deps/npm/test/tap/legacy-test-package.js +++ b/deps/npm/test/tap/legacy-test-package.js @@ -4,7 +4,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-test-package') var modulepath = path.resolve(basepath, 'node_modules') var installedpath = path.resolve(modulepath, 'npm-test-test-package') diff --git a/deps/npm/test/tap/lifecycle-INIT_CWD.js b/deps/npm/test/tap/lifecycle-INIT_CWD.js index eec5c266eec98d..e035cf86d40337 100644 --- a/deps/npm/test/tap/lifecycle-INIT_CWD.js +++ b/deps/npm/test/tap/lifecycle-INIT_CWD.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'lifecycle-initcwd') +var pkg = common.pkg var subdir = path.resolve(pkg, 'subdir') var json = { diff --git a/deps/npm/test/tap/lifecycle-order.js b/deps/npm/test/tap/lifecycle-order.js index 903e1945d1e915..8f2b2ba4a70b8e 100644 --- a/deps/npm/test/tap/lifecycle-order.js +++ b/deps/npm/test/tap/lifecycle-order.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var json = { name: 'lifecycle-order', diff --git a/deps/npm/test/tap/link.js b/deps/npm/test/tap/link.js index 88f3caed791fc0..f0339194a26265 100644 --- a/deps/npm/test/tap/link.js +++ b/deps/npm/test/tap/link.js @@ -8,11 +8,11 @@ var writeFileSync = require('fs').writeFileSync var common = require('../common-tap.js') -var link = path.join(__dirname, 'link') -var linkScoped = path.join(__dirname, 'link-scoped') -var linkInstall = path.join(__dirname, 'link-install') +var link = path.join(common.pkg, 'link') +var linkScoped = path.join(common.pkg, 'link-scoped') +var linkInstall = path.join(common.pkg, 'link-install') var linkInside = path.join(linkInstall, 'node_modules', 'inside') -var linkRoot = path.join(__dirname, 'link-root') +var linkRoot = path.join(common.pkg, 'link-root') var config = 'prefix = ' + linkRoot var configPath = path.join(link, '_npmrc') diff --git a/deps/npm/test/tap/local-args-relative-to-cwd.js b/deps/npm/test/tap/local-args-relative-to-cwd.js index 6c424bf67f123c..de95516e2893ed 100644 --- a/deps/npm/test/tap/local-args-relative-to-cwd.js +++ b/deps/npm/test/tap/local-args-relative-to-cwd.js @@ -6,7 +6,7 @@ var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks( Dir({ diff --git a/deps/npm/test/tap/locker.js b/deps/npm/test/tap/locker.js index 8c548095f7f54a..5ee64196fe9804 100644 --- a/deps/npm/test/tap/locker.js +++ b/deps/npm/test/tap/locker.js @@ -10,7 +10,8 @@ var locker = require('../../lib/utils/locker.js') var lock = locker.lock var unlock = locker.unlock -var pkg = path.join(__dirname, '/locker') +const common = require('../common-tap.js') +var pkg = common.pkg var cache = path.join(pkg, '/cache') var tmp = path.join(pkg, '/tmp') var nm = path.join(pkg, '/node_modules') diff --git a/deps/npm/test/tap/lockfile-http-deps.js b/deps/npm/test/tap/lockfile-http-deps.js index a614daf139d22b..aaa47f5de6d3e3 100644 --- a/deps/npm/test/tap/lockfile-http-deps.js +++ b/deps/npm/test/tap/lockfile-http-deps.js @@ -8,7 +8,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/logout-scoped.js b/deps/npm/test/tap/logout-scoped.js index db993204789f3b..114cc09da73822 100644 --- a/deps/npm/test/tap/logout-scoped.js +++ b/deps/npm/test/tap/logout-scoped.js @@ -8,15 +8,14 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'logout') +var pkg = common.pkg var outfile = path.join(pkg, '_npmrc') var opts = { cwd: pkg } -var contents = function () { /* -foo=boo -@bar:registry=http://localhost:1337 -//localhost:1337/:_authToken=glarb -*/ }.toString().split('\n').slice(1, -1).join('\n') +var contents = `foo=boo +@bar:registry=http://localhost:${common.port} +//localhost:${common.port}/:_authToken=glarb +` function mocks (server) { server.delete('/-/user/token/glarb') diff --git a/deps/npm/test/tap/logout.js b/deps/npm/test/tap/logout.js index d62cb4fffc28be..9218b4bf6f1ca8 100644 --- a/deps/npm/test/tap/logout.js +++ b/deps/npm/test/tap/logout.js @@ -8,14 +8,13 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'logout') +var pkg = common.pkg var outfile = path.join(pkg, '_npmrc') var opts = { cwd: pkg } -var contents = function () { /* -foo=boo -//localhost:1337/:_authToken=glarb -*/ }.toString().split('\n').slice(1, -1).join('\n') +var contents = `foo=boo +//localhost:${common.port}/:_authToken=glarb +` function mocks (server) { server.delete('/-/user/token/glarb') diff --git a/deps/npm/test/tap/ls-depth-cli.js b/deps/npm/test/tap/ls-depth-cli.js index 7fd4a467d612f1..6bb2f3cd124f7f 100644 --- a/deps/npm/test/tap/ls-depth-cli.js +++ b/deps/npm/test/tap/ls-depth-cli.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'ls-depth-cli') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, @@ -117,7 +117,7 @@ test('npm ls --depth=0 --json', function (t) { 'dependencies': { 'test-package-with-one-dep': { 'version': '0.0.0', - 'resolved': 'http://localhost:1337/test-package-with-one-dep/-/test-package-with-one-dep-0.0.0.tgz' + 'resolved': 'http://localhost:' + common.port + '/test-package-with-one-dep/-/test-package-with-one-dep-0.0.0.tgz' } } }) @@ -141,11 +141,11 @@ test('npm ls --depth=Infinity --json', function (t) { 'dependencies': { 'test-package-with-one-dep': { 'version': '0.0.0', - 'resolved': 'http://localhost:1337/test-package-with-one-dep/-/test-package-with-one-dep-0.0.0.tgz', + 'resolved': 'http://localhost:' + common.port + '/test-package-with-one-dep/-/test-package-with-one-dep-0.0.0.tgz', 'dependencies': { 'test-package': { 'version': '0.0.0', - 'resolved': 'http://localhost:1337/test-package/-/test-package-0.0.0.tgz' + 'resolved': 'http://localhost:' + common.port + '/test-package/-/test-package-0.0.0.tgz' } } } diff --git a/deps/npm/test/tap/ls-depth-unmet.js b/deps/npm/test/tap/ls-depth-unmet.js index 4fd6740d6a58cd..7a2ed4dacc2a2e 100644 --- a/deps/npm/test/tap/ls-depth-unmet.js +++ b/deps/npm/test/tap/ls-depth-unmet.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'ls-depth-unmet') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/ls-env.js b/deps/npm/test/tap/ls-env.js index 29058d9245836f..e3fbece3b04a1b 100644 --- a/deps/npm/test/tap/ls-env.js +++ b/deps/npm/test/tap/ls-env.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'ls-depth') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/ls-l-depth-0.js b/deps/npm/test/tap/ls-l-depth-0.js index e9c2374aad1d72..8459bd52032cbf 100644 --- a/deps/npm/test/tap/ls-l-depth-0.js +++ b/deps/npm/test/tap/ls-l-depth-0.js @@ -10,7 +10,7 @@ var tmpdir = require('osenv').tmpdir var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'ls-l-depth-0') +var pkg = common.pkg var dep = resolve(pkg, 'deps', 'glock') var modules = resolve(pkg, 'node_modules') diff --git a/deps/npm/test/tap/ls-peer.js b/deps/npm/test/tap/ls-peer.js index 826380932a1470..fd53d37be62ec8 100644 --- a/deps/npm/test/tap/ls-peer.js +++ b/deps/npm/test/tap/ls-peer.js @@ -6,7 +6,7 @@ const File = Tacks.File const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/ls-production-and-dev.js b/deps/npm/test/tap/ls-production-and-dev.js index 5fc0b776e33374..a39e643786f09e 100644 --- a/deps/npm/test/tap/ls-production-and-dev.js +++ b/deps/npm/test/tap/ls-production-and-dev.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'ls-depth') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/ls-top-errors.js b/deps/npm/test/tap/ls-top-errors.js index 69b8b299c81710..79a466fb127a49 100644 --- a/deps/npm/test/tap/ls-top-errors.js +++ b/deps/npm/test/tap/ls-top-errors.js @@ -8,7 +8,7 @@ var rimraf = require('rimraf') var common = require('../common-tap') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var pathModA = path.join(pkg, 'node_modules', 'moduleA') var pathModB = path.join(pkg, 'node_modules', 'moduleB') diff --git a/deps/npm/test/tap/ls.js b/deps/npm/test/tap/ls.js index acec723afbae0e..b3bdbc613cbc8d 100644 --- a/deps/npm/test/tap/ls.js +++ b/deps/npm/test/tap/ls.js @@ -3,7 +3,7 @@ var test = require('tap').test var path = require('path') var rimraf = require('rimraf') var common = require('../common-tap.js') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-files') var pkgpath = path.resolve(fixturepath, 'npm-test-ls') var Tacks = require('tacks') diff --git a/deps/npm/test/tap/nested-extraneous.js b/deps/npm/test/tap/nested-extraneous.js index 99d4bea5b9b1c5..1764a41c752790 100644 --- a/deps/npm/test/tap/nested-extraneous.js +++ b/deps/npm/test/tap/nested-extraneous.js @@ -5,7 +5,7 @@ var fs = require('fs') var rimraf = require('rimraf') var path = require('path') -var pkg = path.resolve(__dirname, 'nested-extraneous') +var pkg = common.pkg var pj = { name: 'nested-extraneous', version: '1.2.3' diff --git a/deps/npm/test/tap/no-global-warns.js b/deps/npm/test/tap/no-global-warns.js index 304cf5bf543882..538ab8b359daf9 100644 --- a/deps/npm/test/tap/no-global-warns.js +++ b/deps/npm/test/tap/no-global-warns.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var writeFileSync = require('fs').writeFileSync var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var mockGlobal = path.join(base, 'global') var toInstall = path.join(base, 'to-install') diff --git a/deps/npm/test/tap/no-scan-full-global-dir.js b/deps/npm/test/tap/no-scan-full-global-dir.js index 6a9349d54d9629..7856ff33f41f2d 100644 --- a/deps/npm/test/tap/no-scan-full-global-dir.js +++ b/deps/npm/test/tap/no-scan-full-global-dir.js @@ -6,12 +6,17 @@ var requireInject = require('require-inject') var osenv = require('osenv') var npm = require('../../lib/npm.js') +// XXX update this when rpt's realpath.js is extracted out +var rptRealpath = require.resolve('read-package-tree/realpath.js') + +const common = require('../common-tap.js') +const pkg = common.pkg var packages = { - test: {package: {name: 'test'}, path: __dirname, children: ['abc', 'def', 'ghi', 'jkl']}, - abc: {package: {name: 'abc'}, path: path.join(__dirname, 'node_modules', 'abc')}, - def: {package: {name: 'def'}, path: path.join(__dirname, 'node_modules', 'def')}, - ghi: {package: {name: 'ghi'}, path: path.join(__dirname, 'node_modules', 'ghi')}, - jkl: {package: {name: 'jkl'}, path: path.join(__dirname, 'node_modules', 'jkl')} + test: {package: {name: 'test'}, path: pkg, children: ['abc', 'def', 'ghi', 'jkl']}, + abc: {package: {name: 'abc'}, path: path.join(pkg, 'node_modules', 'abc')}, + def: {package: {name: 'def'}, path: path.join(pkg, 'node_modules', 'def')}, + ghi: {package: {name: 'ghi'}, path: path.join(pkg, 'node_modules', 'ghi')}, + jkl: {package: {name: 'jkl'}, path: path.join(pkg, 'node_modules', 'jkl')} } var dirs = {} var files = {} @@ -39,6 +44,8 @@ mockFs.realpath = function (dir, cb) { return cb(null, dir) } +const mockRptRealpath = path => Promise.resolve(path) + test('setup', function (t) { npm.load(function () { t.pass('npm loaded') @@ -52,7 +59,8 @@ test('installer', function (t) { 'fs': mockFs, 'readdir-scoped-modules': mockReaddir, 'read-package-json': mockReadPackageJson, - 'mkdirp': function (path, cb) { cb() } + 'mkdirp': function (path, cb) { cb() }, + [rptRealpath]: mockRptRealpath }) var Installer = installer.Installer @@ -67,7 +75,7 @@ test('installer', function (t) { } } - var inst = new TestInstaller(__dirname, false, ['def', 'abc']) + var inst = new TestInstaller(pkg, false, ['def', 'abc']) inst.loadCurrentTree(function () { var kids = inst.currentTree.children.map(function (child) { return child.package.name }) t.isDeeply(kids, ['abc', 'def']) @@ -81,7 +89,8 @@ test('uninstaller', function (t) { 'fs': mockFs, 'readdir-scoped-modules': mockReaddir, 'read-package-json': mockReadPackageJson, - 'mkdirp': function (path, cb) { cb() } + 'mkdirp': function (path, cb) { cb() }, + [rptRealpath]: mockRptRealpath }) var Uninstaller = uninstaller.Uninstaller @@ -92,7 +101,7 @@ test('uninstaller', function (t) { } } - var uninst = new TestUninstaller(__dirname, false, ['ghi', 'jkl']) + var uninst = new TestUninstaller(pkg, false, ['ghi', 'jkl']) uninst.loadCurrentTree(function () { var kids = uninst.currentTree.children.map(function (child) { return child.package.name }) t.isDeeply(kids, ['ghi', 'jkl']) diff --git a/deps/npm/test/tap/noargs-install-config-save.js b/deps/npm/test/tap/noargs-install-config-save.js index 12ccf86804b377..cb1af408abb5c6 100644 --- a/deps/npm/test/tap/noargs-install-config-save.js +++ b/deps/npm/test/tap/noargs-install-config-save.js @@ -1,14 +1,12 @@ var common = require('../common-tap.js') var test = require('tap').test -var path = require('path') var fs = require('fs') var rimraf = require('rimraf') var mkdirp = require('mkdirp') var mr = require('npm-registry-mock') -var pkg = path.resolve(process.env.npm_config_tmp || '/tmp', - 'noargs-install-config-save') +var pkg = common.pkg function writePackageJson () { rimraf.sync(pkg) @@ -73,6 +71,6 @@ test('updates the package.json (adds dependencies) with an argument', function ( }) test('cleanup', function (t) { - rimraf.sync(pkg + '/cache') + rimraf.sync(pkg) t.end() }) diff --git a/deps/npm/test/tap/node-modules-path-munge.js b/deps/npm/test/tap/node-modules-path-munge.js index fdca0393cc1d10..fb116806c8cbc9 100644 --- a/deps/npm/test/tap/node-modules-path-munge.js +++ b/deps/npm/test/tap/node-modules-path-munge.js @@ -4,7 +4,7 @@ var fs = require('fs') var rimraf = require('rimraf') var mkdirp = require('mkdirp') var path = require('path') -var dir = path.join(__dirname, 'my_node_modules') +var dir = path.join(common.pkg, 'my_node_modules') var script = process.platform === 'win32' ? 'echo %PATH%' : 'echo $PATH' t.test('setup', function (t) { diff --git a/deps/npm/test/tap/npm-api-not-loaded-error.js b/deps/npm/test/tap/npm-api-not-loaded-error.js index 48b71e5213a7c8..8bf263503874e8 100644 --- a/deps/npm/test/tap/npm-api-not-loaded-error.js +++ b/deps/npm/test/tap/npm-api-not-loaded-error.js @@ -1,8 +1,9 @@ var test = require('tap').test +const common = require('../common-tap.js') var npm = require('../..') var path = require('path') var rimraf = require('rimraf') -var npmrc = path.join(__dirname, 'npmrc') +var npmrc = path.join(common.pkg, 'npmrc') var fs = require('fs') test('setup', function (t) { diff --git a/deps/npm/test/tap/onload.js b/deps/npm/test/tap/onload.js index 8d2b6c743bab8e..4750fa6f88c2a8 100644 --- a/deps/npm/test/tap/onload.js +++ b/deps/npm/test/tap/onload.js @@ -2,13 +2,13 @@ var path = require('path') var test = require('tap').test var rimraf = require('rimraf') var common = require('../common-tap.js') -var opts = { cwd: __dirname } +var opts = { cwd: common.pkg } var binDir = '../../node_modules/.bin' var fixture = path.resolve(__dirname, binDir) var onload = path.resolve(__dirname, '../fixtures/onload.js') test('setup', function (t) { - rimraf.sync(path.join(__dirname, 'node_modules')) + rimraf.sync(path.join(common.pkg, 'node_modules')) t.end() }) diff --git a/deps/npm/test/tap/optional-metadep-rollback-collision.js b/deps/npm/test/tap/optional-metadep-rollback-collision.js index 1c05d1ba5860e6..51cc6367dded7c 100644 --- a/deps/npm/test/tap/optional-metadep-rollback-collision.js +++ b/deps/npm/test/tap/optional-metadep-rollback-collision.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'optional-metadep-rollback-collision') +var pkg = common.pkg var deps = path.resolve(pkg, 'deps') var opdep = path.resolve(pkg, 'node_modules', 'opdep') var cache = path.resolve(pkg, 'cache') diff --git a/deps/npm/test/tap/outdated-color.js b/deps/npm/test/tap/outdated-color.js index 3a81d05a821b4f..11c967650f3b04 100644 --- a/deps/npm/test/tap/outdated-color.js +++ b/deps/npm/test/tap/outdated-color.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'outdated-color') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/outdated-depth.js b/deps/npm/test/tap/outdated-depth.js index 91523405e89adb..5cf7c7edac9c4b 100644 --- a/deps/npm/test/tap/outdated-depth.js +++ b/deps/npm/test/tap/outdated-depth.js @@ -10,7 +10,7 @@ var test = require('tap').test var npm = require('../../') var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'outdated-depth') +var pkg = common.pkg var json = { name: 'outdated-depth', diff --git a/deps/npm/test/tap/outdated-git.js b/deps/npm/test/tap/outdated-git.js index 2a595e5288934c..3932330c99f34d 100644 --- a/deps/npm/test/tap/outdated-git.js +++ b/deps/npm/test/tap/outdated-git.js @@ -9,7 +9,7 @@ var common = require('../common-tap.js') var npm = require('../../') // config -var pkg = path.resolve(__dirname, 'outdated-git') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var json = { name: 'outdated-git', diff --git a/deps/npm/test/tap/outdated-json.js b/deps/npm/test/tap/outdated-json.js index 39d54fb196c5bd..77db52cc725211 100644 --- a/deps/npm/test/tap/outdated-json.js +++ b/deps/npm/test/tap/outdated-json.js @@ -1,16 +1,13 @@ var fs = require('graceful-fs') var path = require('path') -var mkdirp = require('mkdirp') var mr = require('npm-registry-mock') -var osenv = require('osenv') -var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.resolve(__dirname, 'outdated-json') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } @@ -42,8 +39,6 @@ var expected = { } test('setup', function (t) { - cleanup() - mkdirp.sync(pkg) fs.writeFileSync( path.join(pkg, 'package.json'), JSON.stringify(json, null, 2) @@ -92,14 +87,37 @@ test('it should log json data', function (t) { ) }) +test('it should log json data even when the list is empty', function (t) { + common.npm( + [ + 'rm', + 'request', + 'underscore' + ], + EXEC_OPTS, + function (er, code, stdout) { + t.ifError(er, 'run without error') + t.is(code, 0, 'successful exit status') + common.npm( + [ + '--registry', common.registry, + '--silent', + '--json', + 'outdated' + ], + EXEC_OPTS, + function (er, code, stdout) { + t.ifError(er, 'run without error') + t.is(code, 0, 'successful exit status') + t.same(JSON.parse(stdout), {}, 'got an empty object printed') + t.end() + } + ) + } + ) +}) + test('cleanup', function (t) { server.close() - cleanup() t.end() }) - -function cleanup () { - // windows fix for locked files - process.chdir(osenv.tmpdir()) - rimraf.sync(pkg) -} diff --git a/deps/npm/test/tap/outdated-latest.js b/deps/npm/test/tap/outdated-latest.js index d72fd87176f16a..e0b432a2105cd7 100644 --- a/deps/npm/test/tap/outdated-latest.js +++ b/deps/npm/test/tap/outdated-latest.js @@ -7,7 +7,7 @@ const File = Tacks.File const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/outdated-long.js b/deps/npm/test/tap/outdated-long.js index 976d416a13bb51..474df8031a50a8 100644 --- a/deps/npm/test/tap/outdated-long.js +++ b/deps/npm/test/tap/outdated-long.js @@ -10,7 +10,7 @@ var common = require('../common-tap.js') var npm = require('../../') // config -var pkg = path.resolve(__dirname, 'outdated-long') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var json = { diff --git a/deps/npm/test/tap/outdated-remote.js b/deps/npm/test/tap/outdated-remote.js new file mode 100644 index 00000000000000..b3990a382caa2e --- /dev/null +++ b/deps/npm/test/tap/outdated-remote.js @@ -0,0 +1,95 @@ +'use strict' +const path = require('path') +const test = require('tap').test +const Tacks = require('tacks') +const File = Tacks.File +const Dir = Tacks.Dir +const common = require('../common-tap.js') + +const basedir = common.pkg +const testdir = path.join(basedir, 'testdir') +const cachedir = path.join(basedir, 'cache') +const globaldir = path.join(basedir, 'global') +const tmpdir = path.join(basedir, 'tmp') + +const conf = { + cwd: testdir, + env: common.newEnv().extend({ + npm_config_cache: cachedir, + npm_config_tmp: tmpdir, + npm_config_prefix: globaldir, + npm_config_registry: common.registry, + npm_config_loglevel: 'warn' + }) +} + +const fixture = new Tacks(Dir({ + cache: Dir(), + global: Dir(), + tmp: Dir(), + testdir: Dir({ + node_modules: Dir({ + 'foo-http': Dir({ + 'package.json': File({ + name: 'foo-http', + version: '1.0.0' + }) + }), + 'foo-https': Dir({ + 'package.json': File({ + name: 'foo-https', + version: '1.0.0' + }) + }) + }), + 'package.json': File({ + name: 'outdated-remote', + version: '1.0.0', + dependencies: { + 'foo-http': 'http://example.com/foo.tar.gz', + 'foo-https': 'https://example.com/foo.tar.gz' + } + }) + }) +})) + +function setup () { + cleanup() + fixture.create(basedir) +} + +function cleanup () { + fixture.remove(basedir) +} + +test('setup', t => { + setup() + return common.fakeRegistry.listen() +}) + +test('discovers new versions in outdated', t => { + return common.npm(['outdated', '--json'], conf).then(([code, stdout, stderr]) => { + t.is(code, 1, 'npm outdated completed successfully') + t.comment(stdout.trim()) + t.comment(stderr.trim()) + const data = JSON.parse(stdout) + t.same(data['foo-http'], { + current: '1.0.0', + wanted: 'remote', + latest: 'remote', + location: '' + }) + t.same(data['foo-https'], { + current: '1.0.0', + wanted: 'remote', + latest: 'remote', + location: '' + }) + }) +}) + +test('cleanup', t => { + common.fakeRegistry.close() + cleanup() + t.done() +}) diff --git a/deps/npm/test/tap/outdated-symlink.js b/deps/npm/test/tap/outdated-symlink.js index 96d6f660e21008..86128338a7be7e 100644 --- a/deps/npm/test/tap/outdated-symlink.js +++ b/deps/npm/test/tap/outdated-symlink.js @@ -8,7 +8,7 @@ const Symlink = Tacks.Symlink const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/outdated.js b/deps/npm/test/tap/outdated.js index 8b1907d95f942a..1acb0ed687b5ae 100644 --- a/deps/npm/test/tap/outdated.js +++ b/deps/npm/test/tap/outdated.js @@ -10,7 +10,7 @@ var npm = require('../../') var common = require('../common-tap.js') // config -var pkg = path.resolve(__dirname, 'outdated') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var originalLog diff --git a/deps/npm/test/tap/override-bundled.js b/deps/npm/test/tap/override-bundled.js index 493ebf4a5d7e55..7f87c0999fe063 100644 --- a/deps/npm/test/tap/override-bundled.js +++ b/deps/npm/test/tap/override-bundled.js @@ -8,7 +8,7 @@ var path = require('path') var common = require('../common-tap.js') var testname = path.basename(__filename, '.js') -var testdir = path.resolve(__dirname, testname) +var testdir = common.pkg var testmod = path.resolve(testdir, 'top-test') var testtgz = testmod + '-1.0.0.tgz' diff --git a/deps/npm/test/tap/owner.js b/deps/npm/test/tap/owner.js index 0be88284d97504..b4da383ee10231 100644 --- a/deps/npm/test/tap/owner.js +++ b/deps/npm/test/tap/owner.js @@ -5,7 +5,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var cachedir = path.join(basedir, 'cache') var server diff --git a/deps/npm/test/tap/pack-files-and-ignores.js b/deps/npm/test/tap/pack-files-and-ignores.js index 3bcb22c7fcbc9d..4d9b97a32ad253 100644 --- a/deps/npm/test/tap/pack-files-and-ignores.js +++ b/deps/npm/test/tap/pack-files-and-ignores.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var mkdirp = require('mkdirp') var fs = require('graceful-fs') var tar = require('tar') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-files') var targetpath = path.resolve(basepath, 'target') var Tacks = require('tacks') @@ -484,7 +484,7 @@ test('default-ignored files can be explicitly included', function (t) { }) ) withFixture(t, fixture, function (done) { - t.ok(fileExists('.git'), '.git included') + t.notOk(fileExists('.git'), '.git should never be included') t.ok(fileExists('.svn'), '.svn included') t.ok(fileExists('CVS'), 'CVS included') t.ok(fileExists('.hg'), '.hg included') diff --git a/deps/npm/test/tap/pack-scoped.js b/deps/npm/test/tap/pack-scoped.js index 05b9d12a833192..29d9aab478b8f7 100644 --- a/deps/npm/test/tap/pack-scoped.js +++ b/deps/npm/test/tap/pack-scoped.js @@ -6,7 +6,7 @@ var join = require('path').join var mkdirp = require('mkdirp') var rimraf = require('rimraf') -var pkg = join(__dirname, 'scoped_package') +var pkg = common.pkg var manifest = join(pkg, 'package.json') var tmp = join(pkg, 'tmp') var cache = join(pkg, 'cache') diff --git a/deps/npm/test/tap/pack.js b/deps/npm/test/tap/pack.js index 1813f47bf46a57..7aa42d48370a99 100644 --- a/deps/npm/test/tap/pack.js +++ b/deps/npm/test/tap/pack.js @@ -12,7 +12,7 @@ const Tacks = require('tacks') const Dir = Tacks.Dir const File = Tacks.File -const testDir = path.join(__dirname, 'pkg') +const testDir = common.pkg const tmp = path.join(testDir, 'tmp') const cache = path.join(testDir, 'cache') diff --git a/deps/npm/test/tap/peer-deps.js b/deps/npm/test/tap/peer-deps.js index b516818da1f398..20cbf5d1ded042 100644 --- a/deps/npm/test/tap/peer-deps.js +++ b/deps/npm/test/tap/peer-deps.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'peer-deps') +var pkg = common.pkg var expected = [ 'peer dep missing: request@0.9.x, required by npm-test-peer-deps@0.0.0' ] diff --git a/deps/npm/test/tap/ping.js b/deps/npm/test/tap/ping.js index 3562f25a3be97a..3687b05bd4518c 100644 --- a/deps/npm/test/tap/ping.js +++ b/deps/npm/test/tap/ping.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'ping') +var pkg = common.pkg var opts = { cwd: pkg } var outfile = path.join(pkg, '_npmrc') diff --git a/deps/npm/test/tap/prepare.js b/deps/npm/test/tap/prepare.js index f179c5267275af..54edf7cb19bc81 100644 --- a/deps/npm/test/tap/prepare.js +++ b/deps/npm/test/tap/prepare.js @@ -6,7 +6,7 @@ var join = require('path').join var mkdirp = require('mkdirp') var rimraf = require('rimraf') -var pkg = join(__dirname, 'prepare_package') +var pkg = common.pkg var tmp = join(pkg, 'tmp') var cache = join(pkg, 'cache') diff --git a/deps/npm/test/tap/prepublish-only.js b/deps/npm/test/tap/prepublish-only.js index 0d2d31589d7b51..9996479da442a0 100644 --- a/deps/npm/test/tap/prepublish-only.js +++ b/deps/npm/test/tap/prepublish-only.js @@ -10,7 +10,7 @@ var path = require('path') var common = require('../common-tap') -var pkg = join(__dirname, 'prepublish_package') +var pkg = common.pkg var cachedir = join(pkg, 'cache') var tmpdir = join(pkg, 'tmp') diff --git a/deps/npm/test/tap/prepublish.js b/deps/npm/test/tap/prepublish.js index c71455a2480cca..5628f94db38842 100644 --- a/deps/npm/test/tap/prepublish.js +++ b/deps/npm/test/tap/prepublish.js @@ -6,7 +6,7 @@ var join = require('path').join var mkdirp = require('mkdirp') var rimraf = require('rimraf') -var pkg = join(__dirname, 'prepublish_package') +var pkg = common.pkg var tmp = join(pkg, 'tmp') var cache = join(pkg, 'cache') diff --git a/deps/npm/test/tap/progress-config.js b/deps/npm/test/tap/progress-config.js index 94d9b15f1b3896..1f1e1a0c225ed5 100644 --- a/deps/npm/test/tap/progress-config.js +++ b/deps/npm/test/tap/progress-config.js @@ -1,9 +1,9 @@ 'use strict' -var path = require('path') var test = require('tap').test var log = require('npmlog') var fs = require('graceful-fs') -var configName = path.join(__dirname, path.basename(__filename, '.js')) + '-npmrc' +const common = require('../common-tap.js') +var configName = common.pkg + '-npmrc' // We use requireInject to get a fresh copy of // the npm singleton each time we require it. diff --git a/deps/npm/test/tap/prune-dev-dep-cycle.js b/deps/npm/test/tap/prune-dev-dep-cycle.js index 5ccabdc1c95f0a..e226ac6d32f682 100644 --- a/deps/npm/test/tap/prune-dev-dep-cycle.js +++ b/deps/npm/test/tap/prune-dev-dep-cycle.js @@ -1,12 +1,11 @@ 'use strict' var fs = require('fs') -var path = require('path') var test = require('tap').test var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks( Dir({ diff --git a/deps/npm/test/tap/prune-dev-dep-with-bins.js b/deps/npm/test/tap/prune-dev-dep-with-bins.js index 686b5d8d6da4cd..a75652f9a177c6 100644 --- a/deps/npm/test/tap/prune-dev-dep-with-bins.js +++ b/deps/npm/test/tap/prune-dev-dep-with-bins.js @@ -1,12 +1,11 @@ 'use strict' var fs = require('fs') -var path = require('path') var test = require('tap').test var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks( Dir({ diff --git a/deps/npm/test/tap/prune-with-dev-dep-duplicate.js b/deps/npm/test/tap/prune-with-dev-dep-duplicate.js index bfe902b1d3c5b2..7efea5c01e6190 100644 --- a/deps/npm/test/tap/prune-with-dev-dep-duplicate.js +++ b/deps/npm/test/tap/prune-with-dev-dep-duplicate.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') var server -var pkg = path.resolve(__dirname, 'prune') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var json = { diff --git a/deps/npm/test/tap/prune-with-only-dev-deps.js b/deps/npm/test/tap/prune-with-only-dev-deps.js index dce9497e517ff8..c8e87a53569a9d 100644 --- a/deps/npm/test/tap/prune-with-only-dev-deps.js +++ b/deps/npm/test/tap/prune-with-only-dev-deps.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') var server -var pkg = path.resolve(__dirname, 'prune') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var json = { diff --git a/deps/npm/test/tap/prune.js b/deps/npm/test/tap/prune.js index 4fe586359e054d..6e033ceae00f24 100644 --- a/deps/npm/test/tap/prune.js +++ b/deps/npm/test/tap/prune.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') var server -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var json = { diff --git a/deps/npm/test/tap/publish-access-scoped.js b/deps/npm/test/tap/publish-access-scoped.js index 17339cedfda338..31b1bed26c8300 100644 --- a/deps/npm/test/tap/publish-access-scoped.js +++ b/deps/npm/test/tap/publish-access-scoped.js @@ -8,7 +8,7 @@ var mr = require('npm-registry-mock') var common = require('../common-tap') var server -var pkg = path.join(__dirname, 'publish-access') +var pkg = common.pkg test('setup', function (t) { mr({port: common.port, throwOnUnmatched: true}, function (err, s) { diff --git a/deps/npm/test/tap/publish-access-unscoped-restricted-fails.js b/deps/npm/test/tap/publish-access-unscoped-restricted-fails.js index 660d0f48d7d5a5..f615fa60f2450c 100644 --- a/deps/npm/test/tap/publish-access-unscoped-restricted-fails.js +++ b/deps/npm/test/tap/publish-access-unscoped-restricted-fails.js @@ -6,7 +6,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'publish-access-unscoped') +var pkg = common.pkg test('setup', function (t) { mkdirp.sync(pkg) diff --git a/deps/npm/test/tap/publish-access-unscoped.js b/deps/npm/test/tap/publish-access-unscoped.js index 1766f61f4f93d5..a2489e2bcaf4b2 100644 --- a/deps/npm/test/tap/publish-access-unscoped.js +++ b/deps/npm/test/tap/publish-access-unscoped.js @@ -8,7 +8,7 @@ var mr = require('npm-registry-mock') var common = require('../common-tap') var server -var pkg = path.join(__dirname, 'publish-access-unscoped') +var pkg = common.pkg test('setup', function (t) { mr({port: common.port, throwOnUnmatched: true}, function (err, s) { diff --git a/deps/npm/test/tap/publish-config.js b/deps/npm/test/tap/publish-config.js index 14fd40311a7c03..705ef7ae7a2ca1 100644 --- a/deps/npm/test/tap/publish-config.js +++ b/deps/npm/test/tap/publish-config.js @@ -17,9 +17,9 @@ fs.writeFileSync(pkg + '/package.json', JSON.stringify({ }), 'utf8') fs.writeFileSync(pkg + '/fixture_npmrc', - '//localhost:1337/:email = fancy@feast.net\n' + - '//localhost:1337/:username = fancy\n' + - '//localhost:1337/:_password = ' + Buffer.from('feast').toString('base64')) + '//localhost:' + common.port + '/:email = fancy@feast.net\n' + + '//localhost:' + common.port + '/:username = fancy\n' + + '//localhost:' + common.port + '/:_password = ' + Buffer.from('feast').toString('base64')) test(function (t) { let child diff --git a/deps/npm/test/tap/publish-invalid-semver-tag.js b/deps/npm/test/tap/publish-invalid-semver-tag.js index 21543869a5ca66..400030908b21cf 100644 --- a/deps/npm/test/tap/publish-invalid-semver-tag.js +++ b/deps/npm/test/tap/publish-invalid-semver-tag.js @@ -9,7 +9,7 @@ var mr = require('npm-registry-mock') var osenv = require('osenv') -var PKG_DIR = path.resolve(__dirname, 'publish-invalid-semver-tag') +var PKG_DIR = common.pkg var CACHE_DIR = path.resolve(PKG_DIR, 'cache') var DEFAULT_PKG = { diff --git a/deps/npm/test/tap/publish-scoped.js b/deps/npm/test/tap/publish-scoped.js index b8fe0ae2f69027..efa86c85391d07 100644 --- a/deps/npm/test/tap/publish-scoped.js +++ b/deps/npm/test/tap/publish-scoped.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var common = require('../common-tap') var mr = require('npm-registry-mock') -var pkg = path.join(__dirname, 'prepublish_package') +var pkg = common.pkg var server @@ -42,9 +42,9 @@ test('npm publish should honor scoping', function (t) { 'progress=false', 'cache=' + path.join(pkg, 'cache'), 'registry=http://nonexistent.lvh.me', - '//localhost:1337/:username=username', - '//localhost:1337/:_password=' + Buffer.from('password').toString('base64'), - '//localhost:1337/:email=' + 'ogd@aoaioxxysz.net', + '//localhost:' + common.port + '/:username=username', + '//localhost:' + common.port + '/:_password=' + Buffer.from('password').toString('base64'), + '//localhost:' + common.port + '/:email=' + 'ogd@aoaioxxysz.net', '@bigco:registry=' + common.registry ] var configFile = path.join(pkg, '.npmrc') diff --git a/deps/npm/test/tap/publish.js b/deps/npm/test/tap/publish.js index 765cfb07c6c82e..c5070444336903 100644 --- a/deps/npm/test/tap/publish.js +++ b/deps/npm/test/tap/publish.js @@ -10,7 +10,7 @@ const path = require('path') const rimraf = require('rimraf') const test = require('tap').test -const testDir = path.join(__dirname, 'publish_test_package') +const testDir = common.pkg function setup () { cleanup() @@ -125,8 +125,8 @@ test('npm publish --json', (t) => { name: 'publish-organized', version: '1.2.5', files: [ - {path: 'package.json'}, - {path: 'index.js'} + {path: 'index.js'}, + {path: 'package.json'} ], entryCount: 2 }, 'JSON output reflects package contents') @@ -154,8 +154,8 @@ test('npm publish --dry-run --json', (t) => { name: 'publish-organized', version: '1.2.5', files: [ - {path: 'package.json'}, - {path: 'index.js'} + {path: 'index.js'}, + {path: 'package.json'} ], entryCount: 2 }, 'JSON output reflects package contents') diff --git a/deps/npm/test/tap/repo.js b/deps/npm/test/tap/repo.js index 54907f620c77e8..0ee50af192cb19 100644 --- a/deps/npm/test/tap/repo.js +++ b/deps/npm/test/tap/repo.js @@ -5,16 +5,17 @@ var test = require('tap').test var rimraf = require('rimraf') var fs = require('fs') var path = require('path') -var fakeBrowser = path.join(__dirname, '_script.sh') -var outFile = path.join(__dirname, '/_output') - -var opts = { cwd: __dirname } +var fakeBrowser = path.join(common.pkg, '_script.sh') +var outFile = path.join(common.pkg, '_output') +var opts = { cwd: common.pkg } +var mkdirp = require('mkdirp') common.pendIfWindows('This is trickier to convert without opening new shells') test('setup', function (t) { + mkdirp.sync(common.pkg) var s = '#!/usr/bin/env bash\n' + - 'echo "$@" > ' + JSON.stringify(__dirname) + '/_output\n' + 'echo "$@" > ' + JSON.stringify(common.pkg) + '/_output\n' fs.writeFileSync(fakeBrowser, s, 'ascii') fs.chmodSync(fakeBrowser, '0755') t.pass('made script') diff --git a/deps/npm/test/tap/retry-on-stale-cache.js b/deps/npm/test/tap/retry-on-stale-cache.js index 8aec35ed4f44da..129c52c160d0e2 100644 --- a/deps/npm/test/tap/retry-on-stale-cache.js +++ b/deps/npm/test/tap/retry-on-stale-cache.js @@ -7,7 +7,7 @@ var Tacks = require('tacks') var Dir = Tacks.Dir var File = Tacks.File -var workdir = path.join(__dirname, path.basename(__filename, '.js')) +var workdir = common.pkg var cachedir = path.join(workdir, 'cache') var modulesdir = path.join(workdir, 'modules') var oldModule = path.join(modulesdir, 'good-night-0.1.0.tgz') diff --git a/deps/npm/test/tap/run-script-filter-private.js b/deps/npm/test/tap/run-script-filter-private.js index 631759c13a7336..31f1912fd103a0 100644 --- a/deps/npm/test/tap/run-script-filter-private.js +++ b/deps/npm/test/tap/run-script-filter-private.js @@ -7,7 +7,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'run-script-filter-private') +var pkg = common.pkg var opts = { cwd: pkg } diff --git a/deps/npm/test/tap/run-script.js b/deps/npm/test/tap/run-script.js index f50a9632851a07..a937abadf2c1aa 100644 --- a/deps/npm/test/tap/run-script.js +++ b/deps/npm/test/tap/run-script.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'run-script') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var tmp = path.resolve(pkg, 'tmp') diff --git a/deps/npm/test/tap/save-optional.js b/deps/npm/test/tap/save-optional.js index 66e430dc78b719..c293401f527cb6 100644 --- a/deps/npm/test/tap/save-optional.js +++ b/deps/npm/test/tap/save-optional.js @@ -8,7 +8,7 @@ const File = Tacks.File const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/scope-header.js b/deps/npm/test/tap/scope-header.js index 3eb70f132e669b..f291b3a5009647 100644 --- a/deps/npm/test/tap/scope-header.js +++ b/deps/npm/test/tap/scope-header.js @@ -7,7 +7,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var withScope = path.join(testdir, 'with-scope') var withoutScope = path.join(testdir, 'without-scope') diff --git a/deps/npm/test/tap/scripts-whitespace-windows.js b/deps/npm/test/tap/scripts-whitespace-windows.js index 4d1e53a8f5a5dd..9378564bb52bca 100644 --- a/deps/npm/test/tap/scripts-whitespace-windows.js +++ b/deps/npm/test/tap/scripts-whitespace-windows.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'scripts-whitespace-windows') +var pkg = common.pkg var tmp = path.resolve(pkg, 'tmp') var cache = path.resolve(pkg, 'cache') var dep = path.resolve(pkg, 'dep') diff --git a/deps/npm/test/tap/search.all-package-search.js b/deps/npm/test/tap/search.all-package-search.js index 51c1ffcf90157b..419e4fdeed691a 100644 --- a/deps/npm/test/tap/search.all-package-search.js +++ b/deps/npm/test/tap/search.all-package-search.js @@ -14,7 +14,7 @@ const {File} = Tacks const common = require('../common-tap.js') -const PKG_DIR = path.resolve(__dirname, 'search') +const PKG_DIR = common.pkg const CACHE_DIR = path.resolve(PKG_DIR, 'cache') const cacheBase = cacheFile(CACHE_DIR)(common.registry + '/-/all') const cachePath = path.join(cacheBase, '.cache.json') diff --git a/deps/npm/test/tap/search.js b/deps/npm/test/tap/search.js index bbd293c3a1a3fc..70d17e5469d47b 100644 --- a/deps/npm/test/tap/search.js +++ b/deps/npm/test/tap/search.js @@ -14,7 +14,7 @@ const File = Tacks.File const common = require('../common-tap.js') -const PKG_DIR = path.resolve(__dirname, 'search') +const PKG_DIR = common.pkg const CACHE_DIR = path.resolve(PKG_DIR, 'cache') const cacheBase = cacheFile(CACHE_DIR)(common.registry + '/-/all') const cachePath = path.join(cacheBase, '.cache.json') diff --git a/deps/npm/test/tap/shared-linked.js b/deps/npm/test/tap/shared-linked.js index 3ee00e063d4c86..bb2d9bd459aa3e 100644 --- a/deps/npm/test/tap/shared-linked.js +++ b/deps/npm/test/tap/shared-linked.js @@ -8,7 +8,7 @@ var Dir = Tacks.Dir var common = require('../common-tap.js') var mr = require('npm-registry-mock') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var bugdir = path.join(testdir, 'modules', 'bug') // This is an absolutely minimal version of the optimist included with diff --git a/deps/npm/test/tap/shrinkwrap-_auth.js b/deps/npm/test/tap/shrinkwrap-_auth.js index 5aff86fb08f80f..156bd9667cb83f 100644 --- a/deps/npm/test/tap/shrinkwrap-_auth.js +++ b/deps/npm/test/tap/shrinkwrap-_auth.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var outfile = path.resolve(pkg, '_npmrc') var modules = path.resolve(pkg, 'node_modules') diff --git a/deps/npm/test/tap/shrinkwrap-default-dev.js b/deps/npm/test/tap/shrinkwrap-default-dev.js index 48f9f2a90af90f..9ff998fa4846f0 100644 --- a/deps/npm/test/tap/shrinkwrap-default-dev.js +++ b/deps/npm/test/tap/shrinkwrap-default-dev.js @@ -7,7 +7,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/shrinkwrap-dev-dependency.js b/deps/npm/test/tap/shrinkwrap-dev-dependency.js index 79d3b7cd0fe460..8006aa9ea8a81d 100644 --- a/deps/npm/test/tap/shrinkwrap-dev-dependency.js +++ b/deps/npm/test/tap/shrinkwrap-dev-dependency.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'shrinkwrap-dev-dependency') +var pkg = common.pkg var opts = [ '--cache', path.resolve(pkg, 'cache'), diff --git a/deps/npm/test/tap/shrinkwrap-empty-deps.js b/deps/npm/test/tap/shrinkwrap-empty-deps.js index eeb5e656ef20c3..af9b4810afaf61 100644 --- a/deps/npm/test/tap/shrinkwrap-empty-deps.js +++ b/deps/npm/test/tap/shrinkwrap-empty-deps.js @@ -9,7 +9,7 @@ const path = require('path') const rimraf = require('rimraf') const test = require('tap').test -const pkg = path.resolve(__dirname, 'shrinkwrap-empty-deps') +const pkg = common.pkg const EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/shrinkwrap-extra-metadata.js b/deps/npm/test/tap/shrinkwrap-extra-metadata.js index dd7f85ee827ed6..a5ff721a7a8160 100644 --- a/deps/npm/test/tap/shrinkwrap-extra-metadata.js +++ b/deps/npm/test/tap/shrinkwrap-extra-metadata.js @@ -10,7 +10,7 @@ const path = require('path') const rimraf = require('rimraf') const test = require('tap').test -const pkg = path.join(__dirname, path.basename(__filename, '.js')) +const pkg = common.pkg const json = { author: 'Rockbert', diff --git a/deps/npm/test/tap/shrinkwrap-global-auth.js b/deps/npm/test/tap/shrinkwrap-global-auth.js index 76fa0a4662bf5e..e860abd2fe1a85 100644 --- a/deps/npm/test/tap/shrinkwrap-global-auth.js +++ b/deps/npm/test/tap/shrinkwrap-global-auth.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var outfile = path.resolve(pkg, '_npmrc') var modules = path.resolve(pkg, 'node_modules') diff --git a/deps/npm/test/tap/shrinkwrap-lifecycle-cwd.js b/deps/npm/test/tap/shrinkwrap-lifecycle-cwd.js index bc9ab9cf11d5b8..203c2165ebe600 100644 --- a/deps/npm/test/tap/shrinkwrap-lifecycle-cwd.js +++ b/deps/npm/test/tap/shrinkwrap-lifecycle-cwd.js @@ -7,7 +7,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/shrinkwrap-lifecycle.js b/deps/npm/test/tap/shrinkwrap-lifecycle.js index 8c0f36e3bb84f8..5ed35e186843b2 100644 --- a/deps/npm/test/tap/shrinkwrap-lifecycle.js +++ b/deps/npm/test/tap/shrinkwrap-lifecycle.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'shrinkwrap-lifecycle') +var pkg = common.pkg test('npm shrinkwrap execution order', function (t) { setup() diff --git a/deps/npm/test/tap/shrinkwrap-local-dependency.js b/deps/npm/test/tap/shrinkwrap-local-dependency.js index d1c33b99a5a0b1..d737b10bb6b978 100644 --- a/deps/npm/test/tap/shrinkwrap-local-dependency.js +++ b/deps/npm/test/tap/shrinkwrap-local-dependency.js @@ -8,7 +8,7 @@ var unixFormatPath = require('../../lib/utils/unix-format-path.js') var File = Tacks.File var Dir = Tacks.Dir -var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var cachedir = path.resolve(testdir, 'cache') var config = ['--cache=' + cachedir, '--loglevel=error'] diff --git a/deps/npm/test/tap/shrinkwrap-nested.js b/deps/npm/test/tap/shrinkwrap-nested.js index 44d0cb0b2fb34c..bace44d01aa422 100644 --- a/deps/npm/test/tap/shrinkwrap-nested.js +++ b/deps/npm/test/tap/shrinkwrap-nested.js @@ -8,7 +8,7 @@ var fs = require('fs') var path = require('path') var common = require('../common-tap.js') -var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var modAtgz = path.resolve(testdir, 'modA') + '-1.0.0.tgz' var modB1tgz = path.resolve(testdir, 'modB') + '-1.0.0.tgz' var modB2tgz = path.resolve(testdir, 'modB') + '-2.0.0.tgz' diff --git a/deps/npm/test/tap/shrinkwrap-optional-dependency.js b/deps/npm/test/tap/shrinkwrap-optional-dependency.js index 5085dd0cbb49c8..f2c853ac4b9a70 100644 --- a/deps/npm/test/tap/shrinkwrap-optional-dependency.js +++ b/deps/npm/test/tap/shrinkwrap-optional-dependency.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'shrinkwrap-optional-dependency') +var pkg = common.pkg test('shrinkwrap does not fail on missing optional dependency', function (t) { t.plan(1) diff --git a/deps/npm/test/tap/shrinkwrap-optional-platform.js b/deps/npm/test/tap/shrinkwrap-optional-platform.js index b109d89578150d..d6a3c41b516f15 100644 --- a/deps/npm/test/tap/shrinkwrap-optional-platform.js +++ b/deps/npm/test/tap/shrinkwrap-optional-platform.js @@ -6,7 +6,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/shrinkwrap-optional-property.js b/deps/npm/test/tap/shrinkwrap-optional-property.js index ccff5a93e2e386..84bc5cb258281f 100644 --- a/deps/npm/test/tap/shrinkwrap-optional-property.js +++ b/deps/npm/test/tap/shrinkwrap-optional-property.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'shrinkwrap-optional-dependency') +var pkg = common.pkg test('shrinkwrap adds optional property when optional dependency', function (t) { t.plan(1) @@ -58,7 +58,7 @@ var desired = { }, 'underscore': { version: '1.3.3', - resolved: 'http://localhost:1337/underscore/-/underscore-1.3.3.tgz', + resolved: 'http://localhost:' + common.port + '/underscore/-/underscore-1.3.3.tgz', optional: true, integrity: 'sha1-R6xTaD2vgyv6lS4XdEF9pHgXrkI=' } diff --git a/deps/npm/test/tap/shrinkwrap-prod-dependency-also.js b/deps/npm/test/tap/shrinkwrap-prod-dependency-also.js index 6cc388946e4062..94f3c4ac9012a3 100644 --- a/deps/npm/test/tap/shrinkwrap-prod-dependency-also.js +++ b/deps/npm/test/tap/shrinkwrap-prod-dependency-also.js @@ -8,7 +8,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var opts = [ '--cache=' + path.resolve(pkg, 'cache'), '--registry=' + common.registry diff --git a/deps/npm/test/tap/shrinkwrap-prod-dependency.js b/deps/npm/test/tap/shrinkwrap-prod-dependency.js index 34e30d7c7a987f..eb04db9ca138c5 100644 --- a/deps/npm/test/tap/shrinkwrap-prod-dependency.js +++ b/deps/npm/test/tap/shrinkwrap-prod-dependency.js @@ -10,7 +10,7 @@ var test = require('tap').test var npm = require('../../') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'shrinkwrap-prod-dependency') +var pkg = common.pkg test("shrinkwrap --dev doesn't strip out prod dependencies", function (t) { t.plan(1) diff --git a/deps/npm/test/tap/shrinkwrap-resolve-conflict.js b/deps/npm/test/tap/shrinkwrap-resolve-conflict.js index 146d1191bf5aef..d1f63f7e62661f 100644 --- a/deps/npm/test/tap/shrinkwrap-resolve-conflict.js +++ b/deps/npm/test/tap/shrinkwrap-resolve-conflict.js @@ -12,7 +12,7 @@ const Tacks = require('tacks') const File = Tacks.File const Dir = Tacks.Dir -const testDir = path.resolve(__dirname, path.basename(__filename, '.js')) +const testDir = common.pkg const modAdir = path.resolve(testDir, 'modA') const modBdir = path.resolve(testDir, 'modB') const modCdir = path.resolve(testDir, 'modC') diff --git a/deps/npm/test/tap/shrinkwrap-save-dev-with-existing-deps.js b/deps/npm/test/tap/shrinkwrap-save-dev-with-existing-deps.js index 5934a758da27a7..a71408e54f5ab1 100644 --- a/deps/npm/test/tap/shrinkwrap-save-dev-with-existing-deps.js +++ b/deps/npm/test/tap/shrinkwrap-save-dev-with-existing-deps.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var base = path.resolve(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installme = path.join(base, 'installme') var installme_pkg = path.join(installme, 'package.json') var example = path.join(base, 'example') diff --git a/deps/npm/test/tap/shrinkwrap-save-with-existing-dev-deps.js b/deps/npm/test/tap/shrinkwrap-save-with-existing-dev-deps.js index 5f0eb079622765..fcbbeeffddf4d3 100644 --- a/deps/npm/test/tap/shrinkwrap-save-with-existing-dev-deps.js +++ b/deps/npm/test/tap/shrinkwrap-save-with-existing-dev-deps.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var base = path.resolve(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installme = path.join(base, 'installme') var installme_pkg = path.join(installme, 'package.json') var example = path.join(base, 'example') diff --git a/deps/npm/test/tap/shrinkwrap-scoped-auth.js b/deps/npm/test/tap/shrinkwrap-scoped-auth.js index 72c3b5119853a8..3098b8aa12e93e 100644 --- a/deps/npm/test/tap/shrinkwrap-scoped-auth.js +++ b/deps/npm/test/tap/shrinkwrap-scoped-auth.js @@ -14,7 +14,7 @@ var test = require('tap').test var common = require('../common-tap.js') var toNerfDart = require('../../lib/config/nerf-dart.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var outfile = path.resolve(pkg, '_npmrc') var modules = path.resolve(pkg, 'node_modules') var tarballPath = '/scoped-underscore/-/scoped-underscore-1.3.1.tgz' diff --git a/deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js b/deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js index 8960c0926154ca..6a4ceb1970ece3 100644 --- a/deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js +++ b/deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var opts = { env: common.newEnv().extend({ diff --git a/deps/npm/test/tap/shrinkwrap-version-match.js b/deps/npm/test/tap/shrinkwrap-version-match.js index 57906528f7be7f..e579f84d4b3bd4 100644 --- a/deps/npm/test/tap/shrinkwrap-version-match.js +++ b/deps/npm/test/tap/shrinkwrap-version-match.js @@ -7,7 +7,7 @@ var fs = require('fs') var path = require('path') var common = require('../common-tap.js') -var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var modAdir = path.resolve(testdir, 'modA') var modB1dir = path.resolve(testdir, 'modB@1') var modB2dir = path.resolve(testdir, 'modB@2') diff --git a/deps/npm/test/tap/sorted-package-json.js b/deps/npm/test/tap/sorted-package-json.js index 557f3dc53d272b..d67b729f683e93 100644 --- a/deps/npm/test/tap/sorted-package-json.js +++ b/deps/npm/test/tap/sorted-package-json.js @@ -2,11 +2,11 @@ var test = require('tap').test var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var pkg = path.resolve(__dirname, 'sorted-package-json') +var common = require('../common-tap.js') +var pkg = common.pkg var tmp = path.join(pkg, 'tmp') var cache = path.join(pkg, 'cache') var fs = require('fs') -var common = require('../common-tap.js') var mr = require('npm-registry-mock') var osenv = require('osenv') var packageJson = path.resolve(pkg, 'package.json') diff --git a/deps/npm/test/tap/spawn-enoent-help.js b/deps/npm/test/tap/spawn-enoent-help.js index d4a6fcdd832ad5..cb7c942be8e7b1 100644 --- a/deps/npm/test/tap/spawn-enoent-help.js +++ b/deps/npm/test/tap/spawn-enoent-help.js @@ -1,10 +1,9 @@ -var path = require('path') var test = require('tap').test var rimraf = require('rimraf') var mkdirp = require('mkdirp') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'spawn-enoent-help') +var pkg = common.pkg common.pendIfWindows('man pages are not built on Windows') diff --git a/deps/npm/test/tap/spawn-enoent.js b/deps/npm/test/tap/spawn-enoent.js index c81460fdcff82b..78153572eeb708 100644 --- a/deps/npm/test/tap/spawn-enoent.js +++ b/deps/npm/test/tap/spawn-enoent.js @@ -1,11 +1,10 @@ -var path = require('path') var test = require('tap').test var fs = require('fs') var rimraf = require('rimraf') var mkdirp = require('mkdirp') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'spawn-enoent') +var pkg = common.pkg var pj = JSON.stringify({ name: 'x', version: '1.2.3', diff --git a/deps/npm/test/tap/spec-local-specifiers.js b/deps/npm/test/tap/spec-local-specifiers.js index 3601eee5f3c5fc..7b6cacf12cb695 100644 --- a/deps/npm/test/tap/spec-local-specifiers.js +++ b/deps/npm/test/tap/spec-local-specifiers.js @@ -11,7 +11,7 @@ var Dir = Tacks.Dir var common = require('../common-tap.js') var isWindows = require('../../lib/utils/is-windows.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/splat-with-only-prerelease-to-latest.js b/deps/npm/test/tap/splat-with-only-prerelease-to-latest.js index cf5aac110bd94a..5720a2cdcedf44 100644 --- a/deps/npm/test/tap/splat-with-only-prerelease-to-latest.js +++ b/deps/npm/test/tap/splat-with-only-prerelease-to-latest.js @@ -8,7 +8,7 @@ const path = require('path') const rimraf = require('rimraf') const test = require('tap').test -const testdir = path.join(__dirname, path.basename(__filename, '.js')) +const testdir = common.pkg const moduleName = 'xyzzy-wibble' const testModule = { diff --git a/deps/npm/test/tap/startstop.js b/deps/npm/test/tap/startstop.js index 0e9d2d94020b2d..3491441821d921 100644 --- a/deps/npm/test/tap/startstop.js +++ b/deps/npm/test/tap/startstop.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'startstop') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/symlink-cycle.js b/deps/npm/test/tap/symlink-cycle.js index 5bee2c5569ab61..d59a2763bd19c8 100644 --- a/deps/npm/test/tap/symlink-cycle.js +++ b/deps/npm/test/tap/symlink-cycle.js @@ -8,7 +8,7 @@ var rimraf = require('rimraf') var writeFileSync = require('fs').writeFileSync var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var cycle = path.join(base, 'cycle') var cycleJSON = { diff --git a/deps/npm/test/tap/tag-version-prefix.js b/deps/npm/test/tap/tag-version-prefix.js index 555de1af165184..b72255a2261527 100644 --- a/deps/npm/test/tap/tag-version-prefix.js +++ b/deps/npm/test/tap/tag-version-prefix.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, 'version-message-config') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var npmrc = path.resolve(pkg, '.npmrc') var packagePath = path.resolve(pkg, 'package.json') diff --git a/deps/npm/test/tap/tagged-version-matching.js b/deps/npm/test/tap/tagged-version-matching.js index 55dfb7b7c4b1c4..64522745c80e2b 100644 --- a/deps/npm/test/tap/tagged-version-matching.js +++ b/deps/npm/test/tap/tagged-version-matching.js @@ -7,7 +7,7 @@ var Dir = Tacks.Dir var Symlink = Tacks.Symlink var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/tree-style.js b/deps/npm/test/tap/tree-style.js index 12fdb0bbd9ac42..5d8abef3698b29 100644 --- a/deps/npm/test/tap/tree-style.js +++ b/deps/npm/test/tap/tree-style.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var fs = require('graceful-fs') var common = require('../common-tap') -var base = path.resolve(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var modA = path.resolve(base, 'modA') var modB = path.resolve(base, 'modB') var modC = path.resolve(base, 'modC') diff --git a/deps/npm/test/tap/umask-lifecycle.js b/deps/npm/test/tap/umask-lifecycle.js index c4c323363775e2..8b365d62335d79 100644 --- a/deps/npm/test/tap/umask-lifecycle.js +++ b/deps/npm/test/tap/umask-lifecycle.js @@ -1,5 +1,4 @@ var fs = require('fs') -var path = require('path') var mkdirp = require('mkdirp') var rimraf = require('rimraf') @@ -9,7 +8,7 @@ var sprintf = require('sprintf-js').sprintf var escapeExecPath = require('../../lib/utils/escape-exec-path.js') var escapeArg = require('../../lib/utils/escape-arg.js') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'umask-lifecycle') +var pkg = common.pkg var nodeCmd = escapeExecPath(common.nodeBin) var npmCmd = nodeCmd + ' ' + escapeArg(common.bin) @@ -24,7 +23,7 @@ var pj = JSON.stringify({ var umask = process.umask() var expected = [ '', - '> x@1.2.3 umask ' + path.join(__dirname, 'umask-lifecycle'), + '> x@1.2.3 umask ' + pkg, '> ' + umaskScript, '', sprintf('%04o', umask), diff --git a/deps/npm/test/tap/uninstall-link-clean.js b/deps/npm/test/tap/uninstall-link-clean.js index 2b1d244d00fdeb..e21c370f603b70 100644 --- a/deps/npm/test/tap/uninstall-link-clean.js +++ b/deps/npm/test/tap/uninstall-link-clean.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var pkg = path.join(testdir, 'pkg') var dep = path.join(testdir, 'dep') var work = path.join(testdir, 'uninstall-link-clean-TEST') diff --git a/deps/npm/test/tap/uninstall-package.js b/deps/npm/test/tap/uninstall-package.js index 7cc7b1da1f8a83..87fdee22816975 100644 --- a/deps/npm/test/tap/uninstall-package.js +++ b/deps/npm/test/tap/uninstall-package.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'uninstall-package') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, stdio: [0, 'pipe', 2] } @@ -18,7 +18,8 @@ var json = { version: '0.0.0', dependencies: { underscore: '~1.3.1', - request: '~0.9.0' + request: '~0.9.0', + '@isaacs/namespace-test': '1.x' } } @@ -69,6 +70,27 @@ test('returns a list of removed items', function (t) { }) }) +test('does not fail if installed package lacks a name somehow', function (t) { + const scope = path.resolve(pkg, 'node_modules/@isaacs') + const scopePkg = path.resolve(scope, 'namespace-test') + const pj = path.resolve(scopePkg, 'package.json') + fs.writeFileSync(pj, JSON.stringify({ + lol: 'yolo', + name: 99 + })) + common.npm( + ['uninstall', '@isaacs/namespace-test'], + EXEC_OPTS, + function (err, code, stdout, stderr) { + if (err) throw err + t.equal(code, 0, 'should exit successfully') + t.has(stdout, /removed 1 package in/) + t.notOk(fs.existsSync(scope), 'scoped package removed') + t.end() + } + ) +}) + test('cleanup', function (t) { cleanup() t.end() diff --git a/deps/npm/test/tap/uninstall-save.js b/deps/npm/test/tap/uninstall-save.js index 9bf342d7cf9556..0605616e07f03e 100644 --- a/deps/npm/test/tap/uninstall-save.js +++ b/deps/npm/test/tap/uninstall-save.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, stdio: [0, 'ignore', 2] } diff --git a/deps/npm/test/tap/unpack-foreign-tarball.js b/deps/npm/test/tap/unpack-foreign-tarball.js index d128e94d8c37df..a1649c24bd23fe 100644 --- a/deps/npm/test/tap/unpack-foreign-tarball.js +++ b/deps/npm/test/tap/unpack-foreign-tarball.js @@ -10,7 +10,7 @@ var common = require('../common-tap.js') var fixtures = path.resolve(__dirname, '..', 'fixtures') -var pkg = path.resolve(__dirname, 'unpack-foreign-tarball') +var pkg = common.pkg var nm = path.resolve(pkg, 'node_modules') var target = path.resolve(nm, 'npm-test-gitignore') var cache = path.resolve(pkg, 'cache') diff --git a/deps/npm/test/tap/unpublish-config.js b/deps/npm/test/tap/unpublish-config.js index f5d391d8c29b8e..f358835561eee8 100644 --- a/deps/npm/test/tap/unpublish-config.js +++ b/deps/npm/test/tap/unpublish-config.js @@ -7,10 +7,9 @@ var osenv = require('osenv') var rimraf = require('rimraf') var test = require('tap').test -var pkg = path.join(__dirname, 'npm-test-unpublish-config') -var fixturePath = path.join(pkg, 'fixture_npmrc') - var common = require('../common-tap.js') +var pkg = common.pkg +var fixturePath = path.join(pkg, 'fixture_npmrc') var json = { name: 'npm-test-unpublish-config', @@ -27,7 +26,7 @@ test('setup', function (t) { ) fs.writeFileSync( fixturePath, - '//localhost:1337/:_authToken = beeeeeeeeeeeeef\n' + + '//localhost:' + common.port + '/:_authToken = beeeeeeeeeeeeef\n' + 'registry = http://lvh.me:4321/registry/path\n' ) diff --git a/deps/npm/test/tap/unsupported.js b/deps/npm/test/tap/unsupported.js index 7abc8da7414410..deae8d3c034c19 100644 --- a/deps/npm/test/tap/unsupported.js +++ b/deps/npm/test/tap/unsupported.js @@ -21,8 +21,8 @@ var versions = [ ['v2.3.1', true, true], ['v3.0.0', true, true], ['v4.5.0', true, true], - ['v4.8.4', false, true], - ['v5.7.1', false, true], + ['v4.8.4', true, true], + ['v5.7.1', true, true], ['v6.8.1', false, false], ['v7.0.0-beta23', false, true], ['v7.2.3', false, true], diff --git a/deps/npm/test/tap/update-examples.js b/deps/npm/test/tap/update-examples.js index 8369d002fab297..f0a7a6271dae99 100644 --- a/deps/npm/test/tap/update-examples.js +++ b/deps/npm/test/tap/update-examples.js @@ -9,7 +9,7 @@ var osenv = require('osenv') var requireInject = require('require-inject') -var PKG_DIR = path.resolve(__dirname, 'update-examples') +var PKG_DIR = common.pkg var CACHE_DIR = path.resolve(PKG_DIR, 'cache') // ** constant templates for mocks ** diff --git a/deps/npm/test/tap/update-symlink.js b/deps/npm/test/tap/update-symlink.js index 79139d306f5fd0..a21a68267b542b 100644 --- a/deps/npm/test/tap/update-symlink.js +++ b/deps/npm/test/tap/update-symlink.js @@ -8,7 +8,7 @@ const Symlink = Tacks.Symlink const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/upgrade-lifecycles.js b/deps/npm/test/tap/upgrade-lifecycles.js index 0d0b8da616f676..3adea06d71375e 100644 --- a/deps/npm/test/tap/upgrade-lifecycles.js +++ b/deps/npm/test/tap/upgrade-lifecycles.js @@ -6,7 +6,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/deps/npm/test/tap/url-dependencies.js b/deps/npm/test/tap/url-dependencies.js index 66b3e1a63b47cd..2017151568e094 100644 --- a/deps/npm/test/tap/url-dependencies.js +++ b/deps/npm/test/tap/url-dependencies.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') var server -var pkg = path.resolve(__dirname, 'url-dependencies') +var pkg = common.pkg var json = { author: 'Steve Mason', diff --git a/deps/npm/test/tap/verify-no-lifecycle-on-repo.js b/deps/npm/test/tap/verify-no-lifecycle-on-repo.js index babdfb7dace238..c9232715a7079c 100644 --- a/deps/npm/test/tap/verify-no-lifecycle-on-repo.js +++ b/deps/npm/test/tap/verify-no-lifecycle-on-repo.js @@ -5,9 +5,9 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var test = require('tap').test var requireInject = require('require-inject') -require('../common-tap.js') +const common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var baseJSON = { name: 'base', diff --git a/deps/npm/test/tap/version-allow-same-version.js b/deps/npm/test/tap/version-allow-same-version.js index 66f568dec97212..fdd68032bc6b92 100644 --- a/deps/npm/test/tap/version-allow-same-version.js +++ b/deps/npm/test/tap/version-allow-same-version.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'version-allow-same-version') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var npmrc = path.resolve(pkg, './.npmrc') var configContents = 'sign-git-tag=false\n' diff --git a/deps/npm/test/tap/version-commit-hooks.js b/deps/npm/test/tap/version-commit-hooks.js index 4791fc3f3c4d24..568c82b46b0392 100644 --- a/deps/npm/test/tap/version-commit-hooks.js +++ b/deps/npm/test/tap/version-commit-hooks.js @@ -3,7 +3,8 @@ var path = require('path') var osenv = require('osenv') var mkdirp = require('mkdirp') var rimraf = require('rimraf') -var pkg = path.resolve(__dirname, 'version-commit-hooks') +const common = require('../common-tap.js') +var pkg = common.pkg var test = require('tap').test var npm = require('../../') diff --git a/deps/npm/test/tap/version-consistent-newlines.js b/deps/npm/test/tap/version-consistent-newlines.js index 11020b2a7004e5..56b16afcf4b48a 100644 --- a/deps/npm/test/tap/version-consistent-newlines.js +++ b/deps/npm/test/tap/version-consistent-newlines.js @@ -10,7 +10,7 @@ const mkdirp = require('mkdirp') const rimraf = require('rimraf') const requireInject = require('require-inject') -const pkg = path.resolve(__dirname, 'version-no-git') +const pkg = common.pkg const cache = path.resolve(pkg, 'cache') const gitDir = path.resolve(pkg, '.git') diff --git a/deps/npm/test/tap/version-from-git.js b/deps/npm/test/tap/version-from-git.js index 1dc649beb42125..759396a782191a 100644 --- a/deps/npm/test/tap/version-from-git.js +++ b/deps/npm/test/tap/version-from-git.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, 'version-from-git') +var pkg = common.pkg var packagePath = path.resolve(pkg, 'package.json') var cache = path.resolve(pkg, 'cache') diff --git a/deps/npm/test/tap/version-git-not-clean.js b/deps/npm/test/tap/version-git-not-clean.js index 43e2549ceb2808..b387c00e64de3a 100644 --- a/deps/npm/test/tap/version-git-not-clean.js +++ b/deps/npm/test/tap/version-git-not-clean.js @@ -9,7 +9,7 @@ var mkdirp = require('mkdirp') var which = require('which') var spawn = require('child_process').spawn -var pkg = path.resolve(__dirname, 'version-git-not-clean') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') test('npm version with working directory not clean', function (t) { diff --git a/deps/npm/test/tap/version-lifecycle.js b/deps/npm/test/tap/version-lifecycle.js index e7a7793b445071..98c96b6826d4d8 100644 --- a/deps/npm/test/tap/version-lifecycle.js +++ b/deps/npm/test/tap/version-lifecycle.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'version-lifecycle') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var npmrc = path.resolve(pkg, './.npmrc') var configContents = 'sign-git-commit=false\nsign-git-tag=false\n' diff --git a/deps/npm/test/tap/version-message-config.js b/deps/npm/test/tap/version-message-config.js index 12cb6eb59912dc..db45809879733c 100644 --- a/deps/npm/test/tap/version-message-config.js +++ b/deps/npm/test/tap/version-message-config.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, 'version-message-config') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var npmrc = path.resolve(pkg, '.npmrc') var packagePath = path.resolve(pkg, 'package.json') diff --git a/deps/npm/test/tap/version-no-git.js b/deps/npm/test/tap/version-no-git.js index 0a859c7af2170a..dc1ee05662ff6f 100644 --- a/deps/npm/test/tap/version-no-git.js +++ b/deps/npm/test/tap/version-no-git.js @@ -8,7 +8,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var requireInject = require('require-inject') -var pkg = path.resolve(__dirname, 'version-no-git') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var gitDir = path.resolve(pkg, '.git') diff --git a/deps/npm/test/tap/version-no-package.js b/deps/npm/test/tap/version-no-package.js index e4eeda0eebda0f..1b16c9f758c8d8 100644 --- a/deps/npm/test/tap/version-no-package.js +++ b/deps/npm/test/tap/version-no-package.js @@ -1,11 +1,10 @@ var common = require('../common-tap.js') var test = require('tap').test var osenv = require('osenv') -var path = require('path') var mkdirp = require('mkdirp') var rimraf = require('rimraf') -var pkg = path.resolve(__dirname, 'version-no-package') +var pkg = common.pkg test('setup', function (t) { setup() diff --git a/deps/npm/test/tap/version-no-tags.js b/deps/npm/test/tap/version-no-tags.js index 755e640c0b31ea..9e7b08c61fa126 100644 --- a/deps/npm/test/tap/version-no-tags.js +++ b/deps/npm/test/tap/version-no-tags.js @@ -9,7 +9,7 @@ var mkdirp = require('mkdirp') var which = require('which') var spawn = require('child_process').spawn -var pkg = path.resolve(__dirname, 'version-no-tags') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') test('npm version without git tag', function (t) { diff --git a/deps/npm/test/tap/version-prerelease-id.js b/deps/npm/test/tap/version-prerelease-id.js index 1a206aa116649a..5e342667cdba2f 100644 --- a/deps/npm/test/tap/version-prerelease-id.js +++ b/deps/npm/test/tap/version-prerelease-id.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'version-shrinkwrap') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var EXEC_OPTS = { cwd: pkg } diff --git a/deps/npm/test/tap/version-sub-directory-shrinkwrap.js b/deps/npm/test/tap/version-sub-directory-shrinkwrap.js index 0455b62ab7536a..c6e607d7c57675 100644 --- a/deps/npm/test/tap/version-sub-directory-shrinkwrap.js +++ b/deps/npm/test/tap/version-sub-directory-shrinkwrap.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, 'version-sub-directory') +var pkg = common.pkg var subDirectory = path.resolve(pkg, 'sub-directory') var packagePath = path.resolve(pkg, 'package.json') var shrinkwrapPath = path.resolve(pkg, 'npm-shrinkwrap.json') diff --git a/deps/npm/test/tap/version-sub-directory.js b/deps/npm/test/tap/version-sub-directory.js index 71c96121ca7d7d..a7eb8f10420893 100644 --- a/deps/npm/test/tap/version-sub-directory.js +++ b/deps/npm/test/tap/version-sub-directory.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, 'version-sub-directory') +var pkg = common.pkg var subDirectory = path.resolve(pkg, 'sub-directory') var packagePath = path.resolve(pkg, 'package.json') var cache = path.resolve(pkg, 'cache') diff --git a/deps/npm/test/tap/version-update-shrinkwrap.js b/deps/npm/test/tap/version-update-shrinkwrap.js index 58264e9926c03d..47822f646ec7f9 100644 --- a/deps/npm/test/tap/version-update-shrinkwrap.js +++ b/deps/npm/test/tap/version-update-shrinkwrap.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'version-shrinkwrap') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') test('npm version updates shrinkwrap - no git', function (t) { diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index 3682c888cc8563..79c17ad57f8923 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -1703,6 +1703,13 @@ class V8_EXPORT ScriptCompiler { CompileOptions options = kNoCompileOptions, NoCacheReason no_cache_reason = kNoCacheNoReason); + static V8_WARN_UNUSED_RESULT MaybeLocal CompileFunctionInContext( + Local context, Source* source, size_t arguments_count, + Local arguments[], size_t context_extension_count, + Local context_extensions[], CompileOptions options, + NoCacheReason no_cache_reason, + Local* script_or_module_out); + /** * Creates and returns code cache for the specified unbound_script. * This will return nullptr if the script cannot be serialized. The diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc index f4f3fa309eb556..4127d6735adb28 100644 --- a/deps/v8/src/api.cc +++ b/deps/v8/src/api.cc @@ -2500,69 +2500,92 @@ MaybeLocal ScriptCompiler::CompileFunctionInContext( Local arguments[], size_t context_extension_count, Local context_extensions[], CompileOptions options, NoCacheReason no_cache_reason) { - PREPARE_FOR_EXECUTION(v8_context, ScriptCompiler, CompileFunctionInContext, - Function); - TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.ScriptCompiler"); + return ScriptCompiler::CompileFunctionInContext( + v8_context, source, arguments_count, arguments, context_extension_count, + context_extensions, options, no_cache_reason, nullptr); +} - DCHECK(options == CompileOptions::kConsumeCodeCache || - options == CompileOptions::kEagerCompile || - options == CompileOptions::kNoCompileOptions); +MaybeLocal ScriptCompiler::CompileFunctionInContext( + Local v8_context, Source* source, size_t arguments_count, + Local arguments[], size_t context_extension_count, + Local context_extensions[], CompileOptions options, + NoCacheReason no_cache_reason, + Local* script_or_module_out) { + Local result; - i::Handle context = Utils::OpenHandle(*v8_context); + { + PREPARE_FOR_EXECUTION(v8_context, ScriptCompiler, CompileFunctionInContext, + Function); + TRACE_EVENT_CALL_STATS_SCOPED(isolate, "v8", "V8.ScriptCompiler"); - DCHECK(context->IsNativeContext()); - i::Handle outer_info( - context->empty_function()->shared(), isolate); - - i::Handle fun; - i::Handle arguments_list = - isolate->factory()->NewFixedArray(static_cast(arguments_count)); - for (int i = 0; i < static_cast(arguments_count); i++) { - i::Handle argument = Utils::OpenHandle(*arguments[i]); - if (!IsIdentifier(isolate, argument)) return Local(); - arguments_list->set(i, *argument); - } - - for (size_t i = 0; i < context_extension_count; ++i) { - i::Handle extension = - Utils::OpenHandle(*context_extensions[i]); - if (!extension->IsJSObject()) return Local(); - context = isolate->factory()->NewWithContext( - context, - i::ScopeInfo::CreateForWithScope( - isolate, - context->IsNativeContext() - ? i::Handle::null() - : i::Handle(context->scope_info(), isolate)), - extension); - } + DCHECK(options == CompileOptions::kConsumeCodeCache || + options == CompileOptions::kEagerCompile || + options == CompileOptions::kNoCompileOptions); - i::Compiler::ScriptDetails script_details = GetScriptDetails( - isolate, source->resource_name, source->resource_line_offset, - source->resource_column_offset, source->source_map_url, - source->host_defined_options); + i::Handle context = Utils::OpenHandle(*v8_context); - i::ScriptData* script_data = nullptr; - if (options == kConsumeCodeCache) { - DCHECK(source->cached_data); - // ScriptData takes care of pointer-aligning the data. - script_data = new i::ScriptData(source->cached_data->data, - source->cached_data->length); + DCHECK(context->IsNativeContext()); + + i::Handle arguments_list = + isolate->factory()->NewFixedArray(static_cast(arguments_count)); + for (int i = 0; i < static_cast(arguments_count); i++) { + i::Handle argument = Utils::OpenHandle(*arguments[i]); + if (!IsIdentifier(isolate, argument)) return Local(); + arguments_list->set(i, *argument); + } + + for (size_t i = 0; i < context_extension_count; ++i) { + i::Handle extension = + Utils::OpenHandle(*context_extensions[i]); + if (!extension->IsJSObject()) return Local(); + context = isolate->factory()->NewWithContext( + context, + i::ScopeInfo::CreateForWithScope( + isolate, + context->IsNativeContext() + ? i::Handle::null() + : i::Handle(context->scope_info(), isolate)), + extension); + } + + i::Compiler::ScriptDetails script_details = GetScriptDetails( + isolate, source->resource_name, source->resource_line_offset, + source->resource_column_offset, source->source_map_url, + source->host_defined_options); + + i::ScriptData* script_data = nullptr; + if (options == kConsumeCodeCache) { + DCHECK(source->cached_data); + // ScriptData takes care of pointer-aligning the data. + script_data = new i::ScriptData(source->cached_data->data, + source->cached_data->length); + } + + i::Handle scoped_result; + has_pending_exception = + !i::Compiler::GetWrappedFunction( + Utils::OpenHandle(*source->source_string), arguments_list, context, + script_details, source->resource_options, script_data, options, + no_cache_reason) + .ToHandle(&scoped_result); + if (options == kConsumeCodeCache) { + source->cached_data->rejected = script_data->rejected(); + } + delete script_data; + RETURN_ON_FAILED_EXECUTION(Function); + result = handle_scope.Escape(Utils::CallableToLocal(scoped_result)); } - i::Handle result; - has_pending_exception = - !i::Compiler::GetWrappedFunction( - Utils::OpenHandle(*source->source_string), arguments_list, context, - script_details, source->resource_options, script_data, options, - no_cache_reason) - .ToHandle(&result); - if (options == kConsumeCodeCache) { - source->cached_data->rejected = script_data->rejected(); + if (script_or_module_out != nullptr) { + i::Handle function = + i::Handle::cast(Utils::OpenHandle(*result)); + i::Isolate* isolate = function->GetIsolate(); + i::Handle shared(function->shared(), isolate); + i::Handle script(i::Script::cast(shared->script()), isolate); + *script_or_module_out = v8::Utils::ScriptOrModuleToLocal(script); } - delete script_data; - RETURN_ON_FAILED_EXECUTION(Function); - RETURN_ESCAPED(Utils::CallableToLocal(result)); + + return result; } void ScriptCompiler::ScriptStreamingTask::Run() { data_->task->Run(); } diff --git a/deps/v8/src/arm64/decoder-arm64.h b/deps/v8/src/arm64/decoder-arm64.h index 3bc6934e814539..6597c1788f4691 100644 --- a/deps/v8/src/arm64/decoder-arm64.h +++ b/deps/v8/src/arm64/decoder-arm64.h @@ -96,7 +96,7 @@ class V8_EXPORT_PRIVATE DecoderVisitor { }; // A visitor that dispatches to a list of visitors. -class V8_EXPORT_PRIVATE DispatchingDecoderVisitor : public DecoderVisitor { +class DispatchingDecoderVisitor : public DecoderVisitor { public: DispatchingDecoderVisitor() {} virtual ~DispatchingDecoderVisitor() {} diff --git a/deps/v8/src/arm64/macro-assembler-arm64.h b/deps/v8/src/arm64/macro-assembler-arm64.h index 4c81c5b5f1832e..9ba2b11a723fc5 100644 --- a/deps/v8/src/arm64/macro-assembler-arm64.h +++ b/deps/v8/src/arm64/macro-assembler-arm64.h @@ -2081,7 +2081,7 @@ class InstructionAccurateScope { // original state, even if the lists were modified by some other means. Note // that this scope can be nested but the destructors need to run in the opposite // order as the constructors. We do not have assertions for this. -class V8_EXPORT_PRIVATE UseScratchRegisterScope { +class UseScratchRegisterScope { public: explicit UseScratchRegisterScope(TurboAssembler* tasm) : available_(tasm->TmpList()), diff --git a/deps/v8/src/snapshot/serializer.cc b/deps/v8/src/snapshot/serializer.cc index 0096b2c4fb41e3..447a69aea85f35 100644 --- a/deps/v8/src/snapshot/serializer.cc +++ b/deps/v8/src/snapshot/serializer.cc @@ -116,10 +116,12 @@ void Serializer::SerializeRootObject(Object object) { } #ifdef DEBUG -void Serializer::PrintStack() { +void Serializer::PrintStack() { PrintStack(std::cout); } + +void Serializer::PrintStack(std::ostream& out) { for (const auto o : stack_) { - o->Print(); - PrintF("\n"); + o.Print(out); + out << "\n"; } } #endif // DEBUG diff --git a/deps/v8/src/snapshot/serializer.h b/deps/v8/src/snapshot/serializer.h index 9f7c0ac90c3192..49ffddbefbd87e 100644 --- a/deps/v8/src/snapshot/serializer.h +++ b/deps/v8/src/snapshot/serializer.h @@ -250,6 +250,7 @@ class Serializer : public SerializerDeserializer { void PushStack(HeapObject o) { stack_.push_back(o); } void PopStack() { stack_.pop_back(); } void PrintStack(); + void PrintStack(std::ostream&); #endif // DEBUG SerializerReferenceMap* reference_map() { return &reference_map_; } diff --git a/deps/v8/src/snapshot/startup-serializer.cc b/deps/v8/src/snapshot/startup-serializer.cc index 907b3387429c4c..47b3f0f41b47ac 100644 --- a/deps/v8/src/snapshot/startup-serializer.cc +++ b/deps/v8/src/snapshot/startup-serializer.cc @@ -72,7 +72,16 @@ bool IsUnexpectedCodeObject(Isolate* isolate, HeapObject obj) { #endif // DEBUG void StartupSerializer::SerializeObject(HeapObject obj) { - DCHECK(!obj->IsJSFunction()); +#ifdef DEBUG + if (obj.IsJSFunction()) { + v8::base::OS::PrintError("Reference stack:\n"); + PrintStack(std::cerr); + obj.Print(std::cerr); + FATAL( + "JSFunction should be added through the context snapshot instead of " + "the isolate snapshot"); + } +#endif // DEBUG DCHECK(!IsUnexpectedCodeObject(isolate(), obj)); if (SerializeHotObject(obj)) return; diff --git a/deps/v8/test/cctest/test-compiler.cc b/deps/v8/test/cctest/test-compiler.cc index 17f7a7d851cd76..cb559d8fe21f74 100644 --- a/deps/v8/test/cctest/test-compiler.cc +++ b/deps/v8/test/cctest/test-compiler.cc @@ -647,11 +647,16 @@ TEST(CompileFunctionInContextScriptOrigin) { v8::Integer::New(CcTest::isolate(), 22), v8::Integer::New(CcTest::isolate(), 41)); v8::ScriptCompiler::Source script_source(v8_str("throw new Error()"), origin); + Local script; v8::Local fun = - v8::ScriptCompiler::CompileFunctionInContext(env.local(), &script_source, - 0, nullptr, 0, nullptr) + v8::ScriptCompiler::CompileFunctionInContext( + env.local(), &script_source, 0, nullptr, 0, nullptr, + v8::ScriptCompiler::CompileOptions::kNoCompileOptions, + v8::ScriptCompiler::NoCacheReason::kNoCacheNoReason, &script) .ToLocalChecked(); CHECK(!fun.IsEmpty()); + CHECK(!script.IsEmpty()); + CHECK(script->GetResourceName()->StrictEquals(v8_str("test"))); v8::TryCatch try_catch(CcTest::isolate()); CcTest::isolate()->SetCaptureStackTraceForUncaughtExceptions(true); CHECK(fun->Call(env.local(), env->Global(), 0, nullptr).IsEmpty()); diff --git a/doc/abi_version_registry.json b/doc/abi_version_registry.json index 4a0ee7b4a1f873..16dbd008261a8f 100644 --- a/doc/abi_version_registry.json +++ b/doc/abi_version_registry.json @@ -1,5 +1,7 @@ { "NODE_MODULE_VERSION": [ + { "modules": 75, "runtime": "electron", "variant": "electron", "versions": "7" }, + { "modules": 74, "runtime": "node", "variant": "v8_7.5", "versions": "13.0.0-pre" }, { "modules": 73, "runtime": "electron", "variant": "electron", "versions": "6" }, { "modules": 72, "runtime": "node", "variant": "v8_7.4", "versions": "12.0.0-pre" }, { "modules": 71, "runtime": "node", "variant": "v8_7.3", "versions": "12.0.0-pre" }, diff --git a/doc/api/addons.md b/doc/api/addons.md index eb17650223a6a5..a75d287dce156a 100644 --- a/doc/api/addons.md +++ b/doc/api/addons.md @@ -311,7 +311,7 @@ it is compiled (i.e. sometimes it may be in `./build/Debug/`), Addons can use the [bindings][] package to load the compiled module. While the `bindings` package implementation is more sophisticated in how it -locates Addon modules, it is essentially using a try-catch pattern similar to: +locates Addon modules, it is essentially using a `try…catch` pattern similar to: ```js try { diff --git a/doc/api/assert.md b/doc/api/assert.md index cc65dbcf6e379a..83ab1c9c566a3b 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -8,9 +8,6 @@ The `assert` module provides a set of assertion functions for verifying invariants. The module provides a recommended [`strict` mode][] and a more lenient legacy mode. -For more information about the used equality comparisons see -[MDN's guide on equality comparisons and sameness][mdn-equality-guide]. - ## Class: assert.AssertionError A subclass of `Error` that indicates the failure of an assertion. All errors @@ -1068,6 +1065,14 @@ assert.strictEqual('Hello foobar', 'Hello World!'); // + 'Hello foobar' // - 'Hello World!' // ^ + +const apples = 1; +const oranges = 2; +assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`); +// AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2 + +assert.strictEqual(1, '1', new TypeError('Inputs are not identical')); +// TypeError: Inputs are not identical ``` If the values are not strictly equal, an `AssertionError` is thrown with a @@ -1289,5 +1294,4 @@ second argument. This might lead to difficult-to-spot errors. [SameValue Comparison]: https://tc39.github.io/ecma262/#sec-samevalue [Strict Equality Comparison]: https://tc39.github.io/ecma262/#sec-strict-equality-comparison [enumerable "own" properties]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties -[mdn-equality-guide]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness [prototype-spec]: https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots diff --git a/doc/api/child_process.md b/doc/api/child_process.md index 3dc855f604bf76..2c829fa1576f58 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -142,11 +142,11 @@ changes: * `options` {Object} * `cwd` {string} Current working directory of the child process. **Default:** `null`. - * `env` {Object} Environment key-value pairs. **Default:** `null`. + * `env` {Object} Environment key-value pairs. **Default:** `process.env`. * `encoding` {string} **Default:** `'utf8'` * `shell` {string} Shell to execute the command with. See [Shell Requirements][] and [Default Windows Shell][]. **Default:** - `'/bin/sh'` on UNIX, `process.env.ComSpec` on Windows. + `'/bin/sh'` on Unix, `process.env.ComSpec` on Windows. * `timeout` {number} **Default:** `0` * `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or stderr. If exceeded, the child process is terminated and any output is @@ -245,7 +245,7 @@ changes: * `args` {string[]} List of string arguments. * `options` {Object} * `cwd` {string} Current working directory of the child process. - * `env` {Object} Environment key-value pairs. + * `env` {Object} Environment key-value pairs. **Default:** `process.env`. * `encoding` {string} **Default:** `'utf8'` * `timeout` {number} **Default:** `0` * `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or @@ -260,7 +260,7 @@ changes: * `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is done on Windows. Ignored on Unix. **Default:** `false`. * `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses - `'/bin/sh'` on UNIX, and `process.env.ComSpec` on Windows. A different + `'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different shell can be specified as a string. See [Shell Requirements][] and [Default Windows Shell][]. **Default:** `false` (no shell). * `callback` {Function} Called with the output when process terminates. @@ -335,7 +335,7 @@ changes: * `detached` {boolean} Prepare child to run independently of its parent process. Specific behavior depends on the platform, see [`options.detached`][]). - * `env` {Object} Environment key-value pairs. + * `env` {Object} Environment key-value pairs. **Default:** `process.env`. * `execPath` {string} Executable used to create the child process. * `execArgv` {string[]} List of string arguments passed to the executable. **Default:** `process.execArgv`. @@ -400,7 +400,7 @@ changes: * `args` {string[]} List of string arguments. * `options` {Object} * `cwd` {string} Current working directory of the child process. - * `env` {Object} Environment key-value pairs. + * `env` {Object} Environment key-value pairs. **Default:** `process.env`. * `argv0` {string} Explicitly set the value of `argv[0]` sent to the child process. This will be set to `command` if not specified. * `stdio` {Array|string} Child's stdio configuration (see @@ -411,7 +411,7 @@ changes: * `uid` {number} Sets the user identity of the process (see setuid(2)). * `gid` {number} Sets the group identity of the process (see setgid(2)). * `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses - `'/bin/sh'` on UNIX, and `process.env.ComSpec` on Windows. A different + `'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different shell can be specified as a string. See [Shell Requirements][] and [Default Windows Shell][]. **Default:** `false` (no shell). * `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is @@ -666,7 +666,7 @@ child registers an event handler for the [`'disconnect'`][] event or the [`'message'`][] event. This allows the child to exit normally without the process being held open by the open IPC channel.* -On UNIX-like operating systems, the [`child_process.spawn()`][] method +On Unix-like operating systems, the [`child_process.spawn()`][] method performs memory operations synchronously before decoupling the event loop from the child. Applications with a large memory footprint may find frequent [`child_process.spawn()`][] calls to be a bottleneck. For more information, @@ -714,7 +714,7 @@ changes: * `stdio` {string|Array} Child's stdio configuration. `stderr` by default will be output to the parent process' stderr unless `stdio` is specified. **Default:** `'pipe'`. - * `env` {Object} Environment key-value pairs. + * `env` {Object} Environment key-value pairs. **Default:** `process.env`. * `uid` {number} Sets the user identity of the process (see setuid(2)). * `gid` {number} Sets the group identity of the process (see setgid(2)). * `timeout` {number} In milliseconds the maximum amount of time the process @@ -729,7 +729,7 @@ changes: * `windowsHide` {boolean} Hide the subprocess console window that would normally be created on Windows systems. **Default:** `false`. * `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses - `'/bin/sh'` on UNIX, and `process.env.ComSpec` on Windows. A different + `'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different shell can be specified as a string. See [Shell Requirements][] and [Default Windows Shell][]. **Default:** `false` (no shell). * Returns: {Buffer|string} The stdout from the command. @@ -777,10 +777,10 @@ changes: * `stdio` {string|Array} Child's stdio configuration. `stderr` by default will be output to the parent process' stderr unless `stdio` is specified. **Default:** `'pipe'`. - * `env` {Object} Environment key-value pairs. + * `env` {Object} Environment key-value pairs. **Default:** `process.env`. * `shell` {string} Shell to execute the command with. See [Shell Requirements][] and [Default Windows Shell][]. **Default:** - `'/bin/sh'` on UNIX, `process.env.ComSpec` on Windows. + `'/bin/sh'` on Unix, `process.env.ComSpec` on Windows. * `uid` {number} Sets the user identity of the process. (See setuid(2)). * `gid` {number} Sets the group identity of the process. (See setgid(2)). * `timeout` {number} In milliseconds the maximum amount of time the process @@ -844,7 +844,7 @@ changes: * `argv0` {string} Explicitly set the value of `argv[0]` sent to the child process. This will be set to `command` if not specified. * `stdio` {string|Array} Child's stdio configuration. - * `env` {Object} Environment key-value pairs. + * `env` {Object} Environment key-value pairs. **Default:** `process.env`. * `uid` {number} Sets the user identity of the process (see setuid(2)). * `gid` {number} Sets the group identity of the process (see setgid(2)). * `timeout` {number} In milliseconds the maximum amount of time the process @@ -858,7 +858,7 @@ changes: * `encoding` {string} The encoding used for all stdio inputs and outputs. **Default:** `'buffer'`. * `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses - `'/bin/sh'` on UNIX, and `process.env.ComSpec` on Windows. A different + `'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different shell can be specified as a string. See [Shell Requirements][] and [Default Windows Shell][]. **Default:** `false` (no shell). * `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is @@ -1255,7 +1255,7 @@ can be handled by the parent and some by the child. While the example above uses a server created using the `net` module, `dgram` module servers use exactly the same workflow with the exceptions of listening on a `'message'` event instead of `'connection'` and using `server.bind()` instead -of `server.listen()`. This is, however, currently only supported on UNIX +of `server.listen()`. This is, however, currently only supported on Unix platforms. #### Example: sending a socket object @@ -1398,6 +1398,16 @@ then this will be `null`. `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will refer to the same value. +```js +const { spawn } = require('child_process'); + +const subprocess = spawn('ls'); + +subprocess.stdout.on('data', (data) => { + console.log(`Received chunk ${data}`); +}); +``` + ### subprocess.unref() + +Enable experimental resolution using the `exports` field in `package.json`. + ### `--experimental-modules` +Enables a signal handler that causes the Node.js process to write a heap dump +when the specified signal is received. + +```console +$ node --heapsnapshot-signal=SIGUSR2 index.js & +$ ps aux +USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND +node 1 5.5 6.1 787252 247004 ? Ssl 16:43 0:02 node --heapsnapshot-signal=SIGUSR2 index.js +$ kill -USR2 1 +$ ls +Heap.20190718.133405.15554.0.001.heapsnapshot +``` + ### `--heap-prof` + +> Stability: 1 - Experimental + +Instructs Node.js to error prior to running any code if the policy does not have +the specified integrity. It expects a [Subresource Integrity][] string as a +parameter. + ### `--preserve-symlinks` - `--enable-fips` - `--es-module-specifier-resolution` +- `--experimental-exports` - `--experimental-modules` - `--experimental-policy` - `--experimental-repl-await` @@ -971,6 +1003,7 @@ Node.js options that are allowed are: - `--no-warnings` - `--openssl-config` - `--pending-deprecation` +- `--policy-integrity` - `--preserve-symlinks-main` - `--preserve-symlinks` - `--prof-process` @@ -1175,6 +1208,7 @@ greater than `4` (its current default value). For more information, see the [Chrome DevTools Protocol]: https://chromedevtools.github.io/devtools-protocol/ [REPL]: repl.html [ScriptCoverage]: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage +[Subresource Integrity]: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity [V8 JavaScript code coverage]: https://v8project.blogspot.com/2017/12/javascript-code-coverage.html [customizing esm specifier resolution]: esm.html#esm_customizing_esm_specifier_resolution_algorithm [debugger]: debugger.html diff --git a/doc/api/cluster.md b/doc/api/cluster.md index 83a541d6554b13..8036f82e797617 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -589,7 +589,7 @@ The `addressType` is one of: * `4` (TCPv4) * `6` (TCPv6) -* `-1` (unix domain socket) +* `-1` (Unix domain socket) * `'udp4'` or `'udp6'` (UDP v4 or v6) ## Event: 'message' diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 93098a6f3edc2b..96d99cbbe76dec 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -698,6 +698,32 @@ module): * `DH_UNABLE_TO_CHECK_GENERATOR` * `DH_NOT_SUITABLE_GENERATOR` +## Class: DiffieHellmanGroup + + +The `DiffieHellmanGroup` class takes a well-known modp group as its argument but +otherwise works the same as `DiffieHellman`. + +```js +const name = 'modp1'; +const dh = crypto.createDiffieHellmanGroup(name); +``` + +`name` is taken from [RFC 2412][] (modp1 and 2) and [RFC 3526][]: +```console +$ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h +modp1 # 768 bits +modp2 # 1024 bits +modp5 # 1536 bits +modp14 # 2048 bits +modp15 # etc. +modp16 +modp17 +modp18 +``` + ## Class: ECDH + +* `name` {string} +* Returns: {DiffieHellman} + +An alias for [`crypto.getDiffieHellman()`][] + ### crypto.createECDH(curveName) +```js +// ./node_modules/es-module-package/package.json +{ + "exports": { + "./submodule": "./src/submodule.js" + } +} +``` + +```js +import submodule from 'es-module-package/submodule'; +// Loads ./node_modules/es-module-package/src/submodule.js +``` + +In addition to defining an alias, subpaths not defined by `"exports"` will +throw when an attempt is made to import them: + +```js +import submodule from 'es-module-package/private-module.js'; +// Throws - Package exports error +``` + +> Note: this is not a strong encapsulation as any private modules can still be +> loaded by absolute paths. + +Folders can also be mapped with package exports as well: + + +```js +// ./node_modules/es-module-package/package.json +{ + "exports": { + "./features/": "./src/features/" + } +} +``` + +```js +import feature from 'es-module-package/features/x.js'; +// Loads ./node_modules/es-module-package/src/features/x.js +``` + +If a package has no exports, setting `"exports": false` can be used instead of +`"exports": {}` to indicate the package does not intend for submodules to be +exposed. +This is just a convention that works because `false`, just like `{}`, has no +iterable own properties. + ## import Specifiers ### Terminology @@ -278,7 +333,16 @@ These CommonJS variables are not available in ES modules. `require` can be imported into an ES module using [`module.createRequire()`][]. -An equivalent for `__filename` and `__dirname` is [`import.meta.url`][]. +Equivalents of `__filename` and `__dirname` can be created inside of each file +via [`import.meta.url`][]. + +```js +import { fileURLToPath } from 'url'; +import { dirname } from 'path'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); +``` ### No require.extensions diff --git a/doc/api/fs.md b/doc/api/fs.md index 50ab633b74d490..d74570af037542 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -32,7 +32,7 @@ fs.unlink('/tmp/hello', (err) => { ``` Exceptions that occur using synchronous operations are thrown immediately and -may be handled using `try`/`catch`, or may be allowed to bubble up. +may be handled using `try…catch`, or may be allowed to bubble up. ```js const fs = require('fs'); @@ -785,7 +785,7 @@ The times in the stat object have the following semantics: * `birthtime` "Birth Time" - Time of file creation. Set once when the file is created. On filesystems where birthtime is not available, this field may instead hold either the `ctime` or - `1970-01-01T00:00Z` (ie, unix epoch timestamp `0`). This value may be greater + `1970-01-01T00:00Z` (ie, Unix epoch timestamp `0`). This value may be greater than `atime` or `mtime` in this case. On Darwin and other FreeBSD variants, also set if the `atime` is explicitly set to an earlier value than the current `birthtime` using the utimes(2) system call. @@ -1181,6 +1181,13 @@ possible exception are given to the completion callback. See also: chmod(2). +```js +fs.chmod('my_file.txt', 0o775, (err) => { + if (err) throw err; + console.log('The permissions for file "my_file.txt" have been changed!'); +}); +``` + ### File modes The `mode` argument used in both the `fs.chmod()` and `fs.chmodSync()` @@ -3020,6 +3027,76 @@ error raised if the file is not available. To check if a file exists without manipulating it afterwards, [`fs.access()`] is recommended. +For example, given the following folder structure: + +```fundamental +- txtDir +-- file.txt +- app.js +``` + +The next program will check for the stats of the given paths: + +```js +const fs = require('fs'); + +const pathsToCheck = ['./txtDir', './txtDir/file.txt']; + +for (let i = 0; i < pathsToCheck.length; i++) { + fs.stat(pathsToCheck[i], function(err, stats) { + console.log(stats.isDirectory()); + console.log(stats); + }); +} +``` + +The resulting output will resemble: + +```console +true +Stats { + dev: 16777220, + mode: 16877, + nlink: 3, + uid: 501, + gid: 20, + rdev: 0, + blksize: 4096, + ino: 14214262, + size: 96, + blocks: 0, + atimeMs: 1561174653071.963, + mtimeMs: 1561174614583.3518, + ctimeMs: 1561174626623.5366, + birthtimeMs: 1561174126937.2893, + atime: 2019-06-22T03:37:33.072Z, + mtime: 2019-06-22T03:36:54.583Z, + ctime: 2019-06-22T03:37:06.624Z, + birthtime: 2019-06-22T03:28:46.937Z +} +false +Stats { + dev: 16777220, + mode: 33188, + nlink: 1, + uid: 501, + gid: 20, + rdev: 0, + blksize: 4096, + ino: 14214074, + size: 8, + blocks: 8, + atimeMs: 1561174616618.8555, + mtimeMs: 1561174614584, + ctimeMs: 1561174614583.8145, + birthtimeMs: 1561174007710.7478, + atime: 2019-06-22T03:36:56.619Z, + mtime: 2019-06-22T03:36:54.584Z, + ctime: 2019-06-22T03:36:54.584Z, + birthtime: 2019-06-22T03:26:47.711Z +} +``` + ## fs.statSync(path[, options]) * `info` {Object} + * `httpVersion` {string} + * `httpVersionMajor` {integer} + * `httpVersionMinor` {integer} * `statusCode` {integer} + * `statusMessage` {string} + * `headers` {Object} + * `rawHeaders` {string[]} -Emitted when the server sends a 1xx response (excluding 101 Upgrade). The -listeners of this event will receive an object containing the status code. +Emitted when the server sends a 1xx intermediate response (excluding 101 +Upgrade). The listeners of this event will receive an object containing the +HTTP version, status code, status message, key-value headers object, +and array with the raw header names followed by their respective values. ```js const http = require('http'); @@ -1456,6 +1464,15 @@ Returns `true` if the entire data was flushed successfully to the kernel buffer. Returns `false` if all or part of the data was queued in user memory. `'drain'` will be emitted when the buffer is free again. +### response.writableFinished + + +* {boolean} + +Is `true` if all data has been flushed to the underlying system. + ### response.writeContinue() * `callback` {Function} -Stops the server from accepting new connections. See [`net.Server.close()`][]. +Stops the server from establishing new sessions. This does not prevent new +request streams from being created due to the persistent nature of HTTP/2 +sessions. To gracefully shut down the server, call [`http2session.close()`] on +all active sessions. -This is not analogous to restricting new requests since HTTP/2 -connections are persistent. To achieve a similar graceful shutdown behavior, -consider also using [`http2session.close()`] on active sessions. +If `callback` is provided, it is not invoked until all active sessions have been +closed, although the server has already stopped allowing new sessions. See +[`net.Server.close()`][] for more details. #### server.setTimeout([msecs][, callback]) * `callback` {Function} -Stops the server from accepting new connections. See [`tls.Server.close()`][]. +Stops the server from establishing new sessions. This does not prevent new +request streams from being created due to the persistent nature of HTTP/2 +sessions. To gracefully shut down the server, call [`http2session.close()`] on +all active sessions. -This is not analogous to restricting new requests since HTTP/2 -connections are persistent. To achieve a similar graceful shutdown behavior, -consider also using [`http2session.close()`] on active sessions. +If `callback` is provided, it is not invoked until all active sessions have been +closed, although the server has already stopped allowing new sessions. See +[`tls.Server.close()`][] for more details. #### server.setTimeout([msecs][, callback]) + +Blocks until a client (existing or connected later) has sent +`Runtime.runIfWaitingForDebugger` command. + +An exception will be thrown if there is no active inspector. + ## Class: inspector.Session The `inspector.Session` is used for dispatching messages to the V8 inspector diff --git a/doc/api/n-api.md b/doc/api/n-api.md index 74019852ff292b..0a897819707325 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -192,20 +192,48 @@ napi_value create_addon(napi_env env); ```C // addon.c #include "addon.h" + +#define NAPI_CALL(env, call) \ + do { \ + napi_status status = (call); \ + if (status != napi_ok) { \ + const napi_extended_error_info* error_info = NULL; \ + napi_get_last_error_info((env), &error_info); \ + bool is_pending; \ + napi_is_exception_pending((env), &is_pending); \ + if (!is_pending) { \ + const char* message = (error_info->error_message == NULL) \ + ? "empty error message" \ + : error_info->error_message; \ + napi_throw_error((env), NULL, message); \ + return NULL; \ + } \ + } \ + } while(0) + +static napi_value +DoSomethingUseful(napi_env env, napi_callback_info info) { + // Do something useful. + return NULL; +} + napi_value create_addon(napi_env env) { napi_value result; - assert(napi_create_object(env, &result) == napi_ok); + NAPI_CALL(env, napi_create_object(env, &result)); + napi_value exported_function; - assert(napi_create_function(env, - "doSomethingUseful", - NAPI_AUTO_LENGTH, - DoSomethingUseful, - NULL, - &exported_function) == napi_ok); - assert(napi_set_named_property(env, - result, - "doSomethingUseful", - exported_function) == napi_ok); + NAPI_CALL(env, napi_create_function(env, + "doSomethingUseful", + NAPI_AUTO_LENGTH, + DoSomethingUseful, + NULL, + &exported_function)); + + NAPI_CALL(env, napi_set_named_property(env, + result, + "doSomethingUseful", + exported_function)); + return result; } ``` @@ -213,12 +241,14 @@ napi_value create_addon(napi_env env) { ```C // addon_node.c #include +#include "addon.h" -static napi_value Init(napi_env env, napi_value exports) { +NAPI_MODULE_INIT() { + // This function body is expected to return a `napi_value`. + // The variables `napi_env env` and `napi_value exports` may be used within + // the body, as they are provided by the definition of `NAPI_MODULE_INIT()`. return create_addon(env); } - -NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) ``` ## Basic N-API Data Types @@ -433,6 +463,8 @@ Implementations of this type of function should avoid making any N-API calls that could result in the execution of JavaScript or interaction with JavaScript objects. Most often, any code that needs to make N-API calls should be made in `napi_async_complete_callback` instead. +Avoid using the `napi_env` parameter in the execute callback as +it will likely execute JavaScript. #### napi_async_complete_callback ## Asynchronous Thread-safe Function Calls -> Stability: 1 - Experimental - JavaScript functions can normally only be called from a native addon's main thread. If an addon creates additional threads, then N-API functions that require a `napi_env`, `napi_value`, or `napi_ref` must not be called from those diff --git a/doc/api/net.md b/doc/api/net.md index d65637e31568a8..396cad36ab18dd 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -17,7 +17,7 @@ const net = require('net'); ## IPC Support -The `net` module supports IPC with named pipes on Windows, and UNIX domain +The `net` module supports IPC with named pipes on Windows, and Unix domain sockets on other operating systems. ### Identifying paths for IPC connections @@ -25,18 +25,18 @@ sockets on other operating systems. [`net.connect()`][], [`net.createConnection()`][], [`server.listen()`][] and [`socket.connect()`][] take a `path` parameter to identify IPC endpoints. -On UNIX, the local domain is also known as the UNIX domain. The path is a +On Unix, the local domain is also known as the Unix domain. The path is a filesystem pathname. It gets truncated to `sizeof(sockaddr_un.sun_path) - 1`, which varies on different operating system between 91 and 107 bytes. The typical values are 107 on Linux and 103 on macOS. The path is subject to the same naming conventions and permissions checks as would be done -on file creation. If the UNIX domain socket (that is visible as a file system +on file creation. If the Unix domain socket (that is visible as a file system path) is created and used in conjunction with one of Node.js' API abstractions such as [`net.createServer()`][], it will be unlinked as part of [`server.close()`][]. On the other hand, if it is created and used outside of these abstractions, the user will need to manually remove it. The same applies when the path was created by a Node.js API but the program crashes abruptly. -In short, a UNIX domain socket once successfully created will be visible in the +In short, a Unix domain socket once successfully created will be visible in the filesystem, and will persist until unlinked. On Windows, the local domain is implemented using a named pipe. The path *must* @@ -44,7 +44,7 @@ refer to an entry in `\\?\pipe\` or `\\.\pipe\`. Any characters are permitted, but the latter may do some processing of pipe names, such as resolving `..` sequences. Despite how it might look, the pipe namespace is flat. Pipes will *not persist*. They are removed when the last reference to them is closed. -Unlike UNIX domain sockets, Windows will close and remove the pipe when the +Unlike Unix domain sockets, Windows will close and remove the pipe when the owning process exits. JavaScript string escaping requires paths to be specified with extra backslash @@ -121,7 +121,7 @@ as reported by the operating system if listening on an IP socket (useful to find which port was assigned when getting an OS-assigned address): `{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`. -For a server listening on a pipe or UNIX domain socket, the name is returned +For a server listening on a pipe or Unix domain socket, the name is returned as a string. ```js @@ -241,7 +241,7 @@ added: v0.5.10 * Returns: {net.Server} Start a server listening for connections on a given `handle` that has -already been bound to a port, a UNIX domain socket, or a Windows named pipe. +already been bound to a port, a Unix domain socket, or a Windows named pipe. The `handle` object can be either a server, a socket (anything with an underlying `_handle` member), or an object with an `fd` member that is a @@ -385,7 +385,7 @@ added: v0.3.4 --> This class is an abstraction of a TCP socket or a streaming [IPC][] endpoint -(uses named pipes on Windows, and UNIX domain sockets otherwise). A +(uses named pipes on Windows, and Unix domain sockets otherwise). A `net.Socket` is also a [duplex stream][], so it can be both readable and writable, and it is also an [`EventEmitter`][]. @@ -496,7 +496,7 @@ changes: --> Emitted after resolving the hostname but before connecting. -Not applicable to UNIX sockets. +Not applicable to Unix sockets. * `err` {Error|null} The error object. See [`dns.lookup()`][]. * `address` {string} The IP address. @@ -618,8 +618,8 @@ For TCP connections, available `options` are: * `host` {string} Host the socket should connect to. **Default:** `'localhost'`. * `localAddress` {string} Local address the socket should connect from. * `localPort` {number} Local port the socket should connect from. -* `family` {number}: Version of IP stack, can be either `4` or `6`. - **Default:** `4`. +* `family` {number}: Version of IP stack. Must be `4`, `6`, or `0`. The value + `0` indicates that both IPv4 and IPv6 addresses are allowed. **Default:** `0`. * `hints` {number} Optional [`dns.lookup()` hints][]. * `lookup` {Function} Custom lookup function. **Default:** [`dns.lookup()`][]. @@ -1112,7 +1112,7 @@ server.listen('/tmp/echo.sock', () => { }); ``` -Use `nc` to connect to a UNIX domain socket server: +Use `nc` to connect to a Unix domain socket server: ```console $ nc -U /tmp/echo.sock diff --git a/doc/api/os.md b/doc/api/os.md index 88a06346828ffc..acd37e6a6f5b29 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -164,7 +164,7 @@ The properties included on each object include: ] ``` -Because `nice` values are UNIX-specific, on Windows the `nice` values of all +Because `nice` values are Unix-specific, on Windows the `nice` values of all processors are always 0. ## os.endianness() @@ -215,6 +215,14 @@ added: v2.3.0 The `os.homedir()` method returns the home directory of the current user as a string. +**POSIX**: +Will use the `$HOME` environment variable if defined. Otherwise, it will use +the [effective UID][EUID] to look up the user's home directory. + +**Windows**: +Will use the `USERPROFILE` environment variable if defined. Otherwise it +will be the path to the profile directory of the current user. + ## os.hostname() +> Stability: 1 - Experimental + * {Object} `process.report` is an object whose methods are used to generate diagnostic @@ -1695,6 +1714,8 @@ reports for the current process. Additional documentation is available in the added: v11.12.0 --> +> Stability: 1 - Experimental + * {string} Directory where the report is written. The default value is the empty string, @@ -1710,6 +1731,8 @@ console.log(`Report directory is ${process.report.directory}`); added: v11.12.0 --> +> Stability: 1 - Experimental + * {string} Filename where the report is written. If set to the empty string, the output @@ -1725,15 +1748,22 @@ console.log(`Report filename is ${process.report.filename}`); added: v11.8.0 --> +> Stability: 1 - Experimental + * `err` {Error} A custom error used for reporting the JavaScript stack. -* Returns: {string} +* Returns: {Object} -Returns a JSON-formatted diagnostic report for the running process. The report's -JavaScript stack trace is taken from `err`, if present. +Returns a JavaScript Object representation of a diagnostic report for the +running process. The report's JavaScript stack trace is taken from `err`, if +present. ```js const data = process.report.getReport(); -console.log(data); +console.log(data.header.nodeJsVersion); + +// Similar to process.report.writeReport() +const fs = require('fs'); +fs.writeFileSync(util.inspect(data), 'my-report.log', 'utf8'); ``` Additional documentation is available in the [report documentation][]. @@ -1743,6 +1773,8 @@ Additional documentation is available in the [report documentation][]. added: v11.12.0 --> +> Stability: 1 - Experimental + * {boolean} If `true`, a diagnostic report is generated on fatal errors, such as out of @@ -1757,6 +1789,8 @@ console.log(`Report on fatal error: ${process.report.reportOnFatalError}`); added: v11.12.0 --> +> Stability: 1 - Experimental + * {boolean} If `true`, a diagnostic report is generated when the process receives the @@ -1771,6 +1805,8 @@ console.log(`Report on signal: ${process.report.reportOnSignal}`); added: v11.12.0 --> +> Stability: 1 - Experimental + * {boolean} If `true`, a diagnostic report is generated on uncaught exception. @@ -1784,6 +1820,8 @@ console.log(`Report on exception: ${process.report.reportOnUncaughtException}`); added: v11.12.0 --> +> Stability: 1 - Experimental + * {string} The signal used to trigger the creation of a diagnostic report. Defaults to @@ -1798,6 +1836,8 @@ console.log(`Report signal: ${process.report.signal}`); added: v11.8.0 --> +> Stability: 1 - Experimental + * `filename` {string} Name of the file where the report is written. This should be a relative path, that will be appended to the directory specified in `process.report.directory`, or the current working directory of the Node.js @@ -1821,60 +1861,48 @@ Additional documentation is available in the [report documentation][]. added: v12.6.0 --> -* Returns: {Object} - * `userCPUTime` {integer} - * `systemCPUTime` {integer} - * `maxRSS` {integer} - * `sharedMemorySize` {integer} - * `unsharedDataSize` {integer} - * `unsharedStackSize` {integer} - * `minorPageFault` {integer} - * `majorPageFault` {integer} - * `swappedOut` {integer} - * `fsRead` {integer} - * `fsWrite` {integer} - * `ipcSent` {integer} - * `ipcReceived` {integer} - * `signalsCount` {integer} - * `voluntaryContextSwitches` {integer} - * `involuntaryContextSwitches` {integer} - -The `process.resourceUsage()` method returns the resource usage -for the current process. -All of these values come from the `uv_getrusage` call which returns -[this struct][uv_rusage_t], here the mapping between node and libuv: -- `userCPUTime` maps to `ru_utime` computed in microseconds. -It is the values as [`process.cpuUsage().user`][process.cpuUsage] -- `systemCPUTime` maps to `ru_stime` computed in microseconds. -It is the value as [`process.cpuUsage().system`][process.cpuUsage] -- `maxRSS` maps to `ru_maxrss` which is the maximum resident set size -used (in kilobytes). -- `sharedMemorySize` maps to `ru_ixrss` but is not supported by any platform. -- `unsharedDataSize` maps to `ru_idrss` but is not supported by any platform. -- `unsharedStackSize` maps to `ru_isrss` but is not supported by any platform. -- `minorPageFault` maps to `ru_minflt` which is the number of minor page fault -for the process, see [this article for more details][wikipedia_minor_fault] -- `majorPageFault` maps to `ru_majflt` which is the number of major page fault -for the process, see [this article for more details][wikipedia_major_fault]. -This field is not supported on Windows platforms. -- `swappedOut` maps to `ru_nswap` which is not supported by any platform. -- `fsRead` maps to `ru_inblock` which is the number of times the file system -had to perform input. -- `fsWrite` maps to `ru_oublock` which is the number of times the file system -had to perform output. -- `ipcSent` maps to `ru_msgsnd` but is not supported by any platform. -- `ipcReceived` maps to `ru_msgrcv` but is not supported by any platform. -- `signalsCount` maps to `ru_nsignals` but is not supported by any platform. -- `voluntaryContextSwitches` maps to `ru_nvcsw` which is the number of times -a CPU context switch resulted due to a process voluntarily giving up the -processor before its time slice was completed -(usually to await availability of a resource). -This field is not supported on Windows platforms. -- `involuntaryContextSwitches` maps to `ru_nivcsw` which is the number of times -a CPU context switch resulted due to a higher priority process becoming runnable - or because the current process exceeded its time slice. -This field is not supported on Windows platforms. - +* Returns: {Object} the resource usage for the current process. All of these + values come from the `uv_getrusage` call which returns + a [`uv_rusage_t` struct][uv_rusage_t]. + * `userCPUTime` {integer} maps to `ru_utime` computed in microseconds. + It is the same value as [`process.cpuUsage().user`][process.cpuUsage]. + * `systemCPUTime` {integer} maps to `ru_stime` computed in microseconds. + It is the same value as [`process.cpuUsage().system`][process.cpuUsage]. + * `maxRSS` {integer} maps to `ru_maxrss` which is the maximum resident set + size used in kilobytes. + * `sharedMemorySize` {integer} maps to `ru_ixrss` but is not supported by + any platform. + * `unsharedDataSize` {integer} maps to `ru_idrss` but is not supported by + any platform. + * `unsharedStackSize` {integer} maps to `ru_isrss` but is not supported by + any platform. + * `minorPageFault` {integer} maps to `ru_minflt` which is the number of + minor page faults for the process, see + [this article for more details][wikipedia_minor_fault]. + * `majorPageFault` {integer} maps to `ru_majflt` which is the number of + major page faults for the process, see + [this article for more details][wikipedia_major_fault]. This field is not + supported on Windows. + * `swappedOut` {integer} maps to `ru_nswap` but is not supported by any + platform. + * `fsRead` {integer} maps to `ru_inblock` which is the number of times the + file system had to perform input. + * `fsWrite` {integer} maps to `ru_oublock` which is the number of times the + file system had to perform output. + * `ipcSent` {integer} maps to `ru_msgsnd` but is not supported by any + platform. + * `ipcReceived` {integer} maps to `ru_msgrcv` but is not supported by any + platform. + * `signalsCount` {integer} maps to `ru_nsignals` but is not supported by any + platform. + * `voluntaryContextSwitches` {integer} maps to `ru_nvcsw` which is the + number of times a CPU context switch resulted due to a process voluntarily + giving up the processor before its time slice was completed (usually to + await availability of a resource). This field is not supported on Windows. + * `involuntaryContextSwitches` {integer} maps to `ru_nivcsw` which is the + number of times a CPU context switch resulted due to a higher priority + process becoming runnable or because the current process exceeded its + time slice. This field is not supported on Windows. ```js console.log(process.resourceUsage()); diff --git a/doc/api/readline.md b/doc/api/readline.md index 8f372a8473e06d..47dfad8dabb173 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -346,9 +346,13 @@ async function processLineByLine() { } ``` -## readline.clearLine(stream, dir) +## readline.clearLine(stream, dir[, callback]) * `stream` {stream.Writable} @@ -356,16 +360,28 @@ added: v0.7.7 * `-1` - to the left from cursor * `1` - to the right from cursor * `0` - the entire line +* `callback` {Function} Invoked once the operation completes. +* Returns: {boolean} `false` if `stream` wishes for the calling code to wait for + the `'drain'` event to be emitted before continuing to write additional data; + otherwise `true`. The `readline.clearLine()` method clears current line of given [TTY][] stream in a specified direction identified by `dir`. -## readline.clearScreenDown(stream) +## readline.clearScreenDown(stream[, callback]) * `stream` {stream.Writable} +* `callback` {Function} Invoked once the operation completes. +* Returns: {boolean} `false` if `stream` wishes for the calling code to wait for + the `'drain'` event to be emitted before continuing to write additional data; + otherwise `true`. The `readline.clearScreenDown()` method clears the given [TTY][] stream from the current position of the cursor down. @@ -471,14 +487,22 @@ function completer(linePartial, callback) { } ``` -## readline.cursorTo(stream, x, y) +## readline.cursorTo(stream, x, y[, callback]) * `stream` {stream.Writable} * `x` {number} * `y` {number} +* `callback` {Function} Invoked once the operation completes. +* Returns: {boolean} `false` if `stream` wishes for the calling code to wait for + the `'drain'` event to be emitted before continuing to write additional data; + otherwise `true`. The `readline.cursorTo()` method moves cursor to the specified position in a given [TTY][] `stream`. @@ -509,14 +533,22 @@ if (process.stdin.isTTY) process.stdin.setRawMode(true); ``` -## readline.moveCursor(stream, dx, dy) +## readline.moveCursor(stream, dx, dy[, callback]) * `stream` {stream.Writable} * `dx` {number} * `dy` {number} +* `callback` {Function} Invoked once the operation completes. +* Returns: {boolean} `false` if `stream` wishes for the calling code to wait for + the `'drain'` event to be emitted before continuing to write additional data; + otherwise `true`. The `readline.moveCursor()` method moves the cursor *relative* to its current position in a given [TTY][] `stream`. diff --git a/doc/api/report.md b/doc/api/report.md index 268caf64160a7d..08a0f602abda3a 100644 --- a/doc/api/report.md +++ b/doc/api/report.md @@ -463,12 +463,15 @@ try { // Any other code ``` -The content of the diagnostic report can be returned as a JSON-compatible object +The content of the diagnostic report can be returned as a JavaScript Object via an API call from a JavaScript application: ```js const report = process.report.getReport(); -console.log(report); +console.log(typeof report === 'object'); // true + +// Similar to process.report.writeReport() output +console.log(JSON.stringify(report, null, 2)); ``` This function takes an optional additional argument `err` - an `Error` object @@ -476,7 +479,7 @@ that will be used as the context for the JavaScript stack printed in the report. ```js const report = process.report.getReport(new Error('custom error')); -console.log(report); +console.log(typeof report === 'object'); // true ``` The API versions are useful when inspecting the runtime state from within @@ -498,7 +501,7 @@ Node.js report completed > ``` -When a report is triggered, start and end messages are issued to stderr +When a report is written, start and end messages are issued to stderr and the filename of the report is returned to the caller. The default filename includes the date, time, PID and a sequence number. The sequence number helps in associating the report dump with the runtime state if generated multiple diff --git a/doc/api/stream.md b/doc/api/stream.md index 084117e6599960..63c34aa666eb94 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -5,8 +5,7 @@ > Stability: 2 - Stable A stream is an abstract interface for working with streaming data in Node.js. -The `stream` module provides a base API that makes it easy to build objects -that implement the stream interface. +The `stream` module provides an API for implementing the stream interface. There are many stream objects provided by Node.js. For instance, a [request to an HTTP server][http-incoming-message] and [`process.stdout`][] @@ -15,23 +14,20 @@ are both stream instances. Streams can be readable, writable, or both. All streams are instances of [`EventEmitter`][]. -The `stream` module can be accessed using: +To access the `stream` module: ```js const stream = require('stream'); ``` -While it is important to understand how streams work, the `stream` module itself -is most useful for developers that are creating new types of stream instances. -Developers who are primarily *consuming* stream objects will rarely need to use -the `stream` module directly. +The `stream` module is useful for creating new types of stream instances. It is +usually not necessary to use the `stream` module to consume streams. ## Organization of this Document -This document is divided into two primary sections with a third section for -additional notes. The first section explains the elements of the stream API that -are required to *use* streams within an application. The second section explains -the elements of the API that are required to *implement* new types of streams. +This document contains two primary sections and a third section for notes. The +first section explains how to use existing streams within an application. The +second section explains how to create new types of streams. ## Types of Streams @@ -119,20 +115,20 @@ that implements an HTTP server: const http = require('http'); const server = http.createServer((req, res) => { - // `req` is an http.IncomingMessage, which is a Readable Stream - // `res` is an http.ServerResponse, which is a Writable Stream + // `req` is an http.IncomingMessage, which is a Readable Stream. + // `res` is an http.ServerResponse, which is a Writable Stream. let body = ''; // Get the data as utf8 strings. // If an encoding is not set, Buffer objects will be received. req.setEncoding('utf8'); - // Readable streams emit 'data' events once a listener is added + // Readable streams emit 'data' events once a listener is added. req.on('data', (chunk) => { body += chunk; }); - // The 'end' event indicates that the entire body has been received + // The 'end' event indicates that the entire body has been received. req.on('end', () => { try { const data = JSON.parse(body); @@ -254,7 +250,7 @@ function writeOneMillionTimes(writer, data, encoding, callback) { do { i--; if (i === 0) { - // last time! + // Last time! writer.write(data, encoding, callback); } else { // See if we should continue, or wait. @@ -263,8 +259,8 @@ function writeOneMillionTimes(writer, data, encoding, callback) { } } while (i > 0 && ok); if (i > 0) { - // had to stop early! - // write some more once it drains + // Had to stop early! + // Write some more once it drains. writer.once('drain', write); } } @@ -414,7 +410,7 @@ Calling the [`stream.write()`][stream-write] method after calling [`stream.end()`][stream-end] will raise an error. ```js -// Write 'hello, ' and then end with 'world!' +// Write 'hello, ' and then end with 'world!'. const fs = require('fs'); const file = fs.createWriteStream('example.txt'); file.write('hello, '); @@ -484,6 +480,15 @@ added: v11.4.0 Is `true` if it is safe to call [`writable.write()`][stream-write]. +##### writable.writableFinished + + +* {boolean} + +Is `true` if after the [`'finish'`][] event has been emitted. + ##### writable.writableHighWaterMark +* {number} + This property contains the number of bytes (or objects) in the queue ready to be written. The value provides introspection data regarding the status of the `highWaterMark`. -##### writable.writableFinished - - -* {boolean} - -Is `true` if all data has been flushed to the underlying system. After -the [`'finish'`][] event has been emitted. - ##### writable.writableObjectMode +* {boolean} + Getter for the property `objectMode` of a given `Writable` stream. ##### writable.write(chunk[, encoding][, callback]) @@ -698,11 +697,11 @@ const writable = new Writable(); pass.pipe(writable); pass.unpipe(writable); -// readableFlowing is now false +// readableFlowing is now false. pass.on('data', (chunk) => { console.log(chunk.toString()); }); -pass.write('ok'); // Will not emit 'data' -pass.resume(); // Must be called to make stream emit 'data' +pass.write('ok'); // Will not emit 'data'. +pass.resume(); // Must be called to make stream emit 'data'. ``` While `readable.readableFlowing` is `false`, data may be accumulating @@ -845,7 +844,7 @@ cause some amount of data to be read into an internal buffer. ```javascript const readable = getReadableStreamSomehow(); readable.on('readable', function() { - // There is some data to read now + // There is some data to read now. let data; while (data = this.read()) { @@ -990,7 +989,7 @@ named `file.txt`: const fs = require('fs'); const readable = getReadableStreamSomehow(); const writable = fs.createWriteStream('file.txt'); -// All the data from readable goes into 'file.txt' +// All the data from readable goes into 'file.txt'. readable.pipe(writable); ``` It is possible to attach multiple `Writable` streams to a single `Readable` @@ -1065,7 +1064,7 @@ readable.on('readable', () => { The `while` loop is necessary when processing data with `readable.read()`. Only after `readable.read()` returns `null`, -[`'readable'`]() will be emitted. +[`'readable'`][] will be emitted. A `Readable` stream in object mode will always return a single item from a call to [`readable.read(size)`][stream-read], regardless of the value of the @@ -1086,6 +1085,16 @@ added: v11.4.0 Is `true` if it is safe to call [`readable.read()`][stream-read]. +##### readable.readableEncoding + + +* {null|string} + +Getter for the property `encoding` of a given `Readable` stream. The `encoding` +property can be set using the [`readable.setEncoding()`][] method. + ##### readable.readableHighWaterMark +* {boolean} + Getter for the property `objectMode` of a given `Readable` stream. ##### readable.resume() @@ -1196,7 +1207,7 @@ const fs = require('fs'); const readable = getReadableStreamSomehow(); const writable = fs.createWriteStream('file.txt'); // All the data from readable goes into 'file.txt', -// but only for the first second +// but only for the first second. readable.pipe(writable); setTimeout(() => { console.log('Stop writing to file.txt.'); @@ -1235,9 +1246,9 @@ use of a [`Transform`][] stream instead. See the [API for Stream Implementers][] section for more information. ```js -// Pull off a header delimited by \n\n -// use unshift() if we get too much -// Call the callback with (error, header, stream) +// Pull off a header delimited by \n\n. +// Use unshift() if we get too much. +// Call the callback with (error, header, stream). const { StringDecoder } = require('string_decoder'); function parseHeader(stream, callback) { stream.on('error', callback); @@ -1249,13 +1260,13 @@ function parseHeader(stream, callback) { while (null !== (chunk = stream.read())) { const str = decoder.write(chunk); if (str.match(/\n\n/)) { - // Found the header boundary + // Found the header boundary. const split = str.split(/\n\n/); header += split.shift(); const remaining = split.join('\n\n'); const buf = Buffer.from(remaining, 'utf8'); stream.removeListener('error', callback); - // Remove the 'readable' listener before unshifting + // Remove the 'readable' listener before unshifting. stream.removeListener('readable', onReadable); if (buf.length) stream.unshift(buf); @@ -1319,8 +1330,6 @@ changes: description: Symbol.asyncIterator support is no longer experimental. --> -> Stability: 2 - Stable - * Returns: {AsyncIterator} to fully consume the stream. ```js @@ -1329,13 +1338,13 @@ const fs = require('fs'); async function print(readable) { readable.setEncoding('utf8'); let data = ''; - for await (const k of readable) { - data += k; + for await (const chunk of readable) { + data += chunk; } console.log(data); } -print(fs.createReadStream('file')).catch(console.log); +print(fs.createReadStream('file')).catch(console.error); ``` If the loop terminates with a `break` or a `throw`, the stream will be @@ -1431,7 +1440,7 @@ finished(rs, (err) => { } }); -rs.resume(); // drain the stream +rs.resume(); // Drain the stream. ``` Especially useful in error handling scenarios where a stream is destroyed @@ -1451,7 +1460,7 @@ async function run() { } run().catch(console.error); -rs.resume(); // drain the stream +rs.resume(); // Drain the stream. ``` ### stream.pipeline(...streams, callback) @@ -1508,12 +1517,16 @@ run().catch(console.error); ``` ### stream.Readable.from(iterable, [options]) + * `iterable` {Iterable} Object implementing the `Symbol.asyncIterator` or `Symbol.iterator` iterable protocol. * `options` {Object} Options provided to `new stream.Readable([options])`. By default, `Readable.from()` will set `options.objectMode` to `true`, unless this is explicitly opted out by setting `options.objectMode` to `false`. +* Returns: {stream.Readable} A utility method for creating Readable Streams out of iterators. @@ -1561,10 +1574,10 @@ on the type of stream being created, as detailed in the chart below: | Use-case | Class | Method(s) to implement | | -------- | ----- | ---------------------- | -| Reading only | [`Readable`] | [_read][stream-_read] | -| Writing only | [`Writable`] | [_write][stream-_write], [_writev][stream-_writev], [_final][stream-_final] | -| Reading and writing | [`Duplex`] | [_read][stream-_read], [_write][stream-_write], [_writev][stream-_writev], [_final][stream-_final] | -| Operate on written data, then read the result | [`Transform`] | [_transform][stream-_transform], [_flush][stream-_flush], [_final][stream-_final] | +| Reading only | [`Readable`] | [_read()][stream-_read] | +| Writing only | [`Writable`] | [_write()][stream-_write], [_writev()][stream-_writev], [_final()][stream-_final] | +| Reading and writing | [`Duplex`] | [_read()][stream-_read], [_write()][stream-_write], [_writev()][stream-_writev], [_final()][stream-_final] | +| Operate on written data, then read the result | [`Transform`] | [_transform()][stream-_transform], [_flush()][stream-_flush], [_final()][stream-_final] | The implementation code for a stream should *never* call the "public" methods of a stream that are intended for use by consumers (as described in the @@ -1649,7 +1662,7 @@ const { Writable } = require('stream'); class MyWritable extends Writable { constructor(options) { - // Calls the stream.Writable() constructor + // Calls the stream.Writable() constructor. super(options); // ... } @@ -1892,6 +1905,8 @@ changes: * `objectMode` {boolean} Whether this stream should behave as a stream of objects. Meaning that [`stream.read(n)`][stream-read] returns a single value instead of a `Buffer` of size `n`. **Default:** `false`. + * `emitClose` {boolean} Whether or not the stream should emit `'close'` + after it has been destroyed. **Default:** `true`. * `read` {Function} Implementation for the [`stream._read()`][stream-_read] method. * `destroy` {Function} Implementation for the @@ -1905,7 +1920,7 @@ const { Readable } = require('stream'); class MyReadable extends Readable { constructor(options) { - // Calls the stream.Readable(options) constructor + // Calls the stream.Readable(options) constructor. super(options); // ... } @@ -2032,18 +2047,18 @@ class SourceWrapper extends Readable { // Every time there's data, push it into the internal buffer. this._source.ondata = (chunk) => { - // If push() returns false, then stop reading from source + // If push() returns false, then stop reading from source. if (!this.push(chunk)) this._source.readStop(); }; - // When the source ends, push the EOF-signaling `null` chunk + // When the source ends, push the EOF-signaling `null` chunk. this._source.onend = () => { this.push(null); }; } - // _read will be called when the stream wants to pull more data in - // the advisory size argument is ignored in this case. + // _read() will be called when the stream wants to pull more data in. + // The advisory size argument is ignored in this case. _read(size) { this._source.readStart(); } @@ -2076,7 +2091,7 @@ const myReadable = new Readable({ process.nextTick(() => this.emit('error', err)); return; } - // do some work + // Do some work. } }); ``` @@ -2214,7 +2229,7 @@ class MyDuplex extends Duplex { } _write(chunk, encoding, callback) { - // The underlying source only deals with strings + // The underlying source only deals with strings. if (Buffer.isBuffer(chunk)) chunk = chunk.toString(); this[kSource].writeSomeData(chunk); @@ -2247,12 +2262,12 @@ the `Readable` side. ```js const { Transform } = require('stream'); -// All Transform streams are also Duplex Streams +// All Transform streams are also Duplex Streams. const myTransform = new Transform({ writableObjectMode: true, transform(chunk, encoding, callback) { - // Coerce the chunk to a number if necessary + // Coerce the chunk to a number if necessary. chunk |= 0; // Transform the chunk into something else. @@ -2391,7 +2406,7 @@ user programs. [`stream.write()`][stream-write]. * `encoding` {string} If the chunk is a string, then this is the encoding type. If chunk is a buffer, then this is the special - value - 'buffer', ignore it in this case. + value - `'buffer'`, ignore it in this case. * `callback` {Function} A callback function (optionally with an error argument and data) to be called after the supplied `chunk` has been processed. @@ -2499,12 +2514,12 @@ const writeable = fs.createWriteStream('./file'); (async function() { for await (const chunk of iterator) { - // Handle backpressure on write + // Handle backpressure on write(). if (!writeable.write(chunk)) await once(writeable, 'drain'); } writeable.end(); - // Ensure completion without errors + // Ensure completion without errors. await once(writeable, 'finish'); })(); ``` @@ -2523,7 +2538,7 @@ const writeable = fs.createWriteStream('./file'); (async function() { const readable = Readable.from(iterator); readable.pipe(writeable); - // Ensure completion without errors + // Ensure completion without errors. await once(writeable, 'finish'); })(); ``` @@ -2566,7 +2581,7 @@ For example, consider the following code: // WARNING! BROKEN! net.createServer((socket) => { - // We add an 'end' listener, but never consume the data + // We add an 'end' listener, but never consume the data. socket.on('end', () => { // It will never get here. socket.end('The message was received but was not processed.\n'); @@ -2582,7 +2597,7 @@ The workaround in this situation is to call the [`stream.resume()`][stream-resume] method to begin the flow of data: ```js -// Workaround +// Workaround. net.createServer((socket) => { socket.on('end', () => { socket.end('The message was received but was not processed.\n'); @@ -2653,6 +2668,7 @@ contain multi-byte characters. [`process.stdin`]: process.html#process_process_stdin [`process.stdout`]: process.html#process_process_stdout [`readable.push('')`]: #stream_readable_push +[`readable.setEncoding()`]: #stream_readable_setencoding_encoding [`stream.Readable.from()`]: #stream_stream_readable_from_iterable_options [`stream.cork()`]: #stream_writable_cork [`stream.finished()`]: #stream_stream_finished_stream_options_callback diff --git a/doc/api/synopsis.md b/doc/api/synopsis.md index 5c4cb820e4d82b..c296ffb0fa43c7 100644 --- a/doc/api/synopsis.md +++ b/doc/api/synopsis.md @@ -1,4 +1,6 @@ -# Usage +# Usage & Example + +## Usage diff --git a/doc/api/tls.md b/doc/api/tls.md index 601eedd7c9bf92..f801479041c204 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -1011,8 +1011,7 @@ Protocol versions are: * `'TLSv1.2'` * `'TLSv1.3'` -See for more -information. +See the OpenSSL [`SSL_get_version`][] documentation for more information. ### tlsSocket.getSession() * `dir` {number} * `-1` - to the left from cursor * `1` - to the right from cursor * `0` - the entire line +* `callback` {Function} Invoked once the operation completes. +* Returns: {boolean} `false` if the stream wishes for the calling code to wait + for the `'drain'` event to be emitted before continuing to write additional + data; otherwise `true`. `writeStream.clearLine()` clears the current line of this `WriteStream` in a direction identified by `dir`. -### writeStream.clearScreenDown() +### writeStream.clearScreenDown([callback]) +* `callback` {Function} Invoked once the operation completes. +* Returns: {boolean} `false` if the stream wishes for the calling code to wait + for the `'drain'` event to be emitted before continuing to write additional + data; otherwise `true`. + `writeStream.clearScreenDown()` clears this `WriteStream` from the current cursor down. @@ -128,13 +145,21 @@ added: v0.7.7 A `number` specifying the number of columns the TTY currently has. This property is updated whenever the `'resize'` event is emitted. -### writeStream.cursorTo(x, y) +### writeStream.cursorTo(x, y[, callback]) * `x` {number} * `y` {number} +* `callback` {Function} Invoked once the operation completes. +* Returns: {boolean} `false` if the stream wishes for the calling code to wait + for the `'drain'` event to be emitted before continuing to write additional + data; otherwise `true`. `writeStream.cursorTo()` moves this `WriteStream`'s cursor to the specified position. @@ -220,13 +245,21 @@ added: v0.5.8 A `boolean` that is always `true`. -### writeStream.moveCursor(dx, dy) +### writeStream.moveCursor(dx, dy[, callback]) * `dx` {number} * `dy` {number} +* `callback` {Function} Invoked once the operation completes. +* Returns: {boolean} `false` if the stream wishes for the calling code to wait + for the `'drain'` event to be emitted before continuing to write additional + data; otherwise `true`. `writeStream.moveCursor()` moves this `WriteStream`'s cursor *relative* to its current position. diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md index 0e6444b7c664f5..fa409627ebc472 100644 --- a/doc/api/worker_threads.md +++ b/doc/api/worker_threads.md @@ -306,7 +306,7 @@ In particular, the significant differences to `JSON` are: - `value` may contain circular references. - `value` may contain instances of builtin JS types such as `RegExp`s, `BigInt`s, `Map`s, `Set`s, etc. -- `value` may contained typed arrays, both using `ArrayBuffer`s +- `value` may contain typed arrays, both using `ArrayBuffer`s and `SharedArrayBuffer`s. - `value` may contain [`WebAssembly.Module`][] instances. - `value` may not contain native (C++-backed) objects other than `MessagePort`s. diff --git a/doc/api/zlib.md b/doc/api/zlib.md index fa1f39e72e4cde..08149db103bce6 100644 --- a/doc/api/zlib.md +++ b/doc/api/zlib.md @@ -20,7 +20,14 @@ const fs = require('fs'); const inp = fs.createReadStream('input.txt'); const out = fs.createWriteStream('input.txt.gz'); -inp.pipe(gzip).pipe(out); +inp.pipe(gzip) + .on('error', () => { + // handle error + }) + .pipe(out) + .on('error', () => { + // handle error + }); ``` It is also possible to compress or decompress data in a single step: @@ -258,8 +265,7 @@ All of the constants defined in `zlib.h` are also defined on `require('zlib').constants`. In the normal course of operations, it will not be necessary to use these constants. They are documented so that their presence is not surprising. This section is taken almost directly from the -[zlib documentation][]. See for more -details. +[zlib documentation][]. Previously, the constants were available directly from `require('zlib')`, for instance `zlib.Z_NO_FLUSH`. Accessing the constants directly from the module is @@ -408,8 +414,8 @@ ignored by the decompression classes. empty dictionary by default) * `info` {boolean} (If `true`, returns an object with `buffer` and `engine`.) -See the description of `deflateInit2` and `inflateInit2` at - for more information on these. +See the [`deflateInit2` and `inflateInit2`][] documentation for more +information. ## Class: BrotliOptions \nrepl:9:24--->\nd (repl:12:3)' + - '--->\nc (repl:9:3)--->\nb (repl:6:3)--->\na (repl:3:3)\n' + expected: 'Thrown:\nError: Whoops!--->\nrepl:*:*--->\nd (repl:*:*)' + + '--->\nc (repl:*:*)--->\nb (repl:*:*)--->\na (repl:*:*)\n' }, { command: 'let x y;', @@ -63,7 +67,7 @@ const tests = [ // test anonymous IIFE { command: '(function() { throw new Error(\'Whoops!\'); })()', - expected: 'Thrown:\nError: Whoops!--->\nrepl:1:21\n' + expected: 'Thrown:\nError: Whoops!--->\nrepl:*:*\n' } ]; diff --git a/test/parallel/test-repl-pretty-stack.js b/test/parallel/test-repl-pretty-stack.js index 8beb48fd689dc7..9f307c4f430b8c 100644 --- a/test/parallel/test-repl-pretty-stack.js +++ b/test/parallel/test-repl-pretty-stack.js @@ -5,6 +5,7 @@ const fixtures = require('../common/fixtures'); const assert = require('assert'); const repl = require('repl'); +const stackRegExp = /(at .*repl:)[0-9]+:[0-9]+/g; function run({ command, expected, ...extraREPLOptions }) { let accum = ''; @@ -24,7 +25,10 @@ function run({ command, expected, ...extraREPLOptions }) { }); r.write(`${command}\n`); - assert.strictEqual(accum, expected); + assert.strictEqual( + accum.replace(stackRegExp, '$1*:*'), + expected.replace(stackRegExp, '$1*:*') + ); r.close(); } @@ -32,9 +36,9 @@ const tests = [ { // Test .load for a file that throws. command: `.load ${fixtures.path('repl-pretty-stack.js')}`, - expected: 'Thrown:\nError: Whoops!\n at repl:9:24\n' + - ' at d (repl:12:3)\n at c (repl:9:3)\n' + - ' at b (repl:6:3)\n at a (repl:3:3)\n' + expected: 'Thrown:\nError: Whoops!\n at repl:*:*\n' + + ' at d (repl:*:*)\n at c (repl:*:*)\n' + + ' at b (repl:*:*)\n at a (repl:*:*)\n' }, { command: 'let x y;', @@ -48,12 +52,12 @@ const tests = [ { command: '(() => { const err = Error(\'Whoops!\'); ' + 'err.foo = \'bar\'; throw err; })()', - expected: "Thrown:\nError: Whoops!\n at repl:1:22 {\n foo: 'bar'\n}\n", + expected: "Thrown:\nError: Whoops!\n at repl:*:* {\n foo: 'bar'\n}\n", }, { command: '(() => { const err = Error(\'Whoops!\'); ' + 'err.foo = \'bar\'; throw err; })()', - expected: 'Thrown:\nError: Whoops!\n at repl:1:22 {\n foo: ' + + expected: 'Thrown:\nError: Whoops!\n at repl:*:* {\n foo: ' + "\u001b[32m'bar'\u001b[39m\n}\n", useColors: true }, @@ -64,7 +68,7 @@ const tests = [ // Test anonymous IIFE. { command: '(function() { throw new Error(\'Whoops!\'); })()', - expected: 'Thrown:\nError: Whoops!\n at repl:1:21\n' + expected: 'Thrown:\nError: Whoops!\n at repl:*:*\n' } ]; diff --git a/test/parallel/test-repl-save-load.js b/test/parallel/test-repl-save-load.js index d36a2b74d4373a..66b0f400a91764 100644 --- a/test/parallel/test-repl-save-load.js +++ b/test/parallel/test-repl-save-load.js @@ -20,7 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -require('../common'); +const common = require('../common'); const ArrayStream = require('../common/arraystream'); const assert = require('assert'); const join = require('path').join; @@ -36,6 +36,12 @@ const works = [['inner.one'], 'inner.o']; const putIn = new ArrayStream(); const testMe = repl.start('', putIn); +// Some errors might be passed to the domain. +testMe._domain.on('error', function(reason) { + const err = new Error('Test failed'); + err.reason = reason; + throw err; +}); const testFile = [ 'var top = function() {', @@ -43,89 +49,90 @@ const testFile = [ ]; const saveFileName = join(tmpdir.path, 'test.save.js'); -// input some data +// Add some data. putIn.run(testFile); -// save it to a file +// Save it to a file. putIn.run([`.save ${saveFileName}`]); -// The file should have what I wrote +// The file should have what I wrote. assert.strictEqual(fs.readFileSync(saveFileName, 'utf8'), - `${testFile.join('\n')}\n`); + testFile.join('\n')); -{ - // save .editor mode code - const cmds = [ - 'function testSave() {', - 'return "saved";', - '}' - ]; - const putIn = new ArrayStream(); - const replServer = repl.start({ terminal: true, stream: putIn }); - - putIn.run(['.editor']); - putIn.run(cmds); - replServer.write('', { ctrl: true, name: 'd' }); - - putIn.run([`.save ${saveFileName}`]); - replServer.close(); - assert.strictEqual(fs.readFileSync(saveFileName, 'utf8'), - `${cmds.join('\n')}\n\n`); -} - -// Make sure that the REPL data is "correct" -// so when I load it back I know I'm good -testMe.complete('inner.o', function(error, data) { +// Make sure that the REPL data is "correct". +testMe.complete('inner.o', common.mustCall(function(error, data) { + assert.ifError(error); assert.deepStrictEqual(data, works); -}); +})); -// clear the REPL +// Clear the REPL. putIn.run(['.clear']); -// Load the file back in +// Load the file back in. putIn.run([`.load ${saveFileName}`]); -// Make sure that the REPL data is "correct" -testMe.complete('inner.o', function(error, data) { +// Make sure that the REPL data is "correct". +testMe.complete('inner.o', common.mustCall(function(error, data) { + assert.ifError(error); assert.deepStrictEqual(data, works); -}); +})); -// clear the REPL +// Clear the REPL. putIn.run(['.clear']); let loadFile = join(tmpdir.path, 'file.does.not.exist'); -// should not break -putIn.write = function(data) { - // Make sure I get a failed to load message and not some crazy error - assert.strictEqual(data, `Failed to load:${loadFile}\n`); - // Eat me to avoid work +// Should not break. +putIn.write = common.mustCall(function(data) { + // Make sure I get a failed to load message and not some crazy error. + assert.strictEqual(data, `Failed to load: ${loadFile}\n`); + // Eat me to avoid work. putIn.write = () => {}; -}; +}); putIn.run([`.load ${loadFile}`]); -// Throw error on loading directory +// Throw error on loading directory. loadFile = tmpdir.path; -putIn.write = function(data) { - assert.strictEqual(data, `Failed to load:${loadFile} is not a valid file\n`); +putIn.write = common.mustCall(function(data) { + assert.strictEqual(data, `Failed to load: ${loadFile} is not a valid file\n`); putIn.write = () => {}; -}; +}); putIn.run([`.load ${loadFile}`]); -// clear the REPL +// Clear the REPL. putIn.run(['.clear']); // NUL (\0) is disallowed in filenames in UNIX-like operating systems and -// Windows so we can use that to test failed saves +// Windows so we can use that to test failed saves. const invalidFileName = join(tmpdir.path, '\0\0\0\0\0'); -// should not break -putIn.write = function(data) { - // Make sure I get a failed to save message and not some other error - assert.strictEqual(data, `Failed to save:${invalidFileName}\n`); - // reset to no-op +// Should not break. +putIn.write = common.mustCall(function(data) { + // Make sure I get a failed to save message and not some other error. + assert.strictEqual(data, `Failed to save: ${invalidFileName}\n`); + // Reset to no-op. putIn.write = () => {}; -}; +}); -// save it to a file +// Save it to a file. putIn.run([`.save ${invalidFileName}`]); + +{ + // Save .editor mode code. + const cmds = [ + 'function testSave() {', + 'return "saved";', + '}' + ]; + const putIn = new ArrayStream(); + const replServer = repl.start({ terminal: true, stream: putIn }); + + putIn.run(['.editor']); + putIn.run(cmds); + replServer.write('', { ctrl: true, name: 'd' }); + + putIn.run([`.save ${saveFileName}`]); + replServer.close(); + assert.strictEqual(fs.readFileSync(saveFileName, 'utf8'), + `${cmds.join('\n')}\n`); +} diff --git a/test/parallel/test-repl-top-level-await.js b/test/parallel/test-repl-top-level-await.js index 73023df038b2c9..f72a5daa01581f 100644 --- a/test/parallel/test-repl-top-level-await.js +++ b/test/parallel/test-repl-top-level-await.js @@ -3,7 +3,7 @@ require('../common'); const ArrayStream = require('../common/arraystream'); const assert = require('assert'); -const { stripVTControlCharacters } = require('internal/readline'); +const { stripVTControlCharacters } = require('internal/readline/utils'); const repl = require('repl'); // Flags: --expose-internals --experimental-repl-await diff --git a/test/parallel/test-resource-usage.js b/test/parallel/test-resource-usage.js index 25302b8413fda4..ff41452f4a7f3b 100644 --- a/test/parallel/test-resource-usage.js +++ b/test/parallel/test-resource-usage.js @@ -3,8 +3,7 @@ require('../common'); const assert = require('assert'); const rusage = process.resourceUsage(); - -[ +const fields = [ 'userCPUTime', 'systemCPUTime', 'maxRSS', @@ -21,7 +20,11 @@ const rusage = process.resourceUsage(); 'signalsCount', 'voluntaryContextSwitches', 'involuntaryContextSwitches' -].forEach((n) => { +]; + +assert.deepStrictEqual(Object.keys(rusage).sort(), fields.sort()); + +fields.forEach((n) => { assert.strictEqual(typeof rusage[n], 'number', `${n} should be a number`); assert(rusage[n] >= 0, `${n} should be above or equal 0`); }); diff --git a/test/parallel/test-stream-readable-async-iterators.js b/test/parallel/test-stream-readable-async-iterators.js index b50a6b1734b32b..12971cb2363a80 100644 --- a/test/parallel/test-stream-readable-async-iterators.js +++ b/test/parallel/test-stream-readable-async-iterators.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../common'); -const { Readable, PassThrough, pipeline } = require('stream'); +const { Readable, Transform, PassThrough, pipeline } = require('stream'); const assert = require('assert'); async function tests() { @@ -396,6 +396,30 @@ async function tests() { } } + { + console.log('readable side of a transform stream pushes null'); + const transform = new Transform({ + objectMode: true, + transform: (chunk, enc, cb) => { cb(null, chunk); } + }); + transform.push(0); + transform.push(1); + process.nextTick(() => { + transform.push(null); + }); + + const mustReach = [ common.mustCall(), common.mustCall() ]; + + const iter = transform[Symbol.asyncIterator](); + assert.strictEqual((await iter.next()).value, 0); + + for await (const d of iter) { + assert.strictEqual(d, 1); + mustReach[0](); + } + mustReach[1](); + } + { console.log('all next promises must be resolved on end'); const r = new Readable({ diff --git a/test/parallel/test-stream-writable-constructor-set-methods.js b/test/parallel/test-stream-writable-constructor-set-methods.js index 13a8dc286021f2..41779d7e519db4 100644 --- a/test/parallel/test-stream-writable-constructor-set-methods.js +++ b/test/parallel/test-stream-writable-constructor-set-methods.js @@ -12,7 +12,9 @@ w.on('error', common.expectsError({ message: 'The _write() method is not implemented' })); -w.end(Buffer.from('blerg')); +const bufferBlerg = Buffer.from('blerg'); + +w.end(bufferBlerg); const _write = common.mustCall((chunk, _, next) => { next(); @@ -28,10 +30,10 @@ const w2 = new Writable({ write: _write, writev: _writev }); strictEqual(w2._write, _write); strictEqual(w2._writev, _writev); -w2.write(Buffer.from('blerg')); +w2.write(bufferBlerg); w2.cork(); -w2.write(Buffer.from('blerg')); -w2.write(Buffer.from('blerg')); +w2.write(bufferBlerg); +w2.write(bufferBlerg); w2.end(); diff --git a/test/parallel/test-stream2-basic.js b/test/parallel/test-stream2-basic.js index fa1443fd2ac3a6..501f81e7e36526 100644 --- a/test/parallel/test-stream2-basic.js +++ b/test/parallel/test-stream2-basic.js @@ -422,14 +422,26 @@ class TestWriter extends EE { assert.strictEqual(r, r2); } +{ + // Verify readableEncoding property + assert(R.prototype.hasOwnProperty('readableEncoding')); + + const r = new R({ encoding: 'utf8' }); + assert.strictEqual(r.readableEncoding, 'utf8'); +} + { // Verify readableObjectMode property + assert(R.prototype.hasOwnProperty('readableObjectMode')); + const r = new R({ objectMode: true }); assert.strictEqual(r.readableObjectMode, true); } { // Verify writableObjectMode property + assert(W.prototype.hasOwnProperty('writableObjectMode')); + const w = new W({ objectMode: true }); assert.strictEqual(w.writableObjectMode, true); } diff --git a/test/parallel/test-tty-backwards-api.js b/test/parallel/test-tty-backwards-api.js index 7b6dc3c09257bf..b4005bad61a3b1 100644 --- a/test/parallel/test-tty-backwards-api.js +++ b/test/parallel/test-tty-backwards-api.js @@ -1,6 +1,8 @@ // Flags: --expose-internals 'use strict'; const common = require('../common'); +const assert = require('assert'); +const readline = require('readline'); const noop = () => {}; const { internalBinding } = require('internal/test/binding'); @@ -13,15 +15,32 @@ TTY.prototype = { const { WriteStream } = require('tty'); -const methods = [ +[ 'cursorTo', 'moveCursor', 'clearLine', 'clearScreenDown' -]; +].forEach((method) => { + readline[method] = common.mustCall(function() { + const lastArg = arguments[arguments.length - 1]; -methods.forEach((method) => { - require('readline')[method] = common.mustCall(); - const writeStream = new WriteStream(1); - writeStream[method](1, 2); + if (typeof lastArg === 'function') { + process.nextTick(lastArg); + } + + return true; + }, 2); }); + +const writeStream = new WriteStream(1); + +// Verify that the corresponding readline methods are called, that the return +// values are propagated, and any callbacks are invoked. +assert.strictEqual(writeStream.cursorTo(1, 2), true); +assert.strictEqual(writeStream.cursorTo(1, 2, common.mustCall()), true); +assert.strictEqual(writeStream.moveCursor(1, 2), true); +assert.strictEqual(writeStream.moveCursor(1, 2, common.mustCall()), true); +assert.strictEqual(writeStream.clearLine(1), true); +assert.strictEqual(writeStream.clearLine(1, common.mustCall()), true); +assert.strictEqual(writeStream.clearScreenDown(), true); +assert.strictEqual(writeStream.clearScreenDown(common.mustCall()), true); diff --git a/test/parallel/test-unhandled-exception-rethrow-error.js b/test/parallel/test-unhandled-exception-rethrow-error.js new file mode 100644 index 00000000000000..a4d326d9839d71 --- /dev/null +++ b/test/parallel/test-unhandled-exception-rethrow-error.js @@ -0,0 +1,28 @@ +'use strict'; +require('../common'); + +if (process.argv[2] === 'child') { + process.on('uncaughtException', (err) => { + err.rethrow = true; + throw err; + }); + + function throwException() { + throw new Error('boom'); + } + + throwException(); +} else { + const assert = require('assert'); + const { spawnSync } = require('child_process'); + const result = spawnSync(process.execPath, [__filename, 'child']); + + assert.strictEqual(result.status, 7); + assert.strictEqual(result.signal, null); + assert.strictEqual(result.stdout.toString().trim(), ''); + // Verify that the error was thrown and that the stack was preserved. + const stderr = result.stderr.toString(); + assert(/Error: boom/.test(stderr)); + assert(/at throwException/.test(stderr)); + assert(/rethrow: true/.test(stderr)); +} diff --git a/test/parallel/test-worker-message-port-multiple-sharedarraybuffers.js b/test/parallel/test-worker-message-port-multiple-sharedarraybuffers.js new file mode 100644 index 00000000000000..eb68236e4d6788 --- /dev/null +++ b/test/parallel/test-worker-message-port-multiple-sharedarraybuffers.js @@ -0,0 +1,17 @@ +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const { MessageChannel } = require('worker_threads'); + +// Regression test for https://github.com/nodejs/node/issues/28559 + +const obj = [ + [ new SharedArrayBuffer(0), new SharedArrayBuffer(1) ], + [ new SharedArrayBuffer(2), new SharedArrayBuffer(3) ] +]; + +const { port1, port2 } = new MessageChannel(); +port1.once('message', common.mustCall((message) => { + assert.deepStrictEqual(message, obj); +})); +port2.postMessage(obj); diff --git a/test/parallel/test-worker-nexttick-terminate.js b/test/parallel/test-worker-nexttick-terminate.js index 9a22605bb54491..0e5d7e096c57ec 100644 --- a/test/parallel/test-worker-nexttick-terminate.js +++ b/test/parallel/test-worker-nexttick-terminate.js @@ -16,7 +16,7 @@ process.nextTick(() => { common.expectWarning( 'DeprecationWarning', 'Passing a callback to worker.terminate() is deprecated. ' + - 'It returns a Promise instead.', 'DEP0XXX'); + 'It returns a Promise instead.', 'DEP0132'); w.on('message', common.mustCall(() => { setTimeout(() => { diff --git a/test/parallel/test-zlib-flush-multiple-scheduled.js b/test/parallel/test-zlib-flush-multiple-scheduled.js deleted file mode 100644 index 0b752557e441bc..00000000000000 --- a/test/parallel/test-zlib-flush-multiple-scheduled.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -const common = require('../common'); -const assert = require('assert'); -const zlib = require('zlib'); - -const { - Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, Z_FULL_FLUSH, Z_FINISH -} = zlib.constants; - -async function getOutput(...sequenceOfFlushes) { - const zipper = zlib.createGzip({ highWaterMark: 16384 }); - - zipper.write('A'.repeat(17000)); - for (const flush of sequenceOfFlushes) { - zipper.flush(flush); - } - - const data = []; - - return new Promise((resolve) => { - zipper.on('data', common.mustCall((d) => { - data.push(d); - if (data.length === 2) resolve(Buffer.concat(data)); - }, 2)); - }); -} - -(async function() { - assert.deepStrictEqual(await getOutput(Z_SYNC_FLUSH), - await getOutput(Z_SYNC_FLUSH, Z_PARTIAL_FLUSH)); - assert.deepStrictEqual(await getOutput(Z_SYNC_FLUSH), - await getOutput(Z_PARTIAL_FLUSH, Z_SYNC_FLUSH)); - - assert.deepStrictEqual(await getOutput(Z_FINISH), - await getOutput(Z_FULL_FLUSH, Z_FINISH)); - assert.deepStrictEqual(await getOutput(Z_FINISH), - await getOutput(Z_SYNC_FLUSH, Z_FINISH)); -})(); diff --git a/test/parallel/test-zlib-flush-write-sync-interleaved.js b/test/parallel/test-zlib-flush-write-sync-interleaved.js new file mode 100644 index 00000000000000..9fed592a34bb1b --- /dev/null +++ b/test/parallel/test-zlib-flush-write-sync-interleaved.js @@ -0,0 +1,57 @@ +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const { createGzip, createGunzip, Z_PARTIAL_FLUSH } = require('zlib'); + +// Verify that .flush() behaves like .write() in terms of ordering, e.g. in +// a sequence like .write() + .flush() + .write() + .flush() each .flush() call +// only affects the data written before it. +// Refs: https://github.com/nodejs/node/issues/28478 + +const compress = createGzip(); +const decompress = createGunzip(); +decompress.setEncoding('utf8'); + +const events = []; +const compressedChunks = []; + +for (const chunk of ['abc', 'def', 'ghi']) { + compress.write(chunk, common.mustCall(() => events.push({ written: chunk }))); + compress.flush(Z_PARTIAL_FLUSH, common.mustCall(() => { + events.push('flushed'); + const chunk = compress.read(); + if (chunk !== null) + compressedChunks.push(chunk); + })); +} + +compress.end(common.mustCall(() => { + events.push('compress end'); + writeToDecompress(); +})); + +function writeToDecompress() { + // Write the compressed chunks to a decompressor, one by one, in order to + // verify that the flushes actually worked. + const chunk = compressedChunks.shift(); + if (chunk === undefined) return decompress.end(); + decompress.write(chunk, common.mustCall(() => { + events.push({ read: decompress.read() }); + writeToDecompress(); + })); +} + +process.on('exit', () => { + assert.deepStrictEqual(events, [ + { written: 'abc' }, + 'flushed', + { written: 'def' }, + 'flushed', + { written: 'ghi' }, + 'flushed', + 'compress end', + { read: 'abc' }, + { read: 'def' }, + { read: 'ghi' } + ]); +}); diff --git a/test/parallel/test-zlib-write-after-flush.js b/test/parallel/test-zlib-write-after-flush.js index 2fcae2a2139768..6edcae2e2f18bf 100644 --- a/test/parallel/test-zlib-write-after-flush.js +++ b/test/parallel/test-zlib-write-after-flush.js @@ -39,7 +39,6 @@ for (const [ createCompress, createDecompress ] of [ gunz.on('data', (c) => output += c); gunz.on('end', common.mustCall(() => { assert.strictEqual(output, input); - assert.strictEqual(gzip._nextFlush, -1); })); // Make sure that flush/write doesn't trigger an assert failure diff --git a/test/pseudo-tty/pseudo-tty.status b/test/pseudo-tty/pseudo-tty.status index 9917c08181df8a..0a302b2d56d107 100644 --- a/test/pseudo-tty/pseudo-tty.status +++ b/test/pseudo-tty/pseudo-tty.status @@ -1,11 +1,5 @@ prefix pseudo-tty -[$system==aix] -# https://github.com/nodejs/build/issues/1820#issuecomment-505998851 -# https://github.com/nodejs/node/pull/28469 -console-dumb-tty: SKIP -test-fatal-error: SKIP - [$system==solaris] # https://github.com/nodejs/node/pull/16225 - `ioctl(fd, TIOCGWINSZ)` seems # to fail with EINVAL on SmartOS when `fd` is a pty from python's pty module. diff --git a/test/pseudo-tty/pty_helper.py b/test/pseudo-tty/pty_helper.py new file mode 100644 index 00000000000000..bf62e3f205e66a --- /dev/null +++ b/test/pseudo-tty/pty_helper.py @@ -0,0 +1,98 @@ +import errno +import os +import pty +import select +import signal +import sys +import termios + +STDIN = 0 +STDOUT = 1 +STDERR = 2 + + +def pipe(sfd, dfd): + try: + data = os.read(sfd, 256) + except OSError as e: + if e.errno != errno.EIO: + raise + return True # EOF + + if not data: + return True # EOF + + if dfd == STDOUT: + # Work around platform quirks. Some platforms echo ^D as \x04 + # (AIX, BSDs) and some don't (Linux). + filt = lambda c: ord(c) > 31 or c in '\t\n\r\f' + data = filter(filt, data) + + while data: + try: + n = os.write(dfd, data) + except OSError as e: + if e.errno != errno.EIO: + raise + return True # EOF + data = data[n:] + + +if __name__ == '__main__': + argv = sys.argv[1:] + + # Make select() interruptable by SIGCHLD. + signal.signal(signal.SIGCHLD, lambda nr, _: None) + + parent_fd, child_fd = pty.openpty() + assert parent_fd > STDIN + + mode = termios.tcgetattr(child_fd) + # Don't translate \n to \r\n. + mode[1] = mode[1] & ~termios.ONLCR # oflag + # Disable ECHOCTL. It's a BSD-ism that echoes e.g. \x04 as ^D but it + # doesn't work on platforms like AIX and Linux. I checked Linux's tty + # driver and it's a no-op, the driver is just oblivious to the flag. + mode[3] = mode[3] & ~termios.ECHOCTL # lflag + termios.tcsetattr(child_fd, termios.TCSANOW, mode) + + pid = os.fork() + if not pid: + os.setsid() + os.close(parent_fd) + + # Ensure the pty is a controlling tty. + name = os.ttyname(child_fd) + fd = os.open(name, os.O_RDWR) + os.dup2(fd, child_fd) + os.close(fd) + + os.dup2(child_fd, STDIN) + os.dup2(child_fd, STDOUT) + os.dup2(child_fd, STDERR) + + if child_fd > STDERR: + os.close(child_fd) + + os.execve(argv[0], argv, os.environ) + raise Exception('unreachable') + + os.close(child_fd) + + fds = [STDIN, parent_fd] + while fds: + try: + rfds, _, _ = select.select(fds, [], []) + except select.error as e: + if e[0] != errno.EINTR: + raise + if pid == os.waitpid(pid, os.WNOHANG)[0]: + break + + if STDIN in rfds: + if pipe(STDIN, parent_fd): + fds.remove(STDIN) + + if parent_fd in rfds: + if pipe(parent_fd, STDOUT): + break diff --git a/test/pseudo-tty/test-stdout-read.in b/test/pseudo-tty/test-stdout-read.in index 10ddd6d257e013..d7bda826cf5db5 100644 --- a/test/pseudo-tty/test-stdout-read.in +++ b/test/pseudo-tty/test-stdout-read.in @@ -1 +1,2 @@ Hello! + \ No newline at end of file diff --git a/test/pseudo-tty/test-stdout-read.out b/test/pseudo-tty/test-stdout-read.out index 3b7fda223d0e6c..e92928d17b1265 100644 --- a/test/pseudo-tty/test-stdout-read.out +++ b/test/pseudo-tty/test-stdout-read.out @@ -1 +1,2 @@ +Hello! diff --git a/test/pseudo-tty/testcfg.py b/test/pseudo-tty/testcfg.py index 96f596d8862b47..8f09bef2e95599 100644 --- a/test/pseudo-tty/testcfg.py +++ b/test/pseudo-tty/testcfg.py @@ -29,12 +29,14 @@ import test import os -from os.path import join, exists, basename, isdir +from os.path import join, exists, basename, dirname, isdir import re +import sys import utils from functools import reduce FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)") +PTY_HELPER = join(dirname(__file__), 'pty_helper.py') class TTYTestCase(test.TestCase): @@ -108,16 +110,18 @@ def GetSource(self): + open(self.expected).read()) def RunCommand(self, command, env): - input_arg = None + fd = None if self.input is not None and exists(self.input): - input_arg = open(self.input).read() + fd = os.open(self.input, os.O_RDONLY) full_command = self.context.processor(command) + full_command = [sys.executable, PTY_HELPER] + full_command output = test.Execute(full_command, self.context, self.context.GetTimeout(self.mode), env, - faketty=True, - input=input_arg) + stdin=fd) + if fd is not None: + os.close(fd) return test.TestOutput(self, full_command, output, diff --git a/test/report/test-report-getreport.js b/test/report/test-report-getreport.js index 9f40e61c2e7efe..1ee844fa921354 100644 --- a/test/report/test-report-getreport.js +++ b/test/report/test-report-getreport.js @@ -21,6 +21,14 @@ common.expectWarning('ExperimentalWarning', assert.deepStrictEqual(helper.findReports(process.pid, process.cwd()), []); } +{ + // Test with an error with one line stack + const error = new Error(); + error.stack = 'only one line'; + helper.validateContent(process.report.getReport(error)); + assert.deepStrictEqual(helper.findReports(process.pid, process.cwd()), []); +} + // Test with an invalid error argument. [null, 1, Symbol(), function() {}, 'foo'].forEach((error) => { common.expectsError(() => { diff --git a/test/report/test-report-uv-handles.js b/test/report/test-report-uv-handles.js index 20619204325f41..4d9bb12b44ff03 100644 --- a/test/report/test-report-uv-handles.js +++ b/test/report/test-report-uv-handles.js @@ -43,7 +43,7 @@ if (process.argv[2] === 'child') { const server = http.createServer((req, res) => { req.on('end', () => { // Generate the report while the connection is active. - console.log(process.report.getReport()); + console.log(JSON.stringify(process.report.getReport(), null, 2)); child_process.kill(); res.writeHead(200, { 'Content-Type': 'text/plain' }); diff --git a/test/report/test-report-writereport.js b/test/report/test-report-writereport.js index 8a22600acfbec4..5ab3af0e299eee 100644 --- a/test/report/test-report-writereport.js +++ b/test/report/test-report-writereport.js @@ -37,6 +37,14 @@ function validate() { validate(); } +{ + // Test with an error with one line stack + const error = new Error(); + error.stack = 'only one line'; + process.report.writeReport(error); + validate(); +} + { // Test with a file argument. const file = process.report.writeReport('custom-name-1.json'); diff --git a/test/sequential/test-inspector-invalid-args.js b/test/sequential/test-inspector-invalid-args.js index ae051b92ceda23..846a46a429ff73 100644 --- a/test/sequential/test-inspector-invalid-args.js +++ b/test/sequential/test-inspector-invalid-args.js @@ -10,7 +10,7 @@ const execFile = require('child_process').execFile; const mainScript = fixtures.path('loop.js'); const expected = '`node --debug` and `node --debug-brk` are invalid. ' + - 'Please use `node --inspect` or `node --inspect-brk` instead.'; + 'Please use `node --inspect` and `node --inspect-brk` instead.'; for (const invalidArg of ['--debug-brk', '--debug']) { execFile( process.execPath, diff --git a/test/sequential/test-net-bytes-per-incoming-chunk-overhead.js b/test/sequential/test-net-bytes-per-incoming-chunk-overhead.js index 8f766e8c7a4106..c2275b570ca08e 100644 --- a/test/sequential/test-net-bytes-per-incoming-chunk-overhead.js +++ b/test/sequential/test-net-bytes-per-incoming-chunk-overhead.js @@ -37,5 +37,5 @@ process.on('exit', () => { const bytesPerChunk = (process.memoryUsage().rss - baseRSS) / receivedChunks.length; // We should always have less than one page (usually ~ 4 kB) per chunk. - assert(bytesPerChunk < 512, `measured ${bytesPerChunk} bytes per chunk`); + assert(bytesPerChunk < 600, `measured ${bytesPerChunk} bytes per chunk`); }); diff --git a/tools/bootstrap/README.md b/tools/bootstrap/README.md index 4098b5c3a2f32e..ec031e637c24a8 100644 --- a/tools/bootstrap/README.md +++ b/tools/bootstrap/README.md @@ -1,2 +1,2 @@ -See the main project [README.md](../../README.md#boxstarter) for details on how -to use this script. +See the main project [BUILDING.md](../../BUILDING.md#boxstarter) for details on +how to use this script. diff --git a/tools/gyp/PRESUBMIT.py b/tools/gyp/PRESUBMIT.py index 4bc1b8ca26afda..e52f9d2d22d607 100644 --- a/tools/gyp/PRESUBMIT.py +++ b/tools/gyp/PRESUBMIT.py @@ -76,8 +76,7 @@ def _LicenseHeader(input_api): # Accept any year number from 2009 to the current year. current_year = int(input_api.time.strftime('%Y')) - allowed_years = (str(s) for s in reversed(xrange(2009, current_year + 1))) - + allowed_years = (str(s) for s in reversed(range(2009, current_year + 1))) years_re = '(' + '|'.join(allowed_years) + ')' # The (c) is deprecated, but tolerate it until it's removed from all files. @@ -124,3 +123,16 @@ def CheckChangeOnCommit(input_api, output_api): finally: sys.path = old_sys_path return report + + +TRYBOTS = [ + 'linux_try', + 'mac_try', + 'win_try', +] + + +def GetPreferredTryMasters(_, change): + return { + 'client.gyp': { t: set(['defaulttests']) for t in TRYBOTS }, + } diff --git a/tools/gyp/pylib/gyp/MSVSNew.py b/tools/gyp/pylib/gyp/MSVSNew.py index 593f0e5b0b2e88..0ec628cc1f759d 100644 --- a/tools/gyp/pylib/gyp/MSVSNew.py +++ b/tools/gyp/pylib/gyp/MSVSNew.py @@ -4,22 +4,17 @@ """New implementation of Visual Studio project generation.""" +import hashlib import os import random import gyp.common -# hashlib is supplied as of Python 2.5 as the replacement interface for md5 -# and other secure hashes. In 2.6, md5 is deprecated. Import hashlib if -# available, avoiding a deprecation warning under 2.6. Import md5 otherwise, -# preserving 2.4 compatibility. try: - import hashlib - _new_md5 = hashlib.md5 -except ImportError: - import md5 - _new_md5 = md5.new - + cmp +except NameError: + def cmp(x, y): + return (x > y) - (x < y) # Initialize random number generator random.seed() @@ -50,7 +45,7 @@ def MakeGuid(name, seed='msvs_new'): not change when the project for a target is rebuilt. """ # Calculate a MD5 signature for the seed and name. - d = _new_md5(str(seed) + str(name)).hexdigest().upper() + d = hashlib.md5(str(seed) + str(name)).hexdigest().upper() # Convert most of the signature to GUID form (discard the rest) guid = ('{' + d[:8] + '-' + d[8:12] + '-' + d[12:16] + '-' + d[16:20] + '-' + d[20:32] + '}') diff --git a/tools/gyp/pylib/gyp/MSVSSettings.py b/tools/gyp/pylib/gyp/MSVSSettings.py index 58ce0bb1edfefd..0f53ff87c77d54 100644 --- a/tools/gyp/pylib/gyp/MSVSSettings.py +++ b/tools/gyp/pylib/gyp/MSVSSettings.py @@ -14,6 +14,10 @@ MSBuild install directory, e.g. c:\Program Files (x86)\MSBuild """ +from __future__ import print_function + +from gyp import string_types + import sys import re @@ -106,11 +110,11 @@ class _String(_Type): """A setting that's just a string.""" def ValidateMSVS(self, value): - if not isinstance(value, basestring): + if not isinstance(value, string_types): raise ValueError('expected string; got %r' % value) def ValidateMSBuild(self, value): - if not isinstance(value, basestring): + if not isinstance(value, string_types): raise ValueError('expected string; got %r' % value) def ConvertToMSBuild(self, value): @@ -122,11 +126,11 @@ class _StringList(_Type): """A settings that's a list of strings.""" def ValidateMSVS(self, value): - if not isinstance(value, basestring) and not isinstance(value, list): + if not isinstance(value, string_types) and not isinstance(value, list): raise ValueError('expected string list; got %r' % value) def ValidateMSBuild(self, value): - if not isinstance(value, basestring) and not isinstance(value, list): + if not isinstance(value, string_types) and not isinstance(value, list): raise ValueError('expected string list; got %r' % value) def ConvertToMSBuild(self, value): @@ -400,7 +404,7 @@ def _ValidateExclusionSetting(setting, settings, error_msg, stderr=sys.stderr): if unrecognized: # We don't know this setting. Give a warning. - print >> stderr, error_msg + print(error_msg, file=stderr) def FixVCMacroSlashes(s): @@ -433,7 +437,7 @@ def ConvertVCMacrosToMSBuild(s): '$(PlatformName)': '$(Platform)', '$(SafeInputName)': '%(Filename)', } - for old, new in replace_map.iteritems(): + for old, new in replace_map.items(): s = s.replace(old, new) s = FixVCMacroSlashes(s) return s @@ -453,17 +457,17 @@ def ConvertToMSBuildSettings(msvs_settings, stderr=sys.stderr): dictionaries of settings and their values. """ msbuild_settings = {} - for msvs_tool_name, msvs_tool_settings in msvs_settings.iteritems(): + for msvs_tool_name, msvs_tool_settings in msvs_settings.items(): if msvs_tool_name in _msvs_to_msbuild_converters: msvs_tool = _msvs_to_msbuild_converters[msvs_tool_name] - for msvs_setting, msvs_value in msvs_tool_settings.iteritems(): + for msvs_setting, msvs_value in msvs_tool_settings.items(): if msvs_setting in msvs_tool: # Invoke the translation function. try: msvs_tool[msvs_setting](msvs_value, msbuild_settings) - except ValueError, e: - print >> stderr, ('Warning: while converting %s/%s to MSBuild, ' - '%s' % (msvs_tool_name, msvs_setting, e)) + except ValueError as e: + print('Warning: while converting %s/%s to MSBuild, ' + '%s' % (msvs_tool_name, msvs_setting, e), file=stderr) else: _ValidateExclusionSetting(msvs_setting, msvs_tool, @@ -472,8 +476,8 @@ def ConvertToMSBuildSettings(msvs_settings, stderr=sys.stderr): (msvs_tool_name, msvs_setting)), stderr) else: - print >> stderr, ('Warning: unrecognized tool %s while converting to ' - 'MSBuild.' % msvs_tool_name) + print('Warning: unrecognized tool %s while converting to ' + 'MSBuild.' % msvs_tool_name, file=stderr) return msbuild_settings @@ -513,13 +517,13 @@ def _ValidateSettings(validators, settings, stderr): for tool_name in settings: if tool_name in validators: tool_validators = validators[tool_name] - for setting, value in settings[tool_name].iteritems(): + for setting, value in settings[tool_name].items(): if setting in tool_validators: try: tool_validators[setting](value) - except ValueError, e: - print >> stderr, ('Warning: for %s/%s, %s' % - (tool_name, setting, e)) + except ValueError as e: + print('Warning: for %s/%s, %s' % (tool_name, setting, e), + file=stderr) else: _ValidateExclusionSetting(setting, tool_validators, @@ -528,7 +532,7 @@ def _ValidateSettings(validators, settings, stderr): stderr) else: - print >> stderr, ('Warning: unrecognized tool %s' % tool_name) + print('Warning: unrecognized tool %s' % (tool_name), file=stderr) # MSVS and MBuild names of the tools. diff --git a/tools/gyp/pylib/gyp/MSVSUserFile.py b/tools/gyp/pylib/gyp/MSVSUserFile.py index 6c07e9a893bac0..2264d640152a29 100644 --- a/tools/gyp/pylib/gyp/MSVSUserFile.py +++ b/tools/gyp/pylib/gyp/MSVSUserFile.py @@ -91,7 +91,7 @@ def AddDebugSettings(self, config_name, command, environment = {}, if environment and isinstance(environment, dict): env_list = ['%s="%s"' % (key, val) - for (key,val) in environment.iteritems()] + for (key,val) in environment.items()] environment = ' '.join(env_list) else: environment = '' @@ -135,7 +135,7 @@ def AddDebugSettings(self, config_name, command, environment = {}, def WriteIfChanged(self): """Writes the user file.""" configs = ['Configurations'] - for config, spec in sorted(self.configurations.iteritems()): + for config, spec in sorted(self.configurations.items()): configs.append(spec) content = ['VisualStudioUserFile', diff --git a/tools/gyp/pylib/gyp/MSVSUtil.py b/tools/gyp/pylib/gyp/MSVSUtil.py index 96dea6c2c9d27f..f24530b275f7cd 100644 --- a/tools/gyp/pylib/gyp/MSVSUtil.py +++ b/tools/gyp/pylib/gyp/MSVSUtil.py @@ -236,7 +236,7 @@ def InsertLargePdbShims(target_list, target_dicts, vars): # Set up the shim to output its PDB to the same location as the final linker # target. - for config_name, config in shim_dict.get('configurations').iteritems(): + for config_name, config in shim_dict.get('configurations').items(): pdb_path = _GetPdbPath(target_dict, config_name, vars) # A few keys that we don't want to propagate. diff --git a/tools/gyp/pylib/gyp/MSVSVersion.py b/tools/gyp/pylib/gyp/MSVSVersion.py index 48a3151f8107e8..a207abaa18c7b8 100644 --- a/tools/gyp/pylib/gyp/MSVSVersion.py +++ b/tools/gyp/pylib/gyp/MSVSVersion.py @@ -189,7 +189,7 @@ def _RegistryQuery(key, value=None): text = None try: text = _RegistryQueryBase('Sysnative', key, value) - except OSError, e: + except OSError as e: if e.errno == errno.ENOENT: text = _RegistryQueryBase('System32', key, value) else: @@ -207,12 +207,18 @@ def _RegistryGetValueUsingWinReg(key, value): contents of the registry key's value, or None on failure. Throws ImportError if _winreg is unavailable. """ - import _winreg + try: + # Python 2 + from _winreg import HKEY_LOCAL_MACHINE, OpenKey, QueryValueEx + except ImportError: + # Python 3 + from winreg import HKEY_LOCAL_MACHINE, OpenKey, QueryValueEx + try: root, subkey = key.split('\\', 1) assert root == 'HKLM' # Only need HKLM for now. - with _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, subkey) as hkey: - return _winreg.QueryValueEx(hkey, value)[0] + with OpenKey(HKEY_LOCAL_MACHINE, subkey) as hkey: + return QueryValueEx(hkey, value)[0] except WindowsError: return None diff --git a/tools/gyp/pylib/gyp/__init__.py b/tools/gyp/pylib/gyp/__init__.py index 668f38b60d0093..dee834013f4144 100755 --- a/tools/gyp/pylib/gyp/__init__.py +++ b/tools/gyp/pylib/gyp/__init__.py @@ -4,9 +4,11 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +from __future__ import print_function + import copy import gyp.input -import optparse +import argparse import os.path import re import shlex @@ -14,6 +16,13 @@ import traceback from gyp.common import GypError +try: + # Python 2 + string_types = basestring +except NameError: + # Python 3 + string_types = str + # Default debug modes for GYP debug = {} @@ -34,8 +43,8 @@ def DebugOutput(mode, message, *args): pass if args: message %= args - print '%s:%s:%d:%s %s' % (mode.upper(), os.path.basename(ctx[0]), - ctx[1], ctx[2], message) + print('%s:%s:%d:%s %s' % (mode.upper(), os.path.basename(ctx[0]), + ctx[1], ctx[2], message)) def FindBuildFiles(): extension = '.gyp' @@ -207,7 +216,7 @@ def Noop(value): # We always want to ignore the environment when regenerating, to avoid # duplicate or changed flags in the environment at the time of regeneration. flags = ['--ignore-environment'] - for name, metadata in options._regeneration_metadata.iteritems(): + for name, metadata in options._regeneration_metadata.items(): opt = metadata['opt'] value = getattr(options, name) value_predicate = metadata['type'] == 'path' and FixPath or Noop @@ -226,24 +235,24 @@ def Noop(value): (action == 'store_false' and not value)): flags.append(opt) elif options.use_environment and env_name: - print >>sys.stderr, ('Warning: environment regeneration unimplemented ' + print('Warning: environment regeneration unimplemented ' 'for %s flag %r env_name %r' % (action, opt, - env_name)) + env_name), file=sys.stderr) else: - print >>sys.stderr, ('Warning: regeneration unimplemented for action %r ' - 'flag %r' % (action, opt)) + print('Warning: regeneration unimplemented for action %r ' + 'flag %r' % (action, opt), file=sys.stderr) return flags -class RegeneratableOptionParser(optparse.OptionParser): - def __init__(self): +class RegeneratableOptionParser(argparse.ArgumentParser): + def __init__(self, usage): self.__regeneratable_options = {} - optparse.OptionParser.__init__(self) + argparse.ArgumentParser.__init__(self, usage=usage) - def add_option(self, *args, **kw): + def add_argument(self, *args, **kw): """Add an option to the parser. - This accepts the same arguments as OptionParser.add_option, plus the + This accepts the same arguments as ArgumentParser.add_argument, plus the following: regenerate: can be set to False to prevent this option from being included in regeneration. @@ -260,7 +269,7 @@ def add_option(self, *args, **kw): # it as a string. type = kw.get('type') if type == 'path': - kw['type'] = 'string' + kw['type'] = str self.__regeneratable_options[dest] = { 'action': kw.get('action'), @@ -269,50 +278,50 @@ def add_option(self, *args, **kw): 'opt': args[0], } - optparse.OptionParser.add_option(self, *args, **kw) + argparse.ArgumentParser.add_argument(self, *args, **kw) def parse_args(self, *args): - values, args = optparse.OptionParser.parse_args(self, *args) + values, args = argparse.ArgumentParser.parse_known_args(self, *args) values._regeneration_metadata = self.__regeneratable_options return values, args def gyp_main(args): my_name = os.path.basename(sys.argv[0]) + usage = 'usage: %(prog)s [options ...] [build_file ...]' + - parser = RegeneratableOptionParser() - usage = 'usage: %s [options ...] [build_file ...]' - parser.set_usage(usage.replace('%s', '%prog')) - parser.add_option('--build', dest='configs', action='append', + parser = RegeneratableOptionParser(usage=usage.replace('%s', '%(prog)s')) + parser.add_argument('--build', dest='configs', action='append', help='configuration for build after project generation') - parser.add_option('--check', dest='check', action='store_true', + parser.add_argument('--check', dest='check', action='store_true', help='check format of gyp files') - parser.add_option('--config-dir', dest='config_dir', action='store', + parser.add_argument('--config-dir', dest='config_dir', action='store', env_name='GYP_CONFIG_DIR', default=None, help='The location for configuration files like ' 'include.gypi.') - parser.add_option('-d', '--debug', dest='debug', metavar='DEBUGMODE', + parser.add_argument('-d', '--debug', dest='debug', metavar='DEBUGMODE', action='append', default=[], help='turn on a debugging ' 'mode for debugging GYP. Supported modes are "variables", ' '"includes" and "general" or "all" for all of them.') - parser.add_option('-D', dest='defines', action='append', metavar='VAR=VAL', + parser.add_argument('-D', dest='defines', action='append', metavar='VAR=VAL', env_name='GYP_DEFINES', help='sets variable VAR to value VAL') - parser.add_option('--depth', dest='depth', metavar='PATH', type='path', + parser.add_argument('--depth', dest='depth', metavar='PATH', type='path', help='set DEPTH gyp variable to a relative path to PATH') - parser.add_option('-f', '--format', dest='formats', action='append', + parser.add_argument('-f', '--format', dest='formats', action='append', env_name='GYP_GENERATORS', regenerate=False, help='output formats to generate') - parser.add_option('-G', dest='generator_flags', action='append', default=[], + parser.add_argument('-G', dest='generator_flags', action='append', default=[], metavar='FLAG=VAL', env_name='GYP_GENERATOR_FLAGS', help='sets generator flag FLAG to VAL') - parser.add_option('--generator-output', dest='generator_output', + parser.add_argument('--generator-output', dest='generator_output', action='store', default=None, metavar='DIR', type='path', env_name='GYP_GENERATOR_OUTPUT', help='puts generated build files under DIR') - parser.add_option('--ignore-environment', dest='use_environment', + parser.add_argument('--ignore-environment', dest='use_environment', action='store_false', default=True, regenerate=False, help='do not read options from environment variables') - parser.add_option('-I', '--include', dest='includes', action='append', + parser.add_argument('-I', '--include', dest='includes', action='append', metavar='INCLUDE', type='path', help='files to include in all loaded .gyp files') # --no-circular-check disables the check for circular relationships between @@ -322,7 +331,7 @@ def gyp_main(args): # option allows the strict behavior to be used on Macs and the lenient # behavior to be used elsewhere. # TODO(mark): Remove this option when http://crbug.com/35878 is fixed. - parser.add_option('--no-circular-check', dest='circular_check', + parser.add_argument('--no-circular-check', dest='circular_check', action='store_false', default=True, regenerate=False, help="don't check for circular relationships between files") # --no-duplicate-basename-check disables the check for duplicate basenames @@ -331,18 +340,18 @@ def gyp_main(args): # when duplicate basenames are passed into Make generator on Mac. # TODO(yukawa): Remove this option when these legacy generators are # deprecated. - parser.add_option('--no-duplicate-basename-check', + parser.add_argument('--no-duplicate-basename-check', dest='duplicate_basename_check', action='store_false', default=True, regenerate=False, help="don't check for duplicate basenames") - parser.add_option('--no-parallel', action='store_true', default=False, + parser.add_argument('--no-parallel', action='store_true', default=False, help='Disable multiprocessing') - parser.add_option('-S', '--suffix', dest='suffix', default='', + parser.add_argument('-S', '--suffix', dest='suffix', default='', help='suffix to add to generated files') - parser.add_option('--toplevel-dir', dest='toplevel_dir', action='store', + parser.add_argument('--toplevel-dir', dest='toplevel_dir', action='store', default=None, metavar='DIR', type='path', help='directory to use as the root of the source tree') - parser.add_option('-R', '--root-target', dest='root_targets', + parser.add_argument('-R', '--root-target', dest='root_targets', action='append', metavar='TARGET', help='include only TARGET and its deep dependencies') @@ -410,7 +419,7 @@ def gyp_main(args): for option, value in sorted(options.__dict__.items()): if option[0] == '_': continue - if isinstance(value, basestring): + if isinstance(value, string_types): DebugOutput(DEBUG_GENERAL, " %s: '%s'", option, value) else: DebugOutput(DEBUG_GENERAL, " %s: %s", option, value) @@ -432,7 +441,7 @@ def gyp_main(args): build_file_dir = os.path.abspath(os.path.dirname(build_file)) build_file_dir_components = build_file_dir.split(os.path.sep) components_len = len(build_file_dir_components) - for index in xrange(components_len - 1, -1, -1): + for index in range(components_len - 1, -1, -1): if build_file_dir_components[index] == 'src': options.depth = os.path.sep.join(build_file_dir_components) break @@ -475,7 +484,7 @@ def gyp_main(args): if home_dot_gyp != None: default_include = os.path.join(home_dot_gyp, 'include.gypi') if os.path.exists(default_include): - print 'Using overrides found in ' + default_include + print('Using overrides found in ' + default_include) includes.append(default_include) # Command-line --include files come after the default include. @@ -536,7 +545,7 @@ def gyp_main(args): def main(args): try: return gyp_main(args) - except GypError, e: + except GypError as e: sys.stderr.write("gyp: %s\n" % e) return 1 diff --git a/tools/gyp/pylib/gyp/common.py b/tools/gyp/pylib/gyp/common.py index a1e1db5f1239ff..cfee9d45923b65 100644 --- a/tools/gyp/pylib/gyp/common.py +++ b/tools/gyp/pylib/gyp/common.py @@ -2,8 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -from __future__ import with_statement - import collections import errno import filecmp @@ -363,7 +361,7 @@ def close(self): same = False try: same = filecmp.cmp(self.tmp_path, filename, False) - except OSError, e: + except OSError as e: if e.errno != errno.ENOENT: raise @@ -382,9 +380,9 @@ def close(self): # # No way to get the umask without setting a new one? Set a safe one # and then set it back to the old value. - umask = os.umask(077) + umask = os.umask(0o77) os.umask(umask) - os.chmod(self.tmp_path, 0666 & ~umask) + os.chmod(self.tmp_path, 0o666 & ~umask) if sys.platform == 'win32' and os.path.exists(filename): # NOTE: on windows (but not cygwin) rename will not replace an # existing file, so it must be preceded with a remove. Sadly there @@ -467,7 +465,7 @@ def CopyTool(flavor, out_path, generator_flags={}): ''.join([source[0], header] + source[1:])) # Make file executable. - os.chmod(tool_path, 0755) + os.chmod(tool_path, 0o755) # From Alex Martelli, diff --git a/tools/gyp/pylib/gyp/easy_xml.py b/tools/gyp/pylib/gyp/easy_xml.py index 2522efb244d0a3..acccb47b75ad31 100644 --- a/tools/gyp/pylib/gyp/easy_xml.py +++ b/tools/gyp/pylib/gyp/easy_xml.py @@ -5,6 +5,7 @@ import re import os import locale +from functools import reduce def XmlToString(content, encoding='utf-8', pretty=False): @@ -80,7 +81,7 @@ def _ConstructContentList(xml_parts, specification, pretty, level=0): # Optionally in second position is a dictionary of the attributes. rest = specification[1:] if rest and isinstance(rest[0], dict): - for at, val in sorted(rest[0].iteritems()): + for at, val in sorted(rest[0].items()): xml_parts.append(' %s="%s"' % (at, _XmlEscape(val, attr=True))) rest = rest[1:] if rest: diff --git a/tools/gyp/pylib/gyp/flock_tool.py b/tools/gyp/pylib/gyp/flock_tool.py index b38d8660f72853..81fb79d136a0a5 100755 --- a/tools/gyp/pylib/gyp/flock_tool.py +++ b/tools/gyp/pylib/gyp/flock_tool.py @@ -39,7 +39,7 @@ def ExecFlock(self, lockfile, *cmd_list): # where fcntl.flock(fd, LOCK_EX) always fails # with EBADF, that's why we use this F_SETLK # hack instead. - fd = os.open(lockfile, os.O_WRONLY|os.O_NOCTTY|os.O_CREAT, 0666) + fd = os.open(lockfile, os.O_WRONLY|os.O_NOCTTY|os.O_CREAT, 0o666) if sys.platform.startswith('aix'): # Python on AIX is compiled with LARGEFILE support, which changes the # struct size. diff --git a/tools/gyp/pylib/gyp/generator/analyzer.py b/tools/gyp/pylib/gyp/generator/analyzer.py index 921c1a6b714328..dc17c96524fddb 100644 --- a/tools/gyp/pylib/gyp/generator/analyzer.py +++ b/tools/gyp/pylib/gyp/generator/analyzer.py @@ -62,6 +62,8 @@ then the "all" target includes "b1" and "b2". """ +from __future__ import print_function + import gyp.common import gyp.ninja_syntax as ninja_syntax import json @@ -155,7 +157,7 @@ def _AddSources(sources, base_path, base_path_components, result): continue result.append(base_path + source) if debug: - print 'AddSource', org_source, result[len(result) - 1] + print('AddSource', org_source, result[len(result) - 1]) def _ExtractSourcesFromAction(action, base_path, base_path_components, @@ -185,7 +187,7 @@ def _ExtractSources(target, target_dict, toplevel_dir): base_path += '/' if debug: - print 'ExtractSources', target, base_path + print('ExtractSources', target, base_path) results = [] if 'sources' in target_dict: @@ -278,7 +280,7 @@ def _WasBuildFileModified(build_file, data, files, toplevel_dir): the root of the source tree.""" if _ToLocalPath(toplevel_dir, _ToGypPath(build_file)) in files: if debug: - print 'gyp file modified', build_file + print('gyp file modified', build_file) return True # First element of included_files is the file itself. @@ -291,8 +293,8 @@ def _WasBuildFileModified(build_file, data, files, toplevel_dir): _ToGypPath(gyp.common.UnrelativePath(include_file, build_file)) if _ToLocalPath(toplevel_dir, rel_include_file) in files: if debug: - print 'included gyp file modified, gyp_file=', build_file, \ - 'included file=', rel_include_file + print('included gyp file modified, gyp_file=', build_file, + 'included file=', rel_include_file) return True return False @@ -373,7 +375,7 @@ def _GenerateTargets(data, target_list, target_dicts, toplevel_dir, files, # If a build file (or any of its included files) is modified we assume all # targets in the file are modified. if build_file_in_files[build_file]: - print 'matching target from modified build file', target_name + print('matching target from modified build file', target_name) target.match_status = MATCH_STATUS_MATCHES matching_targets.append(target) else: @@ -381,7 +383,7 @@ def _GenerateTargets(data, target_list, target_dicts, toplevel_dir, files, toplevel_dir) for source in sources: if _ToGypPath(os.path.normpath(source)) in files: - print 'target', target_name, 'matches', source + print('target', target_name, 'matches', source) target.match_status = MATCH_STATUS_MATCHES matching_targets.append(target) break @@ -433,7 +435,7 @@ def _DoesTargetDependOnMatchingTargets(target): for dep in target.deps: if _DoesTargetDependOnMatchingTargets(dep): target.match_status = MATCH_STATUS_MATCHES_BY_DEPENDENCY - print '\t', target.name, 'matches by dep', dep.name + print('\t', target.name, 'matches by dep', dep.name) return True target.match_status = MATCH_STATUS_DOESNT_MATCH return False @@ -445,7 +447,7 @@ def _GetTargetsDependingOnMatchingTargets(possible_targets): supplied as input to analyzer. possible_targets: targets to search from.""" found = [] - print 'Targets that matched by dependency:' + print('Targets that matched by dependency:') for target in possible_targets: if _DoesTargetDependOnMatchingTargets(target): found.append(target) @@ -484,12 +486,12 @@ def _AddCompileTargets(target, roots, add_if_no_ancestor, result): (add_if_no_ancestor or target.requires_build)) or (target.is_static_library and add_if_no_ancestor and not target.is_or_has_linked_ancestor)): - print '\t\tadding to compile targets', target.name, 'executable', \ - target.is_executable, 'added_to_compile_targets', \ - target.added_to_compile_targets, 'add_if_no_ancestor', \ - add_if_no_ancestor, 'requires_build', target.requires_build, \ - 'is_static_library', target.is_static_library, \ - 'is_or_has_linked_ancestor', target.is_or_has_linked_ancestor + print('\t\tadding to compile targets', target.name, 'executable', + target.is_executable, 'added_to_compile_targets', + target.added_to_compile_targets, 'add_if_no_ancestor', + add_if_no_ancestor, 'requires_build', target.requires_build, + 'is_static_library', target.is_static_library, + 'is_or_has_linked_ancestor', target.is_or_has_linked_ancestor) result.add(target) target.added_to_compile_targets = True @@ -500,7 +502,7 @@ def _GetCompileTargets(matching_targets, supplied_targets): supplied_targets: set of targets supplied to analyzer to search from.""" result = set() for target in matching_targets: - print 'finding compile targets for match', target.name + print('finding compile targets for match', target.name) _AddCompileTargets(target, supplied_targets, True, result) return result @@ -508,46 +510,46 @@ def _GetCompileTargets(matching_targets, supplied_targets): def _WriteOutput(params, **values): """Writes the output, either to stdout or a file is specified.""" if 'error' in values: - print 'Error:', values['error'] + print('Error:', values['error']) if 'status' in values: - print values['status'] + print(values['status']) if 'targets' in values: values['targets'].sort() - print 'Supplied targets that depend on changed files:' + print('Supplied targets that depend on changed files:') for target in values['targets']: - print '\t', target + print('\t', target) if 'invalid_targets' in values: values['invalid_targets'].sort() - print 'The following targets were not found:' + print('The following targets were not found:') for target in values['invalid_targets']: - print '\t', target + print('\t', target) if 'build_targets' in values: values['build_targets'].sort() - print 'Targets that require a build:' + print('Targets that require a build:') for target in values['build_targets']: - print '\t', target + print('\t', target) if 'compile_targets' in values: values['compile_targets'].sort() - print 'Targets that need to be built:' + print('Targets that need to be built:') for target in values['compile_targets']: - print '\t', target + print('\t', target) if 'test_targets' in values: values['test_targets'].sort() - print 'Test targets:' + print('Test targets:') for target in values['test_targets']: - print '\t', target + print('\t', target) output_path = params.get('generator_flags', {}).get( 'analyzer_output_path', None) if not output_path: - print json.dumps(values) + print(json.dumps(values)) return try: f = open(output_path, 'w') f.write(json.dumps(values) + '\n') f.close() except IOError as e: - print 'Error writing to output file', output_path, str(e) + print('Error writing to output file', output_path, str(e)) def _WasGypIncludeFileModified(params, files): @@ -556,7 +558,7 @@ def _WasGypIncludeFileModified(params, files): if params['options'].includes: for include in params['options'].includes: if _ToGypPath(os.path.normpath(include)) in files: - print 'Include file modified, assuming all changed', include + print('Include file modified, assuming all changed', include) return True return False @@ -638,13 +640,13 @@ def find_matching_test_target_names(self): set(self._root_targets))] else: test_targets = [x for x in test_targets_no_all] - print 'supplied test_targets' + print('supplied test_targets') for target_name in self._test_target_names: - print '\t', target_name - print 'found test_targets' + print('\t', target_name) + print('found test_targets') for target in test_targets: - print '\t', target.name - print 'searching for matching test targets' + print('\t', target.name) + print('searching for matching test targets') matching_test_targets = _GetTargetsDependingOnMatchingTargets(test_targets) matching_test_targets_contains_all = (test_target_names_contains_all and set(matching_test_targets) & @@ -654,14 +656,14 @@ def find_matching_test_target_names(self): # 'all' is subsequentely added to the matching names below. matching_test_targets = [x for x in (set(matching_test_targets) & set(test_targets_no_all))] - print 'matched test_targets' + print('matched test_targets') for target in matching_test_targets: - print '\t', target.name + print('\t', target.name) matching_target_names = [gyp.common.ParseQualifiedTarget(target.name)[1] for target in matching_test_targets] if matching_test_targets_contains_all: matching_target_names.append('all') - print '\tall' + print('\tall') return matching_target_names def find_matching_compile_target_names(self): @@ -677,10 +679,10 @@ def find_matching_compile_target_names(self): if 'all' in self._supplied_target_names(): supplied_targets = [x for x in (set(supplied_targets) | set(self._root_targets))] - print 'Supplied test_targets & compile_targets' + print('Supplied test_targets & compile_targets') for target in supplied_targets: - print '\t', target.name - print 'Finding compile targets' + print('\t', target.name) + print('Finding compile targets') compile_targets = _GetCompileTargets(self._changed_targets, supplied_targets) return [gyp.common.ParseQualifiedTarget(target.name)[1] @@ -699,7 +701,7 @@ def GenerateOutput(target_list, target_dicts, data, params): toplevel_dir = _ToGypPath(os.path.abspath(params['options'].toplevel_dir)) if debug: - print 'toplevel_dir', toplevel_dir + print('toplevel_dir', toplevel_dir) if _WasGypIncludeFileModified(params, config.files): result_dict = { 'status': all_changed_string, diff --git a/tools/gyp/pylib/gyp/generator/cmake.py b/tools/gyp/pylib/gyp/generator/cmake.py index a2b96291aa526a..74b0c715e3b89a 100644 --- a/tools/gyp/pylib/gyp/generator/cmake.py +++ b/tools/gyp/pylib/gyp/generator/cmake.py @@ -28,6 +28,8 @@ CMakeLists.txt file. """ +from __future__ import print_function + import multiprocessing import os import signal @@ -644,8 +646,8 @@ def WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use, 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 ) ) + print('Target %s has unknown target type %s, skipping.' % + ( target_name, target_type)) return SetVariable(output, 'TARGET', target_name) @@ -868,8 +870,8 @@ def WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use, default_product_ext = generator_default_variables['SHARED_LIB_SUFFIX'] elif target_type != 'executable': - print ('ERROR: What output file should be generated?', - 'type', target_type, 'target', target_name) + print('ERROR: What output file should be generated?', + 'type', target_type, 'target', target_name) product_prefix = spec.get('product_prefix', default_product_prefix) product_name = spec.get('product_name', default_product_name) @@ -1207,11 +1209,11 @@ def PerformBuild(data, configurations, params): output_dir, config_name)) arguments = ['cmake', '-G', 'Ninja'] - print 'Generating [%s]: %s' % (config_name, arguments) + print('Generating [%s]: %s' % (config_name, arguments)) subprocess.check_call(arguments, cwd=build_dir) arguments = ['ninja', '-C', build_dir] - print 'Building [%s]: %s' % (config_name, arguments) + print('Building [%s]: %s' % (config_name, arguments)) subprocess.check_call(arguments) @@ -1239,7 +1241,7 @@ def GenerateOutput(target_list, target_dicts, data, params): arglists.append((target_list, target_dicts, data, params, config_name)) pool.map(CallGenerateOutputForConfig, arglists) - except KeyboardInterrupt, e: + except KeyboardInterrupt as e: pool.terminate() raise e else: diff --git a/tools/gyp/pylib/gyp/generator/dump_dependency_json.py b/tools/gyp/pylib/gyp/generator/dump_dependency_json.py index 160eafe2efeca0..8e4f3168f3e7ef 100644 --- a/tools/gyp/pylib/gyp/generator/dump_dependency_json.py +++ b/tools/gyp/pylib/gyp/generator/dump_dependency_json.py @@ -1,3 +1,4 @@ +from __future__ import print_function # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -96,4 +97,4 @@ def GenerateOutput(target_list, target_dicts, data, params): f = open(filename, 'w') json.dump(edges, f) f.close() - print 'Wrote json to %s.' % filename + print('Wrote json to %s.' % filename) diff --git a/tools/gyp/pylib/gyp/generator/eclipse.py b/tools/gyp/pylib/gyp/generator/eclipse.py index 3544347b3bacd4..b7c6aa951fd131 100644 --- a/tools/gyp/pylib/gyp/generator/eclipse.py +++ b/tools/gyp/pylib/gyp/generator/eclipse.py @@ -141,7 +141,7 @@ def GetAllIncludeDirectories(target_list, target_dicts, compiler_includes_list.append(include_dir) # Find standard gyp include dirs. - if config.has_key('include_dirs'): + if 'include_dirs' in config: include_dirs = config['include_dirs'] for shared_intermediate_dir in shared_intermediate_dirs: for include_dir in include_dirs: diff --git a/tools/gyp/pylib/gyp/generator/gypd.py b/tools/gyp/pylib/gyp/generator/gypd.py index 3efdb9966a69a1..78eeaa61b2294a 100644 --- a/tools/gyp/pylib/gyp/generator/gypd.py +++ b/tools/gyp/pylib/gyp/generator/gypd.py @@ -88,7 +88,7 @@ def GenerateOutput(target_list, target_dicts, data, params): if not output_file in output_files: output_files[output_file] = input_file - for output_file, input_file in output_files.iteritems(): + for output_file, input_file in output_files.items(): output = open(output_file, 'w') pprint.pprint(data[input_file], output) output.close() diff --git a/tools/gyp/pylib/gyp/generator/make.py b/tools/gyp/pylib/gyp/generator/make.py index e98d93ab233ff8..e43413c167e193 100644 --- a/tools/gyp/pylib/gyp/generator/make.py +++ b/tools/gyp/pylib/gyp/generator/make.py @@ -21,6 +21,8 @@ # toplevel Makefile. It may make sense to generate some .mk files on # the side to keep the files readable. +from __future__ import print_function + import os import re import sys @@ -650,7 +652,7 @@ def _ValidateSourcesForOSX(spec, all_sources): basenames.setdefault(basename, []).append(source) error = '' - for basename, files in basenames.iteritems(): + for basename, files in basenames.items(): if len(files) > 1: error += ' %s: %s\n' % (basename, ' '.join(files)) @@ -1202,16 +1204,16 @@ def WriteSources(self, configs, deps, sources, cflags_c = config.get('cflags_c') cflags_cc = config.get('cflags_cc') - self.WriteLn("# Flags passed to all source files."); + self.WriteLn("# Flags passed to all source files.") self.WriteList(cflags, 'CFLAGS_%s' % configname) - self.WriteLn("# Flags passed to only C files."); + self.WriteLn("# Flags passed to only C files.") self.WriteList(cflags_c, 'CFLAGS_C_%s' % configname) - self.WriteLn("# Flags passed to only C++ files."); + self.WriteLn("# Flags passed to only C++ files.") self.WriteList(cflags_cc, 'CFLAGS_CC_%s' % configname) if self.flavor == 'mac': - self.WriteLn("# Flags passed to only ObjC files."); + self.WriteLn("# Flags passed to only ObjC files.") self.WriteList(cflags_objc, 'CFLAGS_OBJC_%s' % configname) - self.WriteLn("# Flags passed to only ObjC++ files."); + self.WriteLn("# Flags passed to only ObjC++ files.") self.WriteList(cflags_objcc, 'CFLAGS_OBJCC_%s' % configname) includes = config.get('include_dirs') if includes: @@ -1359,8 +1361,8 @@ def ComputeOutputBasename(self, spec): elif self.type == 'none': target = '%s.stamp' % target elif self.type != 'executable': - print ("ERROR: What output file should be generated?", - "type", self.type, "target", target) + print("ERROR: What output file should be generated?", + "type", self.type, "target", target) target_prefix = spec.get('product_prefix', target_prefix) target = spec.get('product_name', target) @@ -1524,7 +1526,7 @@ def WriteTarget(self, spec, configs, deps, link_deps, bundle_deps, # Postbuilds expect to be run in the gyp file's directory, so insert an # implicit postbuild to cd to there. postbuilds.insert(0, gyp.common.EncodePOSIXShellList(['cd', self.path])) - for i in xrange(len(postbuilds)): + for i in range(len(postbuilds)): if not postbuilds[i].startswith('$'): postbuilds[i] = EscapeShellArgument(postbuilds[i]) self.WriteLn('%s: builddir := $(abs_builddir)' % QuoteSpaces(self.output)) @@ -1616,7 +1618,7 @@ def WriteTarget(self, spec, configs, deps, link_deps, bundle_deps, self.WriteDoCmd([self.output_binary], deps, 'touch', part_of_all, postbuilds=postbuilds) else: - print "WARNING: no output for", self.type, target + print("WARNING: no output for", self.type, self.target) # Add an alias for each target (if there are any outputs). # Installable target aliases are created below. @@ -1968,7 +1970,7 @@ def PerformBuild(data, configurations, params): if options.toplevel_dir and options.toplevel_dir != '.': arguments += '-C', options.toplevel_dir arguments.append('BUILDTYPE=' + config) - print 'Building [%s]: %s' % (config, arguments) + print('Building [%s]: %s' % (config, arguments)) subprocess.check_call(arguments) diff --git a/tools/gyp/pylib/gyp/generator/msvs.py b/tools/gyp/pylib/gyp/generator/msvs.py index dbde9e279eb5d6..3a9e6a7aa5cd67 100644 --- a/tools/gyp/pylib/gyp/generator/msvs.py +++ b/tools/gyp/pylib/gyp/generator/msvs.py @@ -2,6 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +from __future__ import print_function + import copy import ntpath import os @@ -315,10 +317,8 @@ def _ConfigWindowsTargetPlatformVersion(config_data, version): if names: return names[0] else: - print >> sys.stdout, ( - 'Warning: No include files found for ' - 'detected Windows SDK version %s' % (version) - ) + print('Warning: No include files found for detected ' + 'Windows SDK version %s' % (version), file=sys.stdout) def _BuildCommandLineForRuleRaw(spec, cmd, cygwin_shell, has_input_path, @@ -469,7 +469,7 @@ def _AddCustomBuildToolForMSVS(p, spec, primary_input, 'CommandLine': cmd, }) # Add to the properties of primary input for each config. - for config_name, c_data in spec['configurations'].iteritems(): + for config_name, c_data in spec['configurations'].items(): p.AddFileConfig(_FixPath(primary_input), _ConfigFullName(config_name, c_data), tools=[tool]) @@ -775,8 +775,8 @@ def _Replace(match): # the VCProj but cause the same problem on the final command-line. Moving # the item to the end of the list does works, but that's only possible if # there's only one such item. Let's just warn the user. - print >> sys.stderr, ('Warning: MSVS may misinterpret the odd number of ' + - 'quotes in ' + s) + print('Warning: MSVS may misinterpret the odd number of ' + 'quotes in ' + s, file=sys.stderr) return s @@ -991,7 +991,7 @@ def _ValidateSourcesForMSVSProject(spec, version): basenames.setdefault(basename, []).append(source) error = '' - for basename, files in basenames.iteritems(): + for basename, files in basenames.items(): if len(files) > 1: error += ' %s: %s\n' % (basename, ' '.join(files)) @@ -1023,7 +1023,7 @@ def _GenerateMSVSProject(project, options, version, generator_flags): relative_path_of_gyp_file = gyp.common.RelativePath(gyp_path, project_dir) config_type = _GetMSVSConfigurationType(spec, project.build_file) - for config_name, config in spec['configurations'].iteritems(): + for config_name, config in spec['configurations'].items(): _AddConfigurationToMSVSProject(p, spec, config_type, config_name, config) # MSVC08 and prior version cannot handle duplicate basenames in the same @@ -1392,10 +1392,10 @@ def _ConvertToolsToExpectedForm(tools): A list of Tool objects. """ tool_list = [] - for tool, settings in tools.iteritems(): + for tool, settings in tools.items(): # Collapse settings with lists. settings_fixed = {} - for setting, value in settings.iteritems(): + for setting, value in settings.items(): if type(value) == list: if ((tool == 'VCLinkerTool' and setting == 'AdditionalDependencies') or @@ -1570,7 +1570,7 @@ def _IdlFilesHandledNonNatively(spec, sources): def _GetPrecompileRelatedFiles(spec): # Gather a list of precompiled header related sources. precompiled_related = [] - for _, config in spec['configurations'].iteritems(): + for _, config in spec['configurations'].items(): for k in precomp_keys: f = config.get(k) if f: @@ -1581,7 +1581,7 @@ def _GetPrecompileRelatedFiles(spec): def _ExcludeFilesFromBeingBuilt(p, spec, excluded_sources, excluded_idl, list_excluded): exclusions = _GetExcludedFilesFromBuild(spec, excluded_sources, excluded_idl) - for file_name, excluded_configs in exclusions.iteritems(): + for file_name, excluded_configs in exclusions.items(): if (not list_excluded and len(excluded_configs) == len(spec['configurations'])): # If we're not listing excluded files, then they won't appear in the @@ -1598,7 +1598,7 @@ def _GetExcludedFilesFromBuild(spec, excluded_sources, excluded_idl): # Exclude excluded sources from being built. for f in excluded_sources: excluded_configs = [] - for config_name, config in spec['configurations'].iteritems(): + for config_name, config in spec['configurations'].items(): precomped = [_FixPath(config.get(i, '')) for i in precomp_keys] # Don't do this for ones that are precompiled header related. if f not in precomped: @@ -1608,7 +1608,7 @@ def _GetExcludedFilesFromBuild(spec, excluded_sources, excluded_idl): # Exclude them now. for f in excluded_idl: excluded_configs = [] - for config_name, config in spec['configurations'].iteritems(): + for config_name, config in spec['configurations'].items(): excluded_configs.append((config_name, config)) exclusions[f] = excluded_configs return exclusions @@ -1617,7 +1617,7 @@ def _GetExcludedFilesFromBuild(spec, excluded_sources, excluded_idl): def _AddToolFilesToMSVS(p, spec): # Add in tool files (rules). tool_files = OrderedSet() - for _, config in spec['configurations'].iteritems(): + for _, config in spec['configurations'].items(): for f in config.get('msvs_tool_files', []): tool_files.add(f) for f in tool_files: @@ -1630,7 +1630,7 @@ def _HandlePreCompiledHeaders(p, sources, spec): # kind (i.e. C vs. C++) as the precompiled header source stub needs # to have use of precompiled headers disabled. extensions_excluded_from_precompile = [] - for config_name, config in spec['configurations'].iteritems(): + for config_name, config in spec['configurations'].items(): source = config.get('msvs_precompiled_source') if source: source = _FixPath(source) @@ -1651,7 +1651,7 @@ def DisableForSourceTree(source_tree): else: basename, extension = os.path.splitext(source) if extension in extensions_excluded_from_precompile: - for config_name, config in spec['configurations'].iteritems(): + for config_name, config in spec['configurations'].items(): tool = MSVSProject.Tool('VCCLCompilerTool', {'UsePrecompiledHeader': '0', 'ForcedIncludeFiles': '$(NOINHERIT)'}) @@ -1702,7 +1702,7 @@ def _WriteMSVSUserFile(project_path, version, spec): return # Nothing to add # Write out the user file. user_file = _CreateMSVSUserFile(project_path, version, spec) - for config_name, c_data in spec['configurations'].iteritems(): + for config_name, c_data in spec['configurations'].items(): user_file.AddDebugSettings(_ConfigFullName(config_name, c_data), action, environment, working_directory) user_file.WriteIfChanged() @@ -1756,7 +1756,7 @@ def _GetPathDict(root, path): def _DictsToFolders(base_path, bucket, flat): # Convert to folders recursively. children = [] - for folder, contents in bucket.iteritems(): + for folder, contents in bucket.items(): if type(contents) == dict: folder_children = _DictsToFolders(os.path.join(base_path, folder), contents, flat) @@ -1828,7 +1828,7 @@ def _GetPlatformOverridesOfProject(spec): # Prepare a dict indicating which project configurations are used for which # solution configurations for this target. config_platform_overrides = {} - for config_name, c in spec['configurations'].iteritems(): + for config_name, c in spec['configurations'].items(): config_fullname = _ConfigFullName(config_name, c) platform = c.get('msvs_target_platform', _ConfigPlatform(c)) fixed_config_fullname = '%s|%s' % ( @@ -1967,7 +1967,7 @@ def PerformBuild(data, configurations, params): msvs_version = params['msvs_version'] devenv = os.path.join(msvs_version.path, 'Common7', 'IDE', 'devenv.com') - for build_file, build_file_dict in data.iteritems(): + for build_file, build_file_dict in data.items(): (build_file_root, build_file_ext) = os.path.splitext(build_file) if build_file_ext != '.gyp': continue @@ -1977,7 +1977,7 @@ def PerformBuild(data, configurations, params): for config in configurations: arguments = [devenv, sln_path, '/Build', config] - print 'Building [%s]: %s' % (config, arguments) + print('Building [%s]: %s' % (config, arguments)) rtn = subprocess.check_call(arguments) @@ -2029,7 +2029,7 @@ def GenerateOutput(target_list, target_dicts, data, params): configs = set() for qualified_target in target_list: spec = target_dicts[qualified_target] - for config_name, config in spec['configurations'].iteritems(): + for config_name, config in spec['configurations'].items(): configs.add(_ConfigFullName(config_name, config)) configs = list(configs) @@ -2072,7 +2072,7 @@ def GenerateOutput(target_list, target_dicts, data, params): if generator_flags.get('msvs_error_on_missing_sources', False): raise GypError(error_message) else: - print >> sys.stdout, "Warning: " + error_message + print("Warning: " + error_message, file=sys.stdout) def _GenerateMSBuildFiltersFile(filters_path, source_files, @@ -2676,7 +2676,7 @@ def _GetConfigurationCondition(name, settings): def _GetMSBuildProjectConfigurations(configurations): group = ['ItemGroup', {'Label': 'ProjectConfigurations'}] - for (name, settings) in sorted(configurations.iteritems()): + for (name, settings) in sorted(configurations.items()): configuration, platform = _GetConfigurationAndPlatform(name, settings) designation = '%s|%s' % (configuration, platform) group.append( @@ -2749,7 +2749,7 @@ def _GetMSBuildGlobalProperties(spec, version, guid, gyp_file_name): def _GetMSBuildConfigurationDetails(spec, build_file): properties = {} - for name, settings in spec['configurations'].iteritems(): + for name, settings in spec['configurations'].items(): msbuild_attributes = _GetMSBuildAttributes(spec, settings, build_file) condition = _GetConfigurationCondition(name, settings) character_set = msbuild_attributes.get('CharacterSet') @@ -2783,9 +2783,9 @@ def _GetMSBuildPropertySheets(configurations): user_props = r'$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props' additional_props = {} props_specified = False - for name, settings in sorted(configurations.iteritems()): + for name, settings in sorted(configurations.items()): configuration = _GetConfigurationCondition(name, settings) - if settings.has_key('msbuild_props'): + if 'msbuild_props' in settings: additional_props[configuration] = _FixPaths(settings['msbuild_props']) props_specified = True else: @@ -2805,7 +2805,7 @@ def _GetMSBuildPropertySheets(configurations): ] else: sheets = [] - for condition, props in additional_props.iteritems(): + for condition, props in additional_props.items(): import_group = [ 'ImportGroup', {'Label': 'PropertySheets', @@ -2838,7 +2838,7 @@ def _ConvertMSVSBuildAttributes(spec, config, build_file): elif a == 'ConfigurationType': msbuild_attributes[a] = _ConvertMSVSConfigurationType(msvs_attributes[a]) else: - print 'Warning: Do not know how to convert MSVS attribute ' + a + print('Warning: Do not know how to convert MSVS attribute ' + a) return msbuild_attributes @@ -2934,7 +2934,7 @@ def _GetMSBuildConfigurationGlobalProperties(spec, configurations, build_file): new_paths = '$(ExecutablePath);' + ';'.join(new_paths) properties = {} - for (name, configuration) in sorted(configurations.iteritems()): + for (name, configuration) in sorted(configurations.items()): condition = _GetConfigurationCondition(name, configuration) attributes = _GetMSBuildAttributes(spec, configuration, build_file) msbuild_settings = configuration['finalized_msbuild_settings'] @@ -2959,7 +2959,7 @@ def _GetMSBuildConfigurationGlobalProperties(spec, configurations, build_file): _AddConditionalProperty(properties, condition, 'ExecutablePath', new_paths) tool_settings = msbuild_settings.get('', {}) - for name, value in sorted(tool_settings.iteritems()): + for name, value in sorted(tool_settings.items()): formatted_value = _GetValueFormattedForMSBuild('', name, value) _AddConditionalProperty(properties, condition, name, formatted_value) return _GetMSBuildPropertyGroup(spec, None, properties) @@ -3028,7 +3028,7 @@ def GetEdges(node): # NOTE: reverse(topsort(DAG)) = topsort(reverse_edges(DAG)) for name in reversed(properties_ordered): values = properties[name] - for value, conditions in sorted(values.iteritems()): + for value, conditions in sorted(values.items()): if len(conditions) == num_configurations: # If the value is the same all configurations, # just add one unconditional entry. @@ -3041,18 +3041,18 @@ def GetEdges(node): def _GetMSBuildToolSettingsSections(spec, configurations): groups = [] - for (name, configuration) in sorted(configurations.iteritems()): + for (name, configuration) in sorted(configurations.items()): msbuild_settings = configuration['finalized_msbuild_settings'] group = ['ItemDefinitionGroup', {'Condition': _GetConfigurationCondition(name, configuration)} ] - for tool_name, tool_settings in sorted(msbuild_settings.iteritems()): + for tool_name, tool_settings in sorted(msbuild_settings.items()): # Skip the tool named '' which is a holder of global settings handled # by _GetMSBuildConfigurationGlobalProperties. if tool_name: if tool_settings: tool = [tool_name] - for name, value in sorted(tool_settings.iteritems()): + for name, value in sorted(tool_settings.items()): formatted_value = _GetValueFormattedForMSBuild(tool_name, name, value) tool.append([name, formatted_value]) @@ -3085,8 +3085,8 @@ def _FinalizeMSBuildSettings(spec, configuration): for ignored_setting in ignored_settings: value = configuration.get(ignored_setting) if value: - print ('Warning: The automatic conversion to MSBuild does not handle ' - '%s. Ignoring setting of %s' % (ignored_setting, str(value))) + print('Warning: The automatic conversion to MSBuild does not handle ' + '%s. Ignoring setting of %s' % (ignored_setting, str(value))) defines = [_EscapeCppDefineForMSBuild(d) for d in defines] disabled_warnings = _GetDisabledWarnings(configuration) @@ -3252,7 +3252,7 @@ def _AddSources2(spec, sources, exclusions, grouped_sources, {'Condition': condition}, 'true']) # Add precompile if needed - for config_name, configuration in spec['configurations'].iteritems(): + for config_name, configuration in spec['configurations'].items(): precompiled_source = configuration.get('msvs_precompiled_source', '') if precompiled_source != '': precompiled_source = _FixPath(precompiled_source) @@ -3502,7 +3502,7 @@ def _GenerateActionsForMSBuild(spec, actions_to_add): """ sources_handled_by_action = OrderedSet() actions_spec = [] - for primary_input, actions in actions_to_add.iteritems(): + for primary_input, actions in actions_to_add.items(): inputs = OrderedSet() outputs = OrderedSet() descriptions = [] diff --git a/tools/gyp/pylib/gyp/generator/ninja.py b/tools/gyp/pylib/gyp/generator/ninja.py index 6140df9513096c..3658fb6be79799 100644 --- a/tools/gyp/pylib/gyp/generator/ninja.py +++ b/tools/gyp/pylib/gyp/generator/ninja.py @@ -2,6 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +from __future__ import print_function + import collections import copy import hashlib @@ -455,8 +457,8 @@ def WriteSpec(self, spec, config_name, generator_flags): try: sources = extra_sources + spec.get('sources', []) except TypeError: - print 'extra_sources: ', str(extra_sources) - print 'spec.get("sources"): ', str(spec.get('sources')) + print('extra_sources: ', str(extra_sources)) + print('spec.get("sources"): ', str(spec.get('sources'))) raise if sources: if self.flavor == 'mac' and len(self.archs) > 1: @@ -485,8 +487,8 @@ def WriteSpec(self, spec, config_name, generator_flags): if self.flavor != 'mac' or len(self.archs) == 1: link_deps += [self.GypPathToNinja(o) for o in obj_outputs] else: - print "Warning: Actions/rules writing object files don't work with " \ - "multiarch targets, dropping. (target %s)" % spec['target_name'] + print("Warning: Actions/rules writing object files don't work with " + "multiarch targets, dropping. (target %s)" % spec['target_name']) elif self.flavor == 'mac' and len(self.archs) > 1: link_deps = collections.defaultdict(list) @@ -838,7 +840,7 @@ def WriteMacXCassets(self, xcassets, bundle_depends): 'XCASSETS_LAUNCH_IMAGE': 'launch-image', } settings = self.xcode_settings.xcode_settings[self.config_name] - for settings_key, arg_name in settings_to_arg.iteritems(): + for settings_key, arg_name in settings_to_arg.items(): value = settings.get(settings_key) if value: extra_arguments[arg_name] = value @@ -1947,7 +1949,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params, wrappers[key[:-len('_wrapper')]] = os.path.join(build_to_root, value) # Support wrappers from environment variables too. - for key, value in os.environ.iteritems(): + for key, value in os.environ.items(): if key.lower().endswith('_wrapper'): key_prefix = key[:-len('_wrapper')] key_prefix = re.sub(r'\.HOST$', '.host', key_prefix) @@ -1967,7 +1969,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params, configs, generator_flags) cl_paths = gyp.msvs_emulation.GenerateEnvironmentFiles( toplevel_build, generator_flags, shared_system_includes, OpenOutput) - for arch, path in sorted(cl_paths.iteritems()): + for arch, path in sorted(cl_paths.items()): if clang_cl: # If we have selected clang-cl, use that instead. path = clang_cl @@ -2442,7 +2444,7 @@ def PerformBuild(data, configurations, params): for config in configurations: builddir = os.path.join(options.toplevel_dir, 'out', config) arguments = ['ninja', '-C', builddir] - print 'Building [%s]: %s' % (config, arguments) + print('Building [%s]: %s' % (config, arguments)) subprocess.check_call(arguments) @@ -2479,7 +2481,7 @@ def GenerateOutput(target_list, target_dicts, data, params): arglists.append( (target_list, target_dicts, data, params, config_name)) pool.map(CallGenerateOutputForConfig, arglists) - except KeyboardInterrupt, e: + except KeyboardInterrupt as e: pool.terminate() raise e else: diff --git a/tools/gyp/pylib/gyp/generator/xcode.py b/tools/gyp/pylib/gyp/generator/xcode.py index db99d6ab81ed5c..8d65e53cca82db 100644 --- a/tools/gyp/pylib/gyp/generator/xcode.py +++ b/tools/gyp/pylib/gyp/generator/xcode.py @@ -2,6 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +from __future__ import print_function + import filecmp import gyp.common import gyp.xcodeproj_file @@ -129,7 +131,7 @@ def __init__(self, gyp_path, path, build_file_dict): try: os.makedirs(self.path) self.created_dir = True - except OSError, e: + except OSError as e: if e.errno != errno.EEXIST: raise @@ -183,7 +185,7 @@ def Finalize1(self, xcode_targets, serialize_all_tests): # the tree tree view for UI display. # Any values set globally are applied to all configurations, then any # per-configuration values are applied. - for xck, xcv in self.build_file_dict.get('xcode_settings', {}).iteritems(): + for xck, xcv in self.build_file_dict.get('xcode_settings', {}).items(): xccl.SetBuildSetting(xck, xcv) if 'xcode_config_file' in self.build_file_dict: config_ref = self.project.AddOrGetFileInRootGroup( @@ -197,7 +199,7 @@ def Finalize1(self, xcode_targets, serialize_all_tests): if build_file_configuration_named: xcc = xccl.ConfigurationNamed(config_name) for xck, xcv in build_file_configuration_named.get('xcode_settings', - {}).iteritems(): + {}).items(): xcc.SetBuildSetting(xck, xcv) if 'xcode_config_file' in build_file_configuration_named: config_ref = self.project.AddOrGetFileInRootGroup( @@ -273,7 +275,7 @@ def Finalize1(self, xcode_targets, serialize_all_tests): script = script + "\n".join( ['export %s="%s"' % (key, gyp.xcodeproj_file.ConvertVariablesToShellSyntax(val)) - for (key, val) in command.get('environment').iteritems()]) + "\n" + for (key, val) in command.get('environment').items()]) + "\n" # Some test end up using sockets, files on disk, etc. and can get # confused if more then one test runs at a time. The generator @@ -454,7 +456,7 @@ def Write(self): same = False try: same = filecmp.cmp(pbxproj_path, new_pbxproj_path, False) - except OSError, e: + except OSError as e: if e.errno != errno.ENOENT: raise @@ -473,10 +475,10 @@ def Write(self): # # No way to get the umask without setting a new one? Set a safe one # and then set it back to the old value. - umask = os.umask(077) + umask = os.umask(0o77) os.umask(umask) - os.chmod(new_pbxproj_path, 0666 & ~umask) + os.chmod(new_pbxproj_path, 0o666 & ~umask) os.rename(new_pbxproj_path, pbxproj_path) except Exception: @@ -566,7 +568,7 @@ def EscapeXcodeDefine(s): def PerformBuild(data, configurations, params): options = params['options'] - for build_file, build_file_dict in data.iteritems(): + for build_file, build_file_dict in data.items(): (build_file_root, build_file_ext) = os.path.splitext(build_file) if build_file_ext != '.gyp': continue @@ -577,7 +579,7 @@ def PerformBuild(data, configurations, params): for config in configurations: arguments = ['xcodebuild', '-project', xcodeproj_path] arguments += ['-configuration', config] - print "Building [%s]: %s" % (config, arguments) + print("Building [%s]: %s" % (config, arguments)) subprocess.check_call(arguments) @@ -625,7 +627,7 @@ def GenerateOutput(target_list, target_dicts, data, params): skip_excluded_files = \ not generator_flags.get('xcode_list_excluded_files', True) xcode_projects = {} - for build_file, build_file_dict in data.iteritems(): + for build_file, build_file_dict in data.items(): (build_file_root, build_file_ext) = os.path.splitext(build_file) if build_file_ext != '.gyp': continue @@ -744,7 +746,7 @@ def GenerateOutput(target_list, target_dicts, data, params): xctarget_type = gyp.xcodeproj_file.PBXNativeTarget try: target_properties['productType'] = _types[type_bundle_key] - except KeyError, e: + except KeyError as e: gyp.common.ExceptionAppend(e, "-- unknown product type while " "writing target %s" % target_name) raise @@ -1024,7 +1026,7 @@ def GenerateOutput(target_list, target_dicts, data, params): # target. makefile.write('all: \\\n') for concrete_output_index in \ - xrange(0, len(concrete_outputs_by_rule_source)): + range(0, len(concrete_outputs_by_rule_source)): # Only list the first (index [0]) concrete output of each input # in the "all" target. Otherwise, a parallel make (-j > 1) would # attempt to process each input multiple times simultaneously. @@ -1047,7 +1049,7 @@ def GenerateOutput(target_list, target_dicts, data, params): # rule source. Collect the names of the directories that are # required. concrete_output_dirs = [] - for concrete_output_index in xrange(0, len(concrete_outputs)): + for concrete_output_index in range(0, len(concrete_outputs)): concrete_output = concrete_outputs[concrete_output_index] if concrete_output_index == 0: bol = '' @@ -1066,7 +1068,7 @@ def GenerateOutput(target_list, target_dicts, data, params): # the set of additional rule inputs, if any. prerequisites = [rule_source] prerequisites.extend(rule.get('inputs', [])) - for prerequisite_index in xrange(0, len(prerequisites)): + for prerequisite_index in range(0, len(prerequisites)): prerequisite = prerequisites[prerequisite_index] if prerequisite_index == len(prerequisites) - 1: eol = '' @@ -1288,7 +1290,7 @@ def GenerateOutput(target_list, target_dicts, data, params): set_define = EscapeXcodeDefine(define) xcbc.AppendBuildSetting('GCC_PREPROCESSOR_DEFINITIONS', set_define) if 'xcode_settings' in configuration: - for xck, xcv in configuration['xcode_settings'].iteritems(): + for xck, xcv in configuration['xcode_settings'].items(): xcbc.SetBuildSetting(xck, xcv) if 'xcode_config_file' in configuration: config_ref = pbxp.AddOrGetFileInRootGroup( @@ -1296,7 +1298,7 @@ def GenerateOutput(target_list, target_dicts, data, params): xcbc.SetBaseConfiguration(config_ref) build_files = [] - for build_file, build_file_dict in data.iteritems(): + for build_file, build_file_dict in data.items(): if build_file.endswith('.gyp'): build_files.append(build_file) diff --git a/tools/gyp/pylib/gyp/input_test.py b/tools/gyp/pylib/gyp/input_test.py index 4234fbb8302eb9..1bc5e3d3081ea6 100755 --- a/tools/gyp/pylib/gyp/input_test.py +++ b/tools/gyp/pylib/gyp/input_test.py @@ -22,38 +22,38 @@ def _create_dependency(self, dependent, dependency): dependency.dependents.append(dependent) def test_no_cycle_empty_graph(self): - for label, node in self.nodes.iteritems(): - self.assertEquals([], node.FindCycles()) + for label, node in self.nodes.items(): + self.assertEqual([], node.FindCycles()) def test_no_cycle_line(self): self._create_dependency(self.nodes['a'], self.nodes['b']) self._create_dependency(self.nodes['b'], self.nodes['c']) self._create_dependency(self.nodes['c'], self.nodes['d']) - for label, node in self.nodes.iteritems(): - self.assertEquals([], node.FindCycles()) + for label, node in self.nodes.items(): + self.assertEqual([], node.FindCycles()) def test_no_cycle_dag(self): self._create_dependency(self.nodes['a'], self.nodes['b']) self._create_dependency(self.nodes['a'], self.nodes['c']) self._create_dependency(self.nodes['b'], self.nodes['c']) - for label, node in self.nodes.iteritems(): - self.assertEquals([], node.FindCycles()) + for label, node in self.nodes.items(): + self.assertEqual([], node.FindCycles()) def test_cycle_self_reference(self): self._create_dependency(self.nodes['a'], self.nodes['a']) - self.assertEquals([[self.nodes['a'], self.nodes['a']]], + self.assertEqual([[self.nodes['a'], self.nodes['a']]], self.nodes['a'].FindCycles()) def test_cycle_two_nodes(self): self._create_dependency(self.nodes['a'], self.nodes['b']) self._create_dependency(self.nodes['b'], self.nodes['a']) - self.assertEquals([[self.nodes['a'], self.nodes['b'], self.nodes['a']]], + self.assertEqual([[self.nodes['a'], self.nodes['b'], self.nodes['a']]], self.nodes['a'].FindCycles()) - self.assertEquals([[self.nodes['b'], self.nodes['a'], self.nodes['b']]], + self.assertEqual([[self.nodes['b'], self.nodes['a'], self.nodes['b']]], self.nodes['b'].FindCycles()) def test_two_cycles(self): @@ -68,7 +68,7 @@ def test_two_cycles(self): [self.nodes['a'], self.nodes['b'], self.nodes['a']] in cycles) self.assertTrue( [self.nodes['b'], self.nodes['c'], self.nodes['b']] in cycles) - self.assertEquals(2, len(cycles)) + self.assertEqual(2, len(cycles)) def test_big_cycle(self): self._create_dependency(self.nodes['a'], self.nodes['b']) @@ -77,7 +77,7 @@ def test_big_cycle(self): self._create_dependency(self.nodes['d'], self.nodes['e']) self._create_dependency(self.nodes['e'], self.nodes['a']) - self.assertEquals([[self.nodes['a'], + self.assertEqual([[self.nodes['a'], self.nodes['b'], self.nodes['c'], self.nodes['d'], diff --git a/tools/gyp/pylib/gyp/mac_tool.py b/tools/gyp/pylib/gyp/mac_tool.py index 0ad7e7a1b66b8a..ec22d260d1580a 100755 --- a/tools/gyp/pylib/gyp/mac_tool.py +++ b/tools/gyp/pylib/gyp/mac_tool.py @@ -8,6 +8,8 @@ These functions are executed via gyp-mac-tool when using the Makefile generator. """ +from __future__ import print_function + import fcntl import fnmatch import glob @@ -151,7 +153,7 @@ def _DetectInputEncoding(self, file_name): fp = open(file_name, 'rb') try: header = fp.read(3) - except: + except Exception: fp.close() return None fp.close() @@ -270,7 +272,7 @@ def ExecFilterLibtool(self, *cmd_list): _, err = libtoolout.communicate() for line in err.splitlines(): if not libtool_re.match(line) and not libtool_re5.match(line): - print >>sys.stderr, line + print(line, file=sys.stderr) # Unconditionally touch the output .a file on the command line if present # and the command succeeded. A bit hacky. if not libtoolout.returncode: @@ -385,7 +387,7 @@ def ExecCompileXcassets(self, keys, *inputs): ]) if keys: keys = json.loads(keys) - for key, value in keys.iteritems(): + for key, value in keys.items(): arg_name = '--' + key if isinstance(value, bool): if value: @@ -480,8 +482,8 @@ def _FindProvisioningProfile(self, profile, bundle_identifier): profiles_dir = os.path.join( os.environ['HOME'], 'Library', 'MobileDevice', 'Provisioning Profiles') if not os.path.isdir(profiles_dir): - print >>sys.stderr, ( - 'cannot find mobile provisioning for %s' % bundle_identifier) + print('cannot find mobile provisioning for %s' % bundle_identifier, + file=sys.stderr) sys.exit(1) provisioning_profiles = None if profile: @@ -502,8 +504,8 @@ def _FindProvisioningProfile(self, profile, bundle_identifier): valid_provisioning_profiles[app_id_pattern] = ( profile_path, profile_data, team_identifier) if not valid_provisioning_profiles: - print >>sys.stderr, ( - 'cannot find mobile provisioning for %s' % bundle_identifier) + print('cannot find mobile provisioning for %s' % bundle_identifier, + file=sys.stderr) sys.exit(1) # If the user has multiple provisioning profiles installed that can be # used for ${bundle_identifier}, pick the most specific one (ie. the @@ -527,7 +529,7 @@ def _LoadProvisioningProfile(self, profile_path): def _MergePlist(self, merged_plist, plist): """Merge |plist| into |merged_plist|.""" - for key, value in plist.iteritems(): + for key, value in plist.items(): if isinstance(value, dict): merged_value = merged_plist.get(key, {}) if isinstance(merged_value, dict): @@ -637,7 +639,7 @@ def _ExpandVariables(self, data, substitutions): the key was not found. """ if isinstance(data, str): - for key, value in substitutions.iteritems(): + for key, value in substitutions.items(): data = data.replace('$(%s)' % key, value) return data if isinstance(data, list): diff --git a/tools/gyp/pylib/gyp/msvs_emulation.py b/tools/gyp/pylib/gyp/msvs_emulation.py index 4acaee24469594..e130b53271c73e 100644 --- a/tools/gyp/pylib/gyp/msvs_emulation.py +++ b/tools/gyp/pylib/gyp/msvs_emulation.py @@ -209,7 +209,7 @@ def __init__(self, spec, generator_flags): configs = spec['configurations'] for field, default in supported_fields: setattr(self, field, {}) - for configname, config in configs.iteritems(): + for configname, config in configs.items(): getattr(self, field)[configname] = config.get(field, default()) self.msvs_cygwin_dirs = spec.get('msvs_cygwin_dirs', ['.']) @@ -953,7 +953,7 @@ def ExpandMacros(string, expansions): """Expand $(Variable) per expansions dict. See MsvsSettings.GetVSMacroEnv for the canonical way to retrieve a suitable dict.""" if '$' in string: - for old, new in expansions.iteritems(): + for old, new in expansions.items(): assert '$(' not in new, new string = string.replace(old, new) return string @@ -1001,7 +1001,7 @@ def _FormatAsEnvironmentBlock(envvar_dict): CreateProcess documentation for more details.""" block = '' nul = '\0' - for key, value in envvar_dict.iteritems(): + for key, value in envvar_dict.items(): block += key + '=' + value + nul block += nul return block diff --git a/tools/gyp/pylib/gyp/ordered_dict.py b/tools/gyp/pylib/gyp/ordered_dict.py index a1e89f9199087d..6fe9c1f6c7c22b 100644 --- a/tools/gyp/pylib/gyp/ordered_dict.py +++ b/tools/gyp/pylib/gyp/ordered_dict.py @@ -161,8 +161,8 @@ def itervalues(self): for k in self: yield self[k] - def iteritems(self): - 'od.iteritems -> an iterator over the (key, value) items in od' + def items(self): + 'od.items -> an iterator over the (key, value) items in od' for k in self: yield (k, self[k]) diff --git a/tools/gyp/pylib/gyp/simple_copy.py b/tools/gyp/pylib/gyp/simple_copy.py index 74c98c5a79594b..94a6f17dab5d1c 100644 --- a/tools/gyp/pylib/gyp/simple_copy.py +++ b/tools/gyp/pylib/gyp/simple_copy.py @@ -28,8 +28,12 @@ def deepcopy(x): def _deepcopy_atomic(x): return x -for x in (type(None), int, long, float, - bool, str, unicode, type): +try: + types = bool, float, int, str, type, type(None), long, unicode +except NameError: # Python 3 + types = bool, float, int, str, type, type(None) + +for x in types: d[x] = _deepcopy_atomic def _deepcopy_list(x): @@ -38,7 +42,7 @@ def _deepcopy_list(x): def _deepcopy_dict(x): y = {} - for key, value in x.iteritems(): + for key, value in x.items(): y[deepcopy(key)] = deepcopy(value) return y d[dict] = _deepcopy_dict diff --git a/tools/gyp/pylib/gyp/win_tool.py b/tools/gyp/pylib/gyp/win_tool.py index 1c843a0b6cf528..ab6db1c4e047fb 100755 --- a/tools/gyp/pylib/gyp/win_tool.py +++ b/tools/gyp/pylib/gyp/win_tool.py @@ -9,6 +9,8 @@ These functions are executed via gyp-win-tool when using the ninja generator. """ +from __future__ import print_function + import os import re import shutil @@ -134,7 +136,7 @@ def ExecLinkWrapper(self, arch, use_separate_mspdbsrv, *args): if (not line.startswith(' Creating library ') and not line.startswith('Generating code') and not line.startswith('Finished generating code')): - print line + print(line) return link.returncode def ExecLinkWithManifests(self, arch, embed_manifest, out, ldcmd, resname, @@ -223,7 +225,7 @@ def ExecManifestWrapper(self, arch, *args): out, _ = popen.communicate() for line in out.splitlines(): if line and 'manifest authoring warning 81010002' not in line: - print line + print(line) return popen.returncode def ExecManifestToRc(self, arch, *args): @@ -263,7 +265,7 @@ def ExecMidlWrapper(self, arch, outdir, tlb, h, dlldata, iid, proxy, idl, for x in lines if x.startswith(prefixes)) for line in lines: if not line.startswith(prefixes) and line not in processing: - print line + print(line) return popen.returncode def ExecAsmWrapper(self, arch, *args): @@ -277,7 +279,7 @@ def ExecAsmWrapper(self, arch, *args): not line.startswith('Microsoft (R) Macro Assembler') and not line.startswith(' Assembling: ') and line): - print line + print(line) return popen.returncode def ExecRcWrapper(self, arch, *args): @@ -291,7 +293,7 @@ def ExecRcWrapper(self, arch, *args): if (not line.startswith('Microsoft (R) Windows (R) Resource Compiler') and not line.startswith('Copyright (C) Microsoft Corporation') and line): - print line + print(line) return popen.returncode def ExecActionWrapper(self, arch, rspfile, *dir): @@ -300,7 +302,7 @@ def ExecActionWrapper(self, arch, rspfile, *dir): env = self._GetEnv(arch) # TODO(scottmg): This is a temporary hack to get some specific variables # through to actions that are set after gyp-time. http://crbug.com/333738. - for k, v in os.environ.iteritems(): + for k, v in os.environ.items(): if k not in env: env[k] = v args = open(rspfile).read() diff --git a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py index 9481423228ab47..b083984677faff 100644 --- a/tools/gyp/pylib/gyp/xcode_emulation.py +++ b/tools/gyp/pylib/gyp/xcode_emulation.py @@ -7,6 +7,8 @@ other build systems, such as make and ninja. """ +from __future__ import print_function + import copy import gyp.common import os @@ -73,7 +75,7 @@ def _ExpandArchs(self, archs, sdkroot): if arch not in expanded_archs: expanded_archs.append(arch) except KeyError as e: - print 'Warning: Ignoring unsupported variable "%s".' % variable + print('Warning: Ignoring unsupported variable "%s".' % variable) elif arch not in expanded_archs: expanded_archs.append(arch) return expanded_archs @@ -171,7 +173,7 @@ def __init__(self, spec): # the same for all configs are implicitly per-target settings. self.xcode_settings = {} configs = spec['configurations'] - for configname, config in configs.iteritems(): + for configname, config in configs.items(): self.xcode_settings[configname] = config.get('xcode_settings', {}) self._ConvertConditionalKeys(configname) if self.xcode_settings[configname].get('IPHONEOS_DEPLOYMENT_TARGET', @@ -197,8 +199,8 @@ def _ConvertConditionalKeys(self, configname): new_key = key.split("[")[0] settings[new_key] = settings[key] else: - print 'Warning: Conditional keys not implemented, ignoring:', \ - ' '.join(conditional_keys) + print('Warning: Conditional keys not implemented, ignoring:', + ' '.join(conditional_keys)) del settings[key] def _Settings(self): @@ -216,7 +218,7 @@ def _Appendf(self, lst, test_key, format_str, default=None): def _WarnUnimplemented(self, test_key): if test_key in self._Settings(): - print 'Warning: Ignoring not yet implemented key "%s".' % test_key + print('Warning: Ignoring not yet implemented key "%s".' % test_key) def IsBinaryOutputFormat(self, configname): default = "binary" if self.isIOS else "xml" @@ -646,9 +648,9 @@ def GetCflags(self, configname, arch=None): cflags += self._Settings().get('WARNING_CFLAGS', []) if self._IsXCTest(): - platform_root = self._XcodePlatformPath(configname) - if platform_root: - cflags.append('-F' + platform_root + '/Developer/Library/Frameworks/') + platform_root = self._XcodePlatformPath(configname) + if platform_root: + cflags.append('-F' + platform_root + '/Developer/Library/Frameworks/') if sdk_root: framework_root = sdk_root @@ -915,10 +917,10 @@ def GetLdflags(self, configname, product_dir, gyp_to_build_path, arch=None): ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root)) if self._IsXCTest(): - platform_root = self._XcodePlatformPath(configname) - if sdk_root and platform_root: - ldflags.append('-F' + platform_root + '/Developer/Library/Frameworks/') - ldflags.append('-framework XCTest') + platform_root = self._XcodePlatformPath(configname) + if sdk_root and platform_root: + ldflags.append('-F' + platform_root + '/Developer/Library/Frameworks/') + ldflags.append('-framework XCTest') is_extension = self._IsIosAppExtension() or self._IsIosWatchKitExtension() if sdk_root and is_extension: @@ -965,7 +967,7 @@ def GetPerTargetSettings(self): result = dict(self.xcode_settings[configname]) first_pass = False else: - for key, value in self.xcode_settings[configname].iteritems(): + for key, value in self.xcode_settings[configname].items(): if key not in result: continue elif result[key] != value: @@ -1086,8 +1088,8 @@ def _GetIOSPostbuilds(self, configname, output_binary): unimpl = ['OTHER_CODE_SIGN_FLAGS'] unimpl = set(unimpl) & set(self.xcode_settings[configname].keys()) if unimpl: - print 'Warning: Some codesign keys not implemented, ignoring: %s' % ( - ', '.join(sorted(unimpl))) + print('Warning: Some codesign keys not implemented, ignoring: %s' % + ', '.join(sorted(unimpl))) if self._IsXCTest(): # For device xctests, Xcode copies two extra frameworks into $TEST_HOST. @@ -1753,7 +1755,7 @@ def GetEdges(node): order = gyp.common.TopologicallySorted(env.keys(), GetEdges) order.reverse() return order - except gyp.common.CycleError, e: + except gyp.common.CycleError as e: raise GypError( 'Xcode environment variables are cyclically dependent: ' + str(e.nodes)) @@ -1793,7 +1795,7 @@ def _AddIOSDeviceConfigurations(targets): for target_dict in targets.itervalues(): toolset = target_dict['toolset'] configs = target_dict['configurations'] - for config_name, simulator_config_dict in dict(configs).iteritems(): + for config_name, simulator_config_dict in dict(configs).items(): iphoneos_config_dict = copy.deepcopy(simulator_config_dict) configs[config_name + '-iphoneos'] = iphoneos_config_dict configs[config_name + '-iphonesimulator'] = simulator_config_dict diff --git a/tools/gyp/pylib/gyp/xcode_ninja.py b/tools/gyp/pylib/gyp/xcode_ninja.py index bc76ffff4e9b58..5bf6b9cfb5a0bd 100644 --- a/tools/gyp/pylib/gyp/xcode_ninja.py +++ b/tools/gyp/pylib/gyp/xcode_ninja.py @@ -28,7 +28,7 @@ def _WriteWorkspace(main_gyp, sources_gyp, params): workspace_path = os.path.join(options.generator_output, workspace_path) try: os.makedirs(workspace_path) - except OSError, e: + except OSError as e: if e.errno != errno.EEXIST: raise output_string = '\n' + \ @@ -167,7 +167,7 @@ def CreateWrapper(target_list, target_dicts, data, params): params: Dict of global options for gyp. """ orig_gyp = params['build_files'][0] - for gyp_name, gyp_dict in data.iteritems(): + for gyp_name, gyp_dict in data.items(): if gyp_name == orig_gyp: depth = gyp_dict['_DEPTH'] @@ -238,7 +238,7 @@ def CreateWrapper(target_list, target_dicts, data, params): not generator_flags.get('xcode_ninja_list_excluded_files', True) sources = [] - for target, target_dict in target_dicts.iteritems(): + for target, target_dict in target_dicts.items(): base = os.path.dirname(target) files = target_dict.get('sources', []) + \ target_dict.get('mac_bundle_resources', []) diff --git a/tools/gyp/pylib/gyp/xcodeproj_file.py b/tools/gyp/pylib/gyp/xcodeproj_file.py index e69235f7241ffe..021ed4309db298 100644 --- a/tools/gyp/pylib/gyp/xcodeproj_file.py +++ b/tools/gyp/pylib/gyp/xcodeproj_file.py @@ -138,21 +138,18 @@ """ import gyp.common +import hashlib import posixpath import re import struct import sys -# hashlib is supplied as of Python 2.5 as the replacement interface for sha -# and other secure hashes. In 2.6, sha is deprecated. Import hashlib if -# available, avoiding a deprecation warning under 2.6. Import sha otherwise, -# preserving 2.4 compatibility. try: - import hashlib - _new_sha1 = hashlib.sha1 -except ImportError: - import sha - _new_sha1 = sha.new + basestring, cmp, unicode +except NameError: # Python 3 + basestring = unicode = str + def cmp(x, y): + return (x > y) - (x < y) # See XCObject._EncodeString. This pattern is used to determine when a string @@ -314,7 +311,7 @@ def Copy(self): """ that = self.__class__(id=self.id, parent=self.parent) - for key, value in self._properties.iteritems(): + for key, value in self._properties.items(): is_strong = self._schema[key][2] if isinstance(value, XCObject): @@ -324,8 +321,7 @@ def Copy(self): that._properties[key] = new_value else: that._properties[key] = value - elif isinstance(value, str) or isinstance(value, unicode) or \ - isinstance(value, int): + elif isinstance(value, (basestring, int)): that._properties[key] = value elif isinstance(value, list): if is_strong: @@ -422,7 +418,7 @@ def _HashUpdate(hash, data): hash.update(data) if seed_hash is None: - seed_hash = _new_sha1() + seed_hash = hashlib.sha1() hash = seed_hash.copy() @@ -452,7 +448,7 @@ def _HashUpdate(hash, data): digest_int_count = hash.digest_size / 4 digest_ints = struct.unpack('>' + 'I' * digest_int_count, hash.digest()) id_ints = [0, 0, 0] - for index in xrange(0, digest_int_count): + for index in range(0, digest_int_count): id_ints[index % 3] ^= digest_ints[index] self.id = '%08X%08X%08X' % tuple(id_ints) @@ -475,7 +471,7 @@ def Children(self): """Returns a list of all of this object's owned (strong) children.""" children = [] - for property, attributes in self._schema.iteritems(): + for property, attributes in self._schema.items(): (is_list, property_type, is_strong) = attributes[0:3] if is_strong and property in self._properties: if not is_list: @@ -622,7 +618,7 @@ def _XCPrintableValue(self, tabs, value, flatten_list=False): printable += end_tabs + ')' elif isinstance(value, dict): printable = '{' + sep - for item_key, item_value in sorted(value.iteritems()): + for item_key, item_value in sorted(value.items()): printable += element_tabs + \ self._XCPrintableValue(tabs + 1, item_key, flatten_list) + ' = ' + \ self._XCPrintableValue(tabs + 1, item_value, flatten_list) + ';' + \ @@ -691,7 +687,7 @@ def _XCKVPrint(self, file, tabs, key, value): printable_value[0] == '"' and printable_value[-1] == '"': printable_value = printable_value[1:-1] printable += printable_key + ' = ' + printable_value + ';' + after_kv - except TypeError, e: + except TypeError as e: gyp.common.ExceptionAppend(e, 'while printing key "%s"' % key) raise @@ -730,7 +726,7 @@ def Print(self, file=sys.stdout): self._XCKVPrint(file, 3, 'isa', self.__class__.__name__) # The remaining elements of an object dictionary are sorted alphabetically. - for property, value in sorted(self._properties.iteritems()): + for property, value in sorted(self._properties.items()): self._XCKVPrint(file, 3, property, value) # End the object. @@ -752,7 +748,7 @@ def UpdateProperties(self, properties, do_copy=False): if properties is None: return - for property, value in properties.iteritems(): + for property, value in properties.items(): # Make sure the property is in the schema. if not property in self._schema: raise KeyError(property + ' not in ' + self.__class__.__name__) @@ -788,8 +784,7 @@ def UpdateProperties(self, properties, do_copy=False): self._properties[property] = value.Copy() else: self._properties[property] = value - elif isinstance(value, str) or isinstance(value, unicode) or \ - isinstance(value, int): + elif isinstance(value, (basestring, int)): self._properties[property] = value elif isinstance(value, list): if is_strong: @@ -865,7 +860,7 @@ def VerifyHasRequiredProperties(self): # TODO(mark): A stronger verification mechanism is needed. Some # subclasses need to perform validation beyond what the schema can enforce. - for property, attributes in self._schema.iteritems(): + for property, attributes in self._schema.items(): (is_list, property_type, is_strong, is_required) = attributes[0:4] if is_required and not property in self._properties: raise KeyError(self.__class__.__name__ + ' requires ' + property) @@ -875,7 +870,7 @@ def _SetDefaultsFromSchema(self): overwrite properties that have already been set.""" defaults = {} - for property, attributes in self._schema.iteritems(): + for property, attributes in self._schema.items(): (is_list, property_type, is_strong, is_required) = attributes[0:4] if is_required and len(attributes) >= 5 and \ not property in self._properties: @@ -1426,7 +1421,7 @@ def PathHashables(self): xche = self while xche != None and isinstance(xche, XCHierarchicalElement): xche_hashables = xche.Hashables() - for index in xrange(0, len(xche_hashables)): + for index in range(0, len(xche_hashables)): hashables.insert(index, xche_hashables[index]) xche = xche.parent return hashables @@ -2468,7 +2463,7 @@ def HeadersPhase(self): # The headers phase should come before the resources, sources, and # frameworks phases, if any. insert_at = len(self._properties['buildPhases']) - for index in xrange(0, len(self._properties['buildPhases'])): + for index in range(0, len(self._properties['buildPhases'])): phase = self._properties['buildPhases'][index] if isinstance(phase, PBXResourcesBuildPhase) or \ isinstance(phase, PBXSourcesBuildPhase) or \ @@ -2489,7 +2484,7 @@ def ResourcesPhase(self): # The resources phase should come before the sources and frameworks # phases, if any. insert_at = len(self._properties['buildPhases']) - for index in xrange(0, len(self._properties['buildPhases'])): + for index in range(0, len(self._properties['buildPhases'])): phase = self._properties['buildPhases'][index] if isinstance(phase, PBXSourcesBuildPhase) or \ isinstance(phase, PBXFrameworksBuildPhase): @@ -2911,7 +2906,7 @@ def CompareProducts(x, y, remote_products): # determine the sort order. return cmp(x_index, y_index) - for other_pbxproject, ref_dict in self._other_pbxprojects.iteritems(): + for other_pbxproject, ref_dict in self._other_pbxprojects.items(): # Build up a list of products in the remote project file, ordered the # same as the targets that produce them. remote_products = [] @@ -2956,7 +2951,7 @@ def Print(self, file=sys.stdout): self._XCPrint(file, 0, '{ ') else: self._XCPrint(file, 0, '{\n') - for property, value in sorted(self._properties.iteritems(), + for property, value in sorted(self._properties.items(), cmp=lambda x, y: cmp(x, y)): if property == 'objects': self._PrintObjects(file) diff --git a/tools/gyp/tools/graphviz.py b/tools/gyp/tools/graphviz.py index 326ae221cf8e82..538b059da4a7e6 100755 --- a/tools/gyp/tools/graphviz.py +++ b/tools/gyp/tools/graphviz.py @@ -8,6 +8,8 @@ generate input suitable for graphviz to render a dependency graph of targets.""" +from __future__ import print_function + import collections import json import sys @@ -50,9 +52,9 @@ def WriteGraph(edges): build_file, target_name, toolset = ParseTarget(src) files[build_file].append(src) - print 'digraph D {' - print ' fontsize=8' # Used by subgraphs. - print ' node [fontsize=8]' + print('digraph D {') + print(' fontsize=8') # Used by subgraphs. + print(' node [fontsize=8]') # Output nodes by file. We must first write out each node within # its file grouping before writing out any edges that may refer @@ -63,31 +65,31 @@ def WriteGraph(edges): # the display by making it a box without an internal node. target = targets[0] build_file, target_name, toolset = ParseTarget(target) - print ' "%s" [shape=box, label="%s\\n%s"]' % (target, filename, - target_name) + print(' "%s" [shape=box, label="%s\\n%s"]' % (target, filename, + target_name)) else: # Group multiple nodes together in a subgraph. - print ' subgraph "cluster_%s" {' % filename - print ' label = "%s"' % filename + print(' subgraph "cluster_%s" {' % filename) + print(' label = "%s"' % filename) for target in targets: build_file, target_name, toolset = ParseTarget(target) - print ' "%s" [label="%s"]' % (target, target_name) - print ' }' + print(' "%s" [label="%s"]' % (target, target_name)) + print(' }') # Now that we've placed all the nodes within subgraphs, output all # the edges between nodes. for src, dsts in edges.items(): for dst in dsts: - print ' "%s" -> "%s"' % (src, dst) + print(' "%s" -> "%s"' % (src, dst)) - print '}' + print('}') def main(): if len(sys.argv) < 2: - print >>sys.stderr, __doc__ - print >>sys.stderr - print >>sys.stderr, 'usage: %s target1 target2...' % (sys.argv[0]) + print(__doc__, file=sys.stderr) + print(file=sys.stderr) + print('usage: %s target1 target2...' % (sys.argv[0]), file=sys.stderr) return 1 edges = LoadEdges('dump.json', sys.argv[1:]) diff --git a/tools/gyp/tools/pretty_gyp.py b/tools/gyp/tools/pretty_gyp.py index d5736bbd4a6009..d01c692edcf8d6 100755 --- a/tools/gyp/tools/pretty_gyp.py +++ b/tools/gyp/tools/pretty_gyp.py @@ -6,6 +6,8 @@ """Pretty-prints the contents of a GYP file.""" +from __future__ import print_function + import sys import re @@ -118,23 +120,24 @@ def prettyprint_input(lines): basic_offset = 2 last_line = "" for line in lines: - line = line.strip('\r\n\t ') # Otherwise doesn't strip \r on Unix. - if len(line) > 0: - brace_diff = 0 - if not COMMENT_RE.match(line): + if COMMENT_RE.match(line): + print(line) + else: + line = line.strip('\r\n\t ') # Otherwise doesn't strip \r on Unix. + if len(line) > 0: (brace_diff, after) = count_braces(line) - if brace_diff != 0: - if after: - print " " * (basic_offset * indent) + line - indent += brace_diff + if brace_diff != 0: + if after: + print(" " * (basic_offset * indent) + line) + indent += brace_diff + else: + indent += brace_diff + print(" " * (basic_offset * indent) + line) else: - indent += brace_diff - print " " * (basic_offset * indent) + line + print(" " * (basic_offset * indent) + line) else: - print " " * (basic_offset * indent) + line - else: - print "" - last_line = line + print("") + last_line = line def main(): diff --git a/tools/gyp/tools/pretty_sln.py b/tools/gyp/tools/pretty_sln.py index ca8cf4ad3fb836..196566fb9e4470 100755 --- a/tools/gyp/tools/pretty_sln.py +++ b/tools/gyp/tools/pretty_sln.py @@ -12,13 +12,15 @@ Then it outputs a possible build order. """ -__author__ = 'nsylvain (Nicolas Sylvain)' +from __future__ import print_function import os import re import sys import pretty_vcproj +__author__ = 'nsylvain (Nicolas Sylvain)' + def BuildProject(project, built, projects, deps): # if all dependencies are done, we can build it, otherwise we try to build the # dependency. @@ -26,7 +28,7 @@ def BuildProject(project, built, projects, deps): for dep in deps[project]: if dep not in built: BuildProject(dep, built, projects, deps) - print project + print(project) built.append(project) def ParseSolution(solution_file): @@ -100,44 +102,44 @@ def ParseSolution(solution_file): return (projects, dependencies) def PrintDependencies(projects, deps): - print "---------------------------------------" - print "Dependencies for all projects" - print "---------------------------------------" - print "-- --" + print("---------------------------------------") + print("Dependencies for all projects") + print("---------------------------------------") + print("-- --") for (project, dep_list) in sorted(deps.items()): - print "Project : %s" % project - print "Path : %s" % projects[project][0] + print("Project : %s" % project) + print("Path : %s" % projects[project][0]) if dep_list: for dep in dep_list: - print " - %s" % dep - print "" + print(" - %s" % dep) + print("") - print "-- --" + print("-- --") def PrintBuildOrder(projects, deps): - print "---------------------------------------" - print "Build order " - print "---------------------------------------" - print "-- --" + print("---------------------------------------") + print("Build order ") + print("---------------------------------------") + print("-- --") built = [] for (project, _) in sorted(deps.items()): if project not in built: BuildProject(project, built, projects, deps) - print "-- --" + print("-- --") def PrintVCProj(projects): for project in projects: - print "-------------------------------------" - print "-------------------------------------" - print project - print project - print project - print "-------------------------------------" - print "-------------------------------------" + print("-------------------------------------") + print("-------------------------------------") + print(project) + print(project) + print(project) + print("-------------------------------------") + print("-------------------------------------") project_path = os.path.abspath(os.path.join(os.path.dirname(sys.argv[1]), projects[project][2])) @@ -153,7 +155,7 @@ def PrintVCProj(projects): def main(): # check if we have exactly 1 parameter. if len(sys.argv) < 2: - print 'Usage: %s "c:\\path\\to\\project.sln"' % sys.argv[0] + print('Usage: %s "c:\\path\\to\\project.sln"' % sys.argv[0]) return 1 (projects, deps) = ParseSolution(sys.argv[1]) diff --git a/tools/gyp/tools/pretty_vcproj.py b/tools/gyp/tools/pretty_vcproj.py index 6099bd7cc4d8cc..8263389d9b4d43 100755 --- a/tools/gyp/tools/pretty_vcproj.py +++ b/tools/gyp/tools/pretty_vcproj.py @@ -12,7 +12,7 @@ It outputs the resulting xml to stdout. """ -__author__ = 'nsylvain (Nicolas Sylvain)' +from __future__ import print_function import os import sys @@ -20,6 +20,14 @@ from xml.dom.minidom import parse from xml.dom.minidom import Node +__author__ = 'nsylvain (Nicolas Sylvain)' + +try: + cmp +except NameError: + def cmp(x, y): + return (x > y) - (x < y) + REPLACEMENTS = dict() ARGUMENTS = None @@ -61,7 +69,7 @@ def get_string(node): def PrettyPrintNode(node, indent=0): if node.nodeType == Node.TEXT_NODE: if node.data.strip(): - print '%s%s' % (' '*indent, node.data.strip()) + print('%s%s' % (' '*indent, node.data.strip())) return if node.childNodes: @@ -73,23 +81,23 @@ def PrettyPrintNode(node, indent=0): # Print the main tag if attr_count == 0: - print '%s<%s>' % (' '*indent, node.nodeName) + print('%s<%s>' % (' '*indent, node.nodeName)) else: - print '%s<%s' % (' '*indent, node.nodeName) + print('%s<%s' % (' '*indent, node.nodeName)) all_attributes = [] for (name, value) in node.attributes.items(): all_attributes.append((name, value)) all_attributes.sort(CmpTuple()) for (name, value) in all_attributes: - print '%s %s="%s"' % (' '*indent, name, value) - print '%s>' % (' '*indent) + print('%s %s="%s"' % (' '*indent, name, value)) + print('%s>' % (' '*indent)) if node.nodeValue: - print '%s %s' % (' '*indent, node.nodeValue) + print('%s %s' % (' '*indent, node.nodeValue)) for sub_node in node.childNodes: PrettyPrintNode(sub_node, indent=indent+2) - print '%s' % (' '*indent, node.nodeName) + print('%s' % (' '*indent, node.nodeName)) def FlattenFilter(node): @@ -283,8 +291,8 @@ def main(argv): # check if we have exactly 1 parameter. if len(argv) < 2: - print ('Usage: %s "c:\\path\\to\\vcproj.vcproj" [key1=value1] ' - '[key2=value2]' % argv[0]) + print('Usage: %s "c:\\path\\to\\vcproj.vcproj" [key1=value1] ' + '[key2=value2]' % argv[0]) return 1 # Parse the keys diff --git a/tools/license-builder.sh b/tools/license-builder.sh index d4c39203884df3..7875a0cd24e4a4 100755 --- a/tools/license-builder.sh +++ b/tools/license-builder.sh @@ -30,7 +30,7 @@ fi # Dependencies bundled in distributions addlicense "Acorn" "deps/acorn" "$(cat ${rootdir}/deps/acorn/acorn/LICENSE)" -addlicense "Acorn plugins" "deps/acorn-plugins" "$(cat ${rootdir}/deps/acorn-plugins/acorn-bigint/LICENSE)" +addlicense "Acorn plugins" "deps/acorn-plugins" "$(cat ${rootdir}/deps/acorn-plugins/acorn-class-fields/LICENSE)" addlicense "c-ares" "deps/cares" "$(tail -n +3 ${rootdir}/deps/cares/LICENSE.md)" addlicense "HTTP Parser" "deps/http_parser" "$(cat deps/http_parser/LICENSE-MIT)" if [ -f "${rootdir}/deps/icu/LICENSE" ]; then diff --git a/tools/lint-md.js b/tools/lint-md.js index b526b8e8afdcf9..6223dc160bf400 100644 --- a/tools/lint-md.js +++ b/tools/lint-md.js @@ -1 +1 @@ -module.exports=function(e,t){"use strict";var r={};function __webpack_require__(t){if(r[t]){return r[t].exports}var i=r[t]={i:t,l:false,exports:{}};e[t].call(i.exports,i,i.exports,__webpack_require__);i.l=true;return i.exports}function startup(){return __webpack_require__(294)}t(__webpack_require__);return startup()}([,function(e){"use strict";e.exports=indentation;var t="\t";var r=" ";var i=1;var n=4;function indentation(e){var a=0;var u=0;var s=e.charAt(a);var o={};var l;while(s===t||s===r){l=s===t?n:i;u+=l;if(l>1){u=Math.floor(u/l)*l}o[u]=a;s=e.charAt(++a)}return{indent:u,stops:o}}},function(e){"use strict";e.exports=locate;function locate(e,t){return e.indexOf("`",t)}},,,,,function(e){"use strict";e.exports=factory;function factory(e){var t=indices(String(e));return{toPosition:offsetToPositionFactory(t),toOffset:positionToOffsetFactory(t)}}function offsetToPositionFactory(e){return offsetToPosition;function offsetToPosition(t){var r=-1;var i=e.length;if(t<0){return{}}while(++rt){return{line:r+1,column:t-(e[r-1]||0)+1,offset:t}}}return{}}}function positionToOffsetFactory(e){return positionToOffset;function positionToOffset(t){var r=t&&t.line;var i=t&&t.column;if(!isNaN(r)&&!isNaN(i)&&r-1 in e){return(e[r-2]||0)+i-1||0}return-1}}function indices(e){var t=[];var r=e.indexOf("\n");while(r!==-1){t.push(r+1);r=e.indexOf("\n",r+1)}t.push(e.length+1);return t}},,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(526);var u=r(10);e.exports=i("remark-lint:no-inline-padding",noInlinePadding);function noInlinePadding(e,t){n(e,["emphasis","strong","delete","image","link"],visitor);function visitor(e){var r;if(!a(e)){r=u(e);if(r.charAt(0)===" "||r.charAt(r.length-1)===" "){t.message("Don’t pad `"+e.type+"` with inner spaces",e)}}}}},function(e){"use strict";e.exports=toString;function toString(e){return valueOf(e)||e.children&&e.children.map(toString).join("")||""}function valueOf(e){return(e&&e.value?e.value:e.alt?e.alt:e.title)||""}},,function(e){"use strict";if(!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0){e.exports={nextTick:nextTick}}else{e.exports=process}function nextTick(e,t,r,i){if(typeof e!=="function"){throw new TypeError('"callback" argument must be a function')}var n=arguments.length;var a,u;switch(n){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function afterTickOne(){e.call(null,t)});case 3:return process.nextTick(function afterTickTwo(){e.call(null,t,r)});case 4:return process.nextTick(function afterTickThree(){e.call(null,t,r,i)});default:a=new Array(n-1);u=0;while(u=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}},,function(e,t,r){"use strict";var i=r(431);function homedir(){var e=process.env;var t=e.HOME;var r=e.LOGNAME||e.USER||e.LNAME||e.USERNAME;if(process.platform==="win32"){return e.USERPROFILE||e.HOMEDRIVE+e.HOMEPATH||t||null}if(process.platform==="darwin"){return t||(r?"/Users/"+r:null)}if(process.platform==="linux"){return t||(process.getuid()===0?"/root":r?"/home/"+r:null)}return t||null}e.exports=typeof i.homedir==="function"?i.homedir:homedir},,,,,,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(270);var u=r(704);var s=r(839);var o=r(526);e.exports=i("remark-lint:no-heading-content-indent",noHeadingContentIndent);var l=s.start;var f=s.end;function noHeadingContentIndent(e,t){var r=String(t);n(e,"heading",visitor);function visitor(e){var i;var n;var s;var c;var h;var p;var v;var d;var D;var m;if(o(e)){return}i=e.depth;n=e.children;s=a(e,"atx");if(s==="atx"||s==="atx-closed"){h=l(e);d=h.offset;D=r.charAt(d);while(D&&D!=="#"){D=r.charAt(++d)}if(!D){return}d=i+(d-h.offset);c=l(n[0]).column;if(!c){return}v=c-h.column-1-d;if(v){m=(v>0?"Remove":"Add")+" "+Math.abs(v)+" "+u("space",v)+" before this heading’s content";t.message(m,l(n[0]))}}if(s==="atx-closed"){p=f(n[n.length-1]);v=f(e).column-p.column-1-i;if(v){m="Remove "+v+" "+u("space",v)+" after this heading’s content";t.message(m,p)}}}}},function(e,t,r){"use strict";var i=r(336);var n=r(440);var a=r(901);var u=r(360);var s=r(315);e.exports=setOptions;var o={entities:{true:true,false:true,numbers:true,escape:true},bullet:{"*":true,"-":true,"+":true},rule:{"-":true,_:true,"*":true},listItemIndent:{tab:true,mixed:true,1:true},emphasis:{_:true,"*":true},strong:{_:true,"*":true},fence:{"`":true,"~":true}};var l={boolean:validateBoolean,string:validateString,number:validateNumber,function:validateFunction};function setOptions(e){var t=this;var r=t.options;var n;var s;if(e==null){e={}}else if(typeof e==="object"){e=i(e)}else{throw new Error("Invalid value `"+e+"` for setting `options`")}for(s in a){l[typeof a[s]](e,s,r[s],o[s])}n=e.ruleRepetition;if(n&&n<3){raise(n,"options.ruleRepetition")}t.encode=encodeFactory(String(e.entities));t.escape=u(e);t.options=e;return t}function validateBoolean(e,t,r){var i=e[t];if(i==null){i=r}if(typeof i!=="boolean"){raise(i,"options."+t)}e[t]=i}function validateNumber(e,t,r){var i=e[t];if(i==null){i=r}if(isNaN(i)){raise(i,"options."+t)}e[t]=i}function validateString(e,t,r,i){var n=e[t];if(n==null){n=r}n=String(n);if(!(n in i)){raise(n,"options."+t)}e[t]=n}function validateFunction(e,t,r){var i=e[t];if(i==null){i=r}if(typeof i!=="function"){raise(i,"options."+t)}e[t]=i}function encodeFactory(e){var t={};if(e==="false"){return s}if(e==="true"){t.useNamedReferences=true}if(e==="escape"){t.escapeOnly=true;t.useNamedReferences=true}return wrapped;function wrapped(e){return n(e,t)}}function raise(e,t){throw new Error("Invalid value `"+e+"` for setting `"+t+"`")}},,function(e,t){t=e.exports=trim;function trim(e){return e.replace(/^\s*|\s*$/g,"")}t.left=function(e){return e.replace(/^\s*/,"")};t.right=function(e){return e.replace(/\s*$/,"")}},function(e,t,r){"use strict";var i=r(814);e.exports=thematic;var n=" ";function thematic(){var e=this.options;var t=i(e.rule,e.ruleRepetition);return e.ruleSpaces?t.split("").join(n):t}},,,,,function(e,t,r){"use strict";var i=r(315);e.exports=enter;function enter(e,t){var r=e.encode;var n=e.escape;var a=e.enterLink();if(t.referenceType!=="shortcut"&&t.referenceType!=="collapsed"){return a}e.escape=i;e.encode=i;return exit;function exit(){e.encode=r;e.escape=n;a()}}},function(e,t,r){"use strict";var i=r(727);e.exports=new i({include:[r(234)],implicit:[r(633),r(843),r(981),r(702)]})},function(e,t,r){"use strict";var i=r(36);var n=r(814);var a=r(439);var u=r(1);var s=r(235);var o=r(724);e.exports=list;var l="*";var f="_";var c="+";var h="-";var p=".";var v=" ";var d="\n";var D="\t";var m=")";var g="x";var E=4;var A=/\n\n(?!\s*$)/;var C=/^\[([ \t]|x|X)][ \t]/;var y=/^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/;var w=/^([ \t]*)([*+-]|\d+[.)])([ \t]+)/;var x=/^( {1,4}|\t)?/gm;function list(e,t,r){var n=this;var u=n.options.commonmark;var s=n.options.pedantic;var g=n.blockTokenizers;var A=n.interruptList;var C=0;var y=t.length;var w=null;var x=0;var b;var F;var S;var B;var k;var O;var P;var T;var I;var M;var L;var R;var j;var U;var N;var J;var z;var X;var G=false;var q;var W;var _;var V;while(C=E){return}S=t.charAt(C);if(S===l||S===c||S===h){B=S;F=false}else{F=true;b="";while(C=E){V=true}if(J&&x>=J.indent){V=true}S=t.charAt(C);T=null;if(!V){if(S===l||S===c||S===h){T=S;C++;x++}else{b="";while(C=J.indent||x>E}P=false;C=O}M=t.slice(O,k);I=O===C?M:t.slice(C,k);if(T===l||T===f||T===h){if(g.thematicBreak.call(n,e,M,true)){break}}L=R;R=!P&&!i(I).length;if(V&&J){J.value=J.value.concat(N,M);U=U.concat(N,M);N=[]}else if(P){if(N.length!==0){G=true;J.value.push("");J.trail=N.concat()}J={value:[M],indent:x,trail:[]};j.push(J);U=U.concat(N,M);N=[]}else if(R){if(L&&!u){break}N.push(M)}else{if(L){break}if(o(A,g,n,[e,M,true])){break}J.value=J.value.concat(N,M);U=U.concat(N,M);N=[]}C=k+1}q=e(U.join(d)).reset({type:"list",ordered:F,start:w,spread:G,children:[]});z=n.enterList();X=n.enterBlock();C=-1;y=j.length;while(++C1){t.message(s,e)}}}},function(e){e.exports=function isBuffer(e){return e!=null&&e.constructor!=null&&typeof e.constructor.isBuffer==="function"&&e.constructor.isBuffer(e)}},,,,,,,,function(e){e.exports=require("util")},function(e,t,r){"use strict";var i=r(727);e.exports=i.DEFAULT=new i({include:[r(388)],explicit:[r(875),r(555),r(329)]})},function(e){e.exports=require("fs")},function(e){"use strict";e.exports=function(e){if(typeof e!=="string"){throw new TypeError("Expected a string")}return!/[^0-9a-z\xDF-\xFF]/.test(e.toLowerCase())}},,,,,function(e,t,r){"use strict";var i=r(495);var n=r(7);e.exports=i("remark-lint:no-tabs",noTabs);var a="Use spaces instead of hard-tabs";function noTabs(e,t){var r=String(t);var i=n(t).toPosition;var u=r.indexOf("\t");while(u!==-1){t.message(a,i(u));u=r.indexOf("\t",u+1)}}},function(e){function webpackEmptyContext(e){var t=new Error("Cannot find module '"+e+"'");t.code="MODULE_NOT_FOUND";throw t}webpackEmptyContext.keys=function(){return[]};webpackEmptyContext.resolve=webpackEmptyContext;e.exports=webpackEmptyContext;webpackEmptyContext.id=73},function(e,t,r){"use strict";var i=r(864);var n=r(97);var a=r(503);var u=r(123);var s=r(340);var o=r(951);e.exports=unified().freeze();var l=[].slice;var f={}.hasOwnProperty;var c=u().use(pipelineParse).use(pipelineRun).use(pipelineStringify);function pipelineParse(e,t){t.tree=e.parse(t.file)}function pipelineRun(e,t,r){e.run(t.tree,t.file,done);function done(e,i,n){if(e){r(e)}else{t.tree=i;t.file=n;r()}}}function pipelineStringify(e,t){t.file.contents=e.stringify(t.tree,t.file)}function unified(){var e=[];var t=u();var r={};var h=false;var p=-1;processor.data=data;processor.freeze=freeze;processor.attachers=e;processor.use=use;processor.parse=parse;processor.stringify=stringify;processor.run=run;processor.runSync=runSync;processor.process=process;processor.processSync=processSync;return processor;function processor(){var t=unified();var n=e.length;var a=-1;while(++a{if(typeof e!=="string"){throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof e}\``)}if(typeof t!=="string"){throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof t}\``)}try{e=a.realpathSync(e)}catch(t){if(t.code==="ENOENT"){e=i.resolve(e)}else if(r){return null}else{throw t}}const u=i.join(e,"noop.js");const s=()=>n._resolveFilename(t,{id:u,filename:u,paths:n._nodeModulePaths(e)});if(r){try{return s()}catch(e){return null}}return s()};e.exports=((e,t)=>u(e,t));e.exports.silent=((e,t)=>u(e,t,true))},,function(e,t,r){"use strict";var i=r(347)("unified-engine:file-pipeline:configure");var n=r(928);var a=r(623);var u=r(692);var s=r(876);e.exports=configure;function configure(e,t,r,o){var l=e.configuration;var f=e.processor;if(n(t).fatal){return o()}l.load(t.path,handleConfiguration);function handleConfiguration(e,t){var n;var l;var c;var h;var p;var v;if(e){return o(e)}i("Using settings `%j`",t.settings);f.data("settings",t.settings);n=t.plugins;h=n.length;p=-1;i("Using `%d` plugins",h);while(++p>10)+55296,(e-65536&1023)+56320)}var C=new Array(256);var y=new Array(256);for(var w=0;w<256;w++){C[w]=simpleEscapeSequence(w)?1:0;y[w]=simpleEscapeSequence(w)}function State(e,t){this.input=e;this.filename=t["filename"]||null;this.schema=t["schema"]||s;this.onWarning=t["onWarning"]||null;this.legacy=t["legacy"]||false;this.json=t["json"]||false;this.listener=t["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=e.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=[]}function generateError(e,t){return new n(t,new a(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function throwError(e,t){throw generateError(e,t)}function throwWarning(e,t){if(e.onWarning){e.onWarning.call(null,generateError(e,t))}}var x={YAML:function handleYamlDirective(e,t,r){var i,n,a;if(e.version!==null){throwError(e,"duplication of %YAML directive")}if(r.length!==1){throwError(e,"YAML directive accepts exactly one argument")}i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);if(i===null){throwError(e,"ill-formed argument of the YAML directive")}n=parseInt(i[1],10);a=parseInt(i[2],10);if(n!==1){throwError(e,"unacceptable YAML version of the document")}e.version=r[0];e.checkLineBreaks=a<2;if(a!==1&&a!==2){throwWarning(e,"unsupported YAML version of the document")}},TAG:function handleTagDirective(e,t,r){var i,n;if(r.length!==2){throwError(e,"TAG directive accepts exactly two arguments")}i=r[0];n=r[1];if(!E.test(i)){throwError(e,"ill-formed tag handle (first argument) of the TAG directive")}if(o.call(e.tagMap,i)){throwError(e,'there is a previously declared suffix for "'+i+'" tag handle')}if(!A.test(n)){throwError(e,"ill-formed tag prefix (second argument) of the TAG directive")}e.tagMap[i]=n}};function captureSegment(e,t,r,i){var n,a,u,s;if(t1){e.result+=i.repeat("\n",t-1)}}function readPlainScalar(e,t,r){var i,n,a,u,s,o,l,f,c=e.kind,h=e.result,p;p=e.input.charCodeAt(e.position);if(is_WS_OR_EOL(p)||is_FLOW_INDICATOR(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96){return false}if(p===63||p===45){n=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(n)||r&&is_FLOW_INDICATOR(n)){return false}}e.kind="scalar";e.result="";a=u=e.position;s=false;while(p!==0){if(p===58){n=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(n)||r&&is_FLOW_INDICATOR(n)){break}}else if(p===35){i=e.input.charCodeAt(e.position-1);if(is_WS_OR_EOL(i)){break}}else if(e.position===e.lineStart&&testDocumentSeparator(e)||r&&is_FLOW_INDICATOR(p)){break}else if(is_EOL(p)){o=e.line;l=e.lineStart;f=e.lineIndent;skipSeparationSpace(e,false,-1);if(e.lineIndent>=t){s=true;p=e.input.charCodeAt(e.position);continue}else{e.position=u;e.line=o;e.lineStart=l;e.lineIndent=f;break}}if(s){captureSegment(e,a,u,false);writeFoldedLines(e,e.line-o);a=u=e.position;s=false}if(!is_WHITE_SPACE(p)){u=e.position+1}p=e.input.charCodeAt(++e.position)}captureSegment(e,a,u,false);if(e.result){return true}e.kind=c;e.result=h;return false}function readSingleQuotedScalar(e,t){var r,i,n;r=e.input.charCodeAt(e.position);if(r!==39){return false}e.kind="scalar";e.result="";e.position++;i=n=e.position;while((r=e.input.charCodeAt(e.position))!==0){if(r===39){captureSegment(e,i,e.position,true);r=e.input.charCodeAt(++e.position);if(r===39){i=e.position;e.position++;n=e.position}else{return true}}else if(is_EOL(r)){captureSegment(e,i,n,true);writeFoldedLines(e,skipSeparationSpace(e,false,t));i=n=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a single quoted scalar")}else{e.position++;n=e.position}}throwError(e,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(e,t){var r,i,n,a,u,s;s=e.input.charCodeAt(e.position);if(s!==34){return false}e.kind="scalar";e.result="";e.position++;r=i=e.position;while((s=e.input.charCodeAt(e.position))!==0){if(s===34){captureSegment(e,r,e.position,true);e.position++;return true}else if(s===92){captureSegment(e,r,e.position,true);s=e.input.charCodeAt(++e.position);if(is_EOL(s)){skipSeparationSpace(e,false,t)}else if(s<256&&C[s]){e.result+=y[s];e.position++}else if((u=escapedHexLen(s))>0){n=u;a=0;for(;n>0;n--){s=e.input.charCodeAt(++e.position);if((u=fromHexCode(s))>=0){a=(a<<4)+u}else{throwError(e,"expected hexadecimal character")}}e.result+=charFromCodepoint(a);e.position++}else{throwError(e,"unknown escape sequence")}r=i=e.position}else if(is_EOL(s)){captureSegment(e,r,i,true);writeFoldedLines(e,skipSeparationSpace(e,false,t));r=i=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a double quoted scalar")}else{e.position++;i=e.position}}throwError(e,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(e,t){var r=true,i,n=e.tag,a,u=e.anchor,s,o,f,c,h,p={},v,d,D,m;m=e.input.charCodeAt(e.position);if(m===91){o=93;h=false;a=[]}else if(m===123){o=125;h=true;a={}}else{return false}if(e.anchor!==null){e.anchorMap[e.anchor]=a}m=e.input.charCodeAt(++e.position);while(m!==0){skipSeparationSpace(e,true,t);m=e.input.charCodeAt(e.position);if(m===o){e.position++;e.tag=n;e.anchor=u;e.kind=h?"mapping":"sequence";e.result=a;return true}else if(!r){throwError(e,"missed comma between flow collection entries")}d=v=D=null;f=c=false;if(m===63){s=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(s)){f=c=true;e.position++;skipSeparationSpace(e,true,t)}}i=e.line;composeNode(e,t,l,false,true);d=e.tag;v=e.result;skipSeparationSpace(e,true,t);m=e.input.charCodeAt(e.position);if((c||e.line===i)&&m===58){f=true;m=e.input.charCodeAt(++e.position);skipSeparationSpace(e,true,t);composeNode(e,t,l,false,true);D=e.result}if(h){storeMappingPair(e,a,p,d,v,D)}else if(f){a.push(storeMappingPair(e,null,p,d,v,D))}else{a.push(v)}skipSeparationSpace(e,true,t);m=e.input.charCodeAt(e.position);if(m===44){r=true;m=e.input.charCodeAt(++e.position)}else{r=false}}throwError(e,"unexpected end of the stream within a flow collection")}function readBlockScalar(e,t){var r,n,a=p,u=false,s=false,o=t,l=0,f=false,c,h;h=e.input.charCodeAt(e.position);if(h===124){n=false}else if(h===62){n=true}else{return false}e.kind="scalar";e.result="";while(h!==0){h=e.input.charCodeAt(++e.position);if(h===43||h===45){if(p===a){a=h===43?d:v}else{throwError(e,"repeat of a chomping mode identifier")}}else if((c=fromDecimalCode(h))>=0){if(c===0){throwError(e,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!s){o=t+c-1;s=true}else{throwError(e,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(h)){do{h=e.input.charCodeAt(++e.position)}while(is_WHITE_SPACE(h));if(h===35){do{h=e.input.charCodeAt(++e.position)}while(!is_EOL(h)&&h!==0)}}while(h!==0){readLineBreak(e);e.lineIndent=0;h=e.input.charCodeAt(e.position);while((!s||e.lineIndento){o=e.lineIndent}if(is_EOL(h)){l++;continue}if(e.lineIndentt)&&o!==0){throwError(e,"bad indentation of a sequence entry")}else if(e.lineIndentt){if(composeNode(e,t,h,true,n)){if(D){v=e.result}else{d=e.result}}if(!D){storeMappingPair(e,l,c,p,v,d,a,u);p=v=d=null}skipSeparationSpace(e,true,-1);g=e.input.charCodeAt(e.position)}if(e.lineIndent>t&&g!==0){throwError(e,"bad indentation of a mapping entry")}else if(e.lineIndentt){p=1}else if(e.lineIndent===t){p=0}else if(e.lineIndentt){p=1}else if(e.lineIndent===t){p=0}else if(e.lineIndent tag; it should be "'+g.kind+'", not "'+e.kind+'"')}if(!g.resolve(e.result)){throwError(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}else{e.result=g.construct(e.result);if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}else{throwError(e,"unknown tag !<"+e.tag+">")}}if(e.listener!==null){e.listener("close",e)}return e.tag!==null||e.anchor!==null||d}function readDocument(e){var t=e.position,r,i,n,a=false,u;e.version=null;e.checkLineBreaks=e.legacy;e.tagMap={};e.anchorMap={};while((u=e.input.charCodeAt(e.position))!==0){skipSeparationSpace(e,true,-1);u=e.input.charCodeAt(e.position);if(e.lineIndent>0||u!==37){break}a=true;u=e.input.charCodeAt(++e.position);r=e.position;while(u!==0&&!is_WS_OR_EOL(u)){u=e.input.charCodeAt(++e.position)}i=e.input.slice(r,e.position);n=[];if(i.length<1){throwError(e,"directive name must not be less than one character in length")}while(u!==0){while(is_WHITE_SPACE(u)){u=e.input.charCodeAt(++e.position)}if(u===35){do{u=e.input.charCodeAt(++e.position)}while(u!==0&&!is_EOL(u));break}if(is_EOL(u))break;r=e.position;while(u!==0&&!is_WS_OR_EOL(u)){u=e.input.charCodeAt(++e.position)}n.push(e.input.slice(r,e.position))}if(u!==0)readLineBreak(e);if(o.call(x,i)){x[i](e,i,n)}else{throwWarning(e,'unknown document directive "'+i+'"')}}skipSeparationSpace(e,true,-1);if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45){e.position+=3;skipSeparationSpace(e,true,-1)}else if(a){throwError(e,"directives end mark is expected")}composeNode(e,e.lineIndent-1,h,false,true);skipSeparationSpace(e,true,-1);if(e.checkLineBreaks&&m.test(e.input.slice(t,e.position))){throwWarning(e,"non-ASCII line breaks are interpreted as content")}e.documents.push(e.result);if(e.position===e.lineStart&&testDocumentSeparator(e)){if(e.input.charCodeAt(e.position)===46){e.position+=3;skipSeparationSpace(e,true,-1)}return}if(e.position output."+r,""," # Rewrite all applicable files"," $ "+i+" . -o"].join("\n");return{helpMessage:u,cwd:t.cwd,processor:t.processor,help:n.help,version:n.version,files:n._,filePath:n.filePath,watch:n.watch,extensions:f.length===0?t.extensions:f,output:n.output,out:n.stdout,tree:n.tree,treeIn:n.treeIn,treeOut:n.treeOut,inspect:n.inspect,rcName:t.rcName,packageField:t.packageField,rcPath:n.rcPath,detectConfig:n.config,settings:settings(n.setting),ignoreName:t.ignoreName,ignorePath:n.ignorePath,detectIgnore:n.ignore,pluginPrefix:t.pluginPrefix,plugins:plugins(n.use),reporter:c[0],reporterOptions:c[1],color:n.color,silent:n.silent,quiet:n.quiet,frail:n.frail}}function addEach(e){var t=e.default;l.default[e.long]=t===undefined?null:t;if(e.type in l){l[e.type].push(e.long)}if(e.short){l.alias[e.short]=e.long}}function extensions(e){return flatten(normalize(e).map(splitList))}function plugins(e){var t={};normalize(e).map(splitOptions).forEach(function(e){t[e[0]]=e[1]?parseConfig(e[1],{}):null});return t}function reporter(e){var t=normalize(e).map(splitOptions).map(function(e){return[e[0],e[1]?parseConfig(e[1],{}):null]});return t[t.length-1]||[]}function settings(e){var t={};normalize(e).forEach(function(e){parseConfig(e,t)});return t}function parseConfig(e,t){var r;var i;try{e=toCamelCase(parseJSON(e))}catch(t){i=t.message.replace(/at(?= position)/,"around");throw s("Cannot parse `%s` as JSON: %s",e,i)}for(r in e){t[r]=e[r]}return t}function handleUnknownArgument(e){if(e.charAt(0)!=="-"){return}if(e.charAt(1)==="-"){throw s("Unknown option `%s`, expected:\n%s",e,inspectAll(o))}e.slice(1).split("").forEach(each);function each(e){var t=o.length;var r=-1;var i;while(++r=2,has16m:e>=3}}function supportsColor(e){if(u===false){return 0}if(n("color=16m")||n("color=full")||n("color=truecolor")){return 3}if(n("color=256")){return 2}if(e&&!e.isTTY&&u!==true){return 0}const t=u?1:0;if(process.platform==="win32"){const e=i.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in a){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in a)||a.CI_NAME==="codeship"){return 1}return t}if("TEAMCITY_VERSION"in a){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0}if(a.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in a){const e=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(a.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)){return 1}if("COLORTERM"in a){return 1}if(a.TERM==="dumb"){return t}return t}function getSupportLevel(e){const t=supportsColor(e);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}},,,function(e,t,r){"use strict";var i=r(347)("unified-engine:file-pipeline:queue");var n=r(928);e.exports=queue;function queue(e,t,r,a){var u=t.history[0];var s=r.complete;var o=true;if(!s){s={};r.complete=s}i("Queueing `%s`",u);s[u]=a;r.valueOf().forEach(each);if(!o){i("Not flushing: some files cannot be flushed");return}r.complete={};r.pipeline.run(r,done);function each(e){var t=e.history[0];if(n(e).fatal){return}if(typeof s[t]==="function"){i("`%s` can be flushed",t)}else{i("Interupting flush: `%s` is not finished",t);o=false}}function done(e){i("Flushing: all files can be flushed");for(u in s){s[u](e)}}}},function(e,t,r){"use strict";var i=r(171);var n=r(426);e.exports=definition;definition.notInList=true;definition.notInBlock=true;var a='"';var u="'";var s="\\";var o="\n";var l="\t";var f=" ";var c="[";var h="]";var p="(";var v=")";var d=":";var D="<";var m=">";function definition(e,t,r){var i=this;var m=i.options.commonmark;var g=0;var E=t.length;var A="";var C;var y;var w;var x;var b;var F;var S;var B;while(g"];var r=t.concat(["~","|"]);var i=r.concat(["\n",'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);escapes.default=t;escapes.gfm=r;escapes.commonmark=i;function escapes(e){var n=e||{};if(n.commonmark){return i}return n.gfm?r:t}},,function(e){"use strict";e.exports=locate;function locate(e,t){return e.indexOf("~~",t)}},function(e,t,r){"use strict";var i=r(495);var n=r(7);var a=r(682);var u=r(839);var s=r(526);e.exports=i("remark-lint:checkbox-character-style",checkboxCharacterStyle);var o=u.start;var l=u.end;var f={x:true,X:true};var c={" ":true,"\t":true};var h={true:"checked",false:"unchecked"};function checkboxCharacterStyle(e,t,r){var i=String(t);var u=n(t);r=typeof r==="object"?r:{};if(r.unchecked&&c[r.unchecked]!==true){t.fail("Invalid unchecked checkbox marker `"+r.unchecked+"`: use either `'\\t'`, or `' '`")}if(r.checked&&f[r.checked]!==true){t.fail("Invalid checked checkbox marker `"+r.checked+"`: use either `'x'`, or `'X'`")}a(e,"listItem",visitor);function visitor(e){var n;var a;var f;var c;var p;var v;var d;if(typeof e.checked!=="boolean"||s(e)){return}n=h[e.checked];a=o(e).offset;f=(e.children.length===0?l(e):o(e.children[0])).offset;c=i.slice(a,f).trimRight().slice(0,-1);v=c.charAt(c.length-1);p=r[n];if(p){if(v!==p){d=n.charAt(0).toUpperCase()+n.slice(1)+" checkboxes should use `"+p+"` as a marker";t.message(d,{start:u.toPosition(a+c.length-1),end:u.toPosition(a+c.length)})}}else{r[n]=v}}}},,,,function(e){"use strict";e.exports=wordCharacter;var t=String.fromCharCode;var r=/\w/;function wordCharacter(e){return r.test(typeof e==="number"?t(e):e.charAt(0))}},,,,,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(526);e.exports=i("remark-lint:no-shortcut-reference-image",noShortcutReferenceImage);var u="Use the trailing [] on reference images";function noShortcutReferenceImage(e,t){n(e,"imageReference",visitor);function visitor(e){if(!a(e)&&e.referenceType==="shortcut"){t.message(u,e)}}}},,function(e,t,r){"use strict";var i=r(335);e.exports=trough;trough.wrap=i;var n=[].slice;function trough(){var e=[];var t={};t.run=run;t.use=use;return t;function run(){var t=-1;var r=n.call(arguments,0,-1);var a=arguments[arguments.length-1];if(typeof a!=="function"){throw new Error("Expected function as last argument, not "+a)}next.apply(null,[null].concat(r));function next(u){var s=e[++t];var o=n.call(arguments,0);var l=o.slice(1);var f=r.length;var c=-1;if(u){a(u);return}while(++c"){break}if(v!==" "&&v!=="\t"){t.message(o,d);break}}}}}},,function(e,t,r){e.exports=realpath;realpath.realpath=realpath;realpath.sync=realpathSync;realpath.realpathSync=realpathSync;realpath.monkeypatch=monkeypatch;realpath.unmonkeypatch=unmonkeypatch;var i=r(66);var n=i.realpath;var a=i.realpathSync;var u=process.version;var s=/^v[0-5]\./.test(u);var o=r(544);function newError(e){return e&&e.syscall==="realpath"&&(e.code==="ELOOP"||e.code==="ENOMEM"||e.code==="ENAMETOOLONG")}function realpath(e,t,r){if(s){return n(e,t,r)}if(typeof t==="function"){r=t;t=null}n(e,t,function(i,n){if(newError(i)){o.realpath(e,t,r)}else{r(i,n)}})}function realpathSync(e,t){if(s){return a(e,t)}try{return a(e,t)}catch(r){if(newError(r)){return o.realpathSync(e,t)}else{throw r}}}function monkeypatch(){i.realpath=realpath;i.realpathSync=realpathSync}function unmonkeypatch(){i.realpath=n;i.realpathSync=a}},,,,,,function(e){"use strict";var t={}.hasOwnProperty;e.exports=stringify;function stringify(e){if(!e||typeof e!=="object"){return""}if(t.call(e,"position")||t.call(e,"type")){return position(e.position)}if(t.call(e,"start")||t.call(e,"end")){return position(e)}if(t.call(e,"line")||t.call(e,"column")){return point(e)}return""}function point(e){if(!e||typeof e!=="object"){e={}}return index(e.line)+":"+index(e.column)}function position(e){if(!e||typeof e!=="object"){e={}}return point(e.start)+"-"+point(e.end)}function index(e){return e&&typeof e==="number"?e:1}},,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:fenced-code-flag",fencedCodeFlag);var s=a.start;var o=a.end;var l=/^ {0,3}([~`])\1{2,}/;var f="Invalid code-language flag";var c="Missing code-language flag";function fencedCodeFlag(e,t,r){var i=String(t);var a=false;var h=[];if(typeof r==="object"&&!("length"in r)){a=Boolean(r.allowEmpty);r=r.flags}if(typeof r==="object"&&"length"in r){h=String(r).split(",")}n(e,"code",visitor);function visitor(e){var r;if(!u(e)){if(e.lang){if(h.length!==0&&h.indexOf(e.lang)===-1){t.message(f,e)}}else{r=i.slice(s(e).offset,o(e).offset);if(!a&&l.test(r)){t.message(c,e)}}}}}},function(e){"use strict";e.exports=alphabetical;function alphabetical(e){var t=typeof e==="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}},function(e){"use strict";e.exports=locate;var t=["https://","http://","mailto:"];function locate(e,r){var i=t.length;var n=-1;var a=-1;var u;if(!this.options.gfm){return-1}while(++na){i[n-a]=e[n]}return i}},,,,,,,,,function(e,t,r){"use strict";var i=r(211);var n=Object.prototype.hasOwnProperty;var a=Object.prototype.toString;function resolveYamlOmap(e){if(e===null)return true;var t=[],r,i,u,s,o,l=e;for(r=0,i=l.length;r-1){a.splice(u,1)}var s=r;a.forEach(function _buildSubObj(e,r){if(!e||typeof s!=="object")return;if(r===a.length-1)s[e]=t[n];if(s[e]===undefined)s[e]={};s=s[e]})}}return r};var c=t.find=function(){var e=a.join.apply(null,[].slice.call(arguments));function find(e,t){var r=a.join(e,t);try{i.statSync(r);return r}catch(r){if(a.dirname(e)!==e)return find(a.dirname(e),t)}}return find(process.cwd(),e)}},,,,function(e,t,r){"use strict";const i=r(202);const n=r(751);const a=i("JSONError",{fileName:i.append("in %s")});e.exports=((e,t,r)=>{if(typeof t==="string"){r=t;t=null}try{try{return JSON.parse(e,t)}catch(r){n(e,t);throw r}}catch(e){e.message=e.message.replace(/\n/g,"");const t=new a(e);if(r){t.fileName=r}throw t}})},function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:maximum-line-length",maximumLineLength);var s=a.start;var o=a.end;function maximumLineLength(e,t,r){var i=typeof r==="number"&&!isNaN(r)?r:80;var a=String(t);var l=a.split(/\r?\n/);var f=l.length;var c=-1;var h;n(e,["heading","table","code","definition","html","jsx"],ignore);n(e,["link","image","inlineCode"],inline);while(++ci){t.message("Line must be at most "+i+" characters",{line:c+1,column:h+1})}}function inline(e,t,r){var n=r.children[t+1];var a;var l;if(u(e)){return}a=s(e);l=o(e);if(a.column>i||l.column0?"Add":"Remove")+" "+Math.abs(i)+" "+n("space",i)+" between blockquote and content";t.message(a,u.start(e.children[0]))}}else{r=check(e)}}}function check(e){var t=e.children[0];var r=u.start(t).column-u.start(e).column;var i=o(t).match(/^ +/);if(i){r+=i[0].length}return r}},,,,,function(e){"use strict";e.exports=whitespace;var t=String.fromCharCode;var r=/\s/;function whitespace(e){return r.test(typeof e==="number"?t(e):e.charAt(0))}},,,function(e,t,r){"use strict";var i=r(814);var n="\n";var a=" ";var u=":";var s="[";var o="]";var l="^";var f=4;var c=n+n;var h=i(a,f);e.exports=footnoteDefinition;function footnoteDefinition(e){var t=this.all(e).join(c+h);return s+l+(e.label||e.identifier)+o+u+a+t}},function(e){"use strict";e.exports=collapse;function collapse(e){return String(e).replace(/\s+/g," ")}},function(e){"use strict";e.exports=label;var t="[";var r="]";var i="shortcut";var n="collapsed";function label(e){var a=e.referenceType;if(a===i){return""}return t+(a===n?"":e.label||e.identifier)+r}},,,,,function(e,t,r){"use strict";var i=r(814);var n=r(705);e.exports=listItem;var a="\n";var u=" ";var s="[";var o="]";var l="x";var f=Math.ceil;var c=a+a;var h=4;function listItem(e,t,r,p){var v=this;var d=v.options.listItemIndent;var D=p||v.options.bullet;var m=e.spread==null?true:e.spread;var g=e.checked;var E=e.children;var A=E.length;var C=[];var y=-1;var w;var x;var b;while(++y",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"}},,,,,function(e,t,r){"use strict";var i=r(64);var n=r(753);var a=function errorEx(e,t){if(!e||e.constructor!==String){t=e||{};e=Error.name}var r=function ErrorEXError(i){if(!this){return new ErrorEXError(i)}i=i instanceof Error?i.message:i||this.message;Error.call(this,i);Error.captureStackTrace(this,r);this.name=e;Object.defineProperty(this,"message",{configurable:true,enumerable:false,get:function(){var e=i.split(/\r?\n/g);for(var r in t){if(!t.hasOwnProperty(r)){continue}var a=t[r];if("message"in a){e=a.message(this[r],e)||e;if(!n(e)){e=[e]}}}return e.join("\n")},set:function(e){i=e}});var a=null;var u=Object.getOwnPropertyDescriptor(this,"stack");var s=u.get;var o=u.value;delete u.value;delete u.writable;u.set=function(e){a=e};u.get=function(){var e=(a||(s?s.call(this):o)).split(/\r?\n+/g);if(!a){e[0]=this.name+": "+this.message}var r=1;for(var i in t){if(!t.hasOwnProperty(i)){continue}var n=t[i];if("line"in n){var u=n.line(this[i]);if(u){e.splice(r++,0," "+u)}}if("stack"in n){n.stack(this[i],e)}}return e.join("\n")};Object.defineProperty(this,"stack",u)};if(Object.setPrototypeOf){Object.setPrototypeOf(r.prototype,Error.prototype);Object.setPrototypeOf(r,Error)}else{i.inherits(r,Error)}return r};a.append=function(e,t){return{message:function(r,i){r=r||t;if(r){i[0]+=" "+e.replace("%s",r.toString())}return i}}};a.line=function(e,t){return{line:function(r){r=r||t;if(r){return e.replace("%s",r.toString())}return null}}};e.exports=a},,,,,function(e,t,r){"use strict";var i=r(211);e.exports=new i("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})},,,function(e,t,r){"use strict";var i=r(589);function replaceExt(e,t){if(typeof e!=="string"){return e}if(e.length===0){return e}var r=i.basename(e,i.extname(e))+t;return i.join(i.dirname(e),r)}e.exports=replaceExt},function(e,t,r){"use strict";var i=r(833);var n=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"];var a=["scalar","sequence","mapping"];function compileStyleAliases(e){var t={};if(e!==null){Object.keys(e).forEach(function(r){e[r].forEach(function(e){t[String(e)]=r})})}return t}function Type(e,t){t=t||{};Object.keys(t).forEach(function(t){if(n.indexOf(t)===-1){throw new i('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}});this.tag=e;this.kind=t["kind"]||null;this.resolve=t["resolve"]||function(){return true};this.construct=t["construct"]||function(e){return e};this.instanceOf=t["instanceOf"]||null;this.predicate=t["predicate"]||null;this.represent=t["represent"]||null;this.defaultStyle=t["defaultStyle"]||null;this.styleAliases=compileStyleAliases(t["styleAliases"]||null);if(a.indexOf(this.kind)===-1){throw new i('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}}e.exports=Type},function(e,t,r){"use strict";var i=r(876);var n=true;try{n="inspect"in r(64)}catch(e){n=false}e.exports=n?inspect:noColor;inspect.color=inspect;noColor.color=inspect;inspect.noColor=noColor;noColor.noColor=noColor;var a=ansiColor(2,22);var u=ansiColor(33,39);var s=ansiColor(32,39);var o=new RegExp("(?:"+"(?:\\u001b\\[)|"+"\\u009b"+")"+"(?:"+"(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m]"+")|"+"\\u001b[A-M]","g");var l=["type","value","children","position"];function noColor(e,t){return stripColor(inspect(e,t))}function inspect(e,t){var r;var i;var n;var a;if(e&&Boolean(e.length)&&typeof e!=="string"){a=e.length;n=-1;r=[];while(++n|$))/i;var l=/<\/(script|pre|style)>/i;var f=/^/;var h=/^<\?/;var p=/\?>/;var v=/^/;var D=/^/;var g=/^$/;var E=new RegExp(i.source+"\\s*$");function blockHtml(e,t,r){var i=this;var A=i.options.blocks.join("|");var C=new RegExp("^|$))","i");var y=t.length;var w=0;var x;var b;var F;var S;var B;var k;var O;var P=[[o,l,true],[f,c,true],[h,p,true],[v,d,true],[D,m,true],[C,g,true],[E,g,false]];while(w0&&v.indenta){return}if(!m||!l&&u.charAt(c+1)===n){return}f=u.length+1;D="";while(++c0){const t=peek();if(!i.isHexDigit(t)){throw invalidChar(read())}e+=read()}return String.fromCodePoint(parseInt(e,16))}const E={start(){if(f.type==="eof"){throw invalidEOF()}push()},beforePropertyName(){switch(f.type){case"identifier":case"string":c=f.value;a="afterPropertyName";return;case"punctuator":pop();return;case"eof":throw invalidEOF()}},afterPropertyName(){if(f.type==="eof"){throw invalidEOF()}a="beforePropertyValue"},beforePropertyValue(){if(f.type==="eof"){throw invalidEOF()}push()},beforeArrayValue(){if(f.type==="eof"){throw invalidEOF()}if(f.type==="punctuator"&&f.value==="]"){pop();return}push()},afterPropertyValue(){if(f.type==="eof"){throw invalidEOF()}switch(f.value){case",":a="beforePropertyName";return;case"}":pop()}},afterArrayValue(){if(f.type==="eof"){throw invalidEOF()}switch(f.value){case",":a="beforeArrayValue";return;case"]":pop()}},end(){}};function push(){let e;switch(f.type){case"punctuator":switch(f.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=f.value;break}if(h===undefined){h=e}else{const t=u[u.length-1];if(Array.isArray(t)){t.push(e)}else{t[c]=e}}if(e!==null&&typeof e==="object"){u.push(e);if(Array.isArray(e)){a="beforeArrayValue"}else{a="beforePropertyName"}}else{const e=u[u.length-1];if(e==null){a="end"}else if(Array.isArray(e)){a="afterArrayValue"}else{a="afterPropertyValue"}}}function pop(){u.pop();const e=u[u.length-1];if(e==null){a="end"}else if(Array.isArray(e)){a="afterArrayValue"}else{a="afterPropertyValue"}}function invalidChar(e){if(e===undefined){return syntaxError(`JSON5: invalid end of input at ${o}:${l}`)}return syntaxError(`JSON5: invalid character '${formatChar(e)}' at ${o}:${l}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${o}:${l}`)}function invalidIdentifier(){l-=5;return syntaxError(`JSON5: invalid identifier character at ${o}:${l}`)}function separatorChar(e){console.warn(`JSON5: '${formatChar(e)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(e){const t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e]){return t[e]}if(e<" "){const t=e.charCodeAt(0).toString(16);return"\\x"+("00"+t).substring(t.length)}return e}function syntaxError(e){const t=new SyntaxError(e);t.lineNumber=o;t.columnNumber=l;return t}},,function(e,t,r){"use strict";var i=r(66);var n=r(589);var a=r(345);var u=r(347)("unified-engine:find-up");var s=r(692);e.exports=FindUp;var o=i.readFile;var l=n.resolve;var f=n.relative;var c=n.join;var h=n.dirname;FindUp.prototype.load=load;function FindUp(e){var t=this;var r=e.filePath;t.cache={};t.cwd=e.cwd;t.detect=e.detect;t.names=e.names;t.create=e.create;if(r){t.givenFilePath=l(e.cwd,r)}}function load(e,t){var r=this;var i=r.cache;var n=r.givenFilePath;var p=r.givenFile;var v=r.names;var d=r.create;var D=r.cwd;var m;if(n){if(p){apply(t,p)}else{p=[t];r.givenFile=p;u("Checking given file `%s`",n);o(n,loadGiven)}return}if(!r.detect){return t()}e=l(D,e);m=h(e);if(m in i){apply(t,i[m])}else{i[m]=[t];find(m)}function loadGiven(e,t){var i=r.givenFile;var s;if(e){s=a("Cannot read given file `%s`\n%s",f(D,n),e.stack);s.code="ENOENT";s.path=e.path;s.syscall=e.syscall}else{try{s=d(t,n);u("Read given file `%s`",n)}catch(e){s=a("Cannot parse given file `%s`\n%s",f(D,n),e.stack);u(e.message)}}p=s;r.givenFile=s;applyAll(i,s)}function find(t){var r=-1;var n=v.length;next();function next(){var a;if(++r{if(e)console.error(e);process.exit(t)})},,,,,,,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:code-block-style",codeBlockStyle);var s=a.start;var o=a.end;var l={null:true,fenced:true,indented:true};function codeBlockStyle(e,t,r){var i=String(t);r=typeof r==="string"&&r!=="consistent"?r:null;if(l[r]!==true){t.fail("Invalid code block style `"+r+"`: use either `'consistent'`, `'fenced'`, or `'indented'`")}n(e,"code",visitor);function visitor(e){var i=check(e);if(i){if(!r){r=i}else if(r!==i){t.message("Code blocks should be "+r,e)}}}function check(e){var t=s(e).offset;var r=o(e).offset;if(u(e)){return null}return e.lang||/^\s*([~`])\1{2,}/.test(i.slice(t,r))?"fenced":"indented"}}},,,function(e,t,r){"use strict";var i=r(589);var n=r(77);var a=r(289);e.exports=Ignore;Ignore.prototype.check=check;var u=i.dirname;var s=i.relative;var o=i.resolve;function Ignore(e){this.cwd=e.cwd;this.findUp=new a({filePath:e.ignorePath,cwd:e.cwd,detect:e.detectIgnore,names:e.ignoreName?[e.ignoreName]:[],create:create})}function check(e,t){var r=this;r.findUp.load(e,done);function done(i,n){var a;if(i){t(i)}else if(n){a=s(n.filePath,o(r.cwd,e));t(null,a?n.ignores(a):false)}else{t(null,false)}}}function create(e,t){var r=n().add(String(e));r.filePath=u(t);return r}},,,,function(e){e.exports={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"}},,,,function(e,t,r){"use strict";var i=r(54);e.exports=enclose;var n="(";var a=")";var u="<";var s=">";var o=/\s/;function enclose(e,t){if(t||e.length===0||o.test(e)||i(e,n)!==i(e,a)){return u+e+s}return e}},,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:table-pipes",tablePipes);var s=a.start;var o=a.end;var l="Missing initial pipe in table fence";var f="Missing final pipe in table fence";function tablePipes(e,t){var r=String(t);n(e,"table",visitor);function visitor(e){var i=e.children;var n=i.length;var a=-1;var c;var h;var p;var v;var d;var D;while(++a0?parseInt(t):null};for(;i1)return true;for(var a=0;athis.maxLength)return t();if(!this.stat&&m(this.cache,r)){var a=this.cache[r];if(Array.isArray(a))a="DIR";if(!n||a==="DIR")return t(null,a);if(n&&a==="FILE")return t()}var u;var s=this.statCache[r];if(s!==undefined){if(s===false)return t(null,s);else{var o=s.isDirectory()?"DIR":"FILE";if(n&&o==="FILE")return t();else return t(null,o,s)}}var l=this;var f=g("stat\0"+r,lstatcb_);if(f)i.lstat(r,f);function lstatcb_(n,a){if(a&&a.isSymbolicLink()){return i.stat(r,function(i,n){if(i)l._stat2(e,r,null,a,t);else l._stat2(e,r,i,n,t)})}else{l._stat2(e,r,n,a,t)}}};Glob.prototype._stat2=function(e,t,r,i,n){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[t]=false;return n()}var a=e.slice(-1)==="/";this.statCache[t]=i;if(t.slice(-1)==="/"&&i&&!i.isDirectory())return n(null,false,i);var u=true;if(i)u=i.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||u;if(a&&u==="FILE")return n();return n(null,u,i)}},function(e,t,r){"use strict";var i=r(36);var n=r(439);var a=r(934);var u=r(724);e.exports=paragraph;var s="\t";var o="\n";var l=" ";var f=4;function paragraph(e,t,r){var c=this;var h=c.options;var p=h.commonmark;var v=h.gfm;var d=c.blockTokenizers;var D=c.interruptParagraph;var m=t.indexOf(o);var g=t.length;var E;var A;var C;var y;var w;while(m=f&&C!==o){m=t.indexOf(o,m+1);continue}}A=t.slice(m+1);if(u(D,d,c,[e,A,true])){break}if(d.list.call(c,e,A,true)&&(c.inList||p||v&&!n(i.left(A).charAt(0)))){break}E=m;m=t.indexOf(o,m+1);if(m!==-1&&i(t.slice(E,m))===""){m=E;break}}A=t.slice(0,m);if(i(A)===""){e(A);return null}if(r){return true}w=e.now();A=a(A);return e(A)({type:"paragraph",children:c.tokenizeInline(A,w)})}},function(e,t,r){"use strict";var i;var n;try{var a=i;n=r(644)}catch(e){if(typeof window!=="undefined")n=window.esprima}var u=r(211);function resolveJavascriptFunction(e){if(e===null)return false;try{var t="("+e+")",r=n.parse(t,{range:true});if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression"){return false}return true}catch(e){return false}}function constructJavascriptFunction(e){var t="("+e+")",r=n.parse(t,{range:true}),i=[],a;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression"){throw new Error("Failed to resolve function")}r.body[0].expression.params.forEach(function(e){i.push(e.name)});a=r.body[0].expression.body.range;if(r.body[0].expression.body.type==="BlockStatement"){return new Function(i,t.slice(a[0]+1,a[1]-1))}return new Function(i,"return "+t.slice(a[0],a[1]))}function representJavascriptFunction(e){return e.toString()}function isFunction(e){return Object.prototype.toString.call(e)==="[object Function]"}e.exports=new u("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:resolveJavascriptFunction,construct:constructJavascriptFunction,predicate:isFunction,represent:representJavascriptFunction})},,,function(e,t,r){"use strict";var i=r(171);var n=r(984);var a=r(426);e.exports=reference;reference.locator=n;var u="link";var s="image";var o="footnote";var l="shortcut";var f="collapsed";var c="full";var h=" ";var p="!";var v="[";var d="\\";var D="]";var m="^";function reference(e,t,r){var n=this;var g=n.options.commonmark;var E=t.charAt(0);var A=0;var C=t.length;var y="";var w="";var x=u;var b=l;var F;var S;var B;var k;var O;var P;var T;var I;if(E===p){x=s;w=E;E=t.charAt(++A)}if(E!==v){return}A++;w+=E;P="";if(n.options.footnotes&&t.charAt(A)===m){if(x===s){return}w+=m;A++;x=o}I=0;while(A "+h.destination:""}if(!h.stats.total){p+=p?": ":"";if(h.stored){p+=m.yellow.open+"written"+m.yellow.close}else{p+="no issues found"}}if(p){l.push(p)}}else{g=m[h.label==="error"?"red":"yellow"];E=h.reason;A="";C=E.indexOf("\n");if(C!==-1){A=E.slice(C);E=E.slice(0,C)}l.push(["",padLeft(h.location,e.location),padRight(g.open+h.label+g.close,e.label),padRight(E,e.reason),padRight(h.ruleId,e.ruleId),h.source||""].join(" ").replace(c,"")+A)}}if(a.fatal||a.warn){p=[];if(a.fatal){p.push([m.red.open+f.error+m.red.close,a.fatal,plural(D.true,a.fatal)].join(" "))}if(a.warn){p.push([m.yellow.open+f.warning+m.yellow.close,a.warn,plural(D.false,a.warn)].join(" "))}p=p.join(", ");if(a.total!==a.fatal&&a.total!==a.warn){p=a.total+" messages ("+p+")"}l.push("",p)}return l.join("\n")}function applicable(e,t){var r=e.messages;var i=r.length;var n=-1;var a=[];if(t.silent){while(++n64)continue;if(t<0)return false;i+=6}return i%8===0}function constructYamlBinary(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,u=s,o=0,l=[];for(t=0;t>16&255);l.push(o>>8&255);l.push(o&255)}o=o<<6|u.indexOf(i.charAt(t))}r=a%4*6;if(r===0){l.push(o>>16&255);l.push(o>>8&255);l.push(o&255)}else if(r===18){l.push(o>>10&255);l.push(o>>2&255)}else if(r===12){l.push(o>>4&255)}if(n){return n.from?n.from(l):new n(l)}return l}function representYamlBinary(e){var t="",r=0,i,n,a=e.length,u=s;for(i=0;i>18&63];t+=u[r>>12&63];t+=u[r>>6&63];t+=u[r&63]}r=(r<<8)+e[i]}n=a%3;if(n===0){t+=u[r>>18&63];t+=u[r>>12&63];t+=u[r>>6&63];t+=u[r&63]}else if(n===2){t+=u[r>>10&63];t+=u[r>>4&63];t+=u[r<<2&63];t+=u[64]}else if(n===1){t+=u[r>>2&63];t+=u[r<<4&63];t+=u[64];t+=u[64]}return t}function isBinary(e){return n&&n.isBuffer(e)}e.exports=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},function(e){"use strict";var t=[].slice;e.exports=wrap;function wrap(e,r){var i;return wrapped;function wrapped(){var r=t.call(arguments,0);var n=e.length>r.length;var a;if(n){r.push(done)}try{a=e.apply(null,r)}catch(e){if(n&&i){throw e}return done(e)}if(!n){if(a&&typeof a.then==="function"){a.then(then,done)}else if(a instanceof Error){done(a)}else{then(a)}}}function done(){if(!i){i=true;r.apply(null,arguments)}}function then(e){done(null,e)}}},function(e){e.exports=extend;var t=Object.prototype.hasOwnProperty;function extend(){var e={};for(var r=0;ri){t.message("Move definitions to the end of the file (after the node at line `"+r+"`)",e)}}else if(r===null){r=i}}}},function(e){var t=Object.prototype.toString;e.exports=isString;function isString(e){return t.call(e)==="[object String]"}},function(e,t,r){"use strict";var i=r(874);e.exports=configure;function configure(e,t){e.configuration=new i(t)}},,,,function(e,t,r){"use strict";var i=r(323);var n=create(Error);e.exports=n;n.eval=create(EvalError);n.range=create(RangeError);n.reference=create(ReferenceError);n.syntax=create(SyntaxError);n.type=create(TypeError);n.uri=create(URIError);n.create=create;function create(e){FormattedError.displayName=e.displayName||e.name;return FormattedError;function FormattedError(t){if(t){t=i.apply(null,arguments)}return new e(t)}}},,function(e,t,r){"use strict";if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=r(470)}else{e.exports=r(970)}},function(e,t,r){var i=r(20);var n=r(491);e.exports=expandTop;var a="\0SLASH"+Math.random()+"\0";var u="\0OPEN"+Math.random()+"\0";var s="\0CLOSE"+Math.random()+"\0";var o="\0COMMA"+Math.random()+"\0";var l="\0PERIOD"+Math.random()+"\0";function numeric(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function escapeBraces(e){return e.split("\\\\").join(a).split("\\{").join(u).split("\\}").join(s).split("\\,").join(o).split("\\.").join(l)}function unescapeBraces(e){return e.split(a).join("\\").split(u).join("{").split(s).join("}").split(o).join(",").split(l).join(".")}function parseCommaParts(e){if(!e)return[""];var t=[];var r=n("{","}",e);if(!r)return e.split(",");var i=r.pre;var a=r.body;var u=r.post;var s=i.split(",");s[s.length-1]+="{"+a+"}";var o=parseCommaParts(u);if(u.length){s[s.length-1]+=o.shift();s.push.apply(s,o)}t.push.apply(t,s);return t}function expandTop(e){if(!e)return[];if(e.substr(0,2)==="{}"){e="\\{\\}"+e.substr(2)}return expand(escapeBraces(e),true).map(unescapeBraces)}function identity(e){return e}function embrace(e){return"{"+e+"}"}function isPadded(e){return/^-?0\d/.test(e)}function lte(e,t){return e<=t}function gte(e,t){return e>=t}function expand(e,t){var r=[];var a=n("{","}",e);if(!a||/\$$/.test(a.pre))return[e];var u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body);var o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body);var l=u||o;var f=a.body.indexOf(",")>=0;if(!l&&!f){if(a.post.match(/,.*\}/)){e=a.pre+"{"+a.body+s+a.post;return expand(e)}return[e]}var c;if(l){c=a.body.split(/\.\./)}else{c=parseCommaParts(a.body);if(c.length===1){c=expand(c[0],false).map(embrace);if(c.length===1){var h=a.post.length?expand(a.post,false):[""];return h.map(function(e){return a.pre+c[0]+e})}}}var p=a.pre;var h=a.post.length?expand(a.post,false):[""];var v;if(l){var d=numeric(c[0]);var D=numeric(c[1]);var m=Math.max(c[0].length,c[1].length);var g=c.length==3?Math.abs(numeric(c[2])):1;var E=lte;var A=D0){var b=new Array(x+1).join("0");if(y<0)w="-"+b+w.slice(1);else w=b+w}}}v.push(w)}}else{v=i(c,function(e){return expand(e,false)})}for(var F=0;F>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function utf8CheckIncomplete(e,t,r){var i=t.length-1;if(i=0){if(n>0)e.lastNeed=n-1;return n}if(--i=0){if(n>0)e.lastNeed=n-2;return n}if(--i=0){if(n>0){if(n===2)n=0;else e.lastNeed=n-3}return n}return 0}function utf8CheckExtraBytes(e,t,r){if((t[0]&192)!==128){e.lastNeed=0;return"�"}if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128){e.lastNeed=1;return"�"}if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128){e.lastNeed=2;return"�"}}}}function utf8FillLast(e){var t=this.lastTotal-this.lastNeed;var r=utf8CheckExtraBytes(this,e,t);if(r!==undefined)return r;if(this.lastNeed<=e.length){e.copy(this.lastChar,t,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,t,0,e.length);this.lastNeed-=e.length}function utf8Text(e,t){var r=utf8CheckIncomplete(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);e.copy(this.lastChar,0,i);return e.toString("utf8",t,i)}function utf8End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"�";return t}function utf16Text(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1];return r.slice(0,-1)}}return r}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=e[e.length-1];return e.toString("utf16le",t,e.length-1)}function utf16End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function base64Text(e,t){var r=(e.length-t)%3;if(r===0)return e.toString("base64",t);this.lastNeed=3-r;this.lastTotal=3;if(r===1){this.lastChar[0]=e[e.length-1]}else{this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1]}return e.toString("base64",t,e.length-r)}function base64End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):""}},,,,function(e,t,r){"use strict";var i=r(186);e.exports=VMessage;function VMessagePrototype(){}VMessagePrototype.prototype=Error.prototype;VMessage.prototype=new VMessagePrototype;var n=VMessage.prototype;n.file="";n.name="";n.reason="";n.message="";n.stack="";n.fatal=null;n.column=null;n.line=null;function VMessage(e,t,r){var n;var a;var u;if(typeof t==="string"){r=t;t=null}n=parseOrigin(r);a=i(t)||"1:1";u={start:{line:null,column:null},end:{line:null,column:null}};if(t&&t.position){t=t.position}if(t){if(t.start){u=t;t=t.start}else{u.start=t}}if(e.stack){this.stack=e.stack;e=e.message}this.message=e;this.name=a;this.reason=e;this.line=t?t.line:null;this.column=t?t.column:null;this.location=u;this.source=n[0];this.ruleId=n[1]}function parseOrigin(e){var t=[null,null];var r;if(typeof e==="string"){r=e.indexOf(":");if(r===-1){t[1]=e}else{t[0]=e.slice(0,r);t[1]=e.slice(r+1)}}return t}},,function(e,t,r){"use strict";var i=r(171);var n=r(902);var a=r(49);e.exports=autoLink;autoLink.locator=a;autoLink.notInLink=true;var u="<";var s=">";var o="@";var l="/";var f="mailto:";var c=f.length;function autoLink(e,t,r){var a=this;var h="";var p=t.length;var v=0;var d="";var D=false;var m="";var g;var E;var A;var C;var y;if(t.charAt(0)!==u){return}v++;h=u;while(v0||H===x&&I.inLink||M&&H===B&&t.charAt(W+1)===B||M&&H===S&&(I.inTable||alignment(t,W))||H===b&&W>0&&W=e.expected){e.emit("done")}}},,function(e,t,r){"use strict";var i=r(897);var n=r(336);var a=r(860);e.exports=parse;parse.Parser=a;function parse(e){var t=this.data("settings");var r=i(a);r.prototype.options=n(r.prototype.options,t,e);this.Parser=r}},,,,,,function(e,t,r){"use strict";var i=r(176);e.exports=imageReference;var n="[";var a="]";var u="!";function imageReference(e){return u+n+(this.encode(e.alt,e)||"")+a+i(e)}},,,,,,function(e,t,r){"use strict";var i=r(495);e.exports=i("remark-lint:no-file-name-consecutive-dashes",noFileNameConsecutiveDashes);var n="Do not use consecutive dashes in a file name";function noFileNameConsecutiveDashes(e,t){if(t.stem&&/-{2,}/.test(t.stem)){t.message(n)}}},,,,,,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:fenced-code-marker",fencedCodeMarker);var s={"`":true,"~":true,null:true};function fencedCodeMarker(e,t,r){var i=String(t);r=typeof r==="string"&&r!=="consistent"?r:null;if(s[r]!==true){t.fail("Invalid fenced code marker `"+r+"`: use either `'consistent'`, `` '`' ``, or `'~'`")}n(e,"code",visitor);function visitor(e){var n;if(!u(e)){n=i.substr(a.start(e).offset,4).trimLeft().charAt(0);if(s[n]===true){if(r){if(n!==r){t.message("Fenced code should use "+r+" as a marker",e)}}else{r=n}}}}}},,function(e,t,r){"use strict";var i=r(727);e.exports=new i({include:[r(95)],implicit:[r(788),r(900)],explicit:[r(334),r(157),r(697),r(713)]})},,,function(e){"use strict";e.exports=thematicBreak;var t="\t";var r="\n";var i=" ";var n="*";var a="-";var u="_";var s=3;function thematicBreak(e,o,l){var f=-1;var c=o.length+1;var h="";var p;var v;var d;var D;while(++f=s&&(!p||p===r)){h+=D;if(l){return true}return e(h)({type:"thematicBreak"})}else{return}}}},,function(e){e.exports=require("assert")},,,,,,,function(e,t,r){"use strict";var i=r(774);var n=r(176);e.exports=linkReference;var a="[";var u="]";var s="shortcut";var o="collapsed";function linkReference(e){var t=this;var r=e.referenceType;var l=t.enterLinkReference(t,e);var f=t.all(e).join("");l();if(r===s||r===o){f=i(f,e.label||e.identifier)}return a+f+u+n(e)}},function(e){"use strict";e.exports=lineBreak;var t="\\";var r="\n";var i=" ";var n=t+r;var a=i+i+r;function lineBreak(){return this.options.commonmark?n:a}},function(e,t,r){"use strict";function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var i=r(945).Buffer;var n=r(64);function copyBuffer(e,t,r){e.copy(t,r)}e.exports=function(){function BufferList(){_classCallCheck(this,BufferList);this.head=null;this.tail=null;this.length=0}BufferList.prototype.push=function push(e){var t={data:e,next:null};if(this.length>0)this.tail.next=t;else this.head=t;this.tail=t;++this.length};BufferList.prototype.unshift=function unshift(e){var t={data:e,next:this.head};if(this.length===0)this.tail=t;this.head=t;++this.length};BufferList.prototype.shift=function shift(){if(this.length===0)return;var e=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return e};BufferList.prototype.clear=function clear(){this.head=this.tail=null;this.length=0};BufferList.prototype.join=function join(e){if(this.length===0)return"";var t=this.head;var r=""+t.data;while(t=t.next){r+=e+t.data}return r};BufferList.prototype.concat=function concat(e){if(this.length===0)return i.alloc(0);if(this.length===1)return this.head.data;var t=i.allocUnsafe(e>>>0);var r=this.head;var n=0;while(r){copyBuffer(r.data,t,n);n+=r.data.length;r=r.next}return t};return BufferList}();if(n&&n.inspect&&n.inspect.custom){e.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e}}},function(e,t,r){"use strict";var i=r(336);var n=r(109);var a=r(694);e.exports=setOptions;function setOptions(e){var t=this;var r=t.options;var u;var s;if(e==null){e={}}else if(typeof e==="object"){e=i(e)}else{throw new Error("Invalid value `"+e+"` for setting `options`")}for(u in a){s=e[u];if(s==null){s=r[u]}if(u!=="blocks"&&typeof s!=="boolean"||u==="blocks"&&typeof s!=="object"){throw new Error("Invalid value `"+s+"` for setting `options."+u+"`")}e[u]=s}t.options=e;t.escape=n(e);return t}},,function(e){var t=Array.prototype.slice;e.exports=co;function co(e){var r=isGeneratorFunction(e);return function(i){var n=this;var a=e;if(r){var u=t.call(arguments),s=u.length;var o=s&&"function"==typeof u[s-1];i=o?u.pop():error;a=e.apply(this,u)}else{i=i||error}next();function exit(e,t){setImmediate(function(){i.call(n,e,t)})}function next(e,r){var i;if(arguments.length>2)r=t.call(arguments,1);if(e){try{i=a.throw(e)}catch(e){return exit(e)}}if(!e){try{i=a.next(r)}catch(e){return exit(e)}}if(i.done)return exit(null,i.value);i.value=toThunk(i.value,n);if("function"==typeof i.value){var u=false;try{i.value.call(n,function(){if(u)return;u=true;next.apply(n,arguments)})}catch(e){setImmediate(function(){if(u)return;u=true;next(e)})}return}next(new TypeError("You may only yield a function, promise, generator, array, or object, "+'but the following was passed: "'+String(i.value)+'"'))}}}function toThunk(e,t){if(isGeneratorFunction(e)){return co(e.call(t))}if(isGenerator(e)){return co(e)}if(isPromise(e)){return promiseToThunk(e)}if("function"==typeof e){return e}if(isObject(e)||Array.isArray(e)){return objectToThunk.call(t,e)}return e}function objectToThunk(e){var t=this;var r=Array.isArray(e);return function(i){var n=Object.keys(e);var a=n.length;var u=r?new Array(a):new e.constructor;var s;if(!a){setImmediate(function(){i(null,u)});return}if(!r){for(var o=0;or){t.splice(0,r);process.nextTick(function(){RES.apply(null,i)})}else{delete n[e]}}})}function slice(e){var t=e.length;var r=[];for(var i=0;ii){o+=" with 1 space, not "+u;if(size(a)=48&&t<=57}},function(e,t,r){"use strict";var i=r(308);var n=r(197);var a=r(25);var u=r(908);var s=r(617);e.exports=encode;encode.escape=escape;var o={}.hasOwnProperty;var l=['"',"'","<",">","&","`"];var f=construct();var c=toExpression(l);var h=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;var p=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g;function encode(e,t){var r=t||{};var i=r.subset;var n=i?toExpression(i):c;var a=r.escapeOnly;var u=r.omitOptionalSemicolons;e=e.replace(n,function(e,t,i){return one(e,i.charAt(t+1),r)});if(i||a){return e}return e.replace(h,replaceSurrogatePair).replace(p,replaceBmp);function replaceSurrogatePair(e,t,r){return toHexReference((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charAt(t+2),u)}function replaceBmp(e,t,i){return one(e,i.charAt(t+1),r)}}function escape(e){return encode(e,{escapeOnly:true,useNamedReferences:true})}function one(e,t,r){var i=r.useShortestReferences;var n=r.omitOptionalSemicolons;var a;var u;if((i||r.useNamedReferences)&&o.call(f,e)){a=toNamed(f[e],t,n,r.attribute)}if(i||!a){u=toHexReference(e.charCodeAt(0),t,n)}if(a&&(!i||a.length/i;function inlineHTML(e,t,r){var n=this;var h=t.length;var p;var v;if(t.charAt(0)!==u||h<3){return}p=t.charAt(1);if(!i(p)&&p!==s&&p!==o&&p!==l){return}v=t.match(a);if(!v){return}if(r){return true}v=v[0];if(!n.inLink&&f.test(v)){n.inLink=true}else if(n.inLink&&c.test(v)){n.inLink=false}return e(v)({type:"html",value:v})}},function(e){e.exports=["md","markdown","mdown","mkdn","mkd","mdwn","mkdown","ron"]},,,,function(e,t,r){"use strict";var i=r(495);e.exports=i("remark-lint:file-extension",fileExtension);function fileExtension(e,t,r){var i=t.extname;r=typeof r==="string"?r:"md";if(i&&i.slice(1)!==r){t.message("Invalid extension: use `"+r+"`")}}},function(e){"use strict";e.exports=factory;var t="\\";function factory(e,r){return unescape;function unescape(i){var n=0;var a=i.indexOf(t);var u=e[r];var s=[];var o;while(a!==-1){s.push(i.slice(n,a));n=a+1;o=i.charAt(n);if(!o||u.indexOf(o)===-1){s.push(t)}a=i.indexOf(t,n+1)}s.push(i.slice(n));return s.join("")}}},,,function(e,t,r){"use strict";const i=r(495);const n=r(682);e.exports=i("remark-lint:prohibited-strings",prohibitedStrings);function testProhibited(e,t){const r=new RegExp(`(\\.|@[a-z0-9/-]*)?(${e.no})(\\.\\w)?`,"g");let i=null;while(i=r.exec(t)){if(!i[1]&&!i[3]){return i[2]}}return false}function prohibitedStrings(e,t,r){n(e,"text",checkText);function checkText(e){const i=e.value;r.forEach(r=>{const n=testProhibited(r,i);if(n){t.message(`Use "${r.yes}" instead of "${n}"`,e)}})}}},,,,,function(e){"use strict";e.exports=hidden;function hidden(e){if(typeof e!=="string"){throw new Error("Expected string")}return e.charAt(0)==="."}},,,,,function(e,t,r){"use strict";var i=r(171);var n=r(426);e.exports=footnoteDefinition;footnoteDefinition.notInList=true;footnoteDefinition.notInBlock=true;var a="\\";var u="\n";var s="\t";var o=" ";var l="[";var f="]";var c="^";var h=":";var p=/^( {4}|\t)?/gm;function footnoteDefinition(e,t,r){var v=this;var d=v.offset;var D;var m;var g;var E;var A;var C;var y;var w;var x;var b;var F;var S;if(!v.options.footnotes){return}D=0;m=t.length;g="";E=e.now();A=E.line;while(D=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(t){t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0;var n=0;t[0].replace(/%[a-zA-Z%]/g,function(e){if(e==="%%"){return}i++;if(e==="%c"){n=i}});t.splice(n,0,r)}function log(){var e;return(typeof console==="undefined"?"undefined":_typeof(console))==="object"&&console.log&&(e=console).log.apply(e,arguments)}function save(e){try{if(e){t.storage.setItem("debug",e)}else{t.storage.removeItem("debug")}}catch(e){}}function load(){var e;try{e=t.storage.getItem("debug")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=r(772)(t);var i=e.exports.formatters;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},,,,function(e,t,r){var i=r(159);var n=r(589).join;var a=r(281);var u="/etc";var s=process.platform==="win32";var o=s?process.env.USERPROFILE:process.env.HOME;e.exports=function(e,t,l,f){if("string"!==typeof e)throw new Error("rc(name): name *must* be string");if(!l)l=r(359)(process.argv.slice(2));t=("string"===typeof t?i.json(t):t)||{};f=f||i.parse;var c=i.env(e+"_");var h=[t];var p=[];function addConfigFile(e){if(p.indexOf(e)>=0)return;var t=i.file(e);if(t){h.push(f(t));p.push(e)}}if(!s)[n(u,e,"config"),n(u,e+"rc")].forEach(addConfigFile);if(o)[n(o,".config",e,"config"),n(o,".config",e),n(o,"."+e,"config"),n(o,"."+e+"rc")].forEach(addConfigFile);addConfigFile(i.find("."+e+"rc"));if(c.config)addConfigFile(c.config);if(l.config)addConfigFile(l.config);return a.apply(null,h.concat([c,l,p.length?{configs:p,config:p[p.length-1]}:undefined]))}},,,,,,,,,,function(e){e.exports={name:"remark",version:"10.0.1",description:"Markdown processor powered by plugins",license:"MIT",keywords:["markdown","abstract","syntax","tree","ast","parse","stringify","process"],homepage:"https://remark.js.org",repository:"https://github.com/remarkjs/remark/tree/master/packages/remark",bugs:"https://github.com/remarkjs/remark/issues",author:"Titus Wormer (https://wooorm.com)",contributors:["Titus Wormer (https://wooorm.com)"],files:["index.js"],dependencies:{"remark-parse":"^6.0.0","remark-stringify":"^6.0.0",unified:"^7.0.0"},devDependencies:{tape:"^4.9.1"},scripts:{test:"tape test.js"},xo:false,_resolved:"https://registry.npmjs.org/remark/-/remark-10.0.1.tgz",_integrity:"sha512-E6lMuoLIy2TyiokHprMjcWNJ5UxfGQjaMSMhV+f4idM625UjjK4j798+gPs5mfjzDE6vL0oFKVeZM6gZVSVrzQ==",_from:"remark@10.0.1"}},function(e){e.exports=require("events")},,function(e,t,r){e.exports=globSync;globSync.GlobSync=GlobSync;var i=r(66);var n=r(129);var a=r(620);var u=a.Minimatch;var s=r(327).Glob;var o=r(64);var l=r(589);var f=r(393);var c=r(969);var h=r(922);var p=h.alphasort;var v=h.alphasorti;var d=h.setopts;var D=h.ownProp;var m=h.childrenIgnored;var g=h.isIgnored;function globSync(e,t){if(typeof t==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");return new GlobSync(e,t).found}function GlobSync(e,t){if(!e)throw new Error("must provide pattern");if(typeof t==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof GlobSync))return new GlobSync(e,t);d(this,e,t);if(this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var i=0;ithis.maxLength)return false;if(!this.stat&&D(this.cache,t)){var n=this.cache[t];if(Array.isArray(n))n="DIR";if(!r||n==="DIR")return n;if(r&&n==="FILE")return false}var a;var u=this.statCache[t];if(!u){var s;try{s=i.lstatSync(t)}catch(e){if(e&&(e.code==="ENOENT"||e.code==="ENOTDIR")){this.statCache[t]=false;return false}}if(s&&s.isSymbolicLink()){try{u=i.statSync(t)}catch(e){u=s}}else{u=s}}this.statCache[t]=u;var n=true;if(u)n=u.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||n;if(r&&n==="FILE")return false;return n};GlobSync.prototype._mark=function(e){return h.mark(this,e)};GlobSync.prototype._makeAbs=function(e){return h.makeAbs(this,e)}},,,,function(e){"use strict";e.exports=balanced;function balanced(e,t,r){if(e instanceof RegExp)e=maybeMatch(e,r);if(t instanceof RegExp)t=maybeMatch(t,r);var i=range(e,t,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+e.length,i[1]),post:r.slice(i[1]+t.length)}}function maybeMatch(e,t){var r=t.match(e);return r?r[0]:null}balanced.range=range;function range(e,t,r){var i,n,a,u,s;var o=r.indexOf(e);var l=r.indexOf(t,o+1);var f=o;if(o>=0&&l>0){i=[];a=r.length;while(f>=0&&!s){if(f==o){i.push(f);o=r.indexOf(e,f+1)}else if(i.length==1){s=[i.pop(),l]}else{n=i.pop();if(n=0?o:l}if(i.length){s=[a,u]}}return s}},,,,function(e,t,r){"use strict";var i=r(659);e.exports=factory;function factory(e,t){var r=e.split(":");var n=r[0];var a=r[1];var u=i(t);if(!a){a=n;n=null}attacher.displayName=e;return attacher;function attacher(e){var t=coerce(a,e);var r=t[0];var i=t[1];var s=r===2;return r?transformer:undefined;function transformer(e,t,r){var o=t.messages.length;u(e,t,i,done);function done(e){var i=t.messages;var u;if(e&&i.indexOf(e)===-1){try{t.fail(e)}catch(e){}}while(o2){throw new Error("Invalid severity `"+n+"` for `"+e+"`, "+"expected 0, 1, or 2")}i[0]=n;return i}},,,,,,,function(e,t,r){"use strict";e.exports=PassThrough;var i=r(955);var n=r(683);n.inherits=r(780);n.inherits(PassThrough,i);function PassThrough(e){if(!(this instanceof PassThrough))return new PassThrough(e);i.call(this,e)}PassThrough.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){"use strict";var i=r(353);var n=r(320);e.exports=n;var a=n.prototype;a.message=message;a.info=info;a.fail=fail;a.warn=message;function message(e,t,r){var n=this.path;var a=new i(e,t,r);if(n){a.name=n+":"+a.name;a.file=n}a.fatal=false;this.messages.push(a);return a}function fail(){var e=this.message.apply(this,arguments);e.fatal=true;throw e}function info(){var e=this.message.apply(this,arguments);e.fatal=null;return e}},,,,function(e,t,r){e.exports=r(64).deprecate},,,,function(e){"use strict";e.exports=locate;function locate(e,t){var r=e.indexOf("**",t);var i=e.indexOf("__",t);if(i===-1){return r}if(r===-1){return i}return ii&&e[c+1]!==" ";c=a}}else if(!isPrintable(u)){return j}h=h&&isPlainSafe(u)}o=o||l&&(a-c-1>i&&e[c+1]!==" ")}if(!s&&!o){return h&&!n(e)?I:M}if(r>9&&needIndentIndicator(e)){return j}return o?R:L}function writeScalar(e,t,r,i){e.dump=function(){if(t.length===0){return"''"}if(!e.noCompatMode&&T.indexOf(t)!==-1){return"'"+t+"'"}var a=e.indent*Math.max(1,r);var u=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a);var s=i||e.flowLevel>-1&&r>=e.flowLevel;function testAmbiguity(t){return testImplicitResolving(e,t)}switch(chooseScalarStyle(t,s,e.indent,u,testAmbiguity)){case I:return t;case M:return"'"+t.replace(/'/g,"''")+"'";case L:return"|"+blockHeader(t,e.indent)+dropEndingNewline(indentString(t,a));case R:return">"+blockHeader(t,e.indent)+dropEndingNewline(indentString(foldString(t,u),a));case j:return'"'+escapeString(t,u)+'"';default:throw new n("impossible error: invalid scalar style")}}()}function blockHeader(e,t){var r=needIndentIndicator(e)?String(t):"";var i=e[e.length-1]==="\n";var n=i&&(e[e.length-2]==="\n"||e==="\n");var a=n?"+":i?"":"-";return r+a+"\n"}function dropEndingNewline(e){return e[e.length-1]==="\n"?e.slice(0,-1):e}function foldString(e,t){var r=/(\n+)([^\n]*)/g;var i=function(){var i=e.indexOf("\n");i=i!==-1?i:e.length;r.lastIndex=i;return foldLine(e.slice(0,i),t)}();var n=e[0]==="\n"||e[0]===" ";var a;var u;while(u=r.exec(e)){var s=u[1],o=u[2];a=o[0]===" ";i+=s+(!n&&!a&&o!==""?"\n":"")+foldLine(o,t);n=a}return i}function foldLine(e,t){if(e===""||e[0]===" ")return e;var r=/ [^ ]/g;var i;var n=0,a,u=0,s=0;var o="";while(i=r.exec(e)){s=i.index;if(s-n>t){a=u>n?u:s;o+="\n"+e.slice(n,a);n=a+1}u=s}o+="\n";if(e.length-n>t&&u>n){o+=e.slice(n,u)+"\n"+e.slice(u+1)}else{o+=e.slice(n)}return o.slice(1)}function escapeString(e){var t="";var r,i;var n;for(var a=0;a=55296&&r<=56319){i=e.charCodeAt(a+1);if(i>=56320&&i<=57343){t+=encodeHex((r-55296)*1024+i-56320+65536);a++;continue}}n=P[r];t+=!n&&isPrintable(r)?e[a]:n||encodeHex(r)}return t}function writeFlowSequence(e,t,r){var i="",n=e.tag,a,u;for(a=0,u=r.length;a1024)f+="? ";f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" ");if(!writeNode(e,t,l,false,false)){continue}f+=e.dump;i+=f}e.tag=n;e.dump="{"+i+"}"}function writeBlockMapping(e,t,r,i){var a="",u=e.tag,s=Object.keys(r),o,l,c,h,p,v;if(e.sortKeys===true){s.sort()}else if(typeof e.sortKeys==="function"){s.sort(e.sortKeys)}else if(e.sortKeys){throw new n("sortKeys must be a boolean or a function")}for(o=0,l=s.length;o1024;if(p){if(e.dump&&f===e.dump.charCodeAt(0)){v+="?"}else{v+="? "}}v+=e.dump;if(p){v+=generateNextLine(e,t)}if(!writeNode(e,t+1,h,true,p)){continue}if(e.dump&&f===e.dump.charCodeAt(0)){v+=":"}else{v+=": "}v+=e.dump;a+=v}e.tag=u;e.dump=a||"{}"}function detectType(e,t,r){var i,a,u,l,f,c;a=r?e.explicitTypes:e.implicitTypes;for(u=0,l=a.length;u tag resolver accepts not "'+c+'" style')}e.dump=i}return true}}return false}function writeNode(e,t,r,i,a,u){e.tag=null;e.dump=r;if(!detectType(e,r,false)){detectType(e,r,true)}var o=s.call(e.dump);if(i){i=e.flowLevel<0||e.flowLevel>t}var l=o==="[object Object]"||o==="[object Array]",f,c;if(l){f=e.duplicates.indexOf(r);c=f!==-1}if(e.tag!==null&&e.tag!=="?"||c||e.indent!==2&&t>0){a=false}if(c&&e.usedDuplicates[f]){e.dump="*ref_"+f}else{if(l&&c&&!e.usedDuplicates[f]){e.usedDuplicates[f]=true}if(o==="[object Object]"){if(i&&Object.keys(e.dump).length!==0){writeBlockMapping(e,t,e.dump,a);if(c){e.dump="&ref_"+f+e.dump}}else{writeFlowMapping(e,t,e.dump);if(c){e.dump="&ref_"+f+" "+e.dump}}}else if(o==="[object Array]"){var h=e.noArrayIndent&&t>0?t-1:t;if(i&&e.dump.length!==0){writeBlockSequence(e,h,e.dump,a);if(c){e.dump="&ref_"+f+e.dump}}else{writeFlowSequence(e,h,e.dump);if(c){e.dump="&ref_"+f+" "+e.dump}}}else if(o==="[object String]"){if(e.tag!=="?"){writeScalar(e,e.dump,t,u)}}else{if(e.skipInvalid)return false;throw new n("unacceptable kind of an object to dump "+o)}if(e.tag!==null&&e.tag!=="?"){e.dump="!<"+e.tag+"> "+e.dump}}return true}function getDuplicateReferences(e,t){var r=[],i=[],n,a;inspectNode(e,r,i);for(n=0,a=i.length;n=e.length){if(t)t[u]=e;return r(null,e)}o.lastIndex=c;var i=o.exec(e);v=h;h+=i[0];p=v+i[1];c=o.lastIndex;if(f[p]||t&&t[p]===p){return process.nextTick(LOOP)}if(t&&Object.prototype.hasOwnProperty.call(t,p)){return gotResolvedLink(t[p])}return a.lstat(p,gotStat)}function gotStat(e,i){if(e)return r(e);if(!i.isSymbolicLink()){f[p]=true;if(t)t[p]=p;return process.nextTick(LOOP)}if(!n){var u=i.dev.toString(32)+":"+i.ino.toString(32);if(s.hasOwnProperty(u)){return gotTarget(null,s[u],p)}}a.stat(p,function(e){if(e)return r(e);a.readlink(p,function(e,t){if(!n)s[u]=t;gotTarget(e,t)})})}function gotTarget(e,n,a){if(e)return r(e);var u=i.resolve(v,n);if(t)t[a]=u;gotResolvedLink(u)}function gotResolvedLink(t){e=i.resolve(t,e.slice(c));start()}}},,function(e){e.exports=[{long:"help",description:"output usage information",short:"h",type:"boolean",default:false},{long:"version",description:"output version number",short:"v",type:"boolean",default:false},{long:"output",description:"specify output location",short:"o",value:"[path]"},{long:"rc-path",description:"specify configuration file",short:"r",type:"string",value:""},{long:"ignore-path",description:"specify ignore file",short:"i",type:"string",value:""},{long:"setting",description:"specify settings",short:"s",type:"string",value:""},{long:"ext",description:"specify extensions",short:"e",type:"string",value:""},{long:"use",description:"use plugins",short:"u",type:"string",value:""},{long:"watch",description:"watch for changes and reprocess",short:"w",type:"boolean",default:false},{long:"quiet",description:"output only warnings and errors",short:"q",type:"boolean",default:false},{long:"silent",description:"output only errors",short:"S",type:"boolean",default:false},{long:"frail",description:"exit with 1 on warnings",short:"f",type:"boolean",default:false},{long:"tree",description:"specify input and output as syntax tree",short:"t",type:"boolean",default:false},{long:"report",description:"specify reporter",type:"string",value:""},{long:"file-path",description:"specify path to process as",type:"string",value:""},{long:"tree-in",description:"specify input as syntax tree",type:"boolean"},{long:"tree-out",description:"output syntax tree",type:"boolean"},{long:"inspect",description:"output formatted syntax tree",type:"boolean"},{long:"stdout",description:"specify writing to stdout",type:"boolean",truelike:true},{long:"color",description:"specify color in report",type:"boolean",default:true},{long:"config",description:"search for configuration files",type:"boolean",default:true},{long:"ignore",description:"search for ignore files",type:"boolean",default:true}]},,,,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:hard-break-spaces",hardBreakSpaces);var s="Use two spaces for hard line breaks";function hardBreakSpaces(e,t){var r=String(t);n(e,"break",visitor);function visitor(e){var i;if(!u(e)){i=r.slice(a.start(e).offset,a.end(e).offset).split("\n",1)[0].replace(/\r$/,"");if(i.length>2){t.message(s,e)}}}}},,,,function(e,t,r){"use strict";var i=r(171);e.exports=table;var n="\t";var a="\n";var u=" ";var s="-";var o=":";var l="\\";var f="`";var c="|";var h=1;var p=2;var v="left";var d="center";var D="right";function table(e,t,r){var m=this;var g;var E;var A;var C;var y;var w;var x;var b;var F;var S;var B;var k;var O;var P;var T;var I;var M;var L;var R;var j;var U;var N;var J;var z;if(!m.options.gfm){return}g=0;L=0;w=t.length+1;x=[];while(gN){if(L1){if(F){C+=b.slice(0,b.length-1);b=b.charAt(b.length-1)}else{C+=b;b=""}}I=e.now();e(C)({type:"tableCell",children:m.tokenizeInline(k,I)},y)}e(b+F);b="";k=""}}else{if(b){k+=b;b=""}k+=F;if(F===l&&g!==w-2){k+=R.charAt(g+1);g++}if(F===f){P=1;while(R.charAt(g+1)===F){k+=F;g++;P++}if(!T){T=P}else if(P>=T){T=0}}}O=false;g++}if(!M){e(a+E)}}return U}},function(e,t,r){"use strict";var i=r(211);function resolveJavascriptRegExp(e){if(e===null)return false;if(e.length===0)return false;var t=e,r=/\/([gim]*)$/.exec(e),i="";if(t[0]==="/"){if(r)i=r[1];if(i.length>3)return false;if(t[t.length-i.length-1]!=="/")return false}return true}function constructJavascriptRegExp(e){var t=e,r=/\/([gim]*)$/.exec(e),i="";if(t[0]==="/"){if(r)i=r[1];t=t.slice(1,t.length-i.length-1)}return new RegExp(t,i)}function representJavascriptRegExp(e){var t="/"+e.source+"/";if(e.global)t+="g";if(e.multiline)t+="m";if(e.ignoreCase)t+="i";return t}function isRegExp(e){return Object.prototype.toString.call(e)==="[object RegExp]"}e.exports=new i("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp})},,,,,,,,,function(e){"use strict";e.exports=markdownTable;var t=/\./;var r=/\.[^.]*$/;var i="l";var n="r";var a="c";var u=".";var s="";var o=[i,n,a,u,s];var l=3;var f=":";var c="-";var h="|";var p=" ";var v="\n";function markdownTable(e,r){var d=r||{};var D=d.delimiter;var m=d.start;var g=d.end;var E=d.align;var A=d.stringLength||lengthNoop;var C=0;var y=-1;var w=e.length;var x=[];var b;var F;var S;var B;var k;var O;var P;var T;var I;var M;var L;var R;E=E?E.concat():[];if(D===null||D===undefined){D=p+h+p}if(m===null||m===undefined){m=h+p}if(g===null||g===undefined){g=p+h}while(++yC){C=B.length}while(++Ox[O]){x[O]=P}}}if(typeof E==="string"){E=pad(C,E).split("")}O=-1;while(++Ox[O]){x[O]=T}}}y=-1;while(++yl?M:l}else{M=x[O]}b=E[O];I=b===n||b===s?c:f;I+=pad(M-2,c);I+=b!==i&&b!==s?f:c;F[O]=I}S.splice(1,0,F.join(D))}return m+S.join(g+v+m)+g}function stringify(e){return e===null||e===undefined?"":String(e)}function lengthNoop(e){return String(e).length}function pad(e,t){return new Array(e+1).join(t||p)}function dotindex(e){var t=r.exec(e);return t?t.index+1:e.length}},,,,,function(e,t,r){e.exports=r(688)},,,,,function(e,t,r){"use strict";var i=r(12);e.exports=Writable;function WriteReq(e,t,r){this.chunk=e;this.encoding=t;this.callback=r;this.next=null}function CorkedRequest(e){var t=this;this.next=null;this.entry=null;this.finish=function(){onCorkedFinish(t,e)}}var n=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:i.nextTick;var a;Writable.WritableState=WritableState;var u=r(683);u.inherits=r(780);var s={deprecate:r(507)};var o=r(569);var l=r(945).Buffer;var f=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return l.from(e)}function _isUint8Array(e){return l.isBuffer(e)||e instanceof f}var c=r(972);u.inherits(Writable,o);function nop(){}function WritableState(e,t){a=a||r(98);e=e||{};var i=t instanceof a;this.objectMode=!!e.objectMode;if(i)this.objectMode=this.objectMode||!!e.writableObjectMode;var n=e.highWaterMark;var u=e.writableHighWaterMark;var s=this.objectMode?16:16*1024;if(n||n===0)this.highWaterMark=n;else if(i&&(u||u===0))this.highWaterMark=u;else this.highWaterMark=s;this.highWaterMark=Math.floor(this.highWaterMark);this.finalCalled=false;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;this.destroyed=false;var o=e.decodeStrings===false;this.decodeStrings=!o;this.defaultEncoding=e.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(e){onwrite(t,e)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var e=this.bufferedRequest;var t=[];while(e){t.push(e);e=e.next}return t};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}})();var h;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){h=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function(e){if(h.call(this,e))return true;if(this!==Writable)return false;return e&&e._writableState instanceof WritableState}})}else{h=function(e){return e instanceof this}}function Writable(e){a=a||r(98);if(!h.call(Writable,this)&&!(this instanceof a)){return new Writable(e)}this._writableState=new WritableState(e,this);this.writable=true;if(e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}o.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(e,t){var r=new Error("write after end");e.emit("error",r);i.nextTick(t,r)}function validChunk(e,t,r,n){var a=true;var u=false;if(r===null){u=new TypeError("May not write null values to stream")}else if(typeof r!=="string"&&r!==undefined&&!t.objectMode){u=new TypeError("Invalid non-string/buffer chunk")}if(u){e.emit("error",u);i.nextTick(n,u);a=false}return a}Writable.prototype.write=function(e,t,r){var i=this._writableState;var n=false;var a=!i.objectMode&&_isUint8Array(e);if(a&&!l.isBuffer(e)){e=_uint8ArrayToBuffer(e)}if(typeof t==="function"){r=t;t=null}if(a)t="buffer";else if(!t)t=i.defaultEncoding;if(typeof r!=="function")r=nop;if(i.ended)writeAfterEnd(this,r);else if(a||validChunk(this,i,e,r)){i.pendingcb++;n=writeOrBuffer(this,i,a,e,t,r)}return n};Writable.prototype.cork=function(){var e=this._writableState;e.corked++};Writable.prototype.uncork=function(){var e=this._writableState;if(e.corked){e.corked--;if(!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.bufferedRequest)clearBuffer(this,e)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(e){if(typeof e==="string")e=e.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e;return this};function decodeChunk(e,t,r){if(!e.objectMode&&e.decodeStrings!==false&&typeof t==="string"){t=l.from(t,r)}return t}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function writeOrBuffer(e,t,r,i,n,a){if(!r){var u=decodeChunk(t,i,n);if(i!==u){r=true;n="buffer";i=u}}var s=t.objectMode?1:i.length;t.length+=s;var o=t.length=b){b=0}}else if(E===v){g++;B+=t.charAt(g)}else if((!b||y)&&E===p){L++}else if((!b||y)&&E===d){if(L){L--}else{if(!A){while(gn){return false}}return check(e,i,r)&&check(e,m)}function isKnown(e,t,r){var i=o?o.indexOf(e)!==-1:true;if(!i){h.warn("Unknown rule: cannot "+t+" `'"+e+"'`",r)}return i}function getState(e){var t=e?D[e]:m;if(t&&t.length!==0){return t[t.length-1].state}if(!e){return!l}if(l){return f.indexOf(e)!==-1}return c.indexOf(e)===-1}function toggle(e,t,r){var i=r?D[r]:m;var n;var a;if(!i){i=[];D[r]=i}a=getState(r);n=t;if(n!==a){i.push({state:n,position:e})}if(!r){for(r in D){toggle(e,t,r)}}}function check(e,t,r){var i=t&&t.length;var n=-1;var a;while(--i>n){a=t[i];if(!a.position||!a.position.line||!a.position.column){continue}if(a.position.line=e){return}if(u){s.push({start:n,end:e});u=false}n=e}}},,function(e){"use strict";e.exports=orderedItems;var t="\n";var r=".";var i=t+t;function orderedItems(e){var n=this;var a=n.visitors.listItem;var u=n.options.incrementListMarker;var s=[];var o=e.start;var l=e.children;var f=l.length;var c=-1;var h;o=o==null?1:o;while(++c1;var p=c;var v=t.path;if(!u(p)){a("Not copying");return i()}p=l(e.cwd,p);a("Copying `%s`",v);s(p,onstatfile);function onstatfile(e,t){if(e){if(e.code!=="ENOENT"||c.charAt(c.length-1)===n.sep){return i(new Error("Cannot read output directory. Error:\n"+e.message))}s(o(p),onstatparent)}else{done(t.isDirectory())}}function onstatparent(e){if(e){i(new Error("Cannot read parent directory. Error:\n"+e.message))}else{done(false)}}function done(e){if(!e&&h){return i(new Error("Cannot write multiple files to single output: "+p))}t[e?"dirname":"path"]=f(t.cwd,p);a("Copying document from %s to %s",v,t.path);i()}}},function(e,t){"use strict";var r="[a-zA-Z_:][a-zA-Z0-9:._-]*";var i="[^\"'=<>`\\u0000-\\u0020]+";var n="'[^']*'";var a='"[^"]*"';var u="(?:"+i+"|"+n+"|"+a+")";var s="(?:\\s+"+r+"(?:\\s*=\\s*"+u+")?)";var o="<[A-Za-z][A-Za-z0-9\\-]*"+s+"*\\s*\\/?>";var l="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>";var f="\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e";var c="<[?].*?[?]>";var h="]*>";var p="";t.openCloseTag=new RegExp("^(?:"+o+"|"+l+")");t.tag=new RegExp("^(?:"+o+"|"+l+"|"+f+"|"+c+"|"+h+"|"+p+")")},,function(e){e.exports=require("path")},,,,function(e,t,r){"use strict";var i=r(36);var n=r(171);var a=r(511);e.exports=strong;strong.locator=a;var u="\\";var s="*";var o="_";function strong(e,t,r){var a=this;var l=0;var f=t.charAt(l);var c;var h;var p;var v;var d;var D;var m;if(f!==s&&f!==o||t.charAt(++l)!==f){return}h=a.options.pedantic;p=f;d=p+p;D=t.length;l++;v="";f="";if(h&&n(t.charAt(l))){return}while(l0){return parse(e)}else if(r==="number"&&isNaN(e)===false){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var s=/^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s){return}var o=parseFloat(s[1]);var l=(s[2]||"ms").toLowerCase();switch(l){case"years":case"year":case"yrs":case"yr":case"y":return o*u;case"weeks":case"week":case"w":return o*a;case"days":case"day":case"d":return o*n;case"hours":case"hour":case"hrs":case"hr":case"h":return o*i;case"minutes":case"minute":case"mins":case"min":case"m":return o*r;case"seconds":case"second":case"secs":case"sec":case"s":return o*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return undefined}}function fmtShort(e){var a=Math.abs(e);if(a>=n){return Math.round(e/n)+"d"}if(a>=i){return Math.round(e/i)+"h"}if(a>=r){return Math.round(e/r)+"m"}if(a>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var a=Math.abs(e);if(a>=n){return plural(e,a,n,"day")}if(a>=i){return plural(e,a,i,"hour")}if(a>=r){return plural(e,a,r,"minute")}if(a>=t){return plural(e,a,t,"second")}return e+" ms"}function plural(e,t,r,i){var n=t>=r*1.5;return Math.round(e/r)+" "+i+(n?"s":"")}},function(e,t){t.parse=t.decode=decode;t.stringify=t.encode=encode;t.safe=safe;t.unsafe=unsafe;var r=typeof process!=="undefined"&&process.platform==="win32"?"\r\n":"\n";function encode(e,t){var i=[];var n="";if(typeof t==="string"){t={section:t,whitespace:false}}else{t=t||{};t.whitespace=t.whitespace===true}var a=t.whitespace?" = ":"=";Object.keys(e).forEach(function(t,u,s){var o=e[t];if(o&&Array.isArray(o)){o.forEach(function(e){n+=safe(t+"[]")+a+safe(e)+"\n"})}else if(o&&typeof o==="object"){i.push(t)}else{n+=safe(t)+a+safe(o)+r}});if(t.section&&n.length){n="["+safe(t.section)+"]"+r+n}i.forEach(function(i,a,u){var s=dotSplit(i).join("\\.");var o=(t.section?t.section+".":"")+s;var l=encode(e[i],{section:o,whitespace:t.whitespace});if(n.length&&l.length){n+=r}n+=l});return n}function dotSplit(e){return e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function decode(e){var t={};var r=t;var i=null;var n=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;var a=e.split(/[\r\n]+/g);a.forEach(function(e,a,u){if(!e||e.match(/^\s*[;#]/))return;var s=e.match(n);if(!s)return;if(s[1]!==undefined){i=unsafe(s[1]);r=t[i]=t[i]||{};return}var o=unsafe(s[2]);var l=s[3]?unsafe(s[4]):true;switch(l){case"true":case"false":case"null":l=JSON.parse(l)}if(o.length>2&&o.slice(-2)==="[]"){o=o.substring(0,o.length-2);if(!r[o]){r[o]=[]}else if(!Array.isArray(r[o])){r[o]=[r[o]]}}if(Array.isArray(r[o])){r[o].push(l)}else{r[o]=l}});Object.keys(t).filter(function(e,r,i){if(!t[e]||typeof t[e]!=="object"||Array.isArray(t[e])){return false}var n=dotSplit(e);var a=t;var u=n.pop();var s=u.replace(/\\\./g,".");n.forEach(function(e,t,r){if(!a[e]||typeof a[e]!=="object")a[e]={};a=a[e]});if(a===t&&s===u){return false}a[s]=t[e];return true}).forEach(function(e,r,i){delete t[e]});return t}function isQuoted(e){return e.charAt(0)==='"'&&e.slice(-1)==='"'||e.charAt(0)==="'"&&e.slice(-1)==="'"}function safe(e){return typeof e!=="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&isQuoted(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#")}function unsafe(e,t){e=(e||"").trim();if(isQuoted(e)){if(e.charAt(0)==="'"){e=e.substr(1,e.length-2)}try{e=JSON.parse(e)}catch(e){}}else{var r=false;var i="";for(var n=0,a=e.length;n="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||i.ID_Start.test(e)},isIdContinueChar(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="‌"||e==="‍"||i.ID_Continue.test(e)},isDigit(e){return/[0-9]/.test(e)},isHexDigit(e){return/[0-9A-Fa-f]/.test(e)}}},,function(e){"use strict";e.exports=(e=>{if(Number.isNaN(e)){return false}if(e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)){return true}return false})},,,,,,,,,function(e,t,r){"use strict";e.exports.plugins=[r(889),r(424),r(725),r(137),r(339),r(767),r(550),r(550),[r(890),"space"],r(164),r(223),r(127),r(816),r(667),r(380),r(911),r(33),r(758),r(9),r(273),r(926),r(121),r(55),r(72),r(522),r(842),r(467),r(314),[r(166),2],[r(112),{checked:"x",unchecked:" "}],[r(301),"fenced"],[r(386),"`"],[r(451),"md"],[r(284),1],[r(675),"atx"],[r(455),[{no:"End-Of-Life",yes:"End-of-Life"},{no:"End-of-life",yes:"End-of-Life"},{no:"Github",yes:"GitHub"},{no:"Javascript",yes:"JavaScript"},{no:"Node.JS",yes:"Node.js"},{no:"Note that",yes:""},{no:"note that",yes:""},{no:"Rfc",yes:"RFC"},{no:"[Rr][Ff][Cc]\\d+",yes:"RFC "},{no:"rfc",yes:"RFC"},{no:"v8",yes:"V8"}]],[r(108),"*"],[r(435),"padded"]]},,function(e){e.exports=["cent","copy","divide","gt","lt","not","para","times"]},,function(e,t,r){"use strict";e.exports=r(447)},function(e,t,r){e.exports=minimatch;minimatch.Minimatch=Minimatch;var i={sep:"/"};try{i=r(589)}catch(e){}var n=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var a=r(348);var u={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var s="[^/]";var o=s+"*?";var l="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var f="(?:(?!(?:\\/|^)\\.).)*?";var c=charSet("().*{}+?[]^$\\!");function charSet(e){return e.split("").reduce(function(e,t){e[t]=true;return e},{})}var h=/\/+/;minimatch.filter=filter;function filter(e,t){t=t||{};return function(r,i,n){return minimatch(r,e,t)}}function ext(e,t){e=e||{};t=t||{};var r={};Object.keys(t).forEach(function(e){r[e]=t[e]});Object.keys(e).forEach(function(t){r[t]=e[t]});return r}minimatch.defaults=function(e){if(!e||!Object.keys(e).length)return minimatch;var t=minimatch;var r=function minimatch(r,i,n){return t.minimatch(r,i,ext(e,n))};r.Minimatch=function Minimatch(r,i){return new t.Minimatch(r,ext(e,i))};return r};Minimatch.defaults=function(e){if(!e||!Object.keys(e).length)return Minimatch;return minimatch.defaults(e).Minimatch};function minimatch(e,t,r){if(typeof t!=="string"){throw new TypeError("glob pattern string required")}if(!r)r={};if(!r.nocomment&&t.charAt(0)==="#"){return false}if(t.trim()==="")return e==="";return new Minimatch(t,r).match(e)}function Minimatch(e,t){if(!(this instanceof Minimatch)){return new Minimatch(e,t)}if(typeof e!=="string"){throw new TypeError("glob pattern string required")}if(!t)t={};e=e.trim();if(i.sep!=="/"){e=e.split(i.sep).join("/")}this.options=t;this.set=[];this.pattern=e;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){if(this._made)return;var e=this.pattern;var t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();var r=this.globSet=this.braceExpand();if(t.debug)this.debug=console.error;this.debug(this.pattern,r);r=this.globParts=r.map(function(e){return e.split(h)});this.debug(this.pattern,r);r=r.map(function(e,t,r){return e.map(this.parse,this)},this);this.debug(this.pattern,r);r=r.filter(function(e){return e.indexOf(false)===-1});this.debug(this.pattern,r);this.set=r}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var e=this.pattern;var t=false;var r=this.options;var i=0;if(r.nonegate)return;for(var n=0,a=e.length;n1024*64){throw new TypeError("pattern is too long")}var r=this.options;if(!r.noglobstar&&e==="**")return n;if(e==="")return"";var i="";var a=!!r.nocase;var l=false;var f=[];var h=[];var v;var d=false;var D=-1;var m=-1;var g=e.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var E=this;function clearStateChar(){if(v){switch(v){case"*":i+=o;a=true;break;case"?":i+=s;a=true;break;default:i+="\\"+v;break}E.debug("clearStateChar %j %j",v,i);v=false}}for(var A=0,C=e.length,y;A-1;k--){var O=h[k];var P=i.slice(0,O.reStart);var T=i.slice(O.reStart,O.reEnd-8);var I=i.slice(O.reEnd-8,O.reEnd);var M=i.slice(O.reEnd);I+=M;var L=P.split("(").length-1;var R=M;for(A=0;A=0;u--){a=e[u];if(a)break}for(u=0;u>> no match, partial?",e,c,t,h);if(c===s)return true}return false}var v;if(typeof l==="string"){if(i.nocase){v=f.toLowerCase()===l.toLowerCase()}else{v=f===l}this.debug("string match",l,f,v)}else{v=f.match(l);this.debug("pattern match",l,f,v)}if(!v)return false}if(a===s&&u===o){return true}else if(a===s){return r}else if(u===o){var d=a===s-1&&e[a]==="";return d}throw new Error("wtf?")};function globUnescape(e){return e.replace(/\\(.)/g,"$1")}function regExpEscape(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},,,function(e){"use strict";e.exports=function(e){if(typeof e!=="function"){throw new TypeError("Expected a function")}return e.displayName||e.name||(/function ([^\(]+)?\(/.exec(e.toString())||[])[1]||null}},function(e){"use strict";e.exports=(()=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");return new RegExp(e,"g")})},,,function(e,t,r){"use strict";var i=r(304);var n=r(948);e.exports=fileSystem;function fileSystem(e,t,r){var a=e.files;if(a.length===0){r()}else{n(a,{cwd:t.cwd,extensions:t.extensions,silentlyIgnore:t.silentlyIgnore,ignore:new i({cwd:t.cwd,detectIgnore:t.detectIgnore,ignoreName:t.ignoreName,ignorePath:t.ignorePath})},onfound)}function onfound(i,n){var a=n.files;a.sort(sortAlphabetically);a.forEach(markAsGiven);e.files=a;if(t.out===null||t.out===undefined){t.out=n.oneFileMode}r(i)}function markAsGiven(e){e.data.unifiedEngineGiven=true}function sortAlphabetically(e,t){return e.pathi){i=r}}else{r=1}n=a+1;a=e.indexOf(t,n)}return i}},function(e,t,r){"use strict";var i=r(347)("unified-engine:file-pipeline:stdout");var n=r(928);e.exports=stdout;function stdout(e,t,r,a){if(!t.data.unifiedEngineGiven){i("Ignoring programmatically added file");a()}else if(n(t).fatal||e.output||!e.out){i("Ignoring writing to `streamOut`");a()}else{i("Writing document to `streamOut`");e.streamOut.write(t.toString(),a)}}},,,function(e,t,r){"use strict";var i=r(56);var n=r(503);e.exports=toVFile;function toVFile(e){if(typeof e==="string"||i(e)){e={path:String(e)}}return n(e)}},,,,function(e){(function webpackUniversalModuleDefinition(t,r){if(true)e.exports=r();else{}})(this,function(){return function(e){var t={};function __webpack_require__(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:false};e[r].call(i.exports,i,i.exports,__webpack_require__);i.loaded=true;return i.exports}__webpack_require__.m=e;__webpack_require__.c=t;__webpack_require__.p="";return __webpack_require__(0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(1);var n=r(3);var a=r(8);var u=r(15);function parse(e,t,r){var u=null;var s=function(e,t){if(r){r(e,t)}if(u){u.visit(e,t)}};var o=typeof r==="function"?s:null;var l=false;if(t){l=typeof t.comment==="boolean"&&t.comment;var f=typeof t.attachComment==="boolean"&&t.attachComment;if(l||f){u=new i.CommentHandler;u.attach=f;t.comment=true;o=s}}var c=false;if(t&&typeof t.sourceType==="string"){c=t.sourceType==="module"}var h;if(t&&typeof t.jsx==="boolean"&&t.jsx){h=new n.JSXParser(e,t,o)}else{h=new a.Parser(e,t,o)}var p=c?h.parseModule():h.parseScript();var v=p;if(l&&u){v.comments=u.comments}if(h.config.tokens){v.tokens=h.tokens}if(h.config.tolerant){v.errors=h.errorHandler.errors}return v}t.parse=parse;function parseModule(e,t,r){var i=t||{};i.sourceType="module";return parse(e,i,r)}t.parseModule=parseModule;function parseScript(e,t,r){var i=t||{};i.sourceType="script";return parse(e,i,r)}t.parseScript=parseScript;function tokenize(e,t,r){var i=new u.Tokenizer(e,t);var n;n=[];try{while(true){var a=i.getNextToken();if(!a){break}if(r){a=r(a)}n.push(a)}}catch(e){i.errorHandler.tolerate(e)}if(i.errorHandler.tolerant){n.errors=i.errors()}return n}t.tokenize=tokenize;var s=r(2);t.Syntax=s.Syntax;t.version="4.0.1"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(2);var n=function(){function CommentHandler(){this.attach=false;this.comments=[];this.stack=[];this.leading=[];this.trailing=[]}CommentHandler.prototype.insertInnerComments=function(e,t){if(e.type===i.Syntax.BlockStatement&&e.body.length===0){var r=[];for(var n=this.leading.length-1;n>=0;--n){var a=this.leading[n];if(t.end.offset>=a.start){r.unshift(a.comment);this.leading.splice(n,1);this.trailing.splice(n,1)}}if(r.length){e.innerComments=r}}};CommentHandler.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var r=this.trailing.length-1;r>=0;--r){var i=this.trailing[r];if(i.start>=e.end.offset){t.unshift(i.comment)}}this.trailing.length=0;return t}var n=this.stack[this.stack.length-1];if(n&&n.node.trailingComments){var a=n.node.trailingComments[0];if(a&&a.range[0]>=e.end.offset){t=n.node.trailingComments;delete n.node.trailingComments}}return t};CommentHandler.prototype.findLeadingComments=function(e){var t=[];var r;while(this.stack.length>0){var i=this.stack[this.stack.length-1];if(i&&i.start>=e.start.offset){r=i.node;this.stack.pop()}else{break}}if(r){var n=r.leadingComments?r.leadingComments.length:0;for(var a=n-1;a>=0;--a){var u=r.leadingComments[a];if(u.range[1]<=e.start.offset){t.unshift(u);r.leadingComments.splice(a,1)}}if(r.leadingComments&&r.leadingComments.length===0){delete r.leadingComments}return t}for(var a=this.leading.length-1;a>=0;--a){var i=this.leading[a];if(i.start<=e.start.offset){t.unshift(i.comment);this.leading.splice(a,1)}}return t};CommentHandler.prototype.visitNode=function(e,t){if(e.type===i.Syntax.Program&&e.body.length>0){return}this.insertInnerComments(e,t);var r=this.findTrailingComments(t);var n=this.findLeadingComments(t);if(n.length>0){e.leadingComments=n}if(r.length>0){e.trailingComments=r}this.stack.push({node:e,start:t.start.offset})};CommentHandler.prototype.visitComment=function(e,t){var r=e.type[0]==="L"?"Line":"Block";var i={type:r,value:e.value};if(e.range){i.range=e.range}if(e.loc){i.loc=e.loc}this.comments.push(i);if(this.attach){var n={comment:{type:r,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};if(e.loc){n.comment.loc=e.loc}e.type=r;this.leading.push(n);this.trailing.push(n)}};CommentHandler.prototype.visit=function(e,t){if(e.type==="LineComment"){this.visitComment(e,t)}else if(e.type==="BlockComment"){this.visitComment(e,t)}else if(this.attach){this.visitNode(e,t)}};return CommentHandler}();t.CommentHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(t.hasOwnProperty(r))e[r]=t[r]};return function(t,r){e(t,r);function __(){this.constructor=t}t.prototype=r===null?Object.create(r):(__.prototype=r.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});var n=r(4);var a=r(5);var u=r(6);var s=r(7);var o=r(8);var l=r(13);var f=r(14);l.TokenName[100]="JSXIdentifier";l.TokenName[101]="JSXText";function getQualifiedElementName(e){var t;switch(e.type){case u.JSXSyntax.JSXIdentifier:var r=e;t=r.name;break;case u.JSXSyntax.JSXNamespacedName:var i=e;t=getQualifiedElementName(i.namespace)+":"+getQualifiedElementName(i.name);break;case u.JSXSyntax.JSXMemberExpression:var n=e;t=getQualifiedElementName(n.object)+"."+getQualifiedElementName(n.property);break;default:break}return t}var c=function(e){i(JSXParser,e);function JSXParser(t,r,i){return e.call(this,t,r,i)||this}JSXParser.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)};JSXParser.prototype.startJSX=function(){this.scanner.index=this.startMarker.index;this.scanner.lineNumber=this.startMarker.line;this.scanner.lineStart=this.startMarker.index-this.startMarker.column};JSXParser.prototype.finishJSX=function(){this.nextToken()};JSXParser.prototype.reenterJSX=function(){this.startJSX();this.expectJSX("}");if(this.config.tokens){this.tokens.pop()}};JSXParser.prototype.createJSXNode=function(){this.collectComments();return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}};JSXParser.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}};JSXParser.prototype.scanXHTMLEntity=function(e){var t="&";var r=true;var i=false;var a=false;var u=false;while(!this.scanner.eof()&&r&&!i){var s=this.scanner.source[this.scanner.index];if(s===e){break}i=s===";";t+=s;++this.scanner.index;if(!i){switch(t.length){case 2:a=s==="#";break;case 3:if(a){u=s==="x";r=u||n.Character.isDecimalDigit(s.charCodeAt(0));a=a&&!u}break;default:r=r&&!(a&&!n.Character.isDecimalDigit(s.charCodeAt(0)));r=r&&!(u&&!n.Character.isHexDigit(s.charCodeAt(0)));break}}}if(r&&i&&t.length>2){var o=t.substr(1,t.length-2);if(a&&o.length>1){t=String.fromCharCode(parseInt(o.substr(1),10))}else if(u&&o.length>2){t=String.fromCharCode(parseInt("0"+o.substr(1),16))}else if(!a&&!u&&f.XHTMLEntities[o]){t=f.XHTMLEntities[o]}}return t};JSXParser.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(e===60||e===62||e===47||e===58||e===61||e===123||e===125){var t=this.scanner.source[this.scanner.index++];return{type:7,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(e===34||e===39){var r=this.scanner.index;var i=this.scanner.source[this.scanner.index++];var a="";while(!this.scanner.eof()){var u=this.scanner.source[this.scanner.index++];if(u===i){break}else if(u==="&"){a+=this.scanXHTMLEntity(i)}else{a+=u}}return{type:8,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(e===46){var s=this.scanner.source.charCodeAt(this.scanner.index+1);var o=this.scanner.source.charCodeAt(this.scanner.index+2);var t=s===46&&o===46?"...":".";var r=this.scanner.index;this.scanner.index+=t.length;return{type:7,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(e===96){return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index}}if(n.Character.isIdentifierStart(e)&&e!==92){var r=this.scanner.index;++this.scanner.index;while(!this.scanner.eof()){var u=this.scanner.source.charCodeAt(this.scanner.index);if(n.Character.isIdentifierPart(u)&&u!==92){++this.scanner.index}else if(u===45){++this.scanner.index}else{break}}var l=this.scanner.source.slice(r,this.scanner.index);return{type:100,value:l,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}return this.scanner.lex()};JSXParser.prototype.nextJSXToken=function(){this.collectComments();this.startMarker.index=this.scanner.index;this.startMarker.line=this.scanner.lineNumber;this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;if(this.config.tokens){this.tokens.push(this.convertToken(e))}return e};JSXParser.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index;this.startMarker.line=this.scanner.lineNumber;this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.scanner.index;var t="";while(!this.scanner.eof()){var r=this.scanner.source[this.scanner.index];if(r==="{"||r==="<"){break}++this.scanner.index;t+=r;if(n.Character.isLineTerminator(r.charCodeAt(0))){++this.scanner.lineNumber;if(r==="\r"&&this.scanner.source[this.scanner.index]==="\n"){++this.scanner.index}this.scanner.lineStart=this.scanner.index}}this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var i={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};if(t.length>0&&this.config.tokens){this.tokens.push(this.convertToken(i))}return i};JSXParser.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();this.scanner.restoreState(e);return t};JSXParser.prototype.expectJSX=function(e){var t=this.nextJSXToken();if(t.type!==7||t.value!==e){this.throwUnexpectedToken(t)}};JSXParser.prototype.matchJSX=function(e){var t=this.peekJSXToken();return t.type===7&&t.value===e};JSXParser.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode();var t=this.nextJSXToken();if(t.type!==100){this.throwUnexpectedToken(t)}return this.finalize(e,new a.JSXIdentifier(t.value))};JSXParser.prototype.parseJSXElementName=function(){var e=this.createJSXNode();var t=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=t;this.expectJSX(":");var i=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(r,i))}else if(this.matchJSX(".")){while(this.matchJSX(".")){var n=t;this.expectJSX(".");var u=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXMemberExpression(n,u))}}return t};JSXParser.prototype.parseJSXAttributeName=function(){var e=this.createJSXNode();var t;var r=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=r;this.expectJSX(":");var n=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(i,n))}else{t=r}return t};JSXParser.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode();var t=this.nextJSXToken();if(t.type!==8){this.throwUnexpectedToken(t)}var r=this.getTokenRaw(t);return this.finalize(e,new s.Literal(t.value,r))};JSXParser.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{");this.finishJSX();if(this.match("}")){this.tolerateError("JSX attributes must only be assigned a non-empty expression")}var t=this.parseAssignmentExpression();this.reenterJSX();return this.finalize(e,new a.JSXExpressionContainer(t))};JSXParser.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()};JSXParser.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode();var t=this.parseJSXAttributeName();var r=null;if(this.matchJSX("=")){this.expectJSX("=");r=this.parseJSXAttributeValue()}return this.finalize(e,new a.JSXAttribute(t,r))};JSXParser.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{");this.expectJSX("...");this.finishJSX();var t=this.parseAssignmentExpression();this.reenterJSX();return this.finalize(e,new a.JSXSpreadAttribute(t))};JSXParser.prototype.parseJSXAttributes=function(){var e=[];while(!this.matchJSX("/")&&!this.matchJSX(">")){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e};JSXParser.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName();var r=this.parseJSXAttributes();var i=this.matchJSX("/");if(i){this.expectJSX("/")}this.expectJSX(">");return this.finalize(e,new a.JSXOpeningElement(t,i,r))};JSXParser.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();this.expectJSX("<");if(this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();this.expectJSX(">");return this.finalize(e,new a.JSXClosingElement(t))}var r=this.parseJSXElementName();var i=this.parseJSXAttributes();var n=this.matchJSX("/");if(n){this.expectJSX("/")}this.expectJSX(">");return this.finalize(e,new a.JSXOpeningElement(r,n,i))};JSXParser.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();this.collectComments();this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;return this.finalize(e,new a.JSXEmptyExpression)};JSXParser.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;if(this.matchJSX("}")){t=this.parseJSXEmptyExpression();this.expectJSX("}")}else{this.finishJSX();t=this.parseAssignmentExpression();this.reenterJSX()}return this.finalize(e,new a.JSXExpressionContainer(t))};JSXParser.prototype.parseJSXChildren=function(){var e=[];while(!this.scanner.eof()){var t=this.createJSXChildNode();var r=this.nextJSXText();if(r.start0){var s=this.finalize(e.node,new a.JSXElement(e.opening,e.children,e.closing));e=t[t.length-1];e.children.push(s);t.pop()}else{break}}}return e};JSXParser.prototype.parseJSXElement=function(){var e=this.createJSXNode();var t=this.parseJSXOpeningElement();var r=[];var i=null;if(!t.selfClosing){var n=this.parseComplexJSXElement({node:e,opening:t,closing:i,children:r});r=n.children;i=n.closing}return this.finalize(e,new a.JSXElement(t,r,i))};JSXParser.prototype.parseJSXRoot=function(){if(this.config.tokens){this.tokens.pop()}this.startJSX();var e=this.parseJSXElement();this.finishJSX();return e};JSXParser.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")};return JSXParser}(o.Parser);t.JSXParser=c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return e===32||e===9||e===11||e===12||e===160||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return e===10||e===13||e===8232||e===8233},isIdentifierStart:function(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e===92||e>=128&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===92||e>=128&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(6);var n=function(){function JSXClosingElement(e){this.type=i.JSXSyntax.JSXClosingElement;this.name=e}return JSXClosingElement}();t.JSXClosingElement=n;var a=function(){function JSXElement(e,t,r){this.type=i.JSXSyntax.JSXElement;this.openingElement=e;this.children=t;this.closingElement=r}return JSXElement}();t.JSXElement=a;var u=function(){function JSXEmptyExpression(){this.type=i.JSXSyntax.JSXEmptyExpression}return JSXEmptyExpression}();t.JSXEmptyExpression=u;var s=function(){function JSXExpressionContainer(e){this.type=i.JSXSyntax.JSXExpressionContainer;this.expression=e}return JSXExpressionContainer}();t.JSXExpressionContainer=s;var o=function(){function JSXIdentifier(e){this.type=i.JSXSyntax.JSXIdentifier;this.name=e}return JSXIdentifier}();t.JSXIdentifier=o;var l=function(){function JSXMemberExpression(e,t){this.type=i.JSXSyntax.JSXMemberExpression;this.object=e;this.property=t}return JSXMemberExpression}();t.JSXMemberExpression=l;var f=function(){function JSXAttribute(e,t){this.type=i.JSXSyntax.JSXAttribute;this.name=e;this.value=t}return JSXAttribute}();t.JSXAttribute=f;var c=function(){function JSXNamespacedName(e,t){this.type=i.JSXSyntax.JSXNamespacedName;this.namespace=e;this.name=t}return JSXNamespacedName}();t.JSXNamespacedName=c;var h=function(){function JSXOpeningElement(e,t,r){this.type=i.JSXSyntax.JSXOpeningElement;this.name=e;this.selfClosing=t;this.attributes=r}return JSXOpeningElement}();t.JSXOpeningElement=h;var p=function(){function JSXSpreadAttribute(e){this.type=i.JSXSyntax.JSXSpreadAttribute;this.argument=e}return JSXSpreadAttribute}();t.JSXSpreadAttribute=p;var v=function(){function JSXText(e,t){this.type=i.JSXSyntax.JSXText;this.value=e;this.raw=t}return JSXText}();t.JSXText=v},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(2);var n=function(){function ArrayExpression(e){this.type=i.Syntax.ArrayExpression;this.elements=e}return ArrayExpression}();t.ArrayExpression=n;var a=function(){function ArrayPattern(e){this.type=i.Syntax.ArrayPattern;this.elements=e}return ArrayPattern}();t.ArrayPattern=a;var u=function(){function ArrowFunctionExpression(e,t,r){this.type=i.Syntax.ArrowFunctionExpression;this.id=null;this.params=e;this.body=t;this.generator=false;this.expression=r;this.async=false}return ArrowFunctionExpression}();t.ArrowFunctionExpression=u;var s=function(){function AssignmentExpression(e,t,r){this.type=i.Syntax.AssignmentExpression;this.operator=e;this.left=t;this.right=r}return AssignmentExpression}();t.AssignmentExpression=s;var o=function(){function AssignmentPattern(e,t){this.type=i.Syntax.AssignmentPattern;this.left=e;this.right=t}return AssignmentPattern}();t.AssignmentPattern=o;var l=function(){function AsyncArrowFunctionExpression(e,t,r){this.type=i.Syntax.ArrowFunctionExpression;this.id=null;this.params=e;this.body=t;this.generator=false;this.expression=r;this.async=true}return AsyncArrowFunctionExpression}();t.AsyncArrowFunctionExpression=l;var f=function(){function AsyncFunctionDeclaration(e,t,r){this.type=i.Syntax.FunctionDeclaration;this.id=e;this.params=t;this.body=r;this.generator=false;this.expression=false;this.async=true}return AsyncFunctionDeclaration}();t.AsyncFunctionDeclaration=f;var c=function(){function AsyncFunctionExpression(e,t,r){this.type=i.Syntax.FunctionExpression;this.id=e;this.params=t;this.body=r;this.generator=false;this.expression=false;this.async=true}return AsyncFunctionExpression}();t.AsyncFunctionExpression=c;var h=function(){function AwaitExpression(e){this.type=i.Syntax.AwaitExpression;this.argument=e}return AwaitExpression}();t.AwaitExpression=h;var p=function(){function BinaryExpression(e,t,r){var n=e==="||"||e==="&&";this.type=n?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression;this.operator=e;this.left=t;this.right=r}return BinaryExpression}();t.BinaryExpression=p;var v=function(){function BlockStatement(e){this.type=i.Syntax.BlockStatement;this.body=e}return BlockStatement}();t.BlockStatement=v;var d=function(){function BreakStatement(e){this.type=i.Syntax.BreakStatement;this.label=e}return BreakStatement}();t.BreakStatement=d;var D=function(){function CallExpression(e,t){this.type=i.Syntax.CallExpression;this.callee=e;this.arguments=t}return CallExpression}();t.CallExpression=D;var m=function(){function CatchClause(e,t){this.type=i.Syntax.CatchClause;this.param=e;this.body=t}return CatchClause}();t.CatchClause=m;var g=function(){function ClassBody(e){this.type=i.Syntax.ClassBody;this.body=e}return ClassBody}();t.ClassBody=g;var E=function(){function ClassDeclaration(e,t,r){this.type=i.Syntax.ClassDeclaration;this.id=e;this.superClass=t;this.body=r}return ClassDeclaration}();t.ClassDeclaration=E;var A=function(){function ClassExpression(e,t,r){this.type=i.Syntax.ClassExpression;this.id=e;this.superClass=t;this.body=r}return ClassExpression}();t.ClassExpression=A;var C=function(){function ComputedMemberExpression(e,t){this.type=i.Syntax.MemberExpression;this.computed=true;this.object=e;this.property=t}return ComputedMemberExpression}();t.ComputedMemberExpression=C;var y=function(){function ConditionalExpression(e,t,r){this.type=i.Syntax.ConditionalExpression;this.test=e;this.consequent=t;this.alternate=r}return ConditionalExpression}();t.ConditionalExpression=y;var w=function(){function ContinueStatement(e){this.type=i.Syntax.ContinueStatement;this.label=e}return ContinueStatement}();t.ContinueStatement=w;var x=function(){function DebuggerStatement(){this.type=i.Syntax.DebuggerStatement}return DebuggerStatement}();t.DebuggerStatement=x;var b=function(){function Directive(e,t){this.type=i.Syntax.ExpressionStatement;this.expression=e;this.directive=t}return Directive}();t.Directive=b;var F=function(){function DoWhileStatement(e,t){this.type=i.Syntax.DoWhileStatement;this.body=e;this.test=t}return DoWhileStatement}();t.DoWhileStatement=F;var S=function(){function EmptyStatement(){this.type=i.Syntax.EmptyStatement}return EmptyStatement}();t.EmptyStatement=S;var B=function(){function ExportAllDeclaration(e){this.type=i.Syntax.ExportAllDeclaration;this.source=e}return ExportAllDeclaration}();t.ExportAllDeclaration=B;var k=function(){function ExportDefaultDeclaration(e){this.type=i.Syntax.ExportDefaultDeclaration;this.declaration=e}return ExportDefaultDeclaration}();t.ExportDefaultDeclaration=k;var O=function(){function ExportNamedDeclaration(e,t,r){this.type=i.Syntax.ExportNamedDeclaration;this.declaration=e;this.specifiers=t;this.source=r}return ExportNamedDeclaration}();t.ExportNamedDeclaration=O;var P=function(){function ExportSpecifier(e,t){this.type=i.Syntax.ExportSpecifier;this.exported=t;this.local=e}return ExportSpecifier}();t.ExportSpecifier=P;var T=function(){function ExpressionStatement(e){this.type=i.Syntax.ExpressionStatement;this.expression=e}return ExpressionStatement}();t.ExpressionStatement=T;var I=function(){function ForInStatement(e,t,r){this.type=i.Syntax.ForInStatement;this.left=e;this.right=t;this.body=r;this.each=false}return ForInStatement}();t.ForInStatement=I;var M=function(){function ForOfStatement(e,t,r){this.type=i.Syntax.ForOfStatement;this.left=e;this.right=t;this.body=r}return ForOfStatement}();t.ForOfStatement=M;var L=function(){function ForStatement(e,t,r,n){this.type=i.Syntax.ForStatement;this.init=e;this.test=t;this.update=r;this.body=n}return ForStatement}();t.ForStatement=L;var R=function(){function FunctionDeclaration(e,t,r,n){this.type=i.Syntax.FunctionDeclaration;this.id=e;this.params=t;this.body=r;this.generator=n;this.expression=false;this.async=false}return FunctionDeclaration}();t.FunctionDeclaration=R;var j=function(){function FunctionExpression(e,t,r,n){this.type=i.Syntax.FunctionExpression;this.id=e;this.params=t;this.body=r;this.generator=n;this.expression=false;this.async=false}return FunctionExpression}();t.FunctionExpression=j;var U=function(){function Identifier(e){this.type=i.Syntax.Identifier;this.name=e}return Identifier}();t.Identifier=U;var N=function(){function IfStatement(e,t,r){this.type=i.Syntax.IfStatement;this.test=e;this.consequent=t;this.alternate=r}return IfStatement}();t.IfStatement=N;var J=function(){function ImportDeclaration(e,t){this.type=i.Syntax.ImportDeclaration;this.specifiers=e;this.source=t}return ImportDeclaration}();t.ImportDeclaration=J;var z=function(){function ImportDefaultSpecifier(e){this.type=i.Syntax.ImportDefaultSpecifier;this.local=e}return ImportDefaultSpecifier}();t.ImportDefaultSpecifier=z;var X=function(){function ImportNamespaceSpecifier(e){this.type=i.Syntax.ImportNamespaceSpecifier;this.local=e}return ImportNamespaceSpecifier}();t.ImportNamespaceSpecifier=X;var G=function(){function ImportSpecifier(e,t){this.type=i.Syntax.ImportSpecifier;this.local=e;this.imported=t}return ImportSpecifier}();t.ImportSpecifier=G;var q=function(){function LabeledStatement(e,t){this.type=i.Syntax.LabeledStatement;this.label=e;this.body=t}return LabeledStatement}();t.LabeledStatement=q;var W=function(){function Literal(e,t){this.type=i.Syntax.Literal;this.value=e;this.raw=t}return Literal}();t.Literal=W;var _=function(){function MetaProperty(e,t){this.type=i.Syntax.MetaProperty;this.meta=e;this.property=t}return MetaProperty}();t.MetaProperty=_;var V=function(){function MethodDefinition(e,t,r,n,a){this.type=i.Syntax.MethodDefinition;this.key=e;this.computed=t;this.value=r;this.kind=n;this.static=a}return MethodDefinition}();t.MethodDefinition=V;var Y=function(){function Module(e){this.type=i.Syntax.Program;this.body=e;this.sourceType="module"}return Module}();t.Module=Y;var H=function(){function NewExpression(e,t){this.type=i.Syntax.NewExpression;this.callee=e;this.arguments=t}return NewExpression}();t.NewExpression=H;var $=function(){function ObjectExpression(e){this.type=i.Syntax.ObjectExpression;this.properties=e}return ObjectExpression}();t.ObjectExpression=$;var Z=function(){function ObjectPattern(e){this.type=i.Syntax.ObjectPattern;this.properties=e}return ObjectPattern}();t.ObjectPattern=Z;var Q=function(){function Property(e,t,r,n,a,u){this.type=i.Syntax.Property;this.key=t;this.computed=r;this.value=n;this.kind=e;this.method=a;this.shorthand=u}return Property}();t.Property=Q;var K=function(){function RegexLiteral(e,t,r,n){this.type=i.Syntax.Literal;this.value=e;this.raw=t;this.regex={pattern:r,flags:n}}return RegexLiteral}();t.RegexLiteral=K;var ee=function(){function RestElement(e){this.type=i.Syntax.RestElement;this.argument=e}return RestElement}();t.RestElement=ee;var te=function(){function ReturnStatement(e){this.type=i.Syntax.ReturnStatement;this.argument=e}return ReturnStatement}();t.ReturnStatement=te;var re=function(){function Script(e){this.type=i.Syntax.Program;this.body=e;this.sourceType="script"}return Script}();t.Script=re;var ie=function(){function SequenceExpression(e){this.type=i.Syntax.SequenceExpression;this.expressions=e}return SequenceExpression}();t.SequenceExpression=ie;var ne=function(){function SpreadElement(e){this.type=i.Syntax.SpreadElement;this.argument=e}return SpreadElement}();t.SpreadElement=ne;var ae=function(){function StaticMemberExpression(e,t){this.type=i.Syntax.MemberExpression;this.computed=false;this.object=e;this.property=t}return StaticMemberExpression}();t.StaticMemberExpression=ae;var ue=function(){function Super(){this.type=i.Syntax.Super}return Super}();t.Super=ue;var se=function(){function SwitchCase(e,t){this.type=i.Syntax.SwitchCase;this.test=e;this.consequent=t}return SwitchCase}();t.SwitchCase=se;var oe=function(){function SwitchStatement(e,t){this.type=i.Syntax.SwitchStatement;this.discriminant=e;this.cases=t}return SwitchStatement}();t.SwitchStatement=oe;var le=function(){function TaggedTemplateExpression(e,t){this.type=i.Syntax.TaggedTemplateExpression;this.tag=e;this.quasi=t}return TaggedTemplateExpression}();t.TaggedTemplateExpression=le;var fe=function(){function TemplateElement(e,t){this.type=i.Syntax.TemplateElement;this.value=e;this.tail=t}return TemplateElement}();t.TemplateElement=fe;var ce=function(){function TemplateLiteral(e,t){this.type=i.Syntax.TemplateLiteral;this.quasis=e;this.expressions=t}return TemplateLiteral}();t.TemplateLiteral=ce;var he=function(){function ThisExpression(){this.type=i.Syntax.ThisExpression}return ThisExpression}();t.ThisExpression=he;var pe=function(){function ThrowStatement(e){this.type=i.Syntax.ThrowStatement;this.argument=e}return ThrowStatement}();t.ThrowStatement=pe;var ve=function(){function TryStatement(e,t,r){this.type=i.Syntax.TryStatement;this.block=e;this.handler=t;this.finalizer=r}return TryStatement}();t.TryStatement=ve;var de=function(){function UnaryExpression(e,t){this.type=i.Syntax.UnaryExpression;this.operator=e;this.argument=t;this.prefix=true}return UnaryExpression}();t.UnaryExpression=de;var De=function(){function UpdateExpression(e,t,r){this.type=i.Syntax.UpdateExpression;this.operator=e;this.argument=t;this.prefix=r}return UpdateExpression}();t.UpdateExpression=De;var me=function(){function VariableDeclaration(e,t){this.type=i.Syntax.VariableDeclaration;this.declarations=e;this.kind=t}return VariableDeclaration}();t.VariableDeclaration=me;var ge=function(){function VariableDeclarator(e,t){this.type=i.Syntax.VariableDeclarator;this.id=e;this.init=t}return VariableDeclarator}();t.VariableDeclarator=ge;var Ee=function(){function WhileStatement(e,t){this.type=i.Syntax.WhileStatement;this.test=e;this.body=t}return WhileStatement}();t.WhileStatement=Ee;var Ae=function(){function WithStatement(e,t){this.type=i.Syntax.WithStatement;this.object=e;this.body=t}return WithStatement}();t.WithStatement=Ae;var Ce=function(){function YieldExpression(e,t){this.type=i.Syntax.YieldExpression;this.argument=e;this.delegate=t}return YieldExpression}();t.YieldExpression=Ce},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(9);var n=r(10);var a=r(11);var u=r(7);var s=r(12);var o=r(2);var l=r(13);var f="ArrowParameterPlaceHolder";var c=function(){function Parser(e,t,r){if(t===void 0){t={}}this.config={range:typeof t.range==="boolean"&&t.range,loc:typeof t.loc==="boolean"&&t.loc,source:null,tokens:typeof t.tokens==="boolean"&&t.tokens,comment:typeof t.comment==="boolean"&&t.comment,tolerant:typeof t.tolerant==="boolean"&&t.tolerant};if(this.config.loc&&t.source&&t.source!==null){this.config.source=String(t.source)}this.delegate=r;this.errorHandler=new n.ErrorHandler;this.errorHandler.tolerant=this.config.tolerant;this.scanner=new s.Scanner(e,this.errorHandler);this.scanner.trackComment=this.config.comment;this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11};this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0};this.hasLineTerminator=false;this.context={isModule:false,await:false,allowIn:true,allowStrictDirective:true,allowYield:true,firstCoverInitializedNameError:null,isAssignmentTarget:false,isBindingElement:false,inFunctionBody:false,inIteration:false,inSwitch:false,labelSet:{},strict:false};this.tokens=[];this.startMarker={index:0,line:this.scanner.lineNumber,column:0};this.lastMarker={index:0,line:this.scanner.lineNumber,column:0};this.nextToken();this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}Parser.prototype.throwError=function(e){var t=[];for(var r=1;r0&&this.delegate){for(var t=0;t>="||e===">>>="||e==="&="||e==="^="||e==="|="};Parser.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement;var r=this.context.isAssignmentTarget;var i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=true;this.context.isAssignmentTarget=true;this.context.firstCoverInitializedNameError=null;var n=e.call(this);if(this.context.firstCoverInitializedNameError!==null){this.throwUnexpectedToken(this.context.firstCoverInitializedNameError)}this.context.isBindingElement=t;this.context.isAssignmentTarget=r;this.context.firstCoverInitializedNameError=i;return n};Parser.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement;var r=this.context.isAssignmentTarget;var i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=true;this.context.isAssignmentTarget=true;this.context.firstCoverInitializedNameError=null;var n=e.call(this);this.context.isBindingElement=this.context.isBindingElement&&t;this.context.isAssignmentTarget=this.context.isAssignmentTarget&&r;this.context.firstCoverInitializedNameError=i||this.context.firstCoverInitializedNameError;return n};Parser.prototype.consumeSemicolon=function(){if(this.match(";")){this.nextToken()}else if(!this.hasLineTerminator){if(this.lookahead.type!==2&&!this.match("}")){this.throwUnexpectedToken(this.lookahead)}this.lastMarker.index=this.startMarker.index;this.lastMarker.line=this.startMarker.line;this.lastMarker.column=this.startMarker.column}};Parser.prototype.parsePrimaryExpression=function(){var e=this.createNode();var t;var r,i;switch(this.lookahead.type){case 3:if((this.context.isModule||this.context.await)&&this.lookahead.value==="await"){this.tolerateUnexpectedToken(this.lookahead)}t=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(e,new u.Identifier(this.nextToken().value));break;case 6:case 8:if(this.context.strict&&this.lookahead.octal){this.tolerateUnexpectedToken(this.lookahead,a.Messages.StrictOctalLiteral)}this.context.isAssignmentTarget=false;this.context.isBindingElement=false;r=this.nextToken();i=this.getTokenRaw(r);t=this.finalize(e,new u.Literal(r.value,i));break;case 1:this.context.isAssignmentTarget=false;this.context.isBindingElement=false;r=this.nextToken();i=this.getTokenRaw(r);t=this.finalize(e,new u.Literal(r.value==="true",i));break;case 5:this.context.isAssignmentTarget=false;this.context.isBindingElement=false;r=this.nextToken();i=this.getTokenRaw(r);t=this.finalize(e,new u.Literal(null,i));break;case 10:t=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=false;t=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":t=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":t=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=false;this.context.isBindingElement=false;this.scanner.index=this.startMarker.index;r=this.nextRegexToken();i=this.getTokenRaw(r);t=this.finalize(e,new u.RegexLiteral(r.regex,i,r.pattern,r.flags));break;default:t=this.throwUnexpectedToken(this.nextToken())}break;case 4:if(!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")){t=this.parseIdentifierName()}else if(!this.context.strict&&this.matchKeyword("let")){t=this.finalize(e,new u.Identifier(this.nextToken().value))}else{this.context.isAssignmentTarget=false;this.context.isBindingElement=false;if(this.matchKeyword("function")){t=this.parseFunctionExpression()}else if(this.matchKeyword("this")){this.nextToken();t=this.finalize(e,new u.ThisExpression)}else if(this.matchKeyword("class")){t=this.parseClassExpression()}else{t=this.throwUnexpectedToken(this.nextToken())}}break;default:t=this.throwUnexpectedToken(this.nextToken())}return t};Parser.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new u.SpreadElement(t))};Parser.prototype.parseArrayInitializer=function(){var e=this.createNode();var t=[];this.expect("[");while(!this.match("]")){if(this.match(",")){this.nextToken();t.push(null)}else if(this.match("...")){var r=this.parseSpreadElement();if(!this.match("]")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;this.expect(",")}t.push(r)}else{t.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(!this.match("]")){this.expect(",")}}}this.expect("]");return this.finalize(e,new u.ArrayExpression(t))};Parser.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var t=this.context.strict;var r=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var i=this.isolateCoverGrammar(this.parseFunctionSourceElements);if(this.context.strict&&e.firstRestricted){this.tolerateUnexpectedToken(e.firstRestricted,e.message)}if(this.context.strict&&e.stricted){this.tolerateUnexpectedToken(e.stricted,e.message)}this.context.strict=t;this.context.allowStrictDirective=r;return i};Parser.prototype.parsePropertyMethodFunction=function(){var e=false;var t=this.createNode();var r=this.context.allowYield;this.context.allowYield=true;var i=this.parseFormalParameters();var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(t,new u.FunctionExpression(null,i.params,n,e))};Parser.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode();var t=this.context.allowYield;var r=this.context.await;this.context.allowYield=false;this.context.await=true;var i=this.parseFormalParameters();var n=this.parsePropertyMethod(i);this.context.allowYield=t;this.context.await=r;return this.finalize(e,new u.AsyncFunctionExpression(null,i.params,n))};Parser.prototype.parseObjectPropertyKey=function(){var e=this.createNode();var t=this.nextToken();var r;switch(t.type){case 8:case 6:if(this.context.strict&&t.octal){this.tolerateUnexpectedToken(t,a.Messages.StrictOctalLiteral)}var i=this.getTokenRaw(t);r=this.finalize(e,new u.Literal(t.value,i));break;case 3:case 1:case 5:case 4:r=this.finalize(e,new u.Identifier(t.value));break;case 7:if(t.value==="["){r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.expect("]")}else{r=this.throwUnexpectedToken(t)}break;default:r=this.throwUnexpectedToken(t)}return r};Parser.prototype.isPropertyKey=function(e,t){return e.type===o.Syntax.Identifier&&e.name===t||e.type===o.Syntax.Literal&&e.value===t};Parser.prototype.parseObjectProperty=function(e){var t=this.createNode();var r=this.lookahead;var i;var n=null;var s=null;var o=false;var l=false;var f=false;var c=false;if(r.type===3){var h=r.value;this.nextToken();o=this.match("[");c=!this.hasLineTerminator&&h==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(",");n=c?this.parseObjectPropertyKey():this.finalize(t,new u.Identifier(h))}else if(this.match("*")){this.nextToken()}else{o=this.match("[");n=this.parseObjectPropertyKey()}var p=this.qualifiedPropertyName(this.lookahead);if(r.type===3&&!c&&r.value==="get"&&p){i="get";o=this.match("[");n=this.parseObjectPropertyKey();this.context.allowYield=false;s=this.parseGetterMethod()}else if(r.type===3&&!c&&r.value==="set"&&p){i="set";o=this.match("[");n=this.parseObjectPropertyKey();s=this.parseSetterMethod()}else if(r.type===7&&r.value==="*"&&p){i="init";o=this.match("[");n=this.parseObjectPropertyKey();s=this.parseGeneratorMethod();l=true}else{if(!n){this.throwUnexpectedToken(this.lookahead)}i="init";if(this.match(":")&&!c){if(!o&&this.isPropertyKey(n,"__proto__")){if(e.value){this.tolerateError(a.Messages.DuplicateProtoProperty)}e.value=true}this.nextToken();s=this.inheritCoverGrammar(this.parseAssignmentExpression)}else if(this.match("(")){s=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction();l=true}else if(r.type===3){var h=this.finalize(t,new u.Identifier(r.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead;this.nextToken();f=true;var v=this.isolateCoverGrammar(this.parseAssignmentExpression);s=this.finalize(t,new u.AssignmentPattern(h,v))}else{f=true;s=h}}else{this.throwUnexpectedToken(this.nextToken())}}return this.finalize(t,new u.Property(i,n,o,s,l,f))};Parser.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");var t=[];var r={value:false};while(!this.match("}")){t.push(this.parseObjectProperty(r));if(!this.match("}")){this.expectCommaSeparator()}}this.expect("}");return this.finalize(e,new u.ObjectExpression(t))};Parser.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode();var t=this.nextToken();var r=t.value;var n=t.cooked;return this.finalize(e,new u.TemplateElement({raw:r,cooked:n},t.tail))};Parser.prototype.parseTemplateElement=function(){if(this.lookahead.type!==10){this.throwUnexpectedToken()}var e=this.createNode();var t=this.nextToken();var r=t.value;var i=t.cooked;return this.finalize(e,new u.TemplateElement({raw:r,cooked:i},t.tail))};Parser.prototype.parseTemplateLiteral=function(){var e=this.createNode();var t=[];var r=[];var i=this.parseTemplateHead();r.push(i);while(!i.tail){t.push(this.parseExpression());i=this.parseTemplateElement();r.push(i)}return this.finalize(e,new u.TemplateLiteral(r,t))};Parser.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case o.Syntax.Identifier:case o.Syntax.MemberExpression:case o.Syntax.RestElement:case o.Syntax.AssignmentPattern:break;case o.Syntax.SpreadElement:e.type=o.Syntax.RestElement;this.reinterpretExpressionAsPattern(e.argument);break;case o.Syntax.ArrayExpression:e.type=o.Syntax.ArrayPattern;for(var t=0;t")){this.expect("=>")}e={type:f,params:[],async:false}}else{var t=this.lookahead;var r=[];if(this.match("...")){e=this.parseRestElement(r);this.expect(")");if(!this.match("=>")){this.expect("=>")}e={type:f,params:[e],async:false}}else{var i=false;this.context.isBindingElement=true;e=this.inheritCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];this.context.isAssignmentTarget=false;n.push(e);while(this.lookahead.type!==2){if(!this.match(",")){break}this.nextToken();if(this.match(")")){this.nextToken();for(var a=0;a")){this.expect("=>")}this.context.isBindingElement=false;for(var a=0;a")){if(e.type===o.Syntax.Identifier&&e.name==="yield"){i=true;e={type:f,params:[e],async:false}}if(!i){if(!this.context.isBindingElement){this.throwUnexpectedToken(this.lookahead)}if(e.type===o.Syntax.SequenceExpression){for(var a=0;a")){for(var o=0;o0){this.nextToken();this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var n=[e,this.lookahead];var a=t;var s=this.isolateCoverGrammar(this.parseExponentiationExpression);var o=[a,r.value,s];var l=[i];while(true){i=this.binaryPrecedence(this.lookahead);if(i<=0){break}while(o.length>2&&i<=l[l.length-1]){s=o.pop();var f=o.pop();l.pop();a=o.pop();n.pop();var c=this.startNode(n[n.length-1]);o.push(this.finalize(c,new u.BinaryExpression(f,a,s)))}o.push(this.nextToken().value);l.push(i);n.push(this.lookahead);o.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var h=o.length-1;t=o[h];var p=n.pop();while(h>1){var v=n.pop();var d=p&&p.lineStart;var c=this.startNode(v,d);var f=o[h-1];t=this.finalize(c,new u.BinaryExpression(f,o[h-2],t));h-=2;p=v}}return t};Parser.prototype.parseConditionalExpression=function(){var e=this.lookahead;var t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var r=this.context.allowIn;this.context.allowIn=true;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=r;this.expect(":");var n=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new u.ConditionalExpression(t,i,n));this.context.isAssignmentTarget=false;this.context.isBindingElement=false}return t};Parser.prototype.checkPatternParam=function(e,t){switch(t.type){case o.Syntax.Identifier:this.validateParam(e,t,t.name);break;case o.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case o.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case o.Syntax.ArrayPattern:for(var r=0;r")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var n=e.async;var s=this.reinterpretAsCoverFormalsList(e);if(s){if(this.hasLineTerminator){this.tolerateUnexpectedToken(this.lookahead)}this.context.firstCoverInitializedNameError=null;var l=this.context.strict;var c=this.context.allowStrictDirective;this.context.allowStrictDirective=s.simple;var h=this.context.allowYield;var p=this.context.await;this.context.allowYield=true;this.context.await=n;var v=this.startNode(t);this.expect("=>");var d=void 0;if(this.match("{")){var D=this.context.allowIn;this.context.allowIn=true;d=this.parseFunctionSourceElements();this.context.allowIn=D}else{d=this.isolateCoverGrammar(this.parseAssignmentExpression)}var m=d.type!==o.Syntax.BlockStatement;if(this.context.strict&&s.firstRestricted){this.throwUnexpectedToken(s.firstRestricted,s.message)}if(this.context.strict&&s.stricted){this.tolerateUnexpectedToken(s.stricted,s.message)}e=n?this.finalize(v,new u.AsyncArrowFunctionExpression(s.params,d,m)):this.finalize(v,new u.ArrowFunctionExpression(s.params,d,m));this.context.strict=l;this.context.allowStrictDirective=c;this.context.allowYield=h;this.context.await=p}}else{if(this.matchAssign()){if(!this.context.isAssignmentTarget){this.tolerateError(a.Messages.InvalidLHSInAssignment)}if(this.context.strict&&e.type===o.Syntax.Identifier){var g=e;if(this.scanner.isRestrictedWord(g.name)){this.tolerateUnexpectedToken(r,a.Messages.StrictLHSAssignment)}if(this.scanner.isStrictModeReservedWord(g.name)){this.tolerateUnexpectedToken(r,a.Messages.StrictReservedWord)}}if(!this.match("=")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false}else{this.reinterpretExpressionAsPattern(e)}r=this.nextToken();var E=r.value;var A=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new u.AssignmentExpression(E,e,A));this.context.firstCoverInitializedNameError=null}}}return e};Parser.prototype.parseExpression=function(){var e=this.lookahead;var t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var r=[];r.push(t);while(this.lookahead.type!==2){if(!this.match(",")){break}this.nextToken();r.push(this.isolateCoverGrammar(this.parseAssignmentExpression))}t=this.finalize(this.startNode(e),new u.SequenceExpression(r))}return t};Parser.prototype.parseStatementListItem=function(){var e;this.context.isAssignmentTarget=true;this.context.isBindingElement=true;if(this.lookahead.type===4){switch(this.lookahead.value){case"export":if(!this.context.isModule){this.tolerateUnexpectedToken(this.lookahead,a.Messages.IllegalExportDeclaration)}e=this.parseExportDeclaration();break;case"import":if(!this.context.isModule){this.tolerateUnexpectedToken(this.lookahead,a.Messages.IllegalImportDeclaration)}e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:false});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:false}):this.parseStatement();break;default:e=this.parseStatement();break}}else{e=this.parseStatement()}return e};Parser.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");var t=[];while(true){if(this.match("}")){break}t.push(this.parseStatementListItem())}this.expect("}");return this.finalize(e,new u.BlockStatement(t))};Parser.prototype.parseLexicalBinding=function(e,t){var r=this.createNode();var i=[];var n=this.parsePattern(i,e);if(this.context.strict&&n.type===o.Syntax.Identifier){if(this.scanner.isRestrictedWord(n.name)){this.tolerateError(a.Messages.StrictVarName)}}var s=null;if(e==="const"){if(!this.matchKeyword("in")&&!this.matchContextualKeyword("of")){if(this.match("=")){this.nextToken();s=this.isolateCoverGrammar(this.parseAssignmentExpression)}else{this.throwError(a.Messages.DeclarationMissingInitializer,"const")}}}else if(!t.inFor&&n.type!==o.Syntax.Identifier||this.match("=")){this.expect("=");s=this.isolateCoverGrammar(this.parseAssignmentExpression)}return this.finalize(r,new u.VariableDeclarator(n,s))};Parser.prototype.parseBindingList=function(e,t){var r=[this.parseLexicalBinding(e,t)];while(this.match(",")){this.nextToken();r.push(this.parseLexicalBinding(e,t))}return r};Parser.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();this.scanner.restoreState(e);return t.type===3||t.type===7&&t.value==="["||t.type===7&&t.value==="{"||t.type===4&&t.value==="let"||t.type===4&&t.value==="yield"};Parser.prototype.parseLexicalDeclaration=function(e){var t=this.createNode();var r=this.nextToken().value;i.assert(r==="let"||r==="const","Lexical declaration must be either let or const");var n=this.parseBindingList(r,e);this.consumeSemicolon();return this.finalize(t,new u.VariableDeclaration(n,r))};Parser.prototype.parseBindingRestElement=function(e,t){var r=this.createNode();this.expect("...");var i=this.parsePattern(e,t);return this.finalize(r,new u.RestElement(i))};Parser.prototype.parseArrayPattern=function(e,t){var r=this.createNode();this.expect("[");var i=[];while(!this.match("]")){if(this.match(",")){this.nextToken();i.push(null)}else{if(this.match("...")){i.push(this.parseBindingRestElement(e,t));break}else{i.push(this.parsePatternWithDefault(e,t))}if(!this.match("]")){this.expect(",")}}}this.expect("]");return this.finalize(r,new u.ArrayPattern(i))};Parser.prototype.parsePropertyPattern=function(e,t){var r=this.createNode();var i=false;var n=false;var a=false;var s;var o;if(this.lookahead.type===3){var l=this.lookahead;s=this.parseVariableIdentifier();var f=this.finalize(r,new u.Identifier(l.value));if(this.match("=")){e.push(l);n=true;this.nextToken();var c=this.parseAssignmentExpression();o=this.finalize(this.startNode(l),new u.AssignmentPattern(f,c))}else if(!this.match(":")){e.push(l);n=true;o=f}else{this.expect(":");o=this.parsePatternWithDefault(e,t)}}else{i=this.match("[");s=this.parseObjectPropertyKey();this.expect(":");o=this.parsePatternWithDefault(e,t)}return this.finalize(r,new u.Property("init",s,i,o,a,n))};Parser.prototype.parseObjectPattern=function(e,t){var r=this.createNode();var i=[];this.expect("{");while(!this.match("}")){i.push(this.parsePropertyPattern(e,t));if(!this.match("}")){this.expect(",")}}this.expect("}");return this.finalize(r,new u.ObjectPattern(i))};Parser.prototype.parsePattern=function(e,t){var r;if(this.match("[")){r=this.parseArrayPattern(e,t)}else if(this.match("{")){r=this.parseObjectPattern(e,t)}else{if(this.matchKeyword("let")&&(t==="const"||t==="let")){this.tolerateUnexpectedToken(this.lookahead,a.Messages.LetInLexicalBinding)}e.push(this.lookahead);r=this.parseVariableIdentifier(t)}return r};Parser.prototype.parsePatternWithDefault=function(e,t){var r=this.lookahead;var i=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var n=this.context.allowYield;this.context.allowYield=true;var a=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=n;i=this.finalize(this.startNode(r),new u.AssignmentPattern(i,a))}return i};Parser.prototype.parseVariableIdentifier=function(e){var t=this.createNode();var r=this.nextToken();if(r.type===4&&r.value==="yield"){if(this.context.strict){this.tolerateUnexpectedToken(r,a.Messages.StrictReservedWord)}else if(!this.context.allowYield){this.throwUnexpectedToken(r)}}else if(r.type!==3){if(this.context.strict&&r.type===4&&this.scanner.isStrictModeReservedWord(r.value)){this.tolerateUnexpectedToken(r,a.Messages.StrictReservedWord)}else{if(this.context.strict||r.value!=="let"||e!=="var"){this.throwUnexpectedToken(r)}}}else if((this.context.isModule||this.context.await)&&r.type===3&&r.value==="await"){this.tolerateUnexpectedToken(r)}return this.finalize(t,new u.Identifier(r.value))};Parser.prototype.parseVariableDeclaration=function(e){var t=this.createNode();var r=[];var i=this.parsePattern(r,"var");if(this.context.strict&&i.type===o.Syntax.Identifier){if(this.scanner.isRestrictedWord(i.name)){this.tolerateError(a.Messages.StrictVarName)}}var n=null;if(this.match("=")){this.nextToken();n=this.isolateCoverGrammar(this.parseAssignmentExpression)}else if(i.type!==o.Syntax.Identifier&&!e.inFor){this.expect("=")}return this.finalize(t,new u.VariableDeclarator(i,n))};Parser.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor};var r=[];r.push(this.parseVariableDeclaration(t));while(this.match(",")){this.nextToken();r.push(this.parseVariableDeclaration(t))}return r};Parser.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:false});this.consumeSemicolon();return this.finalize(e,new u.VariableDeclaration(t,"var"))};Parser.prototype.parseEmptyStatement=function(){var e=this.createNode();this.expect(";");return this.finalize(e,new u.EmptyStatement)};Parser.prototype.parseExpressionStatement=function(){var e=this.createNode();var t=this.parseExpression();this.consumeSemicolon();return this.finalize(e,new u.ExpressionStatement(t))};Parser.prototype.parseIfClause=function(){if(this.context.strict&&this.matchKeyword("function")){this.tolerateError(a.Messages.StrictFunction)}return this.parseStatement()};Parser.prototype.parseIfStatement=function(){var e=this.createNode();var t;var r=null;this.expectKeyword("if");this.expect("(");var i=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());t=this.finalize(this.createNode(),new u.EmptyStatement)}else{this.expect(")");t=this.parseIfClause();if(this.matchKeyword("else")){this.nextToken();r=this.parseIfClause()}}return this.finalize(e,new u.IfStatement(i,t,r))};Parser.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=true;var r=this.parseStatement();this.context.inIteration=t;this.expectKeyword("while");this.expect("(");var i=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken())}else{this.expect(")");if(this.match(";")){this.nextToken()}}return this.finalize(e,new u.DoWhileStatement(r,i))};Parser.prototype.parseWhileStatement=function(){var e=this.createNode();var t;this.expectKeyword("while");this.expect("(");var r=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());t=this.finalize(this.createNode(),new u.EmptyStatement)}else{this.expect(")");var i=this.context.inIteration;this.context.inIteration=true;t=this.parseStatement();this.context.inIteration=i}return this.finalize(e,new u.WhileStatement(r,t))};Parser.prototype.parseForStatement=function(){var e=null;var t=null;var r=null;var i=true;var n,s;var l=this.createNode();this.expectKeyword("for");this.expect("(");if(this.match(";")){this.nextToken()}else{if(this.matchKeyword("var")){e=this.createNode();this.nextToken();var f=this.context.allowIn;this.context.allowIn=false;var c=this.parseVariableDeclarationList({inFor:true});this.context.allowIn=f;if(c.length===1&&this.matchKeyword("in")){var h=c[0];if(h.init&&(h.id.type===o.Syntax.ArrayPattern||h.id.type===o.Syntax.ObjectPattern||this.context.strict)){this.tolerateError(a.Messages.ForInOfLoopInitializer,"for-in")}e=this.finalize(e,new u.VariableDeclaration(c,"var"));this.nextToken();n=e;s=this.parseExpression();e=null}else if(c.length===1&&c[0].init===null&&this.matchContextualKeyword("of")){e=this.finalize(e,new u.VariableDeclaration(c,"var"));this.nextToken();n=e;s=this.parseAssignmentExpression();e=null;i=false}else{e=this.finalize(e,new u.VariableDeclaration(c,"var"));this.expect(";")}}else if(this.matchKeyword("const")||this.matchKeyword("let")){e=this.createNode();var p=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in"){e=this.finalize(e,new u.Identifier(p));this.nextToken();n=e;s=this.parseExpression();e=null}else{var f=this.context.allowIn;this.context.allowIn=false;var c=this.parseBindingList(p,{inFor:true});this.context.allowIn=f;if(c.length===1&&c[0].init===null&&this.matchKeyword("in")){e=this.finalize(e,new u.VariableDeclaration(c,p));this.nextToken();n=e;s=this.parseExpression();e=null}else if(c.length===1&&c[0].init===null&&this.matchContextualKeyword("of")){e=this.finalize(e,new u.VariableDeclaration(c,p));this.nextToken();n=e;s=this.parseAssignmentExpression();e=null;i=false}else{this.consumeSemicolon();e=this.finalize(e,new u.VariableDeclaration(c,p))}}}else{var v=this.lookahead;var f=this.context.allowIn;this.context.allowIn=false;e=this.inheritCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=f;if(this.matchKeyword("in")){if(!this.context.isAssignmentTarget||e.type===o.Syntax.AssignmentExpression){this.tolerateError(a.Messages.InvalidLHSInForIn)}this.nextToken();this.reinterpretExpressionAsPattern(e);n=e;s=this.parseExpression();e=null}else if(this.matchContextualKeyword("of")){if(!this.context.isAssignmentTarget||e.type===o.Syntax.AssignmentExpression){this.tolerateError(a.Messages.InvalidLHSInForLoop)}this.nextToken();this.reinterpretExpressionAsPattern(e);n=e;s=this.parseAssignmentExpression();e=null;i=false}else{if(this.match(",")){var d=[e];while(this.match(",")){this.nextToken();d.push(this.isolateCoverGrammar(this.parseAssignmentExpression))}e=this.finalize(this.startNode(v),new u.SequenceExpression(d))}this.expect(";")}}}if(typeof n==="undefined"){if(!this.match(";")){t=this.parseExpression()}this.expect(";");if(!this.match(")")){r=this.parseExpression()}}var D;if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());D=this.finalize(this.createNode(),new u.EmptyStatement)}else{this.expect(")");var m=this.context.inIteration;this.context.inIteration=true;D=this.isolateCoverGrammar(this.parseStatement);this.context.inIteration=m}return typeof n==="undefined"?this.finalize(l,new u.ForStatement(e,t,r,D)):i?this.finalize(l,new u.ForInStatement(n,s,D)):this.finalize(l,new u.ForOfStatement(n,s,D))};Parser.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var r=this.parseVariableIdentifier();t=r;var i="$"+r.name;if(!Object.prototype.hasOwnProperty.call(this.context.labelSet,i)){this.throwError(a.Messages.UnknownLabel,r.name)}}this.consumeSemicolon();if(t===null&&!this.context.inIteration){this.throwError(a.Messages.IllegalContinue)}return this.finalize(e,new u.ContinueStatement(t))};Parser.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var r=this.parseVariableIdentifier();var i="$"+r.name;if(!Object.prototype.hasOwnProperty.call(this.context.labelSet,i)){this.throwError(a.Messages.UnknownLabel,r.name)}t=r}this.consumeSemicolon();if(t===null&&!this.context.inIteration&&!this.context.inSwitch){this.throwError(a.Messages.IllegalBreak)}return this.finalize(e,new u.BreakStatement(t))};Parser.prototype.parseReturnStatement=function(){if(!this.context.inFunctionBody){this.tolerateError(a.Messages.IllegalReturn)}var e=this.createNode();this.expectKeyword("return");var t=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10;var r=t?this.parseExpression():null;this.consumeSemicolon();return this.finalize(e,new u.ReturnStatement(r))};Parser.prototype.parseWithStatement=function(){if(this.context.strict){this.tolerateError(a.Messages.StrictModeWith)}var e=this.createNode();var t;this.expectKeyword("with");this.expect("(");var r=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());t=this.finalize(this.createNode(),new u.EmptyStatement)}else{this.expect(")");t=this.parseStatement()}return this.finalize(e,new u.WithStatement(r,t))};Parser.prototype.parseSwitchCase=function(){var e=this.createNode();var t;if(this.matchKeyword("default")){this.nextToken();t=null}else{this.expectKeyword("case");t=this.parseExpression()}this.expect(":");var r=[];while(true){if(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case")){break}r.push(this.parseStatementListItem())}return this.finalize(e,new u.SwitchCase(t,r))};Parser.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch");this.expect("(");var t=this.parseExpression();this.expect(")");var r=this.context.inSwitch;this.context.inSwitch=true;var i=[];var n=false;this.expect("{");while(true){if(this.match("}")){break}var s=this.parseSwitchCase();if(s.test===null){if(n){this.throwError(a.Messages.MultipleDefaultsInSwitch)}n=true}i.push(s)}this.expect("}");this.context.inSwitch=r;return this.finalize(e,new u.SwitchStatement(t,i))};Parser.prototype.parseLabelledStatement=function(){var e=this.createNode();var t=this.parseExpression();var r;if(t.type===o.Syntax.Identifier&&this.match(":")){this.nextToken();var i=t;var n="$"+i.name;if(Object.prototype.hasOwnProperty.call(this.context.labelSet,n)){this.throwError(a.Messages.Redeclaration,"Label",i.name)}this.context.labelSet[n]=true;var s=void 0;if(this.matchKeyword("class")){this.tolerateUnexpectedToken(this.lookahead);s=this.parseClassDeclaration()}else if(this.matchKeyword("function")){var l=this.lookahead;var f=this.parseFunctionDeclaration();if(this.context.strict){this.tolerateUnexpectedToken(l,a.Messages.StrictFunction)}else if(f.generator){this.tolerateUnexpectedToken(l,a.Messages.GeneratorInLegacyContext)}s=f}else{s=this.parseStatement()}delete this.context.labelSet[n];r=new u.LabeledStatement(i,s)}else{this.consumeSemicolon();r=new u.ExpressionStatement(t)}return this.finalize(e,r)};Parser.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw");if(this.hasLineTerminator){this.throwError(a.Messages.NewlineAfterThrow)}var t=this.parseExpression();this.consumeSemicolon();return this.finalize(e,new u.ThrowStatement(t))};Parser.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch");this.expect("(");if(this.match(")")){this.throwUnexpectedToken(this.lookahead)}var t=[];var r=this.parsePattern(t);var i={};for(var n=0;n0){this.tolerateError(a.Messages.BadGetterArity)}var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(e,new u.FunctionExpression(null,i.params,n,t))};Parser.prototype.parseSetterMethod=function(){var e=this.createNode();var t=false;var r=this.context.allowYield;this.context.allowYield=!t;var i=this.parseFormalParameters();if(i.params.length!==1){this.tolerateError(a.Messages.BadSetterArity)}else if(i.params[0]instanceof u.RestElement){this.tolerateError(a.Messages.BadSetterRestParameter)}var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(e,new u.FunctionExpression(null,i.params,n,t))};Parser.prototype.parseGeneratorMethod=function(){var e=this.createNode();var t=true;var r=this.context.allowYield;this.context.allowYield=true;var i=this.parseFormalParameters();this.context.allowYield=false;var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(e,new u.FunctionExpression(null,i.params,n,t))};Parser.prototype.isStartOfExpression=function(){var e=true;var t=this.lookahead.value;switch(this.lookahead.type){case 7:e=t==="["||t==="("||t==="{"||t==="+"||t==="-"||t==="!"||t==="~"||t==="++"||t==="--"||t==="/"||t==="/=";break;case 4:e=t==="class"||t==="delete"||t==="function"||t==="let"||t==="new"||t==="super"||t==="this"||t==="typeof"||t==="void"||t==="yield";break;default:break}return e};Parser.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null;var r=false;if(!this.hasLineTerminator){var i=this.context.allowYield;this.context.allowYield=false;r=this.match("*");if(r){this.nextToken();t=this.parseAssignmentExpression()}else if(this.isStartOfExpression()){t=this.parseAssignmentExpression()}this.context.allowYield=i}return this.finalize(e,new u.YieldExpression(t,r))};Parser.prototype.parseClassElement=function(e){var t=this.lookahead;var r=this.createNode();var i="";var n=null;var s=null;var o=false;var l=false;var f=false;var c=false;if(this.match("*")){this.nextToken()}else{o=this.match("[");n=this.parseObjectPropertyKey();var h=n;if(h.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))){t=this.lookahead;f=true;o=this.match("[");if(this.match("*")){this.nextToken()}else{n=this.parseObjectPropertyKey()}}if(t.type===3&&!this.hasLineTerminator&&t.value==="async"){var p=this.lookahead.value;if(p!==":"&&p!=="("&&p!=="*"){c=true;t=this.lookahead;n=this.parseObjectPropertyKey();if(t.type===3&&t.value==="constructor"){this.tolerateUnexpectedToken(t,a.Messages.ConstructorIsAsync)}}}}var v=this.qualifiedPropertyName(this.lookahead);if(t.type===3){if(t.value==="get"&&v){i="get";o=this.match("[");n=this.parseObjectPropertyKey();this.context.allowYield=false;s=this.parseGetterMethod()}else if(t.value==="set"&&v){i="set";o=this.match("[");n=this.parseObjectPropertyKey();s=this.parseSetterMethod()}}else if(t.type===7&&t.value==="*"&&v){i="init";o=this.match("[");n=this.parseObjectPropertyKey();s=this.parseGeneratorMethod();l=true}if(!i&&n&&this.match("(")){i="init";s=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction();l=true}if(!i){this.throwUnexpectedToken(this.lookahead)}if(i==="init"){i="method"}if(!o){if(f&&this.isPropertyKey(n,"prototype")){this.throwUnexpectedToken(t,a.Messages.StaticPrototype)}if(!f&&this.isPropertyKey(n,"constructor")){if(i!=="method"||!l||s&&s.generator){this.throwUnexpectedToken(t,a.Messages.ConstructorSpecialMethod)}if(e.value){this.throwUnexpectedToken(t,a.Messages.DuplicateConstructor)}else{e.value=true}i="constructor"}}return this.finalize(r,new u.MethodDefinition(n,o,s,i,f))};Parser.prototype.parseClassElementList=function(){var e=[];var t={value:false};this.expect("{");while(!this.match("}")){if(this.match(";")){this.nextToken()}else{e.push(this.parseClassElement(t))}}this.expect("}");return e};Parser.prototype.parseClassBody=function(){var e=this.createNode();var t=this.parseClassElementList();return this.finalize(e,new u.ClassBody(t))};Parser.prototype.parseClassDeclaration=function(e){var t=this.createNode();var r=this.context.strict;this.context.strict=true;this.expectKeyword("class");var i=e&&this.lookahead.type!==3?null:this.parseVariableIdentifier();var n=null;if(this.matchKeyword("extends")){this.nextToken();n=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall)}var a=this.parseClassBody();this.context.strict=r;return this.finalize(t,new u.ClassDeclaration(i,n,a))};Parser.prototype.parseClassExpression=function(){var e=this.createNode();var t=this.context.strict;this.context.strict=true;this.expectKeyword("class");var r=this.lookahead.type===3?this.parseVariableIdentifier():null;var i=null;if(this.matchKeyword("extends")){this.nextToken();i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall)}var n=this.parseClassBody();this.context.strict=t;return this.finalize(e,new u.ClassExpression(r,i,n))};Parser.prototype.parseModule=function(){this.context.strict=true;this.context.isModule=true;this.scanner.isModule=true;var e=this.createNode();var t=this.parseDirectivePrologues();while(this.lookahead.type!==2){t.push(this.parseStatementListItem())}return this.finalize(e,new u.Module(t))};Parser.prototype.parseScript=function(){var e=this.createNode();var t=this.parseDirectivePrologues();while(this.lookahead.type!==2){t.push(this.parseStatementListItem())}return this.finalize(e,new u.Script(t))};Parser.prototype.parseModuleSpecifier=function(){var e=this.createNode();if(this.lookahead.type!==8){this.throwError(a.Messages.InvalidModuleSpecifier)}var t=this.nextToken();var r=this.getTokenRaw(t);return this.finalize(e,new u.Literal(t.value,r))};Parser.prototype.parseImportSpecifier=function(){var e=this.createNode();var t;var r;if(this.lookahead.type===3){t=this.parseVariableIdentifier();r=t;if(this.matchContextualKeyword("as")){this.nextToken();r=this.parseVariableIdentifier()}}else{t=this.parseIdentifierName();r=t;if(this.matchContextualKeyword("as")){this.nextToken();r=this.parseVariableIdentifier()}else{this.throwUnexpectedToken(this.nextToken())}}return this.finalize(e,new u.ImportSpecifier(r,t))};Parser.prototype.parseNamedImports=function(){this.expect("{");var e=[];while(!this.match("}")){e.push(this.parseImportSpecifier());if(!this.match("}")){this.expect(",")}}this.expect("}");return e};Parser.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode();var t=this.parseIdentifierName();return this.finalize(e,new u.ImportDefaultSpecifier(t))};Parser.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*");if(!this.matchContextualKeyword("as")){this.throwError(a.Messages.NoAsAfterImportNamespace)}this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new u.ImportNamespaceSpecifier(t))};Parser.prototype.parseImportDeclaration=function(){if(this.context.inFunctionBody){this.throwError(a.Messages.IllegalImportDeclaration)}var e=this.createNode();this.expectKeyword("import");var t;var r=[];if(this.lookahead.type===8){t=this.parseModuleSpecifier()}else{if(this.match("{")){r=r.concat(this.parseNamedImports())}else if(this.match("*")){r.push(this.parseImportNamespaceSpecifier())}else if(this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")){r.push(this.parseImportDefaultSpecifier());if(this.match(",")){this.nextToken();if(this.match("*")){r.push(this.parseImportNamespaceSpecifier())}else if(this.match("{")){r=r.concat(this.parseNamedImports())}else{this.throwUnexpectedToken(this.lookahead)}}}else{this.throwUnexpectedToken(this.nextToken())}if(!this.matchContextualKeyword("from")){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken();t=this.parseModuleSpecifier()}this.consumeSemicolon();return this.finalize(e,new u.ImportDeclaration(r,t))};Parser.prototype.parseExportSpecifier=function(){var e=this.createNode();var t=this.parseIdentifierName();var r=t;if(this.matchContextualKeyword("as")){this.nextToken();r=this.parseIdentifierName()}return this.finalize(e,new u.ExportSpecifier(t,r))};Parser.prototype.parseExportDeclaration=function(){if(this.context.inFunctionBody){this.throwError(a.Messages.IllegalExportDeclaration)}var e=this.createNode();this.expectKeyword("export");var t;if(this.matchKeyword("default")){this.nextToken();if(this.matchKeyword("function")){var r=this.parseFunctionDeclaration(true);t=this.finalize(e,new u.ExportDefaultDeclaration(r))}else if(this.matchKeyword("class")){var r=this.parseClassDeclaration(true);t=this.finalize(e,new u.ExportDefaultDeclaration(r))}else if(this.matchContextualKeyword("async")){var r=this.matchAsyncFunction()?this.parseFunctionDeclaration(true):this.parseAssignmentExpression();t=this.finalize(e,new u.ExportDefaultDeclaration(r))}else{if(this.matchContextualKeyword("from")){this.throwError(a.Messages.UnexpectedToken,this.lookahead.value)}var r=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon();t=this.finalize(e,new u.ExportDefaultDeclaration(r))}}else if(this.match("*")){this.nextToken();if(!this.matchContextualKeyword("from")){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken();var n=this.parseModuleSpecifier();this.consumeSemicolon();t=this.finalize(e,new u.ExportAllDeclaration(n))}else if(this.lookahead.type===4){var r=void 0;switch(this.lookahead.value){case"let":case"const":r=this.parseLexicalDeclaration({inFor:false});break;case"var":case"class":case"function":r=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}t=this.finalize(e,new u.ExportNamedDeclaration(r,[],null))}else if(this.matchAsyncFunction()){var r=this.parseFunctionDeclaration();t=this.finalize(e,new u.ExportNamedDeclaration(r,[],null))}else{var s=[];var o=null;var l=false;this.expect("{");while(!this.match("}")){l=l||this.matchKeyword("default");s.push(this.parseExportSpecifier());if(!this.match("}")){this.expect(",")}}this.expect("}");if(this.matchContextualKeyword("from")){this.nextToken();o=this.parseModuleSpecifier();this.consumeSemicolon()}else if(l){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}else{this.consumeSemicolon()}t=this.finalize(e,new u.ExportNamedDeclaration(null,s,o))}return t};return Parser}();t.Parser=c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});function assert(e,t){if(!e){throw new Error("ASSERT: "+t)}}t.assert=assert},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=function(){function ErrorHandler(){this.errors=[];this.tolerant=false}ErrorHandler.prototype.recordError=function(e){this.errors.push(e)};ErrorHandler.prototype.tolerate=function(e){if(this.tolerant){this.recordError(e)}else{throw e}};ErrorHandler.prototype.constructError=function(e,t){var r=new Error(e);try{throw r}catch(e){if(Object.create&&Object.defineProperty){r=Object.create(e);Object.defineProperty(r,"column",{value:t})}}return r};ErrorHandler.prototype.createError=function(e,t,r,i){var n="Line "+t+": "+i;var a=this.constructError(n,r);a.index=e;a.lineNumber=t;a.description=i;return a};ErrorHandler.prototype.throwError=function(e,t,r,i){throw this.createError(e,t,r,i)};ErrorHandler.prototype.tolerateError=function(e,t,r,i){var n=this.createError(e,t,r,i);if(this.tolerant){this.recordError(n)}else{throw n}};return ErrorHandler}();t.ErrorHandler=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(9);var n=r(4);var a=r(11);function hexValue(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function octalValue(e){return"01234567".indexOf(e)}var u=function(){function Scanner(e,t){this.source=e;this.errorHandler=t;this.trackComment=false;this.isModule=false;this.length=e.length;this.index=0;this.lineNumber=e.length>0?1:0;this.lineStart=0;this.curlyStack=[]}Scanner.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}};Scanner.prototype.restoreState=function(e){this.index=e.index;this.lineNumber=e.lineNumber;this.lineStart=e.lineStart};Scanner.prototype.eof=function(){return this.index>=this.length};Scanner.prototype.throwUnexpectedToken=function(e){if(e===void 0){e=a.Messages.UnexpectedTokenIllegal}return this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)};Scanner.prototype.tolerateUnexpectedToken=function(e){if(e===void 0){e=a.Messages.UnexpectedTokenIllegal}this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)};Scanner.prototype.skipSingleLineComment=function(e){var t=[];var r,i;if(this.trackComment){t=[];r=this.index-e;i={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}}}while(!this.eof()){var a=this.source.charCodeAt(this.index);++this.index;if(n.Character.isLineTerminator(a)){if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart-1};var u={multiLine:false,slice:[r+e,this.index-1],range:[r,this.index-1],loc:i};t.push(u)}if(a===13&&this.source.charCodeAt(this.index)===10){++this.index}++this.lineNumber;this.lineStart=this.index;return t}}if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart};var u={multiLine:false,slice:[r+e,this.index],range:[r,this.index],loc:i};t.push(u)}return t};Scanner.prototype.skipMultiLineComment=function(){var e=[];var t,r;if(this.trackComment){e=[];t=this.index-2;r={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}}}while(!this.eof()){var i=this.source.charCodeAt(this.index);if(n.Character.isLineTerminator(i)){if(i===13&&this.source.charCodeAt(this.index+1)===10){++this.index}++this.lineNumber;++this.index;this.lineStart=this.index}else if(i===42){if(this.source.charCodeAt(this.index+1)===47){this.index+=2;if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var a={multiLine:true,slice:[t+2,this.index-2],range:[t,this.index],loc:r};e.push(a)}return e}++this.index}else{++this.index}}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var a={multiLine:true,slice:[t+2,this.index],range:[t,this.index],loc:r};e.push(a)}this.tolerateUnexpectedToken();return e};Scanner.prototype.scanComments=function(){var e;if(this.trackComment){e=[]}var t=this.index===0;while(!this.eof()){var r=this.source.charCodeAt(this.index);if(n.Character.isWhiteSpace(r)){++this.index}else if(n.Character.isLineTerminator(r)){++this.index;if(r===13&&this.source.charCodeAt(this.index)===10){++this.index}++this.lineNumber;this.lineStart=this.index;t=true}else if(r===47){r=this.source.charCodeAt(this.index+1);if(r===47){this.index+=2;var i=this.skipSingleLineComment(2);if(this.trackComment){e=e.concat(i)}t=true}else if(r===42){this.index+=2;var i=this.skipMultiLineComment();if(this.trackComment){e=e.concat(i)}}else{break}}else if(t&&r===45){if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var i=this.skipSingleLineComment(3);if(this.trackComment){e=e.concat(i)}}else{break}}else if(r===60&&!this.isModule){if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var i=this.skipSingleLineComment(4);if(this.trackComment){e=e.concat(i)}}else{break}}else{break}}return e};Scanner.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return true;default:return false}};Scanner.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return true;default:return false}};Scanner.prototype.isRestrictedWord=function(e){return e==="eval"||e==="arguments"};Scanner.prototype.isKeyword=function(e){switch(e.length){case 2:return e==="if"||e==="in"||e==="do";case 3:return e==="var"||e==="for"||e==="new"||e==="try"||e==="let";case 4:return e==="this"||e==="else"||e==="case"||e==="void"||e==="with"||e==="enum";case 5:return e==="while"||e==="break"||e==="catch"||e==="throw"||e==="const"||e==="yield"||e==="class"||e==="super";case 6:return e==="return"||e==="typeof"||e==="delete"||e==="switch"||e==="export"||e==="import";case 7:return e==="default"||e==="finally"||e==="extends";case 8:return e==="function"||e==="continue"||e==="debugger";case 10:return e==="instanceof";default:return false}};Scanner.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var r=this.source.charCodeAt(e+1);if(r>=56320&&r<=57343){var i=t;t=(i-55296)*1024+r-56320+65536}}return t};Scanner.prototype.scanHexEscape=function(e){var t=e==="u"?4:2;var r=0;for(var i=0;i1114111||e!=="}"){this.throwUnexpectedToken()}return n.Character.fromCodePoint(t)};Scanner.prototype.getIdentifier=function(){var e=this.index++;while(!this.eof()){var t=this.source.charCodeAt(this.index);if(t===92){this.index=e;return this.getComplexIdentifier()}else if(t>=55296&&t<57343){this.index=e;return this.getComplexIdentifier()}if(n.Character.isIdentifierPart(t)){++this.index}else{break}}return this.source.slice(e,this.index)};Scanner.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index);var t=n.Character.fromCodePoint(e);this.index+=t.length;var r;if(e===92){if(this.source.charCodeAt(this.index)!==117){this.throwUnexpectedToken()}++this.index;if(this.source[this.index]==="{"){++this.index;r=this.scanUnicodeCodePointEscape()}else{r=this.scanHexEscape("u");if(r===null||r==="\\"||!n.Character.isIdentifierStart(r.charCodeAt(0))){this.throwUnexpectedToken()}}t=r}while(!this.eof()){e=this.codePointAt(this.index);if(!n.Character.isIdentifierPart(e)){break}r=n.Character.fromCodePoint(e);t+=r;this.index+=r.length;if(e===92){t=t.substr(0,t.length-1);if(this.source.charCodeAt(this.index)!==117){this.throwUnexpectedToken()}++this.index;if(this.source[this.index]==="{"){++this.index;r=this.scanUnicodeCodePointEscape()}else{r=this.scanHexEscape("u");if(r===null||r==="\\"||!n.Character.isIdentifierPart(r.charCodeAt(0))){this.throwUnexpectedToken()}}t+=r}}return t};Scanner.prototype.octalToDecimal=function(e){var t=e!=="0";var r=octalValue(e);if(!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))){t=true;r=r*8+octalValue(this.source[this.index++]);if("0123".indexOf(e)>=0&&!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))){r=r*8+octalValue(this.source[this.index++])}}return{code:r,octal:t}};Scanner.prototype.scanIdentifier=function(){var e;var t=this.index;var r=this.source.charCodeAt(t)===92?this.getComplexIdentifier():this.getIdentifier();if(r.length===1){e=3}else if(this.isKeyword(r)){e=4}else if(r==="null"){e=5}else if(r==="true"||r==="false"){e=1}else{e=3}if(e!==3&&t+r.length!==this.index){var i=this.index;this.index=t;this.tolerateUnexpectedToken(a.Messages.InvalidEscapedReservedWord);this.index=i}return{type:e,value:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}};Scanner.prototype.scanPunctuator=function(){var e=this.index;var t=this.source[this.index];switch(t){case"(":case"{":if(t==="{"){this.curlyStack.push("{")}++this.index;break;case".":++this.index;if(this.source[this.index]==="."&&this.source[this.index+1]==="."){this.index+=2;t="..."}break;case"}":++this.index;this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:t=this.source.substr(this.index,4);if(t===">>>="){this.index+=4}else{t=t.substr(0,3);if(t==="==="||t==="!=="||t===">>>"||t==="<<="||t===">>="||t==="**="){this.index+=3}else{t=t.substr(0,2);if(t==="&&"||t==="||"||t==="=="||t==="!="||t==="+="||t==="-="||t==="*="||t==="/="||t==="++"||t==="--"||t==="<<"||t===">>"||t==="&="||t==="|="||t==="^="||t==="%="||t==="<="||t===">="||t==="=>"||t==="**"){this.index+=2}else{t=this.source[this.index];if("<>=!+-*%&|^/".indexOf(t)>=0){++this.index}}}}}if(this.index===e){this.throwUnexpectedToken()}return{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.scanHexLiteral=function(e){var t="";while(!this.eof()){if(!n.Character.isHexDigit(this.source.charCodeAt(this.index))){break}t+=this.source[this.index++]}if(t.length===0){this.throwUnexpectedToken()}if(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))){this.throwUnexpectedToken()}return{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.scanBinaryLiteral=function(e){var t="";var r;while(!this.eof()){r=this.source[this.index];if(r!=="0"&&r!=="1"){break}t+=this.source[this.index++]}if(t.length===0){this.throwUnexpectedToken()}if(!this.eof()){r=this.source.charCodeAt(this.index);if(n.Character.isIdentifierStart(r)||n.Character.isDecimalDigit(r)){this.throwUnexpectedToken()}}return{type:6,value:parseInt(t,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.scanOctalLiteral=function(e,t){var r="";var i=false;if(n.Character.isOctalDigit(e.charCodeAt(0))){i=true;r="0"+this.source[this.index++]}else{++this.index}while(!this.eof()){if(!n.Character.isOctalDigit(this.source.charCodeAt(this.index))){break}r+=this.source[this.index++]}if(!i&&r.length===0){this.throwUnexpectedToken()}if(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))||n.Character.isDecimalDigit(this.source.charCodeAt(this.index))){this.throwUnexpectedToken()}return{type:6,value:parseInt(r,8),octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}};Scanner.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0){i=i.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,i){var u=parseInt(t||i,16);if(u>1114111){n.throwUnexpectedToken(a.Messages.InvalidRegExp)}if(u<=65535){return String.fromCharCode(u)}return r}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r)}try{RegExp(i)}catch(e){this.throwUnexpectedToken(a.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}};Scanner.prototype.scanRegExpBody=function(){var e=this.source[this.index];i.assert(e==="/","Regular expression literal must start with a slash");var t=this.source[this.index++];var r=false;var u=false;while(!this.eof()){e=this.source[this.index++];t+=e;if(e==="\\"){e=this.source[this.index++];if(n.Character.isLineTerminator(e.charCodeAt(0))){this.throwUnexpectedToken(a.Messages.UnterminatedRegExp)}t+=e}else if(n.Character.isLineTerminator(e.charCodeAt(0))){this.throwUnexpectedToken(a.Messages.UnterminatedRegExp)}else if(r){if(e==="]"){r=false}}else{if(e==="/"){u=true;break}else if(e==="["){r=true}}}if(!u){this.throwUnexpectedToken(a.Messages.UnterminatedRegExp)}return t.substr(1,t.length-2)};Scanner.prototype.scanRegExpFlags=function(){var e="";var t="";while(!this.eof()){var r=this.source[this.index];if(!n.Character.isIdentifierPart(r.charCodeAt(0))){break}++this.index;if(r==="\\"&&!this.eof()){r=this.source[this.index];if(r==="u"){++this.index;var i=this.index;var a=this.scanHexEscape("u");if(a!==null){t+=a;for(e+="\\u";i=55296&&e<57343){if(n.Character.isIdentifierStart(this.codePointAt(this.index))){return this.scanIdentifier()}}return this.scanPunctuator()};return Scanner}();t.Scanner=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TokenName={};t.TokenName[1]="Boolean";t.TokenName[2]="";t.TokenName[3]="Identifier";t.TokenName[4]="Keyword";t.TokenName[5]="Null";t.TokenName[6]="Numeric";t.TokenName[7]="Punctuator";t.TokenName[8]="String";t.TokenName[9]="RegularExpression";t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(10);var n=r(12);var a=r(13);var u=function(){function Reader(){this.values=[];this.curly=this.paren=-1}Reader.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0};Reader.prototype.isRegexStart=function(){var e=this.values[this.values.length-1];var t=e!==null;switch(e){case"this":case"]":t=false;break;case")":var r=this.values[this.paren-1];t=r==="if"||r==="while"||r==="for"||r==="with";break;case"}":t=false;if(this.values[this.curly-3]==="function"){var i=this.values[this.curly-4];t=i?!this.beforeFunctionExpression(i):false}else if(this.values[this.curly-4]==="function"){var i=this.values[this.curly-5];t=i?!this.beforeFunctionExpression(i):true}break;default:break}return t};Reader.prototype.push=function(e){if(e.type===7||e.type===4){if(e.value==="{"){this.curly=this.values.length}else if(e.value==="("){this.paren=this.values.length}this.values.push(e.value)}else{this.values.push(null)}};return Reader}();var s=function(){function Tokenizer(e,t){this.errorHandler=new i.ErrorHandler;this.errorHandler.tolerant=t?typeof t.tolerant==="boolean"&&t.tolerant:false;this.scanner=new n.Scanner(e,this.errorHandler);this.scanner.trackComment=t?typeof t.comment==="boolean"&&t.comment:false;this.trackRange=t?typeof t.range==="boolean"&&t.range:false;this.trackLoc=t?typeof t.loc==="boolean"&&t.loc:false;this.buffer=[];this.reader=new u}Tokenizer.prototype.errors=function(){return this.errorHandler.errors};Tokenizer.prototype.getNextToken=function(){if(this.buffer.length===0){var e=this.scanner.scanComments();if(this.scanner.trackComment){for(var t=0;tt){if(e.charAt(r-1)!==" "){break}r--}return r}},,function(e,t,r){"use strict";var i=r(347)("unified-engine:file-pipeline:stringify");var n=r(928);var a=r(212);e.exports=stringify;function stringify(e,t){var r=e.processor;var u=e.tree;var s;if(n(t).fatal){i("Not compiling failed document");return}if(!e.output&&!e.out&&!e.alwaysStringify){i("Not compiling document without output settings");return}i("Compiling `%s`",t.path);if(e.inspect){if(t.path){t.extname=".txt"}s=a[e.color?"color":"noColor"](u)+"\n"}else if(e.treeOut){if(t.path){t.extname=".json"}s=JSON.stringify(u,null,2)+"\n"}else{s=r.stringify(u,t)}t.contents=s;i("Compiled document")}},,,function(e,t,r){"use strict";const i=r(624);e.exports=(e=>typeof e==="string"?e.replace(i(),""):e)},,function(e,t,r){"use strict";var i=r(260);function Mark(e,t,r,i,n){this.name=e;this.buffer=t;this.position=r;this.line=i;this.column=n}Mark.prototype.getSnippet=function getSnippet(e,t){var r,n,a,u,s;if(!this.buffer)return null;e=e||4;t=t||75;r="";n=this.position;while(n>0&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(n-1))===-1){n-=1;if(this.position-n>t/2-1){r=" ... ";n+=5;break}}a="";u=this.position;while(ut/2-1){a=" ... ";u-=5;break}}s=this.buffer.slice(n,u);return i.repeat(" ",e)+r+s+a+"\n"+i.repeat(" ",e+this.position-n+r.length)+"^"};Mark.prototype.toString=function toString(e){var t,r="";if(this.name){r+='in "'+this.name+'" '}r+="at line "+(this.line+1)+", column "+(this.column+1);if(!e){t=this.getSnippet();if(t){r+=":\n"+t}}return r};e.exports=Mark},function(e,t,r){var i=r(148);var n=function(){};var a=r(405);e.exports=wrapped;function wrapped(e){function wrap(){var t=i(arguments);var r=t[t.length-1];var u=this;var s=typeof r=="function"?t.pop():n;if(!e){return s.apply(u,[null].concat(t))}if(generator(e)){return a(e).apply(u,t.concat(s))}if(e.length>t.length){try{return e.apply(u,t.concat(s))}catch(e){return s(e)}}return sync(e,s).apply(u,t)}return wrap}function sync(e,t){return function(){var r;try{r=e.apply(this,arguments)}catch(e){return t(e)}if(promise(r)){r.then(function(e){t(null,e)},t)}else{r instanceof Error?t(r):t(null,r)}}}function generator(e){return e&&e.constructor&&"GeneratorFunction"==e.constructor.name}function promise(e){return e&&"function"==typeof e.then}},,,,,,,,function(e,t,r){"use strict";var i=r(495);e.exports=i("remark-lint:no-file-name-articles",noFileNameArticles);function noFileNameArticles(e,t){var r=t.stem&&t.stem.match(/^(the|teh|an?)\b/i);if(r){t.message("Do not start file names with `"+r[0]+"`")}}},,,function(e,t,r){"use strict";var i=r(171);e.exports=newline;var n="\n";function newline(e,t,r){var a=t.charAt(0);var u;var s;var o;var l;if(a!==n){return}if(r){return true}l=1;u=t.length;s=a;o="";while(l{if(typeof e!=="string"||e.length===0){return 0}e=i(e);let t=0;for(let r=0;r=127&&i<=159){continue}if(i>=768&&i<=879){continue}if(i>65535){r++}t+=n(i)?2:1}return t})},,,,function(e){e.exports=require("stream")},,,,function(e){"use strict";e.exports=function isObject(e){return typeof e==="object"&&e!==null}},,function(e,t,r){"use strict";e.exports={position:true,gfm:true,commonmark:false,footnotes:false,pedantic:false,blocks:r(676)}},,,function(e,t,r){"use strict";var i=r(211);var n=Object.prototype.toString;function resolveYamlPairs(e){if(e===null)return true;var t,r,i,a,u,s=e;u=new Array(s.length);for(t=0,r=s.length;t=0){t=t.slice(1)}if(t===".inf"){return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(t===".nan"){return NaN}else if(t.indexOf(":")>=0){t.split(":").forEach(function(e){n.unshift(parseFloat(e,10))});t=0;i=1;n.forEach(function(e){t+=e*i;i*=60});return r*t}return r*parseFloat(t,10)}var u=/^[-+]?[0-9]+e/;function representYamlFloat(e,t){var r;if(isNaN(e)){switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===e){switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===e){switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(i.isNegativeZero(e)){return"-0.0"}r=e.toString(10);return u.test(r)?r.replace("e",".e"):r}function isFloat(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||i.isNegativeZero(e))}e.exports=new n("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},,function(e,t,r){"use strict";const i=r(947);e.exports=((e,t,r)=>{if(typeof t==="number"){r=t}if(i.has(e.toLowerCase())){t=i.get(e.toLowerCase());const r=e.charAt(0);const n=r===r.toUpperCase();if(n){t=r.toUpperCase()+t.slice(1)}const a=e===e.toUpperCase();if(a){t=t.toUpperCase()}}else if(typeof t!=="string"){t=(e.replace(/(?:s|x|z|ch|sh)$/i,"$&e").replace(/([^aeiou])y$/i,"$1ie")+"s").replace(/i?e?s$/i,t=>{const r=e.slice(-1)===e.slice(-1).toLowerCase();return r?t.toLowerCase():t.toUpperCase()})}return Math.abs(r)===1?e:t})},function(e,t,r){"use strict";var i=r(814);e.exports=pad;var n="\n";var a=" ";var u=4;function pad(e,t){var r=e.split(n);var s=r.length;var o=i(a,t*u);while(s--){if(r[s].length!==0){r[s]=o+r[s]}}return r.join(n)}},,,,function(e){e.exports=function(e,t){return e.replace(/(\\*)(\$([_a-z0-9]+)|\${([_a-z0-9]+)})/gi,function(e,r,i,n,a){if(!(r.length%2)){return r.substring(Math.ceil(r.length/2))+(t[n||a]||"")}else{return r.substring(1)+i}})}},,,,function(e,t,r){"use strict";var i=r(211);var n=Object.prototype.hasOwnProperty;function resolveYamlSet(e){if(e===null)return true;var t,r=e;for(t in r){if(n.call(r,t)){if(r[t]!==null)return false}}return true}function constructYamlSet(e){return e!==null?e:{}}e.exports=new i("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},function(e){if(typeof Object.create==="function"){e.exports=function inherits(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}else{e.exports=function inherits(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype;e.prototype=new r;e.prototype.constructor=e}}},,,,,function(e){var t=Object.prototype.toString;var r=typeof Buffer.alloc==="function"&&typeof Buffer.allocUnsafe==="function"&&typeof Buffer.from==="function";function isArrayBuffer(e){return t.call(e).slice(8,-1)==="ArrayBuffer"}function fromArrayBuffer(e,t,i){t>>>=0;var n=e.byteLength-t;if(n<0){throw new RangeError("'offset' is out of bounds")}if(i===undefined){i=n}else{i>>>=0;if(i>n){throw new RangeError("'length' is out of bounds")}}return r?Buffer.from(e.slice(t,t+i)):new Buffer(new Uint8Array(e.slice(t,t+i)))}function fromString(e,t){if(typeof t!=="string"||t===""){t="utf8"}if(!Buffer.isEncoding(t)){throw new TypeError('"encoding" must be a valid string encoding')}return r?Buffer.from(e,t):new Buffer(e,t)}function bufferFrom(e,t,i){if(typeof e==="number"){throw new TypeError('"value" argument must not be a number')}if(isArrayBuffer(e)){return fromArrayBuffer(e,t,i)}if(typeof e==="string"){return fromString(e,t)}return r?Buffer.from(e):new Buffer(e)}e.exports=bufferFrom},,function(e){e.exports={AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abreve:"Ă",Acir:"Â",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrav:"À",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Arin:"Å",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atild:"Ã",Atilde:"Ã",Aum:"Ä",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COP:"©",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedi:"Ç",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ET:"Ð",ETH:"Ð",Eacut:"É",Eacute:"É",Ecaron:"Ě",Ecir:"Ê",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrav:"È",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Eum:"Ë",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",G:">",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacut:"Í",Iacute:"Í",Icir:"Î",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrav:"Ì",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Ium:"Ï",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",L:"<",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uum:"Ü",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacut:"Ý",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacut:"á",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acir:"â",acirc:"â",acut:"´",acute:"´",acy:"а",aeli:"æ",aelig:"æ",af:"⁡",afr:"𝔞",agrav:"à",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",am:"&",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",arin:"å",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atild:"ã",atilde:"ã",aum:"ä",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvba:"¦",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedi:"ç",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedi:"¸",cedil:"¸",cemptyv:"⦲",cen:"¢",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",cop:"©",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curre:"¤",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",de:"°",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divid:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacut:"é",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"ê",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrav:"è",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",et:"ð",eth:"ð",eum:"ë",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac1:"¼",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac3:"¾",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",g:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacut:"í",iacute:"í",ic:"⁣",icir:"î",icirc:"î",icy:"и",iecy:"е",iexc:"¡",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrav:"ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iques:"¿",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",ium:"ï",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laqu:"«",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",l:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",mac:"¯",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micr:"µ",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middo:"·",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbs:" ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",no:"¬",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntild:"ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacut:"ó",oacute:"ó",oast:"⊛",ocir:"ô",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograv:"ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"º",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslas:"ø",oslash:"ø",osol:"⊘",otild:"õ",otilde:"õ",otimes:"⊗",otimesas:"⨶",oum:"ö",ouml:"ö",ovbar:"⌽",par:"¶",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusm:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",poun:"£",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quo:'"',quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raqu:"»",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",re:"®",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sec:"§",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",sh:"­",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szli:"ß",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thor:"þ",thorn:"þ",tilde:"˜",time:"×",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacut:"ú",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucir:"û",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrav:"ù",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",um:"¨",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uum:"ü",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacut:"ý",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",ye:"¥",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yum:"ÿ",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},function(e,t,r){const i=r(287);const n=r(809);const a={parse:i,stringify:n};e.exports=a},,function(e){"use strict";e.exports=interrupt;function interrupt(e,t,r,i){var n=e.length;var a=-1;var u;var s;while(++a>0},ToUint32:function(e){return e>>>0}}}();var u=Math.LN2,s=Math.abs,o=Math.floor,l=Math.log,f=Math.min,c=Math.pow,h=Math.round;function configureProperties(e){if(v&&p){var t=v(e),r;for(r=0;rn)throw new RangeError("Array too large for polyfill");function makeArrayAccessor(t){p(e,t,{get:function(){return e._getter(t)},set:function(r){e._setter(t,r)},enumerable:true,configurable:false})}var t;for(t=0;t>r}function as_unsigned(e,t){var r=32-t;return e<>>r}function packI8(e){return[e&255]}function unpackI8(e){return as_signed(e[0],8)}function packU8(e){return[e&255]}function unpackU8(e){return as_unsigned(e[0],8)}function packU8Clamped(e){e=h(Number(e));return[e<0?0:e>255?255:e&255]}function packI16(e){return[e>>8&255,e&255]}function unpackI16(e){return as_signed(e[0]<<8|e[1],16)}function packU16(e){return[e>>8&255,e&255]}function unpackU16(e){return as_unsigned(e[0]<<8|e[1],16)}function packI32(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}function unpackI32(e){return as_signed(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function packU32(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}function unpackU32(e){return as_unsigned(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function packIEEE754(e,t,r){var i=(1<.5)return t+1;return t%2?t+1:t}if(e!==e){a=(1<=c(2,1-i)){a=f(o(l(e)/u),1023);h=roundToEven(e/c(2,a)*c(2,r));if(h/c(2,r)>=2){a=a+1;h=1}if(a>i){a=(1<>1}}i.reverse();s=i.join("");o=(1<0){return l*c(2,f-o)*(1+h/c(2,r))}else if(h!==0){return l*c(2,-(o-1))*(h/c(2,r))}else{return l<0?-0:0}}function unpackF64(e){return unpackIEEE754(e,11,52)}function packF64(e){return packIEEE754(e,11,52)}function unpackF32(e){return unpackIEEE754(e,8,23)}function packF32(e){return packIEEE754(e,8,23)}(function(){var e=function ArrayBuffer(e){e=a.ToInt32(e);if(e<0)throw new RangeError("ArrayBuffer size is not a small enough positive integer");this.byteLength=e;this._bytes=[];this._bytes.length=e;var t;for(t=0;tthis.buffer.byteLength){throw new RangeError("byteOffset out of range")}if(this.byteOffset%this.BYTES_PER_ELEMENT){throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.")}if(arguments.length<3){this.byteLength=this.buffer.byteLength-this.byteOffset;if(this.byteLength%this.BYTES_PER_ELEMENT){throw new RangeError("length of buffer minus byteOffset not a multiple of the element size")}this.length=this.byteLength/this.BYTES_PER_ELEMENT}else{this.length=a.ToUint32(i);this.byteLength=this.length*this.BYTES_PER_ELEMENT}if(this.byteOffset+this.byteLength>this.buffer.byteLength){throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}}else{throw new TypeError("Unexpected argument type(s)")}this.constructor=s;configureProperties(this);makeArrayAccessors(this)};s.prototype=new r;s.prototype.BYTES_PER_ELEMENT=t;s.prototype._pack=n;s.prototype._unpack=u;s.BYTES_PER_ELEMENT=t;s.prototype._getter=function(e){if(arguments.length<1)throw new SyntaxError("Not enough arguments");e=a.ToUint32(e);if(e>=this.length){return i}var t=[],r,n;for(r=0,n=this.byteOffset+e*this.BYTES_PER_ELEMENT;r=this.length){return i}var r=this._pack(t),n,u;for(n=0,u=this.byteOffset+e*this.BYTES_PER_ELEMENT;nthis.length){throw new RangeError("Offset plus length of array is out of range")}f=this.byteOffset+n*this.BYTES_PER_ELEMENT;c=r.length*this.BYTES_PER_ELEMENT;if(r.buffer===this.buffer){h=[];for(s=0,o=r.byteOffset;sthis.length){throw new RangeError("Offset plus length of array is out of range")}for(s=0;sr?r:e}e=a.ToInt32(e);t=a.ToInt32(t);if(arguments.length<1){e=0}if(arguments.length<2){t=this.length}if(e<0){e=this.length+e}if(t<0){t=this.length+t}e=clamp(e,0,this.length);t=clamp(t,0,this.length);var r=t-e;if(r<0){r=0}return new this.constructor(this.buffer,this.byteOffset+e*this.BYTES_PER_ELEMENT,r)};return s}var n=makeConstructor(1,packI8,unpackI8);var u=makeConstructor(1,packU8,unpackU8);var s=makeConstructor(1,packU8Clamped,unpackU8);var o=makeConstructor(2,packI16,unpackI16);var l=makeConstructor(2,packU16,unpackU16);var f=makeConstructor(4,packI32,unpackI32);var c=makeConstructor(4,packU32,unpackU32);var h=makeConstructor(4,packF32,unpackF32);var p=makeConstructor(8,packF64,unpackF64);t.Int8Array=t.Int8Array||n;t.Uint8Array=t.Uint8Array||u;t.Uint8ClampedArray=t.Uint8ClampedArray||s;t.Int16Array=t.Int16Array||o;t.Uint16Array=t.Uint16Array||l;t.Int32Array=t.Int32Array||f;t.Uint32Array=t.Uint32Array||c;t.Float32Array=t.Float32Array||h;t.Float64Array=t.Float64Array||p})();(function(){function r(e,t){return a.IsCallable(e.get)?e.get(t):e[t]}var e=function(){var e=new t.Uint16Array([4660]),i=new t.Uint8Array(e.buffer);return r(i,0)===18}();var i=function DataView(e,r,i){if(arguments.length===0){e=new t.ArrayBuffer(0)}else if(!(e instanceof t.ArrayBuffer||a.Class(e)==="ArrayBuffer")){throw new TypeError("TypeError")}this.buffer=e||new t.ArrayBuffer(0);this.byteOffset=a.ToUint32(r);if(this.byteOffset>this.buffer.byteLength){throw new RangeError("byteOffset out of range")}if(arguments.length<3){this.byteLength=this.buffer.byteLength-this.byteOffset}else{this.byteLength=a.ToUint32(i)}if(this.byteOffset+this.byteLength>this.buffer.byteLength){throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}configureProperties(this)};function makeGetter(i){return function(n,u){n=a.ToUint32(n);if(n+i.BYTES_PER_ELEMENT>this.byteLength){throw new RangeError("Array index out of range")}n+=this.byteOffset;var s=new t.Uint8Array(this.buffer,n,i.BYTES_PER_ELEMENT),o=[],l;for(l=0;lthis.byteLength){throw new RangeError("Array index out of range")}var o=new i([u]),l=new t.Uint8Array(o.buffer),f=[],c,h;for(c=0;c=e.length?e.length:n+r;t.message+=` while parsing near '${i===0?"":"..."}${e.slice(i,a)}${a===e.length?"":"..."}'`}else{t.message+=` while parsing '${e.slice(0,r*2)}'`}throw t}}},,function(e){"use strict";e.exports=function isArrayish(e){if(!e){return false}return e instanceof Array||Array.isArray(e)||e.length>=0&&e.splice instanceof Function}},,,function(e){"use strict";e.exports=strikethrough;var t="~";var r=t+t;function strikethrough(e){return r+this.all(e).join("")+r}},,function(e,t,r){"use strict";var i=r(495);var n=r(704);var a=r(682);var u=r(839);var s=r(526);e.exports=i("remark-lint:no-heading-indent",noHeadingIndent);var o=u.start;function noHeadingIndent(e,t){var r=String(t);var i=r.length;a(e,"heading",visitor);function visitor(e){var a;var u;var l;var f;var c;if(s(e)){return}a=o(e);u=a.offset;l=u-1;while(++l-1&&r.charAt(i)!=="\n"){t.message("Missing newline character at end of file")}}},,,function(e,t,r){"use strict";var i=r(171);var n=r(111);e.exports=strikethrough;strikethrough.locator=n;var a="~";var u="~~";function strikethrough(e,t,r){var n=this;var s="";var o="";var l="";var f="";var c;var h;var p;if(!n.options.gfm||t.charAt(0)!==a||t.charAt(1)!==a||i(t.charAt(2))){return}c=1;h=t.length;p=e.now();p.column+=2;p.offset+=2;while(++c?@[\\\]^`{|}~_]/;function copy(e,t){var r=e.length;var u=t.length;var s=[];var o=0;var l=0;var f;while(l0){r=Math.min(10,Math.floor(r));o=" ".substr(0,r)}}else if(typeof r==="string"){o=r.substr(0,10)}return serializeProperty("",{"":e});function serializeProperty(e,t){let r=t[e];if(r!=null){if(typeof r.toJSON5==="function"){r=r.toJSON5(e)}else if(typeof r.toJSON==="function"){r=r.toJSON(e)}}if(s){r=s.call(t,e,r)}if(r instanceof Number){r=Number(r)}else if(r instanceof String){r=String(r)}else if(r instanceof Boolean){r=r.valueOf()}switch(r){case null:return"null";case true:return"true";case false:return"false"}if(typeof r==="string"){return quoteString(r,false)}if(typeof r==="number"){return String(r)}if(typeof r==="object"){return Array.isArray(r)?serializeArray(r):serializeObject(r)}return undefined}function quoteString(e){const t={"'":.1,'"':.2};const r={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let i="";for(const n of e){switch(n){case"'":case'"':t[n]++;i+=n;continue}if(r[n]){i+=r[n];continue}if(n<" "){let e=n.charCodeAt(0).toString(16);i+="\\x"+("00"+e).substring(e.length);continue}i+=n}const n=l||Object.keys(t).reduce((e,r)=>t[e]=0){throw TypeError("Converting circular structure to JSON5")}n.push(e);let t=a;a=a+o;let r=u||Object.keys(e);let i=[];for(const t of r){const r=serializeProperty(t,e);if(r!==undefined){let e=serializeKey(t)+":";if(o!==""){e+=" "}e+=r;i.push(e)}}let s;if(i.length===0){s="{}"}else{let e;if(o===""){e=i.join(",");s="{"+e+"}"}else{let r=",\n"+a;e=i.join(r);s="{\n"+a+e+",\n"+t+"}"}}n.pop();a=t;return s}function serializeKey(e){if(e.length===0){return quoteString(e,true)}const t=String.fromCodePoint(e.codePointAt(0));if(!i.isIdStartChar(t)){return quoteString(e,true)}for(let r=t.length;r=0){throw TypeError("Converting circular structure to JSON5")}n.push(e);let t=a;a=a+o;let r=[];for(let t=0;t=n){return t.substr(0,n)}while(n>t.length&&i>1){if(i&1){t+=e}i>>=1;e+=e}t+=e;t=t.substr(0,n);return t}},,function(e,t,r){"use strict";var i=r(495);var n=r(839);var a=r(526);var u=r(135);var s=r(682);e.exports=i("remark-lint:no-duplicate-definitions",noDuplicateDefinitions);var o="Do not use definitions with the same identifier";function noDuplicateDefinitions(e,t){var r={};s(e,["definition","footnoteDefinition"],validate);function validate(e){var i;var s;if(!a(e)){i=e.identifier;s=r[i];if(s&&s.type){t.message(o+" ("+u(n.start(s))+")",e)}r[i]=e}}}},function(e){"use strict";e.exports=is;function is(e,t,r,i,n){var a=i!==null&&i!==undefined;var u=r!==null&&r!==undefined;var s=convert(e);if(u&&(typeof r!=="number"||r<0||r===Infinity)){throw new Error("Expected positive finite index or child node")}if(a&&(!is(null,i)||!i.children)){throw new Error("Expected parent node")}if(!t||!t.type||typeof t.type!=="string"){return false}if(a!==u){throw new Error("Expected both parent and index")}return Boolean(s.call(n,t,r,i))}function convert(e){if(typeof e==="string"){return typeFactory(e)}if(e===null||e===undefined){return ok}if(typeof e==="object"){return("length"in e?anyFactory:matchesFactory)(e)}if(typeof e==="function"){return e}throw new Error("Expected function, string, or object as test")}function convertAll(e){var t=[];var r=e.length;var i=-1;while(++i=u){v--;break}d+=g}D="";m="";while(++v{t=t||process.argv;const r=e.startsWith("-")?"":e.length===1?"-":"--";const i=t.indexOf(r+e);const n=t.indexOf("--");return i!==-1&&(n===-1?true:ie[r])e[r]=i});return e},[]);var u=map(e,function(e){return map(e,function(e,t){var r=String(e);if(i[t]==="."){var u=dotindex(r);var s=a[t]+(/\./.test(r)?1:2)-(n(r)-u);return r+Array(s).join(" ")}else return r})});var s=reduce(u,function(e,t){forEach(t,function(t,r){var i=n(t);if(!e[r]||i>e[r])e[r]=i});return e},[]);return map(u,function(e){return map(e,function(e,t){var r=s[t]-n(e)||0;var a=Array(Math.max(r+1,1)).join(" ");if(i[t]==="r"||i[t]==="."){return a+e}if(i[t]==="c"){return Array(Math.ceil(r/2+1)).join(" ")+e+Array(Math.floor(r/2+1)).join(" ")}return e+a}).join(r).replace(/\s+$/,"")}).join("\n")};function dotindex(e){var t=/\.[^.]*$/.exec(e);return t?t.index+1:e.length}function reduce(e,t,r){if(e.reduce)return e.reduce(t,r);var i=0;var n=arguments.length>=3?r:e[i++];for(;ir&&a0?"add":"remove")+" "+Math.abs(h)+" "+n("space",h);t.message(p,s)}}}}},,,,,function(e,t,r){"use strict";var i=r(721);e.exports=decodeEntity;var n={}.hasOwnProperty;function decodeEntity(e){return n.call(i,e)?i[e]:false}},,function(e,t,r){"use strict";var i=r(336);var n=r(780);e.exports=unherit;function unherit(e){var t;var r;var a;n(Of,e);n(From,Of);t=Of.prototype;for(r in t){a=t[r];if(a&&typeof a==="object"){t[r]="concat"in a?a.concat():i(a)}}return Of;function From(t){return e.apply(this,t)}function Of(){if(!(this instanceof Of)){return new From(arguments)}return e.apply(this,arguments)}}},function(e){"use strict";const t=e=>{let t=false;let r=false;let i=false;for(let n=0;n{if(!(typeof e==="string"||Array.isArray(e))){throw new TypeError("Expected the input to be `string | string[]`")}r=Object.assign({pascalCase:false},r);const i=e=>r.pascalCase?e.charAt(0).toUpperCase()+e.slice(1):e;if(Array.isArray(e)){e=e.map(e=>e.trim()).filter(e=>e.length).join("-")}else{e=e.trim()}if(e.length===0){return""}if(e.length===1){return r.pascalCase?e.toUpperCase():e.toLowerCase()}const n=e!==e.toLowerCase();if(n){e=t(e)}e=e.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(e,t)=>t.toUpperCase()).replace(/\d+(\w|$)/g,e=>e.toUpperCase());return i(e)};e.exports=r;e.exports.default=r},,function(e,t,r){"use strict";var i=r(211);function resolveYamlMerge(e){return e==="<<"||e===null}e.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},function(e){"use strict";e.exports={gfm:true,commonmark:false,pedantic:false,entities:"false",setext:false,closeAtx:false,looseTable:false,spacedTable:true,paddedTable:true,stringLength:stringLength,incrementListMarker:true,fences:false,fence:"`",bullet:"-",listItemIndent:"tab",rule:"*",ruleSpaces:true,ruleRepetition:3,strong:"*",emphasis:"_"};function stringLength(e){return e.length}},function(e,t,r){"use strict";var i=r(197);var n=r(520);var a=r(439);var u=r(25);var s=r(908);var o=r(895);e.exports=parseEntities;var l={}.hasOwnProperty;var f=String.fromCharCode;var c=Function.prototype;var h={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:false,nonTerminated:true};var p="named";var v="hexadecimal";var d="decimal";var D={};D[v]=16;D[d]=10;var m={};m[p]=s;m[d]=a;m[v]=u;var g=1;var E=2;var A=3;var C=4;var y=5;var w=6;var x=7;var b={};b[g]="Named character references must be terminated by a semicolon";b[E]="Numeric character references must be terminated by a semicolon";b[A]="Named character references cannot be empty";b[C]="Numeric character references cannot be empty";b[y]="Named character references must be known";b[w]="Numeric character references cannot be disallowed";b[x]="Numeric character references cannot be outside the permissible Unicode range";function parseEntities(e,t){var r={};var i;var n;if(!t){t={}}for(n in h){i=t[n];r[n]=i===null||i===undefined?h[n]:i}if(r.position.indent||r.position.start){r.indent=r.position.indent||[];r.position=r.position.start}return parse(e,r)}function parse(e,t){var r=t.additional;var a=t.nonTerminated;var u=t.text;var h=t.reference;var F=t.warning;var S=t.textContext;var B=t.referenceContext;var k=t.warningContext;var O=t.position;var P=t.indent||[];var T=e.length;var I=0;var M=-1;var L=O.column||1;var R=O.line||1;var j="";var U=[];var N;var J;var z;var X;var G;var q;var W;var _;var V;var Y;var H;var $;var Z;var Q;var K;var ee;var te;var re;var ie;ee=now();_=F?parseError:c;I--;T++;while(++I65535){q-=65536;Y+=f(q>>>(10&1023)|55296);q=56320|q&1023}q=Y+f(q)}}if(!q){X=e.slice(Z-1,ie);j+=X;L+=X.length;I=ie-1}else{flush();ee=now();I=ie-1;L+=ie-Z+1;U.push(q);te=now();te.offset++;if(h){h.call(B,q,{start:ee,end:te},e.slice(Z-1,ie))}ee=te}}}return U.join("");function now(){return{line:R,column:L,offset:I+(O.offset||0)}}function parseError(e,t){var r=now();r.column+=t;r.offset+=t;F.call(k,b[e],r,e)}function at(t){return e.charAt(t)}function flush(){if(j){U.push(j);if(u){u.call(S,j,{start:ee,end:now()})}j=""}}}function prohibited(e){return e>=55296&&e<=57343||e>1114111}function disallowed(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}},,,function(e,t,r){"use strict";var i=r(36);var n=r(116);var a=r(171);var u=r(82);e.exports=emphasis;emphasis.locator=u;var s="*";var o="_";var l="\\";function emphasis(e,t,r){var u=this;var f=0;var c=t.charAt(f);var h;var p;var v;var d;var D;var m;var g;if(c!==s&&c!==o){return}p=u.options.pedantic;D=c;v=c;m=t.length;f++;d="";c="";if(p&&a(t.charAt(f))){return}while(f0){if(typeof t!=="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==l.prototype){t=_uint8ArrayToBuffer(t)}if(i){if(a.endEmitted)e.emit("error",new Error("stream.unshift() after end event"));else addChunk(e,a,t,true)}else if(a.ended){e.emit("error",new Error("stream.push() after EOF"))}else{a.reading=false;if(a.decoder&&!r){t=a.decoder.write(t);if(a.objectMode||t.length!==0)addChunk(e,a,t,false);else maybeReadMore(e,a)}else{addChunk(e,a,t,false)}}}else if(!i){a.reading=false}}return needMoreData(a)}function addChunk(e,t,r,i){if(t.flowing&&t.length===0&&!t.sync){e.emit("data",r);e.read(0)}else{t.length+=t.objectMode?1:r.length;if(i)t.buffer.unshift(r);else t.buffer.push(r);if(t.needReadable)emitReadable(e)}maybeReadMore(e,t)}function chunkInvalid(e,t){var r;if(!_isUint8Array(t)&&typeof t!=="string"&&t!==undefined&&!e.objectMode){r=new TypeError("Invalid non-string/buffer chunk")}return r}function needMoreData(e){return!e.ended&&(e.needReadable||e.length=g){e=g}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function howMuchToRead(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e){if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length}if(e>t.highWaterMark)t.highWaterMark=computeNewHighWaterMark(e);if(e<=t.length)return e;if(!t.ended){t.needReadable=true;return 0}return t.length}Readable.prototype.read=function(e){p("read",e);e=parseInt(e,10);var t=this._readableState;var r=e;if(e!==0)t.emittedReadable=false;if(e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended)){p("read: emitReadable",t.length,t.ended);if(t.length===0&&t.ended)endReadable(this);else emitReadable(this);return null}e=howMuchToRead(e,t);if(e===0&&t.ended){if(t.length===0)endReadable(this);return null}var i=t.needReadable;p("need readable",i);if(t.length===0||t.length-e0)n=fromList(e,t);else n=null;if(n===null){t.needReadable=true;e=0}else{t.length-=e}if(t.length===0){if(!t.ended)t.needReadable=true;if(r!==e&&t.ended)endReadable(this)}if(n!==null)this.emit("data",n);return n};function onEofChunk(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length){t.buffer.push(r);t.length+=t.objectMode?1:r.length}}t.ended=true;emitReadable(e)}function emitReadable(e){var t=e._readableState;t.needReadable=false;if(!t.emittedReadable){p("emitReadable",t.flowing);t.emittedReadable=true;if(t.sync)i.nextTick(emitReadable_,e);else emitReadable_(e)}}function emitReadable_(e){p("emit readable");e.emit("readable");flow(e)}function maybeReadMore(e,t){if(!t.readingMore){t.readingMore=true;i.nextTick(maybeReadMore_,e,t)}}function maybeReadMore_(e,t){var r=t.length;while(!t.reading&&!t.flowing&&!t.ended&&t.length1&&indexOf(n.pipes,e)!==-1)&&!l){p("false write response, pause",r._readableState.awaitDrain);r._readableState.awaitDrain++;f=true}r.pause()}}function onerror(t){p("onerror",t);unpipe();e.removeListener("error",onerror);if(s(e,"error")===0)e.emit("error",t)}prependListener(e,"error",onerror);function onclose(){e.removeListener("finish",onfinish);unpipe()}e.once("close",onclose);function onfinish(){p("onfinish");e.removeListener("close",onclose);unpipe()}e.once("finish",onfinish);function unpipe(){p("unpipe");r.unpipe(e)}e.emit("pipe",r);if(!n.flowing){p("pipe resume");r.resume()}return e};function pipeOnDrain(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain);if(t.awaitDrain)t.awaitDrain--;if(t.awaitDrain===0&&s(e,"data")){t.flowing=true;flow(e)}}}Readable.prototype.unpipe=function(e){var t=this._readableState;var r={hasUnpiped:false};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;t.pipes=null;t.pipesCount=0;t.flowing=false;if(e)e.emit("unpipe",this,r);return this}if(!e){var i=t.pipes;var n=t.pipesCount;t.pipes=null;t.pipesCount=0;t.flowing=false;for(var a=0;a=t.length){if(t.decoder)r=t.buffer.join("");else if(t.buffer.length===1)r=t.buffer.head.data;else r=t.buffer.concat(t.length);t.buffer.clear()}else{r=fromListPartial(e,t.buffer,t.decoder)}return r}function fromListPartial(e,t,r){var i;if(ea.length?a.length:e;if(u===a.length)n+=a;else n+=a.slice(0,e);e-=u;if(e===0){if(u===a.length){++i;if(r.next)t.head=r.next;else t.head=t.tail=null}else{t.head=r;r.data=a.slice(u)}break}++i}t.length-=i;return n}function copyFromBuffer(e,t){var r=l.allocUnsafe(e);var i=t.head;var n=1;i.data.copy(r);e-=i.data.length;while(i=i.next){var a=i.data;var u=e>a.length?a.length:e;a.copy(r,r.length-e,0,u);e-=u;if(e===0){if(u===a.length){++n;if(i.next)t.head=i.next;else t.head=t.tail=null}else{t.head=i;i.data=a.slice(u)}break}++n}t.length-=n;return r}function endReadable(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!t.endEmitted){t.ended=true;i.nextTick(endReadableNT,t,e)}}function endReadableNT(e,t){if(!e.endEmitted&&e.length===0){e.endEmitted=true;t.readable=false;t.emit("end")}}function indexOf(e,t){for(var r=0,i=e.length;r=f){continue}y="";while(v=2){t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}}catch(e){}t.inspectOpts=Object.keys(process.env).filter(function(e){return/^debug_/i.test(e)}).reduce(function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,function(e,t){return t.toUpperCase()});var i=process.env[t];if(/^(yes|on|true|enabled)$/i.test(i)){i=true}else if(/^(no|off|false|disabled)$/i.test(i)){i=false}else if(i==="null"){i=null}else{i=Number(i)}e[r]=i;return e},{});function useColors(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):i.isatty(process.stderr.fd)}function formatArgs(t){var r=this.namespace,i=this.useColors;if(i){var n=this.color;var a="[3"+(n<8?n:"8;5;"+n);var u=" ".concat(a,";1m").concat(r," ");t[0]=u+t[0].split("\n").join("\n"+u);t.push(a+"m+"+e.exports.humanize(this.diff)+"")}else{t[0]=getDate()+r+" "+t[0]}}function getDate(){if(t.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(){return process.stderr.write(n.format.apply(n,arguments)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};var r=Object.keys(t.inspectOpts);for(var i=0;i=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},,,function(e){"use strict";e.exports=locate;function locate(e,t){var r=e.indexOf("[",t);var i=e.indexOf("![",t);if(i===-1){return r}return r1){u=Math.floor(u/l)*l}o[u]=a;s=e.charAt(++a)}return{indent:u,stops:o}}},function(e){"use strict";e.exports=locate;function locate(e,t){return e.indexOf("`",t)}},,,,,function(e){"use strict";e.exports=factory;function factory(e){var t=indices(String(e));return{toPosition:offsetToPositionFactory(t),toOffset:positionToOffsetFactory(t)}}function offsetToPositionFactory(e){return offsetToPosition;function offsetToPosition(t){var r=-1;var i=e.length;if(t<0){return{}}while(++rt){return{line:r+1,column:t-(e[r-1]||0)+1,offset:t}}}return{}}}function positionToOffsetFactory(e){return positionToOffset;function positionToOffset(t){var r=t&&t.line;var i=t&&t.column;if(!isNaN(r)&&!isNaN(i)&&r-1 in e){return(e[r-2]||0)+i-1||0}return-1}}function indices(e){var t=[];var r=e.indexOf("\n");while(r!==-1){t.push(r+1);r=e.indexOf("\n",r+1)}t.push(e.length+1);return t}},,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(526);var u=r(10);e.exports=i("remark-lint:no-inline-padding",noInlinePadding);function noInlinePadding(e,t){n(e,["emphasis","strong","delete","image","link"],visitor);function visitor(e){var r;if(!a(e)){r=u(e);if(r.charAt(0)===" "||r.charAt(r.length-1)===" "){t.message("Don’t pad `"+e.type+"` with inner spaces",e)}}}}},function(e){"use strict";e.exports=toString;function toString(e){return valueOf(e)||e.children&&e.children.map(toString).join("")||""}function valueOf(e){return(e&&e.value?e.value:e.alt?e.alt:e.title)||""}},,function(e){"use strict";if(!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0){e.exports={nextTick:nextTick}}else{e.exports=process}function nextTick(e,t,r,i){if(typeof e!=="function"){throw new TypeError('"callback" argument must be a function')}var n=arguments.length;var a,u;switch(n){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function afterTickOne(){e.call(null,t)});case 3:return process.nextTick(function afterTickTwo(){e.call(null,t,r)});case 4:return process.nextTick(function afterTickThree(){e.call(null,t,r,i)});default:a=new Array(n-1);u=0;while(u=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}},,function(e,t,r){"use strict";var i=r(431);function homedir(){var e=process.env;var t=e.HOME;var r=e.LOGNAME||e.USER||e.LNAME||e.USERNAME;if(process.platform==="win32"){return e.USERPROFILE||e.HOMEDRIVE+e.HOMEPATH||t||null}if(process.platform==="darwin"){return t||(r?"/Users/"+r:null)}if(process.platform==="linux"){return t||(process.getuid()===0?"/root":r?"/home/"+r:null)}return t||null}e.exports=typeof i.homedir==="function"?i.homedir:homedir},,,,,,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(270);var u=r(704);var s=r(839);var o=r(526);e.exports=i("remark-lint:no-heading-content-indent",noHeadingContentIndent);var l=s.start;var f=s.end;function noHeadingContentIndent(e,t){var r=String(t);n(e,"heading",visitor);function visitor(e){var i;var n;var s;var c;var h;var p;var v;var d;var D;var m;if(o(e)){return}i=e.depth;n=e.children;s=a(e,"atx");if(s==="atx"||s==="atx-closed"){h=l(e);d=h.offset;D=r.charAt(d);while(D&&D!=="#"){D=r.charAt(++d)}if(!D){return}d=i+(d-h.offset);c=l(n[0]).column;if(!c){return}v=c-h.column-1-d;if(v){m=(v>0?"Remove":"Add")+" "+Math.abs(v)+" "+u("space",v)+" before this heading’s content";t.message(m,l(n[0]))}}if(s==="atx-closed"){p=f(n[n.length-1]);v=f(e).column-p.column-1-i;if(v){m="Remove "+v+" "+u("space",v)+" after this heading’s content";t.message(m,p)}}}}},function(e,t,r){"use strict";var i=r(336);var n=r(440);var a=r(901);var u=r(360);var s=r(315);e.exports=setOptions;var o={entities:{true:true,false:true,numbers:true,escape:true},bullet:{"*":true,"-":true,"+":true},rule:{"-":true,_:true,"*":true},listItemIndent:{tab:true,mixed:true,1:true},emphasis:{_:true,"*":true},strong:{_:true,"*":true},fence:{"`":true,"~":true}};var l={boolean:validateBoolean,string:validateString,number:validateNumber,function:validateFunction};function setOptions(e){var t=this;var r=t.options;var n;var s;if(e==null){e={}}else if(typeof e==="object"){e=i(e)}else{throw new Error("Invalid value `"+e+"` for setting `options`")}for(s in a){l[typeof a[s]](e,s,r[s],o[s])}n=e.ruleRepetition;if(n&&n<3){raise(n,"options.ruleRepetition")}t.encode=encodeFactory(String(e.entities));t.escape=u(e);t.options=e;return t}function validateBoolean(e,t,r){var i=e[t];if(i==null){i=r}if(typeof i!=="boolean"){raise(i,"options."+t)}e[t]=i}function validateNumber(e,t,r){var i=e[t];if(i==null){i=r}if(isNaN(i)){raise(i,"options."+t)}e[t]=i}function validateString(e,t,r,i){var n=e[t];if(n==null){n=r}n=String(n);if(!(n in i)){raise(n,"options."+t)}e[t]=n}function validateFunction(e,t,r){var i=e[t];if(i==null){i=r}if(typeof i!=="function"){raise(i,"options."+t)}e[t]=i}function encodeFactory(e){var t={};if(e==="false"){return s}if(e==="true"){t.useNamedReferences=true}if(e==="escape"){t.escapeOnly=true;t.useNamedReferences=true}return wrapped;function wrapped(e){return n(e,t)}}function raise(e,t){throw new Error("Invalid value `"+e+"` for setting `"+t+"`")}},,function(e,t){t=e.exports=trim;function trim(e){return e.replace(/^\s*|\s*$/g,"")}t.left=function(e){return e.replace(/^\s*/,"")};t.right=function(e){return e.replace(/\s*$/,"")}},function(e,t,r){"use strict";var i=r(814);e.exports=thematic;var n=" ";function thematic(){var e=this.options;var t=i(e.rule,e.ruleRepetition);return e.ruleSpaces?t.split("").join(n):t}},,,,,function(e,t,r){"use strict";var i=r(315);e.exports=enter;function enter(e,t){var r=e.encode;var n=e.escape;var a=e.enterLink();if(t.referenceType!=="shortcut"&&t.referenceType!=="collapsed"){return a}e.escape=i;e.encode=i;return exit;function exit(){e.encode=r;e.escape=n;a()}}},function(e,t,r){"use strict";var i=r(727);e.exports=new i({include:[r(234)],implicit:[r(633),r(843),r(981),r(702)]})},function(e,t,r){"use strict";var i=r(36);var n=r(814);var a=r(439);var u=r(1);var s=r(235);var o=r(724);e.exports=list;var l="*";var f="_";var c="+";var h="-";var p=".";var v=" ";var d="\n";var D="\t";var m=")";var g="x";var E=4;var A=/\n\n(?!\s*$)/;var C=/^\[([ \t]|x|X)][ \t]/;var y=/^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/;var w=/^([ \t]*)([*+-]|\d+[.)])([ \t]+)/;var x=/^( {1,4}|\t)?/gm;function list(e,t,r){var n=this;var u=n.options.commonmark;var s=n.options.pedantic;var g=n.blockTokenizers;var A=n.interruptList;var C=0;var y=t.length;var w=null;var x=0;var b;var F;var S;var B;var k;var O;var P;var T;var I;var M;var L;var j;var R;var U;var N;var J;var z;var X;var G=false;var q;var W;var _;var V;while(C=E){return}S=t.charAt(C);if(S===l||S===c||S===h){B=S;F=false}else{F=true;b="";while(C=E){V=true}if(J&&x>=J.indent){V=true}S=t.charAt(C);T=null;if(!V){if(S===l||S===c||S===h){T=S;C++;x++}else{b="";while(C=J.indent||x>E}P=false;C=O}M=t.slice(O,k);I=O===C?M:t.slice(C,k);if(T===l||T===f||T===h){if(g.thematicBreak.call(n,e,M,true)){break}}L=j;j=!P&&!i(I).length;if(V&&J){J.value=J.value.concat(N,M);U=U.concat(N,M);N=[]}else if(P){if(N.length!==0){G=true;J.value.push("");J.trail=N.concat()}J={value:[M],indent:x,trail:[]};R.push(J);U=U.concat(N,M);N=[]}else if(j){if(L&&!u){break}N.push(M)}else{if(L){break}if(o(A,g,n,[e,M,true])){break}J.value=J.value.concat(N,M);U=U.concat(N,M);N=[]}C=k+1}q=e(U.join(d)).reset({type:"list",ordered:F,start:w,spread:G,children:[]});z=n.enterList();X=n.enterBlock();C=-1;y=R.length;while(++C1){t.message(s,e)}}}},function(e){e.exports=function isBuffer(e){return e!=null&&e.constructor!=null&&typeof e.constructor.isBuffer==="function"&&e.constructor.isBuffer(e)}},,,,,,,,function(e){e.exports=require("util")},function(e,t,r){"use strict";var i=r(727);e.exports=i.DEFAULT=new i({include:[r(388)],explicit:[r(875),r(555),r(329)]})},function(e){e.exports=require("fs")},function(e){"use strict";e.exports=function(e){if(typeof e!=="string"){throw new TypeError("Expected a string")}return!/[^0-9a-z\xDF-\xFF]/.test(e.toLowerCase())}},,,,,function(e,t,r){"use strict";var i=r(495);var n=r(7);e.exports=i("remark-lint:no-tabs",noTabs);var a="Use spaces instead of hard-tabs";function noTabs(e,t){var r=String(t);var i=n(t).toPosition;var u=r.indexOf("\t");while(u!==-1){t.message(a,i(u));u=r.indexOf("\t",u+1)}}},function(e){function webpackEmptyContext(e){var t=new Error("Cannot find module '"+e+"'");t.code="MODULE_NOT_FOUND";throw t}webpackEmptyContext.keys=function(){return[]};webpackEmptyContext.resolve=webpackEmptyContext;e.exports=webpackEmptyContext;webpackEmptyContext.id=73},function(e,t,r){"use strict";var i=r(864);var n=r(97);var a=r(503);var u=r(123);var s=r(340);var o=r(951);e.exports=unified().freeze();var l=[].slice;var f={}.hasOwnProperty;var c=u().use(pipelineParse).use(pipelineRun).use(pipelineStringify);function pipelineParse(e,t){t.tree=e.parse(t.file)}function pipelineRun(e,t,r){e.run(t.tree,t.file,done);function done(e,i,n){if(e){r(e)}else{t.tree=i;t.file=n;r()}}}function pipelineStringify(e,t){t.file.contents=e.stringify(t.tree,t.file)}function unified(){var e=[];var t=u();var r={};var h=false;var p=-1;processor.data=data;processor.freeze=freeze;processor.attachers=e;processor.use=use;processor.parse=parse;processor.stringify=stringify;processor.run=run;processor.runSync=runSync;processor.process=process;processor.processSync=processSync;return processor;function processor(){var t=unified();var n=e.length;var a=-1;while(++a{if(typeof e!=="string"){throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof e}\``)}if(typeof t!=="string"){throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof t}\``)}try{e=a.realpathSync(e)}catch(t){if(t.code==="ENOENT"){e=i.resolve(e)}else if(r){return null}else{throw t}}const u=i.join(e,"noop.js");const s=()=>n._resolveFilename(t,{id:u,filename:u,paths:n._nodeModulePaths(e)});if(r){try{return s()}catch(e){return null}}return s()};e.exports=((e,t)=>u(e,t));e.exports.silent=((e,t)=>u(e,t,true))},,function(e,t,r){"use strict";var i=r(347)("unified-engine:file-pipeline:configure");var n=r(928);var a=r(623);var u=r(692);var s=r(876);e.exports=configure;function configure(e,t,r,o){var l=e.configuration;var f=e.processor;if(n(t).fatal){return o()}l.load(t.path,handleConfiguration);function handleConfiguration(e,t){var n;var l;var c;var h;var p;var v;if(e){return o(e)}i("Using settings `%j`",t.settings);f.data("settings",t.settings);n=t.plugins;h=n.length;p=-1;i("Using `%d` plugins",h);while(++p>10)+55296,(e-65536&1023)+56320)}var C=new Array(256);var y=new Array(256);for(var w=0;w<256;w++){C[w]=simpleEscapeSequence(w)?1:0;y[w]=simpleEscapeSequence(w)}function State(e,t){this.input=e;this.filename=t["filename"]||null;this.schema=t["schema"]||s;this.onWarning=t["onWarning"]||null;this.legacy=t["legacy"]||false;this.json=t["json"]||false;this.listener=t["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=e.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=[]}function generateError(e,t){return new n(t,new a(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function throwError(e,t){throw generateError(e,t)}function throwWarning(e,t){if(e.onWarning){e.onWarning.call(null,generateError(e,t))}}var x={YAML:function handleYamlDirective(e,t,r){var i,n,a;if(e.version!==null){throwError(e,"duplication of %YAML directive")}if(r.length!==1){throwError(e,"YAML directive accepts exactly one argument")}i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);if(i===null){throwError(e,"ill-formed argument of the YAML directive")}n=parseInt(i[1],10);a=parseInt(i[2],10);if(n!==1){throwError(e,"unacceptable YAML version of the document")}e.version=r[0];e.checkLineBreaks=a<2;if(a!==1&&a!==2){throwWarning(e,"unsupported YAML version of the document")}},TAG:function handleTagDirective(e,t,r){var i,n;if(r.length!==2){throwError(e,"TAG directive accepts exactly two arguments")}i=r[0];n=r[1];if(!E.test(i)){throwError(e,"ill-formed tag handle (first argument) of the TAG directive")}if(o.call(e.tagMap,i)){throwError(e,'there is a previously declared suffix for "'+i+'" tag handle')}if(!A.test(n)){throwError(e,"ill-formed tag prefix (second argument) of the TAG directive")}e.tagMap[i]=n}};function captureSegment(e,t,r,i){var n,a,u,s;if(t1){e.result+=i.repeat("\n",t-1)}}function readPlainScalar(e,t,r){var i,n,a,u,s,o,l,f,c=e.kind,h=e.result,p;p=e.input.charCodeAt(e.position);if(is_WS_OR_EOL(p)||is_FLOW_INDICATOR(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96){return false}if(p===63||p===45){n=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(n)||r&&is_FLOW_INDICATOR(n)){return false}}e.kind="scalar";e.result="";a=u=e.position;s=false;while(p!==0){if(p===58){n=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(n)||r&&is_FLOW_INDICATOR(n)){break}}else if(p===35){i=e.input.charCodeAt(e.position-1);if(is_WS_OR_EOL(i)){break}}else if(e.position===e.lineStart&&testDocumentSeparator(e)||r&&is_FLOW_INDICATOR(p)){break}else if(is_EOL(p)){o=e.line;l=e.lineStart;f=e.lineIndent;skipSeparationSpace(e,false,-1);if(e.lineIndent>=t){s=true;p=e.input.charCodeAt(e.position);continue}else{e.position=u;e.line=o;e.lineStart=l;e.lineIndent=f;break}}if(s){captureSegment(e,a,u,false);writeFoldedLines(e,e.line-o);a=u=e.position;s=false}if(!is_WHITE_SPACE(p)){u=e.position+1}p=e.input.charCodeAt(++e.position)}captureSegment(e,a,u,false);if(e.result){return true}e.kind=c;e.result=h;return false}function readSingleQuotedScalar(e,t){var r,i,n;r=e.input.charCodeAt(e.position);if(r!==39){return false}e.kind="scalar";e.result="";e.position++;i=n=e.position;while((r=e.input.charCodeAt(e.position))!==0){if(r===39){captureSegment(e,i,e.position,true);r=e.input.charCodeAt(++e.position);if(r===39){i=e.position;e.position++;n=e.position}else{return true}}else if(is_EOL(r)){captureSegment(e,i,n,true);writeFoldedLines(e,skipSeparationSpace(e,false,t));i=n=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a single quoted scalar")}else{e.position++;n=e.position}}throwError(e,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(e,t){var r,i,n,a,u,s;s=e.input.charCodeAt(e.position);if(s!==34){return false}e.kind="scalar";e.result="";e.position++;r=i=e.position;while((s=e.input.charCodeAt(e.position))!==0){if(s===34){captureSegment(e,r,e.position,true);e.position++;return true}else if(s===92){captureSegment(e,r,e.position,true);s=e.input.charCodeAt(++e.position);if(is_EOL(s)){skipSeparationSpace(e,false,t)}else if(s<256&&C[s]){e.result+=y[s];e.position++}else if((u=escapedHexLen(s))>0){n=u;a=0;for(;n>0;n--){s=e.input.charCodeAt(++e.position);if((u=fromHexCode(s))>=0){a=(a<<4)+u}else{throwError(e,"expected hexadecimal character")}}e.result+=charFromCodepoint(a);e.position++}else{throwError(e,"unknown escape sequence")}r=i=e.position}else if(is_EOL(s)){captureSegment(e,r,i,true);writeFoldedLines(e,skipSeparationSpace(e,false,t));r=i=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a double quoted scalar")}else{e.position++;i=e.position}}throwError(e,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(e,t){var r=true,i,n=e.tag,a,u=e.anchor,s,o,f,c,h,p={},v,d,D,m;m=e.input.charCodeAt(e.position);if(m===91){o=93;h=false;a=[]}else if(m===123){o=125;h=true;a={}}else{return false}if(e.anchor!==null){e.anchorMap[e.anchor]=a}m=e.input.charCodeAt(++e.position);while(m!==0){skipSeparationSpace(e,true,t);m=e.input.charCodeAt(e.position);if(m===o){e.position++;e.tag=n;e.anchor=u;e.kind=h?"mapping":"sequence";e.result=a;return true}else if(!r){throwError(e,"missed comma between flow collection entries")}d=v=D=null;f=c=false;if(m===63){s=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(s)){f=c=true;e.position++;skipSeparationSpace(e,true,t)}}i=e.line;composeNode(e,t,l,false,true);d=e.tag;v=e.result;skipSeparationSpace(e,true,t);m=e.input.charCodeAt(e.position);if((c||e.line===i)&&m===58){f=true;m=e.input.charCodeAt(++e.position);skipSeparationSpace(e,true,t);composeNode(e,t,l,false,true);D=e.result}if(h){storeMappingPair(e,a,p,d,v,D)}else if(f){a.push(storeMappingPair(e,null,p,d,v,D))}else{a.push(v)}skipSeparationSpace(e,true,t);m=e.input.charCodeAt(e.position);if(m===44){r=true;m=e.input.charCodeAt(++e.position)}else{r=false}}throwError(e,"unexpected end of the stream within a flow collection")}function readBlockScalar(e,t){var r,n,a=p,u=false,s=false,o=t,l=0,f=false,c,h;h=e.input.charCodeAt(e.position);if(h===124){n=false}else if(h===62){n=true}else{return false}e.kind="scalar";e.result="";while(h!==0){h=e.input.charCodeAt(++e.position);if(h===43||h===45){if(p===a){a=h===43?d:v}else{throwError(e,"repeat of a chomping mode identifier")}}else if((c=fromDecimalCode(h))>=0){if(c===0){throwError(e,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!s){o=t+c-1;s=true}else{throwError(e,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(h)){do{h=e.input.charCodeAt(++e.position)}while(is_WHITE_SPACE(h));if(h===35){do{h=e.input.charCodeAt(++e.position)}while(!is_EOL(h)&&h!==0)}}while(h!==0){readLineBreak(e);e.lineIndent=0;h=e.input.charCodeAt(e.position);while((!s||e.lineIndento){o=e.lineIndent}if(is_EOL(h)){l++;continue}if(e.lineIndentt)&&o!==0){throwError(e,"bad indentation of a sequence entry")}else if(e.lineIndentt){if(composeNode(e,t,h,true,n)){if(D){v=e.result}else{d=e.result}}if(!D){storeMappingPair(e,l,c,p,v,d,a,u);p=v=d=null}skipSeparationSpace(e,true,-1);g=e.input.charCodeAt(e.position)}if(e.lineIndent>t&&g!==0){throwError(e,"bad indentation of a mapping entry")}else if(e.lineIndentt){p=1}else if(e.lineIndent===t){p=0}else if(e.lineIndentt){p=1}else if(e.lineIndent===t){p=0}else if(e.lineIndent tag; it should be "'+g.kind+'", not "'+e.kind+'"')}if(!g.resolve(e.result)){throwError(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}else{e.result=g.construct(e.result);if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}else{throwError(e,"unknown tag !<"+e.tag+">")}}if(e.listener!==null){e.listener("close",e)}return e.tag!==null||e.anchor!==null||d}function readDocument(e){var t=e.position,r,i,n,a=false,u;e.version=null;e.checkLineBreaks=e.legacy;e.tagMap={};e.anchorMap={};while((u=e.input.charCodeAt(e.position))!==0){skipSeparationSpace(e,true,-1);u=e.input.charCodeAt(e.position);if(e.lineIndent>0||u!==37){break}a=true;u=e.input.charCodeAt(++e.position);r=e.position;while(u!==0&&!is_WS_OR_EOL(u)){u=e.input.charCodeAt(++e.position)}i=e.input.slice(r,e.position);n=[];if(i.length<1){throwError(e,"directive name must not be less than one character in length")}while(u!==0){while(is_WHITE_SPACE(u)){u=e.input.charCodeAt(++e.position)}if(u===35){do{u=e.input.charCodeAt(++e.position)}while(u!==0&&!is_EOL(u));break}if(is_EOL(u))break;r=e.position;while(u!==0&&!is_WS_OR_EOL(u)){u=e.input.charCodeAt(++e.position)}n.push(e.input.slice(r,e.position))}if(u!==0)readLineBreak(e);if(o.call(x,i)){x[i](e,i,n)}else{throwWarning(e,'unknown document directive "'+i+'"')}}skipSeparationSpace(e,true,-1);if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45){e.position+=3;skipSeparationSpace(e,true,-1)}else if(a){throwError(e,"directives end mark is expected")}composeNode(e,e.lineIndent-1,h,false,true);skipSeparationSpace(e,true,-1);if(e.checkLineBreaks&&m.test(e.input.slice(t,e.position))){throwWarning(e,"non-ASCII line breaks are interpreted as content")}e.documents.push(e.result);if(e.position===e.lineStart&&testDocumentSeparator(e)){if(e.input.charCodeAt(e.position)===46){e.position+=3;skipSeparationSpace(e,true,-1)}return}if(e.position output."+r,""," # Rewrite all applicable files"," $ "+i+" . -o"].join("\n");return{helpMessage:u,cwd:t.cwd,processor:t.processor,help:n.help,version:n.version,files:n._,filePath:n.filePath,watch:n.watch,extensions:f.length===0?t.extensions:f,output:n.output,out:n.stdout,tree:n.tree,treeIn:n.treeIn,treeOut:n.treeOut,inspect:n.inspect,rcName:t.rcName,packageField:t.packageField,rcPath:n.rcPath,detectConfig:n.config,settings:settings(n.setting),ignoreName:t.ignoreName,ignorePath:n.ignorePath,detectIgnore:n.ignore,pluginPrefix:t.pluginPrefix,plugins:plugins(n.use),reporter:c[0],reporterOptions:c[1],color:n.color,silent:n.silent,quiet:n.quiet,frail:n.frail}}function addEach(e){var t=e.default;l.default[e.long]=t===undefined?null:t;if(e.type in l){l[e.type].push(e.long)}if(e.short){l.alias[e.short]=e.long}}function extensions(e){return flatten(normalize(e).map(splitList))}function plugins(e){var t={};normalize(e).map(splitOptions).forEach(function(e){t[e[0]]=e[1]?parseConfig(e[1],{}):null});return t}function reporter(e){var t=normalize(e).map(splitOptions).map(function(e){return[e[0],e[1]?parseConfig(e[1],{}):null]});return t[t.length-1]||[]}function settings(e){var t={};normalize(e).forEach(function(e){parseConfig(e,t)});return t}function parseConfig(e,t){var r;var i;try{e=toCamelCase(parseJSON(e))}catch(t){i=t.message.replace(/at(?= position)/,"around");throw s("Cannot parse `%s` as JSON: %s",e,i)}for(r in e){t[r]=e[r]}return t}function handleUnknownArgument(e){if(e.charAt(0)!=="-"){return}if(e.charAt(1)==="-"){throw s("Unknown option `%s`, expected:\n%s",e,inspectAll(o))}e.slice(1).split("").forEach(each);function each(e){var t=o.length;var r=-1;var i;while(++r=2,has16m:e>=3}}function supportsColor(e){if(u===false){return 0}if(n("color=16m")||n("color=full")||n("color=truecolor")){return 3}if(n("color=256")){return 2}if(e&&!e.isTTY&&u!==true){return 0}const t=u?1:0;if(process.platform==="win32"){const e=i.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in a){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in a)||a.CI_NAME==="codeship"){return 1}return t}if("TEAMCITY_VERSION"in a){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0}if(a.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in a){const e=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(a.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)){return 1}if("COLORTERM"in a){return 1}if(a.TERM==="dumb"){return t}return t}function getSupportLevel(e){const t=supportsColor(e);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}},,,function(e,t,r){"use strict";var i=r(347)("unified-engine:file-pipeline:queue");var n=r(928);e.exports=queue;function queue(e,t,r,a){var u=t.history[0];var s=r.complete;var o=true;if(!s){s={};r.complete=s}i("Queueing `%s`",u);s[u]=a;r.valueOf().forEach(each);if(!o){i("Not flushing: some files cannot be flushed");return}r.complete={};r.pipeline.run(r,done);function each(e){var t=e.history[0];if(n(e).fatal){return}if(typeof s[t]==="function"){i("`%s` can be flushed",t)}else{i("Interupting flush: `%s` is not finished",t);o=false}}function done(e){i("Flushing: all files can be flushed");for(u in s){s[u](e)}}}},function(e,t,r){"use strict";var i=r(171);var n=r(426);e.exports=definition;definition.notInList=true;definition.notInBlock=true;var a='"';var u="'";var s="\\";var o="\n";var l="\t";var f=" ";var c="[";var h="]";var p="(";var v=")";var d=":";var D="<";var m=">";function definition(e,t,r){var i=this;var m=i.options.commonmark;var g=0;var E=t.length;var A="";var C;var y;var w;var x;var b;var F;var S;var B;while(g"];var r=t.concat(["~","|"]);var i=r.concat(["\n",'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);escapes.default=t;escapes.gfm=r;escapes.commonmark=i;function escapes(e){var n=e||{};if(n.commonmark){return i}return n.gfm?r:t}},,function(e){"use strict";e.exports=locate;function locate(e,t){return e.indexOf("~~",t)}},function(e,t,r){"use strict";var i=r(495);var n=r(7);var a=r(682);var u=r(839);var s=r(526);e.exports=i("remark-lint:checkbox-character-style",checkboxCharacterStyle);var o=u.start;var l=u.end;var f={x:true,X:true};var c={" ":true,"\t":true};var h={true:"checked",false:"unchecked"};function checkboxCharacterStyle(e,t,r){var i=String(t);var u=n(t);r=typeof r==="object"?r:{};if(r.unchecked&&c[r.unchecked]!==true){t.fail("Invalid unchecked checkbox marker `"+r.unchecked+"`: use either `'\\t'`, or `' '`")}if(r.checked&&f[r.checked]!==true){t.fail("Invalid checked checkbox marker `"+r.checked+"`: use either `'x'`, or `'X'`")}a(e,"listItem",visitor);function visitor(e){var n;var a;var f;var c;var p;var v;var d;if(typeof e.checked!=="boolean"||s(e)){return}n=h[e.checked];a=o(e).offset;f=(e.children.length===0?l(e):o(e.children[0])).offset;c=i.slice(a,f).trimRight().slice(0,-1);v=c.charAt(c.length-1);p=r[n];if(p){if(v!==p){d=n.charAt(0).toUpperCase()+n.slice(1)+" checkboxes should use `"+p+"` as a marker";t.message(d,{start:u.toPosition(a+c.length-1),end:u.toPosition(a+c.length)})}}else{r[n]=v}}}},,,,function(e){"use strict";e.exports=wordCharacter;var t=String.fromCharCode;var r=/\w/;function wordCharacter(e){return r.test(typeof e==="number"?t(e):e.charAt(0))}},,,,,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(526);e.exports=i("remark-lint:no-shortcut-reference-image",noShortcutReferenceImage);var u="Use the trailing [] on reference images";function noShortcutReferenceImage(e,t){n(e,"imageReference",visitor);function visitor(e){if(!a(e)&&e.referenceType==="shortcut"){t.message(u,e)}}}},,function(e,t,r){"use strict";var i=r(335);e.exports=trough;trough.wrap=i;var n=[].slice;function trough(){var e=[];var t={};t.run=run;t.use=use;return t;function run(){var t=-1;var r=n.call(arguments,0,-1);var a=arguments[arguments.length-1];if(typeof a!=="function"){throw new Error("Expected function as last argument, not "+a)}next.apply(null,[null].concat(r));function next(u){var s=e[++t];var o=n.call(arguments,0);var l=o.slice(1);var f=r.length;var c=-1;if(u){a(u);return}while(++c"){break}if(v!==" "&&v!=="\t"){t.message(o,d);break}}}}}},,function(e,t,r){e.exports=realpath;realpath.realpath=realpath;realpath.sync=realpathSync;realpath.realpathSync=realpathSync;realpath.monkeypatch=monkeypatch;realpath.unmonkeypatch=unmonkeypatch;var i=r(66);var n=i.realpath;var a=i.realpathSync;var u=process.version;var s=/^v[0-5]\./.test(u);var o=r(544);function newError(e){return e&&e.syscall==="realpath"&&(e.code==="ELOOP"||e.code==="ENOMEM"||e.code==="ENAMETOOLONG")}function realpath(e,t,r){if(s){return n(e,t,r)}if(typeof t==="function"){r=t;t=null}n(e,t,function(i,n){if(newError(i)){o.realpath(e,t,r)}else{r(i,n)}})}function realpathSync(e,t){if(s){return a(e,t)}try{return a(e,t)}catch(r){if(newError(r)){return o.realpathSync(e,t)}else{throw r}}}function monkeypatch(){i.realpath=realpath;i.realpathSync=realpathSync}function unmonkeypatch(){i.realpath=n;i.realpathSync=a}},,,,,,function(e){"use strict";var t={}.hasOwnProperty;e.exports=stringify;function stringify(e){if(!e||typeof e!=="object"){return""}if(t.call(e,"position")||t.call(e,"type")){return position(e.position)}if(t.call(e,"start")||t.call(e,"end")){return position(e)}if(t.call(e,"line")||t.call(e,"column")){return point(e)}return""}function point(e){if(!e||typeof e!=="object"){e={}}return index(e.line)+":"+index(e.column)}function position(e){if(!e||typeof e!=="object"){e={}}return point(e.start)+"-"+point(e.end)}function index(e){return e&&typeof e==="number"?e:1}},,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:fenced-code-flag",fencedCodeFlag);var s=a.start;var o=a.end;var l=/^ {0,3}([~`])\1{2,}/;var f="Invalid code-language flag";var c="Missing code-language flag";function fencedCodeFlag(e,t,r){var i=String(t);var a=false;var h=[];if(typeof r==="object"&&!("length"in r)){a=Boolean(r.allowEmpty);r=r.flags}if(typeof r==="object"&&"length"in r){h=String(r).split(",")}n(e,"code",visitor);function visitor(e){var r;if(!u(e)){if(e.lang){if(h.length!==0&&h.indexOf(e.lang)===-1){t.message(f,e)}}else{r=i.slice(s(e).offset,o(e).offset);if(!a&&l.test(r)){t.message(c,e)}}}}}},function(e){"use strict";e.exports=alphabetical;function alphabetical(e){var t=typeof e==="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}},function(e){"use strict";e.exports=locate;var t=["https://","http://","mailto:"];function locate(e,r){var i=t.length;var n=-1;var a=-1;var u;if(!this.options.gfm){return-1}while(++na){i[n-a]=e[n]}return i}},,,,,,,,,function(e,t,r){"use strict";var i=r(211);var n=Object.prototype.hasOwnProperty;var a=Object.prototype.toString;function resolveYamlOmap(e){if(e===null)return true;var t=[],r,i,u,s,o,l=e;for(r=0,i=l.length;r-1){a.splice(u,1)}var s=r;a.forEach(function _buildSubObj(e,r){if(!e||typeof s!=="object")return;if(r===a.length-1)s[e]=t[n];if(s[e]===undefined)s[e]={};s=s[e]})}}return r};var c=t.find=function(){var e=a.join.apply(null,[].slice.call(arguments));function find(e,t){var r=a.join(e,t);try{i.statSync(r);return r}catch(r){if(a.dirname(e)!==e)return find(a.dirname(e),t)}}return find(process.cwd(),e)}},,,,function(e,t,r){"use strict";const i=r(202);const n=r(751);const a=i("JSONError",{fileName:i.append("in %s")});e.exports=((e,t,r)=>{if(typeof t==="string"){r=t;t=null}try{try{return JSON.parse(e,t)}catch(r){n(e,t);throw r}}catch(e){e.message=e.message.replace(/\n/g,"");const t=new a(e);if(r){t.fileName=r}throw t}})},function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:maximum-line-length",maximumLineLength);var s=a.start;var o=a.end;function maximumLineLength(e,t,r){var i=typeof r==="number"&&!isNaN(r)?r:80;var a=String(t);var l=a.split(/\r?\n/);var f=l.length;var c=-1;var h;n(e,["heading","table","code","definition","html","jsx"],ignore);n(e,["link","image","inlineCode"],inline);while(++ci){t.message("Line must be at most "+i+" characters",{line:c+1,column:h+1})}}function inline(e,t,r){var n=r.children[t+1];var a;var l;if(u(e)){return}a=s(e);l=o(e);if(a.column>i||l.column0?"Add":"Remove")+" "+Math.abs(i)+" "+n("space",i)+" between blockquote and content";t.message(a,u.start(e.children[0]))}}else{r=check(e)}}}function check(e){var t=e.children[0];var r=u.start(t).column-u.start(e).column;var i=o(t).match(/^ +/);if(i){r+=i[0].length}return r}},,,,,function(e){"use strict";e.exports=whitespace;var t=String.fromCharCode;var r=/\s/;function whitespace(e){return r.test(typeof e==="number"?t(e):e.charAt(0))}},,,function(e,t,r){"use strict";var i=r(814);var n="\n";var a=" ";var u=":";var s="[";var o="]";var l="^";var f=4;var c=n+n;var h=i(a,f);e.exports=footnoteDefinition;function footnoteDefinition(e){var t=this.all(e).join(c+h);return s+l+(e.label||e.identifier)+o+u+a+t}},function(e){"use strict";e.exports=collapse;function collapse(e){return String(e).replace(/\s+/g," ")}},function(e){"use strict";e.exports=label;var t="[";var r="]";var i="shortcut";var n="collapsed";function label(e){var a=e.referenceType;if(a===i){return""}return t+(a===n?"":e.label||e.identifier)+r}},,,,,function(e,t,r){"use strict";var i=r(814);var n=r(705);e.exports=listItem;var a="\n";var u=" ";var s="[";var o="]";var l="x";var f=Math.ceil;var c=a+a;var h=4;function listItem(e,t,r,p){var v=this;var d=v.options.listItemIndent;var D=p||v.options.bullet;var m=e.spread==null?true:e.spread;var g=e.checked;var E=e.children;var A=E.length;var C=[];var y=-1;var w;var x;var b;while(++y",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"}},,,,,function(e,t,r){"use strict";var i=r(64);var n=r(753);var a=function errorEx(e,t){if(!e||e.constructor!==String){t=e||{};e=Error.name}var r=function ErrorEXError(i){if(!this){return new ErrorEXError(i)}i=i instanceof Error?i.message:i||this.message;Error.call(this,i);Error.captureStackTrace(this,r);this.name=e;Object.defineProperty(this,"message",{configurable:true,enumerable:false,get:function(){var e=i.split(/\r?\n/g);for(var r in t){if(!t.hasOwnProperty(r)){continue}var a=t[r];if("message"in a){e=a.message(this[r],e)||e;if(!n(e)){e=[e]}}}return e.join("\n")},set:function(e){i=e}});var a=null;var u=Object.getOwnPropertyDescriptor(this,"stack");var s=u.get;var o=u.value;delete u.value;delete u.writable;u.set=function(e){a=e};u.get=function(){var e=(a||(s?s.call(this):o)).split(/\r?\n+/g);if(!a){e[0]=this.name+": "+this.message}var r=1;for(var i in t){if(!t.hasOwnProperty(i)){continue}var n=t[i];if("line"in n){var u=n.line(this[i]);if(u){e.splice(r++,0," "+u)}}if("stack"in n){n.stack(this[i],e)}}return e.join("\n")};Object.defineProperty(this,"stack",u)};if(Object.setPrototypeOf){Object.setPrototypeOf(r.prototype,Error.prototype);Object.setPrototypeOf(r,Error)}else{i.inherits(r,Error)}return r};a.append=function(e,t){return{message:function(r,i){r=r||t;if(r){i[0]+=" "+e.replace("%s",r.toString())}return i}}};a.line=function(e,t){return{line:function(r){r=r||t;if(r){return e.replace("%s",r.toString())}return null}}};e.exports=a},,,,,function(e,t,r){"use strict";var i=r(211);e.exports=new i("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})},,,function(e,t,r){"use strict";var i=r(589);function replaceExt(e,t){if(typeof e!=="string"){return e}if(e.length===0){return e}var r=i.basename(e,i.extname(e))+t;return i.join(i.dirname(e),r)}e.exports=replaceExt},function(e,t,r){"use strict";var i=r(833);var n=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"];var a=["scalar","sequence","mapping"];function compileStyleAliases(e){var t={};if(e!==null){Object.keys(e).forEach(function(r){e[r].forEach(function(e){t[String(e)]=r})})}return t}function Type(e,t){t=t||{};Object.keys(t).forEach(function(t){if(n.indexOf(t)===-1){throw new i('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}});this.tag=e;this.kind=t["kind"]||null;this.resolve=t["resolve"]||function(){return true};this.construct=t["construct"]||function(e){return e};this.instanceOf=t["instanceOf"]||null;this.predicate=t["predicate"]||null;this.represent=t["represent"]||null;this.defaultStyle=t["defaultStyle"]||null;this.styleAliases=compileStyleAliases(t["styleAliases"]||null);if(a.indexOf(this.kind)===-1){throw new i('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}}e.exports=Type},function(e,t,r){"use strict";var i=r(876);var n=true;try{n="inspect"in r(64)}catch(e){n=false}e.exports=n?inspect:noColor;inspect.color=inspect;noColor.color=inspect;inspect.noColor=noColor;noColor.noColor=noColor;var a=ansiColor(2,22);var u=ansiColor(33,39);var s=ansiColor(32,39);var o=new RegExp("(?:"+"(?:\\u001b\\[)|"+"\\u009b"+")"+"(?:"+"(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m]"+")|"+"\\u001b[A-M]","g");var l=["type","value","children","position"];function noColor(e,t){return stripColor(inspect(e,t))}function inspect(e,t){var r;var i;var n;var a;if(e&&Boolean(e.length)&&typeof e!=="string"){a=e.length;n=-1;r=[];while(++n|$))/i;var l=/<\/(script|pre|style)>/i;var f=/^/;var h=/^<\?/;var p=/\?>/;var v=/^/;var D=/^/;var g=/^$/;var E=new RegExp(i.source+"\\s*$");function blockHtml(e,t,r){var i=this;var A=i.options.blocks.join("|");var C=new RegExp("^|$))","i");var y=t.length;var w=0;var x;var b;var F;var S;var B;var k;var O;var P=[[o,l,true],[f,c,true],[h,p,true],[v,d,true],[D,m,true],[C,g,true],[E,g,false]];while(w0&&v.indenta){return}if(!m||!l&&u.charAt(c+1)===n){return}f=u.length+1;D="";while(++c0){const t=peek();if(!i.isHexDigit(t)){throw invalidChar(read())}e+=read()}return String.fromCodePoint(parseInt(e,16))}const E={start(){if(f.type==="eof"){throw invalidEOF()}push()},beforePropertyName(){switch(f.type){case"identifier":case"string":c=f.value;a="afterPropertyName";return;case"punctuator":pop();return;case"eof":throw invalidEOF()}},afterPropertyName(){if(f.type==="eof"){throw invalidEOF()}a="beforePropertyValue"},beforePropertyValue(){if(f.type==="eof"){throw invalidEOF()}push()},beforeArrayValue(){if(f.type==="eof"){throw invalidEOF()}if(f.type==="punctuator"&&f.value==="]"){pop();return}push()},afterPropertyValue(){if(f.type==="eof"){throw invalidEOF()}switch(f.value){case",":a="beforePropertyName";return;case"}":pop()}},afterArrayValue(){if(f.type==="eof"){throw invalidEOF()}switch(f.value){case",":a="beforeArrayValue";return;case"]":pop()}},end(){}};function push(){let e;switch(f.type){case"punctuator":switch(f.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=f.value;break}if(h===undefined){h=e}else{const t=u[u.length-1];if(Array.isArray(t)){t.push(e)}else{t[c]=e}}if(e!==null&&typeof e==="object"){u.push(e);if(Array.isArray(e)){a="beforeArrayValue"}else{a="beforePropertyName"}}else{const e=u[u.length-1];if(e==null){a="end"}else if(Array.isArray(e)){a="afterArrayValue"}else{a="afterPropertyValue"}}}function pop(){u.pop();const e=u[u.length-1];if(e==null){a="end"}else if(Array.isArray(e)){a="afterArrayValue"}else{a="afterPropertyValue"}}function invalidChar(e){if(e===undefined){return syntaxError(`JSON5: invalid end of input at ${o}:${l}`)}return syntaxError(`JSON5: invalid character '${formatChar(e)}' at ${o}:${l}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${o}:${l}`)}function invalidIdentifier(){l-=5;return syntaxError(`JSON5: invalid identifier character at ${o}:${l}`)}function separatorChar(e){console.warn(`JSON5: '${formatChar(e)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(e){const t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e]){return t[e]}if(e<" "){const t=e.charCodeAt(0).toString(16);return"\\x"+("00"+t).substring(t.length)}return e}function syntaxError(e){const t=new SyntaxError(e);t.lineNumber=o;t.columnNumber=l;return t}},,function(e,t,r){"use strict";var i=r(66);var n=r(589);var a=r(345);var u=r(347)("unified-engine:find-up");var s=r(692);e.exports=FindUp;var o=i.readFile;var l=n.resolve;var f=n.relative;var c=n.join;var h=n.dirname;FindUp.prototype.load=load;function FindUp(e){var t=this;var r=e.filePath;t.cache={};t.cwd=e.cwd;t.detect=e.detect;t.names=e.names;t.create=e.create;if(r){t.givenFilePath=l(e.cwd,r)}}function load(e,t){var r=this;var i=r.cache;var n=r.givenFilePath;var p=r.givenFile;var v=r.names;var d=r.create;var D=r.cwd;var m;if(n){if(p){apply(t,p)}else{p=[t];r.givenFile=p;u("Checking given file `%s`",n);o(n,loadGiven)}return}if(!r.detect){return t()}e=l(D,e);m=h(e);if(m in i){apply(t,i[m])}else{i[m]=[t];find(m)}function loadGiven(e,t){var i=r.givenFile;var s;if(e){s=a("Cannot read given file `%s`\n%s",f(D,n),e.stack);s.code="ENOENT";s.path=e.path;s.syscall=e.syscall}else{try{s=d(t,n);u("Read given file `%s`",n)}catch(e){s=a("Cannot parse given file `%s`\n%s",f(D,n),e.stack);u(e.message)}}p=s;r.givenFile=s;applyAll(i,s)}function find(t){var r=-1;var n=v.length;next();function next(){var a;if(++r{if(e)console.error(e);process.exit(t)})},,,,,,,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:code-block-style",codeBlockStyle);var s=a.start;var o=a.end;var l={null:true,fenced:true,indented:true};function codeBlockStyle(e,t,r){var i=String(t);r=typeof r==="string"&&r!=="consistent"?r:null;if(l[r]!==true){t.fail("Invalid code block style `"+r+"`: use either `'consistent'`, `'fenced'`, or `'indented'`")}n(e,"code",visitor);function visitor(e){var i=check(e);if(i){if(!r){r=i}else if(r!==i){t.message("Code blocks should be "+r,e)}}}function check(e){var t=s(e).offset;var r=o(e).offset;if(u(e)){return null}return e.lang||/^\s*([~`])\1{2,}/.test(i.slice(t,r))?"fenced":"indented"}}},,,function(e,t,r){"use strict";var i=r(589);var n=r(77);var a=r(289);e.exports=Ignore;Ignore.prototype.check=check;var u=i.dirname;var s=i.relative;var o=i.resolve;function Ignore(e){this.cwd=e.cwd;this.findUp=new a({filePath:e.ignorePath,cwd:e.cwd,detect:e.detectIgnore,names:e.ignoreName?[e.ignoreName]:[],create:create})}function check(e,t){var r=this;r.findUp.load(e,done);function done(i,n){var a;if(i){t(i)}else if(n){a=s(n.filePath,o(r.cwd,e));t(null,a?n.ignores(a):false)}else{t(null,false)}}}function create(e,t){var r=n().add(String(e));r.filePath=u(t);return r}},,,,function(e){e.exports={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"}},,,,function(e,t,r){"use strict";var i=r(54);e.exports=enclose;var n="(";var a=")";var u="<";var s=">";var o=/\s/;function enclose(e,t){if(t||e.length===0||o.test(e)||i(e,n)!==i(e,a)){return u+e+s}return e}},,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:table-pipes",tablePipes);var s=a.start;var o=a.end;var l="Missing initial pipe in table fence";var f="Missing final pipe in table fence";function tablePipes(e,t){var r=String(t);n(e,"table",visitor);function visitor(e){var i=e.children;var n=i.length;var a=-1;var c;var h;var p;var v;var d;var D;while(++a0?parseInt(t):null};for(;i1)return true;for(var a=0;athis.maxLength)return t();if(!this.stat&&m(this.cache,r)){var a=this.cache[r];if(Array.isArray(a))a="DIR";if(!n||a==="DIR")return t(null,a);if(n&&a==="FILE")return t()}var u;var s=this.statCache[r];if(s!==undefined){if(s===false)return t(null,s);else{var o=s.isDirectory()?"DIR":"FILE";if(n&&o==="FILE")return t();else return t(null,o,s)}}var l=this;var f=g("stat\0"+r,lstatcb_);if(f)i.lstat(r,f);function lstatcb_(n,a){if(a&&a.isSymbolicLink()){return i.stat(r,function(i,n){if(i)l._stat2(e,r,null,a,t);else l._stat2(e,r,i,n,t)})}else{l._stat2(e,r,n,a,t)}}};Glob.prototype._stat2=function(e,t,r,i,n){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[t]=false;return n()}var a=e.slice(-1)==="/";this.statCache[t]=i;if(t.slice(-1)==="/"&&i&&!i.isDirectory())return n(null,false,i);var u=true;if(i)u=i.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||u;if(a&&u==="FILE")return n();return n(null,u,i)}},function(e,t,r){"use strict";var i=r(36);var n=r(439);var a=r(934);var u=r(724);e.exports=paragraph;var s="\t";var o="\n";var l=" ";var f=4;function paragraph(e,t,r){var c=this;var h=c.options;var p=h.commonmark;var v=h.gfm;var d=c.blockTokenizers;var D=c.interruptParagraph;var m=t.indexOf(o);var g=t.length;var E;var A;var C;var y;var w;while(m=f&&C!==o){m=t.indexOf(o,m+1);continue}}A=t.slice(m+1);if(u(D,d,c,[e,A,true])){break}if(d.list.call(c,e,A,true)&&(c.inList||p||v&&!n(i.left(A).charAt(0)))){break}E=m;m=t.indexOf(o,m+1);if(m!==-1&&i(t.slice(E,m))===""){m=E;break}}A=t.slice(0,m);if(i(A)===""){e(A);return null}if(r){return true}w=e.now();A=a(A);return e(A)({type:"paragraph",children:c.tokenizeInline(A,w)})}},function(e,t,r){"use strict";var i;var n;try{var a=i;n=r(644)}catch(e){if(typeof window!=="undefined")n=window.esprima}var u=r(211);function resolveJavascriptFunction(e){if(e===null)return false;try{var t="("+e+")",r=n.parse(t,{range:true});if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression"){return false}return true}catch(e){return false}}function constructJavascriptFunction(e){var t="("+e+")",r=n.parse(t,{range:true}),i=[],a;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression"){throw new Error("Failed to resolve function")}r.body[0].expression.params.forEach(function(e){i.push(e.name)});a=r.body[0].expression.body.range;if(r.body[0].expression.body.type==="BlockStatement"){return new Function(i,t.slice(a[0]+1,a[1]-1))}return new Function(i,"return "+t.slice(a[0],a[1]))}function representJavascriptFunction(e){return e.toString()}function isFunction(e){return Object.prototype.toString.call(e)==="[object Function]"}e.exports=new u("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:resolveJavascriptFunction,construct:constructJavascriptFunction,predicate:isFunction,represent:representJavascriptFunction})},,,function(e,t,r){"use strict";var i=r(171);var n=r(984);var a=r(426);e.exports=reference;reference.locator=n;var u="link";var s="image";var o="footnote";var l="shortcut";var f="collapsed";var c="full";var h=" ";var p="!";var v="[";var d="\\";var D="]";var m="^";function reference(e,t,r){var n=this;var g=n.options.commonmark;var E=t.charAt(0);var A=0;var C=t.length;var y="";var w="";var x=u;var b=l;var F;var S;var B;var k;var O;var P;var T;var I;if(E===p){x=s;w=E;E=t.charAt(++A)}if(E!==v){return}A++;w+=E;P="";if(n.options.footnotes&&t.charAt(A)===m){if(x===s){return}w+=m;A++;x=o}I=0;while(A "+h.destination:""}if(!h.stats.total){p+=p?": ":"";if(h.stored){p+=m.yellow.open+"written"+m.yellow.close}else{p+="no issues found"}}if(p){l.push(p)}}else{g=m[h.label==="error"?"red":"yellow"];E=h.reason;A="";C=E.indexOf("\n");if(C!==-1){A=E.slice(C);E=E.slice(0,C)}l.push(["",padLeft(h.location,e.location),padRight(g.open+h.label+g.close,e.label),padRight(E,e.reason),padRight(h.ruleId,e.ruleId),h.source||""].join(" ").replace(c,"")+A)}}if(a.fatal||a.warn){p=[];if(a.fatal){p.push([m.red.open+f.error+m.red.close,a.fatal,plural(D.true,a.fatal)].join(" "))}if(a.warn){p.push([m.yellow.open+f.warning+m.yellow.close,a.warn,plural(D.false,a.warn)].join(" "))}p=p.join(", ");if(a.total!==a.fatal&&a.total!==a.warn){p=a.total+" messages ("+p+")"}l.push("",p)}return l.join("\n")}function applicable(e,t){var r=e.messages;var i=r.length;var n=-1;var a=[];if(t.silent){while(++n64)continue;if(t<0)return false;i+=6}return i%8===0}function constructYamlBinary(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,u=s,o=0,l=[];for(t=0;t>16&255);l.push(o>>8&255);l.push(o&255)}o=o<<6|u.indexOf(i.charAt(t))}r=a%4*6;if(r===0){l.push(o>>16&255);l.push(o>>8&255);l.push(o&255)}else if(r===18){l.push(o>>10&255);l.push(o>>2&255)}else if(r===12){l.push(o>>4&255)}if(n){return n.from?n.from(l):new n(l)}return l}function representYamlBinary(e){var t="",r=0,i,n,a=e.length,u=s;for(i=0;i>18&63];t+=u[r>>12&63];t+=u[r>>6&63];t+=u[r&63]}r=(r<<8)+e[i]}n=a%3;if(n===0){t+=u[r>>18&63];t+=u[r>>12&63];t+=u[r>>6&63];t+=u[r&63]}else if(n===2){t+=u[r>>10&63];t+=u[r>>4&63];t+=u[r<<2&63];t+=u[64]}else if(n===1){t+=u[r>>2&63];t+=u[r<<4&63];t+=u[64];t+=u[64]}return t}function isBinary(e){return n&&n.isBuffer(e)}e.exports=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},function(e){"use strict";var t=[].slice;e.exports=wrap;function wrap(e,r){var i;return wrapped;function wrapped(){var r=t.call(arguments,0);var n=e.length>r.length;var a;if(n){r.push(done)}try{a=e.apply(null,r)}catch(e){if(n&&i){throw e}return done(e)}if(!n){if(a&&typeof a.then==="function"){a.then(then,done)}else if(a instanceof Error){done(a)}else{then(a)}}}function done(){if(!i){i=true;r.apply(null,arguments)}}function then(e){done(null,e)}}},function(e){e.exports=extend;var t=Object.prototype.hasOwnProperty;function extend(){var e={};for(var r=0;ri){t.message("Move definitions to the end of the file (after the node at line `"+r+"`)",e)}}else if(r===null){r=i}}}},function(e){var t=Object.prototype.toString;e.exports=isString;function isString(e){return t.call(e)==="[object String]"}},function(e,t,r){"use strict";var i=r(874);e.exports=configure;function configure(e,t){e.configuration=new i(t)}},,,,function(e,t,r){"use strict";var i=r(323);var n=create(Error);e.exports=n;n.eval=create(EvalError);n.range=create(RangeError);n.reference=create(ReferenceError);n.syntax=create(SyntaxError);n.type=create(TypeError);n.uri=create(URIError);n.create=create;function create(e){FormattedError.displayName=e.displayName||e.name;return FormattedError;function FormattedError(t){if(t){t=i.apply(null,arguments)}return new e(t)}}},,function(e,t,r){"use strict";if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=r(470)}else{e.exports=r(970)}},function(e,t,r){var i=r(20);var n=r(491);e.exports=expandTop;var a="\0SLASH"+Math.random()+"\0";var u="\0OPEN"+Math.random()+"\0";var s="\0CLOSE"+Math.random()+"\0";var o="\0COMMA"+Math.random()+"\0";var l="\0PERIOD"+Math.random()+"\0";function numeric(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function escapeBraces(e){return e.split("\\\\").join(a).split("\\{").join(u).split("\\}").join(s).split("\\,").join(o).split("\\.").join(l)}function unescapeBraces(e){return e.split(a).join("\\").split(u).join("{").split(s).join("}").split(o).join(",").split(l).join(".")}function parseCommaParts(e){if(!e)return[""];var t=[];var r=n("{","}",e);if(!r)return e.split(",");var i=r.pre;var a=r.body;var u=r.post;var s=i.split(",");s[s.length-1]+="{"+a+"}";var o=parseCommaParts(u);if(u.length){s[s.length-1]+=o.shift();s.push.apply(s,o)}t.push.apply(t,s);return t}function expandTop(e){if(!e)return[];if(e.substr(0,2)==="{}"){e="\\{\\}"+e.substr(2)}return expand(escapeBraces(e),true).map(unescapeBraces)}function identity(e){return e}function embrace(e){return"{"+e+"}"}function isPadded(e){return/^-?0\d/.test(e)}function lte(e,t){return e<=t}function gte(e,t){return e>=t}function expand(e,t){var r=[];var a=n("{","}",e);if(!a||/\$$/.test(a.pre))return[e];var u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body);var o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body);var l=u||o;var f=a.body.indexOf(",")>=0;if(!l&&!f){if(a.post.match(/,.*\}/)){e=a.pre+"{"+a.body+s+a.post;return expand(e)}return[e]}var c;if(l){c=a.body.split(/\.\./)}else{c=parseCommaParts(a.body);if(c.length===1){c=expand(c[0],false).map(embrace);if(c.length===1){var h=a.post.length?expand(a.post,false):[""];return h.map(function(e){return a.pre+c[0]+e})}}}var p=a.pre;var h=a.post.length?expand(a.post,false):[""];var v;if(l){var d=numeric(c[0]);var D=numeric(c[1]);var m=Math.max(c[0].length,c[1].length);var g=c.length==3?Math.abs(numeric(c[2])):1;var E=lte;var A=D0){var b=new Array(x+1).join("0");if(y<0)w="-"+b+w.slice(1);else w=b+w}}}v.push(w)}}else{v=i(c,function(e){return expand(e,false)})}for(var F=0;F>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function utf8CheckIncomplete(e,t,r){var i=t.length-1;if(i=0){if(n>0)e.lastNeed=n-1;return n}if(--i=0){if(n>0)e.lastNeed=n-2;return n}if(--i=0){if(n>0){if(n===2)n=0;else e.lastNeed=n-3}return n}return 0}function utf8CheckExtraBytes(e,t,r){if((t[0]&192)!==128){e.lastNeed=0;return"�"}if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128){e.lastNeed=1;return"�"}if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128){e.lastNeed=2;return"�"}}}}function utf8FillLast(e){var t=this.lastTotal-this.lastNeed;var r=utf8CheckExtraBytes(this,e,t);if(r!==undefined)return r;if(this.lastNeed<=e.length){e.copy(this.lastChar,t,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,t,0,e.length);this.lastNeed-=e.length}function utf8Text(e,t){var r=utf8CheckIncomplete(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);e.copy(this.lastChar,0,i);return e.toString("utf8",t,i)}function utf8End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"�";return t}function utf16Text(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1];return r.slice(0,-1)}}return r}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=e[e.length-1];return e.toString("utf16le",t,e.length-1)}function utf16End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function base64Text(e,t){var r=(e.length-t)%3;if(r===0)return e.toString("base64",t);this.lastNeed=3-r;this.lastTotal=3;if(r===1){this.lastChar[0]=e[e.length-1]}else{this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1]}return e.toString("base64",t,e.length-r)}function base64End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):""}},,,,function(e,t,r){"use strict";var i=r(186);e.exports=VMessage;function VMessagePrototype(){}VMessagePrototype.prototype=Error.prototype;VMessage.prototype=new VMessagePrototype;var n=VMessage.prototype;n.file="";n.name="";n.reason="";n.message="";n.stack="";n.fatal=null;n.column=null;n.line=null;function VMessage(e,t,r){var n;var a;var u;if(typeof t==="string"){r=t;t=null}n=parseOrigin(r);a=i(t)||"1:1";u={start:{line:null,column:null},end:{line:null,column:null}};if(t&&t.position){t=t.position}if(t){if(t.start){u=t;t=t.start}else{u.start=t}}if(e.stack){this.stack=e.stack;e=e.message}this.message=e;this.name=a;this.reason=e;this.line=t?t.line:null;this.column=t?t.column:null;this.location=u;this.source=n[0];this.ruleId=n[1]}function parseOrigin(e){var t=[null,null];var r;if(typeof e==="string"){r=e.indexOf(":");if(r===-1){t[1]=e}else{t[0]=e.slice(0,r);t[1]=e.slice(r+1)}}return t}},,function(e,t,r){"use strict";var i=r(171);var n=r(902);var a=r(49);e.exports=autoLink;autoLink.locator=a;autoLink.notInLink=true;var u="<";var s=">";var o="@";var l="/";var f="mailto:";var c=f.length;function autoLink(e,t,r){var a=this;var h="";var p=t.length;var v=0;var d="";var D=false;var m="";var g;var E;var A;var C;var y;if(t.charAt(0)!==u){return}v++;h=u;while(v0||H===x&&I.inLink||M&&H===B&&t.charAt(W+1)===B||M&&H===S&&(I.inTable||alignment(t,W))||H===b&&W>0&&W=e.expected){e.emit("done")}}},,function(e,t,r){"use strict";var i=r(897);var n=r(336);var a=r(860);e.exports=parse;parse.Parser=a;function parse(e){var t=this.data("settings");var r=i(a);r.prototype.options=n(r.prototype.options,t,e);this.Parser=r}},,,,,,function(e,t,r){"use strict";var i=r(176);e.exports=imageReference;var n="[";var a="]";var u="!";function imageReference(e){return u+n+(this.encode(e.alt,e)||"")+a+i(e)}},,,,,,function(e,t,r){"use strict";var i=r(495);e.exports=i("remark-lint:no-file-name-consecutive-dashes",noFileNameConsecutiveDashes);var n="Do not use consecutive dashes in a file name";function noFileNameConsecutiveDashes(e,t){if(t.stem&&/-{2,}/.test(t.stem)){t.message(n)}}},,,,,,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:fenced-code-marker",fencedCodeMarker);var s={"`":true,"~":true,null:true};function fencedCodeMarker(e,t,r){var i=String(t);r=typeof r==="string"&&r!=="consistent"?r:null;if(s[r]!==true){t.fail("Invalid fenced code marker `"+r+"`: use either `'consistent'`, `` '`' ``, or `'~'`")}n(e,"code",visitor);function visitor(e){var n;if(!u(e)){n=i.substr(a.start(e).offset,4).trimLeft().charAt(0);if(s[n]===true){if(r){if(n!==r){t.message("Fenced code should use "+r+" as a marker",e)}}else{r=n}}}}}},,function(e,t,r){"use strict";var i=r(727);e.exports=new i({include:[r(95)],implicit:[r(788),r(900)],explicit:[r(334),r(157),r(697),r(713)]})},,,function(e){"use strict";e.exports=thematicBreak;var t="\t";var r="\n";var i=" ";var n="*";var a="-";var u="_";var s=3;function thematicBreak(e,o,l){var f=-1;var c=o.length+1;var h="";var p;var v;var d;var D;while(++f=s&&(!p||p===r)){h+=D;if(l){return true}return e(h)({type:"thematicBreak"})}else{return}}}},,function(e){e.exports=require("assert")},,,,,,,function(e,t,r){"use strict";var i=r(774);var n=r(176);e.exports=linkReference;var a="[";var u="]";var s="shortcut";var o="collapsed";function linkReference(e){var t=this;var r=e.referenceType;var l=t.enterLinkReference(t,e);var f=t.all(e).join("");l();if(r===s||r===o){f=i(f,e.label||e.identifier)}return a+f+u+n(e)}},function(e){"use strict";e.exports=lineBreak;var t="\\";var r="\n";var i=" ";var n=t+r;var a=i+i+r;function lineBreak(){return this.options.commonmark?n:a}},function(e,t,r){"use strict";function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var i=r(945).Buffer;var n=r(64);function copyBuffer(e,t,r){e.copy(t,r)}e.exports=function(){function BufferList(){_classCallCheck(this,BufferList);this.head=null;this.tail=null;this.length=0}BufferList.prototype.push=function push(e){var t={data:e,next:null};if(this.length>0)this.tail.next=t;else this.head=t;this.tail=t;++this.length};BufferList.prototype.unshift=function unshift(e){var t={data:e,next:this.head};if(this.length===0)this.tail=t;this.head=t;++this.length};BufferList.prototype.shift=function shift(){if(this.length===0)return;var e=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return e};BufferList.prototype.clear=function clear(){this.head=this.tail=null;this.length=0};BufferList.prototype.join=function join(e){if(this.length===0)return"";var t=this.head;var r=""+t.data;while(t=t.next){r+=e+t.data}return r};BufferList.prototype.concat=function concat(e){if(this.length===0)return i.alloc(0);if(this.length===1)return this.head.data;var t=i.allocUnsafe(e>>>0);var r=this.head;var n=0;while(r){copyBuffer(r.data,t,n);n+=r.data.length;r=r.next}return t};return BufferList}();if(n&&n.inspect&&n.inspect.custom){e.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e}}},function(e,t,r){"use strict";var i=r(336);var n=r(109);var a=r(694);e.exports=setOptions;function setOptions(e){var t=this;var r=t.options;var u;var s;if(e==null){e={}}else if(typeof e==="object"){e=i(e)}else{throw new Error("Invalid value `"+e+"` for setting `options`")}for(u in a){s=e[u];if(s==null){s=r[u]}if(u!=="blocks"&&typeof s!=="boolean"||u==="blocks"&&typeof s!=="object"){throw new Error("Invalid value `"+s+"` for setting `options."+u+"`")}e[u]=s}t.options=e;t.escape=n(e);return t}},,function(e){var t=Array.prototype.slice;e.exports=co;function co(e){var r=isGeneratorFunction(e);return function(i){var n=this;var a=e;if(r){var u=t.call(arguments),s=u.length;var o=s&&"function"==typeof u[s-1];i=o?u.pop():error;a=e.apply(this,u)}else{i=i||error}next();function exit(e,t){setImmediate(function(){i.call(n,e,t)})}function next(e,r){var i;if(arguments.length>2)r=t.call(arguments,1);if(e){try{i=a.throw(e)}catch(e){return exit(e)}}if(!e){try{i=a.next(r)}catch(e){return exit(e)}}if(i.done)return exit(null,i.value);i.value=toThunk(i.value,n);if("function"==typeof i.value){var u=false;try{i.value.call(n,function(){if(u)return;u=true;next.apply(n,arguments)})}catch(e){setImmediate(function(){if(u)return;u=true;next(e)})}return}next(new TypeError("You may only yield a function, promise, generator, array, or object, "+'but the following was passed: "'+String(i.value)+'"'))}}}function toThunk(e,t){if(isGeneratorFunction(e)){return co(e.call(t))}if(isGenerator(e)){return co(e)}if(isPromise(e)){return promiseToThunk(e)}if("function"==typeof e){return e}if(isObject(e)||Array.isArray(e)){return objectToThunk.call(t,e)}return e}function objectToThunk(e){var t=this;var r=Array.isArray(e);return function(i){var n=Object.keys(e);var a=n.length;var u=r?new Array(a):new e.constructor;var s;if(!a){setImmediate(function(){i(null,u)});return}if(!r){for(var o=0;or){t.splice(0,r);process.nextTick(function(){RES.apply(null,i)})}else{delete n[e]}}})}function slice(e){var t=e.length;var r=[];for(var i=0;ii){o+=" with 1 space, not "+u;if(size(a)=48&&t<=57}},function(e,t,r){"use strict";var i=r(308);var n=r(197);var a=r(25);var u=r(908);var s=r(617);e.exports=encode;encode.escape=escape;var o={}.hasOwnProperty;var l=['"',"'","<",">","&","`"];var f=construct();var c=toExpression(l);var h=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;var p=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g;function encode(e,t){var r=t||{};var i=r.subset;var n=i?toExpression(i):c;var a=r.escapeOnly;var u=r.omitOptionalSemicolons;e=e.replace(n,function(e,t,i){return one(e,i.charAt(t+1),r)});if(i||a){return e}return e.replace(h,replaceSurrogatePair).replace(p,replaceBmp);function replaceSurrogatePair(e,t,r){return toHexReference((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charAt(t+2),u)}function replaceBmp(e,t,i){return one(e,i.charAt(t+1),r)}}function escape(e){return encode(e,{escapeOnly:true,useNamedReferences:true})}function one(e,t,r){var i=r.useShortestReferences;var n=r.omitOptionalSemicolons;var a;var u;if((i||r.useNamedReferences)&&o.call(f,e)){a=toNamed(f[e],t,n,r.attribute)}if(i||!a){u=toHexReference(e.charCodeAt(0),t,n)}if(a&&(!i||a.length/i;function inlineHTML(e,t,r){var n=this;var h=t.length;var p;var v;if(t.charAt(0)!==u||h<3){return}p=t.charAt(1);if(!i(p)&&p!==s&&p!==o&&p!==l){return}v=t.match(a);if(!v){return}if(r){return true}v=v[0];if(!n.inLink&&f.test(v)){n.inLink=true}else if(n.inLink&&c.test(v)){n.inLink=false}return e(v)({type:"html",value:v})}},function(e){e.exports=["md","markdown","mdown","mkdn","mkd","mdwn","mkdown","ron"]},,,,function(e,t,r){"use strict";var i=r(495);e.exports=i("remark-lint:file-extension",fileExtension);function fileExtension(e,t,r){var i=t.extname;r=typeof r==="string"?r:"md";if(i&&i.slice(1)!==r){t.message("Invalid extension: use `"+r+"`")}}},function(e){"use strict";e.exports=factory;var t="\\";function factory(e,r){return unescape;function unescape(i){var n=0;var a=i.indexOf(t);var u=e[r];var s=[];var o;while(a!==-1){s.push(i.slice(n,a));n=a+1;o=i.charAt(n);if(!o||u.indexOf(o)===-1){s.push(t)}a=i.indexOf(t,n+1)}s.push(i.slice(n));return s.join("")}}},,,function(e,t,r){"use strict";const i=r(495);const n=r(682);e.exports=i("remark-lint:prohibited-strings",prohibitedStrings);function testProhibited(e,t){const r=new RegExp(`(\\.|@[a-z0-9/-]*)?(${e.no})(\\.\\w)?`,"g");let i=null;while(i=r.exec(t)){if(!i[1]&&!i[3]){return i[2]}}return false}function prohibitedStrings(e,t,r){n(e,"text",checkText);function checkText(e){const i=e.value;r.forEach(r=>{const n=testProhibited(r,i);if(n){t.message(`Use "${r.yes}" instead of "${n}"`,e)}})}}},,,,,function(e){"use strict";e.exports=hidden;function hidden(e){if(typeof e!=="string"){throw new Error("Expected string")}return e.charAt(0)==="."}},,,,,function(e,t,r){"use strict";var i=r(171);var n=r(426);e.exports=footnoteDefinition;footnoteDefinition.notInList=true;footnoteDefinition.notInBlock=true;var a="\\";var u="\n";var s="\t";var o=" ";var l="[";var f="]";var c="^";var h=":";var p=/^( {4}|\t)?/gm;function footnoteDefinition(e,t,r){var v=this;var d=v.offset;var D;var m;var g;var E;var A;var C;var y;var w;var x;var b;var F;var S;if(!v.options.footnotes){return}D=0;m=t.length;g="";E=e.now();A=E.line;while(D=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(t){t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0;var n=0;t[0].replace(/%[a-zA-Z%]/g,function(e){if(e==="%%"){return}i++;if(e==="%c"){n=i}});t.splice(n,0,r)}function log(){var e;return(typeof console==="undefined"?"undefined":_typeof(console))==="object"&&console.log&&(e=console).log.apply(e,arguments)}function save(e){try{if(e){t.storage.setItem("debug",e)}else{t.storage.removeItem("debug")}}catch(e){}}function load(){var e;try{e=t.storage.getItem("debug")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=r(772)(t);var i=e.exports.formatters;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},,,,function(e,t,r){var i=r(159);var n=r(589).join;var a=r(281);var u="/etc";var s=process.platform==="win32";var o=s?process.env.USERPROFILE:process.env.HOME;e.exports=function(e,t,l,f){if("string"!==typeof e)throw new Error("rc(name): name *must* be string");if(!l)l=r(359)(process.argv.slice(2));t=("string"===typeof t?i.json(t):t)||{};f=f||i.parse;var c=i.env(e+"_");var h=[t];var p=[];function addConfigFile(e){if(p.indexOf(e)>=0)return;var t=i.file(e);if(t){h.push(f(t));p.push(e)}}if(!s)[n(u,e,"config"),n(u,e+"rc")].forEach(addConfigFile);if(o)[n(o,".config",e,"config"),n(o,".config",e),n(o,"."+e,"config"),n(o,"."+e+"rc")].forEach(addConfigFile);addConfigFile(i.find("."+e+"rc"));if(c.config)addConfigFile(c.config);if(l.config)addConfigFile(l.config);return a.apply(null,h.concat([c,l,p.length?{configs:p,config:p[p.length-1]}:undefined]))}},,,,,,,,,,function(e){e.exports={_args:[["remark@10.0.1","/Users/trott/io.js/tools/node-lint-md-cli-rollup"]],_from:"remark@10.0.1",_id:"remark@10.0.1",_inBundle:false,_integrity:"sha512-E6lMuoLIy2TyiokHprMjcWNJ5UxfGQjaMSMhV+f4idM625UjjK4j798+gPs5mfjzDE6vL0oFKVeZM6gZVSVrzQ==",_location:"/remark",_phantomChildren:{},_requested:{type:"version",registry:true,raw:"remark@10.0.1",name:"remark",escapedName:"remark",rawSpec:"10.0.1",saveSpec:null,fetchSpec:"10.0.1"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/remark/-/remark-10.0.1.tgz",_spec:"10.0.1",_where:"/Users/trott/io.js/tools/node-lint-md-cli-rollup",author:{name:"Titus Wormer",email:"tituswormer@gmail.com",url:"https://wooorm.com"},bugs:{url:"https://github.com/remarkjs/remark/issues"},contributors:[{name:"Titus Wormer",email:"tituswormer@gmail.com",url:"https://wooorm.com"}],dependencies:{"remark-parse":"^6.0.0","remark-stringify":"^6.0.0",unified:"^7.0.0"},description:"Markdown processor powered by plugins",devDependencies:{tape:"^4.9.1"},files:["index.js"],homepage:"https://remark.js.org",keywords:["markdown","abstract","syntax","tree","ast","parse","stringify","process"],license:"MIT",name:"remark",repository:{type:"git",url:"https://github.com/remarkjs/remark/tree/master/packages/remark"},scripts:{test:"tape test.js"},version:"10.0.1",xo:false}},function(e){e.exports=require("events")},,function(e,t,r){e.exports=globSync;globSync.GlobSync=GlobSync;var i=r(66);var n=r(129);var a=r(620);var u=a.Minimatch;var s=r(327).Glob;var o=r(64);var l=r(589);var f=r(393);var c=r(969);var h=r(922);var p=h.alphasort;var v=h.alphasorti;var d=h.setopts;var D=h.ownProp;var m=h.childrenIgnored;var g=h.isIgnored;function globSync(e,t){if(typeof t==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");return new GlobSync(e,t).found}function GlobSync(e,t){if(!e)throw new Error("must provide pattern");if(typeof t==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof GlobSync))return new GlobSync(e,t);d(this,e,t);if(this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var i=0;ithis.maxLength)return false;if(!this.stat&&D(this.cache,t)){var n=this.cache[t];if(Array.isArray(n))n="DIR";if(!r||n==="DIR")return n;if(r&&n==="FILE")return false}var a;var u=this.statCache[t];if(!u){var s;try{s=i.lstatSync(t)}catch(e){if(e&&(e.code==="ENOENT"||e.code==="ENOTDIR")){this.statCache[t]=false;return false}}if(s&&s.isSymbolicLink()){try{u=i.statSync(t)}catch(e){u=s}}else{u=s}}this.statCache[t]=u;var n=true;if(u)n=u.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||n;if(r&&n==="FILE")return false;return n};GlobSync.prototype._mark=function(e){return h.mark(this,e)};GlobSync.prototype._makeAbs=function(e){return h.makeAbs(this,e)}},,,,function(e){"use strict";e.exports=balanced;function balanced(e,t,r){if(e instanceof RegExp)e=maybeMatch(e,r);if(t instanceof RegExp)t=maybeMatch(t,r);var i=range(e,t,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+e.length,i[1]),post:r.slice(i[1]+t.length)}}function maybeMatch(e,t){var r=t.match(e);return r?r[0]:null}balanced.range=range;function range(e,t,r){var i,n,a,u,s;var o=r.indexOf(e);var l=r.indexOf(t,o+1);var f=o;if(o>=0&&l>0){i=[];a=r.length;while(f>=0&&!s){if(f==o){i.push(f);o=r.indexOf(e,f+1)}else if(i.length==1){s=[i.pop(),l]}else{n=i.pop();if(n=0?o:l}if(i.length){s=[a,u]}}return s}},,,,function(e,t,r){"use strict";var i=r(659);e.exports=factory;function factory(e,t){var r=e.split(":");var n=r[0];var a=r[1];var u=i(t);if(!a){a=n;n=null}attacher.displayName=e;return attacher;function attacher(e){var t=coerce(a,e);var r=t[0];var i=t[1];var s=r===2;return r?transformer:undefined;function transformer(e,t,r){var o=t.messages.length;u(e,t,i,done);function done(e){var i=t.messages;var u;if(e&&i.indexOf(e)===-1){try{t.fail(e)}catch(e){}}while(o2){throw new Error("Invalid severity `"+n+"` for `"+e+"`, "+"expected 0, 1, or 2")}i[0]=n;return i}},,,,,,,function(e,t,r){"use strict";e.exports=PassThrough;var i=r(955);var n=r(683);n.inherits=r(780);n.inherits(PassThrough,i);function PassThrough(e){if(!(this instanceof PassThrough))return new PassThrough(e);i.call(this,e)}PassThrough.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){"use strict";var i=r(353);var n=r(320);e.exports=n;var a=n.prototype;a.message=message;a.info=info;a.fail=fail;a.warn=message;function message(e,t,r){var n=this.path;var a=new i(e,t,r);if(n){a.name=n+":"+a.name;a.file=n}a.fatal=false;this.messages.push(a);return a}function fail(){var e=this.message.apply(this,arguments);e.fatal=true;throw e}function info(){var e=this.message.apply(this,arguments);e.fatal=null;return e}},,,,function(e,t,r){e.exports=r(64).deprecate},,,,function(e){"use strict";e.exports=locate;function locate(e,t){var r=e.indexOf("**",t);var i=e.indexOf("__",t);if(i===-1){return r}if(r===-1){return i}return ii&&e[c+1]!==" ";c=a}}else if(!isPrintable(u)){return R}h=h&&isPlainSafe(u)}o=o||l&&(a-c-1>i&&e[c+1]!==" ")}if(!s&&!o){return h&&!n(e)?I:M}if(r>9&&needIndentIndicator(e)){return R}return o?j:L}function writeScalar(e,t,r,i){e.dump=function(){if(t.length===0){return"''"}if(!e.noCompatMode&&T.indexOf(t)!==-1){return"'"+t+"'"}var a=e.indent*Math.max(1,r);var u=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a);var s=i||e.flowLevel>-1&&r>=e.flowLevel;function testAmbiguity(t){return testImplicitResolving(e,t)}switch(chooseScalarStyle(t,s,e.indent,u,testAmbiguity)){case I:return t;case M:return"'"+t.replace(/'/g,"''")+"'";case L:return"|"+blockHeader(t,e.indent)+dropEndingNewline(indentString(t,a));case j:return">"+blockHeader(t,e.indent)+dropEndingNewline(indentString(foldString(t,u),a));case R:return'"'+escapeString(t,u)+'"';default:throw new n("impossible error: invalid scalar style")}}()}function blockHeader(e,t){var r=needIndentIndicator(e)?String(t):"";var i=e[e.length-1]==="\n";var n=i&&(e[e.length-2]==="\n"||e==="\n");var a=n?"+":i?"":"-";return r+a+"\n"}function dropEndingNewline(e){return e[e.length-1]==="\n"?e.slice(0,-1):e}function foldString(e,t){var r=/(\n+)([^\n]*)/g;var i=function(){var i=e.indexOf("\n");i=i!==-1?i:e.length;r.lastIndex=i;return foldLine(e.slice(0,i),t)}();var n=e[0]==="\n"||e[0]===" ";var a;var u;while(u=r.exec(e)){var s=u[1],o=u[2];a=o[0]===" ";i+=s+(!n&&!a&&o!==""?"\n":"")+foldLine(o,t);n=a}return i}function foldLine(e,t){if(e===""||e[0]===" ")return e;var r=/ [^ ]/g;var i;var n=0,a,u=0,s=0;var o="";while(i=r.exec(e)){s=i.index;if(s-n>t){a=u>n?u:s;o+="\n"+e.slice(n,a);n=a+1}u=s}o+="\n";if(e.length-n>t&&u>n){o+=e.slice(n,u)+"\n"+e.slice(u+1)}else{o+=e.slice(n)}return o.slice(1)}function escapeString(e){var t="";var r,i;var n;for(var a=0;a=55296&&r<=56319){i=e.charCodeAt(a+1);if(i>=56320&&i<=57343){t+=encodeHex((r-55296)*1024+i-56320+65536);a++;continue}}n=P[r];t+=!n&&isPrintable(r)?e[a]:n||encodeHex(r)}return t}function writeFlowSequence(e,t,r){var i="",n=e.tag,a,u;for(a=0,u=r.length;a1024)f+="? ";f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" ");if(!writeNode(e,t,l,false,false)){continue}f+=e.dump;i+=f}e.tag=n;e.dump="{"+i+"}"}function writeBlockMapping(e,t,r,i){var a="",u=e.tag,s=Object.keys(r),o,l,c,h,p,v;if(e.sortKeys===true){s.sort()}else if(typeof e.sortKeys==="function"){s.sort(e.sortKeys)}else if(e.sortKeys){throw new n("sortKeys must be a boolean or a function")}for(o=0,l=s.length;o1024;if(p){if(e.dump&&f===e.dump.charCodeAt(0)){v+="?"}else{v+="? "}}v+=e.dump;if(p){v+=generateNextLine(e,t)}if(!writeNode(e,t+1,h,true,p)){continue}if(e.dump&&f===e.dump.charCodeAt(0)){v+=":"}else{v+=": "}v+=e.dump;a+=v}e.tag=u;e.dump=a||"{}"}function detectType(e,t,r){var i,a,u,l,f,c;a=r?e.explicitTypes:e.implicitTypes;for(u=0,l=a.length;u tag resolver accepts not "'+c+'" style')}e.dump=i}return true}}return false}function writeNode(e,t,r,i,a,u){e.tag=null;e.dump=r;if(!detectType(e,r,false)){detectType(e,r,true)}var o=s.call(e.dump);if(i){i=e.flowLevel<0||e.flowLevel>t}var l=o==="[object Object]"||o==="[object Array]",f,c;if(l){f=e.duplicates.indexOf(r);c=f!==-1}if(e.tag!==null&&e.tag!=="?"||c||e.indent!==2&&t>0){a=false}if(c&&e.usedDuplicates[f]){e.dump="*ref_"+f}else{if(l&&c&&!e.usedDuplicates[f]){e.usedDuplicates[f]=true}if(o==="[object Object]"){if(i&&Object.keys(e.dump).length!==0){writeBlockMapping(e,t,e.dump,a);if(c){e.dump="&ref_"+f+e.dump}}else{writeFlowMapping(e,t,e.dump);if(c){e.dump="&ref_"+f+" "+e.dump}}}else if(o==="[object Array]"){var h=e.noArrayIndent&&t>0?t-1:t;if(i&&e.dump.length!==0){writeBlockSequence(e,h,e.dump,a);if(c){e.dump="&ref_"+f+e.dump}}else{writeFlowSequence(e,h,e.dump);if(c){e.dump="&ref_"+f+" "+e.dump}}}else if(o==="[object String]"){if(e.tag!=="?"){writeScalar(e,e.dump,t,u)}}else{if(e.skipInvalid)return false;throw new n("unacceptable kind of an object to dump "+o)}if(e.tag!==null&&e.tag!=="?"){e.dump="!<"+e.tag+"> "+e.dump}}return true}function getDuplicateReferences(e,t){var r=[],i=[],n,a;inspectNode(e,r,i);for(n=0,a=i.length;n=e.length){if(t)t[u]=e;return r(null,e)}o.lastIndex=c;var i=o.exec(e);v=h;h+=i[0];p=v+i[1];c=o.lastIndex;if(f[p]||t&&t[p]===p){return process.nextTick(LOOP)}if(t&&Object.prototype.hasOwnProperty.call(t,p)){return gotResolvedLink(t[p])}return a.lstat(p,gotStat)}function gotStat(e,i){if(e)return r(e);if(!i.isSymbolicLink()){f[p]=true;if(t)t[p]=p;return process.nextTick(LOOP)}if(!n){var u=i.dev.toString(32)+":"+i.ino.toString(32);if(s.hasOwnProperty(u)){return gotTarget(null,s[u],p)}}a.stat(p,function(e){if(e)return r(e);a.readlink(p,function(e,t){if(!n)s[u]=t;gotTarget(e,t)})})}function gotTarget(e,n,a){if(e)return r(e);var u=i.resolve(v,n);if(t)t[a]=u;gotResolvedLink(u)}function gotResolvedLink(t){e=i.resolve(t,e.slice(c));start()}}},,function(e){e.exports=[{long:"help",description:"output usage information",short:"h",type:"boolean",default:false},{long:"version",description:"output version number",short:"v",type:"boolean",default:false},{long:"output",description:"specify output location",short:"o",value:"[path]"},{long:"rc-path",description:"specify configuration file",short:"r",type:"string",value:""},{long:"ignore-path",description:"specify ignore file",short:"i",type:"string",value:""},{long:"setting",description:"specify settings",short:"s",type:"string",value:""},{long:"ext",description:"specify extensions",short:"e",type:"string",value:""},{long:"use",description:"use plugins",short:"u",type:"string",value:""},{long:"watch",description:"watch for changes and reprocess",short:"w",type:"boolean",default:false},{long:"quiet",description:"output only warnings and errors",short:"q",type:"boolean",default:false},{long:"silent",description:"output only errors",short:"S",type:"boolean",default:false},{long:"frail",description:"exit with 1 on warnings",short:"f",type:"boolean",default:false},{long:"tree",description:"specify input and output as syntax tree",short:"t",type:"boolean",default:false},{long:"report",description:"specify reporter",type:"string",value:""},{long:"file-path",description:"specify path to process as",type:"string",value:""},{long:"tree-in",description:"specify input as syntax tree",type:"boolean"},{long:"tree-out",description:"output syntax tree",type:"boolean"},{long:"inspect",description:"output formatted syntax tree",type:"boolean"},{long:"stdout",description:"specify writing to stdout",type:"boolean",truelike:true},{long:"color",description:"specify color in report",type:"boolean",default:true},{long:"config",description:"search for configuration files",type:"boolean",default:true},{long:"ignore",description:"search for ignore files",type:"boolean",default:true}]},,,,function(e,t,r){"use strict";var i=r(495);var n=r(682);var a=r(839);var u=r(526);e.exports=i("remark-lint:hard-break-spaces",hardBreakSpaces);var s="Use two spaces for hard line breaks";function hardBreakSpaces(e,t){var r=String(t);n(e,"break",visitor);function visitor(e){var i;if(!u(e)){i=r.slice(a.start(e).offset,a.end(e).offset).split("\n",1)[0].replace(/\r$/,"");if(i.length>2){t.message(s,e)}}}}},,,,function(e,t,r){"use strict";var i=r(171);e.exports=table;var n="\t";var a="\n";var u=" ";var s="-";var o=":";var l="\\";var f="`";var c="|";var h=1;var p=2;var v="left";var d="center";var D="right";function table(e,t,r){var m=this;var g;var E;var A;var C;var y;var w;var x;var b;var F;var S;var B;var k;var O;var P;var T;var I;var M;var L;var j;var R;var U;var N;var J;var z;if(!m.options.gfm){return}g=0;L=0;w=t.length+1;x=[];while(gN){if(L1){if(F){C+=b.slice(0,b.length-1);b=b.charAt(b.length-1)}else{C+=b;b=""}}I=e.now();e(C)({type:"tableCell",children:m.tokenizeInline(k,I)},y)}e(b+F);b="";k=""}}else{if(b){k+=b;b=""}k+=F;if(F===l&&g!==w-2){k+=j.charAt(g+1);g++}if(F===f){P=1;while(j.charAt(g+1)===F){k+=F;g++;P++}if(!T){T=P}else if(P>=T){T=0}}}O=false;g++}if(!M){e(a+E)}}return U}},function(e,t,r){"use strict";var i=r(211);function resolveJavascriptRegExp(e){if(e===null)return false;if(e.length===0)return false;var t=e,r=/\/([gim]*)$/.exec(e),i="";if(t[0]==="/"){if(r)i=r[1];if(i.length>3)return false;if(t[t.length-i.length-1]!=="/")return false}return true}function constructJavascriptRegExp(e){var t=e,r=/\/([gim]*)$/.exec(e),i="";if(t[0]==="/"){if(r)i=r[1];t=t.slice(1,t.length-i.length-1)}return new RegExp(t,i)}function representJavascriptRegExp(e){var t="/"+e.source+"/";if(e.global)t+="g";if(e.multiline)t+="m";if(e.ignoreCase)t+="i";return t}function isRegExp(e){return Object.prototype.toString.call(e)==="[object RegExp]"}e.exports=new i("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp})},,,,,,,,,function(e){"use strict";e.exports=markdownTable;var t=/\./;var r=/\.[^.]*$/;var i="l";var n="r";var a="c";var u=".";var s="";var o=[i,n,a,u,s];var l=3;var f=":";var c="-";var h="|";var p=" ";var v="\n";function markdownTable(e,r){var d=r||{};var D=d.delimiter;var m=d.start;var g=d.end;var E=d.align;var A=d.stringLength||lengthNoop;var C=0;var y=-1;var w=e.length;var x=[];var b;var F;var S;var B;var k;var O;var P;var T;var I;var M;var L;var j;E=E?E.concat():[];if(D===null||D===undefined){D=p+h+p}if(m===null||m===undefined){m=h+p}if(g===null||g===undefined){g=p+h}while(++yC){C=B.length}while(++Ox[O]){x[O]=P}}}if(typeof E==="string"){E=pad(C,E).split("")}O=-1;while(++Ox[O]){x[O]=T}}}y=-1;while(++yl?M:l}else{M=x[O]}b=E[O];I=b===n||b===s?c:f;I+=pad(M-2,c);I+=b!==i&&b!==s?f:c;F[O]=I}S.splice(1,0,F.join(D))}return m+S.join(g+v+m)+g}function stringify(e){return e===null||e===undefined?"":String(e)}function lengthNoop(e){return String(e).length}function pad(e,t){return new Array(e+1).join(t||p)}function dotindex(e){var t=r.exec(e);return t?t.index+1:e.length}},,,,,function(e,t,r){e.exports=r(688)},,,,,function(e,t,r){"use strict";var i=r(12);e.exports=Writable;function WriteReq(e,t,r){this.chunk=e;this.encoding=t;this.callback=r;this.next=null}function CorkedRequest(e){var t=this;this.next=null;this.entry=null;this.finish=function(){onCorkedFinish(t,e)}}var n=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:i.nextTick;var a;Writable.WritableState=WritableState;var u=r(683);u.inherits=r(780);var s={deprecate:r(507)};var o=r(569);var l=r(945).Buffer;var f=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return l.from(e)}function _isUint8Array(e){return l.isBuffer(e)||e instanceof f}var c=r(972);u.inherits(Writable,o);function nop(){}function WritableState(e,t){a=a||r(98);e=e||{};var i=t instanceof a;this.objectMode=!!e.objectMode;if(i)this.objectMode=this.objectMode||!!e.writableObjectMode;var n=e.highWaterMark;var u=e.writableHighWaterMark;var s=this.objectMode?16:16*1024;if(n||n===0)this.highWaterMark=n;else if(i&&(u||u===0))this.highWaterMark=u;else this.highWaterMark=s;this.highWaterMark=Math.floor(this.highWaterMark);this.finalCalled=false;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;this.destroyed=false;var o=e.decodeStrings===false;this.decodeStrings=!o;this.defaultEncoding=e.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(e){onwrite(t,e)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var e=this.bufferedRequest;var t=[];while(e){t.push(e);e=e.next}return t};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}})();var h;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){h=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function(e){if(h.call(this,e))return true;if(this!==Writable)return false;return e&&e._writableState instanceof WritableState}})}else{h=function(e){return e instanceof this}}function Writable(e){a=a||r(98);if(!h.call(Writable,this)&&!(this instanceof a)){return new Writable(e)}this._writableState=new WritableState(e,this);this.writable=true;if(e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}o.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(e,t){var r=new Error("write after end");e.emit("error",r);i.nextTick(t,r)}function validChunk(e,t,r,n){var a=true;var u=false;if(r===null){u=new TypeError("May not write null values to stream")}else if(typeof r!=="string"&&r!==undefined&&!t.objectMode){u=new TypeError("Invalid non-string/buffer chunk")}if(u){e.emit("error",u);i.nextTick(n,u);a=false}return a}Writable.prototype.write=function(e,t,r){var i=this._writableState;var n=false;var a=!i.objectMode&&_isUint8Array(e);if(a&&!l.isBuffer(e)){e=_uint8ArrayToBuffer(e)}if(typeof t==="function"){r=t;t=null}if(a)t="buffer";else if(!t)t=i.defaultEncoding;if(typeof r!=="function")r=nop;if(i.ended)writeAfterEnd(this,r);else if(a||validChunk(this,i,e,r)){i.pendingcb++;n=writeOrBuffer(this,i,a,e,t,r)}return n};Writable.prototype.cork=function(){var e=this._writableState;e.corked++};Writable.prototype.uncork=function(){var e=this._writableState;if(e.corked){e.corked--;if(!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.bufferedRequest)clearBuffer(this,e)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(e){if(typeof e==="string")e=e.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e;return this};function decodeChunk(e,t,r){if(!e.objectMode&&e.decodeStrings!==false&&typeof t==="string"){t=l.from(t,r)}return t}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function writeOrBuffer(e,t,r,i,n,a){if(!r){var u=decodeChunk(t,i,n);if(i!==u){r=true;n="buffer";i=u}}var s=t.objectMode?1:i.length;t.length+=s;var o=t.length=b){b=0}}else if(E===v){g++;B+=t.charAt(g)}else if((!b||y)&&E===p){L++}else if((!b||y)&&E===d){if(L){L--}else{if(!A){while(gn){return false}}return check(e,i,r)&&check(e,m)}function isKnown(e,t,r){var i=o?o.indexOf(e)!==-1:true;if(!i){h.warn("Unknown rule: cannot "+t+" `'"+e+"'`",r)}return i}function getState(e){var t=e?D[e]:m;if(t&&t.length!==0){return t[t.length-1].state}if(!e){return!l}if(l){return f.indexOf(e)!==-1}return c.indexOf(e)===-1}function toggle(e,t,r){var i=r?D[r]:m;var n;var a;if(!i){i=[];D[r]=i}a=getState(r);n=t;if(n!==a){i.push({state:n,position:e})}if(!r){for(r in D){toggle(e,t,r)}}}function check(e,t,r){var i=t&&t.length;var n=-1;var a;while(--i>n){a=t[i];if(!a.position||!a.position.line||!a.position.column){continue}if(a.position.line=e){return}if(u){s.push({start:n,end:e});u=false}n=e}}},,function(e){"use strict";e.exports=orderedItems;var t="\n";var r=".";var i=t+t;function orderedItems(e){var n=this;var a=n.visitors.listItem;var u=n.options.incrementListMarker;var s=[];var o=e.start;var l=e.children;var f=l.length;var c=-1;var h;o=o==null?1:o;while(++c1;var p=c;var v=t.path;if(!u(p)){a("Not copying");return i()}p=l(e.cwd,p);a("Copying `%s`",v);s(p,onstatfile);function onstatfile(e,t){if(e){if(e.code!=="ENOENT"||c.charAt(c.length-1)===n.sep){return i(new Error("Cannot read output directory. Error:\n"+e.message))}s(o(p),onstatparent)}else{done(t.isDirectory())}}function onstatparent(e){if(e){i(new Error("Cannot read parent directory. Error:\n"+e.message))}else{done(false)}}function done(e){if(!e&&h){return i(new Error("Cannot write multiple files to single output: "+p))}t[e?"dirname":"path"]=f(t.cwd,p);a("Copying document from %s to %s",v,t.path);i()}}},function(e,t){"use strict";var r="[a-zA-Z_:][a-zA-Z0-9:._-]*";var i="[^\"'=<>`\\u0000-\\u0020]+";var n="'[^']*'";var a='"[^"]*"';var u="(?:"+i+"|"+n+"|"+a+")";var s="(?:\\s+"+r+"(?:\\s*=\\s*"+u+")?)";var o="<[A-Za-z][A-Za-z0-9\\-]*"+s+"*\\s*\\/?>";var l="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>";var f="\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e";var c="<[?].*?[?]>";var h="]*>";var p="";t.openCloseTag=new RegExp("^(?:"+o+"|"+l+")");t.tag=new RegExp("^(?:"+o+"|"+l+"|"+f+"|"+c+"|"+h+"|"+p+")")},,function(e){e.exports=require("path")},,,,function(e,t,r){"use strict";var i=r(36);var n=r(171);var a=r(511);e.exports=strong;strong.locator=a;var u="\\";var s="*";var o="_";function strong(e,t,r){var a=this;var l=0;var f=t.charAt(l);var c;var h;var p;var v;var d;var D;var m;if(f!==s&&f!==o||t.charAt(++l)!==f){return}h=a.options.pedantic;p=f;d=p+p;D=t.length;l++;v="";f="";if(h&&n(t.charAt(l))){return}while(l0){return parse(e)}else if(r==="number"&&isNaN(e)===false){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var s=/^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s){return}var o=parseFloat(s[1]);var l=(s[2]||"ms").toLowerCase();switch(l){case"years":case"year":case"yrs":case"yr":case"y":return o*u;case"weeks":case"week":case"w":return o*a;case"days":case"day":case"d":return o*n;case"hours":case"hour":case"hrs":case"hr":case"h":return o*i;case"minutes":case"minute":case"mins":case"min":case"m":return o*r;case"seconds":case"second":case"secs":case"sec":case"s":return o*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return undefined}}function fmtShort(e){var a=Math.abs(e);if(a>=n){return Math.round(e/n)+"d"}if(a>=i){return Math.round(e/i)+"h"}if(a>=r){return Math.round(e/r)+"m"}if(a>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var a=Math.abs(e);if(a>=n){return plural(e,a,n,"day")}if(a>=i){return plural(e,a,i,"hour")}if(a>=r){return plural(e,a,r,"minute")}if(a>=t){return plural(e,a,t,"second")}return e+" ms"}function plural(e,t,r,i){var n=t>=r*1.5;return Math.round(e/r)+" "+i+(n?"s":"")}},function(e,t){t.parse=t.decode=decode;t.stringify=t.encode=encode;t.safe=safe;t.unsafe=unsafe;var r=typeof process!=="undefined"&&process.platform==="win32"?"\r\n":"\n";function encode(e,t){var i=[];var n="";if(typeof t==="string"){t={section:t,whitespace:false}}else{t=t||{};t.whitespace=t.whitespace===true}var a=t.whitespace?" = ":"=";Object.keys(e).forEach(function(t,u,s){var o=e[t];if(o&&Array.isArray(o)){o.forEach(function(e){n+=safe(t+"[]")+a+safe(e)+"\n"})}else if(o&&typeof o==="object"){i.push(t)}else{n+=safe(t)+a+safe(o)+r}});if(t.section&&n.length){n="["+safe(t.section)+"]"+r+n}i.forEach(function(i,a,u){var s=dotSplit(i).join("\\.");var o=(t.section?t.section+".":"")+s;var l=encode(e[i],{section:o,whitespace:t.whitespace});if(n.length&&l.length){n+=r}n+=l});return n}function dotSplit(e){return e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function decode(e){var t={};var r=t;var i=null;var n=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;var a=e.split(/[\r\n]+/g);a.forEach(function(e,a,u){if(!e||e.match(/^\s*[;#]/))return;var s=e.match(n);if(!s)return;if(s[1]!==undefined){i=unsafe(s[1]);r=t[i]=t[i]||{};return}var o=unsafe(s[2]);var l=s[3]?unsafe(s[4]):true;switch(l){case"true":case"false":case"null":l=JSON.parse(l)}if(o.length>2&&o.slice(-2)==="[]"){o=o.substring(0,o.length-2);if(!r[o]){r[o]=[]}else if(!Array.isArray(r[o])){r[o]=[r[o]]}}if(Array.isArray(r[o])){r[o].push(l)}else{r[o]=l}});Object.keys(t).filter(function(e,r,i){if(!t[e]||typeof t[e]!=="object"||Array.isArray(t[e])){return false}var n=dotSplit(e);var a=t;var u=n.pop();var s=u.replace(/\\\./g,".");n.forEach(function(e,t,r){if(!a[e]||typeof a[e]!=="object")a[e]={};a=a[e]});if(a===t&&s===u){return false}a[s]=t[e];return true}).forEach(function(e,r,i){delete t[e]});return t}function isQuoted(e){return e.charAt(0)==='"'&&e.slice(-1)==='"'||e.charAt(0)==="'"&&e.slice(-1)==="'"}function safe(e){return typeof e!=="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&isQuoted(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#")}function unsafe(e,t){e=(e||"").trim();if(isQuoted(e)){if(e.charAt(0)==="'"){e=e.substr(1,e.length-2)}try{e=JSON.parse(e)}catch(e){}}else{var r=false;var i="";for(var n=0,a=e.length;n="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||i.ID_Start.test(e)},isIdContinueChar(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="‌"||e==="‍"||i.ID_Continue.test(e)},isDigit(e){return/[0-9]/.test(e)},isHexDigit(e){return/[0-9A-Fa-f]/.test(e)}}},,function(e){"use strict";e.exports=(e=>{if(Number.isNaN(e)){return false}if(e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)){return true}return false})},,,,,,,,,function(e,t,r){"use strict";e.exports.plugins=[r(889),r(424),r(725),r(137),r(339),r(767),r(550),r(550),[r(890),"space"],r(164),r(223),r(127),r(816),r(667),r(380),r(911),r(33),r(758),r(9),r(273),r(926),r(121),r(55),r(72),r(522),r(842),r(467),r(314),[r(166),2],[r(112),{checked:"x",unchecked:" "}],[r(301),"fenced"],[r(386),"`"],[r(451),"md"],[r(284),1],[r(675),"atx"],[r(455),[{no:"End-Of-Life",yes:"End-of-Life"},{no:"End-of-life",yes:"End-of-Life"},{no:"Github",yes:"GitHub"},{no:"Javascript",yes:"JavaScript"},{no:"Node.JS",yes:"Node.js"},{no:"Note that",yes:""},{no:"note that",yes:""},{no:"Rfc",yes:"RFC"},{no:"[Rr][Ff][Cc]\\d+",yes:"RFC "},{no:"rfc",yes:"RFC"},{no:"UNIX",yes:"Unix"},{no:"unix",yes:"Unix"},{no:"v8",yes:"V8"}]],[r(108),"*"],[r(435),"padded"]]},,function(e){e.exports=["cent","copy","divide","gt","lt","not","para","times"]},,function(e,t,r){"use strict";e.exports=r(447)},function(e,t,r){e.exports=minimatch;minimatch.Minimatch=Minimatch;var i={sep:"/"};try{i=r(589)}catch(e){}var n=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var a=r(348);var u={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var s="[^/]";var o=s+"*?";var l="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var f="(?:(?!(?:\\/|^)\\.).)*?";var c=charSet("().*{}+?[]^$\\!");function charSet(e){return e.split("").reduce(function(e,t){e[t]=true;return e},{})}var h=/\/+/;minimatch.filter=filter;function filter(e,t){t=t||{};return function(r,i,n){return minimatch(r,e,t)}}function ext(e,t){e=e||{};t=t||{};var r={};Object.keys(t).forEach(function(e){r[e]=t[e]});Object.keys(e).forEach(function(t){r[t]=e[t]});return r}minimatch.defaults=function(e){if(!e||!Object.keys(e).length)return minimatch;var t=minimatch;var r=function minimatch(r,i,n){return t.minimatch(r,i,ext(e,n))};r.Minimatch=function Minimatch(r,i){return new t.Minimatch(r,ext(e,i))};return r};Minimatch.defaults=function(e){if(!e||!Object.keys(e).length)return Minimatch;return minimatch.defaults(e).Minimatch};function minimatch(e,t,r){if(typeof t!=="string"){throw new TypeError("glob pattern string required")}if(!r)r={};if(!r.nocomment&&t.charAt(0)==="#"){return false}if(t.trim()==="")return e==="";return new Minimatch(t,r).match(e)}function Minimatch(e,t){if(!(this instanceof Minimatch)){return new Minimatch(e,t)}if(typeof e!=="string"){throw new TypeError("glob pattern string required")}if(!t)t={};e=e.trim();if(i.sep!=="/"){e=e.split(i.sep).join("/")}this.options=t;this.set=[];this.pattern=e;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){if(this._made)return;var e=this.pattern;var t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();var r=this.globSet=this.braceExpand();if(t.debug)this.debug=console.error;this.debug(this.pattern,r);r=this.globParts=r.map(function(e){return e.split(h)});this.debug(this.pattern,r);r=r.map(function(e,t,r){return e.map(this.parse,this)},this);this.debug(this.pattern,r);r=r.filter(function(e){return e.indexOf(false)===-1});this.debug(this.pattern,r);this.set=r}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var e=this.pattern;var t=false;var r=this.options;var i=0;if(r.nonegate)return;for(var n=0,a=e.length;n1024*64){throw new TypeError("pattern is too long")}var r=this.options;if(!r.noglobstar&&e==="**")return n;if(e==="")return"";var i="";var a=!!r.nocase;var l=false;var f=[];var h=[];var v;var d=false;var D=-1;var m=-1;var g=e.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var E=this;function clearStateChar(){if(v){switch(v){case"*":i+=o;a=true;break;case"?":i+=s;a=true;break;default:i+="\\"+v;break}E.debug("clearStateChar %j %j",v,i);v=false}}for(var A=0,C=e.length,y;A-1;k--){var O=h[k];var P=i.slice(0,O.reStart);var T=i.slice(O.reStart,O.reEnd-8);var I=i.slice(O.reEnd-8,O.reEnd);var M=i.slice(O.reEnd);I+=M;var L=P.split("(").length-1;var j=M;for(A=0;A=0;u--){a=e[u];if(a)break}for(u=0;u>> no match, partial?",e,c,t,h);if(c===s)return true}return false}var v;if(typeof l==="string"){if(i.nocase){v=f.toLowerCase()===l.toLowerCase()}else{v=f===l}this.debug("string match",l,f,v)}else{v=f.match(l);this.debug("pattern match",l,f,v)}if(!v)return false}if(a===s&&u===o){return true}else if(a===s){return r}else if(u===o){var d=a===s-1&&e[a]==="";return d}throw new Error("wtf?")};function globUnescape(e){return e.replace(/\\(.)/g,"$1")}function regExpEscape(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},,,function(e){"use strict";e.exports=function(e){if(typeof e!=="function"){throw new TypeError("Expected a function")}return e.displayName||e.name||(/function ([^\(]+)?\(/.exec(e.toString())||[])[1]||null}},function(e){"use strict";e.exports=(()=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");return new RegExp(e,"g")})},,,function(e,t,r){"use strict";var i=r(304);var n=r(948);e.exports=fileSystem;function fileSystem(e,t,r){var a=e.files;if(a.length===0){r()}else{n(a,{cwd:t.cwd,extensions:t.extensions,silentlyIgnore:t.silentlyIgnore,ignore:new i({cwd:t.cwd,detectIgnore:t.detectIgnore,ignoreName:t.ignoreName,ignorePath:t.ignorePath})},onfound)}function onfound(i,n){var a=n.files;a.sort(sortAlphabetically);a.forEach(markAsGiven);e.files=a;if(t.out===null||t.out===undefined){t.out=n.oneFileMode}r(i)}function markAsGiven(e){e.data.unifiedEngineGiven=true}function sortAlphabetically(e,t){return e.pathi){i=r}}else{r=1}n=a+1;a=e.indexOf(t,n)}return i}},function(e,t,r){"use strict";var i=r(347)("unified-engine:file-pipeline:stdout");var n=r(928);e.exports=stdout;function stdout(e,t,r,a){if(!t.data.unifiedEngineGiven){i("Ignoring programmatically added file");a()}else if(n(t).fatal||e.output||!e.out){i("Ignoring writing to `streamOut`");a()}else{i("Writing document to `streamOut`");e.streamOut.write(t.toString(),a)}}},,,function(e,t,r){"use strict";var i=r(56);var n=r(503);e.exports=toVFile;function toVFile(e){if(typeof e==="string"||i(e)){e={path:String(e)}}return n(e)}},,,,function(e){(function webpackUniversalModuleDefinition(t,r){if(true)e.exports=r();else{}})(this,function(){return function(e){var t={};function __webpack_require__(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:false};e[r].call(i.exports,i,i.exports,__webpack_require__);i.loaded=true;return i.exports}__webpack_require__.m=e;__webpack_require__.c=t;__webpack_require__.p="";return __webpack_require__(0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(1);var n=r(3);var a=r(8);var u=r(15);function parse(e,t,r){var u=null;var s=function(e,t){if(r){r(e,t)}if(u){u.visit(e,t)}};var o=typeof r==="function"?s:null;var l=false;if(t){l=typeof t.comment==="boolean"&&t.comment;var f=typeof t.attachComment==="boolean"&&t.attachComment;if(l||f){u=new i.CommentHandler;u.attach=f;t.comment=true;o=s}}var c=false;if(t&&typeof t.sourceType==="string"){c=t.sourceType==="module"}var h;if(t&&typeof t.jsx==="boolean"&&t.jsx){h=new n.JSXParser(e,t,o)}else{h=new a.Parser(e,t,o)}var p=c?h.parseModule():h.parseScript();var v=p;if(l&&u){v.comments=u.comments}if(h.config.tokens){v.tokens=h.tokens}if(h.config.tolerant){v.errors=h.errorHandler.errors}return v}t.parse=parse;function parseModule(e,t,r){var i=t||{};i.sourceType="module";return parse(e,i,r)}t.parseModule=parseModule;function parseScript(e,t,r){var i=t||{};i.sourceType="script";return parse(e,i,r)}t.parseScript=parseScript;function tokenize(e,t,r){var i=new u.Tokenizer(e,t);var n;n=[];try{while(true){var a=i.getNextToken();if(!a){break}if(r){a=r(a)}n.push(a)}}catch(e){i.errorHandler.tolerate(e)}if(i.errorHandler.tolerant){n.errors=i.errors()}return n}t.tokenize=tokenize;var s=r(2);t.Syntax=s.Syntax;t.version="4.0.1"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(2);var n=function(){function CommentHandler(){this.attach=false;this.comments=[];this.stack=[];this.leading=[];this.trailing=[]}CommentHandler.prototype.insertInnerComments=function(e,t){if(e.type===i.Syntax.BlockStatement&&e.body.length===0){var r=[];for(var n=this.leading.length-1;n>=0;--n){var a=this.leading[n];if(t.end.offset>=a.start){r.unshift(a.comment);this.leading.splice(n,1);this.trailing.splice(n,1)}}if(r.length){e.innerComments=r}}};CommentHandler.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var r=this.trailing.length-1;r>=0;--r){var i=this.trailing[r];if(i.start>=e.end.offset){t.unshift(i.comment)}}this.trailing.length=0;return t}var n=this.stack[this.stack.length-1];if(n&&n.node.trailingComments){var a=n.node.trailingComments[0];if(a&&a.range[0]>=e.end.offset){t=n.node.trailingComments;delete n.node.trailingComments}}return t};CommentHandler.prototype.findLeadingComments=function(e){var t=[];var r;while(this.stack.length>0){var i=this.stack[this.stack.length-1];if(i&&i.start>=e.start.offset){r=i.node;this.stack.pop()}else{break}}if(r){var n=r.leadingComments?r.leadingComments.length:0;for(var a=n-1;a>=0;--a){var u=r.leadingComments[a];if(u.range[1]<=e.start.offset){t.unshift(u);r.leadingComments.splice(a,1)}}if(r.leadingComments&&r.leadingComments.length===0){delete r.leadingComments}return t}for(var a=this.leading.length-1;a>=0;--a){var i=this.leading[a];if(i.start<=e.start.offset){t.unshift(i.comment);this.leading.splice(a,1)}}return t};CommentHandler.prototype.visitNode=function(e,t){if(e.type===i.Syntax.Program&&e.body.length>0){return}this.insertInnerComments(e,t);var r=this.findTrailingComments(t);var n=this.findLeadingComments(t);if(n.length>0){e.leadingComments=n}if(r.length>0){e.trailingComments=r}this.stack.push({node:e,start:t.start.offset})};CommentHandler.prototype.visitComment=function(e,t){var r=e.type[0]==="L"?"Line":"Block";var i={type:r,value:e.value};if(e.range){i.range=e.range}if(e.loc){i.loc=e.loc}this.comments.push(i);if(this.attach){var n={comment:{type:r,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};if(e.loc){n.comment.loc=e.loc}e.type=r;this.leading.push(n);this.trailing.push(n)}};CommentHandler.prototype.visit=function(e,t){if(e.type==="LineComment"){this.visitComment(e,t)}else if(e.type==="BlockComment"){this.visitComment(e,t)}else if(this.attach){this.visitNode(e,t)}};return CommentHandler}();t.CommentHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(t.hasOwnProperty(r))e[r]=t[r]};return function(t,r){e(t,r);function __(){this.constructor=t}t.prototype=r===null?Object.create(r):(__.prototype=r.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});var n=r(4);var a=r(5);var u=r(6);var s=r(7);var o=r(8);var l=r(13);var f=r(14);l.TokenName[100]="JSXIdentifier";l.TokenName[101]="JSXText";function getQualifiedElementName(e){var t;switch(e.type){case u.JSXSyntax.JSXIdentifier:var r=e;t=r.name;break;case u.JSXSyntax.JSXNamespacedName:var i=e;t=getQualifiedElementName(i.namespace)+":"+getQualifiedElementName(i.name);break;case u.JSXSyntax.JSXMemberExpression:var n=e;t=getQualifiedElementName(n.object)+"."+getQualifiedElementName(n.property);break;default:break}return t}var c=function(e){i(JSXParser,e);function JSXParser(t,r,i){return e.call(this,t,r,i)||this}JSXParser.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)};JSXParser.prototype.startJSX=function(){this.scanner.index=this.startMarker.index;this.scanner.lineNumber=this.startMarker.line;this.scanner.lineStart=this.startMarker.index-this.startMarker.column};JSXParser.prototype.finishJSX=function(){this.nextToken()};JSXParser.prototype.reenterJSX=function(){this.startJSX();this.expectJSX("}");if(this.config.tokens){this.tokens.pop()}};JSXParser.prototype.createJSXNode=function(){this.collectComments();return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}};JSXParser.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}};JSXParser.prototype.scanXHTMLEntity=function(e){var t="&";var r=true;var i=false;var a=false;var u=false;while(!this.scanner.eof()&&r&&!i){var s=this.scanner.source[this.scanner.index];if(s===e){break}i=s===";";t+=s;++this.scanner.index;if(!i){switch(t.length){case 2:a=s==="#";break;case 3:if(a){u=s==="x";r=u||n.Character.isDecimalDigit(s.charCodeAt(0));a=a&&!u}break;default:r=r&&!(a&&!n.Character.isDecimalDigit(s.charCodeAt(0)));r=r&&!(u&&!n.Character.isHexDigit(s.charCodeAt(0)));break}}}if(r&&i&&t.length>2){var o=t.substr(1,t.length-2);if(a&&o.length>1){t=String.fromCharCode(parseInt(o.substr(1),10))}else if(u&&o.length>2){t=String.fromCharCode(parseInt("0"+o.substr(1),16))}else if(!a&&!u&&f.XHTMLEntities[o]){t=f.XHTMLEntities[o]}}return t};JSXParser.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(e===60||e===62||e===47||e===58||e===61||e===123||e===125){var t=this.scanner.source[this.scanner.index++];return{type:7,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(e===34||e===39){var r=this.scanner.index;var i=this.scanner.source[this.scanner.index++];var a="";while(!this.scanner.eof()){var u=this.scanner.source[this.scanner.index++];if(u===i){break}else if(u==="&"){a+=this.scanXHTMLEntity(i)}else{a+=u}}return{type:8,value:a,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(e===46){var s=this.scanner.source.charCodeAt(this.scanner.index+1);var o=this.scanner.source.charCodeAt(this.scanner.index+2);var t=s===46&&o===46?"...":".";var r=this.scanner.index;this.scanner.index+=t.length;return{type:7,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(e===96){return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index}}if(n.Character.isIdentifierStart(e)&&e!==92){var r=this.scanner.index;++this.scanner.index;while(!this.scanner.eof()){var u=this.scanner.source.charCodeAt(this.scanner.index);if(n.Character.isIdentifierPart(u)&&u!==92){++this.scanner.index}else if(u===45){++this.scanner.index}else{break}}var l=this.scanner.source.slice(r,this.scanner.index);return{type:100,value:l,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}return this.scanner.lex()};JSXParser.prototype.nextJSXToken=function(){this.collectComments();this.startMarker.index=this.scanner.index;this.startMarker.line=this.scanner.lineNumber;this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;if(this.config.tokens){this.tokens.push(this.convertToken(e))}return e};JSXParser.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index;this.startMarker.line=this.scanner.lineNumber;this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.scanner.index;var t="";while(!this.scanner.eof()){var r=this.scanner.source[this.scanner.index];if(r==="{"||r==="<"){break}++this.scanner.index;t+=r;if(n.Character.isLineTerminator(r.charCodeAt(0))){++this.scanner.lineNumber;if(r==="\r"&&this.scanner.source[this.scanner.index]==="\n"){++this.scanner.index}this.scanner.lineStart=this.scanner.index}}this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var i={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};if(t.length>0&&this.config.tokens){this.tokens.push(this.convertToken(i))}return i};JSXParser.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();this.scanner.restoreState(e);return t};JSXParser.prototype.expectJSX=function(e){var t=this.nextJSXToken();if(t.type!==7||t.value!==e){this.throwUnexpectedToken(t)}};JSXParser.prototype.matchJSX=function(e){var t=this.peekJSXToken();return t.type===7&&t.value===e};JSXParser.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode();var t=this.nextJSXToken();if(t.type!==100){this.throwUnexpectedToken(t)}return this.finalize(e,new a.JSXIdentifier(t.value))};JSXParser.prototype.parseJSXElementName=function(){var e=this.createJSXNode();var t=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=t;this.expectJSX(":");var i=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(r,i))}else if(this.matchJSX(".")){while(this.matchJSX(".")){var n=t;this.expectJSX(".");var u=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXMemberExpression(n,u))}}return t};JSXParser.prototype.parseJSXAttributeName=function(){var e=this.createJSXNode();var t;var r=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=r;this.expectJSX(":");var n=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(i,n))}else{t=r}return t};JSXParser.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode();var t=this.nextJSXToken();if(t.type!==8){this.throwUnexpectedToken(t)}var r=this.getTokenRaw(t);return this.finalize(e,new s.Literal(t.value,r))};JSXParser.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{");this.finishJSX();if(this.match("}")){this.tolerateError("JSX attributes must only be assigned a non-empty expression")}var t=this.parseAssignmentExpression();this.reenterJSX();return this.finalize(e,new a.JSXExpressionContainer(t))};JSXParser.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()};JSXParser.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode();var t=this.parseJSXAttributeName();var r=null;if(this.matchJSX("=")){this.expectJSX("=");r=this.parseJSXAttributeValue()}return this.finalize(e,new a.JSXAttribute(t,r))};JSXParser.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{");this.expectJSX("...");this.finishJSX();var t=this.parseAssignmentExpression();this.reenterJSX();return this.finalize(e,new a.JSXSpreadAttribute(t))};JSXParser.prototype.parseJSXAttributes=function(){var e=[];while(!this.matchJSX("/")&&!this.matchJSX(">")){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e};JSXParser.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName();var r=this.parseJSXAttributes();var i=this.matchJSX("/");if(i){this.expectJSX("/")}this.expectJSX(">");return this.finalize(e,new a.JSXOpeningElement(t,i,r))};JSXParser.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();this.expectJSX("<");if(this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();this.expectJSX(">");return this.finalize(e,new a.JSXClosingElement(t))}var r=this.parseJSXElementName();var i=this.parseJSXAttributes();var n=this.matchJSX("/");if(n){this.expectJSX("/")}this.expectJSX(">");return this.finalize(e,new a.JSXOpeningElement(r,n,i))};JSXParser.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();this.collectComments();this.lastMarker.index=this.scanner.index;this.lastMarker.line=this.scanner.lineNumber;this.lastMarker.column=this.scanner.index-this.scanner.lineStart;return this.finalize(e,new a.JSXEmptyExpression)};JSXParser.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;if(this.matchJSX("}")){t=this.parseJSXEmptyExpression();this.expectJSX("}")}else{this.finishJSX();t=this.parseAssignmentExpression();this.reenterJSX()}return this.finalize(e,new a.JSXExpressionContainer(t))};JSXParser.prototype.parseJSXChildren=function(){var e=[];while(!this.scanner.eof()){var t=this.createJSXChildNode();var r=this.nextJSXText();if(r.start0){var s=this.finalize(e.node,new a.JSXElement(e.opening,e.children,e.closing));e=t[t.length-1];e.children.push(s);t.pop()}else{break}}}return e};JSXParser.prototype.parseJSXElement=function(){var e=this.createJSXNode();var t=this.parseJSXOpeningElement();var r=[];var i=null;if(!t.selfClosing){var n=this.parseComplexJSXElement({node:e,opening:t,closing:i,children:r});r=n.children;i=n.closing}return this.finalize(e,new a.JSXElement(t,r,i))};JSXParser.prototype.parseJSXRoot=function(){if(this.config.tokens){this.tokens.pop()}this.startJSX();var e=this.parseJSXElement();this.finishJSX();return e};JSXParser.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")};return JSXParser}(o.Parser);t.JSXParser=c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return e===32||e===9||e===11||e===12||e===160||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return e===10||e===13||e===8232||e===8233},isIdentifierStart:function(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e===92||e>=128&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===92||e>=128&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(6);var n=function(){function JSXClosingElement(e){this.type=i.JSXSyntax.JSXClosingElement;this.name=e}return JSXClosingElement}();t.JSXClosingElement=n;var a=function(){function JSXElement(e,t,r){this.type=i.JSXSyntax.JSXElement;this.openingElement=e;this.children=t;this.closingElement=r}return JSXElement}();t.JSXElement=a;var u=function(){function JSXEmptyExpression(){this.type=i.JSXSyntax.JSXEmptyExpression}return JSXEmptyExpression}();t.JSXEmptyExpression=u;var s=function(){function JSXExpressionContainer(e){this.type=i.JSXSyntax.JSXExpressionContainer;this.expression=e}return JSXExpressionContainer}();t.JSXExpressionContainer=s;var o=function(){function JSXIdentifier(e){this.type=i.JSXSyntax.JSXIdentifier;this.name=e}return JSXIdentifier}();t.JSXIdentifier=o;var l=function(){function JSXMemberExpression(e,t){this.type=i.JSXSyntax.JSXMemberExpression;this.object=e;this.property=t}return JSXMemberExpression}();t.JSXMemberExpression=l;var f=function(){function JSXAttribute(e,t){this.type=i.JSXSyntax.JSXAttribute;this.name=e;this.value=t}return JSXAttribute}();t.JSXAttribute=f;var c=function(){function JSXNamespacedName(e,t){this.type=i.JSXSyntax.JSXNamespacedName;this.namespace=e;this.name=t}return JSXNamespacedName}();t.JSXNamespacedName=c;var h=function(){function JSXOpeningElement(e,t,r){this.type=i.JSXSyntax.JSXOpeningElement;this.name=e;this.selfClosing=t;this.attributes=r}return JSXOpeningElement}();t.JSXOpeningElement=h;var p=function(){function JSXSpreadAttribute(e){this.type=i.JSXSyntax.JSXSpreadAttribute;this.argument=e}return JSXSpreadAttribute}();t.JSXSpreadAttribute=p;var v=function(){function JSXText(e,t){this.type=i.JSXSyntax.JSXText;this.value=e;this.raw=t}return JSXText}();t.JSXText=v},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(2);var n=function(){function ArrayExpression(e){this.type=i.Syntax.ArrayExpression;this.elements=e}return ArrayExpression}();t.ArrayExpression=n;var a=function(){function ArrayPattern(e){this.type=i.Syntax.ArrayPattern;this.elements=e}return ArrayPattern}();t.ArrayPattern=a;var u=function(){function ArrowFunctionExpression(e,t,r){this.type=i.Syntax.ArrowFunctionExpression;this.id=null;this.params=e;this.body=t;this.generator=false;this.expression=r;this.async=false}return ArrowFunctionExpression}();t.ArrowFunctionExpression=u;var s=function(){function AssignmentExpression(e,t,r){this.type=i.Syntax.AssignmentExpression;this.operator=e;this.left=t;this.right=r}return AssignmentExpression}();t.AssignmentExpression=s;var o=function(){function AssignmentPattern(e,t){this.type=i.Syntax.AssignmentPattern;this.left=e;this.right=t}return AssignmentPattern}();t.AssignmentPattern=o;var l=function(){function AsyncArrowFunctionExpression(e,t,r){this.type=i.Syntax.ArrowFunctionExpression;this.id=null;this.params=e;this.body=t;this.generator=false;this.expression=r;this.async=true}return AsyncArrowFunctionExpression}();t.AsyncArrowFunctionExpression=l;var f=function(){function AsyncFunctionDeclaration(e,t,r){this.type=i.Syntax.FunctionDeclaration;this.id=e;this.params=t;this.body=r;this.generator=false;this.expression=false;this.async=true}return AsyncFunctionDeclaration}();t.AsyncFunctionDeclaration=f;var c=function(){function AsyncFunctionExpression(e,t,r){this.type=i.Syntax.FunctionExpression;this.id=e;this.params=t;this.body=r;this.generator=false;this.expression=false;this.async=true}return AsyncFunctionExpression}();t.AsyncFunctionExpression=c;var h=function(){function AwaitExpression(e){this.type=i.Syntax.AwaitExpression;this.argument=e}return AwaitExpression}();t.AwaitExpression=h;var p=function(){function BinaryExpression(e,t,r){var n=e==="||"||e==="&&";this.type=n?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression;this.operator=e;this.left=t;this.right=r}return BinaryExpression}();t.BinaryExpression=p;var v=function(){function BlockStatement(e){this.type=i.Syntax.BlockStatement;this.body=e}return BlockStatement}();t.BlockStatement=v;var d=function(){function BreakStatement(e){this.type=i.Syntax.BreakStatement;this.label=e}return BreakStatement}();t.BreakStatement=d;var D=function(){function CallExpression(e,t){this.type=i.Syntax.CallExpression;this.callee=e;this.arguments=t}return CallExpression}();t.CallExpression=D;var m=function(){function CatchClause(e,t){this.type=i.Syntax.CatchClause;this.param=e;this.body=t}return CatchClause}();t.CatchClause=m;var g=function(){function ClassBody(e){this.type=i.Syntax.ClassBody;this.body=e}return ClassBody}();t.ClassBody=g;var E=function(){function ClassDeclaration(e,t,r){this.type=i.Syntax.ClassDeclaration;this.id=e;this.superClass=t;this.body=r}return ClassDeclaration}();t.ClassDeclaration=E;var A=function(){function ClassExpression(e,t,r){this.type=i.Syntax.ClassExpression;this.id=e;this.superClass=t;this.body=r}return ClassExpression}();t.ClassExpression=A;var C=function(){function ComputedMemberExpression(e,t){this.type=i.Syntax.MemberExpression;this.computed=true;this.object=e;this.property=t}return ComputedMemberExpression}();t.ComputedMemberExpression=C;var y=function(){function ConditionalExpression(e,t,r){this.type=i.Syntax.ConditionalExpression;this.test=e;this.consequent=t;this.alternate=r}return ConditionalExpression}();t.ConditionalExpression=y;var w=function(){function ContinueStatement(e){this.type=i.Syntax.ContinueStatement;this.label=e}return ContinueStatement}();t.ContinueStatement=w;var x=function(){function DebuggerStatement(){this.type=i.Syntax.DebuggerStatement}return DebuggerStatement}();t.DebuggerStatement=x;var b=function(){function Directive(e,t){this.type=i.Syntax.ExpressionStatement;this.expression=e;this.directive=t}return Directive}();t.Directive=b;var F=function(){function DoWhileStatement(e,t){this.type=i.Syntax.DoWhileStatement;this.body=e;this.test=t}return DoWhileStatement}();t.DoWhileStatement=F;var S=function(){function EmptyStatement(){this.type=i.Syntax.EmptyStatement}return EmptyStatement}();t.EmptyStatement=S;var B=function(){function ExportAllDeclaration(e){this.type=i.Syntax.ExportAllDeclaration;this.source=e}return ExportAllDeclaration}();t.ExportAllDeclaration=B;var k=function(){function ExportDefaultDeclaration(e){this.type=i.Syntax.ExportDefaultDeclaration;this.declaration=e}return ExportDefaultDeclaration}();t.ExportDefaultDeclaration=k;var O=function(){function ExportNamedDeclaration(e,t,r){this.type=i.Syntax.ExportNamedDeclaration;this.declaration=e;this.specifiers=t;this.source=r}return ExportNamedDeclaration}();t.ExportNamedDeclaration=O;var P=function(){function ExportSpecifier(e,t){this.type=i.Syntax.ExportSpecifier;this.exported=t;this.local=e}return ExportSpecifier}();t.ExportSpecifier=P;var T=function(){function ExpressionStatement(e){this.type=i.Syntax.ExpressionStatement;this.expression=e}return ExpressionStatement}();t.ExpressionStatement=T;var I=function(){function ForInStatement(e,t,r){this.type=i.Syntax.ForInStatement;this.left=e;this.right=t;this.body=r;this.each=false}return ForInStatement}();t.ForInStatement=I;var M=function(){function ForOfStatement(e,t,r){this.type=i.Syntax.ForOfStatement;this.left=e;this.right=t;this.body=r}return ForOfStatement}();t.ForOfStatement=M;var L=function(){function ForStatement(e,t,r,n){this.type=i.Syntax.ForStatement;this.init=e;this.test=t;this.update=r;this.body=n}return ForStatement}();t.ForStatement=L;var j=function(){function FunctionDeclaration(e,t,r,n){this.type=i.Syntax.FunctionDeclaration;this.id=e;this.params=t;this.body=r;this.generator=n;this.expression=false;this.async=false}return FunctionDeclaration}();t.FunctionDeclaration=j;var R=function(){function FunctionExpression(e,t,r,n){this.type=i.Syntax.FunctionExpression;this.id=e;this.params=t;this.body=r;this.generator=n;this.expression=false;this.async=false}return FunctionExpression}();t.FunctionExpression=R;var U=function(){function Identifier(e){this.type=i.Syntax.Identifier;this.name=e}return Identifier}();t.Identifier=U;var N=function(){function IfStatement(e,t,r){this.type=i.Syntax.IfStatement;this.test=e;this.consequent=t;this.alternate=r}return IfStatement}();t.IfStatement=N;var J=function(){function ImportDeclaration(e,t){this.type=i.Syntax.ImportDeclaration;this.specifiers=e;this.source=t}return ImportDeclaration}();t.ImportDeclaration=J;var z=function(){function ImportDefaultSpecifier(e){this.type=i.Syntax.ImportDefaultSpecifier;this.local=e}return ImportDefaultSpecifier}();t.ImportDefaultSpecifier=z;var X=function(){function ImportNamespaceSpecifier(e){this.type=i.Syntax.ImportNamespaceSpecifier;this.local=e}return ImportNamespaceSpecifier}();t.ImportNamespaceSpecifier=X;var G=function(){function ImportSpecifier(e,t){this.type=i.Syntax.ImportSpecifier;this.local=e;this.imported=t}return ImportSpecifier}();t.ImportSpecifier=G;var q=function(){function LabeledStatement(e,t){this.type=i.Syntax.LabeledStatement;this.label=e;this.body=t}return LabeledStatement}();t.LabeledStatement=q;var W=function(){function Literal(e,t){this.type=i.Syntax.Literal;this.value=e;this.raw=t}return Literal}();t.Literal=W;var _=function(){function MetaProperty(e,t){this.type=i.Syntax.MetaProperty;this.meta=e;this.property=t}return MetaProperty}();t.MetaProperty=_;var V=function(){function MethodDefinition(e,t,r,n,a){this.type=i.Syntax.MethodDefinition;this.key=e;this.computed=t;this.value=r;this.kind=n;this.static=a}return MethodDefinition}();t.MethodDefinition=V;var Y=function(){function Module(e){this.type=i.Syntax.Program;this.body=e;this.sourceType="module"}return Module}();t.Module=Y;var H=function(){function NewExpression(e,t){this.type=i.Syntax.NewExpression;this.callee=e;this.arguments=t}return NewExpression}();t.NewExpression=H;var $=function(){function ObjectExpression(e){this.type=i.Syntax.ObjectExpression;this.properties=e}return ObjectExpression}();t.ObjectExpression=$;var Z=function(){function ObjectPattern(e){this.type=i.Syntax.ObjectPattern;this.properties=e}return ObjectPattern}();t.ObjectPattern=Z;var Q=function(){function Property(e,t,r,n,a,u){this.type=i.Syntax.Property;this.key=t;this.computed=r;this.value=n;this.kind=e;this.method=a;this.shorthand=u}return Property}();t.Property=Q;var K=function(){function RegexLiteral(e,t,r,n){this.type=i.Syntax.Literal;this.value=e;this.raw=t;this.regex={pattern:r,flags:n}}return RegexLiteral}();t.RegexLiteral=K;var ee=function(){function RestElement(e){this.type=i.Syntax.RestElement;this.argument=e}return RestElement}();t.RestElement=ee;var te=function(){function ReturnStatement(e){this.type=i.Syntax.ReturnStatement;this.argument=e}return ReturnStatement}();t.ReturnStatement=te;var re=function(){function Script(e){this.type=i.Syntax.Program;this.body=e;this.sourceType="script"}return Script}();t.Script=re;var ie=function(){function SequenceExpression(e){this.type=i.Syntax.SequenceExpression;this.expressions=e}return SequenceExpression}();t.SequenceExpression=ie;var ne=function(){function SpreadElement(e){this.type=i.Syntax.SpreadElement;this.argument=e}return SpreadElement}();t.SpreadElement=ne;var ae=function(){function StaticMemberExpression(e,t){this.type=i.Syntax.MemberExpression;this.computed=false;this.object=e;this.property=t}return StaticMemberExpression}();t.StaticMemberExpression=ae;var ue=function(){function Super(){this.type=i.Syntax.Super}return Super}();t.Super=ue;var se=function(){function SwitchCase(e,t){this.type=i.Syntax.SwitchCase;this.test=e;this.consequent=t}return SwitchCase}();t.SwitchCase=se;var oe=function(){function SwitchStatement(e,t){this.type=i.Syntax.SwitchStatement;this.discriminant=e;this.cases=t}return SwitchStatement}();t.SwitchStatement=oe;var le=function(){function TaggedTemplateExpression(e,t){this.type=i.Syntax.TaggedTemplateExpression;this.tag=e;this.quasi=t}return TaggedTemplateExpression}();t.TaggedTemplateExpression=le;var fe=function(){function TemplateElement(e,t){this.type=i.Syntax.TemplateElement;this.value=e;this.tail=t}return TemplateElement}();t.TemplateElement=fe;var ce=function(){function TemplateLiteral(e,t){this.type=i.Syntax.TemplateLiteral;this.quasis=e;this.expressions=t}return TemplateLiteral}();t.TemplateLiteral=ce;var he=function(){function ThisExpression(){this.type=i.Syntax.ThisExpression}return ThisExpression}();t.ThisExpression=he;var pe=function(){function ThrowStatement(e){this.type=i.Syntax.ThrowStatement;this.argument=e}return ThrowStatement}();t.ThrowStatement=pe;var ve=function(){function TryStatement(e,t,r){this.type=i.Syntax.TryStatement;this.block=e;this.handler=t;this.finalizer=r}return TryStatement}();t.TryStatement=ve;var de=function(){function UnaryExpression(e,t){this.type=i.Syntax.UnaryExpression;this.operator=e;this.argument=t;this.prefix=true}return UnaryExpression}();t.UnaryExpression=de;var De=function(){function UpdateExpression(e,t,r){this.type=i.Syntax.UpdateExpression;this.operator=e;this.argument=t;this.prefix=r}return UpdateExpression}();t.UpdateExpression=De;var me=function(){function VariableDeclaration(e,t){this.type=i.Syntax.VariableDeclaration;this.declarations=e;this.kind=t}return VariableDeclaration}();t.VariableDeclaration=me;var ge=function(){function VariableDeclarator(e,t){this.type=i.Syntax.VariableDeclarator;this.id=e;this.init=t}return VariableDeclarator}();t.VariableDeclarator=ge;var Ee=function(){function WhileStatement(e,t){this.type=i.Syntax.WhileStatement;this.test=e;this.body=t}return WhileStatement}();t.WhileStatement=Ee;var Ae=function(){function WithStatement(e,t){this.type=i.Syntax.WithStatement;this.object=e;this.body=t}return WithStatement}();t.WithStatement=Ae;var Ce=function(){function YieldExpression(e,t){this.type=i.Syntax.YieldExpression;this.argument=e;this.delegate=t}return YieldExpression}();t.YieldExpression=Ce},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(9);var n=r(10);var a=r(11);var u=r(7);var s=r(12);var o=r(2);var l=r(13);var f="ArrowParameterPlaceHolder";var c=function(){function Parser(e,t,r){if(t===void 0){t={}}this.config={range:typeof t.range==="boolean"&&t.range,loc:typeof t.loc==="boolean"&&t.loc,source:null,tokens:typeof t.tokens==="boolean"&&t.tokens,comment:typeof t.comment==="boolean"&&t.comment,tolerant:typeof t.tolerant==="boolean"&&t.tolerant};if(this.config.loc&&t.source&&t.source!==null){this.config.source=String(t.source)}this.delegate=r;this.errorHandler=new n.ErrorHandler;this.errorHandler.tolerant=this.config.tolerant;this.scanner=new s.Scanner(e,this.errorHandler);this.scanner.trackComment=this.config.comment;this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11};this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0};this.hasLineTerminator=false;this.context={isModule:false,await:false,allowIn:true,allowStrictDirective:true,allowYield:true,firstCoverInitializedNameError:null,isAssignmentTarget:false,isBindingElement:false,inFunctionBody:false,inIteration:false,inSwitch:false,labelSet:{},strict:false};this.tokens=[];this.startMarker={index:0,line:this.scanner.lineNumber,column:0};this.lastMarker={index:0,line:this.scanner.lineNumber,column:0};this.nextToken();this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}Parser.prototype.throwError=function(e){var t=[];for(var r=1;r0&&this.delegate){for(var t=0;t>="||e===">>>="||e==="&="||e==="^="||e==="|="};Parser.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement;var r=this.context.isAssignmentTarget;var i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=true;this.context.isAssignmentTarget=true;this.context.firstCoverInitializedNameError=null;var n=e.call(this);if(this.context.firstCoverInitializedNameError!==null){this.throwUnexpectedToken(this.context.firstCoverInitializedNameError)}this.context.isBindingElement=t;this.context.isAssignmentTarget=r;this.context.firstCoverInitializedNameError=i;return n};Parser.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement;var r=this.context.isAssignmentTarget;var i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=true;this.context.isAssignmentTarget=true;this.context.firstCoverInitializedNameError=null;var n=e.call(this);this.context.isBindingElement=this.context.isBindingElement&&t;this.context.isAssignmentTarget=this.context.isAssignmentTarget&&r;this.context.firstCoverInitializedNameError=i||this.context.firstCoverInitializedNameError;return n};Parser.prototype.consumeSemicolon=function(){if(this.match(";")){this.nextToken()}else if(!this.hasLineTerminator){if(this.lookahead.type!==2&&!this.match("}")){this.throwUnexpectedToken(this.lookahead)}this.lastMarker.index=this.startMarker.index;this.lastMarker.line=this.startMarker.line;this.lastMarker.column=this.startMarker.column}};Parser.prototype.parsePrimaryExpression=function(){var e=this.createNode();var t;var r,i;switch(this.lookahead.type){case 3:if((this.context.isModule||this.context.await)&&this.lookahead.value==="await"){this.tolerateUnexpectedToken(this.lookahead)}t=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(e,new u.Identifier(this.nextToken().value));break;case 6:case 8:if(this.context.strict&&this.lookahead.octal){this.tolerateUnexpectedToken(this.lookahead,a.Messages.StrictOctalLiteral)}this.context.isAssignmentTarget=false;this.context.isBindingElement=false;r=this.nextToken();i=this.getTokenRaw(r);t=this.finalize(e,new u.Literal(r.value,i));break;case 1:this.context.isAssignmentTarget=false;this.context.isBindingElement=false;r=this.nextToken();i=this.getTokenRaw(r);t=this.finalize(e,new u.Literal(r.value==="true",i));break;case 5:this.context.isAssignmentTarget=false;this.context.isBindingElement=false;r=this.nextToken();i=this.getTokenRaw(r);t=this.finalize(e,new u.Literal(null,i));break;case 10:t=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=false;t=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":t=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":t=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=false;this.context.isBindingElement=false;this.scanner.index=this.startMarker.index;r=this.nextRegexToken();i=this.getTokenRaw(r);t=this.finalize(e,new u.RegexLiteral(r.regex,i,r.pattern,r.flags));break;default:t=this.throwUnexpectedToken(this.nextToken())}break;case 4:if(!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")){t=this.parseIdentifierName()}else if(!this.context.strict&&this.matchKeyword("let")){t=this.finalize(e,new u.Identifier(this.nextToken().value))}else{this.context.isAssignmentTarget=false;this.context.isBindingElement=false;if(this.matchKeyword("function")){t=this.parseFunctionExpression()}else if(this.matchKeyword("this")){this.nextToken();t=this.finalize(e,new u.ThisExpression)}else if(this.matchKeyword("class")){t=this.parseClassExpression()}else{t=this.throwUnexpectedToken(this.nextToken())}}break;default:t=this.throwUnexpectedToken(this.nextToken())}return t};Parser.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new u.SpreadElement(t))};Parser.prototype.parseArrayInitializer=function(){var e=this.createNode();var t=[];this.expect("[");while(!this.match("]")){if(this.match(",")){this.nextToken();t.push(null)}else if(this.match("...")){var r=this.parseSpreadElement();if(!this.match("]")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;this.expect(",")}t.push(r)}else{t.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(!this.match("]")){this.expect(",")}}}this.expect("]");return this.finalize(e,new u.ArrayExpression(t))};Parser.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var t=this.context.strict;var r=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var i=this.isolateCoverGrammar(this.parseFunctionSourceElements);if(this.context.strict&&e.firstRestricted){this.tolerateUnexpectedToken(e.firstRestricted,e.message)}if(this.context.strict&&e.stricted){this.tolerateUnexpectedToken(e.stricted,e.message)}this.context.strict=t;this.context.allowStrictDirective=r;return i};Parser.prototype.parsePropertyMethodFunction=function(){var e=false;var t=this.createNode();var r=this.context.allowYield;this.context.allowYield=true;var i=this.parseFormalParameters();var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(t,new u.FunctionExpression(null,i.params,n,e))};Parser.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode();var t=this.context.allowYield;var r=this.context.await;this.context.allowYield=false;this.context.await=true;var i=this.parseFormalParameters();var n=this.parsePropertyMethod(i);this.context.allowYield=t;this.context.await=r;return this.finalize(e,new u.AsyncFunctionExpression(null,i.params,n))};Parser.prototype.parseObjectPropertyKey=function(){var e=this.createNode();var t=this.nextToken();var r;switch(t.type){case 8:case 6:if(this.context.strict&&t.octal){this.tolerateUnexpectedToken(t,a.Messages.StrictOctalLiteral)}var i=this.getTokenRaw(t);r=this.finalize(e,new u.Literal(t.value,i));break;case 3:case 1:case 5:case 4:r=this.finalize(e,new u.Identifier(t.value));break;case 7:if(t.value==="["){r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.expect("]")}else{r=this.throwUnexpectedToken(t)}break;default:r=this.throwUnexpectedToken(t)}return r};Parser.prototype.isPropertyKey=function(e,t){return e.type===o.Syntax.Identifier&&e.name===t||e.type===o.Syntax.Literal&&e.value===t};Parser.prototype.parseObjectProperty=function(e){var t=this.createNode();var r=this.lookahead;var i;var n=null;var s=null;var o=false;var l=false;var f=false;var c=false;if(r.type===3){var h=r.value;this.nextToken();o=this.match("[");c=!this.hasLineTerminator&&h==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(",");n=c?this.parseObjectPropertyKey():this.finalize(t,new u.Identifier(h))}else if(this.match("*")){this.nextToken()}else{o=this.match("[");n=this.parseObjectPropertyKey()}var p=this.qualifiedPropertyName(this.lookahead);if(r.type===3&&!c&&r.value==="get"&&p){i="get";o=this.match("[");n=this.parseObjectPropertyKey();this.context.allowYield=false;s=this.parseGetterMethod()}else if(r.type===3&&!c&&r.value==="set"&&p){i="set";o=this.match("[");n=this.parseObjectPropertyKey();s=this.parseSetterMethod()}else if(r.type===7&&r.value==="*"&&p){i="init";o=this.match("[");n=this.parseObjectPropertyKey();s=this.parseGeneratorMethod();l=true}else{if(!n){this.throwUnexpectedToken(this.lookahead)}i="init";if(this.match(":")&&!c){if(!o&&this.isPropertyKey(n,"__proto__")){if(e.value){this.tolerateError(a.Messages.DuplicateProtoProperty)}e.value=true}this.nextToken();s=this.inheritCoverGrammar(this.parseAssignmentExpression)}else if(this.match("(")){s=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction();l=true}else if(r.type===3){var h=this.finalize(t,new u.Identifier(r.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead;this.nextToken();f=true;var v=this.isolateCoverGrammar(this.parseAssignmentExpression);s=this.finalize(t,new u.AssignmentPattern(h,v))}else{f=true;s=h}}else{this.throwUnexpectedToken(this.nextToken())}}return this.finalize(t,new u.Property(i,n,o,s,l,f))};Parser.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");var t=[];var r={value:false};while(!this.match("}")){t.push(this.parseObjectProperty(r));if(!this.match("}")){this.expectCommaSeparator()}}this.expect("}");return this.finalize(e,new u.ObjectExpression(t))};Parser.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode();var t=this.nextToken();var r=t.value;var n=t.cooked;return this.finalize(e,new u.TemplateElement({raw:r,cooked:n},t.tail))};Parser.prototype.parseTemplateElement=function(){if(this.lookahead.type!==10){this.throwUnexpectedToken()}var e=this.createNode();var t=this.nextToken();var r=t.value;var i=t.cooked;return this.finalize(e,new u.TemplateElement({raw:r,cooked:i},t.tail))};Parser.prototype.parseTemplateLiteral=function(){var e=this.createNode();var t=[];var r=[];var i=this.parseTemplateHead();r.push(i);while(!i.tail){t.push(this.parseExpression());i=this.parseTemplateElement();r.push(i)}return this.finalize(e,new u.TemplateLiteral(r,t))};Parser.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case o.Syntax.Identifier:case o.Syntax.MemberExpression:case o.Syntax.RestElement:case o.Syntax.AssignmentPattern:break;case o.Syntax.SpreadElement:e.type=o.Syntax.RestElement;this.reinterpretExpressionAsPattern(e.argument);break;case o.Syntax.ArrayExpression:e.type=o.Syntax.ArrayPattern;for(var t=0;t")){this.expect("=>")}e={type:f,params:[],async:false}}else{var t=this.lookahead;var r=[];if(this.match("...")){e=this.parseRestElement(r);this.expect(")");if(!this.match("=>")){this.expect("=>")}e={type:f,params:[e],async:false}}else{var i=false;this.context.isBindingElement=true;e=this.inheritCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];this.context.isAssignmentTarget=false;n.push(e);while(this.lookahead.type!==2){if(!this.match(",")){break}this.nextToken();if(this.match(")")){this.nextToken();for(var a=0;a")){this.expect("=>")}this.context.isBindingElement=false;for(var a=0;a")){if(e.type===o.Syntax.Identifier&&e.name==="yield"){i=true;e={type:f,params:[e],async:false}}if(!i){if(!this.context.isBindingElement){this.throwUnexpectedToken(this.lookahead)}if(e.type===o.Syntax.SequenceExpression){for(var a=0;a")){for(var o=0;o0){this.nextToken();this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var n=[e,this.lookahead];var a=t;var s=this.isolateCoverGrammar(this.parseExponentiationExpression);var o=[a,r.value,s];var l=[i];while(true){i=this.binaryPrecedence(this.lookahead);if(i<=0){break}while(o.length>2&&i<=l[l.length-1]){s=o.pop();var f=o.pop();l.pop();a=o.pop();n.pop();var c=this.startNode(n[n.length-1]);o.push(this.finalize(c,new u.BinaryExpression(f,a,s)))}o.push(this.nextToken().value);l.push(i);n.push(this.lookahead);o.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var h=o.length-1;t=o[h];var p=n.pop();while(h>1){var v=n.pop();var d=p&&p.lineStart;var c=this.startNode(v,d);var f=o[h-1];t=this.finalize(c,new u.BinaryExpression(f,o[h-2],t));h-=2;p=v}}return t};Parser.prototype.parseConditionalExpression=function(){var e=this.lookahead;var t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var r=this.context.allowIn;this.context.allowIn=true;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=r;this.expect(":");var n=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new u.ConditionalExpression(t,i,n));this.context.isAssignmentTarget=false;this.context.isBindingElement=false}return t};Parser.prototype.checkPatternParam=function(e,t){switch(t.type){case o.Syntax.Identifier:this.validateParam(e,t,t.name);break;case o.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case o.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case o.Syntax.ArrayPattern:for(var r=0;r")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false;var n=e.async;var s=this.reinterpretAsCoverFormalsList(e);if(s){if(this.hasLineTerminator){this.tolerateUnexpectedToken(this.lookahead)}this.context.firstCoverInitializedNameError=null;var l=this.context.strict;var c=this.context.allowStrictDirective;this.context.allowStrictDirective=s.simple;var h=this.context.allowYield;var p=this.context.await;this.context.allowYield=true;this.context.await=n;var v=this.startNode(t);this.expect("=>");var d=void 0;if(this.match("{")){var D=this.context.allowIn;this.context.allowIn=true;d=this.parseFunctionSourceElements();this.context.allowIn=D}else{d=this.isolateCoverGrammar(this.parseAssignmentExpression)}var m=d.type!==o.Syntax.BlockStatement;if(this.context.strict&&s.firstRestricted){this.throwUnexpectedToken(s.firstRestricted,s.message)}if(this.context.strict&&s.stricted){this.tolerateUnexpectedToken(s.stricted,s.message)}e=n?this.finalize(v,new u.AsyncArrowFunctionExpression(s.params,d,m)):this.finalize(v,new u.ArrowFunctionExpression(s.params,d,m));this.context.strict=l;this.context.allowStrictDirective=c;this.context.allowYield=h;this.context.await=p}}else{if(this.matchAssign()){if(!this.context.isAssignmentTarget){this.tolerateError(a.Messages.InvalidLHSInAssignment)}if(this.context.strict&&e.type===o.Syntax.Identifier){var g=e;if(this.scanner.isRestrictedWord(g.name)){this.tolerateUnexpectedToken(r,a.Messages.StrictLHSAssignment)}if(this.scanner.isStrictModeReservedWord(g.name)){this.tolerateUnexpectedToken(r,a.Messages.StrictReservedWord)}}if(!this.match("=")){this.context.isAssignmentTarget=false;this.context.isBindingElement=false}else{this.reinterpretExpressionAsPattern(e)}r=this.nextToken();var E=r.value;var A=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new u.AssignmentExpression(E,e,A));this.context.firstCoverInitializedNameError=null}}}return e};Parser.prototype.parseExpression=function(){var e=this.lookahead;var t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var r=[];r.push(t);while(this.lookahead.type!==2){if(!this.match(",")){break}this.nextToken();r.push(this.isolateCoverGrammar(this.parseAssignmentExpression))}t=this.finalize(this.startNode(e),new u.SequenceExpression(r))}return t};Parser.prototype.parseStatementListItem=function(){var e;this.context.isAssignmentTarget=true;this.context.isBindingElement=true;if(this.lookahead.type===4){switch(this.lookahead.value){case"export":if(!this.context.isModule){this.tolerateUnexpectedToken(this.lookahead,a.Messages.IllegalExportDeclaration)}e=this.parseExportDeclaration();break;case"import":if(!this.context.isModule){this.tolerateUnexpectedToken(this.lookahead,a.Messages.IllegalImportDeclaration)}e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:false});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:false}):this.parseStatement();break;default:e=this.parseStatement();break}}else{e=this.parseStatement()}return e};Parser.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");var t=[];while(true){if(this.match("}")){break}t.push(this.parseStatementListItem())}this.expect("}");return this.finalize(e,new u.BlockStatement(t))};Parser.prototype.parseLexicalBinding=function(e,t){var r=this.createNode();var i=[];var n=this.parsePattern(i,e);if(this.context.strict&&n.type===o.Syntax.Identifier){if(this.scanner.isRestrictedWord(n.name)){this.tolerateError(a.Messages.StrictVarName)}}var s=null;if(e==="const"){if(!this.matchKeyword("in")&&!this.matchContextualKeyword("of")){if(this.match("=")){this.nextToken();s=this.isolateCoverGrammar(this.parseAssignmentExpression)}else{this.throwError(a.Messages.DeclarationMissingInitializer,"const")}}}else if(!t.inFor&&n.type!==o.Syntax.Identifier||this.match("=")){this.expect("=");s=this.isolateCoverGrammar(this.parseAssignmentExpression)}return this.finalize(r,new u.VariableDeclarator(n,s))};Parser.prototype.parseBindingList=function(e,t){var r=[this.parseLexicalBinding(e,t)];while(this.match(",")){this.nextToken();r.push(this.parseLexicalBinding(e,t))}return r};Parser.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();this.scanner.restoreState(e);return t.type===3||t.type===7&&t.value==="["||t.type===7&&t.value==="{"||t.type===4&&t.value==="let"||t.type===4&&t.value==="yield"};Parser.prototype.parseLexicalDeclaration=function(e){var t=this.createNode();var r=this.nextToken().value;i.assert(r==="let"||r==="const","Lexical declaration must be either let or const");var n=this.parseBindingList(r,e);this.consumeSemicolon();return this.finalize(t,new u.VariableDeclaration(n,r))};Parser.prototype.parseBindingRestElement=function(e,t){var r=this.createNode();this.expect("...");var i=this.parsePattern(e,t);return this.finalize(r,new u.RestElement(i))};Parser.prototype.parseArrayPattern=function(e,t){var r=this.createNode();this.expect("[");var i=[];while(!this.match("]")){if(this.match(",")){this.nextToken();i.push(null)}else{if(this.match("...")){i.push(this.parseBindingRestElement(e,t));break}else{i.push(this.parsePatternWithDefault(e,t))}if(!this.match("]")){this.expect(",")}}}this.expect("]");return this.finalize(r,new u.ArrayPattern(i))};Parser.prototype.parsePropertyPattern=function(e,t){var r=this.createNode();var i=false;var n=false;var a=false;var s;var o;if(this.lookahead.type===3){var l=this.lookahead;s=this.parseVariableIdentifier();var f=this.finalize(r,new u.Identifier(l.value));if(this.match("=")){e.push(l);n=true;this.nextToken();var c=this.parseAssignmentExpression();o=this.finalize(this.startNode(l),new u.AssignmentPattern(f,c))}else if(!this.match(":")){e.push(l);n=true;o=f}else{this.expect(":");o=this.parsePatternWithDefault(e,t)}}else{i=this.match("[");s=this.parseObjectPropertyKey();this.expect(":");o=this.parsePatternWithDefault(e,t)}return this.finalize(r,new u.Property("init",s,i,o,a,n))};Parser.prototype.parseObjectPattern=function(e,t){var r=this.createNode();var i=[];this.expect("{");while(!this.match("}")){i.push(this.parsePropertyPattern(e,t));if(!this.match("}")){this.expect(",")}}this.expect("}");return this.finalize(r,new u.ObjectPattern(i))};Parser.prototype.parsePattern=function(e,t){var r;if(this.match("[")){r=this.parseArrayPattern(e,t)}else if(this.match("{")){r=this.parseObjectPattern(e,t)}else{if(this.matchKeyword("let")&&(t==="const"||t==="let")){this.tolerateUnexpectedToken(this.lookahead,a.Messages.LetInLexicalBinding)}e.push(this.lookahead);r=this.parseVariableIdentifier(t)}return r};Parser.prototype.parsePatternWithDefault=function(e,t){var r=this.lookahead;var i=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var n=this.context.allowYield;this.context.allowYield=true;var a=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=n;i=this.finalize(this.startNode(r),new u.AssignmentPattern(i,a))}return i};Parser.prototype.parseVariableIdentifier=function(e){var t=this.createNode();var r=this.nextToken();if(r.type===4&&r.value==="yield"){if(this.context.strict){this.tolerateUnexpectedToken(r,a.Messages.StrictReservedWord)}else if(!this.context.allowYield){this.throwUnexpectedToken(r)}}else if(r.type!==3){if(this.context.strict&&r.type===4&&this.scanner.isStrictModeReservedWord(r.value)){this.tolerateUnexpectedToken(r,a.Messages.StrictReservedWord)}else{if(this.context.strict||r.value!=="let"||e!=="var"){this.throwUnexpectedToken(r)}}}else if((this.context.isModule||this.context.await)&&r.type===3&&r.value==="await"){this.tolerateUnexpectedToken(r)}return this.finalize(t,new u.Identifier(r.value))};Parser.prototype.parseVariableDeclaration=function(e){var t=this.createNode();var r=[];var i=this.parsePattern(r,"var");if(this.context.strict&&i.type===o.Syntax.Identifier){if(this.scanner.isRestrictedWord(i.name)){this.tolerateError(a.Messages.StrictVarName)}}var n=null;if(this.match("=")){this.nextToken();n=this.isolateCoverGrammar(this.parseAssignmentExpression)}else if(i.type!==o.Syntax.Identifier&&!e.inFor){this.expect("=")}return this.finalize(t,new u.VariableDeclarator(i,n))};Parser.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor};var r=[];r.push(this.parseVariableDeclaration(t));while(this.match(",")){this.nextToken();r.push(this.parseVariableDeclaration(t))}return r};Parser.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:false});this.consumeSemicolon();return this.finalize(e,new u.VariableDeclaration(t,"var"))};Parser.prototype.parseEmptyStatement=function(){var e=this.createNode();this.expect(";");return this.finalize(e,new u.EmptyStatement)};Parser.prototype.parseExpressionStatement=function(){var e=this.createNode();var t=this.parseExpression();this.consumeSemicolon();return this.finalize(e,new u.ExpressionStatement(t))};Parser.prototype.parseIfClause=function(){if(this.context.strict&&this.matchKeyword("function")){this.tolerateError(a.Messages.StrictFunction)}return this.parseStatement()};Parser.prototype.parseIfStatement=function(){var e=this.createNode();var t;var r=null;this.expectKeyword("if");this.expect("(");var i=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());t=this.finalize(this.createNode(),new u.EmptyStatement)}else{this.expect(")");t=this.parseIfClause();if(this.matchKeyword("else")){this.nextToken();r=this.parseIfClause()}}return this.finalize(e,new u.IfStatement(i,t,r))};Parser.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=true;var r=this.parseStatement();this.context.inIteration=t;this.expectKeyword("while");this.expect("(");var i=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken())}else{this.expect(")");if(this.match(";")){this.nextToken()}}return this.finalize(e,new u.DoWhileStatement(r,i))};Parser.prototype.parseWhileStatement=function(){var e=this.createNode();var t;this.expectKeyword("while");this.expect("(");var r=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());t=this.finalize(this.createNode(),new u.EmptyStatement)}else{this.expect(")");var i=this.context.inIteration;this.context.inIteration=true;t=this.parseStatement();this.context.inIteration=i}return this.finalize(e,new u.WhileStatement(r,t))};Parser.prototype.parseForStatement=function(){var e=null;var t=null;var r=null;var i=true;var n,s;var l=this.createNode();this.expectKeyword("for");this.expect("(");if(this.match(";")){this.nextToken()}else{if(this.matchKeyword("var")){e=this.createNode();this.nextToken();var f=this.context.allowIn;this.context.allowIn=false;var c=this.parseVariableDeclarationList({inFor:true});this.context.allowIn=f;if(c.length===1&&this.matchKeyword("in")){var h=c[0];if(h.init&&(h.id.type===o.Syntax.ArrayPattern||h.id.type===o.Syntax.ObjectPattern||this.context.strict)){this.tolerateError(a.Messages.ForInOfLoopInitializer,"for-in")}e=this.finalize(e,new u.VariableDeclaration(c,"var"));this.nextToken();n=e;s=this.parseExpression();e=null}else if(c.length===1&&c[0].init===null&&this.matchContextualKeyword("of")){e=this.finalize(e,new u.VariableDeclaration(c,"var"));this.nextToken();n=e;s=this.parseAssignmentExpression();e=null;i=false}else{e=this.finalize(e,new u.VariableDeclaration(c,"var"));this.expect(";")}}else if(this.matchKeyword("const")||this.matchKeyword("let")){e=this.createNode();var p=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in"){e=this.finalize(e,new u.Identifier(p));this.nextToken();n=e;s=this.parseExpression();e=null}else{var f=this.context.allowIn;this.context.allowIn=false;var c=this.parseBindingList(p,{inFor:true});this.context.allowIn=f;if(c.length===1&&c[0].init===null&&this.matchKeyword("in")){e=this.finalize(e,new u.VariableDeclaration(c,p));this.nextToken();n=e;s=this.parseExpression();e=null}else if(c.length===1&&c[0].init===null&&this.matchContextualKeyword("of")){e=this.finalize(e,new u.VariableDeclaration(c,p));this.nextToken();n=e;s=this.parseAssignmentExpression();e=null;i=false}else{this.consumeSemicolon();e=this.finalize(e,new u.VariableDeclaration(c,p))}}}else{var v=this.lookahead;var f=this.context.allowIn;this.context.allowIn=false;e=this.inheritCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=f;if(this.matchKeyword("in")){if(!this.context.isAssignmentTarget||e.type===o.Syntax.AssignmentExpression){this.tolerateError(a.Messages.InvalidLHSInForIn)}this.nextToken();this.reinterpretExpressionAsPattern(e);n=e;s=this.parseExpression();e=null}else if(this.matchContextualKeyword("of")){if(!this.context.isAssignmentTarget||e.type===o.Syntax.AssignmentExpression){this.tolerateError(a.Messages.InvalidLHSInForLoop)}this.nextToken();this.reinterpretExpressionAsPattern(e);n=e;s=this.parseAssignmentExpression();e=null;i=false}else{if(this.match(",")){var d=[e];while(this.match(",")){this.nextToken();d.push(this.isolateCoverGrammar(this.parseAssignmentExpression))}e=this.finalize(this.startNode(v),new u.SequenceExpression(d))}this.expect(";")}}}if(typeof n==="undefined"){if(!this.match(";")){t=this.parseExpression()}this.expect(";");if(!this.match(")")){r=this.parseExpression()}}var D;if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());D=this.finalize(this.createNode(),new u.EmptyStatement)}else{this.expect(")");var m=this.context.inIteration;this.context.inIteration=true;D=this.isolateCoverGrammar(this.parseStatement);this.context.inIteration=m}return typeof n==="undefined"?this.finalize(l,new u.ForStatement(e,t,r,D)):i?this.finalize(l,new u.ForInStatement(n,s,D)):this.finalize(l,new u.ForOfStatement(n,s,D))};Parser.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var r=this.parseVariableIdentifier();t=r;var i="$"+r.name;if(!Object.prototype.hasOwnProperty.call(this.context.labelSet,i)){this.throwError(a.Messages.UnknownLabel,r.name)}}this.consumeSemicolon();if(t===null&&!this.context.inIteration){this.throwError(a.Messages.IllegalContinue)}return this.finalize(e,new u.ContinueStatement(t))};Parser.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var r=this.parseVariableIdentifier();var i="$"+r.name;if(!Object.prototype.hasOwnProperty.call(this.context.labelSet,i)){this.throwError(a.Messages.UnknownLabel,r.name)}t=r}this.consumeSemicolon();if(t===null&&!this.context.inIteration&&!this.context.inSwitch){this.throwError(a.Messages.IllegalBreak)}return this.finalize(e,new u.BreakStatement(t))};Parser.prototype.parseReturnStatement=function(){if(!this.context.inFunctionBody){this.tolerateError(a.Messages.IllegalReturn)}var e=this.createNode();this.expectKeyword("return");var t=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10;var r=t?this.parseExpression():null;this.consumeSemicolon();return this.finalize(e,new u.ReturnStatement(r))};Parser.prototype.parseWithStatement=function(){if(this.context.strict){this.tolerateError(a.Messages.StrictModeWith)}var e=this.createNode();var t;this.expectKeyword("with");this.expect("(");var r=this.parseExpression();if(!this.match(")")&&this.config.tolerant){this.tolerateUnexpectedToken(this.nextToken());t=this.finalize(this.createNode(),new u.EmptyStatement)}else{this.expect(")");t=this.parseStatement()}return this.finalize(e,new u.WithStatement(r,t))};Parser.prototype.parseSwitchCase=function(){var e=this.createNode();var t;if(this.matchKeyword("default")){this.nextToken();t=null}else{this.expectKeyword("case");t=this.parseExpression()}this.expect(":");var r=[];while(true){if(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case")){break}r.push(this.parseStatementListItem())}return this.finalize(e,new u.SwitchCase(t,r))};Parser.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch");this.expect("(");var t=this.parseExpression();this.expect(")");var r=this.context.inSwitch;this.context.inSwitch=true;var i=[];var n=false;this.expect("{");while(true){if(this.match("}")){break}var s=this.parseSwitchCase();if(s.test===null){if(n){this.throwError(a.Messages.MultipleDefaultsInSwitch)}n=true}i.push(s)}this.expect("}");this.context.inSwitch=r;return this.finalize(e,new u.SwitchStatement(t,i))};Parser.prototype.parseLabelledStatement=function(){var e=this.createNode();var t=this.parseExpression();var r;if(t.type===o.Syntax.Identifier&&this.match(":")){this.nextToken();var i=t;var n="$"+i.name;if(Object.prototype.hasOwnProperty.call(this.context.labelSet,n)){this.throwError(a.Messages.Redeclaration,"Label",i.name)}this.context.labelSet[n]=true;var s=void 0;if(this.matchKeyword("class")){this.tolerateUnexpectedToken(this.lookahead);s=this.parseClassDeclaration()}else if(this.matchKeyword("function")){var l=this.lookahead;var f=this.parseFunctionDeclaration();if(this.context.strict){this.tolerateUnexpectedToken(l,a.Messages.StrictFunction)}else if(f.generator){this.tolerateUnexpectedToken(l,a.Messages.GeneratorInLegacyContext)}s=f}else{s=this.parseStatement()}delete this.context.labelSet[n];r=new u.LabeledStatement(i,s)}else{this.consumeSemicolon();r=new u.ExpressionStatement(t)}return this.finalize(e,r)};Parser.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw");if(this.hasLineTerminator){this.throwError(a.Messages.NewlineAfterThrow)}var t=this.parseExpression();this.consumeSemicolon();return this.finalize(e,new u.ThrowStatement(t))};Parser.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch");this.expect("(");if(this.match(")")){this.throwUnexpectedToken(this.lookahead)}var t=[];var r=this.parsePattern(t);var i={};for(var n=0;n0){this.tolerateError(a.Messages.BadGetterArity)}var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(e,new u.FunctionExpression(null,i.params,n,t))};Parser.prototype.parseSetterMethod=function(){var e=this.createNode();var t=false;var r=this.context.allowYield;this.context.allowYield=!t;var i=this.parseFormalParameters();if(i.params.length!==1){this.tolerateError(a.Messages.BadSetterArity)}else if(i.params[0]instanceof u.RestElement){this.tolerateError(a.Messages.BadSetterRestParameter)}var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(e,new u.FunctionExpression(null,i.params,n,t))};Parser.prototype.parseGeneratorMethod=function(){var e=this.createNode();var t=true;var r=this.context.allowYield;this.context.allowYield=true;var i=this.parseFormalParameters();this.context.allowYield=false;var n=this.parsePropertyMethod(i);this.context.allowYield=r;return this.finalize(e,new u.FunctionExpression(null,i.params,n,t))};Parser.prototype.isStartOfExpression=function(){var e=true;var t=this.lookahead.value;switch(this.lookahead.type){case 7:e=t==="["||t==="("||t==="{"||t==="+"||t==="-"||t==="!"||t==="~"||t==="++"||t==="--"||t==="/"||t==="/=";break;case 4:e=t==="class"||t==="delete"||t==="function"||t==="let"||t==="new"||t==="super"||t==="this"||t==="typeof"||t==="void"||t==="yield";break;default:break}return e};Parser.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null;var r=false;if(!this.hasLineTerminator){var i=this.context.allowYield;this.context.allowYield=false;r=this.match("*");if(r){this.nextToken();t=this.parseAssignmentExpression()}else if(this.isStartOfExpression()){t=this.parseAssignmentExpression()}this.context.allowYield=i}return this.finalize(e,new u.YieldExpression(t,r))};Parser.prototype.parseClassElement=function(e){var t=this.lookahead;var r=this.createNode();var i="";var n=null;var s=null;var o=false;var l=false;var f=false;var c=false;if(this.match("*")){this.nextToken()}else{o=this.match("[");n=this.parseObjectPropertyKey();var h=n;if(h.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))){t=this.lookahead;f=true;o=this.match("[");if(this.match("*")){this.nextToken()}else{n=this.parseObjectPropertyKey()}}if(t.type===3&&!this.hasLineTerminator&&t.value==="async"){var p=this.lookahead.value;if(p!==":"&&p!=="("&&p!=="*"){c=true;t=this.lookahead;n=this.parseObjectPropertyKey();if(t.type===3&&t.value==="constructor"){this.tolerateUnexpectedToken(t,a.Messages.ConstructorIsAsync)}}}}var v=this.qualifiedPropertyName(this.lookahead);if(t.type===3){if(t.value==="get"&&v){i="get";o=this.match("[");n=this.parseObjectPropertyKey();this.context.allowYield=false;s=this.parseGetterMethod()}else if(t.value==="set"&&v){i="set";o=this.match("[");n=this.parseObjectPropertyKey();s=this.parseSetterMethod()}}else if(t.type===7&&t.value==="*"&&v){i="init";o=this.match("[");n=this.parseObjectPropertyKey();s=this.parseGeneratorMethod();l=true}if(!i&&n&&this.match("(")){i="init";s=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction();l=true}if(!i){this.throwUnexpectedToken(this.lookahead)}if(i==="init"){i="method"}if(!o){if(f&&this.isPropertyKey(n,"prototype")){this.throwUnexpectedToken(t,a.Messages.StaticPrototype)}if(!f&&this.isPropertyKey(n,"constructor")){if(i!=="method"||!l||s&&s.generator){this.throwUnexpectedToken(t,a.Messages.ConstructorSpecialMethod)}if(e.value){this.throwUnexpectedToken(t,a.Messages.DuplicateConstructor)}else{e.value=true}i="constructor"}}return this.finalize(r,new u.MethodDefinition(n,o,s,i,f))};Parser.prototype.parseClassElementList=function(){var e=[];var t={value:false};this.expect("{");while(!this.match("}")){if(this.match(";")){this.nextToken()}else{e.push(this.parseClassElement(t))}}this.expect("}");return e};Parser.prototype.parseClassBody=function(){var e=this.createNode();var t=this.parseClassElementList();return this.finalize(e,new u.ClassBody(t))};Parser.prototype.parseClassDeclaration=function(e){var t=this.createNode();var r=this.context.strict;this.context.strict=true;this.expectKeyword("class");var i=e&&this.lookahead.type!==3?null:this.parseVariableIdentifier();var n=null;if(this.matchKeyword("extends")){this.nextToken();n=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall)}var a=this.parseClassBody();this.context.strict=r;return this.finalize(t,new u.ClassDeclaration(i,n,a))};Parser.prototype.parseClassExpression=function(){var e=this.createNode();var t=this.context.strict;this.context.strict=true;this.expectKeyword("class");var r=this.lookahead.type===3?this.parseVariableIdentifier():null;var i=null;if(this.matchKeyword("extends")){this.nextToken();i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall)}var n=this.parseClassBody();this.context.strict=t;return this.finalize(e,new u.ClassExpression(r,i,n))};Parser.prototype.parseModule=function(){this.context.strict=true;this.context.isModule=true;this.scanner.isModule=true;var e=this.createNode();var t=this.parseDirectivePrologues();while(this.lookahead.type!==2){t.push(this.parseStatementListItem())}return this.finalize(e,new u.Module(t))};Parser.prototype.parseScript=function(){var e=this.createNode();var t=this.parseDirectivePrologues();while(this.lookahead.type!==2){t.push(this.parseStatementListItem())}return this.finalize(e,new u.Script(t))};Parser.prototype.parseModuleSpecifier=function(){var e=this.createNode();if(this.lookahead.type!==8){this.throwError(a.Messages.InvalidModuleSpecifier)}var t=this.nextToken();var r=this.getTokenRaw(t);return this.finalize(e,new u.Literal(t.value,r))};Parser.prototype.parseImportSpecifier=function(){var e=this.createNode();var t;var r;if(this.lookahead.type===3){t=this.parseVariableIdentifier();r=t;if(this.matchContextualKeyword("as")){this.nextToken();r=this.parseVariableIdentifier()}}else{t=this.parseIdentifierName();r=t;if(this.matchContextualKeyword("as")){this.nextToken();r=this.parseVariableIdentifier()}else{this.throwUnexpectedToken(this.nextToken())}}return this.finalize(e,new u.ImportSpecifier(r,t))};Parser.prototype.parseNamedImports=function(){this.expect("{");var e=[];while(!this.match("}")){e.push(this.parseImportSpecifier());if(!this.match("}")){this.expect(",")}}this.expect("}");return e};Parser.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode();var t=this.parseIdentifierName();return this.finalize(e,new u.ImportDefaultSpecifier(t))};Parser.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*");if(!this.matchContextualKeyword("as")){this.throwError(a.Messages.NoAsAfterImportNamespace)}this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new u.ImportNamespaceSpecifier(t))};Parser.prototype.parseImportDeclaration=function(){if(this.context.inFunctionBody){this.throwError(a.Messages.IllegalImportDeclaration)}var e=this.createNode();this.expectKeyword("import");var t;var r=[];if(this.lookahead.type===8){t=this.parseModuleSpecifier()}else{if(this.match("{")){r=r.concat(this.parseNamedImports())}else if(this.match("*")){r.push(this.parseImportNamespaceSpecifier())}else if(this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")){r.push(this.parseImportDefaultSpecifier());if(this.match(",")){this.nextToken();if(this.match("*")){r.push(this.parseImportNamespaceSpecifier())}else if(this.match("{")){r=r.concat(this.parseNamedImports())}else{this.throwUnexpectedToken(this.lookahead)}}}else{this.throwUnexpectedToken(this.nextToken())}if(!this.matchContextualKeyword("from")){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken();t=this.parseModuleSpecifier()}this.consumeSemicolon();return this.finalize(e,new u.ImportDeclaration(r,t))};Parser.prototype.parseExportSpecifier=function(){var e=this.createNode();var t=this.parseIdentifierName();var r=t;if(this.matchContextualKeyword("as")){this.nextToken();r=this.parseIdentifierName()}return this.finalize(e,new u.ExportSpecifier(t,r))};Parser.prototype.parseExportDeclaration=function(){if(this.context.inFunctionBody){this.throwError(a.Messages.IllegalExportDeclaration)}var e=this.createNode();this.expectKeyword("export");var t;if(this.matchKeyword("default")){this.nextToken();if(this.matchKeyword("function")){var r=this.parseFunctionDeclaration(true);t=this.finalize(e,new u.ExportDefaultDeclaration(r))}else if(this.matchKeyword("class")){var r=this.parseClassDeclaration(true);t=this.finalize(e,new u.ExportDefaultDeclaration(r))}else if(this.matchContextualKeyword("async")){var r=this.matchAsyncFunction()?this.parseFunctionDeclaration(true):this.parseAssignmentExpression();t=this.finalize(e,new u.ExportDefaultDeclaration(r))}else{if(this.matchContextualKeyword("from")){this.throwError(a.Messages.UnexpectedToken,this.lookahead.value)}var r=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon();t=this.finalize(e,new u.ExportDefaultDeclaration(r))}}else if(this.match("*")){this.nextToken();if(!this.matchContextualKeyword("from")){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken();var n=this.parseModuleSpecifier();this.consumeSemicolon();t=this.finalize(e,new u.ExportAllDeclaration(n))}else if(this.lookahead.type===4){var r=void 0;switch(this.lookahead.value){case"let":case"const":r=this.parseLexicalDeclaration({inFor:false});break;case"var":case"class":case"function":r=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}t=this.finalize(e,new u.ExportNamedDeclaration(r,[],null))}else if(this.matchAsyncFunction()){var r=this.parseFunctionDeclaration();t=this.finalize(e,new u.ExportNamedDeclaration(r,[],null))}else{var s=[];var o=null;var l=false;this.expect("{");while(!this.match("}")){l=l||this.matchKeyword("default");s.push(this.parseExportSpecifier());if(!this.match("}")){this.expect(",")}}this.expect("}");if(this.matchContextualKeyword("from")){this.nextToken();o=this.parseModuleSpecifier();this.consumeSemicolon()}else if(l){var i=this.lookahead.value?a.Messages.UnexpectedToken:a.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}else{this.consumeSemicolon()}t=this.finalize(e,new u.ExportNamedDeclaration(null,s,o))}return t};return Parser}();t.Parser=c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});function assert(e,t){if(!e){throw new Error("ASSERT: "+t)}}t.assert=assert},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=function(){function ErrorHandler(){this.errors=[];this.tolerant=false}ErrorHandler.prototype.recordError=function(e){this.errors.push(e)};ErrorHandler.prototype.tolerate=function(e){if(this.tolerant){this.recordError(e)}else{throw e}};ErrorHandler.prototype.constructError=function(e,t){var r=new Error(e);try{throw r}catch(e){if(Object.create&&Object.defineProperty){r=Object.create(e);Object.defineProperty(r,"column",{value:t})}}return r};ErrorHandler.prototype.createError=function(e,t,r,i){var n="Line "+t+": "+i;var a=this.constructError(n,r);a.index=e;a.lineNumber=t;a.description=i;return a};ErrorHandler.prototype.throwError=function(e,t,r,i){throw this.createError(e,t,r,i)};ErrorHandler.prototype.tolerateError=function(e,t,r,i){var n=this.createError(e,t,r,i);if(this.tolerant){this.recordError(n)}else{throw n}};return ErrorHandler}();t.ErrorHandler=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(9);var n=r(4);var a=r(11);function hexValue(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function octalValue(e){return"01234567".indexOf(e)}var u=function(){function Scanner(e,t){this.source=e;this.errorHandler=t;this.trackComment=false;this.isModule=false;this.length=e.length;this.index=0;this.lineNumber=e.length>0?1:0;this.lineStart=0;this.curlyStack=[]}Scanner.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}};Scanner.prototype.restoreState=function(e){this.index=e.index;this.lineNumber=e.lineNumber;this.lineStart=e.lineStart};Scanner.prototype.eof=function(){return this.index>=this.length};Scanner.prototype.throwUnexpectedToken=function(e){if(e===void 0){e=a.Messages.UnexpectedTokenIllegal}return this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)};Scanner.prototype.tolerateUnexpectedToken=function(e){if(e===void 0){e=a.Messages.UnexpectedTokenIllegal}this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)};Scanner.prototype.skipSingleLineComment=function(e){var t=[];var r,i;if(this.trackComment){t=[];r=this.index-e;i={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}}}while(!this.eof()){var a=this.source.charCodeAt(this.index);++this.index;if(n.Character.isLineTerminator(a)){if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart-1};var u={multiLine:false,slice:[r+e,this.index-1],range:[r,this.index-1],loc:i};t.push(u)}if(a===13&&this.source.charCodeAt(this.index)===10){++this.index}++this.lineNumber;this.lineStart=this.index;return t}}if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart};var u={multiLine:false,slice:[r+e,this.index],range:[r,this.index],loc:i};t.push(u)}return t};Scanner.prototype.skipMultiLineComment=function(){var e=[];var t,r;if(this.trackComment){e=[];t=this.index-2;r={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}}}while(!this.eof()){var i=this.source.charCodeAt(this.index);if(n.Character.isLineTerminator(i)){if(i===13&&this.source.charCodeAt(this.index+1)===10){++this.index}++this.lineNumber;++this.index;this.lineStart=this.index}else if(i===42){if(this.source.charCodeAt(this.index+1)===47){this.index+=2;if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var a={multiLine:true,slice:[t+2,this.index-2],range:[t,this.index],loc:r};e.push(a)}return e}++this.index}else{++this.index}}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var a={multiLine:true,slice:[t+2,this.index],range:[t,this.index],loc:r};e.push(a)}this.tolerateUnexpectedToken();return e};Scanner.prototype.scanComments=function(){var e;if(this.trackComment){e=[]}var t=this.index===0;while(!this.eof()){var r=this.source.charCodeAt(this.index);if(n.Character.isWhiteSpace(r)){++this.index}else if(n.Character.isLineTerminator(r)){++this.index;if(r===13&&this.source.charCodeAt(this.index)===10){++this.index}++this.lineNumber;this.lineStart=this.index;t=true}else if(r===47){r=this.source.charCodeAt(this.index+1);if(r===47){this.index+=2;var i=this.skipSingleLineComment(2);if(this.trackComment){e=e.concat(i)}t=true}else if(r===42){this.index+=2;var i=this.skipMultiLineComment();if(this.trackComment){e=e.concat(i)}}else{break}}else if(t&&r===45){if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var i=this.skipSingleLineComment(3);if(this.trackComment){e=e.concat(i)}}else{break}}else if(r===60&&!this.isModule){if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var i=this.skipSingleLineComment(4);if(this.trackComment){e=e.concat(i)}}else{break}}else{break}}return e};Scanner.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return true;default:return false}};Scanner.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return true;default:return false}};Scanner.prototype.isRestrictedWord=function(e){return e==="eval"||e==="arguments"};Scanner.prototype.isKeyword=function(e){switch(e.length){case 2:return e==="if"||e==="in"||e==="do";case 3:return e==="var"||e==="for"||e==="new"||e==="try"||e==="let";case 4:return e==="this"||e==="else"||e==="case"||e==="void"||e==="with"||e==="enum";case 5:return e==="while"||e==="break"||e==="catch"||e==="throw"||e==="const"||e==="yield"||e==="class"||e==="super";case 6:return e==="return"||e==="typeof"||e==="delete"||e==="switch"||e==="export"||e==="import";case 7:return e==="default"||e==="finally"||e==="extends";case 8:return e==="function"||e==="continue"||e==="debugger";case 10:return e==="instanceof";default:return false}};Scanner.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var r=this.source.charCodeAt(e+1);if(r>=56320&&r<=57343){var i=t;t=(i-55296)*1024+r-56320+65536}}return t};Scanner.prototype.scanHexEscape=function(e){var t=e==="u"?4:2;var r=0;for(var i=0;i1114111||e!=="}"){this.throwUnexpectedToken()}return n.Character.fromCodePoint(t)};Scanner.prototype.getIdentifier=function(){var e=this.index++;while(!this.eof()){var t=this.source.charCodeAt(this.index);if(t===92){this.index=e;return this.getComplexIdentifier()}else if(t>=55296&&t<57343){this.index=e;return this.getComplexIdentifier()}if(n.Character.isIdentifierPart(t)){++this.index}else{break}}return this.source.slice(e,this.index)};Scanner.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index);var t=n.Character.fromCodePoint(e);this.index+=t.length;var r;if(e===92){if(this.source.charCodeAt(this.index)!==117){this.throwUnexpectedToken()}++this.index;if(this.source[this.index]==="{"){++this.index;r=this.scanUnicodeCodePointEscape()}else{r=this.scanHexEscape("u");if(r===null||r==="\\"||!n.Character.isIdentifierStart(r.charCodeAt(0))){this.throwUnexpectedToken()}}t=r}while(!this.eof()){e=this.codePointAt(this.index);if(!n.Character.isIdentifierPart(e)){break}r=n.Character.fromCodePoint(e);t+=r;this.index+=r.length;if(e===92){t=t.substr(0,t.length-1);if(this.source.charCodeAt(this.index)!==117){this.throwUnexpectedToken()}++this.index;if(this.source[this.index]==="{"){++this.index;r=this.scanUnicodeCodePointEscape()}else{r=this.scanHexEscape("u");if(r===null||r==="\\"||!n.Character.isIdentifierPart(r.charCodeAt(0))){this.throwUnexpectedToken()}}t+=r}}return t};Scanner.prototype.octalToDecimal=function(e){var t=e!=="0";var r=octalValue(e);if(!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))){t=true;r=r*8+octalValue(this.source[this.index++]);if("0123".indexOf(e)>=0&&!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))){r=r*8+octalValue(this.source[this.index++])}}return{code:r,octal:t}};Scanner.prototype.scanIdentifier=function(){var e;var t=this.index;var r=this.source.charCodeAt(t)===92?this.getComplexIdentifier():this.getIdentifier();if(r.length===1){e=3}else if(this.isKeyword(r)){e=4}else if(r==="null"){e=5}else if(r==="true"||r==="false"){e=1}else{e=3}if(e!==3&&t+r.length!==this.index){var i=this.index;this.index=t;this.tolerateUnexpectedToken(a.Messages.InvalidEscapedReservedWord);this.index=i}return{type:e,value:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}};Scanner.prototype.scanPunctuator=function(){var e=this.index;var t=this.source[this.index];switch(t){case"(":case"{":if(t==="{"){this.curlyStack.push("{")}++this.index;break;case".":++this.index;if(this.source[this.index]==="."&&this.source[this.index+1]==="."){this.index+=2;t="..."}break;case"}":++this.index;this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:t=this.source.substr(this.index,4);if(t===">>>="){this.index+=4}else{t=t.substr(0,3);if(t==="==="||t==="!=="||t===">>>"||t==="<<="||t===">>="||t==="**="){this.index+=3}else{t=t.substr(0,2);if(t==="&&"||t==="||"||t==="=="||t==="!="||t==="+="||t==="-="||t==="*="||t==="/="||t==="++"||t==="--"||t==="<<"||t===">>"||t==="&="||t==="|="||t==="^="||t==="%="||t==="<="||t===">="||t==="=>"||t==="**"){this.index+=2}else{t=this.source[this.index];if("<>=!+-*%&|^/".indexOf(t)>=0){++this.index}}}}}if(this.index===e){this.throwUnexpectedToken()}return{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.scanHexLiteral=function(e){var t="";while(!this.eof()){if(!n.Character.isHexDigit(this.source.charCodeAt(this.index))){break}t+=this.source[this.index++]}if(t.length===0){this.throwUnexpectedToken()}if(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))){this.throwUnexpectedToken()}return{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.scanBinaryLiteral=function(e){var t="";var r;while(!this.eof()){r=this.source[this.index];if(r!=="0"&&r!=="1"){break}t+=this.source[this.index++]}if(t.length===0){this.throwUnexpectedToken()}if(!this.eof()){r=this.source.charCodeAt(this.index);if(n.Character.isIdentifierStart(r)||n.Character.isDecimalDigit(r)){this.throwUnexpectedToken()}}return{type:6,value:parseInt(t,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}};Scanner.prototype.scanOctalLiteral=function(e,t){var r="";var i=false;if(n.Character.isOctalDigit(e.charCodeAt(0))){i=true;r="0"+this.source[this.index++]}else{++this.index}while(!this.eof()){if(!n.Character.isOctalDigit(this.source.charCodeAt(this.index))){break}r+=this.source[this.index++]}if(!i&&r.length===0){this.throwUnexpectedToken()}if(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))||n.Character.isDecimalDigit(this.source.charCodeAt(this.index))){this.throwUnexpectedToken()}return{type:6,value:parseInt(r,8),octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}};Scanner.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0){i=i.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,i){var u=parseInt(t||i,16);if(u>1114111){n.throwUnexpectedToken(a.Messages.InvalidRegExp)}if(u<=65535){return String.fromCharCode(u)}return r}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r)}try{RegExp(i)}catch(e){this.throwUnexpectedToken(a.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}};Scanner.prototype.scanRegExpBody=function(){var e=this.source[this.index];i.assert(e==="/","Regular expression literal must start with a slash");var t=this.source[this.index++];var r=false;var u=false;while(!this.eof()){e=this.source[this.index++];t+=e;if(e==="\\"){e=this.source[this.index++];if(n.Character.isLineTerminator(e.charCodeAt(0))){this.throwUnexpectedToken(a.Messages.UnterminatedRegExp)}t+=e}else if(n.Character.isLineTerminator(e.charCodeAt(0))){this.throwUnexpectedToken(a.Messages.UnterminatedRegExp)}else if(r){if(e==="]"){r=false}}else{if(e==="/"){u=true;break}else if(e==="["){r=true}}}if(!u){this.throwUnexpectedToken(a.Messages.UnterminatedRegExp)}return t.substr(1,t.length-2)};Scanner.prototype.scanRegExpFlags=function(){var e="";var t="";while(!this.eof()){var r=this.source[this.index];if(!n.Character.isIdentifierPart(r.charCodeAt(0))){break}++this.index;if(r==="\\"&&!this.eof()){r=this.source[this.index];if(r==="u"){++this.index;var i=this.index;var a=this.scanHexEscape("u");if(a!==null){t+=a;for(e+="\\u";i=55296&&e<57343){if(n.Character.isIdentifierStart(this.codePointAt(this.index))){return this.scanIdentifier()}}return this.scanPunctuator()};return Scanner}();t.Scanner=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TokenName={};t.TokenName[1]="Boolean";t.TokenName[2]="";t.TokenName[3]="Identifier";t.TokenName[4]="Keyword";t.TokenName[5]="Null";t.TokenName[6]="Numeric";t.TokenName[7]="Punctuator";t.TokenName[8]="String";t.TokenName[9]="RegularExpression";t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(10);var n=r(12);var a=r(13);var u=function(){function Reader(){this.values=[];this.curly=this.paren=-1}Reader.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0};Reader.prototype.isRegexStart=function(){var e=this.values[this.values.length-1];var t=e!==null;switch(e){case"this":case"]":t=false;break;case")":var r=this.values[this.paren-1];t=r==="if"||r==="while"||r==="for"||r==="with";break;case"}":t=false;if(this.values[this.curly-3]==="function"){var i=this.values[this.curly-4];t=i?!this.beforeFunctionExpression(i):false}else if(this.values[this.curly-4]==="function"){var i=this.values[this.curly-5];t=i?!this.beforeFunctionExpression(i):true}break;default:break}return t};Reader.prototype.push=function(e){if(e.type===7||e.type===4){if(e.value==="{"){this.curly=this.values.length}else if(e.value==="("){this.paren=this.values.length}this.values.push(e.value)}else{this.values.push(null)}};return Reader}();var s=function(){function Tokenizer(e,t){this.errorHandler=new i.ErrorHandler;this.errorHandler.tolerant=t?typeof t.tolerant==="boolean"&&t.tolerant:false;this.scanner=new n.Scanner(e,this.errorHandler);this.scanner.trackComment=t?typeof t.comment==="boolean"&&t.comment:false;this.trackRange=t?typeof t.range==="boolean"&&t.range:false;this.trackLoc=t?typeof t.loc==="boolean"&&t.loc:false;this.buffer=[];this.reader=new u}Tokenizer.prototype.errors=function(){return this.errorHandler.errors};Tokenizer.prototype.getNextToken=function(){if(this.buffer.length===0){var e=this.scanner.scanComments();if(this.scanner.trackComment){for(var t=0;tt){if(e.charAt(r-1)!==" "){break}r--}return r}},,function(e,t,r){"use strict";var i=r(347)("unified-engine:file-pipeline:stringify");var n=r(928);var a=r(212);e.exports=stringify;function stringify(e,t){var r=e.processor;var u=e.tree;var s;if(n(t).fatal){i("Not compiling failed document");return}if(!e.output&&!e.out&&!e.alwaysStringify){i("Not compiling document without output settings");return}i("Compiling `%s`",t.path);if(e.inspect){if(t.path){t.extname=".txt"}s=a[e.color?"color":"noColor"](u)+"\n"}else if(e.treeOut){if(t.path){t.extname=".json"}s=JSON.stringify(u,null,2)+"\n"}else{s=r.stringify(u,t)}t.contents=s;i("Compiled document")}},,,function(e,t,r){"use strict";const i=r(624);e.exports=(e=>typeof e==="string"?e.replace(i(),""):e)},,function(e,t,r){"use strict";var i=r(260);function Mark(e,t,r,i,n){this.name=e;this.buffer=t;this.position=r;this.line=i;this.column=n}Mark.prototype.getSnippet=function getSnippet(e,t){var r,n,a,u,s;if(!this.buffer)return null;e=e||4;t=t||75;r="";n=this.position;while(n>0&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(n-1))===-1){n-=1;if(this.position-n>t/2-1){r=" ... ";n+=5;break}}a="";u=this.position;while(ut/2-1){a=" ... ";u-=5;break}}s=this.buffer.slice(n,u);return i.repeat(" ",e)+r+s+a+"\n"+i.repeat(" ",e+this.position-n+r.length)+"^"};Mark.prototype.toString=function toString(e){var t,r="";if(this.name){r+='in "'+this.name+'" '}r+="at line "+(this.line+1)+", column "+(this.column+1);if(!e){t=this.getSnippet();if(t){r+=":\n"+t}}return r};e.exports=Mark},function(e,t,r){var i=r(148);var n=function(){};var a=r(405);e.exports=wrapped;function wrapped(e){function wrap(){var t=i(arguments);var r=t[t.length-1];var u=this;var s=typeof r=="function"?t.pop():n;if(!e){return s.apply(u,[null].concat(t))}if(generator(e)){return a(e).apply(u,t.concat(s))}if(e.length>t.length){try{return e.apply(u,t.concat(s))}catch(e){return s(e)}}return sync(e,s).apply(u,t)}return wrap}function sync(e,t){return function(){var r;try{r=e.apply(this,arguments)}catch(e){return t(e)}if(promise(r)){r.then(function(e){t(null,e)},t)}else{r instanceof Error?t(r):t(null,r)}}}function generator(e){return e&&e.constructor&&"GeneratorFunction"==e.constructor.name}function promise(e){return e&&"function"==typeof e.then}},,,,,,,,function(e,t,r){"use strict";var i=r(495);e.exports=i("remark-lint:no-file-name-articles",noFileNameArticles);function noFileNameArticles(e,t){var r=t.stem&&t.stem.match(/^(the|teh|an?)\b/i);if(r){t.message("Do not start file names with `"+r[0]+"`")}}},,,function(e,t,r){"use strict";var i=r(171);e.exports=newline;var n="\n";function newline(e,t,r){var a=t.charAt(0);var u;var s;var o;var l;if(a!==n){return}if(r){return true}l=1;u=t.length;s=a;o="";while(l{if(typeof e!=="string"||e.length===0){return 0}e=i(e);let t=0;for(let r=0;r=127&&i<=159){continue}if(i>=768&&i<=879){continue}if(i>65535){r++}t+=n(i)?2:1}return t})},,,,function(e){e.exports=require("stream")},,,,function(e){"use strict";e.exports=function isObject(e){return typeof e==="object"&&e!==null}},,function(e,t,r){"use strict";e.exports={position:true,gfm:true,commonmark:false,footnotes:false,pedantic:false,blocks:r(676)}},,,function(e,t,r){"use strict";var i=r(211);var n=Object.prototype.toString;function resolveYamlPairs(e){if(e===null)return true;var t,r,i,a,u,s=e;u=new Array(s.length);for(t=0,r=s.length;t=0){t=t.slice(1)}if(t===".inf"){return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(t===".nan"){return NaN}else if(t.indexOf(":")>=0){t.split(":").forEach(function(e){n.unshift(parseFloat(e,10))});t=0;i=1;n.forEach(function(e){t+=e*i;i*=60});return r*t}return r*parseFloat(t,10)}var u=/^[-+]?[0-9]+e/;function representYamlFloat(e,t){var r;if(isNaN(e)){switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===e){switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===e){switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(i.isNegativeZero(e)){return"-0.0"}r=e.toString(10);return u.test(r)?r.replace("e",".e"):r}function isFloat(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||i.isNegativeZero(e))}e.exports=new n("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},,function(e,t,r){"use strict";const i=r(947);e.exports=((e,t,r)=>{if(typeof t==="number"){r=t}if(i.has(e.toLowerCase())){t=i.get(e.toLowerCase());const r=e.charAt(0);const n=r===r.toUpperCase();if(n){t=r.toUpperCase()+t.slice(1)}const a=e===e.toUpperCase();if(a){t=t.toUpperCase()}}else if(typeof t!=="string"){t=(e.replace(/(?:s|x|z|ch|sh)$/i,"$&e").replace(/([^aeiou])y$/i,"$1ie")+"s").replace(/i?e?s$/i,t=>{const r=e.slice(-1)===e.slice(-1).toLowerCase();return r?t.toLowerCase():t.toUpperCase()})}return Math.abs(r)===1?e:t})},function(e,t,r){"use strict";var i=r(814);e.exports=pad;var n="\n";var a=" ";var u=4;function pad(e,t){var r=e.split(n);var s=r.length;var o=i(a,t*u);while(s--){if(r[s].length!==0){r[s]=o+r[s]}}return r.join(n)}},,,,function(e){e.exports=function(e,t){return e.replace(/(\\*)(\$([_a-z0-9]+)|\${([_a-z0-9]+)})/gi,function(e,r,i,n,a){if(!(r.length%2)){return r.substring(Math.ceil(r.length/2))+(t[n||a]||"")}else{return r.substring(1)+i}})}},,,,function(e,t,r){"use strict";var i=r(211);var n=Object.prototype.hasOwnProperty;function resolveYamlSet(e){if(e===null)return true;var t,r=e;for(t in r){if(n.call(r,t)){if(r[t]!==null)return false}}return true}function constructYamlSet(e){return e!==null?e:{}}e.exports=new i("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},function(e){if(typeof Object.create==="function"){e.exports=function inherits(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}else{e.exports=function inherits(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype;e.prototype=new r;e.prototype.constructor=e}}},,,,,function(e){var t=Object.prototype.toString;var r=typeof Buffer.alloc==="function"&&typeof Buffer.allocUnsafe==="function"&&typeof Buffer.from==="function";function isArrayBuffer(e){return t.call(e).slice(8,-1)==="ArrayBuffer"}function fromArrayBuffer(e,t,i){t>>>=0;var n=e.byteLength-t;if(n<0){throw new RangeError("'offset' is out of bounds")}if(i===undefined){i=n}else{i>>>=0;if(i>n){throw new RangeError("'length' is out of bounds")}}return r?Buffer.from(e.slice(t,t+i)):new Buffer(new Uint8Array(e.slice(t,t+i)))}function fromString(e,t){if(typeof t!=="string"||t===""){t="utf8"}if(!Buffer.isEncoding(t)){throw new TypeError('"encoding" must be a valid string encoding')}return r?Buffer.from(e,t):new Buffer(e,t)}function bufferFrom(e,t,i){if(typeof e==="number"){throw new TypeError('"value" argument must not be a number')}if(isArrayBuffer(e)){return fromArrayBuffer(e,t,i)}if(typeof e==="string"){return fromString(e,t)}return r?Buffer.from(e):new Buffer(e)}e.exports=bufferFrom},,function(e){e.exports={AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abreve:"Ă",Acir:"Â",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrav:"À",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Arin:"Å",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atild:"Ã",Atilde:"Ã",Aum:"Ä",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COP:"©",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedi:"Ç",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ET:"Ð",ETH:"Ð",Eacut:"É",Eacute:"É",Ecaron:"Ě",Ecir:"Ê",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrav:"È",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Eum:"Ë",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",G:">",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacut:"Í",Iacute:"Í",Icir:"Î",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrav:"Ì",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Ium:"Ï",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",L:"<",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uum:"Ü",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacut:"Ý",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacut:"á",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acir:"â",acirc:"â",acut:"´",acute:"´",acy:"а",aeli:"æ",aelig:"æ",af:"⁡",afr:"𝔞",agrav:"à",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",am:"&",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",arin:"å",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atild:"ã",atilde:"ã",aum:"ä",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvba:"¦",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedi:"ç",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedi:"¸",cedil:"¸",cemptyv:"⦲",cen:"¢",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",cop:"©",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curre:"¤",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",de:"°",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divid:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacut:"é",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"ê",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrav:"è",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",et:"ð",eth:"ð",eum:"ë",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac1:"¼",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac3:"¾",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",g:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacut:"í",iacute:"í",ic:"⁣",icir:"î",icirc:"î",icy:"и",iecy:"е",iexc:"¡",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrav:"ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iques:"¿",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",ium:"ï",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laqu:"«",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",l:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",mac:"¯",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micr:"µ",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middo:"·",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbs:" ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",no:"¬",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntild:"ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacut:"ó",oacute:"ó",oast:"⊛",ocir:"ô",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograv:"ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"º",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslas:"ø",oslash:"ø",osol:"⊘",otild:"õ",otilde:"õ",otimes:"⊗",otimesas:"⨶",oum:"ö",ouml:"ö",ovbar:"⌽",par:"¶",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusm:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",poun:"£",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quo:'"',quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raqu:"»",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",re:"®",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sec:"§",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",sh:"­",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szli:"ß",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thor:"þ",thorn:"þ",tilde:"˜",time:"×",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacut:"ú",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucir:"û",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrav:"ù",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",um:"¨",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uum:"ü",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacut:"ý",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",ye:"¥",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yum:"ÿ",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},function(e,t,r){const i=r(287);const n=r(809);const a={parse:i,stringify:n};e.exports=a},,function(e){"use strict";e.exports=interrupt;function interrupt(e,t,r,i){var n=e.length;var a=-1;var u;var s;while(++a>0},ToUint32:function(e){return e>>>0}}}();var u=Math.LN2,s=Math.abs,o=Math.floor,l=Math.log,f=Math.min,c=Math.pow,h=Math.round;function configureProperties(e){if(v&&p){var t=v(e),r;for(r=0;rn)throw new RangeError("Array too large for polyfill");function makeArrayAccessor(t){p(e,t,{get:function(){return e._getter(t)},set:function(r){e._setter(t,r)},enumerable:true,configurable:false})}var t;for(t=0;t>r}function as_unsigned(e,t){var r=32-t;return e<>>r}function packI8(e){return[e&255]}function unpackI8(e){return as_signed(e[0],8)}function packU8(e){return[e&255]}function unpackU8(e){return as_unsigned(e[0],8)}function packU8Clamped(e){e=h(Number(e));return[e<0?0:e>255?255:e&255]}function packI16(e){return[e>>8&255,e&255]}function unpackI16(e){return as_signed(e[0]<<8|e[1],16)}function packU16(e){return[e>>8&255,e&255]}function unpackU16(e){return as_unsigned(e[0]<<8|e[1],16)}function packI32(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}function unpackI32(e){return as_signed(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function packU32(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}function unpackU32(e){return as_unsigned(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function packIEEE754(e,t,r){var i=(1<.5)return t+1;return t%2?t+1:t}if(e!==e){a=(1<=c(2,1-i)){a=f(o(l(e)/u),1023);h=roundToEven(e/c(2,a)*c(2,r));if(h/c(2,r)>=2){a=a+1;h=1}if(a>i){a=(1<>1}}i.reverse();s=i.join("");o=(1<0){return l*c(2,f-o)*(1+h/c(2,r))}else if(h!==0){return l*c(2,-(o-1))*(h/c(2,r))}else{return l<0?-0:0}}function unpackF64(e){return unpackIEEE754(e,11,52)}function packF64(e){return packIEEE754(e,11,52)}function unpackF32(e){return unpackIEEE754(e,8,23)}function packF32(e){return packIEEE754(e,8,23)}(function(){var e=function ArrayBuffer(e){e=a.ToInt32(e);if(e<0)throw new RangeError("ArrayBuffer size is not a small enough positive integer");this.byteLength=e;this._bytes=[];this._bytes.length=e;var t;for(t=0;tthis.buffer.byteLength){throw new RangeError("byteOffset out of range")}if(this.byteOffset%this.BYTES_PER_ELEMENT){throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.")}if(arguments.length<3){this.byteLength=this.buffer.byteLength-this.byteOffset;if(this.byteLength%this.BYTES_PER_ELEMENT){throw new RangeError("length of buffer minus byteOffset not a multiple of the element size")}this.length=this.byteLength/this.BYTES_PER_ELEMENT}else{this.length=a.ToUint32(i);this.byteLength=this.length*this.BYTES_PER_ELEMENT}if(this.byteOffset+this.byteLength>this.buffer.byteLength){throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}}else{throw new TypeError("Unexpected argument type(s)")}this.constructor=s;configureProperties(this);makeArrayAccessors(this)};s.prototype=new r;s.prototype.BYTES_PER_ELEMENT=t;s.prototype._pack=n;s.prototype._unpack=u;s.BYTES_PER_ELEMENT=t;s.prototype._getter=function(e){if(arguments.length<1)throw new SyntaxError("Not enough arguments");e=a.ToUint32(e);if(e>=this.length){return i}var t=[],r,n;for(r=0,n=this.byteOffset+e*this.BYTES_PER_ELEMENT;r=this.length){return i}var r=this._pack(t),n,u;for(n=0,u=this.byteOffset+e*this.BYTES_PER_ELEMENT;nthis.length){throw new RangeError("Offset plus length of array is out of range")}f=this.byteOffset+n*this.BYTES_PER_ELEMENT;c=r.length*this.BYTES_PER_ELEMENT;if(r.buffer===this.buffer){h=[];for(s=0,o=r.byteOffset;sthis.length){throw new RangeError("Offset plus length of array is out of range")}for(s=0;sr?r:e}e=a.ToInt32(e);t=a.ToInt32(t);if(arguments.length<1){e=0}if(arguments.length<2){t=this.length}if(e<0){e=this.length+e}if(t<0){t=this.length+t}e=clamp(e,0,this.length);t=clamp(t,0,this.length);var r=t-e;if(r<0){r=0}return new this.constructor(this.buffer,this.byteOffset+e*this.BYTES_PER_ELEMENT,r)};return s}var n=makeConstructor(1,packI8,unpackI8);var u=makeConstructor(1,packU8,unpackU8);var s=makeConstructor(1,packU8Clamped,unpackU8);var o=makeConstructor(2,packI16,unpackI16);var l=makeConstructor(2,packU16,unpackU16);var f=makeConstructor(4,packI32,unpackI32);var c=makeConstructor(4,packU32,unpackU32);var h=makeConstructor(4,packF32,unpackF32);var p=makeConstructor(8,packF64,unpackF64);t.Int8Array=t.Int8Array||n;t.Uint8Array=t.Uint8Array||u;t.Uint8ClampedArray=t.Uint8ClampedArray||s;t.Int16Array=t.Int16Array||o;t.Uint16Array=t.Uint16Array||l;t.Int32Array=t.Int32Array||f;t.Uint32Array=t.Uint32Array||c;t.Float32Array=t.Float32Array||h;t.Float64Array=t.Float64Array||p})();(function(){function r(e,t){return a.IsCallable(e.get)?e.get(t):e[t]}var e=function(){var e=new t.Uint16Array([4660]),i=new t.Uint8Array(e.buffer);return r(i,0)===18}();var i=function DataView(e,r,i){if(arguments.length===0){e=new t.ArrayBuffer(0)}else if(!(e instanceof t.ArrayBuffer||a.Class(e)==="ArrayBuffer")){throw new TypeError("TypeError")}this.buffer=e||new t.ArrayBuffer(0);this.byteOffset=a.ToUint32(r);if(this.byteOffset>this.buffer.byteLength){throw new RangeError("byteOffset out of range")}if(arguments.length<3){this.byteLength=this.buffer.byteLength-this.byteOffset}else{this.byteLength=a.ToUint32(i)}if(this.byteOffset+this.byteLength>this.buffer.byteLength){throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}configureProperties(this)};function makeGetter(i){return function(n,u){n=a.ToUint32(n);if(n+i.BYTES_PER_ELEMENT>this.byteLength){throw new RangeError("Array index out of range")}n+=this.byteOffset;var s=new t.Uint8Array(this.buffer,n,i.BYTES_PER_ELEMENT),o=[],l;for(l=0;lthis.byteLength){throw new RangeError("Array index out of range")}var o=new i([u]),l=new t.Uint8Array(o.buffer),f=[],c,h;for(c=0;c=e.length?e.length:n+r;t.message+=` while parsing near '${i===0?"":"..."}${e.slice(i,a)}${a===e.length?"":"..."}'`}else{t.message+=` while parsing '${e.slice(0,r*2)}'`}throw t}}},,function(e){"use strict";e.exports=function isArrayish(e){if(!e){return false}return e instanceof Array||Array.isArray(e)||e.length>=0&&e.splice instanceof Function}},,,function(e){"use strict";e.exports=strikethrough;var t="~";var r=t+t;function strikethrough(e){return r+this.all(e).join("")+r}},,function(e,t,r){"use strict";var i=r(495);var n=r(704);var a=r(682);var u=r(839);var s=r(526);e.exports=i("remark-lint:no-heading-indent",noHeadingIndent);var o=u.start;function noHeadingIndent(e,t){var r=String(t);var i=r.length;a(e,"heading",visitor);function visitor(e){var a;var u;var l;var f;var c;if(s(e)){return}a=o(e);u=a.offset;l=u-1;while(++l-1&&r.charAt(i)!=="\n"){t.message("Missing newline character at end of file")}}},,,function(e,t,r){"use strict";var i=r(171);var n=r(111);e.exports=strikethrough;strikethrough.locator=n;var a="~";var u="~~";function strikethrough(e,t,r){var n=this;var s="";var o="";var l="";var f="";var c;var h;var p;if(!n.options.gfm||t.charAt(0)!==a||t.charAt(1)!==a||i(t.charAt(2))){return}c=1;h=t.length;p=e.now();p.column+=2;p.offset+=2;while(++c?@[\\\]^`{|}~_]/;function copy(e,t){var r=e.length;var u=t.length;var s=[];var o=0;var l=0;var f;while(l0){r=Math.min(10,Math.floor(r));o=" ".substr(0,r)}}else if(typeof r==="string"){o=r.substr(0,10)}return serializeProperty("",{"":e});function serializeProperty(e,t){let r=t[e];if(r!=null){if(typeof r.toJSON5==="function"){r=r.toJSON5(e)}else if(typeof r.toJSON==="function"){r=r.toJSON(e)}}if(s){r=s.call(t,e,r)}if(r instanceof Number){r=Number(r)}else if(r instanceof String){r=String(r)}else if(r instanceof Boolean){r=r.valueOf()}switch(r){case null:return"null";case true:return"true";case false:return"false"}if(typeof r==="string"){return quoteString(r,false)}if(typeof r==="number"){return String(r)}if(typeof r==="object"){return Array.isArray(r)?serializeArray(r):serializeObject(r)}return undefined}function quoteString(e){const t={"'":.1,'"':.2};const r={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let i="";for(const n of e){switch(n){case"'":case'"':t[n]++;i+=n;continue}if(r[n]){i+=r[n];continue}if(n<" "){let e=n.charCodeAt(0).toString(16);i+="\\x"+("00"+e).substring(e.length);continue}i+=n}const n=l||Object.keys(t).reduce((e,r)=>t[e]=0){throw TypeError("Converting circular structure to JSON5")}n.push(e);let t=a;a=a+o;let r=u||Object.keys(e);let i=[];for(const t of r){const r=serializeProperty(t,e);if(r!==undefined){let e=serializeKey(t)+":";if(o!==""){e+=" "}e+=r;i.push(e)}}let s;if(i.length===0){s="{}"}else{let e;if(o===""){e=i.join(",");s="{"+e+"}"}else{let r=",\n"+a;e=i.join(r);s="{\n"+a+e+",\n"+t+"}"}}n.pop();a=t;return s}function serializeKey(e){if(e.length===0){return quoteString(e,true)}const t=String.fromCodePoint(e.codePointAt(0));if(!i.isIdStartChar(t)){return quoteString(e,true)}for(let r=t.length;r=0){throw TypeError("Converting circular structure to JSON5")}n.push(e);let t=a;a=a+o;let r=[];for(let t=0;t=n){return t.substr(0,n)}while(n>t.length&&i>1){if(i&1){t+=e}i>>=1;e+=e}t+=e;t=t.substr(0,n);return t}},,function(e,t,r){"use strict";var i=r(495);var n=r(839);var a=r(526);var u=r(135);var s=r(682);e.exports=i("remark-lint:no-duplicate-definitions",noDuplicateDefinitions);var o="Do not use definitions with the same identifier";function noDuplicateDefinitions(e,t){var r={};s(e,["definition","footnoteDefinition"],validate);function validate(e){var i;var s;if(!a(e)){i=e.identifier;s=r[i];if(s&&s.type){t.message(o+" ("+u(n.start(s))+")",e)}r[i]=e}}}},function(e){"use strict";e.exports=is;function is(e,t,r,i,n){var a=i!==null&&i!==undefined;var u=r!==null&&r!==undefined;var s=convert(e);if(u&&(typeof r!=="number"||r<0||r===Infinity)){throw new Error("Expected positive finite index or child node")}if(a&&(!is(null,i)||!i.children)){throw new Error("Expected parent node")}if(!t||!t.type||typeof t.type!=="string"){return false}if(a!==u){throw new Error("Expected both parent and index")}return Boolean(s.call(n,t,r,i))}function convert(e){if(typeof e==="string"){return typeFactory(e)}if(e===null||e===undefined){return ok}if(typeof e==="object"){return("length"in e?anyFactory:matchesFactory)(e)}if(typeof e==="function"){return e}throw new Error("Expected function, string, or object as test")}function convertAll(e){var t=[];var r=e.length;var i=-1;while(++i=u){v--;break}d+=g}D="";m="";while(++v{t=t||process.argv;const r=e.startsWith("-")?"":e.length===1?"-":"--";const i=t.indexOf(r+e);const n=t.indexOf("--");return i!==-1&&(n===-1?true:ie[r])e[r]=i});return e},[]);var u=map(e,function(e){return map(e,function(e,t){var r=String(e);if(i[t]==="."){var u=dotindex(r);var s=a[t]+(/\./.test(r)?1:2)-(n(r)-u);return r+Array(s).join(" ")}else return r})});var s=reduce(u,function(e,t){forEach(t,function(t,r){var i=n(t);if(!e[r]||i>e[r])e[r]=i});return e},[]);return map(u,function(e){return map(e,function(e,t){var r=s[t]-n(e)||0;var a=Array(Math.max(r+1,1)).join(" ");if(i[t]==="r"||i[t]==="."){return a+e}if(i[t]==="c"){return Array(Math.ceil(r/2+1)).join(" ")+e+Array(Math.floor(r/2+1)).join(" ")}return e+a}).join(r).replace(/\s+$/,"")}).join("\n")};function dotindex(e){var t=/\.[^.]*$/.exec(e);return t?t.index+1:e.length}function reduce(e,t,r){if(e.reduce)return e.reduce(t,r);var i=0;var n=arguments.length>=3?r:e[i++];for(;ir&&a0?"add":"remove")+" "+Math.abs(h)+" "+n("space",h);t.message(p,s)}}}}},,,,,function(e,t,r){"use strict";var i=r(721);e.exports=decodeEntity;var n={}.hasOwnProperty;function decodeEntity(e){return n.call(i,e)?i[e]:false}},,function(e,t,r){"use strict";var i=r(336);var n=r(780);e.exports=unherit;function unherit(e){var t;var r;var a;n(Of,e);n(From,Of);t=Of.prototype;for(r in t){a=t[r];if(a&&typeof a==="object"){t[r]="concat"in a?a.concat():i(a)}}return Of;function From(t){return e.apply(this,t)}function Of(){if(!(this instanceof Of)){return new From(arguments)}return e.apply(this,arguments)}}},function(e){"use strict";const t=e=>{let t=false;let r=false;let i=false;for(let n=0;n{if(!(typeof e==="string"||Array.isArray(e))){throw new TypeError("Expected the input to be `string | string[]`")}r=Object.assign({pascalCase:false},r);const i=e=>r.pascalCase?e.charAt(0).toUpperCase()+e.slice(1):e;if(Array.isArray(e)){e=e.map(e=>e.trim()).filter(e=>e.length).join("-")}else{e=e.trim()}if(e.length===0){return""}if(e.length===1){return r.pascalCase?e.toUpperCase():e.toLowerCase()}const n=e!==e.toLowerCase();if(n){e=t(e)}e=e.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(e,t)=>t.toUpperCase()).replace(/\d+(\w|$)/g,e=>e.toUpperCase());return i(e)};e.exports=r;e.exports.default=r},,function(e,t,r){"use strict";var i=r(211);function resolveYamlMerge(e){return e==="<<"||e===null}e.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},function(e){"use strict";e.exports={gfm:true,commonmark:false,pedantic:false,entities:"false",setext:false,closeAtx:false,looseTable:false,spacedTable:true,paddedTable:true,stringLength:stringLength,incrementListMarker:true,fences:false,fence:"`",bullet:"-",listItemIndent:"tab",rule:"*",ruleSpaces:true,ruleRepetition:3,strong:"*",emphasis:"_"};function stringLength(e){return e.length}},function(e,t,r){"use strict";var i=r(197);var n=r(520);var a=r(439);var u=r(25);var s=r(908);var o=r(895);e.exports=parseEntities;var l={}.hasOwnProperty;var f=String.fromCharCode;var c=Function.prototype;var h={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:false,nonTerminated:true};var p="named";var v="hexadecimal";var d="decimal";var D={};D[v]=16;D[d]=10;var m={};m[p]=s;m[d]=a;m[v]=u;var g=1;var E=2;var A=3;var C=4;var y=5;var w=6;var x=7;var b={};b[g]="Named character references must be terminated by a semicolon";b[E]="Numeric character references must be terminated by a semicolon";b[A]="Named character references cannot be empty";b[C]="Numeric character references cannot be empty";b[y]="Named character references must be known";b[w]="Numeric character references cannot be disallowed";b[x]="Numeric character references cannot be outside the permissible Unicode range";function parseEntities(e,t){var r={};var i;var n;if(!t){t={}}for(n in h){i=t[n];r[n]=i===null||i===undefined?h[n]:i}if(r.position.indent||r.position.start){r.indent=r.position.indent||[];r.position=r.position.start}return parse(e,r)}function parse(e,t){var r=t.additional;var a=t.nonTerminated;var u=t.text;var h=t.reference;var F=t.warning;var S=t.textContext;var B=t.referenceContext;var k=t.warningContext;var O=t.position;var P=t.indent||[];var T=e.length;var I=0;var M=-1;var L=O.column||1;var j=O.line||1;var R="";var U=[];var N;var J;var z;var X;var G;var q;var W;var _;var V;var Y;var H;var $;var Z;var Q;var K;var ee;var te;var re;var ie;ee=now();_=F?parseError:c;I--;T++;while(++I65535){q-=65536;Y+=f(q>>>(10&1023)|55296);q=56320|q&1023}q=Y+f(q)}}if(!q){X=e.slice(Z-1,ie);R+=X;L+=X.length;I=ie-1}else{flush();ee=now();I=ie-1;L+=ie-Z+1;U.push(q);te=now();te.offset++;if(h){h.call(B,q,{start:ee,end:te},e.slice(Z-1,ie))}ee=te}}}return U.join("");function now(){return{line:j,column:L,offset:I+(O.offset||0)}}function parseError(e,t){var r=now();r.column+=t;r.offset+=t;F.call(k,b[e],r,e)}function at(t){return e.charAt(t)}function flush(){if(R){U.push(R);if(u){u.call(S,R,{start:ee,end:now()})}R=""}}}function prohibited(e){return e>=55296&&e<=57343||e>1114111}function disallowed(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}},,,function(e,t,r){"use strict";var i=r(36);var n=r(116);var a=r(171);var u=r(82);e.exports=emphasis;emphasis.locator=u;var s="*";var o="_";var l="\\";function emphasis(e,t,r){var u=this;var f=0;var c=t.charAt(f);var h;var p;var v;var d;var D;var m;var g;if(c!==s&&c!==o){return}p=u.options.pedantic;D=c;v=c;m=t.length;f++;d="";c="";if(p&&a(t.charAt(f))){return}while(f0){if(typeof t!=="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==l.prototype){t=_uint8ArrayToBuffer(t)}if(i){if(a.endEmitted)e.emit("error",new Error("stream.unshift() after end event"));else addChunk(e,a,t,true)}else if(a.ended){e.emit("error",new Error("stream.push() after EOF"))}else{a.reading=false;if(a.decoder&&!r){t=a.decoder.write(t);if(a.objectMode||t.length!==0)addChunk(e,a,t,false);else maybeReadMore(e,a)}else{addChunk(e,a,t,false)}}}else if(!i){a.reading=false}}return needMoreData(a)}function addChunk(e,t,r,i){if(t.flowing&&t.length===0&&!t.sync){e.emit("data",r);e.read(0)}else{t.length+=t.objectMode?1:r.length;if(i)t.buffer.unshift(r);else t.buffer.push(r);if(t.needReadable)emitReadable(e)}maybeReadMore(e,t)}function chunkInvalid(e,t){var r;if(!_isUint8Array(t)&&typeof t!=="string"&&t!==undefined&&!e.objectMode){r=new TypeError("Invalid non-string/buffer chunk")}return r}function needMoreData(e){return!e.ended&&(e.needReadable||e.length=g){e=g}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function howMuchToRead(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e){if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length}if(e>t.highWaterMark)t.highWaterMark=computeNewHighWaterMark(e);if(e<=t.length)return e;if(!t.ended){t.needReadable=true;return 0}return t.length}Readable.prototype.read=function(e){p("read",e);e=parseInt(e,10);var t=this._readableState;var r=e;if(e!==0)t.emittedReadable=false;if(e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended)){p("read: emitReadable",t.length,t.ended);if(t.length===0&&t.ended)endReadable(this);else emitReadable(this);return null}e=howMuchToRead(e,t);if(e===0&&t.ended){if(t.length===0)endReadable(this);return null}var i=t.needReadable;p("need readable",i);if(t.length===0||t.length-e0)n=fromList(e,t);else n=null;if(n===null){t.needReadable=true;e=0}else{t.length-=e}if(t.length===0){if(!t.ended)t.needReadable=true;if(r!==e&&t.ended)endReadable(this)}if(n!==null)this.emit("data",n);return n};function onEofChunk(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length){t.buffer.push(r);t.length+=t.objectMode?1:r.length}}t.ended=true;emitReadable(e)}function emitReadable(e){var t=e._readableState;t.needReadable=false;if(!t.emittedReadable){p("emitReadable",t.flowing);t.emittedReadable=true;if(t.sync)i.nextTick(emitReadable_,e);else emitReadable_(e)}}function emitReadable_(e){p("emit readable");e.emit("readable");flow(e)}function maybeReadMore(e,t){if(!t.readingMore){t.readingMore=true;i.nextTick(maybeReadMore_,e,t)}}function maybeReadMore_(e,t){var r=t.length;while(!t.reading&&!t.flowing&&!t.ended&&t.length1&&indexOf(n.pipes,e)!==-1)&&!l){p("false write response, pause",r._readableState.awaitDrain);r._readableState.awaitDrain++;f=true}r.pause()}}function onerror(t){p("onerror",t);unpipe();e.removeListener("error",onerror);if(s(e,"error")===0)e.emit("error",t)}prependListener(e,"error",onerror);function onclose(){e.removeListener("finish",onfinish);unpipe()}e.once("close",onclose);function onfinish(){p("onfinish");e.removeListener("close",onclose);unpipe()}e.once("finish",onfinish);function unpipe(){p("unpipe");r.unpipe(e)}e.emit("pipe",r);if(!n.flowing){p("pipe resume");r.resume()}return e};function pipeOnDrain(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain);if(t.awaitDrain)t.awaitDrain--;if(t.awaitDrain===0&&s(e,"data")){t.flowing=true;flow(e)}}}Readable.prototype.unpipe=function(e){var t=this._readableState;var r={hasUnpiped:false};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;t.pipes=null;t.pipesCount=0;t.flowing=false;if(e)e.emit("unpipe",this,r);return this}if(!e){var i=t.pipes;var n=t.pipesCount;t.pipes=null;t.pipesCount=0;t.flowing=false;for(var a=0;a=t.length){if(t.decoder)r=t.buffer.join("");else if(t.buffer.length===1)r=t.buffer.head.data;else r=t.buffer.concat(t.length);t.buffer.clear()}else{r=fromListPartial(e,t.buffer,t.decoder)}return r}function fromListPartial(e,t,r){var i;if(ea.length?a.length:e;if(u===a.length)n+=a;else n+=a.slice(0,e);e-=u;if(e===0){if(u===a.length){++i;if(r.next)t.head=r.next;else t.head=t.tail=null}else{t.head=r;r.data=a.slice(u)}break}++i}t.length-=i;return n}function copyFromBuffer(e,t){var r=l.allocUnsafe(e);var i=t.head;var n=1;i.data.copy(r);e-=i.data.length;while(i=i.next){var a=i.data;var u=e>a.length?a.length:e;a.copy(r,r.length-e,0,u);e-=u;if(e===0){if(u===a.length){++n;if(i.next)t.head=i.next;else t.head=t.tail=null}else{t.head=i;i.data=a.slice(u)}break}++n}t.length-=n;return r}function endReadable(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!t.endEmitted){t.ended=true;i.nextTick(endReadableNT,t,e)}}function endReadableNT(e,t){if(!e.endEmitted&&e.length===0){e.endEmitted=true;t.readable=false;t.emit("end")}}function indexOf(e,t){for(var r=0,i=e.length;r=f){continue}y="";while(v=2){t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}}catch(e){}t.inspectOpts=Object.keys(process.env).filter(function(e){return/^debug_/i.test(e)}).reduce(function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,function(e,t){return t.toUpperCase()});var i=process.env[t];if(/^(yes|on|true|enabled)$/i.test(i)){i=true}else if(/^(no|off|false|disabled)$/i.test(i)){i=false}else if(i==="null"){i=null}else{i=Number(i)}e[r]=i;return e},{});function useColors(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):i.isatty(process.stderr.fd)}function formatArgs(t){var r=this.namespace,i=this.useColors;if(i){var n=this.color;var a="[3"+(n<8?n:"8;5;"+n);var u=" ".concat(a,";1m").concat(r," ");t[0]=u+t[0].split("\n").join("\n"+u);t.push(a+"m+"+e.exports.humanize(this.diff)+"")}else{t[0]=getDate()+r+" "+t[0]}}function getDate(){if(t.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(){return process.stderr.write(n.format.apply(n,arguments)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};var r=Object.keys(t.inspectOpts);for(var i=0;i=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},,,function(e){"use strict";e.exports=locate;function locate(e,t){var r=e.indexOf("[",t);var i=e.indexOf("![",t);if(i===-1){return r}return r

Gold Sponsors

-

Shopify Salesforce Badoo Airbnb Facebook Open Source

Silver Sponsors

-

AMP Project

Bronze Sponsors

-

clay Discord ThemeIsle TekHattan Marfeel Fire Stick Tricks JSHeroes Faithlife

+

Shopify Salesforce Badoo Airbnb Facebook Open Source

Silver Sponsors

+

AMP Project

Bronze Sponsors

+

clay Discord ThemeIsle TekHattan Marfeel Fire Stick Tricks JSHeroes Faithlife

## Technology Sponsors diff --git a/tools/node_modules/eslint/bin/eslint.js b/tools/node_modules/eslint/bin/eslint.js index b6b14d3a2ba79b..061e94767f0b92 100755 --- a/tools/node_modules/eslint/bin/eslint.js +++ b/tools/node_modules/eslint/bin/eslint.js @@ -9,6 +9,9 @@ "use strict"; +// to use V8's code cache to speed up instantiation time +require("v8-compile-cache"); + //------------------------------------------------------------------------------ // Helpers //------------------------------------------------------------------------------ diff --git a/tools/node_modules/eslint/lib/cli-engine/cli-engine.js b/tools/node_modules/eslint/lib/cli-engine/cli-engine.js index 81e1b07c83e9fa..7f80887f086464 100644 --- a/tools/node_modules/eslint/lib/cli-engine/cli-engine.js +++ b/tools/node_modules/eslint/lib/cli-engine/cli-engine.js @@ -20,6 +20,7 @@ const path = require("path"); const defaultOptions = require("../../conf/default-cli-options"); const pkg = require("../../package.json"); const ConfigOps = require("../shared/config-ops"); +const naming = require("../shared/naming"); const ModuleResolver = require("../shared/relative-module-resolver"); const { Linter } = require("../linter"); const builtInRules = require("../rules"); @@ -29,7 +30,6 @@ const { FileEnumerator } = require("./file-enumerator"); const hash = require("./hash"); const { IgnoredPaths } = require("./ignored-paths"); const LintResultCache = require("./lint-result-cache"); -const naming = require("./naming"); const debug = require("debug")("eslint:cli-engine"); const validFixTypes = new Set(["problem", "suggestion", "layout"]); @@ -734,7 +734,10 @@ class CLIEngine { try { fs.unlinkSync(cacheFilePath); } catch (error) { - if (!error || error.code !== "ENOENT") { + const errorCode = error && error.code; + + // Ignore errors when no such file exists or file system is read only (and cache file does not exist) + if (errorCode !== "ENOENT" && !(errorCode === "EROFS" && !fs.existsSync(cacheFilePath))) { throw error; } } diff --git a/tools/node_modules/eslint/lib/cli-engine/config-array-factory.js b/tools/node_modules/eslint/lib/cli-engine/config-array-factory.js index 782bb1d148f4bb..95430c358df754 100644 --- a/tools/node_modules/eslint/lib/cli-engine/config-array-factory.js +++ b/tools/node_modules/eslint/lib/cli-engine/config-array-factory.js @@ -38,9 +38,9 @@ const path = require("path"); const importFresh = require("import-fresh"); const stripComments = require("strip-json-comments"); const { validateConfigSchema } = require("../shared/config-validator"); +const naming = require("../shared/naming"); const ModuleResolver = require("../shared/relative-module-resolver"); const { ConfigArray, ConfigDependency, OverrideTester } = require("./config-array"); -const naming = require("./naming"); const debug = require("debug")("eslint:config-array-factory"); //------------------------------------------------------------------------------ diff --git a/tools/node_modules/eslint/lib/cli-engine/file-enumerator.js b/tools/node_modules/eslint/lib/cli-engine/file-enumerator.js index 2840d9fe2da75a..a027359ae511b1 100644 --- a/tools/node_modules/eslint/lib/cli-engine/file-enumerator.js +++ b/tools/node_modules/eslint/lib/cli-engine/file-enumerator.js @@ -292,26 +292,18 @@ class FileEnumerator { _iterateFiles(pattern) { const { cwd, globInputPaths } = internalSlotsMap.get(this); const absolutePath = path.resolve(cwd, pattern); - - if (globInputPaths && isGlobPattern(pattern)) { - return this._iterateFilesWithGlob( - absolutePath, - dotfilesPattern.test(pattern) - ); - } - + const isDot = dotfilesPattern.test(pattern); const stat = statSafeSync(absolutePath); if (stat && stat.isDirectory()) { - return this._iterateFilesWithDirectory( - absolutePath, - dotfilesPattern.test(pattern) - ); + return this._iterateFilesWithDirectory(absolutePath, isDot); } - if (stat && stat.isFile()) { return this._iterateFilesWithFile(absolutePath); } + if (globInputPaths && isGlobPattern(pattern)) { + return this._iterateFilesWithGlob(absolutePath, isDot); + } return []; } diff --git a/tools/node_modules/eslint/lib/init/config-initializer.js b/tools/node_modules/eslint/lib/init/config-initializer.js index 4d52377d26789a..17aa96505a3fe4 100644 --- a/tools/node_modules/eslint/lib/init/config-initializer.js +++ b/tools/node_modules/eslint/lib/init/config-initializer.js @@ -18,6 +18,7 @@ const util = require("util"), recConfig = require("../../conf/eslint-recommended"), ConfigOps = require("../shared/config-ops"), log = require("../shared/logging"), + naming = require("../shared/naming"), ModuleResolver = require("../shared/relative-module-resolver"), autoconfig = require("./autoconfig.js"), ConfigFile = require("./config-file"), @@ -97,17 +98,26 @@ function getModulesList(config, installESLint) { // Create a list of modules which should be installed based on config if (config.plugins) { for (const plugin of config.plugins) { - modules[`eslint-plugin-${plugin}`] = "latest"; + const moduleName = naming.normalizePackageName(plugin, "eslint-plugin"); + + modules[moduleName] = "latest"; } } - if (config.extends && config.extends.indexOf("eslint:") === -1) { - const moduleName = `eslint-config-${config.extends}`; - - modules[moduleName] = "latest"; - Object.assign( - modules, - getPeerDependencies(`${moduleName}@latest`) - ); + if (config.extends) { + const extendList = Array.isArray(config.extends) ? config.extends : [config.extends]; + + for (const extend of extendList) { + if (extend.startsWith("eslint:") || extend.startsWith("plugin:")) { + continue; + } + const moduleName = naming.normalizePackageName(extend, "eslint-config"); + + modules[moduleName] = "latest"; + Object.assign( + modules, + getPeerDependencies(`${moduleName}@latest`) + ); + } } if (installESLint === false) { diff --git a/tools/node_modules/eslint/lib/linter/linter.js b/tools/node_modules/eslint/lib/linter/linter.js index 6324706974674b..a49d850859b392 100644 --- a/tools/node_modules/eslint/lib/linter/linter.js +++ b/tools/node_modules/eslint/lib/linter/linter.js @@ -262,7 +262,7 @@ function createDisableDirectives(options) { */ function getDirectiveComments(filename, ast, ruleMapper) { const configuredRules = {}; - const enabledGlobals = {}; + const enabledGlobals = Object.create(null); const exportedVariables = {}; const problems = []; const disableDirectives = []; diff --git a/tools/node_modules/eslint/lib/rule-tester/rule-tester.js b/tools/node_modules/eslint/lib/rule-tester/rule-tester.js index 81f3a2fc4e7c24..0d1319c11a2fdc 100644 --- a/tools/node_modules/eslint/lib/rule-tester/rule-tester.js +++ b/tools/node_modules/eslint/lib/rule-tester/rule-tester.js @@ -549,8 +549,8 @@ class RuleTester { assert(false, `Invalid messageId '${error.messageId}'. Expected one of ${friendlyIDList}.`); } assert.strictEqual( - error.messageId, message.messageId, + error.messageId, `messageId '${message.messageId}' does not match expected messageId '${error.messageId}'.` ); if (hasOwnProperty(error, "data")) { diff --git a/tools/node_modules/eslint/lib/rules/arrow-body-style.js b/tools/node_modules/eslint/lib/rules/arrow-body-style.js index 6d84c7adfb1187..8d3b400037a6d5 100644 --- a/tools/node_modules/eslint/lib/rules/arrow-body-style.js +++ b/tools/node_modules/eslint/lib/rules/arrow-body-style.js @@ -175,10 +175,10 @@ module.exports = { } /* - * If the first token of the reutrn value is `{`, + * If the first token of the reutrn value is `{` or the return value is a sequence expression, * enclose the return value by parentheses to avoid syntax error. */ - if (astUtils.isOpeningBraceToken(firstValueToken)) { + if (astUtils.isOpeningBraceToken(firstValueToken) || blockBody[0].argument.type === "SequenceExpression") { fixes.push( fixer.insertTextBefore(firstValueToken, "("), fixer.insertTextAfter(lastValueToken, ")") diff --git a/tools/node_modules/eslint/lib/rules/dot-location.js b/tools/node_modules/eslint/lib/rules/dot-location.js index b9857ae2394ed8..c2e734a1a0b141 100644 --- a/tools/node_modules/eslint/lib/rules/dot-location.js +++ b/tools/node_modules/eslint/lib/rules/dot-location.js @@ -54,29 +54,31 @@ module.exports = { */ function checkDotLocation(obj, prop, node) { const dot = sourceCode.getTokenBefore(prop); - const textBeforeDot = sourceCode.getText().slice(obj.range[1], dot.range[0]); + + // `obj` expression can be parenthesized, but those paren tokens are not a part of the `obj` node. + const tokenBeforeDot = sourceCode.getTokenBefore(dot); + + const textBeforeDot = sourceCode.getText().slice(tokenBeforeDot.range[1], dot.range[0]); const textAfterDot = sourceCode.getText().slice(dot.range[1], prop.range[0]); - if (dot.type === "Punctuator" && dot.value === ".") { - if (onObject) { - if (!astUtils.isTokenOnSameLine(obj, dot)) { - const neededTextAfterObj = astUtils.isDecimalInteger(obj) ? " " : ""; - - context.report({ - node, - loc: dot.loc.start, - messageId: "expectedDotAfterObject", - fix: fixer => fixer.replaceTextRange([obj.range[1], prop.range[0]], `${neededTextAfterObj}.${textBeforeDot}${textAfterDot}`) - }); - } - } else if (!astUtils.isTokenOnSameLine(dot, prop)) { + if (onObject) { + if (!astUtils.isTokenOnSameLine(tokenBeforeDot, dot)) { + const neededTextAfterToken = astUtils.isDecimalIntegerNumericToken(tokenBeforeDot) ? " " : ""; + context.report({ node, loc: dot.loc.start, - messageId: "expectedDotBeforeProperty", - fix: fixer => fixer.replaceTextRange([obj.range[1], prop.range[0]], `${textBeforeDot}${textAfterDot}.`) + messageId: "expectedDotAfterObject", + fix: fixer => fixer.replaceTextRange([tokenBeforeDot.range[1], prop.range[0]], `${neededTextAfterToken}.${textBeforeDot}${textAfterDot}`) }); } + } else if (!astUtils.isTokenOnSameLine(dot, prop)) { + context.report({ + node, + loc: dot.loc.start, + messageId: "expectedDotBeforeProperty", + fix: fixer => fixer.replaceTextRange([tokenBeforeDot.range[1], prop.range[0]], `${textBeforeDot}${textAfterDot}.`) + }); } } @@ -86,7 +88,9 @@ module.exports = { * @returns {void} */ function checkNode(node) { - checkDotLocation(node.object, node.property, node); + if (!node.computed) { + checkDotLocation(node.object, node.property, node); + } } return { diff --git a/tools/node_modules/eslint/lib/rules/no-extra-parens.js b/tools/node_modules/eslint/lib/rules/no-extra-parens.js index 98fc49654cb951..6c3198b5f02bd1 100644 --- a/tools/node_modules/eslint/lib/rules/no-extra-parens.js +++ b/tools/node_modules/eslint/lib/rules/no-extra-parens.js @@ -81,6 +81,8 @@ module.exports = { const PRECEDENCE_OF_ASSIGNMENT_EXPR = precedence({ type: "AssignmentExpression" }); const PRECEDENCE_OF_UPDATE_EXPR = precedence({ type: "UpdateExpression" }); + let reportsBuffer; + /** * Determines if this rule should be enforced for a node given the current configuration. * @param {ASTNode} node - The node to be checked. @@ -316,19 +318,33 @@ module.exports = { } } - context.report({ - node, - loc: leftParenToken.loc.start, - messageId: "unexpected", - fix(fixer) { - const parenthesizedSource = sourceCode.text.slice(leftParenToken.range[1], rightParenToken.range[0]); + /** + * Finishes reporting + * @returns {void} + * @private + */ + function finishReport() { + context.report({ + node, + loc: leftParenToken.loc.start, + messageId: "unexpected", + fix(fixer) { + const parenthesizedSource = sourceCode.text.slice(leftParenToken.range[1], rightParenToken.range[0]); + + return fixer.replaceTextRange([ + leftParenToken.range[0], + rightParenToken.range[1] + ], (requiresLeadingSpace(node) ? " " : "") + parenthesizedSource + (requiresTrailingSpace(node) ? " " : "")); + } + }); + } - return fixer.replaceTextRange([ - leftParenToken.range[0], - rightParenToken.range[1] - ], (requiresLeadingSpace(node) ? " " : "") + parenthesizedSource + (requiresTrailingSpace(node) ? " " : "")); - } - }); + if (reportsBuffer) { + reportsBuffer.reports.push({ node, finishReport }); + return; + } + + finishReport(); } /** @@ -498,6 +514,126 @@ module.exports = { } } + /** + * Finds the path from the given node to the specified ancestor. + * @param {ASTNode} node First node in the path. + * @param {ASTNode} ancestor Last node in the path. + * @returns {ASTNode[]} Path, including both nodes. + * @throws {Error} If the given node does not have the specified ancestor. + */ + function pathToAncestor(node, ancestor) { + const path = [node]; + let currentNode = node; + + while (currentNode !== ancestor) { + + currentNode = currentNode.parent; + + /* istanbul ignore if */ + if (currentNode === null) { + throw new Error("Nodes are not in the ancestor-descendant relationship."); + } + + path.push(currentNode); + } + + return path; + } + + /** + * Finds the path from the given node to the specified descendant. + * @param {ASTNode} node First node in the path. + * @param {ASTNode} descendant Last node in the path. + * @returns {ASTNode[]} Path, including both nodes. + * @throws {Error} If the given node does not have the specified descendant. + */ + function pathToDescendant(node, descendant) { + return pathToAncestor(descendant, node).reverse(); + } + + /** + * Checks whether the syntax of the given ancestor of an 'in' expression inside a for-loop initializer + * is preventing the 'in' keyword from being interpreted as a part of an ill-formed for-in loop. + * + * @param {ASTNode} node Ancestor of an 'in' expression. + * @param {ASTNode} child Child of the node, ancestor of the same 'in' expression or the 'in' expression itself. + * @returns {boolean} True if the keyword 'in' would be interpreted as the 'in' operator, without any parenthesis. + */ + function isSafelyEnclosingInExpression(node, child) { + switch (node.type) { + case "ArrayExpression": + case "ArrayPattern": + case "BlockStatement": + case "ObjectExpression": + case "ObjectPattern": + case "TemplateLiteral": + return true; + case "ArrowFunctionExpression": + case "FunctionExpression": + return node.params.includes(child); + case "CallExpression": + case "NewExpression": + return node.arguments.includes(child); + case "MemberExpression": + return node.computed && node.property === child; + case "ConditionalExpression": + return node.consequent === child; + default: + return false; + } + } + + /** + * Starts a new reports buffering. Warnings will be stored in a buffer instead of being reported immediately. + * An additional logic that requires multiple nodes (e.g. a whole subtree) may dismiss some of the stored warnings. + * + * @returns {void} + */ + function startNewReportsBuffering() { + reportsBuffer = { + upper: reportsBuffer, + inExpressionNodes: [], + reports: [] + }; + } + + /** + * Ends the current reports buffering. + * @returns {void} + */ + function endCurrentReportsBuffering() { + const { upper, inExpressionNodes, reports } = reportsBuffer; + + if (upper) { + upper.inExpressionNodes.push(...inExpressionNodes); + upper.reports.push(...reports); + } else { + + // flush remaining reports + reports.forEach(({ finishReport }) => finishReport()); + } + + reportsBuffer = upper; + } + + /** + * Checks whether the given node is in the current reports buffer. + * @param {ASTNode} node Node to check. + * @returns {boolean} True if the node is in the current buffer, false otherwise. + */ + function isInCurrentReportsBuffer(node) { + return reportsBuffer.reports.some(r => r.node === node); + } + + /** + * Removes the given node from the current reports buffer. + * @param {ASTNode} node Node to remove. + * @returns {void} + */ + function removeFromCurrentReportsBuffer(node) { + reportsBuffer.reports = reportsBuffer.reports.filter(r => r.node !== node); + } + return { ArrayExpression(node) { node.elements @@ -540,7 +676,14 @@ module.exports = { } }, - BinaryExpression: checkBinaryLogical, + BinaryExpression(node) { + if (reportsBuffer && node.operator === "in") { + reportsBuffer.inExpressionNodes.push(node); + } + + checkBinaryLogical(node); + }, + CallExpression: checkCallNew, ConditionalExpression(node) { @@ -602,10 +745,6 @@ module.exports = { }, ForStatement(node) { - if (node.init && hasExcessParens(node.init)) { - report(node.init); - } - if (node.test && hasExcessParens(node.test) && !isCondAssignException(node)) { report(node.test); } @@ -613,6 +752,81 @@ module.exports = { if (node.update && hasExcessParens(node.update)) { report(node.update); } + + if (node.init) { + startNewReportsBuffering(); + + if (hasExcessParens(node.init)) { + report(node.init); + } + } + }, + + "ForStatement > *.init:exit"(node) { + + /* + * Removing parentheses around `in` expressions might change semantics and cause errors. + * + * For example, this valid for loop: + * for (let a = (b in c); ;); + * after removing parentheses would be treated as an invalid for-in loop: + * for (let a = b in c; ;); + */ + + if (reportsBuffer.reports.length) { + reportsBuffer.inExpressionNodes.forEach(inExpressionNode => { + const path = pathToDescendant(node, inExpressionNode); + let nodeToExclude; + + for (let i = 0; i < path.length; i++) { + const pathNode = path[i]; + + if (i < path.length - 1) { + const nextPathNode = path[i + 1]; + + if (isSafelyEnclosingInExpression(pathNode, nextPathNode)) { + + // The 'in' expression in safely enclosed by the syntax of its ancestor nodes (e.g. by '{}' or '[]'). + return; + } + } + + if (isParenthesised(pathNode)) { + if (isInCurrentReportsBuffer(pathNode)) { + + // This node was supposed to be reported, but parentheses might be necessary. + + if (isParenthesisedTwice(pathNode)) { + + /* + * This node is parenthesised twice, it certainly has at least one pair of `extra` parentheses. + * If the --fix option is on, the current fixing iteration will remove only one pair of parentheses. + * The remaining pair is safely enclosing the 'in' expression. + */ + return; + } + + // Exclude the outermost node only. + if (!nodeToExclude) { + nodeToExclude = pathNode; + } + + // Don't break the loop here, there might be some safe nodes or parentheses that will stay inside. + + } else { + + // This node will stay parenthesised, the 'in' expression in safely enclosed by '()'. + return; + } + } + } + + // Exclude the node from the list (i.e. treat parentheses as necessary) + removeFromCurrentReportsBuffer(nodeToExclude); + }); + } + + endCurrentReportsBuffering(); }, IfStatement(node) { @@ -664,6 +878,16 @@ module.exports = { }).forEach(property => report(property.value)); }, + Property(node) { + if (node.computed) { + const { key } = node; + + if (key && hasExcessParens(key) && precedence(key) >= PRECEDENCE_OF_ASSIGNMENT_EXPR) { + report(key); + } + } + }, + ReturnStatement(node) { const returnToken = sourceCode.getFirstToken(node); diff --git a/tools/node_modules/eslint/lib/rules/no-param-reassign.js b/tools/node_modules/eslint/lib/rules/no-param-reassign.js index 880ff93cb53dc3..9b8c828d2c2a1d 100644 --- a/tools/node_modules/eslint/lib/rules/no-param-reassign.js +++ b/tools/node_modules/eslint/lib/rules/no-param-reassign.js @@ -67,7 +67,8 @@ module.exports = { let node = reference.identifier; let parent = node.parent; - while (parent && !stopNodePattern.test(parent.type)) { + while (parent && (!stopNodePattern.test(parent.type) || + parent.type === "ForInStatement" || parent.type === "ForOfStatement")) { switch (parent.type) { // e.g. foo.a = 0; @@ -85,6 +86,16 @@ module.exports = { } break; + // e.g. for (foo.a in b) {} + case "ForInStatement": + case "ForOfStatement": + if (parent.left === node) { + return true; + } + + // this is a stop node for parent.right and parent.body + return false; + // EXCLUDES: e.g. cache.get(foo.a).b = 0; case "CallExpression": if (parent.callee !== node) { diff --git a/tools/node_modules/eslint/lib/rules/prefer-const.js b/tools/node_modules/eslint/lib/rules/prefer-const.js index 68c07da4ed99e7..854da310e4be72 100644 --- a/tools/node_modules/eslint/lib/rules/prefer-const.js +++ b/tools/node_modules/eslint/lib/rules/prefer-const.js @@ -420,8 +420,9 @@ module.exports = { let shouldFix = varDeclParent && - // Don't do a fix unless the variable is initialized (or it's in a for-in or for-of loop) - (varDeclParent.parent.type === "ForInStatement" || varDeclParent.parent.type === "ForOfStatement" || varDeclParent.declarations[0].init) && + // Don't do a fix unless all variables in the declarations are initialized (or it's in a for-in or for-of loop) + (varDeclParent.parent.type === "ForInStatement" || varDeclParent.parent.type === "ForOfStatement" || + varDeclParent.declarations.every(declaration => declaration.init)) && /* * If options.destructuring is "all", then this warning will not occur unless @@ -450,7 +451,12 @@ module.exports = { node, messageId: "useConst", data: node, - fix: shouldFix ? fixer => fixer.replaceText(sourceCode.getFirstToken(varDeclParent), "const") : null + fix: shouldFix + ? fixer => fixer.replaceText( + sourceCode.getFirstToken(varDeclParent, t => t.value === varDeclParent.kind), + "const" + ) + : null }); }); } diff --git a/tools/node_modules/eslint/lib/rules/utils/ast-utils.js b/tools/node_modules/eslint/lib/rules/utils/ast-utils.js index 1aef4c162d40de..78ae7bc015778f 100644 --- a/tools/node_modules/eslint/lib/rules/utils/ast-utils.js +++ b/tools/node_modules/eslint/lib/rules/utils/ast-utils.js @@ -37,6 +37,8 @@ const LINEBREAKS = new Set(["\r\n", "\r", "\n", "\u2028", "\u2029"]); // A set of node types that can contain a list of statements const STATEMENT_LIST_PARENTS = new Set(["Program", "BlockStatement", "SwitchCase"]); +const DECIMAL_INTEGER_PATTERN = /^(0|[1-9]\d*)$/u; + /** * Checks reference if is non initializer and writable. * @param {Reference} reference - A reference to check. @@ -283,6 +285,16 @@ function isCommaToken(token) { return token.value === "," && token.type === "Punctuator"; } +/** + * Checks if the given token is a dot token or not. + * + * @param {Token} token - The token to check. + * @returns {boolean} `true` if the token is a dot token. + */ +function isDotToken(token) { + return token.value === "." && token.type === "Punctuator"; +} + /** * Checks if the given token is a semicolon token or not. * @@ -462,12 +474,14 @@ module.exports = { isColonToken, isCommaToken, isCommentToken, + isDotToken, isKeywordToken, isNotClosingBraceToken: negate(isClosingBraceToken), isNotClosingBracketToken: negate(isClosingBracketToken), isNotClosingParenToken: negate(isClosingParenToken), isNotColonToken: negate(isColonToken), isNotCommaToken: negate(isCommaToken), + isNotDotToken: negate(isDotToken), isNotOpeningBraceToken: negate(isOpeningBraceToken), isNotOpeningBracketToken: negate(isOpeningBracketToken), isNotOpeningParenToken: negate(isOpeningParenToken), @@ -988,7 +1002,18 @@ module.exports = { * '5' // false */ isDecimalInteger(node) { - return node.type === "Literal" && typeof node.value === "number" && /^(0|[1-9]\d*)$/u.test(node.raw); + return node.type === "Literal" && typeof node.value === "number" && + DECIMAL_INTEGER_PATTERN.test(node.raw); + }, + + /** + * Determines whether this token is a decimal integer numeric token. + * This is similar to isDecimalInteger(), but for tokens. + * @param {Token} token - The token to check. + * @returns {boolean} `true` if this token is a decimal integer. + */ + isDecimalIntegerNumericToken(token) { + return token.type === "Numeric" && DECIMAL_INTEGER_PATTERN.test(token.value); }, /** diff --git a/tools/node_modules/eslint/lib/cli-engine/naming.js b/tools/node_modules/eslint/lib/shared/naming.js similarity index 100% rename from tools/node_modules/eslint/lib/cli-engine/naming.js rename to tools/node_modules/eslint/lib/shared/naming.js diff --git a/tools/node_modules/eslint/node_modules/@babel/code-frame/LICENSE b/tools/node_modules/eslint/node_modules/@babel/code-frame/LICENSE index 620366eb90071c..f31575ec773bb1 100644 --- a/tools/node_modules/eslint/node_modules/@babel/code-frame/LICENSE +++ b/tools/node_modules/eslint/node_modules/@babel/code-frame/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2014-2018 Sebastian McKenzie +Copyright (c) 2014-present Sebastian McKenzie and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/tools/node_modules/eslint/node_modules/@babel/code-frame/lib/index.js b/tools/node_modules/eslint/node_modules/@babel/code-frame/lib/index.js index 1f64c6ce7b992d..35176fbc0682ca 100644 --- a/tools/node_modules/eslint/node_modules/@babel/code-frame/lib/index.js +++ b/tools/node_modules/eslint/node_modules/@babel/code-frame/lib/index.js @@ -66,7 +66,7 @@ function getMarkerLines(loc, source, opts) { markerLines[lineNumber] = true; } else if (i === 0) { const sourceLength = source[lineNumber - 1].length; - markerLines[lineNumber] = [startColumn, sourceLength - startColumn]; + markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1]; } else if (i === lineDiff) { markerLines[lineNumber] = [0, endColumn]; } else { @@ -102,7 +102,6 @@ function codeFrameColumns(rawLines, loc, opts = {}) { return highlighted ? chalkFn(string) : string; }; - if (highlighted) rawLines = (0, _highlight().default)(rawLines, opts); const lines = rawLines.split(NEWLINE); const { start, @@ -111,7 +110,8 @@ function codeFrameColumns(rawLines, loc, opts = {}) { } = getMarkerLines(loc, lines, opts); const hasColumns = loc.start && typeof loc.start.column === "number"; const numberMaxWidth = String(end).length; - let frame = lines.slice(start, end).map((line, index) => { + const highlightedLines = highlighted ? (0, _highlight().default)(rawLines, opts) : rawLines; + let frame = highlightedLines.split(NEWLINE).slice(start, end).map((line, index) => { const number = start + 1 + index; const paddedNumber = ` ${number}`.slice(-numberMaxWidth); const gutter = ` ${paddedNumber} | `; diff --git a/tools/node_modules/eslint/node_modules/@babel/code-frame/package.json b/tools/node_modules/eslint/node_modules/@babel/code-frame/package.json index f3b551dfa972de..d619d9a8f53194 100644 --- a/tools/node_modules/eslint/node_modules/@babel/code-frame/package.json +++ b/tools/node_modules/eslint/node_modules/@babel/code-frame/package.json @@ -13,13 +13,17 @@ "chalk": "^2.0.0", "strip-ansi": "^4.0.0" }, + "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43", "homepage": "https://babeljs.io/", "license": "MIT", "main": "lib/index.js", "name": "@babel/code-frame", + "publishConfig": { + "access": "public" + }, "repository": { "type": "git", "url": "https://github.com/babel/babel/tree/master/packages/babel-code-frame" }, - "version": "7.0.0" + "version": "7.5.5" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/@babel/highlight/LICENSE b/tools/node_modules/eslint/node_modules/@babel/highlight/LICENSE index 620366eb90071c..f31575ec773bb1 100644 --- a/tools/node_modules/eslint/node_modules/@babel/highlight/LICENSE +++ b/tools/node_modules/eslint/node_modules/@babel/highlight/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2014-2018 Sebastian McKenzie +Copyright (c) 2014-present Sebastian McKenzie and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/tools/node_modules/eslint/node_modules/@babel/highlight/package.json b/tools/node_modules/eslint/node_modules/@babel/highlight/package.json index ff84c66ec29732..9c16718356c0a9 100644 --- a/tools/node_modules/eslint/node_modules/@babel/highlight/package.json +++ b/tools/node_modules/eslint/node_modules/@babel/highlight/package.json @@ -14,13 +14,17 @@ "devDependencies": { "strip-ansi": "^4.0.0" }, + "gitHead": "49da9a07c81156e997e60146eb001ea77b7044c4", "homepage": "https://babeljs.io/", "license": "MIT", "main": "lib/index.js", "name": "@babel/highlight", + "publishConfig": { + "access": "public" + }, "repository": { "type": "git", "url": "https://github.com/babel/babel/tree/master/packages/babel-highlight" }, - "version": "7.0.0" + "version": "7.5.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/acorn/README.md b/tools/node_modules/eslint/node_modules/acorn/README.md index 3e5f58d95dea95..fa372ee6821bab 100644 --- a/tools/node_modules/eslint/node_modules/acorn/README.md +++ b/tools/node_modules/eslint/node_modules/acorn/README.md @@ -54,7 +54,7 @@ an object containing any of these fields: - **ecmaVersion**: Indicates the ECMAScript version to parse. Must be either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018) or 10 (2019, partial support). This influences support for strict mode, the set of - reserved words, and support for new syntax features. Default is 7. + reserved words, and support for new syntax features. Default is 9. **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being implemented by Acorn. Other proposed new features can be implemented @@ -260,10 +260,7 @@ The utility spits out the syntax tree as JSON data. Plugins for ECMAScript proposals: - [`acorn-stage3`](https://github.com/acornjs/acorn-stage3): Parse most stage 3 proposals, bundling: - - [`acorn-async-iteration`](https://github.com/acornjs/acorn-async-iteration): Parse [async iteration proposal](https://github.com/tc39/proposal-async-iteration) - - [`acorn-bigint`](https://github.com/acornjs/acorn-bigint): Parse [BigInt proposal](https://github.com/tc39/proposal-bigint) - [`acorn-class-fields`](https://github.com/acornjs/acorn-class-fields): Parse [class fields proposal](https://github.com/tc39/proposal-class-fields) - - [`acorn-dynamic-import`](https://github.com/kesne/acorn-dynamic-import): Parse [import() proposal](https://github.com/tc39/proposal-dynamic-import) - [`acorn-import-meta`](https://github.com/acornjs/acorn-import-meta): Parse [import.meta proposal](https://github.com/tc39/proposal-import-meta) - [`acorn-numeric-separator`](https://github.com/acornjs/acorn-numeric-separator): Parse [numeric separator proposal](https://github.com/tc39/proposal-numeric-separator) - [`acorn-private-methods`](https://github.com/acornjs/acorn-private-methods): parse [private methods, getters and setters proposal](https://github.com/tc39/proposal-private-methods)n diff --git a/tools/node_modules/eslint/node_modules/acorn/dist/acorn.js b/tools/node_modules/eslint/node_modules/acorn/dist/acorn.js index 0f5bce21806b4d..ae755fa230043f 100644 --- a/tools/node_modules/eslint/node_modules/acorn/dist/acorn.js +++ b/tools/node_modules/eslint/node_modules/acorn/dist/acorn.js @@ -1,5018 +1,4970 @@ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.acorn = {}))); -}(this, (function (exports) { 'use strict'; - -// Reserved word lists for various dialects of the language - -var reservedWords = { - 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", - 5: "class enum extends super const export import", - 6: "enum", - strict: "implements interface let package private protected public static yield", - strictBind: "eval arguments" -}; - -// And the keywords - -var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; - -var keywords = { - 5: ecma5AndLessKeywords, - 6: ecma5AndLessKeywords + " const class extends export import super" -}; - -var keywordRelationalOperator = /^in(stanceof)?$/; - -// ## Character categories - -// Big ugly regular expressions that match characters in the -// whitespace, identifier, and identifier-start categories. These -// are only applied when a character is found to actually have a -// code point above 128. -// Generated by `bin/generate-identifier-regex.js`. - -var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7b9\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; -var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; - -var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); -var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); - -nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; - -// These are a run-length and offset encoded representation of the -// >0xffff code points that are a valid part of identifiers. The -// offset starts at 0x10000, and each pair of numbers represents an -// offset to the next range, and then a size of the range. They were -// generated by bin/generate-identifier-regex.js - -// eslint-disable-next-line comma-spacing -var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,190,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,26,230,43,117,63,32,0,257,0,11,39,8,0,22,0,12,39,3,3,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,68,12,0,67,12,65,1,31,6129,15,754,9486,286,82,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541]; - -// eslint-disable-next-line comma-spacing -var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,280,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239]; - -// This has a complexity linear to the value of the code. The -// assumption is that looking up astral identifier characters is -// rare. -function isInAstralSet(code, set) { - var pos = 0x10000; - for (var i = 0; i < set.length; i += 2) { - pos += set[i]; - if (pos > code) { return false } - pos += set[i + 1]; - if (pos >= code) { return true } - } -} - -// Test whether a given character code starts an identifier. - -function isIdentifierStart(code, astral) { - if (code < 65) { return code === 36 } - if (code < 91) { return true } - if (code < 97) { return code === 95 } - if (code < 123) { return true } - if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) } - if (astral === false) { return false } - return isInAstralSet(code, astralIdentifierStartCodes) -} - -// Test whether a given character is part of an identifier. - -function isIdentifierChar(code, astral) { - if (code < 48) { return code === 36 } - if (code < 58) { return true } - if (code < 65) { return false } - if (code < 91) { return true } - if (code < 97) { return code === 95 } - if (code < 123) { return true } - if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) } - if (astral === false) { return false } - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) -} - -// ## Token types - -// The assignment of fine-grained, information-carrying type objects -// allows the tokenizer to store the information it has about a -// token in a way that is very cheap for the parser to look up. - -// All token type variables start with an underscore, to make them -// easy to recognize. - -// The `beforeExpr` property is used to disambiguate between regular -// expressions and divisions. It is set on all token types that can -// be followed by an expression (thus, a slash after them would be a -// regular expression). -// -// The `startsExpr` property is used to check if the token ends a -// `yield` expression. It is set on all token types that either can -// directly start an expression (like a quotation mark) or can -// continue an expression (like the body of a string). -// -// `isLoop` marks a keyword as starting a loop, which is important -// to know when parsing a label, in order to allow or disallow -// continue jumps to that label. - -var TokenType = function TokenType(label, conf) { - if ( conf === void 0 ) conf = {}; - - this.label = label; - this.keyword = conf.keyword; - this.beforeExpr = !!conf.beforeExpr; - this.startsExpr = !!conf.startsExpr; - this.isLoop = !!conf.isLoop; - this.isAssign = !!conf.isAssign; - this.prefix = !!conf.prefix; - this.postfix = !!conf.postfix; - this.binop = conf.binop || null; - this.updateContext = null; -}; - -function binop(name, prec) { - return new TokenType(name, {beforeExpr: true, binop: prec}) -} -var beforeExpr = {beforeExpr: true}; -var startsExpr = {startsExpr: true}; - -// Map keyword names to token types. - -var keywords$1 = {}; - -// Succinct definitions of keyword token types -function kw(name, options) { - if ( options === void 0 ) options = {}; - - options.keyword = name; - return keywords$1[name] = new TokenType(name, options) -} - -var types = { - num: new TokenType("num", startsExpr), - regexp: new TokenType("regexp", startsExpr), - string: new TokenType("string", startsExpr), - name: new TokenType("name", startsExpr), - eof: new TokenType("eof"), - - // Punctuation token types. - bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), - bracketR: new TokenType("]"), - braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), - braceR: new TokenType("}"), - parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), - parenR: new TokenType(")"), - comma: new TokenType(",", beforeExpr), - semi: new TokenType(";", beforeExpr), - colon: new TokenType(":", beforeExpr), - dot: new TokenType("."), - question: new TokenType("?", beforeExpr), - arrow: new TokenType("=>", beforeExpr), - template: new TokenType("template"), - invalidTemplate: new TokenType("invalidTemplate"), - ellipsis: new TokenType("...", beforeExpr), - backQuote: new TokenType("`", startsExpr), - dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), - - // Operators. These carry several kinds of properties to help the - // parser use them properly (the presence of these properties is - // what categorizes them as operators). - // - // `binop`, when present, specifies that this operator is a binary - // operator, and will refer to its precedence. - // - // `prefix` and `postfix` mark the operator as a prefix or postfix - // unary operator. - // - // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as - // binary operators with a very low precedence, that should result - // in AssignmentExpression nodes. - - eq: new TokenType("=", {beforeExpr: true, isAssign: true}), - assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), - incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), - prefix: new TokenType("!/~", {beforeExpr: true, prefix: true, startsExpr: true}), - logicalOR: binop("||", 1), - logicalAND: binop("&&", 2), - bitwiseOR: binop("|", 3), - bitwiseXOR: binop("^", 4), - bitwiseAND: binop("&", 5), - equality: binop("==/!=/===/!==", 6), - relational: binop("/<=/>=", 7), - bitShift: binop("<>/>>>", 8), - plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), - modulo: binop("%", 10), - star: binop("*", 10), - slash: binop("/", 10), - starstar: new TokenType("**", {beforeExpr: true}), - - // Keyword token types. - _break: kw("break"), - _case: kw("case", beforeExpr), - _catch: kw("catch"), - _continue: kw("continue"), - _debugger: kw("debugger"), - _default: kw("default", beforeExpr), - _do: kw("do", {isLoop: true, beforeExpr: true}), - _else: kw("else", beforeExpr), - _finally: kw("finally"), - _for: kw("for", {isLoop: true}), - _function: kw("function", startsExpr), - _if: kw("if"), - _return: kw("return", beforeExpr), - _switch: kw("switch"), - _throw: kw("throw", beforeExpr), - _try: kw("try"), - _var: kw("var"), - _const: kw("const"), - _while: kw("while", {isLoop: true}), - _with: kw("with"), - _new: kw("new", {beforeExpr: true, startsExpr: true}), - _this: kw("this", startsExpr), - _super: kw("super", startsExpr), - _class: kw("class", startsExpr), - _extends: kw("extends", beforeExpr), - _export: kw("export"), - _import: kw("import"), - _null: kw("null", startsExpr), - _true: kw("true", startsExpr), - _false: kw("false", startsExpr), - _in: kw("in", {beforeExpr: true, binop: 7}), - _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), - _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), - _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), - _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) -}; - -// Matches a whole line break (where CRLF is considered a single -// line break). Used to count lines. - -var lineBreak = /\r\n?|\n|\u2028|\u2029/; -var lineBreakG = new RegExp(lineBreak.source, "g"); - -function isNewLine(code, ecma2019String) { - return code === 10 || code === 13 || (!ecma2019String && (code === 0x2028 || code === 0x2029)) -} - -var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/; - -var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; - -var ref = Object.prototype; -var hasOwnProperty = ref.hasOwnProperty; -var toString = ref.toString; - -// Checks if an object has a property. - -function has(obj, propName) { - return hasOwnProperty.call(obj, propName) -} - -var isArray = Array.isArray || (function (obj) { return ( - toString.call(obj) === "[object Array]" -); }); - -function wordsRegexp(words) { - return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$") -} - -// These are used when `options.locations` is on, for the -// `startLoc` and `endLoc` properties. - -var Position = function Position(line, col) { - this.line = line; - this.column = col; -}; - -Position.prototype.offset = function offset (n) { - return new Position(this.line, this.column + n) -}; - -var SourceLocation = function SourceLocation(p, start, end) { - this.start = start; - this.end = end; - if (p.sourceFile !== null) { this.source = p.sourceFile; } -}; - -// The `getLineInfo` function is mostly useful when the -// `locations` option is off (for performance reasons) and you -// want to find the line/column position for a given character -// offset. `input` should be the code string that the offset refers -// into. - -function getLineInfo(input, offset) { - for (var line = 1, cur = 0;;) { - lineBreakG.lastIndex = cur; - var match = lineBreakG.exec(input); - if (match && match.index < offset) { - ++line; - cur = match.index + match[0].length; - } else { - return new Position(line, offset - cur) + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = global || self, factory(global.acorn = {})); +}(this, function (exports) { 'use strict'; + + // Reserved word lists for various dialects of the language + + var reservedWords = { + 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", + 5: "class enum extends super const export import", + 6: "enum", + strict: "implements interface let package private protected public static yield", + strictBind: "eval arguments" + }; + + // And the keywords + + var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; + + var keywords = { + 5: ecma5AndLessKeywords, + 6: ecma5AndLessKeywords + " const class extends export import super" + }; + + var keywordRelationalOperator = /^in(stanceof)?$/; + + // ## Character categories + + // Big ugly regular expressions that match characters in the + // whitespace, identifier, and identifier-start categories. These + // are only applied when a character is found to actually have a + // code point above 128. + // Generated by `bin/generate-identifier-regex.js`. + var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7c6\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab67\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; + var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; + + var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); + var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + + nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; + + // These are a run-length and offset encoded representation of the + // >0xffff code points that are a valid part of identifiers. The + // offset starts at 0x10000, and each pair of numbers represents an + // offset to the next range, and then a size of the range. They were + // generated by bin/generate-identifier-regex.js + + // eslint-disable-next-line comma-spacing + var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,155,22,13,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,0,33,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,0,161,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,754,9486,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541]; + + // eslint-disable-next-line comma-spacing + var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,232,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,792487,239]; + + // This has a complexity linear to the value of the code. The + // assumption is that looking up astral identifier characters is + // rare. + function isInAstralSet(code, set) { + var pos = 0x10000; + for (var i = 0; i < set.length; i += 2) { + pos += set[i]; + if (pos > code) { return false } + pos += set[i + 1]; + if (pos >= code) { return true } } } -} - -// A second optional argument can be given to further configure -// the parser process. These options are recognized: - -var defaultOptions = { - // `ecmaVersion` indicates the ECMAScript version to parse. Must be - // either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), or 10 - // (2019). This influences support for strict mode, the set of - // reserved words, and support for new syntax features. The default - // is 9. - ecmaVersion: 9, - // `sourceType` indicates the mode the code should be parsed in. - // Can be either `"script"` or `"module"`. This influences global - // strict mode and parsing of `import` and `export` declarations. - sourceType: "script", - // `onInsertedSemicolon` can be a callback that will be called - // when a semicolon is automatically inserted. It will be passed - // the position of the comma as an offset, and if `locations` is - // enabled, it is given the location as a `{line, column}` object - // as second argument. - onInsertedSemicolon: null, - // `onTrailingComma` is similar to `onInsertedSemicolon`, but for - // trailing commas. - onTrailingComma: null, - // By default, reserved words are only enforced if ecmaVersion >= 5. - // Set `allowReserved` to a boolean value to explicitly turn this on - // an off. When this option has the value "never", reserved words - // and keywords can also not be used as property names. - allowReserved: null, - // When enabled, a return at the top level is not considered an - // error. - allowReturnOutsideFunction: false, - // When enabled, import/export statements are not constrained to - // appearing at the top of the program. - allowImportExportEverywhere: false, - // When enabled, await identifiers are allowed to appear at the top-level scope, - // but they are still not allowed in non-async functions. - allowAwaitOutsideFunction: false, - // When enabled, hashbang directive in the beginning of file - // is allowed and treated as a line comment. - allowHashBang: false, - // When `locations` is on, `loc` properties holding objects with - // `start` and `end` properties in `{line, column}` form (with - // line being 1-based and column 0-based) will be attached to the - // nodes. - locations: false, - // A function can be passed as `onToken` option, which will - // cause Acorn to call that function with object in the same - // format as tokens returned from `tokenizer().getToken()`. Note - // that you are not allowed to call the parser from the - // callback—that will corrupt its internal state. - onToken: null, - // A function can be passed as `onComment` option, which will - // cause Acorn to call that function with `(block, text, start, - // end)` parameters whenever a comment is skipped. `block` is a - // boolean indicating whether this is a block (`/* */`) comment, - // `text` is the content of the comment, and `start` and `end` are - // character offsets that denote the start and end of the comment. - // When the `locations` option is on, two more parameters are - // passed, the full `{line, column}` locations of the start and - // end of the comments. Note that you are not allowed to call the - // parser from the callback—that will corrupt its internal state. - onComment: null, - // Nodes have their start and end characters offsets recorded in - // `start` and `end` properties (directly on the node, rather than - // the `loc` object, which holds line/column data. To also add a - // [semi-standardized][range] `range` property holding a `[start, - // end]` array with the same numbers, set the `ranges` option to - // `true`. - // - // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 - ranges: false, - // It is possible to parse multiple files into a single AST by - // passing the tree produced by parsing the first file as - // `program` option in subsequent parses. This will add the - // toplevel forms of the parsed file to the `Program` (top) node - // of an existing parse tree. - program: null, - // When `locations` is on, you can pass this to record the source - // file in every node's `loc` object. - sourceFile: null, - // This value, if given, is stored in every node, whether - // `locations` is on or off. - directSourceFile: null, - // When enabled, parenthesized expressions are represented by - // (non-standard) ParenthesizedExpression nodes - preserveParens: false -}; - -// Interpret and default an options object - -function getOptions(opts) { - var options = {}; - - for (var opt in defaultOptions) - { options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; } - - if (options.ecmaVersion >= 2015) - { options.ecmaVersion -= 2009; } - - if (options.allowReserved == null) - { options.allowReserved = options.ecmaVersion < 5; } - - if (isArray(options.onToken)) { - var tokens = options.onToken; - options.onToken = function (token) { return tokens.push(token); }; - } - if (isArray(options.onComment)) - { options.onComment = pushComment(options, options.onComment); } - - return options -} - -function pushComment(options, array) { - return function(block, text, start, end, startLoc, endLoc) { - var comment = { - type: block ? "Block" : "Line", - value: text, - start: start, - end: end - }; - if (options.locations) - { comment.loc = new SourceLocation(this, startLoc, endLoc); } - if (options.ranges) - { comment.range = [start, end]; } - array.push(comment); - } -} - -// Each scope gets a bitset that may contain these flags -var SCOPE_TOP = 1; -var SCOPE_FUNCTION = 2; -var SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION; -var SCOPE_ASYNC = 4; -var SCOPE_GENERATOR = 8; -var SCOPE_ARROW = 16; -var SCOPE_SIMPLE_CATCH = 32; -var SCOPE_SUPER = 64; -var SCOPE_DIRECT_SUPER = 128; - -function functionFlags(async, generator) { - return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0) -} - -// Used in checkLVal and declareName to determine the type of a binding -var BIND_NONE = 0; -var BIND_VAR = 1; -var BIND_LEXICAL = 2; -var BIND_FUNCTION = 3; -var BIND_SIMPLE_CATCH = 4; -var BIND_OUTSIDE = 5; // Special case for function names as bound inside the function - -var Parser = function Parser(options, input, startPos) { - this.options = options = getOptions(options); - this.sourceFile = options.sourceFile; - this.keywords = wordsRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]); - var reserved = ""; - if (!options.allowReserved) { - for (var v = options.ecmaVersion;; v--) - { if (reserved = reservedWords[v]) { break } } - if (options.sourceType === "module") { reserved += " await"; } - } - this.reservedWords = wordsRegexp(reserved); - var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict; - this.reservedWordsStrict = wordsRegexp(reservedStrict); - this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind); - this.input = String(input); - - // Used to signal to callers of `readWord1` whether the word - // contained any escape sequences. This is needed because words with - // escape sequences must not be interpreted as keywords. - this.containsEsc = false; - - // Set up token state - - // The current position of the tokenizer in the input. - if (startPos) { - this.pos = startPos; - this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1; - this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; - } else { - this.pos = this.lineStart = 0; - this.curLine = 1; - } - // Properties of the current token: - // Its type - this.type = types.eof; - // For tokens that include more information than their type, the value - this.value = null; - // Its start and end offset - this.start = this.end = this.pos; - // And, if locations are used, the {line, column} object - // corresponding to those offsets - this.startLoc = this.endLoc = this.curPosition(); - - // Position information for the previous token - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; - - // The context stack is used to superficially track syntactic - // context to predict whether a regular expression is allowed in a - // given position. - this.context = this.initialContext(); - this.exprAllowed = true; - - // Figure out if it's a module code. - this.inModule = options.sourceType === "module"; - this.strict = this.inModule || this.strictDirective(this.pos); - - // Used to signify the start of a potential arrow function - this.potentialArrowAt = -1; - - // Positions to delayed-check that yield/await does not exist in default parameters. - this.yieldPos = this.awaitPos = this.awaitIdentPos = 0; - // Labels in scope. - this.labels = []; - // Thus-far undefined exports. - this.undefinedExports = {}; - - // If enabled, skip leading hashbang line. - if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") - { this.skipLineComment(2); } - - // Scope tracking for duplicate variable names (see scope.js) - this.scopeStack = []; - this.enterScope(SCOPE_TOP); - - // For RegExp validation - this.regexpState = null; -}; - -var prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true } }; - -Parser.prototype.parse = function parse () { - var node = this.options.program || this.startNode(); - this.nextToken(); - return this.parseTopLevel(node) -}; - -prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 }; -prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 }; -prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 }; -prototypeAccessors.allowSuper.get = function () { return (this.currentThisScope().flags & SCOPE_SUPER) > 0 }; -prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 }; -prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) }; - -// Switch to a getter for 7.0.0. -Parser.prototype.inNonArrowFunction = function inNonArrowFunction () { return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0 }; - -Parser.extend = function extend () { - var plugins = [], len = arguments.length; - while ( len-- ) plugins[ len ] = arguments[ len ]; - - var cls = this; - for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); } - return cls -}; - -Parser.parse = function parse (input, options) { - return new this(options, input).parse() -}; - -Parser.parseExpressionAt = function parseExpressionAt (input, pos, options) { - var parser = new this(options, input, pos); - parser.nextToken(); - return parser.parseExpression() -}; - -Parser.tokenizer = function tokenizer (input, options) { - return new this(options, input) -}; - -Object.defineProperties( Parser.prototype, prototypeAccessors ); - -var pp = Parser.prototype; - -// ## Parser utilities - -var literal = /^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)")/; -pp.strictDirective = function(start) { - var this$1 = this; - - for (;;) { - // Try to find string literal. - skipWhiteSpace.lastIndex = start; - start += skipWhiteSpace.exec(this$1.input)[0].length; - var match = literal.exec(this$1.input.slice(start)); - if (!match) { return false } - if ((match[1] || match[2]) === "use strict") { return true } - start += match[0].length; - - // Skip semicolon, if any. - skipWhiteSpace.lastIndex = start; - start += skipWhiteSpace.exec(this$1.input)[0].length; - if (this$1.input[start] === ";") - { start++; } + // Test whether a given character code starts an identifier. + + function isIdentifierStart(code, astral) { + if (code < 65) { return code === 36 } + if (code < 91) { return true } + if (code < 97) { return code === 95 } + if (code < 123) { return true } + if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) } + if (astral === false) { return false } + return isInAstralSet(code, astralIdentifierStartCodes) } -}; -// Predicate that tests whether the next token is of the given -// type, and if yes, consumes it as a side effect. + // Test whether a given character is part of an identifier. -pp.eat = function(type) { - if (this.type === type) { - this.next(); - return true - } else { - return false + function isIdentifierChar(code, astral) { + if (code < 48) { return code === 36 } + if (code < 58) { return true } + if (code < 65) { return false } + if (code < 91) { return true } + if (code < 97) { return code === 95 } + if (code < 123) { return true } + if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) } + if (astral === false) { return false } + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) } -}; - -// Tests whether parsed token is a contextual keyword. -pp.isContextual = function(name) { - return this.type === types.name && this.value === name && !this.containsEsc -}; + // ## Token types -// Consumes contextual keyword if possible. + // The assignment of fine-grained, information-carrying type objects + // allows the tokenizer to store the information it has about a + // token in a way that is very cheap for the parser to look up. -pp.eatContextual = function(name) { - if (!this.isContextual(name)) { return false } - this.next(); - return true -}; + // All token type variables start with an underscore, to make them + // easy to recognize. -// Asserts that following token is given contextual keyword. + // The `beforeExpr` property is used to disambiguate between regular + // expressions and divisions. It is set on all token types that can + // be followed by an expression (thus, a slash after them would be a + // regular expression). + // + // The `startsExpr` property is used to check if the token ends a + // `yield` expression. It is set on all token types that either can + // directly start an expression (like a quotation mark) or can + // continue an expression (like the body of a string). + // + // `isLoop` marks a keyword as starting a loop, which is important + // to know when parsing a label, in order to allow or disallow + // continue jumps to that label. + + var TokenType = function TokenType(label, conf) { + if ( conf === void 0 ) conf = {}; + + this.label = label; + this.keyword = conf.keyword; + this.beforeExpr = !!conf.beforeExpr; + this.startsExpr = !!conf.startsExpr; + this.isLoop = !!conf.isLoop; + this.isAssign = !!conf.isAssign; + this.prefix = !!conf.prefix; + this.postfix = !!conf.postfix; + this.binop = conf.binop || null; + this.updateContext = null; + }; -pp.expectContextual = function(name) { - if (!this.eatContextual(name)) { this.unexpected(); } -}; + function binop(name, prec) { + return new TokenType(name, {beforeExpr: true, binop: prec}) + } + var beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true}; + + // Map keyword names to token types. + + var keywords$1 = {}; + + // Succinct definitions of keyword token types + function kw(name, options) { + if ( options === void 0 ) options = {}; + + options.keyword = name; + return keywords$1[name] = new TokenType(name, options) + } + + var types = { + num: new TokenType("num", startsExpr), + regexp: new TokenType("regexp", startsExpr), + string: new TokenType("string", startsExpr), + name: new TokenType("name", startsExpr), + eof: new TokenType("eof"), + + // Punctuation token types. + bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), + bracketR: new TokenType("]"), + braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), + braceR: new TokenType("}"), + parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), + parenR: new TokenType(")"), + comma: new TokenType(",", beforeExpr), + semi: new TokenType(";", beforeExpr), + colon: new TokenType(":", beforeExpr), + dot: new TokenType("."), + question: new TokenType("?", beforeExpr), + arrow: new TokenType("=>", beforeExpr), + template: new TokenType("template"), + invalidTemplate: new TokenType("invalidTemplate"), + ellipsis: new TokenType("...", beforeExpr), + backQuote: new TokenType("`", startsExpr), + dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), + + // Operators. These carry several kinds of properties to help the + // parser use them properly (the presence of these properties is + // what categorizes them as operators). + // + // `binop`, when present, specifies that this operator is a binary + // operator, and will refer to its precedence. + // + // `prefix` and `postfix` mark the operator as a prefix or postfix + // unary operator. + // + // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as + // binary operators with a very low precedence, that should result + // in AssignmentExpression nodes. + + eq: new TokenType("=", {beforeExpr: true, isAssign: true}), + assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), + incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), + prefix: new TokenType("!/~", {beforeExpr: true, prefix: true, startsExpr: true}), + logicalOR: binop("||", 1), + logicalAND: binop("&&", 2), + bitwiseOR: binop("|", 3), + bitwiseXOR: binop("^", 4), + bitwiseAND: binop("&", 5), + equality: binop("==/!=/===/!==", 6), + relational: binop("/<=/>=", 7), + bitShift: binop("<>/>>>", 8), + plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), + modulo: binop("%", 10), + star: binop("*", 10), + slash: binop("/", 10), + starstar: new TokenType("**", {beforeExpr: true}), + + // Keyword token types. + _break: kw("break"), + _case: kw("case", beforeExpr), + _catch: kw("catch"), + _continue: kw("continue"), + _debugger: kw("debugger"), + _default: kw("default", beforeExpr), + _do: kw("do", {isLoop: true, beforeExpr: true}), + _else: kw("else", beforeExpr), + _finally: kw("finally"), + _for: kw("for", {isLoop: true}), + _function: kw("function", startsExpr), + _if: kw("if"), + _return: kw("return", beforeExpr), + _switch: kw("switch"), + _throw: kw("throw", beforeExpr), + _try: kw("try"), + _var: kw("var"), + _const: kw("const"), + _while: kw("while", {isLoop: true}), + _with: kw("with"), + _new: kw("new", {beforeExpr: true, startsExpr: true}), + _this: kw("this", startsExpr), + _super: kw("super", startsExpr), + _class: kw("class", startsExpr), + _extends: kw("extends", beforeExpr), + _export: kw("export"), + _import: kw("import", startsExpr), + _null: kw("null", startsExpr), + _true: kw("true", startsExpr), + _false: kw("false", startsExpr), + _in: kw("in", {beforeExpr: true, binop: 7}), + _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), + _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), + _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), + _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) + }; -// Test whether a semicolon can be inserted at the current position. + // Matches a whole line break (where CRLF is considered a single + // line break). Used to count lines. -pp.canInsertSemicolon = function() { - return this.type === types.eof || - this.type === types.braceR || - lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) -}; + var lineBreak = /\r\n?|\n|\u2028|\u2029/; + var lineBreakG = new RegExp(lineBreak.source, "g"); -pp.insertSemicolon = function() { - if (this.canInsertSemicolon()) { - if (this.options.onInsertedSemicolon) - { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); } - return true + function isNewLine(code, ecma2019String) { + return code === 10 || code === 13 || (!ecma2019String && (code === 0x2028 || code === 0x2029)) } -}; -// Consume a semicolon, or, failing that, see if we are allowed to -// pretend that there is a semicolon at this position. + var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/; -pp.semicolon = function() { - if (!this.eat(types.semi) && !this.insertSemicolon()) { this.unexpected(); } -}; + var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; -pp.afterTrailingComma = function(tokType, notNext) { - if (this.type === tokType) { - if (this.options.onTrailingComma) - { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); } - if (!notNext) - { this.next(); } - return true - } -}; - -// Expect a token of a given type. If found, consume it, otherwise, -// raise an unexpected token error. - -pp.expect = function(type) { - this.eat(type) || this.unexpected(); -}; - -// Raise an unexpected token error. - -pp.unexpected = function(pos) { - this.raise(pos != null ? pos : this.start, "Unexpected token"); -}; - -function DestructuringErrors() { - this.shorthandAssign = - this.trailingComma = - this.parenthesizedAssign = - this.parenthesizedBind = - this.doubleProto = - -1; -} - -pp.checkPatternErrors = function(refDestructuringErrors, isAssign) { - if (!refDestructuringErrors) { return } - if (refDestructuringErrors.trailingComma > -1) - { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); } - var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind; - if (parens > -1) { this.raiseRecoverable(parens, "Parenthesized pattern"); } -}; - -pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) { - if (!refDestructuringErrors) { return false } - var shorthandAssign = refDestructuringErrors.shorthandAssign; - var doubleProto = refDestructuringErrors.doubleProto; - if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0 } - if (shorthandAssign >= 0) - { this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); } - if (doubleProto >= 0) - { this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); } -}; - -pp.checkYieldAwaitInDefaultParams = function() { - if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) - { this.raise(this.yieldPos, "Yield expression cannot be a default value"); } - if (this.awaitPos) - { this.raise(this.awaitPos, "Await expression cannot be a default value"); } -}; - -pp.isSimpleAssignTarget = function(expr) { - if (expr.type === "ParenthesizedExpression") - { return this.isSimpleAssignTarget(expr.expression) } - return expr.type === "Identifier" || expr.type === "MemberExpression" -}; - -var pp$1 = Parser.prototype; - -// ### Statement parsing - -// Parse a program. Initializes the parser, reads any number of -// statements, and wraps them in a Program node. Optionally takes a -// `program` argument. If present, the statements will be appended -// to its body instead of creating a new node. - -pp$1.parseTopLevel = function(node) { - var this$1 = this; - - var exports = {}; - if (!node.body) { node.body = []; } - while (this.type !== types.eof) { - var stmt = this$1.parseStatement(null, true, exports); - node.body.push(stmt); - } - if (this.inModule) - { for (var i = 0, list = Object.keys(this$1.undefinedExports); i < list.length; i += 1) - { - var name = list[i]; + var ref = Object.prototype; + var hasOwnProperty = ref.hasOwnProperty; + var toString = ref.toString; - this$1.raiseRecoverable(this$1.undefinedExports[name].start, ("Export '" + name + "' is not defined")); - } } - this.adaptDirectivePrologue(node.body); - this.next(); - if (this.options.ecmaVersion >= 6) { - node.sourceType = this.options.sourceType; - } - return this.finishNode(node, "Program") -}; - -var loopLabel = {kind: "loop"}; -var switchLabel = {kind: "switch"}; - -pp$1.isLet = function(context) { - if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { return false } - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); - // For ambiguous cases, determine if a LexicalDeclaration (or only a - // Statement) is allowed here. If context is not empty then only a Statement - // is allowed. However, `let [` is an explicit negative lookahead for - // ExpressionStatement, so special-case it first. - if (nextCh === 91) { return true } // '[' - if (context) { return false } - - if (nextCh === 123) { return true } // '{' - if (isIdentifierStart(nextCh, true)) { - var pos = next + 1; - while (isIdentifierChar(this.input.charCodeAt(pos), true)) { ++pos; } - var ident = this.input.slice(next, pos); - if (!keywordRelationalOperator.test(ident)) { return true } - } - return false -}; - -// check 'async [no LineTerminator here] function' -// - 'async /*foo*/ function' is OK. -// - 'async /*\n*/ function' is invalid. -pp$1.isAsyncFunction = function() { - if (this.options.ecmaVersion < 8 || !this.isContextual("async")) - { return false } - - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length; - return !lineBreak.test(this.input.slice(this.pos, next)) && - this.input.slice(next, next + 8) === "function" && - (next + 8 === this.input.length || !isIdentifierChar(this.input.charAt(next + 8))) -}; - -// Parse a single statement. -// -// If expecting a statement and finding a slash operator, parse a -// regular expression literal. This is to handle cases like -// `if (foo) /blah/.exec(foo)`, where looking at the previous token -// does not help. - -pp$1.parseStatement = function(context, topLevel, exports) { - var starttype = this.type, node = this.startNode(), kind; - - if (this.isLet(context)) { - starttype = types._var; - kind = "let"; + // Checks if an object has a property. + + function has(obj, propName) { + return hasOwnProperty.call(obj, propName) } - // Most types of statements are recognized by the keyword they - // start with. Many are trivial to parse, some require a bit of - // complexity. - - switch (starttype) { - case types._break: case types._continue: return this.parseBreakContinueStatement(node, starttype.keyword) - case types._debugger: return this.parseDebuggerStatement(node) - case types._do: return this.parseDoStatement(node) - case types._for: return this.parseForStatement(node) - case types._function: - // Function as sole body of either an if statement or a labeled statement - // works, but not when it is part of a labeled statement that is the sole - // body of an if statement. - if ((context && (this.strict || context !== "if" && context !== "label")) && this.options.ecmaVersion >= 6) { this.unexpected(); } - return this.parseFunctionStatement(node, false, !context) - case types._class: - if (context) { this.unexpected(); } - return this.parseClass(node, true) - case types._if: return this.parseIfStatement(node) - case types._return: return this.parseReturnStatement(node) - case types._switch: return this.parseSwitchStatement(node) - case types._throw: return this.parseThrowStatement(node) - case types._try: return this.parseTryStatement(node) - case types._const: case types._var: - kind = kind || this.value; - if (context && kind !== "var") { this.unexpected(); } - return this.parseVarStatement(node, kind) - case types._while: return this.parseWhileStatement(node) - case types._with: return this.parseWithStatement(node) - case types.braceL: return this.parseBlock(true, node) - case types.semi: return this.parseEmptyStatement(node) - case types._export: - case types._import: - if (!this.options.allowImportExportEverywhere) { - if (!topLevel) - { this.raise(this.start, "'import' and 'export' may only appear at the top level"); } - if (!this.inModule) - { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); } - } - return starttype === types._import ? this.parseImport(node) : this.parseExport(node, exports) - - // If the statement does not start with a statement keyword or a - // brace, it's an ExpressionStatement or LabeledStatement. We - // simply start parsing an expression, and afterwards, if the - // next token is a colon and the expression was a simple - // Identifier node, we switch to interpreting it as a label. - default: - if (this.isAsyncFunction()) { - if (context) { this.unexpected(); } - this.next(); - return this.parseFunctionStatement(node, true, !context) - } + var isArray = Array.isArray || (function (obj) { return ( + toString.call(obj) === "[object Array]" + ); }); - var maybeName = this.value, expr = this.parseExpression(); - if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) - { return this.parseLabeledStatement(node, maybeName, expr, context) } - else { return this.parseExpressionStatement(node, expr) } + function wordsRegexp(words) { + return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$") } -}; -pp$1.parseBreakContinueStatement = function(node, keyword) { - var this$1 = this; + // These are used when `options.locations` is on, for the + // `startLoc` and `endLoc` properties. - var isBreak = keyword === "break"; - this.next(); - if (this.eat(types.semi) || this.insertSemicolon()) { node.label = null; } - else if (this.type !== types.name) { this.unexpected(); } - else { - node.label = this.parseIdent(); - this.semicolon(); - } + var Position = function Position(line, col) { + this.line = line; + this.column = col; + }; - // Verify that there is an actual destination to break or - // continue to. - var i = 0; - for (; i < this.labels.length; ++i) { - var lab = this$1.labels[i]; - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === "loop")) { break } - if (node.label && isBreak) { break } - } - } - if (i === this.labels.length) { this.raise(node.start, "Unsyntactic " + keyword); } - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") -}; - -pp$1.parseDebuggerStatement = function(node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement") -}; - -pp$1.parseDoStatement = function(node) { - this.next(); - this.labels.push(loopLabel); - node.body = this.parseStatement("do"); - this.labels.pop(); - this.expect(types._while); - node.test = this.parseParenExpression(); - if (this.options.ecmaVersion >= 6) - { this.eat(types.semi); } - else - { this.semicolon(); } - return this.finishNode(node, "DoWhileStatement") -}; - -// Disambiguating between a `for` and a `for`/`in` or `for`/`of` -// loop is non-trivial. Basically, we have to parse the init `var` -// statement or expression, disallowing the `in` operator (see -// the second parameter to `parseExpression`), and then check -// whether the next token is `in` or `of`. When there is no init -// part (semicolon immediately after the opening parenthesis), it -// is a regular `for` loop. - -pp$1.parseForStatement = function(node) { - this.next(); - var awaitAt = (this.options.ecmaVersion >= 9 && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction)) && this.eatContextual("await")) ? this.lastTokStart : -1; - this.labels.push(loopLabel); - this.enterScope(0); - this.expect(types.parenL); - if (this.type === types.semi) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, null) - } - var isLet = this.isLet(); - if (this.type === types._var || this.type === types._const || isLet) { - var init$1 = this.startNode(), kind = isLet ? "let" : this.value; - this.next(); - this.parseVar(init$1, true, kind); - this.finishNode(init$1, "VariableDeclaration"); - if ((this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1 && - !(kind !== "var" && init$1.declarations[0].init)) { - if (this.options.ecmaVersion >= 9) { - if (this.type === types._in) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - } else { node.await = awaitAt > -1; } - } - return this.parseForIn(node, init$1) - } - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, init$1) - } - var refDestructuringErrors = new DestructuringErrors; - var init = this.parseExpression(true, refDestructuringErrors); - if (this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) { - if (this.options.ecmaVersion >= 9) { - if (this.type === types._in) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - } else { node.await = awaitAt > -1; } - } - this.toAssignable(init, false, refDestructuringErrors); - this.checkLVal(init); - return this.parseForIn(node, init) - } else { - this.checkExpressionErrors(refDestructuringErrors, true); - } - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, init) -}; - -pp$1.parseFunctionStatement = function(node, isAsync, declarationPosition) { - this.next(); - return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync) -}; - -pp$1.parseIfStatement = function(node) { - this.next(); - node.test = this.parseParenExpression(); - // allow function declarations in branches, but only in non-strict mode - node.consequent = this.parseStatement("if"); - node.alternate = this.eat(types._else) ? this.parseStatement("if") : null; - return this.finishNode(node, "IfStatement") -}; - -pp$1.parseReturnStatement = function(node) { - if (!this.inFunction && !this.options.allowReturnOutsideFunction) - { this.raise(this.start, "'return' outside of function"); } - this.next(); - - // In `return` (and `break`/`continue`), the keywords with - // optional arguments, we eagerly look for a semicolon or the - // possibility to insert one. - - if (this.eat(types.semi) || this.insertSemicolon()) { node.argument = null; } - else { node.argument = this.parseExpression(); this.semicolon(); } - return this.finishNode(node, "ReturnStatement") -}; - -pp$1.parseSwitchStatement = function(node) { - var this$1 = this; - - this.next(); - node.discriminant = this.parseParenExpression(); - node.cases = []; - this.expect(types.braceL); - this.labels.push(switchLabel); - this.enterScope(0); - - // Statements under must be grouped (by label) in SwitchCase - // nodes. `cur` is used to keep the node that we are currently - // adding statements to. - - var cur; - for (var sawDefault = false; this.type !== types.braceR;) { - if (this$1.type === types._case || this$1.type === types._default) { - var isCase = this$1.type === types._case; - if (cur) { this$1.finishNode(cur, "SwitchCase"); } - node.cases.push(cur = this$1.startNode()); - cur.consequent = []; - this$1.next(); - if (isCase) { - cur.test = this$1.parseExpression(); - } else { - if (sawDefault) { this$1.raiseRecoverable(this$1.lastTokStart, "Multiple default clauses"); } - sawDefault = true; - cur.test = null; - } - this$1.expect(types.colon); - } else { - if (!cur) { this$1.unexpected(); } - cur.consequent.push(this$1.parseStatement(null)); - } - } - this.exitScope(); - if (cur) { this.finishNode(cur, "SwitchCase"); } - this.next(); // Closing brace - this.labels.pop(); - return this.finishNode(node, "SwitchStatement") -}; - -pp$1.parseThrowStatement = function(node) { - this.next(); - if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) - { this.raise(this.lastTokEnd, "Illegal newline after throw"); } - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement") -}; - -// Reused empty array added for node fields that are always empty. - -var empty = []; - -pp$1.parseTryStatement = function(node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - if (this.type === types._catch) { - var clause = this.startNode(); - this.next(); - if (this.eat(types.parenL)) { - clause.param = this.parseBindingAtom(); - var simple = clause.param.type === "Identifier"; - this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0); - this.checkLVal(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL); - this.expect(types.parenR); - } else { - if (this.options.ecmaVersion < 10) { this.unexpected(); } - clause.param = null; - this.enterScope(0); - } - clause.body = this.parseBlock(false); - this.exitScope(); - node.handler = this.finishNode(clause, "CatchClause"); - } - node.finalizer = this.eat(types._finally) ? this.parseBlock() : null; - if (!node.handler && !node.finalizer) - { this.raise(node.start, "Missing catch or finally clause"); } - return this.finishNode(node, "TryStatement") -}; - -pp$1.parseVarStatement = function(node, kind) { - this.next(); - this.parseVar(node, false, kind); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration") -}; - -pp$1.parseWhileStatement = function(node) { - this.next(); - node.test = this.parseParenExpression(); - this.labels.push(loopLabel); - node.body = this.parseStatement("while"); - this.labels.pop(); - return this.finishNode(node, "WhileStatement") -}; - -pp$1.parseWithStatement = function(node) { - if (this.strict) { this.raise(this.start, "'with' in strict mode"); } - this.next(); - node.object = this.parseParenExpression(); - node.body = this.parseStatement("with"); - return this.finishNode(node, "WithStatement") -}; - -pp$1.parseEmptyStatement = function(node) { - this.next(); - return this.finishNode(node, "EmptyStatement") -}; - -pp$1.parseLabeledStatement = function(node, maybeName, expr, context) { - var this$1 = this; - - for (var i$1 = 0, list = this$1.labels; i$1 < list.length; i$1 += 1) - { - var label = list[i$1]; - - if (label.name === maybeName) - { this$1.raise(expr.start, "Label '" + maybeName + "' is already declared"); - } } - var kind = this.type.isLoop ? "loop" : this.type === types._switch ? "switch" : null; - for (var i = this.labels.length - 1; i >= 0; i--) { - var label$1 = this$1.labels[i]; - if (label$1.statementStart === node.start) { - // Update information about previous labels on this node - label$1.statementStart = this$1.start; - label$1.kind = kind; - } else { break } - } - this.labels.push({name: maybeName, kind: kind, statementStart: this.start}); - node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); - this.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement") -}; - -pp$1.parseExpressionStatement = function(node, expr) { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement") -}; - -// Parse a semicolon-enclosed block of statements, handling `"use -// strict"` declarations when `allowStrict` is true (used for -// function bodies). - -pp$1.parseBlock = function(createNewLexicalScope, node) { - var this$1 = this; - if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true; - if ( node === void 0 ) node = this.startNode(); - - node.body = []; - this.expect(types.braceL); - if (createNewLexicalScope) { this.enterScope(0); } - while (!this.eat(types.braceR)) { - var stmt = this$1.parseStatement(null); - node.body.push(stmt); - } - if (createNewLexicalScope) { this.exitScope(); } - return this.finishNode(node, "BlockStatement") -}; - -// Parse a regular `for` loop. The disambiguation code in -// `parseStatement` will already have parsed the init statement or -// expression. - -pp$1.parseFor = function(node, init) { - node.init = init; - this.expect(types.semi); - node.test = this.type === types.semi ? null : this.parseExpression(); - this.expect(types.semi); - node.update = this.type === types.parenR ? null : this.parseExpression(); - this.expect(types.parenR); - node.body = this.parseStatement("for"); - this.exitScope(); - this.labels.pop(); - return this.finishNode(node, "ForStatement") -}; - -// Parse a `for`/`in` and `for`/`of` loop, which are almost -// same from parser's perspective. - -pp$1.parseForIn = function(node, init) { - var type = this.type === types._in ? "ForInStatement" : "ForOfStatement"; - this.next(); - if (type === "ForInStatement") { - if (init.type === "AssignmentPattern" || - (init.type === "VariableDeclaration" && init.declarations[0].init != null && - (this.strict || init.declarations[0].id.type !== "Identifier"))) - { this.raise(init.start, "Invalid assignment in for-in loop head"); } - } - node.left = init; - node.right = type === "ForInStatement" ? this.parseExpression() : this.parseMaybeAssign(); - this.expect(types.parenR); - node.body = this.parseStatement("for"); - this.exitScope(); - this.labels.pop(); - return this.finishNode(node, type) -}; - -// Parse a list of variable declarations. - -pp$1.parseVar = function(node, isFor, kind) { - var this$1 = this; - - node.declarations = []; - node.kind = kind; - for (;;) { - var decl = this$1.startNode(); - this$1.parseVarId(decl, kind); - if (this$1.eat(types.eq)) { - decl.init = this$1.parseMaybeAssign(isFor); - } else if (kind === "const" && !(this$1.type === types._in || (this$1.options.ecmaVersion >= 6 && this$1.isContextual("of")))) { - this$1.unexpected(); - } else if (decl.id.type !== "Identifier" && !(isFor && (this$1.type === types._in || this$1.isContextual("of")))) { - this$1.raise(this$1.lastTokEnd, "Complex binding patterns require an initialization value"); - } else { - decl.init = null; - } - node.declarations.push(this$1.finishNode(decl, "VariableDeclarator")); - if (!this$1.eat(types.comma)) { break } - } - return node -}; + Position.prototype.offset = function offset (n) { + return new Position(this.line, this.column + n) + }; -pp$1.parseVarId = function(decl, kind) { - if ((kind === "const" || kind === "let") && this.isContextual("let")) { - this.raiseRecoverable(this.start, "let is disallowed as a lexically bound name"); - } - decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false); -}; - -var FUNC_STATEMENT = 1; -var FUNC_HANGING_STATEMENT = 2; -var FUNC_NULLABLE_ID = 4; - -// Parse a function declaration or literal (depending on the -// `statement & FUNC_STATEMENT`). - -// Remove `allowExpressionBody` for 7.0.0, as it is only called with false -pp$1.parseFunction = function(node, statement, allowExpressionBody, isAsync) { - this.initFunction(node); - if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) { - if (this.type === types.star && (statement & FUNC_HANGING_STATEMENT)) - { this.unexpected(); } - node.generator = this.eat(types.star); - } - if (this.options.ecmaVersion >= 8) - { node.async = !!isAsync; } - - if (statement & FUNC_STATEMENT) { - node.id = (statement & FUNC_NULLABLE_ID) && this.type !== types.name ? null : this.parseIdent(); - if (node.id && !(statement & FUNC_HANGING_STATEMENT)) - // If it is a regular function declaration in sloppy mode, then it is - // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding - // mode depends on properties of the current scope (see - // treatFunctionsAsVar). - { this.checkLVal(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); } - } + var SourceLocation = function SourceLocation(p, start, end) { + this.start = start; + this.end = end; + if (p.sourceFile !== null) { this.source = p.sourceFile; } + }; - var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - this.enterScope(functionFlags(node.async, node.generator)); - - if (!(statement & FUNC_STATEMENT)) - { node.id = this.type === types.name ? this.parseIdent() : null; } - - this.parseFunctionParams(node); - this.parseFunctionBody(node, allowExpressionBody, false); - - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, (statement & FUNC_STATEMENT) ? "FunctionDeclaration" : "FunctionExpression") -}; - -pp$1.parseFunctionParams = function(node) { - this.expect(types.parenL); - node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); - this.checkYieldAwaitInDefaultParams(); -}; - -// Parse a class declaration or literal (depending on the -// `isStatement` parameter). - -pp$1.parseClass = function(node, isStatement) { - var this$1 = this; - - this.next(); - - // ecma-262 14.6 Class Definitions - // A class definition is always strict mode code. - var oldStrict = this.strict; - this.strict = true; - - this.parseClassId(node, isStatement); - this.parseClassSuper(node); - var classBody = this.startNode(); - var hadConstructor = false; - classBody.body = []; - this.expect(types.braceL); - while (!this.eat(types.braceR)) { - var element = this$1.parseClassElement(node.superClass !== null); - if (element) { - classBody.body.push(element); - if (element.type === "MethodDefinition" && element.kind === "constructor") { - if (hadConstructor) { this$1.raise(element.start, "Duplicate constructor in the same class"); } - hadConstructor = true; + // The `getLineInfo` function is mostly useful when the + // `locations` option is off (for performance reasons) and you + // want to find the line/column position for a given character + // offset. `input` should be the code string that the offset refers + // into. + + function getLineInfo(input, offset) { + for (var line = 1, cur = 0;;) { + lineBreakG.lastIndex = cur; + var match = lineBreakG.exec(input); + if (match && match.index < offset) { + ++line; + cur = match.index + match[0].length; + } else { + return new Position(line, offset - cur) } } } - node.body = this.finishNode(classBody, "ClassBody"); - this.strict = oldStrict; - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") -}; - -pp$1.parseClassElement = function(constructorAllowsSuper) { - var this$1 = this; - - if (this.eat(types.semi)) { return null } - - var method = this.startNode(); - var tryContextual = function (k, noLineBreak) { - if ( noLineBreak === void 0 ) noLineBreak = false; - - var start = this$1.start, startLoc = this$1.startLoc; - if (!this$1.eatContextual(k)) { return false } - if (this$1.type !== types.parenL && (!noLineBreak || !this$1.canInsertSemicolon())) { return true } - if (method.key) { this$1.unexpected(); } - method.computed = false; - method.key = this$1.startNodeAt(start, startLoc); - method.key.name = k; - this$1.finishNode(method.key, "Identifier"); - return false - }; - method.kind = "method"; - method.static = tryContextual("static"); - var isGenerator = this.eat(types.star); - var isAsync = false; - if (!isGenerator) { - if (this.options.ecmaVersion >= 8 && tryContextual("async", true)) { - isAsync = true; - isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); - } else if (tryContextual("get")) { - method.kind = "get"; - } else if (tryContextual("set")) { - method.kind = "set"; - } - } - if (!method.key) { this.parsePropertyName(method); } - var key = method.key; - var allowsDirectSuper = false; - if (!method.computed && !method.static && (key.type === "Identifier" && key.name === "constructor" || - key.type === "Literal" && key.value === "constructor")) { - if (method.kind !== "method") { this.raise(key.start, "Constructor can't have get/set modifier"); } - if (isGenerator) { this.raise(key.start, "Constructor can't be a generator"); } - if (isAsync) { this.raise(key.start, "Constructor can't be an async method"); } - method.kind = "constructor"; - allowsDirectSuper = constructorAllowsSuper; - } else if (method.static && key.type === "Identifier" && key.name === "prototype") { - this.raise(key.start, "Classes may not have a static property named prototype"); - } - this.parseClassMethod(method, isGenerator, isAsync, allowsDirectSuper); - if (method.kind === "get" && method.value.params.length !== 0) - { this.raiseRecoverable(method.value.start, "getter should have no params"); } - if (method.kind === "set" && method.value.params.length !== 1) - { this.raiseRecoverable(method.value.start, "setter should have exactly one param"); } - if (method.kind === "set" && method.value.params[0].type === "RestElement") - { this.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params"); } - return method -}; - -pp$1.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) { - method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper); - return this.finishNode(method, "MethodDefinition") -}; - -pp$1.parseClassId = function(node, isStatement) { - if (this.type === types.name) { - node.id = this.parseIdent(); - if (isStatement) - { this.checkLVal(node.id, BIND_LEXICAL, false); } - } else { - if (isStatement === true) - { this.unexpected(); } - node.id = null; - } -}; + // A second optional argument can be given to further configure + // the parser process. These options are recognized: + + var defaultOptions = { + // `ecmaVersion` indicates the ECMAScript version to parse. Must be + // either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), or 10 + // (2019). This influences support for strict mode, the set of + // reserved words, and support for new syntax features. The default + // is 9. + ecmaVersion: 9, + // `sourceType` indicates the mode the code should be parsed in. + // Can be either `"script"` or `"module"`. This influences global + // strict mode and parsing of `import` and `export` declarations. + sourceType: "script", + // `onInsertedSemicolon` can be a callback that will be called + // when a semicolon is automatically inserted. It will be passed + // the position of the comma as an offset, and if `locations` is + // enabled, it is given the location as a `{line, column}` object + // as second argument. + onInsertedSemicolon: null, + // `onTrailingComma` is similar to `onInsertedSemicolon`, but for + // trailing commas. + onTrailingComma: null, + // By default, reserved words are only enforced if ecmaVersion >= 5. + // Set `allowReserved` to a boolean value to explicitly turn this on + // an off. When this option has the value "never", reserved words + // and keywords can also not be used as property names. + allowReserved: null, + // When enabled, a return at the top level is not considered an + // error. + allowReturnOutsideFunction: false, + // When enabled, import/export statements are not constrained to + // appearing at the top of the program. + allowImportExportEverywhere: false, + // When enabled, await identifiers are allowed to appear at the top-level scope, + // but they are still not allowed in non-async functions. + allowAwaitOutsideFunction: false, + // When enabled, hashbang directive in the beginning of file + // is allowed and treated as a line comment. + allowHashBang: false, + // When `locations` is on, `loc` properties holding objects with + // `start` and `end` properties in `{line, column}` form (with + // line being 1-based and column 0-based) will be attached to the + // nodes. + locations: false, + // A function can be passed as `onToken` option, which will + // cause Acorn to call that function with object in the same + // format as tokens returned from `tokenizer().getToken()`. Note + // that you are not allowed to call the parser from the + // callback—that will corrupt its internal state. + onToken: null, + // A function can be passed as `onComment` option, which will + // cause Acorn to call that function with `(block, text, start, + // end)` parameters whenever a comment is skipped. `block` is a + // boolean indicating whether this is a block (`/* */`) comment, + // `text` is the content of the comment, and `start` and `end` are + // character offsets that denote the start and end of the comment. + // When the `locations` option is on, two more parameters are + // passed, the full `{line, column}` locations of the start and + // end of the comments. Note that you are not allowed to call the + // parser from the callback—that will corrupt its internal state. + onComment: null, + // Nodes have their start and end characters offsets recorded in + // `start` and `end` properties (directly on the node, rather than + // the `loc` object, which holds line/column data. To also add a + // [semi-standardized][range] `range` property holding a `[start, + // end]` array with the same numbers, set the `ranges` option to + // `true`. + // + // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + ranges: false, + // It is possible to parse multiple files into a single AST by + // passing the tree produced by parsing the first file as + // `program` option in subsequent parses. This will add the + // toplevel forms of the parsed file to the `Program` (top) node + // of an existing parse tree. + program: null, + // When `locations` is on, you can pass this to record the source + // file in every node's `loc` object. + sourceFile: null, + // This value, if given, is stored in every node, whether + // `locations` is on or off. + directSourceFile: null, + // When enabled, parenthesized expressions are represented by + // (non-standard) ParenthesizedExpression nodes + preserveParens: false + }; -pp$1.parseClassSuper = function(node) { - node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null; -}; + // Interpret and default an options object -// Parses module export declaration. + function getOptions(opts) { + var options = {}; -pp$1.parseExport = function(node, exports) { - var this$1 = this; + for (var opt in defaultOptions) + { options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; } - this.next(); - // export * from '...' - if (this.eat(types.star)) { - this.expectContextual("from"); - if (this.type !== types.string) { this.unexpected(); } - node.source = this.parseExprAtom(); - this.semicolon(); - return this.finishNode(node, "ExportAllDeclaration") - } - if (this.eat(types._default)) { // export default ... - this.checkExport(exports, "default", this.lastTokStart); - var isAsync; - if (this.type === types._function || (isAsync = this.isAsyncFunction())) { - var fNode = this.startNode(); - this.next(); - if (isAsync) { this.next(); } - node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync); - } else if (this.type === types._class) { - var cNode = this.startNode(); - node.declaration = this.parseClass(cNode, "nullableID"); - } else { - node.declaration = this.parseMaybeAssign(); - this.semicolon(); - } - return this.finishNode(node, "ExportDefaultDeclaration") - } - // export var|const|let|function|class ... - if (this.shouldParseExportStatement()) { - node.declaration = this.parseStatement(null); - if (node.declaration.type === "VariableDeclaration") - { this.checkVariableExport(exports, node.declaration.declarations); } - else - { this.checkExport(exports, node.declaration.id.name, node.declaration.id.start); } - node.specifiers = []; - node.source = null; - } else { // export { x, y as z } [from '...'] - node.declaration = null; - node.specifiers = this.parseExportSpecifiers(exports); - if (this.eatContextual("from")) { - if (this.type !== types.string) { this.unexpected(); } - node.source = this.parseExprAtom(); - } else { - for (var i = 0, list = node.specifiers; i < list.length; i += 1) { - // check for keywords used as local names - var spec = list[i]; + if (options.ecmaVersion >= 2015) + { options.ecmaVersion -= 2009; } - this$1.checkUnreserved(spec.local); - // check if export is defined - this$1.checkLocalExport(spec.local); - } + if (options.allowReserved == null) + { options.allowReserved = options.ecmaVersion < 5; } - node.source = null; + if (isArray(options.onToken)) { + var tokens = options.onToken; + options.onToken = function (token) { return tokens.push(token); }; + } + if (isArray(options.onComment)) + { options.onComment = pushComment(options, options.onComment); } + + return options + } + + function pushComment(options, array) { + return function(block, text, start, end, startLoc, endLoc) { + var comment = { + type: block ? "Block" : "Line", + value: text, + start: start, + end: end + }; + if (options.locations) + { comment.loc = new SourceLocation(this, startLoc, endLoc); } + if (options.ranges) + { comment.range = [start, end]; } + array.push(comment); } - this.semicolon(); - } - return this.finishNode(node, "ExportNamedDeclaration") -}; - -pp$1.checkExport = function(exports, name, pos) { - if (!exports) { return } - if (has(exports, name)) - { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); } - exports[name] = true; -}; - -pp$1.checkPatternExport = function(exports, pat) { - var this$1 = this; - - var type = pat.type; - if (type === "Identifier") - { this.checkExport(exports, pat.name, pat.start); } - else if (type === "ObjectPattern") - { for (var i = 0, list = pat.properties; i < list.length; i += 1) - { - var prop = list[i]; - - this$1.checkPatternExport(exports, prop); - } } - else if (type === "ArrayPattern") - { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) { - var elt = list$1[i$1]; - - if (elt) { this$1.checkPatternExport(exports, elt); } - } } - else if (type === "Property") - { this.checkPatternExport(exports, pat.value); } - else if (type === "AssignmentPattern") - { this.checkPatternExport(exports, pat.left); } - else if (type === "RestElement") - { this.checkPatternExport(exports, pat.argument); } - else if (type === "ParenthesizedExpression") - { this.checkPatternExport(exports, pat.expression); } -}; - -pp$1.checkVariableExport = function(exports, decls) { - var this$1 = this; - - if (!exports) { return } - for (var i = 0, list = decls; i < list.length; i += 1) - { - var decl = list[i]; - - this$1.checkPatternExport(exports, decl.id); - } -}; - -pp$1.shouldParseExportStatement = function() { - return this.type.keyword === "var" || - this.type.keyword === "const" || - this.type.keyword === "class" || - this.type.keyword === "function" || - this.isLet() || - this.isAsyncFunction() -}; - -// Parses a comma-separated list of module exports. - -pp$1.parseExportSpecifiers = function(exports) { - var this$1 = this; - - var nodes = [], first = true; - // export { x, y as z } [from '...'] - this.expect(types.braceL); - while (!this.eat(types.braceR)) { - if (!first) { - this$1.expect(types.comma); - if (this$1.afterTrailingComma(types.braceR)) { break } - } else { first = false; } - - var node = this$1.startNode(); - node.local = this$1.parseIdent(true); - node.exported = this$1.eatContextual("as") ? this$1.parseIdent(true) : node.local; - this$1.checkExport(exports, node.exported.name, node.exported.start); - nodes.push(this$1.finishNode(node, "ExportSpecifier")); - } - return nodes -}; - -// Parses import declaration. - -pp$1.parseImport = function(node) { - this.next(); - // import '...' - if (this.type === types.string) { - node.specifiers = empty; - node.source = this.parseExprAtom(); - } else { - node.specifiers = this.parseImportSpecifiers(); - this.expectContextual("from"); - node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected(); } - this.semicolon(); - return this.finishNode(node, "ImportDeclaration") -}; - -// Parses a comma-separated list of module imports. -pp$1.parseImportSpecifiers = function() { - var this$1 = this; - - var nodes = [], first = true; - if (this.type === types.name) { - // import defaultObj, { x, y as z } from '...' - var node = this.startNode(); - node.local = this.parseIdent(); - this.checkLVal(node.local, BIND_LEXICAL); - nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); - if (!this.eat(types.comma)) { return nodes } - } - if (this.type === types.star) { - var node$1 = this.startNode(); - this.next(); - this.expectContextual("as"); - node$1.local = this.parseIdent(); - this.checkLVal(node$1.local, BIND_LEXICAL); - nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier")); - return nodes - } - this.expect(types.braceL); - while (!this.eat(types.braceR)) { - if (!first) { - this$1.expect(types.comma); - if (this$1.afterTrailingComma(types.braceR)) { break } - } else { first = false; } - - var node$2 = this$1.startNode(); - node$2.imported = this$1.parseIdent(true); - if (this$1.eatContextual("as")) { - node$2.local = this$1.parseIdent(); + // Each scope gets a bitset that may contain these flags + var + SCOPE_TOP = 1, + SCOPE_FUNCTION = 2, + SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION, + SCOPE_ASYNC = 4, + SCOPE_GENERATOR = 8, + SCOPE_ARROW = 16, + SCOPE_SIMPLE_CATCH = 32, + SCOPE_SUPER = 64, + SCOPE_DIRECT_SUPER = 128; + + function functionFlags(async, generator) { + return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0) + } + + // Used in checkLVal and declareName to determine the type of a binding + var + BIND_NONE = 0, // Not a binding + BIND_VAR = 1, // Var-style binding + BIND_LEXICAL = 2, // Let- or const-style binding + BIND_FUNCTION = 3, // Function declaration + BIND_SIMPLE_CATCH = 4, // Simple (identifier pattern) catch binding + BIND_OUTSIDE = 5; // Special case for function names as bound inside the function + + var Parser = function Parser(options, input, startPos) { + this.options = options = getOptions(options); + this.sourceFile = options.sourceFile; + this.keywords = wordsRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]); + var reserved = ""; + if (options.allowReserved !== true) { + for (var v = options.ecmaVersion;; v--) + { if (reserved = reservedWords[v]) { break } } + if (options.sourceType === "module") { reserved += " await"; } + } + this.reservedWords = wordsRegexp(reserved); + var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict; + this.reservedWordsStrict = wordsRegexp(reservedStrict); + this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind); + this.input = String(input); + + // Used to signal to callers of `readWord1` whether the word + // contained any escape sequences. This is needed because words with + // escape sequences must not be interpreted as keywords. + this.containsEsc = false; + + // Set up token state + + // The current position of the tokenizer in the input. + if (startPos) { + this.pos = startPos; + this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1; + this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; } else { - this$1.checkUnreserved(node$2.imported); - node$2.local = node$2.imported; + this.pos = this.lineStart = 0; + this.curLine = 1; } - this$1.checkLVal(node$2.local, BIND_LEXICAL); - nodes.push(this$1.finishNode(node$2, "ImportSpecifier")); - } - return nodes -}; -// Set `ExpressionStatement#directive` property for directive prologues. -pp$1.adaptDirectivePrologue = function(statements) { - for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) { - statements[i].directive = statements[i].expression.raw.slice(1, -1); - } -}; -pp$1.isDirectiveCandidate = function(statement) { - return ( - statement.type === "ExpressionStatement" && - statement.expression.type === "Literal" && - typeof statement.expression.value === "string" && - // Reject parenthesized strings. - (this.input[statement.start] === "\"" || this.input[statement.start] === "'") - ) -}; - -var pp$2 = Parser.prototype; - -// Convert existing expression atom to assignable pattern -// if possible. - -pp$2.toAssignable = function(node, isBinding, refDestructuringErrors) { - var this$1 = this; - - if (this.options.ecmaVersion >= 6 && node) { - switch (node.type) { - case "Identifier": - if (this.inAsync && node.name === "await") - { this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); } - break + // Properties of the current token: + // Its type + this.type = types.eof; + // For tokens that include more information than their type, the value + this.value = null; + // Its start and end offset + this.start = this.end = this.pos; + // And, if locations are used, the {line, column} object + // corresponding to those offsets + this.startLoc = this.endLoc = this.curPosition(); + + // Position information for the previous token + this.lastTokEndLoc = this.lastTokStartLoc = null; + this.lastTokStart = this.lastTokEnd = this.pos; + + // The context stack is used to superficially track syntactic + // context to predict whether a regular expression is allowed in a + // given position. + this.context = this.initialContext(); + this.exprAllowed = true; - case "ObjectPattern": - case "ArrayPattern": - case "RestElement": - break + // Figure out if it's a module code. + this.inModule = options.sourceType === "module"; + this.strict = this.inModule || this.strictDirective(this.pos); - case "ObjectExpression": - node.type = "ObjectPattern"; - if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - for (var i = 0, list = node.properties; i < list.length; i += 1) { - var prop = list[i]; - - this$1.toAssignable(prop, isBinding); - // Early error: - // AssignmentRestProperty[Yield, Await] : - // `...` DestructuringAssignmentTarget[Yield, Await] - // - // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|. - if ( - prop.type === "RestElement" && - (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern") - ) { - this$1.raise(prop.argument.start, "Unexpected token"); - } - } - break + // Used to signify the start of a potential arrow function + this.potentialArrowAt = -1; - case "Property": - // AssignmentProperty has type === "Property" - if (node.kind !== "init") { this.raise(node.key.start, "Object pattern can't contain getter or setter"); } - this.toAssignable(node.value, isBinding); - break + // Positions to delayed-check that yield/await does not exist in default parameters. + this.yieldPos = this.awaitPos = this.awaitIdentPos = 0; + // Labels in scope. + this.labels = []; + // Thus-far undefined exports. + this.undefinedExports = {}; - case "ArrayExpression": - node.type = "ArrayPattern"; - if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - this.toAssignableList(node.elements, isBinding); - break + // If enabled, skip leading hashbang line. + if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") + { this.skipLineComment(2); } - case "SpreadElement": - node.type = "RestElement"; - this.toAssignable(node.argument, isBinding); - if (node.argument.type === "AssignmentPattern") - { this.raise(node.argument.start, "Rest elements cannot have a default value"); } - break + // Scope tracking for duplicate variable names (see scope.js) + this.scopeStack = []; + this.enterScope(SCOPE_TOP); - case "AssignmentExpression": - if (node.operator !== "=") { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); } - node.type = "AssignmentPattern"; - delete node.operator; - this.toAssignable(node.left, isBinding); - // falls through to AssignmentPattern + // For RegExp validation + this.regexpState = null; + }; - case "AssignmentPattern": - break + var prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true } }; - case "ParenthesizedExpression": - this.toAssignable(node.expression, isBinding, refDestructuringErrors); - break + Parser.prototype.parse = function parse () { + var node = this.options.program || this.startNode(); + this.nextToken(); + return this.parseTopLevel(node) + }; - case "MemberExpression": - if (!isBinding) { break } + prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 }; + prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 }; + prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 }; + prototypeAccessors.allowSuper.get = function () { return (this.currentThisScope().flags & SCOPE_SUPER) > 0 }; + prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 }; + prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) }; - default: - this.raise(node.start, "Assigning to rvalue"); - } - } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - return node -}; + // Switch to a getter for 7.0.0. + Parser.prototype.inNonArrowFunction = function inNonArrowFunction () { return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0 }; -// Convert list of expression atoms to binding list. + Parser.extend = function extend () { + var plugins = [], len = arguments.length; + while ( len-- ) plugins[ len ] = arguments[ len ]; -pp$2.toAssignableList = function(exprList, isBinding) { - var this$1 = this; + var cls = this; + for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); } + return cls + }; - var end = exprList.length; - for (var i = 0; i < end; i++) { - var elt = exprList[i]; - if (elt) { this$1.toAssignable(elt, isBinding); } - } - if (end) { - var last = exprList[end - 1]; - if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") - { this.unexpected(last.argument.start); } - } - return exprList -}; + Parser.parse = function parse (input, options) { + return new this(options, input).parse() + }; -// Parses spread element. + Parser.parseExpressionAt = function parseExpressionAt (input, pos, options) { + var parser = new this(options, input, pos); + parser.nextToken(); + return parser.parseExpression() + }; -pp$2.parseSpread = function(refDestructuringErrors) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(false, refDestructuringErrors); - return this.finishNode(node, "SpreadElement") -}; + Parser.tokenizer = function tokenizer (input, options) { + return new this(options, input) + }; -pp$2.parseRestBinding = function() { - var node = this.startNode(); - this.next(); + Object.defineProperties( Parser.prototype, prototypeAccessors ); - // RestElement inside of a function parameter must be an identifier - if (this.options.ecmaVersion === 6 && this.type !== types.name) - { this.unexpected(); } + var pp = Parser.prototype; - node.argument = this.parseBindingAtom(); + // ## Parser utilities - return this.finishNode(node, "RestElement") -}; + var literal = /^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)")/; + pp.strictDirective = function(start) { + for (;;) { + // Try to find string literal. + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + var match = literal.exec(this.input.slice(start)); + if (!match) { return false } + if ((match[1] || match[2]) === "use strict") { return true } + start += match[0].length; -// Parses lvalue (assignable) atom. + // Skip semicolon, if any. + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + if (this.input[start] === ";") + { start++; } + } + }; -pp$2.parseBindingAtom = function() { - if (this.options.ecmaVersion >= 6) { - switch (this.type) { - case types.bracketL: - var node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(types.bracketR, true, true); - return this.finishNode(node, "ArrayPattern") + // Predicate that tests whether the next token is of the given + // type, and if yes, consumes it as a side effect. - case types.braceL: - return this.parseObj(true) - } - } - return this.parseIdent() -}; - -pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma) { - var this$1 = this; - - var elts = [], first = true; - while (!this.eat(close)) { - if (first) { first = false; } - else { this$1.expect(types.comma); } - if (allowEmpty && this$1.type === types.comma) { - elts.push(null); - } else if (allowTrailingComma && this$1.afterTrailingComma(close)) { - break - } else if (this$1.type === types.ellipsis) { - var rest = this$1.parseRestBinding(); - this$1.parseBindingListItem(rest); - elts.push(rest); - if (this$1.type === types.comma) { this$1.raise(this$1.start, "Comma is not permitted after the rest element"); } - this$1.expect(close); - break + pp.eat = function(type) { + if (this.type === type) { + this.next(); + return true } else { - var elem = this$1.parseMaybeDefault(this$1.start, this$1.startLoc); - this$1.parseBindingListItem(elem); - elts.push(elem); + return false } - } - return elts -}; - -pp$2.parseBindingListItem = function(param) { - return param -}; - -// Parses assignment pattern around given atom if possible. - -pp$2.parseMaybeDefault = function(startPos, startLoc, left) { - left = left || this.parseBindingAtom(); - if (this.options.ecmaVersion < 6 || !this.eat(types.eq)) { return left } - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern") -}; - -// Verify that a node is an lval — something that can be assigned -// to. -// bindingType can be either: -// 'var' indicating that the lval creates a 'var' binding -// 'let' indicating that the lval creates a lexical ('let' or 'const') binding -// 'none' indicating that the binding should be checked for illegal identifiers, but not for duplicate references - -pp$2.checkLVal = function(expr, bindingType, checkClashes) { - var this$1 = this; - if ( bindingType === void 0 ) bindingType = BIND_NONE; - - switch (expr.type) { - case "Identifier": - if (this.strict && this.reservedWordsStrictBind.test(expr.name)) - { this.raiseRecoverable(expr.start, (bindingType ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); } - if (checkClashes) { - if (has(checkClashes, expr.name)) - { this.raiseRecoverable(expr.start, "Argument name clash"); } - checkClashes[expr.name] = true; - } - if (bindingType !== BIND_NONE && bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } - break - - case "MemberExpression": - if (bindingType) { this.raiseRecoverable(expr.start, "Binding member expression"); } - break - - case "ObjectPattern": - for (var i = 0, list = expr.properties; i < list.length; i += 1) - { - var prop = list[i]; - - this$1.checkLVal(prop, bindingType, checkClashes); - } - break + }; - case "Property": - // AssignmentProperty has type === "Property" - this.checkLVal(expr.value, bindingType, checkClashes); - break + // Tests whether parsed token is a contextual keyword. - case "ArrayPattern": - for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { - var elem = list$1[i$1]; + pp.isContextual = function(name) { + return this.type === types.name && this.value === name && !this.containsEsc + }; - if (elem) { this$1.checkLVal(elem, bindingType, checkClashes); } - } - break + // Consumes contextual keyword if possible. - case "AssignmentPattern": - this.checkLVal(expr.left, bindingType, checkClashes); - break + pp.eatContextual = function(name) { + if (!this.isContextual(name)) { return false } + this.next(); + return true + }; - case "RestElement": - this.checkLVal(expr.argument, bindingType, checkClashes); - break + // Asserts that following token is given contextual keyword. - case "ParenthesizedExpression": - this.checkLVal(expr.expression, bindingType, checkClashes); - break + pp.expectContextual = function(name) { + if (!this.eatContextual(name)) { this.unexpected(); } + }; - default: - this.raise(expr.start, (bindingType ? "Binding" : "Assigning to") + " rvalue"); - } -}; - -// A recursive descent parser operates by defining functions for all -// syntactic elements, and recursively calling those, each function -// advancing the input stream and returning an AST node. Precedence -// of constructs (for example, the fact that `!x[1]` means `!(x[1])` -// instead of `(!x)[1]` is handled by the fact that the parser -// function that parses unary prefix operators is called first, and -// in turn calls the function that parses `[]` subscripts — that -// way, it'll receive the node for `x[1]` already parsed, and wraps -// *that* in the unary operator node. -// -// Acorn uses an [operator precedence parser][opp] to handle binary -// operator precedence, because it is much more compact than using -// the technique outlined above, which uses different, nesting -// functions to specify precedence, for all of the ten binary -// precedence levels that JavaScript defines. -// -// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser - -var pp$3 = Parser.prototype; - -// Check if property name clashes with already added. -// Object/class getters and setters are not allowed to clash — -// either with each other or with an init property — and in -// strict mode, init properties are also not allowed to be repeated. - -pp$3.checkPropClash = function(prop, propHash, refDestructuringErrors) { - if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") - { return } - if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) - { return } - var key = prop.key; - var name; - switch (key.type) { - case "Identifier": name = key.name; break - case "Literal": name = String(key.value); break - default: return - } - var kind = prop.kind; - if (this.options.ecmaVersion >= 6) { - if (name === "__proto__" && kind === "init") { - if (propHash.proto) { - if (refDestructuringErrors && refDestructuringErrors.doubleProto < 0) { refDestructuringErrors.doubleProto = key.start; } - // Backwards-compat kludge. Can be removed in version 6.0 - else { this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); } - } - propHash.proto = true; - } - return - } - name = "$" + name; - var other = propHash[name]; - if (other) { - var redefinition; - if (kind === "init") { - redefinition = this.strict && other.init || other.get || other.set; - } else { - redefinition = other.init || other[kind]; - } - if (redefinition) - { this.raiseRecoverable(key.start, "Redefinition of property"); } - } else { - other = propHash[name] = { - init: false, - get: false, - set: false - }; - } - other[kind] = true; -}; - -// ### Expression parsing - -// These nest, from the most general expression type at the top to -// 'atomic', nondivisible expression types at the bottom. Most of -// the functions will simply let the function(s) below them parse, -// and, *if* the syntactic construct they handle is present, wrap -// the AST node that the inner parser gave them in another node. - -// Parse a full expression. The optional arguments are used to -// forbid the `in` operator (in for loops initalization expressions) -// and provide reference for storing '=' operator inside shorthand -// property assignment in contexts where both object expression -// and object pattern might appear (so it's possible to raise -// delayed syntax error at correct position). - -pp$3.parseExpression = function(noIn, refDestructuringErrors) { - var this$1 = this; - - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseMaybeAssign(noIn, refDestructuringErrors); - if (this.type === types.comma) { - var node = this.startNodeAt(startPos, startLoc); - node.expressions = [expr]; - while (this.eat(types.comma)) { node.expressions.push(this$1.parseMaybeAssign(noIn, refDestructuringErrors)); } - return this.finishNode(node, "SequenceExpression") - } - return expr -}; - -// Parse an assignment expression. This includes applications of -// operators like `+=`. - -pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) { - if (this.isContextual("yield")) { - if (this.inGenerator) { return this.parseYield(noIn) } - // The tokenizer will assume an expression is allowed after - // `yield`, but this isn't that kind of yield - else { this.exprAllowed = false; } - } + // Test whether a semicolon can be inserted at the current position. - var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldShorthandAssign = -1; - if (refDestructuringErrors) { - oldParenAssign = refDestructuringErrors.parenthesizedAssign; - oldTrailingComma = refDestructuringErrors.trailingComma; - oldShorthandAssign = refDestructuringErrors.shorthandAssign; - refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.shorthandAssign = -1; - } else { - refDestructuringErrors = new DestructuringErrors; - ownDestructuringErrors = true; - } + pp.canInsertSemicolon = function() { + return this.type === types.eof || + this.type === types.braceR || + lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + }; - var startPos = this.start, startLoc = this.startLoc; - if (this.type === types.parenL || this.type === types.name) - { this.potentialArrowAt = this.start; } - var left = this.parseMaybeConditional(noIn, refDestructuringErrors); - if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); } - if (this.type.isAssign) { - var node = this.startNodeAt(startPos, startLoc); - node.operator = this.value; - node.left = this.type === types.eq ? this.toAssignable(left, false, refDestructuringErrors) : left; - if (!ownDestructuringErrors) { DestructuringErrors.call(refDestructuringErrors); } - refDestructuringErrors.shorthandAssign = -1; // reset because shorthand default was used correctly - this.checkLVal(left); - this.next(); - node.right = this.parseMaybeAssign(noIn); - return this.finishNode(node, "AssignmentExpression") - } else { - if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); } - } - if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; } - if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; } - if (oldShorthandAssign > -1) { refDestructuringErrors.shorthandAssign = oldShorthandAssign; } - return left -}; - -// Parse a ternary conditional (`?:`) operator. - -pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseExprOps(noIn, refDestructuringErrors); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - if (this.eat(types.question)) { - var node = this.startNodeAt(startPos, startLoc); - node.test = expr; - node.consequent = this.parseMaybeAssign(); - this.expect(types.colon); - node.alternate = this.parseMaybeAssign(noIn); - return this.finishNode(node, "ConditionalExpression") - } - return expr -}; - -// Start the precedence parser. - -pp$3.parseExprOps = function(noIn, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseMaybeUnary(refDestructuringErrors, false); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, noIn) -}; - -// Parse binary operators with the operator precedence parsing -// algorithm. `left` is the left-hand side of the operator. -// `minPrec` provides context that allows the function to stop and -// defer further parser to one of its callers when it encounters an -// operator that has a lower precedence than the set it is parsing. - -pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) { - var prec = this.type.binop; - if (prec != null && (!noIn || this.type !== types._in)) { - if (prec > minPrec) { - var logical = this.type === types.logicalOR || this.type === types.logicalAND; - var op = this.value; - this.next(); - var startPos = this.start, startLoc = this.startLoc; - var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn); - var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical); - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn) - } - } - return left -}; - -pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) { - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.operator = op; - node.right = right; - return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") -}; - -// Parse unary operators, both prefix and postfix. - -pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) { - var this$1 = this; - - var startPos = this.start, startLoc = this.startLoc, expr; - if (this.isContextual("await") && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction))) { - expr = this.parseAwait(); - sawUnary = true; - } else if (this.type.prefix) { - var node = this.startNode(), update = this.type === types.incDec; - node.operator = this.value; - node.prefix = true; - this.next(); - node.argument = this.parseMaybeUnary(null, true); - this.checkExpressionErrors(refDestructuringErrors, true); - if (update) { this.checkLVal(node.argument); } - else if (this.strict && node.operator === "delete" && - node.argument.type === "Identifier") - { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); } - else { sawUnary = true; } - expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } else { - expr = this.parseExprSubscripts(refDestructuringErrors); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - while (this.type.postfix && !this.canInsertSemicolon()) { - var node$1 = this$1.startNodeAt(startPos, startLoc); - node$1.operator = this$1.value; - node$1.prefix = false; - node$1.argument = expr; - this$1.checkLVal(expr); - this$1.next(); - expr = this$1.finishNode(node$1, "UpdateExpression"); + pp.insertSemicolon = function() { + if (this.canInsertSemicolon()) { + if (this.options.onInsertedSemicolon) + { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); } + return true } - } + }; - if (!sawUnary && this.eat(types.starstar)) - { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false) } - else - { return expr } -}; - -// Parse call, dot, and `[]`-subscript expressions. - -pp$3.parseExprSubscripts = function(refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseExprAtom(refDestructuringErrors); - var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")"; - if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) { return expr } - var result = this.parseSubscripts(expr, startPos, startLoc); - if (refDestructuringErrors && result.type === "MemberExpression") { - if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; } - if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; } - } - return result -}; - -pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) { - var this$1 = this; - - var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && - this.lastTokEnd === base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === "async"; - while (true) { - var element = this$1.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow); - if (element === base || element.type === "ArrowFunctionExpression") { return element } - base = element; - } -}; + // Consume a semicolon, or, failing that, see if we are allowed to + // pretend that there is a semicolon at this position. -pp$3.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow) { - var computed = this.eat(types.bracketL); - if (computed || this.eat(types.dot)) { - var node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = computed ? this.parseExpression() : this.parseIdent(true); - node.computed = !!computed; - if (computed) { this.expect(types.bracketR); } - base = this.finishNode(node, "MemberExpression"); - } else if (!noCalls && this.eat(types.parenL)) { - var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - var exprList = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors); - if (maybeAsyncArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { - this.checkPatternErrors(refDestructuringErrors, false); - this.checkYieldAwaitInDefaultParams(); - if (this.awaitIdentPos > 0) - { this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); } - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true) - } - this.checkExpressionErrors(refDestructuringErrors, true); - this.yieldPos = oldYieldPos || this.yieldPos; - this.awaitPos = oldAwaitPos || this.awaitPos; - this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; - var node$1 = this.startNodeAt(startPos, startLoc); - node$1.callee = base; - node$1.arguments = exprList; - base = this.finishNode(node$1, "CallExpression"); - } else if (this.type === types.backQuote) { - var node$2 = this.startNodeAt(startPos, startLoc); - node$2.tag = base; - node$2.quasi = this.parseTemplate({isTagged: true}); - base = this.finishNode(node$2, "TaggedTemplateExpression"); - } - return base -}; - -// Parse an atomic expression — either a single token that is an -// expression, an expression started by a keyword like `function` or -// `new`, or an expression wrapped in punctuation like `()`, `[]`, -// or `{}`. - -pp$3.parseExprAtom = function(refDestructuringErrors) { - // If a division operator appears in an expression position, the - // tokenizer got confused, and we force it to read a regexp instead. - if (this.type === types.slash) { this.readRegexp(); } - - var node, canBeArrow = this.potentialArrowAt === this.start; - switch (this.type) { - case types._super: - if (!this.allowSuper) - { this.raise(this.start, "'super' keyword outside a method"); } - node = this.startNode(); - this.next(); - if (this.type === types.parenL && !this.allowDirectSuper) - { this.raise(node.start, "super() call outside constructor of a subclass"); } - // The `super` keyword can appear at below: - // SuperProperty: - // super [ Expression ] - // super . IdentifierName - // SuperCall: - // super Arguments - if (this.type !== types.dot && this.type !== types.bracketL && this.type !== types.parenL) - { this.unexpected(); } - return this.finishNode(node, "Super") + pp.semicolon = function() { + if (!this.eat(types.semi) && !this.insertSemicolon()) { this.unexpected(); } + }; - case types._this: - node = this.startNode(); - this.next(); - return this.finishNode(node, "ThisExpression") - - case types.name: - var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; - var id = this.parseIdent(false); - if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types._function)) - { return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true) } - if (canBeArrow && !this.canInsertSemicolon()) { - if (this.eat(types.arrow)) - { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false) } - if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types.name && !containsEsc) { - id = this.parseIdent(false); - if (this.canInsertSemicolon() || !this.eat(types.arrow)) - { this.unexpected(); } - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true) - } + pp.afterTrailingComma = function(tokType, notNext) { + if (this.type === tokType) { + if (this.options.onTrailingComma) + { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); } + if (!notNext) + { this.next(); } + return true } - return id + }; - case types.regexp: - var value = this.value; - node = this.parseLiteral(value.value); - node.regex = {pattern: value.pattern, flags: value.flags}; - return node + // Expect a token of a given type. If found, consume it, otherwise, + // raise an unexpected token error. - case types.num: case types.string: - return this.parseLiteral(this.value) + pp.expect = function(type) { + this.eat(type) || this.unexpected(); + }; - case types._null: case types._true: case types._false: - node = this.startNode(); - node.value = this.type === types._null ? null : this.type === types._true; - node.raw = this.type.keyword; - this.next(); - return this.finishNode(node, "Literal") + // Raise an unexpected token error. - case types.parenL: - var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow); - if (refDestructuringErrors) { - if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) - { refDestructuringErrors.parenthesizedAssign = start; } - if (refDestructuringErrors.parenthesizedBind < 0) - { refDestructuringErrors.parenthesizedBind = start; } - } - return expr + pp.unexpected = function(pos) { + this.raise(pos != null ? pos : this.start, "Unexpected token"); + }; - case types.bracketL: - node = this.startNode(); - this.next(); - node.elements = this.parseExprList(types.bracketR, true, true, refDestructuringErrors); - return this.finishNode(node, "ArrayExpression") + function DestructuringErrors() { + this.shorthandAssign = + this.trailingComma = + this.parenthesizedAssign = + this.parenthesizedBind = + this.doubleProto = + -1; + } + + pp.checkPatternErrors = function(refDestructuringErrors, isAssign) { + if (!refDestructuringErrors) { return } + if (refDestructuringErrors.trailingComma > -1) + { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); } + var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind; + if (parens > -1) { this.raiseRecoverable(parens, "Parenthesized pattern"); } + }; - case types.braceL: - return this.parseObj(false, refDestructuringErrors) + pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) { + if (!refDestructuringErrors) { return false } + var shorthandAssign = refDestructuringErrors.shorthandAssign; + var doubleProto = refDestructuringErrors.doubleProto; + if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0 } + if (shorthandAssign >= 0) + { this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); } + if (doubleProto >= 0) + { this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); } + }; - case types._function: - node = this.startNode(); - this.next(); - return this.parseFunction(node, 0) + pp.checkYieldAwaitInDefaultParams = function() { + if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) + { this.raise(this.yieldPos, "Yield expression cannot be a default value"); } + if (this.awaitPos) + { this.raise(this.awaitPos, "Await expression cannot be a default value"); } + }; - case types._class: - return this.parseClass(this.startNode(), false) + pp.isSimpleAssignTarget = function(expr) { + if (expr.type === "ParenthesizedExpression") + { return this.isSimpleAssignTarget(expr.expression) } + return expr.type === "Identifier" || expr.type === "MemberExpression" + }; - case types._new: - return this.parseNew() + var pp$1 = Parser.prototype; - case types.backQuote: - return this.parseTemplate() + // ### Statement parsing - default: - this.unexpected(); - } -}; - -pp$3.parseLiteral = function(value) { - var node = this.startNode(); - node.value = value; - node.raw = this.input.slice(this.start, this.end); - this.next(); - return this.finishNode(node, "Literal") -}; - -pp$3.parseParenExpression = function() { - this.expect(types.parenL); - var val = this.parseExpression(); - this.expect(types.parenR); - return val -}; - -pp$3.parseParenAndDistinguishExpression = function(canBeArrow) { - var this$1 = this; - - var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8; - if (this.options.ecmaVersion >= 6) { - this.next(); + // Parse a program. Initializes the parser, reads any number of + // statements, and wraps them in a Program node. Optionally takes a + // `program` argument. If present, the statements will be appended + // to its body instead of creating a new node. - var innerStartPos = this.start, innerStartLoc = this.startLoc; - var exprList = [], first = true, lastIsComma = false; - var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; - this.yieldPos = 0; - this.awaitPos = 0; - // Do not save awaitIdentPos to allow checking awaits nested in parameters - while (this.type !== types.parenR) { - first ? first = false : this$1.expect(types.comma); - if (allowTrailingComma && this$1.afterTrailingComma(types.parenR, true)) { - lastIsComma = true; - break - } else if (this$1.type === types.ellipsis) { - spreadStart = this$1.start; - exprList.push(this$1.parseParenItem(this$1.parseRestBinding())); - if (this$1.type === types.comma) { this$1.raise(this$1.start, "Comma is not permitted after the rest element"); } - break - } else { - exprList.push(this$1.parseMaybeAssign(false, refDestructuringErrors, this$1.parseParenItem)); - } + pp$1.parseTopLevel = function(node) { + var exports = {}; + if (!node.body) { node.body = []; } + while (this.type !== types.eof) { + var stmt = this.parseStatement(null, true, exports); + node.body.push(stmt); } - var innerEndPos = this.start, innerEndLoc = this.startLoc; - this.expect(types.parenR); - - if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { - this.checkPatternErrors(refDestructuringErrors, false); - this.checkYieldAwaitInDefaultParams(); - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - return this.parseParenArrowList(startPos, startLoc, exprList) + if (this.inModule) + { for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1) + { + var name = list[i]; + + this.raiseRecoverable(this.undefinedExports[name].start, ("Export '" + name + "' is not defined")); + } } + this.adaptDirectivePrologue(node.body); + this.next(); + if (this.options.ecmaVersion >= 6) { + node.sourceType = this.options.sourceType; } + return this.finishNode(node, "Program") + }; - if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); } - if (spreadStart) { this.unexpected(spreadStart); } - this.checkExpressionErrors(refDestructuringErrors, true); - this.yieldPos = oldYieldPos || this.yieldPos; - this.awaitPos = oldAwaitPos || this.awaitPos; - - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc); - val.expressions = exprList; - this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); - } else { - val = exprList[0]; + var loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"}; + + pp$1.isLet = function(context) { + if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { return false } + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); + // For ambiguous cases, determine if a LexicalDeclaration (or only a + // Statement) is allowed here. If context is not empty then only a Statement + // is allowed. However, `let [` is an explicit negative lookahead for + // ExpressionStatement, so special-case it first. + if (nextCh === 91) { return true } // '[' + if (context) { return false } + + if (nextCh === 123) { return true } // '{' + if (isIdentifierStart(nextCh, true)) { + var pos = next + 1; + while (isIdentifierChar(this.input.charCodeAt(pos), true)) { ++pos; } + var ident = this.input.slice(next, pos); + if (!keywordRelationalOperator.test(ident)) { return true } } - } else { - val = this.parseParenExpression(); - } + return false + }; - if (this.options.preserveParens) { - var par = this.startNodeAt(startPos, startLoc); - par.expression = val; - return this.finishNode(par, "ParenthesizedExpression") - } else { - return val - } -}; + // check 'async [no LineTerminator here] function' + // - 'async /*foo*/ function' is OK. + // - 'async /*\n*/ function' is invalid. + pp$1.isAsyncFunction = function() { + if (this.options.ecmaVersion < 8 || !this.isContextual("async")) + { return false } + + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length; + return !lineBreak.test(this.input.slice(this.pos, next)) && + this.input.slice(next, next + 8) === "function" && + (next + 8 === this.input.length || !isIdentifierChar(this.input.charAt(next + 8))) + }; -pp$3.parseParenItem = function(item) { - return item -}; + // Parse a single statement. + // + // If expecting a statement and finding a slash operator, parse a + // regular expression literal. This is to handle cases like + // `if (foo) /blah/.exec(foo)`, where looking at the previous token + // does not help. -pp$3.parseParenArrowList = function(startPos, startLoc, exprList) { - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList) -}; + pp$1.parseStatement = function(context, topLevel, exports) { + var starttype = this.type, node = this.startNode(), kind; -// New's precedence is slightly tricky. It must allow its argument to -// be a `[]` or dot subscript expression, but not a call — at least, -// not without wrapping it in parentheses. Thus, it uses the noCalls -// argument to parseSubscripts to prevent it from consuming the -// argument list. + if (this.isLet(context)) { + starttype = types._var; + kind = "let"; + } + + // Most types of statements are recognized by the keyword they + // start with. Many are trivial to parse, some require a bit of + // complexity. + + switch (starttype) { + case types._break: case types._continue: return this.parseBreakContinueStatement(node, starttype.keyword) + case types._debugger: return this.parseDebuggerStatement(node) + case types._do: return this.parseDoStatement(node) + case types._for: return this.parseForStatement(node) + case types._function: + // Function as sole body of either an if statement or a labeled statement + // works, but not when it is part of a labeled statement that is the sole + // body of an if statement. + if ((context && (this.strict || context !== "if" && context !== "label")) && this.options.ecmaVersion >= 6) { this.unexpected(); } + return this.parseFunctionStatement(node, false, !context) + case types._class: + if (context) { this.unexpected(); } + return this.parseClass(node, true) + case types._if: return this.parseIfStatement(node) + case types._return: return this.parseReturnStatement(node) + case types._switch: return this.parseSwitchStatement(node) + case types._throw: return this.parseThrowStatement(node) + case types._try: return this.parseTryStatement(node) + case types._const: case types._var: + kind = kind || this.value; + if (context && kind !== "var") { this.unexpected(); } + return this.parseVarStatement(node, kind) + case types._while: return this.parseWhileStatement(node) + case types._with: return this.parseWithStatement(node) + case types.braceL: return this.parseBlock(true, node) + case types.semi: return this.parseEmptyStatement(node) + case types._export: + case types._import: + if (this.options.ecmaVersion > 10 && starttype === types._import) { + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); + if (nextCh === 40) // '(' + { return this.parseExpressionStatement(node, this.parseExpression()) } + } + + if (!this.options.allowImportExportEverywhere) { + if (!topLevel) + { this.raise(this.start, "'import' and 'export' may only appear at the top level"); } + if (!this.inModule) + { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); } + } + return starttype === types._import ? this.parseImport(node) : this.parseExport(node, exports) + + // If the statement does not start with a statement keyword or a + // brace, it's an ExpressionStatement or LabeledStatement. We + // simply start parsing an expression, and afterwards, if the + // next token is a colon and the expression was a simple + // Identifier node, we switch to interpreting it as a label. + default: + if (this.isAsyncFunction()) { + if (context) { this.unexpected(); } + this.next(); + return this.parseFunctionStatement(node, true, !context) + } + + var maybeName = this.value, expr = this.parseExpression(); + if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) + { return this.parseLabeledStatement(node, maybeName, expr, context) } + else { return this.parseExpressionStatement(node, expr) } + } + }; + + pp$1.parseBreakContinueStatement = function(node, keyword) { + var isBreak = keyword === "break"; + this.next(); + if (this.eat(types.semi) || this.insertSemicolon()) { node.label = null; } + else if (this.type !== types.name) { this.unexpected(); } + else { + node.label = this.parseIdent(); + this.semicolon(); + } + + // Verify that there is an actual destination to break or + // continue to. + var i = 0; + for (; i < this.labels.length; ++i) { + var lab = this.labels[i]; + if (node.label == null || lab.name === node.label.name) { + if (lab.kind != null && (isBreak || lab.kind === "loop")) { break } + if (node.label && isBreak) { break } + } + } + if (i === this.labels.length) { this.raise(node.start, "Unsyntactic " + keyword); } + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") + }; + + pp$1.parseDebuggerStatement = function(node) { + this.next(); + this.semicolon(); + return this.finishNode(node, "DebuggerStatement") + }; + + pp$1.parseDoStatement = function(node) { + this.next(); + this.labels.push(loopLabel); + node.body = this.parseStatement("do"); + this.labels.pop(); + this.expect(types._while); + node.test = this.parseParenExpression(); + if (this.options.ecmaVersion >= 6) + { this.eat(types.semi); } + else + { this.semicolon(); } + return this.finishNode(node, "DoWhileStatement") + }; + + // Disambiguating between a `for` and a `for`/`in` or `for`/`of` + // loop is non-trivial. Basically, we have to parse the init `var` + // statement or expression, disallowing the `in` operator (see + // the second parameter to `parseExpression`), and then check + // whether the next token is `in` or `of`. When there is no init + // part (semicolon immediately after the opening parenthesis), it + // is a regular `for` loop. + + pp$1.parseForStatement = function(node) { + this.next(); + var awaitAt = (this.options.ecmaVersion >= 9 && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction)) && this.eatContextual("await")) ? this.lastTokStart : -1; + this.labels.push(loopLabel); + this.enterScope(0); + this.expect(types.parenL); + if (this.type === types.semi) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, null) + } + var isLet = this.isLet(); + if (this.type === types._var || this.type === types._const || isLet) { + var init$1 = this.startNode(), kind = isLet ? "let" : this.value; + this.next(); + this.parseVar(init$1, true, kind); + this.finishNode(init$1, "VariableDeclaration"); + if ((this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1) { + if (this.options.ecmaVersion >= 9) { + if (this.type === types._in) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + } else { node.await = awaitAt > -1; } + } + return this.parseForIn(node, init$1) + } + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, init$1) + } + var refDestructuringErrors = new DestructuringErrors; + var init = this.parseExpression(true, refDestructuringErrors); + if (this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) { + if (this.options.ecmaVersion >= 9) { + if (this.type === types._in) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + } else { node.await = awaitAt > -1; } + } + this.toAssignable(init, false, refDestructuringErrors); + this.checkLVal(init); + return this.parseForIn(node, init) + } else { + this.checkExpressionErrors(refDestructuringErrors, true); + } + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, init) + }; + + pp$1.parseFunctionStatement = function(node, isAsync, declarationPosition) { + this.next(); + return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync) + }; + + pp$1.parseIfStatement = function(node) { + this.next(); + node.test = this.parseParenExpression(); + // allow function declarations in branches, but only in non-strict mode + node.consequent = this.parseStatement("if"); + node.alternate = this.eat(types._else) ? this.parseStatement("if") : null; + return this.finishNode(node, "IfStatement") + }; + + pp$1.parseReturnStatement = function(node) { + if (!this.inFunction && !this.options.allowReturnOutsideFunction) + { this.raise(this.start, "'return' outside of function"); } + this.next(); + + // In `return` (and `break`/`continue`), the keywords with + // optional arguments, we eagerly look for a semicolon or the + // possibility to insert one. + + if (this.eat(types.semi) || this.insertSemicolon()) { node.argument = null; } + else { node.argument = this.parseExpression(); this.semicolon(); } + return this.finishNode(node, "ReturnStatement") + }; + + pp$1.parseSwitchStatement = function(node) { + this.next(); + node.discriminant = this.parseParenExpression(); + node.cases = []; + this.expect(types.braceL); + this.labels.push(switchLabel); + this.enterScope(0); + + // Statements under must be grouped (by label) in SwitchCase + // nodes. `cur` is used to keep the node that we are currently + // adding statements to. + + var cur; + for (var sawDefault = false; this.type !== types.braceR;) { + if (this.type === types._case || this.type === types._default) { + var isCase = this.type === types._case; + if (cur) { this.finishNode(cur, "SwitchCase"); } + node.cases.push(cur = this.startNode()); + cur.consequent = []; + this.next(); + if (isCase) { + cur.test = this.parseExpression(); + } else { + if (sawDefault) { this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"); } + sawDefault = true; + cur.test = null; + } + this.expect(types.colon); + } else { + if (!cur) { this.unexpected(); } + cur.consequent.push(this.parseStatement(null)); + } + } + this.exitScope(); + if (cur) { this.finishNode(cur, "SwitchCase"); } + this.next(); // Closing brace + this.labels.pop(); + return this.finishNode(node, "SwitchStatement") + }; + + pp$1.parseThrowStatement = function(node) { + this.next(); + if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) + { this.raise(this.lastTokEnd, "Illegal newline after throw"); } + node.argument = this.parseExpression(); + this.semicolon(); + return this.finishNode(node, "ThrowStatement") + }; + + // Reused empty array added for node fields that are always empty. + + var empty = []; + + pp$1.parseTryStatement = function(node) { + this.next(); + node.block = this.parseBlock(); + node.handler = null; + if (this.type === types._catch) { + var clause = this.startNode(); + this.next(); + if (this.eat(types.parenL)) { + clause.param = this.parseBindingAtom(); + var simple = clause.param.type === "Identifier"; + this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0); + this.checkLVal(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL); + this.expect(types.parenR); + } else { + if (this.options.ecmaVersion < 10) { this.unexpected(); } + clause.param = null; + this.enterScope(0); + } + clause.body = this.parseBlock(false); + this.exitScope(); + node.handler = this.finishNode(clause, "CatchClause"); + } + node.finalizer = this.eat(types._finally) ? this.parseBlock() : null; + if (!node.handler && !node.finalizer) + { this.raise(node.start, "Missing catch or finally clause"); } + return this.finishNode(node, "TryStatement") + }; + + pp$1.parseVarStatement = function(node, kind) { + this.next(); + this.parseVar(node, false, kind); + this.semicolon(); + return this.finishNode(node, "VariableDeclaration") + }; + + pp$1.parseWhileStatement = function(node) { + this.next(); + node.test = this.parseParenExpression(); + this.labels.push(loopLabel); + node.body = this.parseStatement("while"); + this.labels.pop(); + return this.finishNode(node, "WhileStatement") + }; + + pp$1.parseWithStatement = function(node) { + if (this.strict) { this.raise(this.start, "'with' in strict mode"); } + this.next(); + node.object = this.parseParenExpression(); + node.body = this.parseStatement("with"); + return this.finishNode(node, "WithStatement") + }; + + pp$1.parseEmptyStatement = function(node) { + this.next(); + return this.finishNode(node, "EmptyStatement") + }; + + pp$1.parseLabeledStatement = function(node, maybeName, expr, context) { + for (var i$1 = 0, list = this.labels; i$1 < list.length; i$1 += 1) + { + var label = list[i$1]; + + if (label.name === maybeName) + { this.raise(expr.start, "Label '" + maybeName + "' is already declared"); + } } + var kind = this.type.isLoop ? "loop" : this.type === types._switch ? "switch" : null; + for (var i = this.labels.length - 1; i >= 0; i--) { + var label$1 = this.labels[i]; + if (label$1.statementStart === node.start) { + // Update information about previous labels on this node + label$1.statementStart = this.start; + label$1.kind = kind; + } else { break } + } + this.labels.push({name: maybeName, kind: kind, statementStart: this.start}); + node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); + this.labels.pop(); + node.label = expr; + return this.finishNode(node, "LabeledStatement") + }; + + pp$1.parseExpressionStatement = function(node, expr) { + node.expression = expr; + this.semicolon(); + return this.finishNode(node, "ExpressionStatement") + }; + + // Parse a semicolon-enclosed block of statements, handling `"use + // strict"` declarations when `allowStrict` is true (used for + // function bodies). + + pp$1.parseBlock = function(createNewLexicalScope, node) { + if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true; + if ( node === void 0 ) node = this.startNode(); + + node.body = []; + this.expect(types.braceL); + if (createNewLexicalScope) { this.enterScope(0); } + while (!this.eat(types.braceR)) { + var stmt = this.parseStatement(null); + node.body.push(stmt); + } + if (createNewLexicalScope) { this.exitScope(); } + return this.finishNode(node, "BlockStatement") + }; + + // Parse a regular `for` loop. The disambiguation code in + // `parseStatement` will already have parsed the init statement or + // expression. + + pp$1.parseFor = function(node, init) { + node.init = init; + this.expect(types.semi); + node.test = this.type === types.semi ? null : this.parseExpression(); + this.expect(types.semi); + node.update = this.type === types.parenR ? null : this.parseExpression(); + this.expect(types.parenR); + node.body = this.parseStatement("for"); + this.exitScope(); + this.labels.pop(); + return this.finishNode(node, "ForStatement") + }; + + // Parse a `for`/`in` and `for`/`of` loop, which are almost + // same from parser's perspective. + + pp$1.parseForIn = function(node, init) { + var isForIn = this.type === types._in; + this.next(); + + if ( + init.type === "VariableDeclaration" && + init.declarations[0].init != null && + ( + !isForIn || + this.options.ecmaVersion < 8 || + this.strict || + init.kind !== "var" || + init.declarations[0].id.type !== "Identifier" + ) + ) { + this.raise( + init.start, + ((isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer") + ); + } else if (init.type === "AssignmentPattern") { + this.raise(init.start, "Invalid left-hand side in for-loop"); + } + node.left = init; + node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(); + this.expect(types.parenR); + node.body = this.parseStatement("for"); + this.exitScope(); + this.labels.pop(); + return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement") + }; + + // Parse a list of variable declarations. + + pp$1.parseVar = function(node, isFor, kind) { + node.declarations = []; + node.kind = kind; + for (;;) { + var decl = this.startNode(); + this.parseVarId(decl, kind); + if (this.eat(types.eq)) { + decl.init = this.parseMaybeAssign(isFor); + } else if (kind === "const" && !(this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of")))) { + this.unexpected(); + } else if (decl.id.type !== "Identifier" && !(isFor && (this.type === types._in || this.isContextual("of")))) { + this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); + } else { + decl.init = null; + } + node.declarations.push(this.finishNode(decl, "VariableDeclarator")); + if (!this.eat(types.comma)) { break } + } + return node + }; + + pp$1.parseVarId = function(decl, kind) { + decl.id = this.parseBindingAtom(); + this.checkLVal(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false); + }; + + var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4; + + // Parse a function declaration or literal (depending on the + // `statement & FUNC_STATEMENT`). + + // Remove `allowExpressionBody` for 7.0.0, as it is only called with false + pp$1.parseFunction = function(node, statement, allowExpressionBody, isAsync) { + this.initFunction(node); + if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) { + if (this.type === types.star && (statement & FUNC_HANGING_STATEMENT)) + { this.unexpected(); } + node.generator = this.eat(types.star); + } + if (this.options.ecmaVersion >= 8) + { node.async = !!isAsync; } + + if (statement & FUNC_STATEMENT) { + node.id = (statement & FUNC_NULLABLE_ID) && this.type !== types.name ? null : this.parseIdent(); + if (node.id && !(statement & FUNC_HANGING_STATEMENT)) + // If it is a regular function declaration in sloppy mode, then it is + // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding + // mode depends on properties of the current scope (see + // treatFunctionsAsVar). + { this.checkLVal(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); } + } + + var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags(node.async, node.generator)); + + if (!(statement & FUNC_STATEMENT)) + { node.id = this.type === types.name ? this.parseIdent() : null; } + + this.parseFunctionParams(node); + this.parseFunctionBody(node, allowExpressionBody, false); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, (statement & FUNC_STATEMENT) ? "FunctionDeclaration" : "FunctionExpression") + }; + + pp$1.parseFunctionParams = function(node) { + this.expect(types.parenL); + node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); + this.checkYieldAwaitInDefaultParams(); + }; + + // Parse a class declaration or literal (depending on the + // `isStatement` parameter). + + pp$1.parseClass = function(node, isStatement) { + this.next(); + + // ecma-262 14.6 Class Definitions + // A class definition is always strict mode code. + var oldStrict = this.strict; + this.strict = true; + + this.parseClassId(node, isStatement); + this.parseClassSuper(node); + var classBody = this.startNode(); + var hadConstructor = false; + classBody.body = []; + this.expect(types.braceL); + while (!this.eat(types.braceR)) { + var element = this.parseClassElement(node.superClass !== null); + if (element) { + classBody.body.push(element); + if (element.type === "MethodDefinition" && element.kind === "constructor") { + if (hadConstructor) { this.raise(element.start, "Duplicate constructor in the same class"); } + hadConstructor = true; + } + } + } + node.body = this.finishNode(classBody, "ClassBody"); + this.strict = oldStrict; + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") + }; + + pp$1.parseClassElement = function(constructorAllowsSuper) { + var this$1 = this; + + if (this.eat(types.semi)) { return null } + + var method = this.startNode(); + var tryContextual = function (k, noLineBreak) { + if ( noLineBreak === void 0 ) noLineBreak = false; + + var start = this$1.start, startLoc = this$1.startLoc; + if (!this$1.eatContextual(k)) { return false } + if (this$1.type !== types.parenL && (!noLineBreak || !this$1.canInsertSemicolon())) { return true } + if (method.key) { this$1.unexpected(); } + method.computed = false; + method.key = this$1.startNodeAt(start, startLoc); + method.key.name = k; + this$1.finishNode(method.key, "Identifier"); + return false + }; + + method.kind = "method"; + method.static = tryContextual("static"); + var isGenerator = this.eat(types.star); + var isAsync = false; + if (!isGenerator) { + if (this.options.ecmaVersion >= 8 && tryContextual("async", true)) { + isAsync = true; + isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); + } else if (tryContextual("get")) { + method.kind = "get"; + } else if (tryContextual("set")) { + method.kind = "set"; + } + } + if (!method.key) { this.parsePropertyName(method); } + var key = method.key; + var allowsDirectSuper = false; + if (!method.computed && !method.static && (key.type === "Identifier" && key.name === "constructor" || + key.type === "Literal" && key.value === "constructor")) { + if (method.kind !== "method") { this.raise(key.start, "Constructor can't have get/set modifier"); } + if (isGenerator) { this.raise(key.start, "Constructor can't be a generator"); } + if (isAsync) { this.raise(key.start, "Constructor can't be an async method"); } + method.kind = "constructor"; + allowsDirectSuper = constructorAllowsSuper; + } else if (method.static && key.type === "Identifier" && key.name === "prototype") { + this.raise(key.start, "Classes may not have a static property named prototype"); + } + this.parseClassMethod(method, isGenerator, isAsync, allowsDirectSuper); + if (method.kind === "get" && method.value.params.length !== 0) + { this.raiseRecoverable(method.value.start, "getter should have no params"); } + if (method.kind === "set" && method.value.params.length !== 1) + { this.raiseRecoverable(method.value.start, "setter should have exactly one param"); } + if (method.kind === "set" && method.value.params[0].type === "RestElement") + { this.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params"); } + return method + }; + + pp$1.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) { + method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper); + return this.finishNode(method, "MethodDefinition") + }; + + pp$1.parseClassId = function(node, isStatement) { + if (this.type === types.name) { + node.id = this.parseIdent(); + if (isStatement) + { this.checkLVal(node.id, BIND_LEXICAL, false); } + } else { + if (isStatement === true) + { this.unexpected(); } + node.id = null; + } + }; + + pp$1.parseClassSuper = function(node) { + node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null; + }; + + // Parses module export declaration. + + pp$1.parseExport = function(node, exports) { + this.next(); + // export * from '...' + if (this.eat(types.star)) { + this.expectContextual("from"); + if (this.type !== types.string) { this.unexpected(); } + node.source = this.parseExprAtom(); + this.semicolon(); + return this.finishNode(node, "ExportAllDeclaration") + } + if (this.eat(types._default)) { // export default ... + this.checkExport(exports, "default", this.lastTokStart); + var isAsync; + if (this.type === types._function || (isAsync = this.isAsyncFunction())) { + var fNode = this.startNode(); + this.next(); + if (isAsync) { this.next(); } + node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync); + } else if (this.type === types._class) { + var cNode = this.startNode(); + node.declaration = this.parseClass(cNode, "nullableID"); + } else { + node.declaration = this.parseMaybeAssign(); + this.semicolon(); + } + return this.finishNode(node, "ExportDefaultDeclaration") + } + // export var|const|let|function|class ... + if (this.shouldParseExportStatement()) { + node.declaration = this.parseStatement(null); + if (node.declaration.type === "VariableDeclaration") + { this.checkVariableExport(exports, node.declaration.declarations); } + else + { this.checkExport(exports, node.declaration.id.name, node.declaration.id.start); } + node.specifiers = []; + node.source = null; + } else { // export { x, y as z } [from '...'] + node.declaration = null; + node.specifiers = this.parseExportSpecifiers(exports); + if (this.eatContextual("from")) { + if (this.type !== types.string) { this.unexpected(); } + node.source = this.parseExprAtom(); + } else { + for (var i = 0, list = node.specifiers; i < list.length; i += 1) { + // check for keywords used as local names + var spec = list[i]; + + this.checkUnreserved(spec.local); + // check if export is defined + this.checkLocalExport(spec.local); + } + + node.source = null; + } + this.semicolon(); + } + return this.finishNode(node, "ExportNamedDeclaration") + }; + + pp$1.checkExport = function(exports, name, pos) { + if (!exports) { return } + if (has(exports, name)) + { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); } + exports[name] = true; + }; + + pp$1.checkPatternExport = function(exports, pat) { + var type = pat.type; + if (type === "Identifier") + { this.checkExport(exports, pat.name, pat.start); } + else if (type === "ObjectPattern") + { for (var i = 0, list = pat.properties; i < list.length; i += 1) + { + var prop = list[i]; + + this.checkPatternExport(exports, prop); + } } + else if (type === "ArrayPattern") + { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) { + var elt = list$1[i$1]; + + if (elt) { this.checkPatternExport(exports, elt); } + } } + else if (type === "Property") + { this.checkPatternExport(exports, pat.value); } + else if (type === "AssignmentPattern") + { this.checkPatternExport(exports, pat.left); } + else if (type === "RestElement") + { this.checkPatternExport(exports, pat.argument); } + else if (type === "ParenthesizedExpression") + { this.checkPatternExport(exports, pat.expression); } + }; + + pp$1.checkVariableExport = function(exports, decls) { + if (!exports) { return } + for (var i = 0, list = decls; i < list.length; i += 1) + { + var decl = list[i]; + + this.checkPatternExport(exports, decl.id); + } + }; + + pp$1.shouldParseExportStatement = function() { + return this.type.keyword === "var" || + this.type.keyword === "const" || + this.type.keyword === "class" || + this.type.keyword === "function" || + this.isLet() || + this.isAsyncFunction() + }; + + // Parses a comma-separated list of module exports. + + pp$1.parseExportSpecifiers = function(exports) { + var nodes = [], first = true; + // export { x, y as z } [from '...'] + this.expect(types.braceL); + while (!this.eat(types.braceR)) { + if (!first) { + this.expect(types.comma); + if (this.afterTrailingComma(types.braceR)) { break } + } else { first = false; } + + var node = this.startNode(); + node.local = this.parseIdent(true); + node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local; + this.checkExport(exports, node.exported.name, node.exported.start); + nodes.push(this.finishNode(node, "ExportSpecifier")); + } + return nodes + }; + + // Parses import declaration. + + pp$1.parseImport = function(node) { + this.next(); + // import '...' + if (this.type === types.string) { + node.specifiers = empty; + node.source = this.parseExprAtom(); + } else { + node.specifiers = this.parseImportSpecifiers(); + this.expectContextual("from"); + node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected(); + } + this.semicolon(); + return this.finishNode(node, "ImportDeclaration") + }; + + // Parses a comma-separated list of module imports. + + pp$1.parseImportSpecifiers = function() { + var nodes = [], first = true; + if (this.type === types.name) { + // import defaultObj, { x, y as z } from '...' + var node = this.startNode(); + node.local = this.parseIdent(); + this.checkLVal(node.local, BIND_LEXICAL); + nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); + if (!this.eat(types.comma)) { return nodes } + } + if (this.type === types.star) { + var node$1 = this.startNode(); + this.next(); + this.expectContextual("as"); + node$1.local = this.parseIdent(); + this.checkLVal(node$1.local, BIND_LEXICAL); + nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier")); + return nodes + } + this.expect(types.braceL); + while (!this.eat(types.braceR)) { + if (!first) { + this.expect(types.comma); + if (this.afterTrailingComma(types.braceR)) { break } + } else { first = false; } + + var node$2 = this.startNode(); + node$2.imported = this.parseIdent(true); + if (this.eatContextual("as")) { + node$2.local = this.parseIdent(); + } else { + this.checkUnreserved(node$2.imported); + node$2.local = node$2.imported; + } + this.checkLVal(node$2.local, BIND_LEXICAL); + nodes.push(this.finishNode(node$2, "ImportSpecifier")); + } + return nodes + }; + + // Set `ExpressionStatement#directive` property for directive prologues. + pp$1.adaptDirectivePrologue = function(statements) { + for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) { + statements[i].directive = statements[i].expression.raw.slice(1, -1); + } + }; + pp$1.isDirectiveCandidate = function(statement) { + return ( + statement.type === "ExpressionStatement" && + statement.expression.type === "Literal" && + typeof statement.expression.value === "string" && + // Reject parenthesized strings. + (this.input[statement.start] === "\"" || this.input[statement.start] === "'") + ) + }; + + var pp$2 = Parser.prototype; + + // Convert existing expression atom to assignable pattern + // if possible. + + pp$2.toAssignable = function(node, isBinding, refDestructuringErrors) { + if (this.options.ecmaVersion >= 6 && node) { + switch (node.type) { + case "Identifier": + if (this.inAsync && node.name === "await") + { this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); } + break + + case "ObjectPattern": + case "ArrayPattern": + case "RestElement": + break + + case "ObjectExpression": + node.type = "ObjectPattern"; + if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + for (var i = 0, list = node.properties; i < list.length; i += 1) { + var prop = list[i]; + + this.toAssignable(prop, isBinding); + // Early error: + // AssignmentRestProperty[Yield, Await] : + // `...` DestructuringAssignmentTarget[Yield, Await] + // + // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|. + if ( + prop.type === "RestElement" && + (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern") + ) { + this.raise(prop.argument.start, "Unexpected token"); + } + } + break + + case "Property": + // AssignmentProperty has type === "Property" + if (node.kind !== "init") { this.raise(node.key.start, "Object pattern can't contain getter or setter"); } + this.toAssignable(node.value, isBinding); + break + + case "ArrayExpression": + node.type = "ArrayPattern"; + if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + this.toAssignableList(node.elements, isBinding); + break + + case "SpreadElement": + node.type = "RestElement"; + this.toAssignable(node.argument, isBinding); + if (node.argument.type === "AssignmentPattern") + { this.raise(node.argument.start, "Rest elements cannot have a default value"); } + break + + case "AssignmentExpression": + if (node.operator !== "=") { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); } + node.type = "AssignmentPattern"; + delete node.operator; + this.toAssignable(node.left, isBinding); + // falls through to AssignmentPattern + + case "AssignmentPattern": + break + + case "ParenthesizedExpression": + this.toAssignable(node.expression, isBinding, refDestructuringErrors); + break + + case "MemberExpression": + if (!isBinding) { break } + + default: + this.raise(node.start, "Assigning to rvalue"); + } + } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + return node + }; + + // Convert list of expression atoms to binding list. + + pp$2.toAssignableList = function(exprList, isBinding) { + var end = exprList.length; + for (var i = 0; i < end; i++) { + var elt = exprList[i]; + if (elt) { this.toAssignable(elt, isBinding); } + } + if (end) { + var last = exprList[end - 1]; + if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") + { this.unexpected(last.argument.start); } + } + return exprList + }; + + // Parses spread element. + + pp$2.parseSpread = function(refDestructuringErrors) { + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeAssign(false, refDestructuringErrors); + return this.finishNode(node, "SpreadElement") + }; + + pp$2.parseRestBinding = function() { + var node = this.startNode(); + this.next(); + + // RestElement inside of a function parameter must be an identifier + if (this.options.ecmaVersion === 6 && this.type !== types.name) + { this.unexpected(); } + + node.argument = this.parseBindingAtom(); + + return this.finishNode(node, "RestElement") + }; + + // Parses lvalue (assignable) atom. + + pp$2.parseBindingAtom = function() { + if (this.options.ecmaVersion >= 6) { + switch (this.type) { + case types.bracketL: + var node = this.startNode(); + this.next(); + node.elements = this.parseBindingList(types.bracketR, true, true); + return this.finishNode(node, "ArrayPattern") + + case types.braceL: + return this.parseObj(true) + } + } + return this.parseIdent() + }; + + pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma) { + var elts = [], first = true; + while (!this.eat(close)) { + if (first) { first = false; } + else { this.expect(types.comma); } + if (allowEmpty && this.type === types.comma) { + elts.push(null); + } else if (allowTrailingComma && this.afterTrailingComma(close)) { + break + } else if (this.type === types.ellipsis) { + var rest = this.parseRestBinding(); + this.parseBindingListItem(rest); + elts.push(rest); + if (this.type === types.comma) { this.raise(this.start, "Comma is not permitted after the rest element"); } + this.expect(close); + break + } else { + var elem = this.parseMaybeDefault(this.start, this.startLoc); + this.parseBindingListItem(elem); + elts.push(elem); + } + } + return elts + }; + + pp$2.parseBindingListItem = function(param) { + return param + }; + + // Parses assignment pattern around given atom if possible. + + pp$2.parseMaybeDefault = function(startPos, startLoc, left) { + left = left || this.parseBindingAtom(); + if (this.options.ecmaVersion < 6 || !this.eat(types.eq)) { return left } + var node = this.startNodeAt(startPos, startLoc); + node.left = left; + node.right = this.parseMaybeAssign(); + return this.finishNode(node, "AssignmentPattern") + }; + + // Verify that a node is an lval — something that can be assigned + // to. + // bindingType can be either: + // 'var' indicating that the lval creates a 'var' binding + // 'let' indicating that the lval creates a lexical ('let' or 'const') binding + // 'none' indicating that the binding should be checked for illegal identifiers, but not for duplicate references + + pp$2.checkLVal = function(expr, bindingType, checkClashes) { + if ( bindingType === void 0 ) bindingType = BIND_NONE; + + switch (expr.type) { + case "Identifier": + if (bindingType === BIND_LEXICAL && expr.name === "let") + { this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"); } + if (this.strict && this.reservedWordsStrictBind.test(expr.name)) + { this.raiseRecoverable(expr.start, (bindingType ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); } + if (checkClashes) { + if (has(checkClashes, expr.name)) + { this.raiseRecoverable(expr.start, "Argument name clash"); } + checkClashes[expr.name] = true; + } + if (bindingType !== BIND_NONE && bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } + break + + case "MemberExpression": + if (bindingType) { this.raiseRecoverable(expr.start, "Binding member expression"); } + break + + case "ObjectPattern": + for (var i = 0, list = expr.properties; i < list.length; i += 1) + { + var prop = list[i]; + + this.checkLVal(prop, bindingType, checkClashes); + } + break + + case "Property": + // AssignmentProperty has type === "Property" + this.checkLVal(expr.value, bindingType, checkClashes); + break + + case "ArrayPattern": + for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { + var elem = list$1[i$1]; + + if (elem) { this.checkLVal(elem, bindingType, checkClashes); } + } + break + + case "AssignmentPattern": + this.checkLVal(expr.left, bindingType, checkClashes); + break + + case "RestElement": + this.checkLVal(expr.argument, bindingType, checkClashes); + break + + case "ParenthesizedExpression": + this.checkLVal(expr.expression, bindingType, checkClashes); + break + + default: + this.raise(expr.start, (bindingType ? "Binding" : "Assigning to") + " rvalue"); + } + }; + + // A recursive descent parser operates by defining functions for all + + var pp$3 = Parser.prototype; + + // Check if property name clashes with already added. + // Object/class getters and setters are not allowed to clash — + // either with each other or with an init property — and in + // strict mode, init properties are also not allowed to be repeated. + + pp$3.checkPropClash = function(prop, propHash, refDestructuringErrors) { + if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") + { return } + if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) + { return } + var key = prop.key; + var name; + switch (key.type) { + case "Identifier": name = key.name; break + case "Literal": name = String(key.value); break + default: return + } + var kind = prop.kind; + if (this.options.ecmaVersion >= 6) { + if (name === "__proto__" && kind === "init") { + if (propHash.proto) { + if (refDestructuringErrors && refDestructuringErrors.doubleProto < 0) { refDestructuringErrors.doubleProto = key.start; } + // Backwards-compat kludge. Can be removed in version 6.0 + else { this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); } + } + propHash.proto = true; + } + return + } + name = "$" + name; + var other = propHash[name]; + if (other) { + var redefinition; + if (kind === "init") { + redefinition = this.strict && other.init || other.get || other.set; + } else { + redefinition = other.init || other[kind]; + } + if (redefinition) + { this.raiseRecoverable(key.start, "Redefinition of property"); } + } else { + other = propHash[name] = { + init: false, + get: false, + set: false + }; + } + other[kind] = true; + }; + + // ### Expression parsing + + // These nest, from the most general expression type at the top to + // 'atomic', nondivisible expression types at the bottom. Most of + // the functions will simply let the function(s) below them parse, + // and, *if* the syntactic construct they handle is present, wrap + // the AST node that the inner parser gave them in another node. + + // Parse a full expression. The optional arguments are used to + // forbid the `in` operator (in for loops initalization expressions) + // and provide reference for storing '=' operator inside shorthand + // property assignment in contexts where both object expression + // and object pattern might appear (so it's possible to raise + // delayed syntax error at correct position). + + pp$3.parseExpression = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseMaybeAssign(noIn, refDestructuringErrors); + if (this.type === types.comma) { + var node = this.startNodeAt(startPos, startLoc); + node.expressions = [expr]; + while (this.eat(types.comma)) { node.expressions.push(this.parseMaybeAssign(noIn, refDestructuringErrors)); } + return this.finishNode(node, "SequenceExpression") + } + return expr + }; + + // Parse an assignment expression. This includes applications of + // operators like `+=`. + + pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) { + if (this.isContextual("yield")) { + if (this.inGenerator) { return this.parseYield(noIn) } + // The tokenizer will assume an expression is allowed after + // `yield`, but this isn't that kind of yield + else { this.exprAllowed = false; } + } + + var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldShorthandAssign = -1; + if (refDestructuringErrors) { + oldParenAssign = refDestructuringErrors.parenthesizedAssign; + oldTrailingComma = refDestructuringErrors.trailingComma; + oldShorthandAssign = refDestructuringErrors.shorthandAssign; + refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.shorthandAssign = -1; + } else { + refDestructuringErrors = new DestructuringErrors; + ownDestructuringErrors = true; + } + + var startPos = this.start, startLoc = this.startLoc; + if (this.type === types.parenL || this.type === types.name) + { this.potentialArrowAt = this.start; } + var left = this.parseMaybeConditional(noIn, refDestructuringErrors); + if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); } + if (this.type.isAssign) { + var node = this.startNodeAt(startPos, startLoc); + node.operator = this.value; + node.left = this.type === types.eq ? this.toAssignable(left, false, refDestructuringErrors) : left; + if (!ownDestructuringErrors) { DestructuringErrors.call(refDestructuringErrors); } + refDestructuringErrors.shorthandAssign = -1; // reset because shorthand default was used correctly + this.checkLVal(left); + this.next(); + node.right = this.parseMaybeAssign(noIn); + return this.finishNode(node, "AssignmentExpression") + } else { + if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); } + } + if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; } + if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; } + if (oldShorthandAssign > -1) { refDestructuringErrors.shorthandAssign = oldShorthandAssign; } + return left + }; + + // Parse a ternary conditional (`?:`) operator. + + pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseExprOps(noIn, refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + if (this.eat(types.question)) { + var node = this.startNodeAt(startPos, startLoc); + node.test = expr; + node.consequent = this.parseMaybeAssign(); + this.expect(types.colon); + node.alternate = this.parseMaybeAssign(noIn); + return this.finishNode(node, "ConditionalExpression") + } + return expr + }; + + // Start the precedence parser. + + pp$3.parseExprOps = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseMaybeUnary(refDestructuringErrors, false); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, noIn) + }; + + // Parse binary operators with the operator precedence parsing + // algorithm. `left` is the left-hand side of the operator. + // `minPrec` provides context that allows the function to stop and + // defer further parser to one of its callers when it encounters an + // operator that has a lower precedence than the set it is parsing. + + pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) { + var prec = this.type.binop; + if (prec != null && (!noIn || this.type !== types._in)) { + if (prec > minPrec) { + var logical = this.type === types.logicalOR || this.type === types.logicalAND; + var op = this.value; + this.next(); + var startPos = this.start, startLoc = this.startLoc; + var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn); + var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical); + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn) + } + } + return left + }; + + pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) { + var node = this.startNodeAt(startPos, startLoc); + node.left = left; + node.operator = op; + node.right = right; + return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") + }; + + // Parse unary operators, both prefix and postfix. + + pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) { + var startPos = this.start, startLoc = this.startLoc, expr; + if (this.isContextual("await") && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction))) { + expr = this.parseAwait(); + sawUnary = true; + } else if (this.type.prefix) { + var node = this.startNode(), update = this.type === types.incDec; + node.operator = this.value; + node.prefix = true; + this.next(); + node.argument = this.parseMaybeUnary(null, true); + this.checkExpressionErrors(refDestructuringErrors, true); + if (update) { this.checkLVal(node.argument); } + else if (this.strict && node.operator === "delete" && + node.argument.type === "Identifier") + { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); } + else { sawUnary = true; } + expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); + } else { + expr = this.parseExprSubscripts(refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + while (this.type.postfix && !this.canInsertSemicolon()) { + var node$1 = this.startNodeAt(startPos, startLoc); + node$1.operator = this.value; + node$1.prefix = false; + node$1.argument = expr; + this.checkLVal(expr); + this.next(); + expr = this.finishNode(node$1, "UpdateExpression"); + } + } + + if (!sawUnary && this.eat(types.starstar)) + { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false) } + else + { return expr } + }; + + // Parse call, dot, and `[]`-subscript expressions. + + pp$3.parseExprSubscripts = function(refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseExprAtom(refDestructuringErrors); + var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")"; + if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) { return expr } + var result = this.parseSubscripts(expr, startPos, startLoc); + if (refDestructuringErrors && result.type === "MemberExpression") { + if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; } + if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; } + } + return result + }; + + pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) { + var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && + this.lastTokEnd === base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === "async"; + while (true) { + var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow); + if (element === base || element.type === "ArrowFunctionExpression") { return element } + base = element; + } + }; + + pp$3.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow) { + var computed = this.eat(types.bracketL); + if (computed || this.eat(types.dot)) { + var node = this.startNodeAt(startPos, startLoc); + node.object = base; + node.property = computed ? this.parseExpression() : this.parseIdent(true); + node.computed = !!computed; + if (computed) { this.expect(types.bracketR); } + base = this.finishNode(node, "MemberExpression"); + } else if (!noCalls && this.eat(types.parenL)) { + var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + var exprList = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8 && base.type !== "Import", false, refDestructuringErrors); + if (maybeAsyncArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + if (this.awaitIdentPos > 0) + { this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); } + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true) + } + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; + var node$1 = this.startNodeAt(startPos, startLoc); + node$1.callee = base; + node$1.arguments = exprList; + if (node$1.callee.type === "Import") { + if (node$1.arguments.length !== 1) { + this.raise(node$1.start, "import() requires exactly one argument"); + } + + var importArg = node$1.arguments[0]; + if (importArg && importArg.type === "SpreadElement") { + this.raise(importArg.start, "... is not allowed in import()"); + } + } + base = this.finishNode(node$1, "CallExpression"); + } else if (this.type === types.backQuote) { + var node$2 = this.startNodeAt(startPos, startLoc); + node$2.tag = base; + node$2.quasi = this.parseTemplate({isTagged: true}); + base = this.finishNode(node$2, "TaggedTemplateExpression"); + } + return base + }; + + // Parse an atomic expression — either a single token that is an + // expression, an expression started by a keyword like `function` or + // `new`, or an expression wrapped in punctuation like `()`, `[]`, + // or `{}`. + + pp$3.parseExprAtom = function(refDestructuringErrors) { + // If a division operator appears in an expression position, the + // tokenizer got confused, and we force it to read a regexp instead. + if (this.type === types.slash) { this.readRegexp(); } + + var node, canBeArrow = this.potentialArrowAt === this.start; + switch (this.type) { + case types._super: + if (!this.allowSuper) + { this.raise(this.start, "'super' keyword outside a method"); } + node = this.startNode(); + this.next(); + if (this.type === types.parenL && !this.allowDirectSuper) + { this.raise(node.start, "super() call outside constructor of a subclass"); } + // The `super` keyword can appear at below: + // SuperProperty: + // super [ Expression ] + // super . IdentifierName + // SuperCall: + // super Arguments + if (this.type !== types.dot && this.type !== types.bracketL && this.type !== types.parenL) + { this.unexpected(); } + return this.finishNode(node, "Super") + + case types._this: + node = this.startNode(); + this.next(); + return this.finishNode(node, "ThisExpression") + + case types.name: + var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; + var id = this.parseIdent(false); + if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types._function)) + { return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true) } + if (canBeArrow && !this.canInsertSemicolon()) { + if (this.eat(types.arrow)) + { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false) } + if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types.name && !containsEsc) { + id = this.parseIdent(false); + if (this.canInsertSemicolon() || !this.eat(types.arrow)) + { this.unexpected(); } + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true) + } + } + return id + + case types.regexp: + var value = this.value; + node = this.parseLiteral(value.value); + node.regex = {pattern: value.pattern, flags: value.flags}; + return node + + case types.num: case types.string: + return this.parseLiteral(this.value) + + case types._null: case types._true: case types._false: + node = this.startNode(); + node.value = this.type === types._null ? null : this.type === types._true; + node.raw = this.type.keyword; + this.next(); + return this.finishNode(node, "Literal") + + case types.parenL: + var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow); + if (refDestructuringErrors) { + if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) + { refDestructuringErrors.parenthesizedAssign = start; } + if (refDestructuringErrors.parenthesizedBind < 0) + { refDestructuringErrors.parenthesizedBind = start; } + } + return expr + + case types.bracketL: + node = this.startNode(); + this.next(); + node.elements = this.parseExprList(types.bracketR, true, true, refDestructuringErrors); + return this.finishNode(node, "ArrayExpression") + + case types.braceL: + return this.parseObj(false, refDestructuringErrors) + + case types._function: + node = this.startNode(); + this.next(); + return this.parseFunction(node, 0) + + case types._class: + return this.parseClass(this.startNode(), false) + + case types._new: + return this.parseNew() + + case types.backQuote: + return this.parseTemplate() + + case types._import: + if (this.options.ecmaVersion > 10) { + return this.parseDynamicImport() + } else { + return this.unexpected() + } + + default: + this.unexpected(); + } + }; + + pp$3.parseDynamicImport = function() { + var node = this.startNode(); + this.next(); + if (this.type !== types.parenL) { + this.unexpected(); + } + return this.finishNode(node, "Import") + }; + + pp$3.parseLiteral = function(value) { + var node = this.startNode(); + node.value = value; + node.raw = this.input.slice(this.start, this.end); + if (node.raw.charCodeAt(node.raw.length - 1) === 110) { node.bigint = node.raw.slice(0, -1); } + this.next(); + return this.finishNode(node, "Literal") + }; + + pp$3.parseParenExpression = function() { + this.expect(types.parenL); + var val = this.parseExpression(); + this.expect(types.parenR); + return val + }; + + pp$3.parseParenAndDistinguishExpression = function(canBeArrow) { + var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8; + if (this.options.ecmaVersion >= 6) { + this.next(); + + var innerStartPos = this.start, innerStartLoc = this.startLoc; + var exprList = [], first = true, lastIsComma = false; + var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; + this.yieldPos = 0; + this.awaitPos = 0; + // Do not save awaitIdentPos to allow checking awaits nested in parameters + while (this.type !== types.parenR) { + first ? first = false : this.expect(types.comma); + if (allowTrailingComma && this.afterTrailingComma(types.parenR, true)) { + lastIsComma = true; + break + } else if (this.type === types.ellipsis) { + spreadStart = this.start; + exprList.push(this.parseParenItem(this.parseRestBinding())); + if (this.type === types.comma) { this.raise(this.start, "Comma is not permitted after the rest element"); } + break + } else { + exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem)); + } + } + var innerEndPos = this.start, innerEndLoc = this.startLoc; + this.expect(types.parenR); + + if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + return this.parseParenArrowList(startPos, startLoc, exprList) + } + + if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); } + if (spreadStart) { this.unexpected(spreadStart); } + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + + if (exprList.length > 1) { + val = this.startNodeAt(innerStartPos, innerStartLoc); + val.expressions = exprList; + this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); + } else { + val = exprList[0]; + } + } else { + val = this.parseParenExpression(); + } + + if (this.options.preserveParens) { + var par = this.startNodeAt(startPos, startLoc); + par.expression = val; + return this.finishNode(par, "ParenthesizedExpression") + } else { + return val + } + }; + + pp$3.parseParenItem = function(item) { + return item + }; + + pp$3.parseParenArrowList = function(startPos, startLoc, exprList) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList) + }; + + // New's precedence is slightly tricky. It must allow its argument to + // be a `[]` or dot subscript expression, but not a call — at least, + // not without wrapping it in parentheses. Thus, it uses the noCalls + // argument to parseSubscripts to prevent it from consuming the + // argument list. + + var empty$1 = []; + + pp$3.parseNew = function() { + var node = this.startNode(); + var meta = this.parseIdent(true); + if (this.options.ecmaVersion >= 6 && this.eat(types.dot)) { + node.meta = meta; + var containsEsc = this.containsEsc; + node.property = this.parseIdent(true); + if (node.property.name !== "target" || containsEsc) + { this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target"); } + if (!this.inNonArrowFunction()) + { this.raiseRecoverable(node.start, "new.target can only be used in functions"); } + return this.finishNode(node, "MetaProperty") + } + var startPos = this.start, startLoc = this.startLoc; + node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); + if (this.options.ecmaVersion > 10 && node.callee.type === "Import") { + this.raise(node.callee.start, "Cannot use new with import(...)"); + } + if (this.eat(types.parenL)) { node.arguments = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8 && node.callee.type !== "Import", false); } + else { node.arguments = empty$1; } + return this.finishNode(node, "NewExpression") + }; + + // Parse template expression. + + pp$3.parseTemplateElement = function(ref) { + var isTagged = ref.isTagged; + + var elem = this.startNode(); + if (this.type === types.invalidTemplate) { + if (!isTagged) { + this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"); + } + elem.value = { + raw: this.value, + cooked: null + }; + } else { + elem.value = { + raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), + cooked: this.value + }; + } + this.next(); + elem.tail = this.type === types.backQuote; + return this.finishNode(elem, "TemplateElement") + }; + + pp$3.parseTemplate = function(ref) { + if ( ref === void 0 ) ref = {}; + var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false; + + var node = this.startNode(); + this.next(); + node.expressions = []; + var curElt = this.parseTemplateElement({isTagged: isTagged}); + node.quasis = [curElt]; + while (!curElt.tail) { + if (this.type === types.eof) { this.raise(this.pos, "Unterminated template literal"); } + this.expect(types.dollarBraceL); + node.expressions.push(this.parseExpression()); + this.expect(types.braceR); + node.quasis.push(curElt = this.parseTemplateElement({isTagged: isTagged})); + } + this.next(); + return this.finishNode(node, "TemplateLiteral") + }; + + pp$3.isAsyncProp = function(prop) { + return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && + (this.type === types.name || this.type === types.num || this.type === types.string || this.type === types.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types.star)) && + !lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + }; + + // Parse an object literal or binding pattern. + + pp$3.parseObj = function(isPattern, refDestructuringErrors) { + var node = this.startNode(), first = true, propHash = {}; + node.properties = []; + this.next(); + while (!this.eat(types.braceR)) { + if (!first) { + this.expect(types.comma); + if (this.afterTrailingComma(types.braceR)) { break } + } else { first = false; } + + var prop = this.parseProperty(isPattern, refDestructuringErrors); + if (!isPattern) { this.checkPropClash(prop, propHash, refDestructuringErrors); } + node.properties.push(prop); + } + return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") + }; + + pp$3.parseProperty = function(isPattern, refDestructuringErrors) { + var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc; + if (this.options.ecmaVersion >= 9 && this.eat(types.ellipsis)) { + if (isPattern) { + prop.argument = this.parseIdent(false); + if (this.type === types.comma) { + this.raise(this.start, "Comma is not permitted after the rest element"); + } + return this.finishNode(prop, "RestElement") + } + // To disallow parenthesized identifier via `this.toAssignable()`. + if (this.type === types.parenL && refDestructuringErrors) { + if (refDestructuringErrors.parenthesizedAssign < 0) { + refDestructuringErrors.parenthesizedAssign = this.start; + } + if (refDestructuringErrors.parenthesizedBind < 0) { + refDestructuringErrors.parenthesizedBind = this.start; + } + } + // Parse argument. + prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); + // To disallow trailing comma via `this.toAssignable()`. + if (this.type === types.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) { + refDestructuringErrors.trailingComma = this.start; + } + // Finish + return this.finishNode(prop, "SpreadElement") + } + if (this.options.ecmaVersion >= 6) { + prop.method = false; + prop.shorthand = false; + if (isPattern || refDestructuringErrors) { + startPos = this.start; + startLoc = this.startLoc; + } + if (!isPattern) + { isGenerator = this.eat(types.star); } + } + var containsEsc = this.containsEsc; + this.parsePropertyName(prop); + if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) { + isAsync = true; + isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); + this.parsePropertyName(prop, refDestructuringErrors); + } else { + isAsync = false; + } + this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc); + return this.finishNode(prop, "Property") + }; + + pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { + if ((isGenerator || isAsync) && this.type === types.colon) + { this.unexpected(); } + + if (this.eat(types.colon)) { + prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); + prop.kind = "init"; + } else if (this.options.ecmaVersion >= 6 && this.type === types.parenL) { + if (isPattern) { this.unexpected(); } + prop.kind = "init"; + prop.method = true; + prop.value = this.parseMethod(isGenerator, isAsync); + } else if (!isPattern && !containsEsc && + this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && + (prop.key.name === "get" || prop.key.name === "set") && + (this.type !== types.comma && this.type !== types.braceR)) { + if (isGenerator || isAsync) { this.unexpected(); } + prop.kind = prop.key.name; + this.parsePropertyName(prop); + prop.value = this.parseMethod(false); + var paramCount = prop.kind === "get" ? 0 : 1; + if (prop.value.params.length !== paramCount) { + var start = prop.value.start; + if (prop.kind === "get") + { this.raiseRecoverable(start, "getter should have no params"); } + else + { this.raiseRecoverable(start, "setter should have exactly one param"); } + } else { + if (prop.kind === "set" && prop.value.params[0].type === "RestElement") + { this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); } + } + } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { + if (isGenerator || isAsync) { this.unexpected(); } + this.checkUnreserved(prop.key); + if (prop.key.name === "await" && !this.awaitIdentPos) + { this.awaitIdentPos = startPos; } + prop.kind = "init"; + if (isPattern) { + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); + } else if (this.type === types.eq && refDestructuringErrors) { + if (refDestructuringErrors.shorthandAssign < 0) + { refDestructuringErrors.shorthandAssign = this.start; } + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); + } else { + prop.value = prop.key; + } + prop.shorthand = true; + } else { this.unexpected(); } + }; + + pp$3.parsePropertyName = function(prop) { + if (this.options.ecmaVersion >= 6) { + if (this.eat(types.bracketL)) { + prop.computed = true; + prop.key = this.parseMaybeAssign(); + this.expect(types.bracketR); + return prop.key + } else { + prop.computed = false; + } + } + return prop.key = this.type === types.num || this.type === types.string ? this.parseExprAtom() : this.parseIdent(true) + }; + + // Initialize empty function node. + + pp$3.initFunction = function(node) { + node.id = null; + if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; } + if (this.options.ecmaVersion >= 8) { node.async = false; } + }; + + // Parse object or class method. + + pp$3.parseMethod = function(isGenerator, isAsync, allowDirectSuper) { + var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + + this.initFunction(node); + if (this.options.ecmaVersion >= 6) + { node.generator = isGenerator; } + if (this.options.ecmaVersion >= 8) + { node.async = !!isAsync; } + + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); + + this.expect(types.parenL); + node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); + this.checkYieldAwaitInDefaultParams(); + this.parseFunctionBody(node, false, true); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, "FunctionExpression") + }; + + // Parse arrow function expression with given parameters. + + pp$3.parseArrowExpression = function(node, params, isAsync) { + var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + + this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW); + this.initFunction(node); + if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } + + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + + node.params = this.toAssignableList(params, true); + this.parseFunctionBody(node, true, false); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, "ArrowFunctionExpression") + }; + + // Parse function body and check parameters. + + pp$3.parseFunctionBody = function(node, isArrowFunction, isMethod) { + var isExpression = isArrowFunction && this.type !== types.braceL; + var oldStrict = this.strict, useStrict = false; + + if (isExpression) { + node.body = this.parseMaybeAssign(); + node.expression = true; + this.checkParams(node, false); + } else { + var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params); + if (!oldStrict || nonSimple) { + useStrict = this.strictDirective(this.end); + // If this is a strict mode function, verify that argument names + // are not repeated, and it does not try to bind the words `eval` + // or `arguments`. + if (useStrict && nonSimple) + { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); } + } + // Start a new scope with regard to labels and the `inFunction` + // flag (restore them to their old value afterwards). + var oldLabels = this.labels; + this.labels = []; + if (useStrict) { this.strict = true; } + + // Add the params to varDeclaredNames to ensure that an error is thrown + // if a let/const declaration in the function clashes with one of the params. + this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params)); + node.body = this.parseBlock(false); + node.expression = false; + this.adaptDirectivePrologue(node.body.body); + this.labels = oldLabels; + } + this.exitScope(); + + // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval' + if (this.strict && node.id) { this.checkLVal(node.id, BIND_OUTSIDE); } + this.strict = oldStrict; + }; + + pp$3.isSimpleParamList = function(params) { + for (var i = 0, list = params; i < list.length; i += 1) + { + var param = list[i]; + + if (param.type !== "Identifier") { return false + } } + return true + }; + + // Checks function params for various disallowed patterns such as using "eval" + // or "arguments" and duplicate parameters. + + pp$3.checkParams = function(node, allowDuplicates) { + var nameHash = {}; + for (var i = 0, list = node.params; i < list.length; i += 1) + { + var param = list[i]; + + this.checkLVal(param, BIND_VAR, allowDuplicates ? null : nameHash); + } + }; + + // Parses a comma-separated list of expressions, and returns them as + // an array. `close` is the token type that ends the list, and + // `allowEmpty` can be turned on to allow subsequent commas with + // nothing in between them to be parsed as `null` (which is needed + // for array literals). + + pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { + var elts = [], first = true; + while (!this.eat(close)) { + if (!first) { + this.expect(types.comma); + if (allowTrailingComma && this.afterTrailingComma(close)) { break } + } else { first = false; } + + var elt = (void 0); + if (allowEmpty && this.type === types.comma) + { elt = null; } + else if (this.type === types.ellipsis) { + elt = this.parseSpread(refDestructuringErrors); + if (refDestructuringErrors && this.type === types.comma && refDestructuringErrors.trailingComma < 0) + { refDestructuringErrors.trailingComma = this.start; } + } else { + elt = this.parseMaybeAssign(false, refDestructuringErrors); + } + elts.push(elt); + } + return elts + }; + + pp$3.checkUnreserved = function(ref) { + var start = ref.start; + var end = ref.end; + var name = ref.name; + + if (this.inGenerator && name === "yield") + { this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); } + if (this.inAsync && name === "await") + { this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); } + if (this.keywords.test(name)) + { this.raise(start, ("Unexpected keyword '" + name + "'")); } + if (this.options.ecmaVersion < 6 && + this.input.slice(start, end).indexOf("\\") !== -1) { return } + var re = this.strict ? this.reservedWordsStrict : this.reservedWords; + if (re.test(name)) { + if (!this.inAsync && name === "await") + { this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); } + this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); + } + }; + + // Parse the next token as an identifier. If `liberal` is true (used + // when parsing properties), it will also convert keywords into + // identifiers. + + pp$3.parseIdent = function(liberal, isBinding) { + var node = this.startNode(); + if (liberal && this.options.allowReserved === "never") { liberal = false; } + if (this.type === types.name) { + node.name = this.value; + } else if (this.type.keyword) { + node.name = this.type.keyword; + + // To fix https://github.com/acornjs/acorn/issues/575 + // `class` and `function` keywords push new context into this.context. + // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name. + // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword + if ((node.name === "class" || node.name === "function") && + (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) { + this.context.pop(); + } + } else { + this.unexpected(); + } + this.next(); + this.finishNode(node, "Identifier"); + if (!liberal) { + this.checkUnreserved(node); + if (node.name === "await" && !this.awaitIdentPos) + { this.awaitIdentPos = node.start; } + } + return node + }; + + // Parses yield expression inside generator. + + pp$3.parseYield = function(noIn) { + if (!this.yieldPos) { this.yieldPos = this.start; } + + var node = this.startNode(); + this.next(); + if (this.type === types.semi || this.canInsertSemicolon() || (this.type !== types.star && !this.type.startsExpr)) { + node.delegate = false; + node.argument = null; + } else { + node.delegate = this.eat(types.star); + node.argument = this.parseMaybeAssign(noIn); + } + return this.finishNode(node, "YieldExpression") + }; + + pp$3.parseAwait = function() { + if (!this.awaitPos) { this.awaitPos = this.start; } + + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeUnary(null, true); + return this.finishNode(node, "AwaitExpression") + }; + + var pp$4 = Parser.prototype; + + // This function is used to raise exceptions on parse errors. It + // takes an offset integer (into the current `input`) to indicate + // the location of the error, attaches the position to the end + // of the error message, and then raises a `SyntaxError` with that + // message. + + pp$4.raise = function(pos, message) { + var loc = getLineInfo(this.input, pos); + message += " (" + loc.line + ":" + loc.column + ")"; + var err = new SyntaxError(message); + err.pos = pos; err.loc = loc; err.raisedAt = this.pos; + throw err + }; + + pp$4.raiseRecoverable = pp$4.raise; + + pp$4.curPosition = function() { + if (this.options.locations) { + return new Position(this.curLine, this.pos - this.lineStart) + } + }; + + var pp$5 = Parser.prototype; + + var Scope = function Scope(flags) { + this.flags = flags; + // A list of var-declared names in the current lexical scope + this.var = []; + // A list of lexically-declared names in the current lexical scope + this.lexical = []; + // A list of lexically-declared FunctionDeclaration names in the current lexical scope + this.functions = []; + }; + + // The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names. + + pp$5.enterScope = function(flags) { + this.scopeStack.push(new Scope(flags)); + }; + + pp$5.exitScope = function() { + this.scopeStack.pop(); + }; + + // The spec says: + // > At the top level of a function, or script, function declarations are + // > treated like var declarations rather than like lexical declarations. + pp$5.treatFunctionsAsVarInScope = function(scope) { + return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP) + }; + + pp$5.declareName = function(name, bindingType, pos) { + var redeclared = false; + if (bindingType === BIND_LEXICAL) { + var scope = this.currentScope(); + redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; + scope.lexical.push(name); + if (this.inModule && (scope.flags & SCOPE_TOP)) + { delete this.undefinedExports[name]; } + } else if (bindingType === BIND_SIMPLE_CATCH) { + var scope$1 = this.currentScope(); + scope$1.lexical.push(name); + } else if (bindingType === BIND_FUNCTION) { + var scope$2 = this.currentScope(); + if (this.treatFunctionsAsVar) + { redeclared = scope$2.lexical.indexOf(name) > -1; } + else + { redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; } + scope$2.functions.push(name); + } else { + for (var i = this.scopeStack.length - 1; i >= 0; --i) { + var scope$3 = this.scopeStack[i]; + if (scope$3.lexical.indexOf(name) > -1 && !((scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) || + !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) { + redeclared = true; + break + } + scope$3.var.push(name); + if (this.inModule && (scope$3.flags & SCOPE_TOP)) + { delete this.undefinedExports[name]; } + if (scope$3.flags & SCOPE_VAR) { break } + } + } + if (redeclared) { this.raiseRecoverable(pos, ("Identifier '" + name + "' has already been declared")); } + }; + + pp$5.checkLocalExport = function(id) { + // scope.functions must be empty as Module code is always strict. + if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && + this.scopeStack[0].var.indexOf(id.name) === -1) { + this.undefinedExports[id.name] = id; + } + }; + + pp$5.currentScope = function() { + return this.scopeStack[this.scopeStack.length - 1] + }; + + pp$5.currentVarScope = function() { + for (var i = this.scopeStack.length - 1;; i--) { + var scope = this.scopeStack[i]; + if (scope.flags & SCOPE_VAR) { return scope } + } + }; + + // Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`. + pp$5.currentThisScope = function() { + for (var i = this.scopeStack.length - 1;; i--) { + var scope = this.scopeStack[i]; + if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope } + } + }; + + var Node = function Node(parser, pos, loc) { + this.type = ""; + this.start = pos; + this.end = 0; + if (parser.options.locations) + { this.loc = new SourceLocation(parser, loc); } + if (parser.options.directSourceFile) + { this.sourceFile = parser.options.directSourceFile; } + if (parser.options.ranges) + { this.range = [pos, 0]; } + }; + + // Start an AST node, attaching a start offset. + + var pp$6 = Parser.prototype; + + pp$6.startNode = function() { + return new Node(this, this.start, this.startLoc) + }; + + pp$6.startNodeAt = function(pos, loc) { + return new Node(this, pos, loc) + }; + + // Finish an AST node, adding `type` and `end` properties. + + function finishNodeAt(node, type, pos, loc) { + node.type = type; + node.end = pos; + if (this.options.locations) + { node.loc.end = loc; } + if (this.options.ranges) + { node.range[1] = pos; } + return node + } + + pp$6.finishNode = function(node, type) { + return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) + }; + + // Finish node at given position + + pp$6.finishNodeAt = function(node, type, pos, loc) { + return finishNodeAt.call(this, node, type, pos, loc) + }; + + // The algorithm used to determine whether a regexp can appear at a + + var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) { + this.token = token; + this.isExpr = !!isExpr; + this.preserveSpace = !!preserveSpace; + this.override = override; + this.generator = !!generator; + }; + + var types$1 = { + b_stat: new TokContext("{", false), + b_expr: new TokContext("{", true), + b_tmpl: new TokContext("${", false), + p_stat: new TokContext("(", false), + p_expr: new TokContext("(", true), + q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }), + f_stat: new TokContext("function", false), + f_expr: new TokContext("function", true), + f_expr_gen: new TokContext("function", true, false, null, true), + f_gen: new TokContext("function", false, false, null, true) + }; + + var pp$7 = Parser.prototype; + + pp$7.initialContext = function() { + return [types$1.b_stat] + }; + + pp$7.braceIsBlock = function(prevType) { + var parent = this.curContext(); + if (parent === types$1.f_expr || parent === types$1.f_stat) + { return true } + if (prevType === types.colon && (parent === types$1.b_stat || parent === types$1.b_expr)) + { return !parent.isExpr } + + // The check for `tt.name && exprAllowed` detects whether we are + // after a `yield` or `of` construct. See the `updateContext` for + // `tt.name`. + if (prevType === types._return || prevType === types.name && this.exprAllowed) + { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) } + if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType === types.arrow) + { return true } + if (prevType === types.braceL) + { return parent === types$1.b_stat } + if (prevType === types._var || prevType === types._const || prevType === types.name) + { return false } + return !this.exprAllowed + }; + + pp$7.inGeneratorContext = function() { + for (var i = this.context.length - 1; i >= 1; i--) { + var context = this.context[i]; + if (context.token === "function") + { return context.generator } + } + return false + }; -var empty$1 = []; + pp$7.updateContext = function(prevType) { + var update, type = this.type; + if (type.keyword && prevType === types.dot) + { this.exprAllowed = false; } + else if (update = type.updateContext) + { update.call(this, prevType); } + else + { this.exprAllowed = type.beforeExpr; } + }; -pp$3.parseNew = function() { - var node = this.startNode(); - var meta = this.parseIdent(true); - if (this.options.ecmaVersion >= 6 && this.eat(types.dot)) { - node.meta = meta; - var containsEsc = this.containsEsc; - node.property = this.parseIdent(true); - if (node.property.name !== "target" || containsEsc) - { this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target"); } - if (!this.inNonArrowFunction()) - { this.raiseRecoverable(node.start, "new.target can only be used in functions"); } - return this.finishNode(node, "MetaProperty") - } - var startPos = this.start, startLoc = this.startLoc; - node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); - if (this.eat(types.parenL)) { node.arguments = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8, false); } - else { node.arguments = empty$1; } - return this.finishNode(node, "NewExpression") -}; - -// Parse template expression. - -pp$3.parseTemplateElement = function(ref) { - var isTagged = ref.isTagged; - - var elem = this.startNode(); - if (this.type === types.invalidTemplate) { - if (!isTagged) { - this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"); - } - elem.value = { - raw: this.value, - cooked: null - }; - } else { - elem.value = { - raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), - cooked: this.value + // Token-specific context update code + + types.parenR.updateContext = types.braceR.updateContext = function() { + if (this.context.length === 1) { + this.exprAllowed = true; + return + } + var out = this.context.pop(); + if (out === types$1.b_stat && this.curContext().token === "function") { + out = this.context.pop(); + } + this.exprAllowed = !out.isExpr; + }; + + types.braceL.updateContext = function(prevType) { + this.context.push(this.braceIsBlock(prevType) ? types$1.b_stat : types$1.b_expr); + this.exprAllowed = true; + }; + + types.dollarBraceL.updateContext = function() { + this.context.push(types$1.b_tmpl); + this.exprAllowed = true; + }; + + types.parenL.updateContext = function(prevType) { + var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; + this.context.push(statementParens ? types$1.p_stat : types$1.p_expr); + this.exprAllowed = true; + }; + + types.incDec.updateContext = function() { + // tokExprAllowed stays unchanged + }; + + types._function.updateContext = types._class.updateContext = function(prevType) { + if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && + !(prevType === types._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && + !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) + { this.context.push(types$1.f_expr); } + else + { this.context.push(types$1.f_stat); } + this.exprAllowed = false; + }; + + types.backQuote.updateContext = function() { + if (this.curContext() === types$1.q_tmpl) + { this.context.pop(); } + else + { this.context.push(types$1.q_tmpl); } + this.exprAllowed = false; + }; + + types.star.updateContext = function(prevType) { + if (prevType === types._function) { + var index = this.context.length - 1; + if (this.context[index] === types$1.f_expr) + { this.context[index] = types$1.f_expr_gen; } + else + { this.context[index] = types$1.f_gen; } + } + this.exprAllowed = true; + }; + + types.name.updateContext = function(prevType) { + var allowed = false; + if (this.options.ecmaVersion >= 6 && prevType !== types.dot) { + if (this.value === "of" && !this.exprAllowed || + this.value === "yield" && this.inGeneratorContext()) + { allowed = true; } + } + this.exprAllowed = allowed; + }; + + // This file contains Unicode properties extracted from the ECMAScript + // specification. The lists are extracted like so: + // $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText) + + // #table-binary-unicode-properties + var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS"; + var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic"; + var ecma11BinaryProperties = ecma10BinaryProperties; + var unicodeBinaryProperties = { + 9: ecma9BinaryProperties, + 10: ecma10BinaryProperties, + 11: ecma11BinaryProperties + }; + + // #table-unicode-general-category-values + var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu"; + + // #table-unicode-script-values + var ecma9ScriptValues = "Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb"; + var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd"; + var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho"; + var unicodeScriptValues = { + 9: ecma9ScriptValues, + 10: ecma10ScriptValues, + 11: ecma11ScriptValues + }; + + var data = {}; + function buildUnicodeData(ecmaVersion) { + var d = data[ecmaVersion] = { + binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues), + nonBinary: { + General_Category: wordsRegexp(unicodeGeneralCategoryValues), + Script: wordsRegexp(unicodeScriptValues[ecmaVersion]) + } }; - } - this.next(); - elem.tail = this.type === types.backQuote; - return this.finishNode(elem, "TemplateElement") -}; - -pp$3.parseTemplate = function(ref) { - var this$1 = this; - if ( ref === void 0 ) ref = {}; - var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false; - - var node = this.startNode(); - this.next(); - node.expressions = []; - var curElt = this.parseTemplateElement({isTagged: isTagged}); - node.quasis = [curElt]; - while (!curElt.tail) { - if (this$1.type === types.eof) { this$1.raise(this$1.pos, "Unterminated template literal"); } - this$1.expect(types.dollarBraceL); - node.expressions.push(this$1.parseExpression()); - this$1.expect(types.braceR); - node.quasis.push(curElt = this$1.parseTemplateElement({isTagged: isTagged})); - } - this.next(); - return this.finishNode(node, "TemplateLiteral") -}; - -pp$3.isAsyncProp = function(prop) { - return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && - (this.type === types.name || this.type === types.num || this.type === types.string || this.type === types.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types.star)) && - !lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) -}; - -// Parse an object literal or binding pattern. - -pp$3.parseObj = function(isPattern, refDestructuringErrors) { - var this$1 = this; - - var node = this.startNode(), first = true, propHash = {}; - node.properties = []; - this.next(); - while (!this.eat(types.braceR)) { - if (!first) { - this$1.expect(types.comma); - if (this$1.afterTrailingComma(types.braceR)) { break } - } else { first = false; } - - var prop = this$1.parseProperty(isPattern, refDestructuringErrors); - if (!isPattern) { this$1.checkPropClash(prop, propHash, refDestructuringErrors); } - node.properties.push(prop); - } - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") -}; - -pp$3.parseProperty = function(isPattern, refDestructuringErrors) { - var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc; - if (this.options.ecmaVersion >= 9 && this.eat(types.ellipsis)) { - if (isPattern) { - prop.argument = this.parseIdent(false); - if (this.type === types.comma) { - this.raise(this.start, "Comma is not permitted after the rest element"); + d.nonBinary.Script_Extensions = d.nonBinary.Script; + + d.nonBinary.gc = d.nonBinary.General_Category; + d.nonBinary.sc = d.nonBinary.Script; + d.nonBinary.scx = d.nonBinary.Script_Extensions; + } + buildUnicodeData(9); + buildUnicodeData(10); + buildUnicodeData(11); + + var pp$8 = Parser.prototype; + + var RegExpValidationState = function RegExpValidationState(parser) { + this.parser = parser; + this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : ""); + this.unicodeProperties = data[parser.options.ecmaVersion >= 11 ? 11 : parser.options.ecmaVersion]; + this.source = ""; + this.flags = ""; + this.start = 0; + this.switchU = false; + this.switchN = false; + this.pos = 0; + this.lastIntValue = 0; + this.lastStringValue = ""; + this.lastAssertionIsQuantifiable = false; + this.numCapturingParens = 0; + this.maxBackReference = 0; + this.groupNames = []; + this.backReferenceNames = []; + }; + + RegExpValidationState.prototype.reset = function reset (start, pattern, flags) { + var unicode = flags.indexOf("u") !== -1; + this.start = start | 0; + this.source = pattern + ""; + this.flags = flags; + this.switchU = unicode && this.parser.options.ecmaVersion >= 6; + this.switchN = unicode && this.parser.options.ecmaVersion >= 9; + }; + + RegExpValidationState.prototype.raise = function raise (message) { + this.parser.raiseRecoverable(this.start, ("Invalid regular expression: /" + (this.source) + "/: " + message)); + }; + + // If u flag is given, this returns the code point at the index (it combines a surrogate pair). + // Otherwise, this returns the code unit of the index (can be a part of a surrogate pair). + RegExpValidationState.prototype.at = function at (i) { + var s = this.source; + var l = s.length; + if (i >= l) { + return -1 + } + var c = s.charCodeAt(i); + if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { + return c + } + return (c << 10) + s.charCodeAt(i + 1) - 0x35FDC00 + }; + + RegExpValidationState.prototype.nextIndex = function nextIndex (i) { + var s = this.source; + var l = s.length; + if (i >= l) { + return l + } + var c = s.charCodeAt(i); + if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { + return i + 1 + } + return i + 2 + }; + + RegExpValidationState.prototype.current = function current () { + return this.at(this.pos) + }; + + RegExpValidationState.prototype.lookahead = function lookahead () { + return this.at(this.nextIndex(this.pos)) + }; + + RegExpValidationState.prototype.advance = function advance () { + this.pos = this.nextIndex(this.pos); + }; + + RegExpValidationState.prototype.eat = function eat (ch) { + if (this.current() === ch) { + this.advance(); + return true + } + return false + }; + + function codePointToString(ch) { + if (ch <= 0xFFFF) { return String.fromCharCode(ch) } + ch -= 0x10000; + return String.fromCharCode((ch >> 10) + 0xD800, (ch & 0x03FF) + 0xDC00) + } + + /** + * Validate the flags part of a given RegExpLiteral. + * + * @param {RegExpValidationState} state The state to validate RegExp. + * @returns {void} + */ + pp$8.validateRegExpFlags = function(state) { + var validFlags = state.validFlags; + var flags = state.flags; + + for (var i = 0; i < flags.length; i++) { + var flag = flags.charAt(i); + if (validFlags.indexOf(flag) === -1) { + this.raise(state.start, "Invalid regular expression flag"); } - return this.finishNode(prop, "RestElement") + if (flags.indexOf(flag, i + 1) > -1) { + this.raise(state.start, "Duplicate regular expression flag"); + } + } + }; + + /** + * Validate the pattern part of a given RegExpLiteral. + * + * @param {RegExpValidationState} state The state to validate RegExp. + * @returns {void} + */ + pp$8.validateRegExpPattern = function(state) { + this.regexp_pattern(state); + + // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of + // parsing contains a |GroupName|, reparse with the goal symbol + // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError* + // exception if _P_ did not conform to the grammar, if any elements of _P_ + // were not matched by the parse, or if any Early Error conditions exist. + if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) { + state.switchN = true; + this.regexp_pattern(state); } - // To disallow parenthesized identifier via `this.toAssignable()`. - if (this.type === types.parenL && refDestructuringErrors) { - if (refDestructuringErrors.parenthesizedAssign < 0) { - refDestructuringErrors.parenthesizedAssign = this.start; + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern + pp$8.regexp_pattern = function(state) { + state.pos = 0; + state.lastIntValue = 0; + state.lastStringValue = ""; + state.lastAssertionIsQuantifiable = false; + state.numCapturingParens = 0; + state.maxBackReference = 0; + state.groupNames.length = 0; + state.backReferenceNames.length = 0; + + this.regexp_disjunction(state); + + if (state.pos !== state.source.length) { + // Make the same messages as V8. + if (state.eat(0x29 /* ) */)) { + state.raise("Unmatched ')'"); } - if (refDestructuringErrors.parenthesizedBind < 0) { - refDestructuringErrors.parenthesizedBind = this.start; + if (state.eat(0x5D /* [ */) || state.eat(0x7D /* } */)) { + state.raise("Lone quantifier brackets"); } } - // Parse argument. - prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); - // To disallow trailing comma via `this.toAssignable()`. - if (this.type === types.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) { - refDestructuringErrors.trailingComma = this.start; + if (state.maxBackReference > state.numCapturingParens) { + state.raise("Invalid escape"); } - // Finish - return this.finishNode(prop, "SpreadElement") - } - if (this.options.ecmaVersion >= 6) { - prop.method = false; - prop.shorthand = false; - if (isPattern || refDestructuringErrors) { - startPos = this.start; - startLoc = this.startLoc; - } - if (!isPattern) - { isGenerator = this.eat(types.star); } - } - var containsEsc = this.containsEsc; - this.parsePropertyName(prop); - if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) { - isAsync = true; - isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); - this.parsePropertyName(prop, refDestructuringErrors); - } else { - isAsync = false; - } - this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc); - return this.finishNode(prop, "Property") -}; - -pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { - if ((isGenerator || isAsync) && this.type === types.colon) - { this.unexpected(); } - - if (this.eat(types.colon)) { - prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); - prop.kind = "init"; - } else if (this.options.ecmaVersion >= 6 && this.type === types.parenL) { - if (isPattern) { this.unexpected(); } - prop.kind = "init"; - prop.method = true; - prop.value = this.parseMethod(isGenerator, isAsync); - } else if (!isPattern && !containsEsc && - this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && - (prop.key.name === "get" || prop.key.name === "set") && - (this.type !== types.comma && this.type !== types.braceR)) { - if (isGenerator || isAsync) { this.unexpected(); } - prop.kind = prop.key.name; - this.parsePropertyName(prop); - prop.value = this.parseMethod(false); - var paramCount = prop.kind === "get" ? 0 : 1; - if (prop.value.params.length !== paramCount) { - var start = prop.value.start; - if (prop.kind === "get") - { this.raiseRecoverable(start, "getter should have no params"); } - else - { this.raiseRecoverable(start, "setter should have exactly one param"); } - } else { - if (prop.kind === "set" && prop.value.params[0].type === "RestElement") - { this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); } - } - } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { - if (isGenerator || isAsync) { this.unexpected(); } - this.checkUnreserved(prop.key); - if (prop.key.name === "await" && !this.awaitIdentPos) - { this.awaitIdentPos = startPos; } - prop.kind = "init"; - if (isPattern) { - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else if (this.type === types.eq && refDestructuringErrors) { - if (refDestructuringErrors.shorthandAssign < 0) - { refDestructuringErrors.shorthandAssign = this.start; } - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else { - prop.value = prop.key; - } - prop.shorthand = true; - } else { this.unexpected(); } -}; - -pp$3.parsePropertyName = function(prop) { - if (this.options.ecmaVersion >= 6) { - if (this.eat(types.bracketL)) { - prop.computed = true; - prop.key = this.parseMaybeAssign(); - this.expect(types.bracketR); - return prop.key - } else { - prop.computed = false; + for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) { + var name = list[i]; + + if (state.groupNames.indexOf(name) === -1) { + state.raise("Invalid named capture referenced"); + } + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction + pp$8.regexp_disjunction = function(state) { + this.regexp_alternative(state); + while (state.eat(0x7C /* | */)) { + this.regexp_alternative(state); } - } - return prop.key = this.type === types.num || this.type === types.string ? this.parseExprAtom() : this.parseIdent(true) -}; - -// Initialize empty function node. - -pp$3.initFunction = function(node) { - node.id = null; - if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; } - if (this.options.ecmaVersion >= 8) { node.async = false; } -}; - -// Parse object or class method. - -pp$3.parseMethod = function(isGenerator, isAsync, allowDirectSuper) { - var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - - this.initFunction(node); - if (this.options.ecmaVersion >= 6) - { node.generator = isGenerator; } - if (this.options.ecmaVersion >= 8) - { node.async = !!isAsync; } - - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); - - this.expect(types.parenL); - node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); - this.checkYieldAwaitInDefaultParams(); - this.parseFunctionBody(node, false, true); - - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, "FunctionExpression") -}; - -// Parse arrow function expression with given parameters. - -pp$3.parseArrowExpression = function(node, params, isAsync) { - var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - - this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW); - this.initFunction(node); - if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } - - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - - node.params = this.toAssignableList(params, true); - this.parseFunctionBody(node, true, false); - - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, "ArrowFunctionExpression") -}; - -// Parse function body and check parameters. - -pp$3.parseFunctionBody = function(node, isArrowFunction, isMethod) { - var isExpression = isArrowFunction && this.type !== types.braceL; - var oldStrict = this.strict, useStrict = false; - - if (isExpression) { - node.body = this.parseMaybeAssign(); - node.expression = true; - this.checkParams(node, false); - } else { - var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params); - if (!oldStrict || nonSimple) { - useStrict = this.strictDirective(this.end); - // If this is a strict mode function, verify that argument names - // are not repeated, and it does not try to bind the words `eval` - // or `arguments`. - if (useStrict && nonSimple) - { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); } - } - // Start a new scope with regard to labels and the `inFunction` - // flag (restore them to their old value afterwards). - var oldLabels = this.labels; - this.labels = []; - if (useStrict) { this.strict = true; } - - // Add the params to varDeclaredNames to ensure that an error is thrown - // if a let/const declaration in the function clashes with one of the params. - this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params)); - node.body = this.parseBlock(false); - node.expression = false; - this.adaptDirectivePrologue(node.body.body); - this.labels = oldLabels; - } - this.exitScope(); - // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval' - if (this.strict && node.id) { this.checkLVal(node.id, BIND_OUTSIDE); } - this.strict = oldStrict; -}; + // Make the same message as V8. + if (this.regexp_eatQuantifier(state, true)) { + state.raise("Nothing to repeat"); + } + if (state.eat(0x7B /* { */)) { + state.raise("Lone quantifier brackets"); + } + }; -pp$3.isSimpleParamList = function(params) { - for (var i = 0, list = params; i < list.length; i += 1) - { - var param = list[i]; + // https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative + pp$8.regexp_alternative = function(state) { + while (state.pos < state.source.length && this.regexp_eatTerm(state)) + { } + }; - if (param.type !== "Identifier") { return false - } } - return true -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term + pp$8.regexp_eatTerm = function(state) { + if (this.regexp_eatAssertion(state)) { + // Handle `QuantifiableAssertion Quantifier` alternative. + // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion + // is a QuantifiableAssertion. + if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) { + // Make the same message as V8. + if (state.switchU) { + state.raise("Invalid quantifier"); + } + } + return true + } -// Checks function params for various disallowed patterns such as using "eval" -// or "arguments" and duplicate parameters. + if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) { + this.regexp_eatQuantifier(state); + return true + } -pp$3.checkParams = function(node, allowDuplicates) { - var this$1 = this; + return false + }; - var nameHash = {}; - for (var i = 0, list = node.params; i < list.length; i += 1) - { - var param = list[i]; + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion + pp$8.regexp_eatAssertion = function(state) { + var start = state.pos; + state.lastAssertionIsQuantifiable = false; - this$1.checkLVal(param, BIND_VAR, allowDuplicates ? null : nameHash); - } -}; - -// Parses a comma-separated list of expressions, and returns them as -// an array. `close` is the token type that ends the list, and -// `allowEmpty` can be turned on to allow subsequent commas with -// nothing in between them to be parsed as `null` (which is needed -// for array literals). - -pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { - var this$1 = this; - - var elts = [], first = true; - while (!this.eat(close)) { - if (!first) { - this$1.expect(types.comma); - if (allowTrailingComma && this$1.afterTrailingComma(close)) { break } - } else { first = false; } - - var elt = (void 0); - if (allowEmpty && this$1.type === types.comma) - { elt = null; } - else if (this$1.type === types.ellipsis) { - elt = this$1.parseSpread(refDestructuringErrors); - if (refDestructuringErrors && this$1.type === types.comma && refDestructuringErrors.trailingComma < 0) - { refDestructuringErrors.trailingComma = this$1.start; } - } else { - elt = this$1.parseMaybeAssign(false, refDestructuringErrors); + // ^, $ + if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) { + return true } - elts.push(elt); - } - return elts -}; - -pp$3.checkUnreserved = function(ref) { - var start = ref.start; - var end = ref.end; - var name = ref.name; - - if (this.inGenerator && name === "yield") - { this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); } - if (this.inAsync && name === "await") - { this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); } - if (this.keywords.test(name)) - { this.raise(start, ("Unexpected keyword '" + name + "'")); } - if (this.options.ecmaVersion < 6 && - this.input.slice(start, end).indexOf("\\") !== -1) { return } - var re = this.strict ? this.reservedWordsStrict : this.reservedWords; - if (re.test(name)) { - if (!this.inAsync && name === "await") - { this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); } - this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); - } -}; - -// Parse the next token as an identifier. If `liberal` is true (used -// when parsing properties), it will also convert keywords into -// identifiers. - -pp$3.parseIdent = function(liberal, isBinding) { - var node = this.startNode(); - if (liberal && this.options.allowReserved === "never") { liberal = false; } - if (this.type === types.name) { - node.name = this.value; - } else if (this.type.keyword) { - node.name = this.type.keyword; - - // To fix https://github.com/acornjs/acorn/issues/575 - // `class` and `function` keywords push new context into this.context. - // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name. - // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword - if ((node.name === "class" || node.name === "function") && - (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) { - this.context.pop(); - } - } else { - this.unexpected(); - } - this.next(); - this.finishNode(node, "Identifier"); - if (!liberal) { - this.checkUnreserved(node); - if (node.name === "await" && !this.awaitIdentPos) - { this.awaitIdentPos = node.start; } - } - return node -}; - -// Parses yield expression inside generator. - -pp$3.parseYield = function(noIn) { - if (!this.yieldPos) { this.yieldPos = this.start; } - - var node = this.startNode(); - this.next(); - if (this.type === types.semi || this.canInsertSemicolon() || (this.type !== types.star && !this.type.startsExpr)) { - node.delegate = false; - node.argument = null; - } else { - node.delegate = this.eat(types.star); - node.argument = this.parseMaybeAssign(noIn); - } - return this.finishNode(node, "YieldExpression") -}; - -pp$3.parseAwait = function() { - if (!this.awaitPos) { this.awaitPos = this.start; } - - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeUnary(null, true); - return this.finishNode(node, "AwaitExpression") -}; - -var pp$4 = Parser.prototype; - -// This function is used to raise exceptions on parse errors. It -// takes an offset integer (into the current `input`) to indicate -// the location of the error, attaches the position to the end -// of the error message, and then raises a `SyntaxError` with that -// message. - -pp$4.raise = function(pos, message) { - var loc = getLineInfo(this.input, pos); - message += " (" + loc.line + ":" + loc.column + ")"; - var err = new SyntaxError(message); - err.pos = pos; err.loc = loc; err.raisedAt = this.pos; - throw err -}; - -pp$4.raiseRecoverable = pp$4.raise; - -pp$4.curPosition = function() { - if (this.options.locations) { - return new Position(this.curLine, this.pos - this.lineStart) - } -}; - -var pp$5 = Parser.prototype; - -var Scope = function Scope(flags) { - this.flags = flags; - // A list of var-declared names in the current lexical scope - this.var = []; - // A list of lexically-declared names in the current lexical scope - this.lexical = []; - // A list of lexically-declared FunctionDeclaration names in the current lexical scope - this.functions = []; -}; - -// The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names. - -pp$5.enterScope = function(flags) { - this.scopeStack.push(new Scope(flags)); -}; - -pp$5.exitScope = function() { - this.scopeStack.pop(); -}; - -// The spec says: -// > At the top level of a function, or script, function declarations are -// > treated like var declarations rather than like lexical declarations. -pp$5.treatFunctionsAsVarInScope = function(scope) { - return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP) -}; - -pp$5.declareName = function(name, bindingType, pos) { - var this$1 = this; - - var redeclared = false; - if (bindingType === BIND_LEXICAL) { - var scope = this.currentScope(); - redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; - scope.lexical.push(name); - if (this.inModule && (scope.flags & SCOPE_TOP)) - { delete this.undefinedExports[name]; } - } else if (bindingType === BIND_SIMPLE_CATCH) { - var scope$1 = this.currentScope(); - scope$1.lexical.push(name); - } else if (bindingType === BIND_FUNCTION) { - var scope$2 = this.currentScope(); - if (this.treatFunctionsAsVar) - { redeclared = scope$2.lexical.indexOf(name) > -1; } - else - { redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; } - scope$2.functions.push(name); - } else { - for (var i = this.scopeStack.length - 1; i >= 0; --i) { - var scope$3 = this$1.scopeStack[i]; - if (scope$3.lexical.indexOf(name) > -1 && !((scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) || - !this$1.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) { - redeclared = true; - break + + // \b \B + if (state.eat(0x5C /* \ */)) { + if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) { + return true } - scope$3.var.push(name); - if (this$1.inModule && (scope$3.flags & SCOPE_TOP)) - { delete this$1.undefinedExports[name]; } - if (scope$3.flags & SCOPE_VAR) { break } + state.pos = start; } - } - if (redeclared) { this.raiseRecoverable(pos, ("Identifier '" + name + "' has already been declared")); } -}; - -pp$5.checkLocalExport = function(id) { - // scope.functions must be empty as Module code is always strict. - if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && - this.scopeStack[0].var.indexOf(id.name) === -1) { - this.undefinedExports[id.name] = id; - } -}; -pp$5.currentScope = function() { - return this.scopeStack[this.scopeStack.length - 1] -}; + // Lookahead / Lookbehind + if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) { + var lookbehind = false; + if (this.options.ecmaVersion >= 9) { + lookbehind = state.eat(0x3C /* < */); + } + if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) { + this.regexp_disjunction(state); + if (!state.eat(0x29 /* ) */)) { + state.raise("Unterminated group"); + } + state.lastAssertionIsQuantifiable = !lookbehind; + return true + } + } -pp$5.currentVarScope = function() { - var this$1 = this; + state.pos = start; + return false + }; - for (var i = this.scopeStack.length - 1;; i--) { - var scope = this$1.scopeStack[i]; - if (scope.flags & SCOPE_VAR) { return scope } - } -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier + pp$8.regexp_eatQuantifier = function(state, noError) { + if ( noError === void 0 ) noError = false; -// Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`. -pp$5.currentThisScope = function() { - var this$1 = this; + if (this.regexp_eatQuantifierPrefix(state, noError)) { + state.eat(0x3F /* ? */); + return true + } + return false + }; - for (var i = this.scopeStack.length - 1;; i--) { - var scope = this$1.scopeStack[i]; - if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope } - } -}; - -var Node = function Node(parser, pos, loc) { - this.type = ""; - this.start = pos; - this.end = 0; - if (parser.options.locations) - { this.loc = new SourceLocation(parser, loc); } - if (parser.options.directSourceFile) - { this.sourceFile = parser.options.directSourceFile; } - if (parser.options.ranges) - { this.range = [pos, 0]; } -}; - -// Start an AST node, attaching a start offset. - -var pp$6 = Parser.prototype; - -pp$6.startNode = function() { - return new Node(this, this.start, this.startLoc) -}; - -pp$6.startNodeAt = function(pos, loc) { - return new Node(this, pos, loc) -}; - -// Finish an AST node, adding `type` and `end` properties. - -function finishNodeAt(node, type, pos, loc) { - node.type = type; - node.end = pos; - if (this.options.locations) - { node.loc.end = loc; } - if (this.options.ranges) - { node.range[1] = pos; } - return node -} - -pp$6.finishNode = function(node, type) { - return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) -}; - -// Finish node at given position - -pp$6.finishNodeAt = function(node, type, pos, loc) { - return finishNodeAt.call(this, node, type, pos, loc) -}; - -// The algorithm used to determine whether a regexp can appear at a -// given point in the program is loosely based on sweet.js' approach. -// See https://github.com/mozilla/sweet.js/wiki/design - -var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) { - this.token = token; - this.isExpr = !!isExpr; - this.preserveSpace = !!preserveSpace; - this.override = override; - this.generator = !!generator; -}; - -var types$1 = { - b_stat: new TokContext("{", false), - b_expr: new TokContext("{", true), - b_tmpl: new TokContext("${", false), - p_stat: new TokContext("(", false), - p_expr: new TokContext("(", true), - q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }), - f_stat: new TokContext("function", false), - f_expr: new TokContext("function", true), - f_expr_gen: new TokContext("function", true, false, null, true), - f_gen: new TokContext("function", false, false, null, true) -}; - -var pp$7 = Parser.prototype; - -pp$7.initialContext = function() { - return [types$1.b_stat] -}; - -pp$7.braceIsBlock = function(prevType) { - var parent = this.curContext(); - if (parent === types$1.f_expr || parent === types$1.f_stat) - { return true } - if (prevType === types.colon && (parent === types$1.b_stat || parent === types$1.b_expr)) - { return !parent.isExpr } - - // The check for `tt.name && exprAllowed` detects whether we are - // after a `yield` or `of` construct. See the `updateContext` for - // `tt.name`. - if (prevType === types._return || prevType === types.name && this.exprAllowed) - { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) } - if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType === types.arrow) - { return true } - if (prevType === types.braceL) - { return parent === types$1.b_stat } - if (prevType === types._var || prevType === types._const || prevType === types.name) - { return false } - return !this.exprAllowed -}; - -pp$7.inGeneratorContext = function() { - var this$1 = this; - - for (var i = this.context.length - 1; i >= 1; i--) { - var context = this$1.context[i]; - if (context.token === "function") - { return context.generator } - } - return false -}; - -pp$7.updateContext = function(prevType) { - var update, type = this.type; - if (type.keyword && prevType === types.dot) - { this.exprAllowed = false; } - else if (update = type.updateContext) - { update.call(this, prevType); } - else - { this.exprAllowed = type.beforeExpr; } -}; - -// Token-specific context update code - -types.parenR.updateContext = types.braceR.updateContext = function() { - if (this.context.length === 1) { - this.exprAllowed = true; - return - } - var out = this.context.pop(); - if (out === types$1.b_stat && this.curContext().token === "function") { - out = this.context.pop(); - } - this.exprAllowed = !out.isExpr; -}; - -types.braceL.updateContext = function(prevType) { - this.context.push(this.braceIsBlock(prevType) ? types$1.b_stat : types$1.b_expr); - this.exprAllowed = true; -}; - -types.dollarBraceL.updateContext = function() { - this.context.push(types$1.b_tmpl); - this.exprAllowed = true; -}; - -types.parenL.updateContext = function(prevType) { - var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; - this.context.push(statementParens ? types$1.p_stat : types$1.p_expr); - this.exprAllowed = true; -}; - -types.incDec.updateContext = function() { - // tokExprAllowed stays unchanged -}; - -types._function.updateContext = types._class.updateContext = function(prevType) { - if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && - !(prevType === types._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && - !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) - { this.context.push(types$1.f_expr); } - else - { this.context.push(types$1.f_stat); } - this.exprAllowed = false; -}; - -types.backQuote.updateContext = function() { - if (this.curContext() === types$1.q_tmpl) - { this.context.pop(); } - else - { this.context.push(types$1.q_tmpl); } - this.exprAllowed = false; -}; - -types.star.updateContext = function(prevType) { - if (prevType === types._function) { - var index = this.context.length - 1; - if (this.context[index] === types$1.f_expr) - { this.context[index] = types$1.f_expr_gen; } - else - { this.context[index] = types$1.f_gen; } - } - this.exprAllowed = true; -}; - -types.name.updateContext = function(prevType) { - var allowed = false; - if (this.options.ecmaVersion >= 6 && prevType !== types.dot) { - if (this.value === "of" && !this.exprAllowed || - this.value === "yield" && this.inGeneratorContext()) - { allowed = true; } - } - this.exprAllowed = allowed; -}; - -// This file contains Unicode properties extracted from the ECMAScript -// specification. The lists are extracted like so: -// $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText) - -// #table-binary-unicode-properties -var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS"; -var unicodeBinaryProperties = { - 9: ecma9BinaryProperties, - 10: ecma9BinaryProperties + " Extended_Pictographic" -}; - -// #table-unicode-general-category-values -var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu"; - -// #table-unicode-script-values -var ecma9ScriptValues = "Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb"; -var unicodeScriptValues = { - 9: ecma9ScriptValues, - 10: ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd" -}; - -var data = {}; -function buildUnicodeData(ecmaVersion) { - var d = data[ecmaVersion] = { - binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues), - nonBinary: { - General_Category: wordsRegexp(unicodeGeneralCategoryValues), - Script: wordsRegexp(unicodeScriptValues[ecmaVersion]) - } - }; - d.nonBinary.Script_Extensions = d.nonBinary.Script; - - d.nonBinary.gc = d.nonBinary.General_Category; - d.nonBinary.sc = d.nonBinary.Script; - d.nonBinary.scx = d.nonBinary.Script_Extensions; -} -buildUnicodeData(9); -buildUnicodeData(10); - -var pp$9 = Parser.prototype; - -var RegExpValidationState = function RegExpValidationState(parser) { - this.parser = parser; - this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : ""); - this.unicodeProperties = data[parser.options.ecmaVersion >= 10 ? 10 : parser.options.ecmaVersion]; - this.source = ""; - this.flags = ""; - this.start = 0; - this.switchU = false; - this.switchN = false; - this.pos = 0; - this.lastIntValue = 0; - this.lastStringValue = ""; - this.lastAssertionIsQuantifiable = false; - this.numCapturingParens = 0; - this.maxBackReference = 0; - this.groupNames = []; - this.backReferenceNames = []; -}; - -RegExpValidationState.prototype.reset = function reset (start, pattern, flags) { - var unicode = flags.indexOf("u") !== -1; - this.start = start | 0; - this.source = pattern + ""; - this.flags = flags; - this.switchU = unicode && this.parser.options.ecmaVersion >= 6; - this.switchN = unicode && this.parser.options.ecmaVersion >= 9; -}; - -RegExpValidationState.prototype.raise = function raise (message) { - this.parser.raiseRecoverable(this.start, ("Invalid regular expression: /" + (this.source) + "/: " + message)); -}; - -// If u flag is given, this returns the code point at the index (it combines a surrogate pair). -// Otherwise, this returns the code unit of the index (can be a part of a surrogate pair). -RegExpValidationState.prototype.at = function at (i) { - var s = this.source; - var l = s.length; - if (i >= l) { - return -1 - } - var c = s.charCodeAt(i); - if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { - return c - } - return (c << 10) + s.charCodeAt(i + 1) - 0x35FDC00 -}; - -RegExpValidationState.prototype.nextIndex = function nextIndex (i) { - var s = this.source; - var l = s.length; - if (i >= l) { - return l - } - var c = s.charCodeAt(i); - if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { - return i + 1 - } - return i + 2 -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix + pp$8.regexp_eatQuantifierPrefix = function(state, noError) { + return ( + state.eat(0x2A /* * */) || + state.eat(0x2B /* + */) || + state.eat(0x3F /* ? */) || + this.regexp_eatBracedQuantifier(state, noError) + ) + }; + pp$8.regexp_eatBracedQuantifier = function(state, noError) { + var start = state.pos; + if (state.eat(0x7B /* { */)) { + var min = 0, max = -1; + if (this.regexp_eatDecimalDigits(state)) { + min = state.lastIntValue; + if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) { + max = state.lastIntValue; + } + if (state.eat(0x7D /* } */)) { + // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term + if (max !== -1 && max < min && !noError) { + state.raise("numbers out of order in {} quantifier"); + } + return true + } + } + if (state.switchU && !noError) { + state.raise("Incomplete quantifier"); + } + state.pos = start; + } + return false + }; -RegExpValidationState.prototype.current = function current () { - return this.at(this.pos) -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-Atom + pp$8.regexp_eatAtom = function(state) { + return ( + this.regexp_eatPatternCharacters(state) || + state.eat(0x2E /* . */) || + this.regexp_eatReverseSolidusAtomEscape(state) || + this.regexp_eatCharacterClass(state) || + this.regexp_eatUncapturingGroup(state) || + this.regexp_eatCapturingGroup(state) + ) + }; + pp$8.regexp_eatReverseSolidusAtomEscape = function(state) { + var start = state.pos; + if (state.eat(0x5C /* \ */)) { + if (this.regexp_eatAtomEscape(state)) { + return true + } + state.pos = start; + } + return false + }; + pp$8.regexp_eatUncapturingGroup = function(state) { + var start = state.pos; + if (state.eat(0x28 /* ( */)) { + if (state.eat(0x3F /* ? */) && state.eat(0x3A /* : */)) { + this.regexp_disjunction(state); + if (state.eat(0x29 /* ) */)) { + return true + } + state.raise("Unterminated group"); + } + state.pos = start; + } + return false + }; + pp$8.regexp_eatCapturingGroup = function(state) { + if (state.eat(0x28 /* ( */)) { + if (this.options.ecmaVersion >= 9) { + this.regexp_groupSpecifier(state); + } else if (state.current() === 0x3F /* ? */) { + state.raise("Invalid group"); + } + this.regexp_disjunction(state); + if (state.eat(0x29 /* ) */)) { + state.numCapturingParens += 1; + return true + } + state.raise("Unterminated group"); + } + return false + }; -RegExpValidationState.prototype.lookahead = function lookahead () { - return this.at(this.nextIndex(this.pos)) -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom + pp$8.regexp_eatExtendedAtom = function(state) { + return ( + state.eat(0x2E /* . */) || + this.regexp_eatReverseSolidusAtomEscape(state) || + this.regexp_eatCharacterClass(state) || + this.regexp_eatUncapturingGroup(state) || + this.regexp_eatCapturingGroup(state) || + this.regexp_eatInvalidBracedQuantifier(state) || + this.regexp_eatExtendedPatternCharacter(state) + ) + }; -RegExpValidationState.prototype.advance = function advance () { - this.pos = this.nextIndex(this.pos); -}; + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier + pp$8.regexp_eatInvalidBracedQuantifier = function(state) { + if (this.regexp_eatBracedQuantifier(state, true)) { + state.raise("Nothing to repeat"); + } + return false + }; -RegExpValidationState.prototype.eat = function eat (ch) { - if (this.current() === ch) { - this.advance(); - return true - } - return false -}; - -function codePointToString$1(ch) { - if (ch <= 0xFFFF) { return String.fromCharCode(ch) } - ch -= 0x10000; - return String.fromCharCode((ch >> 10) + 0xD800, (ch & 0x03FF) + 0xDC00) -} - -/** - * Validate the flags part of a given RegExpLiteral. - * - * @param {RegExpValidationState} state The state to validate RegExp. - * @returns {void} - */ -pp$9.validateRegExpFlags = function(state) { - var this$1 = this; - - var validFlags = state.validFlags; - var flags = state.flags; - - for (var i = 0; i < flags.length; i++) { - var flag = flags.charAt(i); - if (validFlags.indexOf(flag) === -1) { - this$1.raise(state.start, "Invalid regular expression flag"); - } - if (flags.indexOf(flag, i + 1) > -1) { - this$1.raise(state.start, "Duplicate regular expression flag"); + // https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter + pp$8.regexp_eatSyntaxCharacter = function(state) { + var ch = state.current(); + if (isSyntaxCharacter(ch)) { + state.lastIntValue = ch; + state.advance(); + return true } - } -}; - -/** - * Validate the pattern part of a given RegExpLiteral. - * - * @param {RegExpValidationState} state The state to validate RegExp. - * @returns {void} - */ -pp$9.validateRegExpPattern = function(state) { - this.regexp_pattern(state); - - // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of - // parsing contains a |GroupName|, reparse with the goal symbol - // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError* - // exception if _P_ did not conform to the grammar, if any elements of _P_ - // were not matched by the parse, or if any Early Error conditions exist. - if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) { - state.switchN = true; - this.regexp_pattern(state); - } -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern -pp$9.regexp_pattern = function(state) { - state.pos = 0; - state.lastIntValue = 0; - state.lastStringValue = ""; - state.lastAssertionIsQuantifiable = false; - state.numCapturingParens = 0; - state.maxBackReference = 0; - state.groupNames.length = 0; - state.backReferenceNames.length = 0; - - this.regexp_disjunction(state); - - if (state.pos !== state.source.length) { - // Make the same messages as V8. - if (state.eat(0x29 /* ) */)) { - state.raise("Unmatched ')'"); - } - if (state.eat(0x5D /* [ */) || state.eat(0x7D /* } */)) { - state.raise("Lone quantifier brackets"); + return false + }; + function isSyntaxCharacter(ch) { + return ( + ch === 0x24 /* $ */ || + ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ || + ch === 0x2E /* . */ || + ch === 0x3F /* ? */ || + ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ || + ch >= 0x7B /* { */ && ch <= 0x7D /* } */ + ) + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter + // But eat eager. + pp$8.regexp_eatPatternCharacters = function(state) { + var start = state.pos; + var ch = 0; + while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) { + state.advance(); } - } - if (state.maxBackReference > state.numCapturingParens) { - state.raise("Invalid escape"); - } - for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) { - var name = list[i]; + return state.pos !== start + }; - if (state.groupNames.indexOf(name) === -1) { - state.raise("Invalid named capture referenced"); + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter + pp$8.regexp_eatExtendedPatternCharacter = function(state) { + var ch = state.current(); + if ( + ch !== -1 && + ch !== 0x24 /* $ */ && + !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) && + ch !== 0x2E /* . */ && + ch !== 0x3F /* ? */ && + ch !== 0x5B /* [ */ && + ch !== 0x5E /* ^ */ && + ch !== 0x7C /* | */ + ) { + state.advance(); + return true } - } -}; + return false + }; -// https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction -pp$9.regexp_disjunction = function(state) { - var this$1 = this; + // GroupSpecifier[U] :: + // [empty] + // `?` GroupName[?U] + pp$8.regexp_groupSpecifier = function(state) { + if (state.eat(0x3F /* ? */)) { + if (this.regexp_eatGroupName(state)) { + if (state.groupNames.indexOf(state.lastStringValue) !== -1) { + state.raise("Duplicate capture group name"); + } + state.groupNames.push(state.lastStringValue); + return + } + state.raise("Invalid group"); + } + }; - this.regexp_alternative(state); - while (state.eat(0x7C /* | */)) { - this$1.regexp_alternative(state); - } + // GroupName[U] :: + // `<` RegExpIdentifierName[?U] `>` + // Note: this updates `state.lastStringValue` property with the eaten name. + pp$8.regexp_eatGroupName = function(state) { + state.lastStringValue = ""; + if (state.eat(0x3C /* < */)) { + if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) { + return true + } + state.raise("Invalid capture group name"); + } + return false + }; - // Make the same message as V8. - if (this.regexp_eatQuantifier(state, true)) { - state.raise("Nothing to repeat"); - } - if (state.eat(0x7B /* { */)) { - state.raise("Lone quantifier brackets"); - } -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative -pp$9.regexp_alternative = function(state) { - while (state.pos < state.source.length && this.regexp_eatTerm(state)) - { } -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term -pp$9.regexp_eatTerm = function(state) { - if (this.regexp_eatAssertion(state)) { - // Handle `QuantifiableAssertion Quantifier` alternative. - // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion - // is a QuantifiableAssertion. - if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) { - // Make the same message as V8. - if (state.switchU) { - state.raise("Invalid quantifier"); + // RegExpIdentifierName[U] :: + // RegExpIdentifierStart[?U] + // RegExpIdentifierName[?U] RegExpIdentifierPart[?U] + // Note: this updates `state.lastStringValue` property with the eaten name. + pp$8.regexp_eatRegExpIdentifierName = function(state) { + state.lastStringValue = ""; + if (this.regexp_eatRegExpIdentifierStart(state)) { + state.lastStringValue += codePointToString(state.lastIntValue); + while (this.regexp_eatRegExpIdentifierPart(state)) { + state.lastStringValue += codePointToString(state.lastIntValue); } + return true } - return true - } + return false + }; - if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) { - this.regexp_eatQuantifier(state); - return true - } + // RegExpIdentifierStart[U] :: + // UnicodeIDStart + // `$` + // `_` + // `\` RegExpUnicodeEscapeSequence[?U] + pp$8.regexp_eatRegExpIdentifierStart = function(state) { + var start = state.pos; + var ch = state.current(); + state.advance(); + + if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { + ch = state.lastIntValue; + } + if (isRegExpIdentifierStart(ch)) { + state.lastIntValue = ch; + return true + } - return false -}; + state.pos = start; + return false + }; + function isRegExpIdentifierStart(ch) { + return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ + } + + // RegExpIdentifierPart[U] :: + // UnicodeIDContinue + // `$` + // `_` + // `\` RegExpUnicodeEscapeSequence[?U] + // + // + pp$8.regexp_eatRegExpIdentifierPart = function(state) { + var start = state.pos; + var ch = state.current(); + state.advance(); -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion -pp$9.regexp_eatAssertion = function(state) { - var start = state.pos; - state.lastAssertionIsQuantifiable = false; + if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { + ch = state.lastIntValue; + } + if (isRegExpIdentifierPart(ch)) { + state.lastIntValue = ch; + return true + } - // ^, $ - if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) { - return true + state.pos = start; + return false + }; + function isRegExpIdentifierPart(ch) { + return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D /* */ } - // \b \B - if (state.eat(0x5C /* \ */)) { - if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) { + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape + pp$8.regexp_eatAtomEscape = function(state) { + if ( + this.regexp_eatBackReference(state) || + this.regexp_eatCharacterClassEscape(state) || + this.regexp_eatCharacterEscape(state) || + (state.switchN && this.regexp_eatKGroupName(state)) + ) { return true } - state.pos = start; - } - - // Lookahead / Lookbehind - if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) { - var lookbehind = false; - if (this.options.ecmaVersion >= 9) { - lookbehind = state.eat(0x3C /* < */); + if (state.switchU) { + // Make the same message as V8. + if (state.current() === 0x63 /* c */) { + state.raise("Invalid unicode escape"); + } + state.raise("Invalid escape"); } - if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) { - this.regexp_disjunction(state); - if (!state.eat(0x29 /* ) */)) { - state.raise("Unterminated group"); + return false + }; + pp$8.regexp_eatBackReference = function(state) { + var start = state.pos; + if (this.regexp_eatDecimalEscape(state)) { + var n = state.lastIntValue; + if (state.switchU) { + // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape + if (n > state.maxBackReference) { + state.maxBackReference = n; + } + return true } - state.lastAssertionIsQuantifiable = !lookbehind; - return true + if (n <= state.numCapturingParens) { + return true + } + state.pos = start; } - } - - state.pos = start; - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier -pp$9.regexp_eatQuantifier = function(state, noError) { - if ( noError === void 0 ) noError = false; - - if (this.regexp_eatQuantifierPrefix(state, noError)) { - state.eat(0x3F /* ? */); - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix -pp$9.regexp_eatQuantifierPrefix = function(state, noError) { - return ( - state.eat(0x2A /* * */) || - state.eat(0x2B /* + */) || - state.eat(0x3F /* ? */) || - this.regexp_eatBracedQuantifier(state, noError) - ) -}; -pp$9.regexp_eatBracedQuantifier = function(state, noError) { - var start = state.pos; - if (state.eat(0x7B /* { */)) { - var min = 0, max = -1; - if (this.regexp_eatDecimalDigits(state)) { - min = state.lastIntValue; - if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) { - max = state.lastIntValue; + return false + }; + pp$8.regexp_eatKGroupName = function(state) { + if (state.eat(0x6B /* k */)) { + if (this.regexp_eatGroupName(state)) { + state.backReferenceNames.push(state.lastStringValue); + return true } - if (state.eat(0x7D /* } */)) { - // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term - if (max !== -1 && max < min && !noError) { - state.raise("numbers out of order in {} quantifier"); - } + state.raise("Invalid named reference"); + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape + pp$8.regexp_eatCharacterEscape = function(state) { + return ( + this.regexp_eatControlEscape(state) || + this.regexp_eatCControlLetter(state) || + this.regexp_eatZero(state) || + this.regexp_eatHexEscapeSequence(state) || + this.regexp_eatRegExpUnicodeEscapeSequence(state) || + (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) || + this.regexp_eatIdentityEscape(state) + ) + }; + pp$8.regexp_eatCControlLetter = function(state) { + var start = state.pos; + if (state.eat(0x63 /* c */)) { + if (this.regexp_eatControlLetter(state)) { return true } + state.pos = start; } - if (state.switchU && !noError) { - state.raise("Incomplete quantifier"); + return false + }; + pp$8.regexp_eatZero = function(state) { + if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) { + state.lastIntValue = 0; + state.advance(); + return true } - state.pos = start; - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Atom -pp$9.regexp_eatAtom = function(state) { - return ( - this.regexp_eatPatternCharacters(state) || - state.eat(0x2E /* . */) || - this.regexp_eatReverseSolidusAtomEscape(state) || - this.regexp_eatCharacterClass(state) || - this.regexp_eatUncapturingGroup(state) || - this.regexp_eatCapturingGroup(state) - ) -}; -pp$9.regexp_eatReverseSolidusAtomEscape = function(state) { - var start = state.pos; - if (state.eat(0x5C /* \ */)) { - if (this.regexp_eatAtomEscape(state)) { + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape + pp$8.regexp_eatControlEscape = function(state) { + var ch = state.current(); + if (ch === 0x74 /* t */) { + state.lastIntValue = 0x09; /* \t */ + state.advance(); return true } - state.pos = start; - } - return false -}; -pp$9.regexp_eatUncapturingGroup = function(state) { - var start = state.pos; - if (state.eat(0x28 /* ( */)) { - if (state.eat(0x3F /* ? */) && state.eat(0x3A /* : */)) { - this.regexp_disjunction(state); - if (state.eat(0x29 /* ) */)) { - return true - } - state.raise("Unterminated group"); + if (ch === 0x6E /* n */) { + state.lastIntValue = 0x0A; /* \n */ + state.advance(); + return true } - state.pos = start; - } - return false -}; -pp$9.regexp_eatCapturingGroup = function(state) { - if (state.eat(0x28 /* ( */)) { - if (this.options.ecmaVersion >= 9) { - this.regexp_groupSpecifier(state); - } else if (state.current() === 0x3F /* ? */) { - state.raise("Invalid group"); + if (ch === 0x76 /* v */) { + state.lastIntValue = 0x0B; /* \v */ + state.advance(); + return true } - this.regexp_disjunction(state); - if (state.eat(0x29 /* ) */)) { - state.numCapturingParens += 1; + if (ch === 0x66 /* f */) { + state.lastIntValue = 0x0C; /* \f */ + state.advance(); return true } - state.raise("Unterminated group"); - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom -pp$9.regexp_eatExtendedAtom = function(state) { - return ( - state.eat(0x2E /* . */) || - this.regexp_eatReverseSolidusAtomEscape(state) || - this.regexp_eatCharacterClass(state) || - this.regexp_eatUncapturingGroup(state) || - this.regexp_eatCapturingGroup(state) || - this.regexp_eatInvalidBracedQuantifier(state) || - this.regexp_eatExtendedPatternCharacter(state) - ) -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier -pp$9.regexp_eatInvalidBracedQuantifier = function(state) { - if (this.regexp_eatBracedQuantifier(state, true)) { - state.raise("Nothing to repeat"); - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter -pp$9.regexp_eatSyntaxCharacter = function(state) { - var ch = state.current(); - if (isSyntaxCharacter(ch)) { - state.lastIntValue = ch; - state.advance(); - return true - } - return false -}; -function isSyntaxCharacter(ch) { - return ( - ch === 0x24 /* $ */ || - ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ || - ch === 0x2E /* . */ || - ch === 0x3F /* ? */ || - ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ || - ch >= 0x7B /* { */ && ch <= 0x7D /* } */ - ) -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter -// But eat eager. -pp$9.regexp_eatPatternCharacters = function(state) { - var start = state.pos; - var ch = 0; - while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) { - state.advance(); - } - return state.pos !== start -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter -pp$9.regexp_eatExtendedPatternCharacter = function(state) { - var ch = state.current(); - if ( - ch !== -1 && - ch !== 0x24 /* $ */ && - !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) && - ch !== 0x2E /* . */ && - ch !== 0x3F /* ? */ && - ch !== 0x5B /* [ */ && - ch !== 0x5E /* ^ */ && - ch !== 0x7C /* | */ - ) { - state.advance(); - return true - } - return false -}; - -// GroupSpecifier[U] :: -// [empty] -// `?` GroupName[?U] -pp$9.regexp_groupSpecifier = function(state) { - if (state.eat(0x3F /* ? */)) { - if (this.regexp_eatGroupName(state)) { - if (state.groupNames.indexOf(state.lastStringValue) !== -1) { - state.raise("Duplicate capture group name"); - } - state.groupNames.push(state.lastStringValue); - return + if (ch === 0x72 /* r */) { + state.lastIntValue = 0x0D; /* \r */ + state.advance(); + return true } - state.raise("Invalid group"); - } -}; - -// GroupName[U] :: -// `<` RegExpIdentifierName[?U] `>` -// Note: this updates `state.lastStringValue` property with the eaten name. -pp$9.regexp_eatGroupName = function(state) { - state.lastStringValue = ""; - if (state.eat(0x3C /* < */)) { - if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) { + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter + pp$8.regexp_eatControlLetter = function(state) { + var ch = state.current(); + if (isControlLetter(ch)) { + state.lastIntValue = ch % 0x20; + state.advance(); return true } - state.raise("Invalid capture group name"); - } - return false -}; - -// RegExpIdentifierName[U] :: -// RegExpIdentifierStart[?U] -// RegExpIdentifierName[?U] RegExpIdentifierPart[?U] -// Note: this updates `state.lastStringValue` property with the eaten name. -pp$9.regexp_eatRegExpIdentifierName = function(state) { - state.lastStringValue = ""; - if (this.regexp_eatRegExpIdentifierStart(state)) { - state.lastStringValue += codePointToString$1(state.lastIntValue); - while (this.regexp_eatRegExpIdentifierPart(state)) { - state.lastStringValue += codePointToString$1(state.lastIntValue); + return false + }; + function isControlLetter(ch) { + return ( + (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) || + (ch >= 0x61 /* a */ && ch <= 0x7A /* z */) + ) + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence + pp$8.regexp_eatRegExpUnicodeEscapeSequence = function(state) { + var start = state.pos; + + if (state.eat(0x75 /* u */)) { + if (this.regexp_eatFixedHexDigits(state, 4)) { + var lead = state.lastIntValue; + if (state.switchU && lead >= 0xD800 && lead <= 0xDBFF) { + var leadSurrogateEnd = state.pos; + if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) { + var trail = state.lastIntValue; + if (trail >= 0xDC00 && trail <= 0xDFFF) { + state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + return true + } + } + state.pos = leadSurrogateEnd; + state.lastIntValue = lead; + } + return true + } + if ( + state.switchU && + state.eat(0x7B /* { */) && + this.regexp_eatHexDigits(state) && + state.eat(0x7D /* } */) && + isValidUnicode(state.lastIntValue) + ) { + return true + } + if (state.switchU) { + state.raise("Invalid unicode escape"); + } + state.pos = start; } - return true - } - return false -}; - -// RegExpIdentifierStart[U] :: -// UnicodeIDStart -// `$` -// `_` -// `\` RegExpUnicodeEscapeSequence[?U] -pp$9.regexp_eatRegExpIdentifierStart = function(state) { - var start = state.pos; - var ch = state.current(); - state.advance(); - - if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { - ch = state.lastIntValue; - } - if (isRegExpIdentifierStart(ch)) { - state.lastIntValue = ch; - return true - } - state.pos = start; - return false -}; -function isRegExpIdentifierStart(ch) { - return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ -} - -// RegExpIdentifierPart[U] :: -// UnicodeIDContinue -// `$` -// `_` -// `\` RegExpUnicodeEscapeSequence[?U] -// -// -pp$9.regexp_eatRegExpIdentifierPart = function(state) { - var start = state.pos; - var ch = state.current(); - state.advance(); - - if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { - ch = state.lastIntValue; - } - if (isRegExpIdentifierPart(ch)) { - state.lastIntValue = ch; - return true + return false + }; + function isValidUnicode(ch) { + return ch >= 0 && ch <= 0x10FFFF } - state.pos = start; - return false -}; -function isRegExpIdentifierPart(ch) { - return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D /* */ -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape -pp$9.regexp_eatAtomEscape = function(state) { - if ( - this.regexp_eatBackReference(state) || - this.regexp_eatCharacterClassEscape(state) || - this.regexp_eatCharacterEscape(state) || - (state.switchN && this.regexp_eatKGroupName(state)) - ) { - return true - } - if (state.switchU) { - // Make the same message as V8. - if (state.current() === 0x63 /* c */) { - state.raise("Invalid unicode escape"); - } - state.raise("Invalid escape"); - } - return false -}; -pp$9.regexp_eatBackReference = function(state) { - var start = state.pos; - if (this.regexp_eatDecimalEscape(state)) { - var n = state.lastIntValue; + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape + pp$8.regexp_eatIdentityEscape = function(state) { if (state.switchU) { - // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape - if (n > state.maxBackReference) { - state.maxBackReference = n; + if (this.regexp_eatSyntaxCharacter(state)) { + return true } - return true - } - if (n <= state.numCapturingParens) { - return true + if (state.eat(0x2F /* / */)) { + state.lastIntValue = 0x2F; /* / */ + return true + } + return false } - state.pos = start; - } - return false -}; -pp$9.regexp_eatKGroupName = function(state) { - if (state.eat(0x6B /* k */)) { - if (this.regexp_eatGroupName(state)) { - state.backReferenceNames.push(state.lastStringValue); + + var ch = state.current(); + if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) { + state.lastIntValue = ch; + state.advance(); return true } - state.raise("Invalid named reference"); - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape -pp$9.regexp_eatCharacterEscape = function(state) { - return ( - this.regexp_eatControlEscape(state) || - this.regexp_eatCControlLetter(state) || - this.regexp_eatZero(state) || - this.regexp_eatHexEscapeSequence(state) || - this.regexp_eatRegExpUnicodeEscapeSequence(state) || - (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) || - this.regexp_eatIdentityEscape(state) - ) -}; -pp$9.regexp_eatCControlLetter = function(state) { - var start = state.pos; - if (state.eat(0x63 /* c */)) { - if (this.regexp_eatControlLetter(state)) { + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape + pp$8.regexp_eatDecimalEscape = function(state) { + state.lastIntValue = 0; + var ch = state.current(); + if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) { + do { + state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + state.advance(); + } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) return true } - state.pos = start; - } - return false -}; -pp$9.regexp_eatZero = function(state) { - if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) { - state.lastIntValue = 0; - state.advance(); - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape -pp$9.regexp_eatControlEscape = function(state) { - var ch = state.current(); - if (ch === 0x74 /* t */) { - state.lastIntValue = 0x09; /* \t */ - state.advance(); - return true - } - if (ch === 0x6E /* n */) { - state.lastIntValue = 0x0A; /* \n */ - state.advance(); - return true - } - if (ch === 0x76 /* v */) { - state.lastIntValue = 0x0B; /* \v */ - state.advance(); - return true - } - if (ch === 0x66 /* f */) { - state.lastIntValue = 0x0C; /* \f */ - state.advance(); - return true - } - if (ch === 0x72 /* r */) { - state.lastIntValue = 0x0D; /* \r */ - state.advance(); - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter -pp$9.regexp_eatControlLetter = function(state) { - var ch = state.current(); - if (isControlLetter(ch)) { - state.lastIntValue = ch % 0x20; - state.advance(); - return true - } - return false -}; -function isControlLetter(ch) { - return ( - (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) || - (ch >= 0x61 /* a */ && ch <= 0x7A /* z */) - ) -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence -pp$9.regexp_eatRegExpUnicodeEscapeSequence = function(state) { - var start = state.pos; - - if (state.eat(0x75 /* u */)) { - if (this.regexp_eatFixedHexDigits(state, 4)) { - var lead = state.lastIntValue; - if (state.switchU && lead >= 0xD800 && lead <= 0xDBFF) { - var leadSurrogateEnd = state.pos; - if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) { - var trail = state.lastIntValue; - if (trail >= 0xDC00 && trail <= 0xDFFF) { - state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; - return true - } - } - state.pos = leadSurrogateEnd; - state.lastIntValue = lead; - } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape + pp$8.regexp_eatCharacterClassEscape = function(state) { + var ch = state.current(); + + if (isCharacterClassEscape(ch)) { + state.lastIntValue = -1; + state.advance(); return true } + if ( state.switchU && - state.eat(0x7B /* { */) && - this.regexp_eatHexDigits(state) && - state.eat(0x7D /* } */) && - isValidUnicode(state.lastIntValue) + this.options.ecmaVersion >= 9 && + (ch === 0x50 /* P */ || ch === 0x70 /* p */) ) { - return true + state.lastIntValue = -1; + state.advance(); + if ( + state.eat(0x7B /* { */) && + this.regexp_eatUnicodePropertyValueExpression(state) && + state.eat(0x7D /* } */) + ) { + return true + } + state.raise("Invalid property name"); } - if (state.switchU) { - state.raise("Invalid unicode escape"); + + return false + }; + function isCharacterClassEscape(ch) { + return ( + ch === 0x64 /* d */ || + ch === 0x44 /* D */ || + ch === 0x73 /* s */ || + ch === 0x53 /* S */ || + ch === 0x77 /* w */ || + ch === 0x57 /* W */ + ) + } + + // UnicodePropertyValueExpression :: + // UnicodePropertyName `=` UnicodePropertyValue + // LoneUnicodePropertyNameOrValue + pp$8.regexp_eatUnicodePropertyValueExpression = function(state) { + var start = state.pos; + + // UnicodePropertyName `=` UnicodePropertyValue + if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) { + var name = state.lastStringValue; + if (this.regexp_eatUnicodePropertyValue(state)) { + var value = state.lastStringValue; + this.regexp_validateUnicodePropertyNameAndValue(state, name, value); + return true + } } state.pos = start; - } - return false -}; -function isValidUnicode(ch) { - return ch >= 0 && ch <= 0x10FFFF -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape -pp$9.regexp_eatIdentityEscape = function(state) { - if (state.switchU) { - if (this.regexp_eatSyntaxCharacter(state)) { - return true - } - if (state.eat(0x2F /* / */)) { - state.lastIntValue = 0x2F; /* / */ + // LoneUnicodePropertyNameOrValue + if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) { + var nameOrValue = state.lastStringValue; + this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue); return true } return false - } + }; + pp$8.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) { + if (!has(state.unicodeProperties.nonBinary, name)) + { state.raise("Invalid property name"); } + if (!state.unicodeProperties.nonBinary[name].test(value)) + { state.raise("Invalid property value"); } + }; + pp$8.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) { + if (!state.unicodeProperties.binary.test(nameOrValue)) + { state.raise("Invalid property name"); } + }; - var ch = state.current(); - if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) { - state.lastIntValue = ch; - state.advance(); - return true + // UnicodePropertyName :: + // UnicodePropertyNameCharacters + pp$8.regexp_eatUnicodePropertyName = function(state) { + var ch = 0; + state.lastStringValue = ""; + while (isUnicodePropertyNameCharacter(ch = state.current())) { + state.lastStringValue += codePointToString(ch); + state.advance(); + } + return state.lastStringValue !== "" + }; + function isUnicodePropertyNameCharacter(ch) { + return isControlLetter(ch) || ch === 0x5F /* _ */ } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape -pp$9.regexp_eatDecimalEscape = function(state) { - state.lastIntValue = 0; - var ch = state.current(); - if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) { - do { - state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + // UnicodePropertyValue :: + // UnicodePropertyValueCharacters + pp$8.regexp_eatUnicodePropertyValue = function(state) { + var ch = 0; + state.lastStringValue = ""; + while (isUnicodePropertyValueCharacter(ch = state.current())) { + state.lastStringValue += codePointToString(ch); state.advance(); - } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) - return true + } + return state.lastStringValue !== "" + }; + function isUnicodePropertyValueCharacter(ch) { + return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch) } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape -pp$9.regexp_eatCharacterClassEscape = function(state) { - var ch = state.current(); - if (isCharacterClassEscape(ch)) { - state.lastIntValue = -1; - state.advance(); - return true - } + // LoneUnicodePropertyNameOrValue :: + // UnicodePropertyValueCharacters + pp$8.regexp_eatLoneUnicodePropertyNameOrValue = function(state) { + return this.regexp_eatUnicodePropertyValue(state) + }; - if ( - state.switchU && - this.options.ecmaVersion >= 9 && - (ch === 0x50 /* P */ || ch === 0x70 /* p */) - ) { - state.lastIntValue = -1; - state.advance(); - if ( - state.eat(0x7B /* { */) && - this.regexp_eatUnicodePropertyValueExpression(state) && - state.eat(0x7D /* } */) - ) { - return true + // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass + pp$8.regexp_eatCharacterClass = function(state) { + if (state.eat(0x5B /* [ */)) { + state.eat(0x5E /* ^ */); + this.regexp_classRanges(state); + if (state.eat(0x5D /* [ */)) { + return true + } + // Unreachable since it threw "unterminated regular expression" error before. + state.raise("Unterminated character class"); } - state.raise("Invalid property name"); - } + return false + }; - return false -}; -function isCharacterClassEscape(ch) { - return ( - ch === 0x64 /* d */ || - ch === 0x44 /* D */ || - ch === 0x73 /* s */ || - ch === 0x53 /* S */ || - ch === 0x77 /* w */ || - ch === 0x57 /* W */ - ) -} - -// UnicodePropertyValueExpression :: -// UnicodePropertyName `=` UnicodePropertyValue -// LoneUnicodePropertyNameOrValue -pp$9.regexp_eatUnicodePropertyValueExpression = function(state) { - var start = state.pos; - - // UnicodePropertyName `=` UnicodePropertyValue - if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) { - var name = state.lastStringValue; - if (this.regexp_eatUnicodePropertyValue(state)) { - var value = state.lastStringValue; - this.regexp_validateUnicodePropertyNameAndValue(state, name, value); - return true + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges + // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges + // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash + pp$8.regexp_classRanges = function(state) { + while (this.regexp_eatClassAtom(state)) { + var left = state.lastIntValue; + if (state.eat(0x2D /* - */) && this.regexp_eatClassAtom(state)) { + var right = state.lastIntValue; + if (state.switchU && (left === -1 || right === -1)) { + state.raise("Invalid character class"); + } + if (left !== -1 && right !== -1 && left > right) { + state.raise("Range out of order in character class"); + } + } } - } - state.pos = start; + }; - // LoneUnicodePropertyNameOrValue - if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) { - var nameOrValue = state.lastStringValue; - this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue); - return true - } - return false -}; -pp$9.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) { - if (!has(state.unicodeProperties.nonBinary, name)) - { state.raise("Invalid property name"); } - if (!state.unicodeProperties.nonBinary[name].test(value)) - { state.raise("Invalid property value"); } -}; -pp$9.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) { - if (!state.unicodeProperties.binary.test(nameOrValue)) - { state.raise("Invalid property name"); } -}; - -// UnicodePropertyName :: -// UnicodePropertyNameCharacters -pp$9.regexp_eatUnicodePropertyName = function(state) { - var ch = 0; - state.lastStringValue = ""; - while (isUnicodePropertyNameCharacter(ch = state.current())) { - state.lastStringValue += codePointToString$1(ch); - state.advance(); - } - return state.lastStringValue !== "" -}; -function isUnicodePropertyNameCharacter(ch) { - return isControlLetter(ch) || ch === 0x5F /* _ */ -} - -// UnicodePropertyValue :: -// UnicodePropertyValueCharacters -pp$9.regexp_eatUnicodePropertyValue = function(state) { - var ch = 0; - state.lastStringValue = ""; - while (isUnicodePropertyValueCharacter(ch = state.current())) { - state.lastStringValue += codePointToString$1(ch); - state.advance(); - } - return state.lastStringValue !== "" -}; -function isUnicodePropertyValueCharacter(ch) { - return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch) -} - -// LoneUnicodePropertyNameOrValue :: -// UnicodePropertyValueCharacters -pp$9.regexp_eatLoneUnicodePropertyNameOrValue = function(state) { - return this.regexp_eatUnicodePropertyValue(state) -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass -pp$9.regexp_eatCharacterClass = function(state) { - if (state.eat(0x5B /* [ */)) { - state.eat(0x5E /* ^ */); - this.regexp_classRanges(state); - if (state.eat(0x5D /* [ */)) { - return true - } - // Unreachable since it threw "unterminated regular expression" error before. - state.raise("Unterminated character class"); - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges -// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges -// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash -pp$9.regexp_classRanges = function(state) { - var this$1 = this; - - while (this.regexp_eatClassAtom(state)) { - var left = state.lastIntValue; - if (state.eat(0x2D /* - */) && this$1.regexp_eatClassAtom(state)) { - var right = state.lastIntValue; - if (state.switchU && (left === -1 || right === -1)) { - state.raise("Invalid character class"); + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash + pp$8.regexp_eatClassAtom = function(state) { + var start = state.pos; + + if (state.eat(0x5C /* \ */)) { + if (this.regexp_eatClassEscape(state)) { + return true } - if (left !== -1 && right !== -1 && left > right) { - state.raise("Range out of order in character class"); + if (state.switchU) { + // Make the same message as V8. + var ch$1 = state.current(); + if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) { + state.raise("Invalid class escape"); + } + state.raise("Invalid escape"); } + state.pos = start; } - } -}; -// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom -// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash -pp$9.regexp_eatClassAtom = function(state) { - var start = state.pos; - - if (state.eat(0x5C /* \ */)) { - if (this.regexp_eatClassEscape(state)) { + var ch = state.current(); + if (ch !== 0x5D /* [ */) { + state.lastIntValue = ch; + state.advance(); return true } - if (state.switchU) { - // Make the same message as V8. - var ch$1 = state.current(); - if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) { - state.raise("Invalid class escape"); - } - state.raise("Invalid escape"); + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape + pp$8.regexp_eatClassEscape = function(state) { + var start = state.pos; + + if (state.eat(0x62 /* b */)) { + state.lastIntValue = 0x08; /* */ + return true } - state.pos = start; - } - var ch = state.current(); - if (ch !== 0x5D /* [ */) { - state.lastIntValue = ch; - state.advance(); - return true - } + if (state.switchU && state.eat(0x2D /* - */)) { + state.lastIntValue = 0x2D; /* - */ + return true + } - return false -}; + if (!state.switchU && state.eat(0x63 /* c */)) { + if (this.regexp_eatClassControlLetter(state)) { + return true + } + state.pos = start; + } -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape -pp$9.regexp_eatClassEscape = function(state) { - var start = state.pos; + return ( + this.regexp_eatCharacterClassEscape(state) || + this.regexp_eatCharacterEscape(state) + ) + }; - if (state.eat(0x62 /* b */)) { - state.lastIntValue = 0x08; /* */ - return true - } + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter + pp$8.regexp_eatClassControlLetter = function(state) { + var ch = state.current(); + if (isDecimalDigit(ch) || ch === 0x5F /* _ */) { + state.lastIntValue = ch % 0x20; + state.advance(); + return true + } + return false + }; - if (state.switchU && state.eat(0x2D /* - */)) { - state.lastIntValue = 0x2D; /* - */ - return true - } + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence + pp$8.regexp_eatHexEscapeSequence = function(state) { + var start = state.pos; + if (state.eat(0x78 /* x */)) { + if (this.regexp_eatFixedHexDigits(state, 2)) { + return true + } + if (state.switchU) { + state.raise("Invalid escape"); + } + state.pos = start; + } + return false + }; - if (!state.switchU && state.eat(0x63 /* c */)) { - if (this.regexp_eatClassControlLetter(state)) { - return true + // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits + pp$8.regexp_eatDecimalDigits = function(state) { + var start = state.pos; + var ch = 0; + state.lastIntValue = 0; + while (isDecimalDigit(ch = state.current())) { + state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + state.advance(); } - state.pos = start; + return state.pos !== start + }; + function isDecimalDigit(ch) { + return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */ } - return ( - this.regexp_eatCharacterClassEscape(state) || - this.regexp_eatCharacterEscape(state) - ) -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter -pp$9.regexp_eatClassControlLetter = function(state) { - var ch = state.current(); - if (isDecimalDigit(ch) || ch === 0x5F /* _ */) { - state.lastIntValue = ch % 0x20; - state.advance(); - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence -pp$9.regexp_eatHexEscapeSequence = function(state) { - var start = state.pos; - if (state.eat(0x78 /* x */)) { - if (this.regexp_eatFixedHexDigits(state, 2)) { - return true + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits + pp$8.regexp_eatHexDigits = function(state) { + var start = state.pos; + var ch = 0; + state.lastIntValue = 0; + while (isHexDigit(ch = state.current())) { + state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); + state.advance(); } - if (state.switchU) { - state.raise("Invalid escape"); + return state.pos !== start + }; + function isHexDigit(ch) { + return ( + (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) || + (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) || + (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) + ) + } + function hexToInt(ch) { + if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) { + return 10 + (ch - 0x41 /* A */) } - state.pos = start; - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits -pp$9.regexp_eatDecimalDigits = function(state) { - var start = state.pos; - var ch = 0; - state.lastIntValue = 0; - while (isDecimalDigit(ch = state.current())) { - state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); - state.advance(); - } - return state.pos !== start -}; -function isDecimalDigit(ch) { - return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */ -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits -pp$9.regexp_eatHexDigits = function(state) { - var start = state.pos; - var ch = 0; - state.lastIntValue = 0; - while (isHexDigit(ch = state.current())) { - state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); - state.advance(); - } - return state.pos !== start -}; -function isHexDigit(ch) { - return ( - (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) || - (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) || - (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) - ) -} -function hexToInt(ch) { - if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) { - return 10 + (ch - 0x41 /* A */) - } - if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) { - return 10 + (ch - 0x61 /* a */) + if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) { + return 10 + (ch - 0x61 /* a */) + } + return ch - 0x30 /* 0 */ } - return ch - 0x30 /* 0 */ -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence -// Allows only 0-377(octal) i.e. 0-255(decimal). -pp$9.regexp_eatLegacyOctalEscapeSequence = function(state) { - if (this.regexp_eatOctalDigit(state)) { - var n1 = state.lastIntValue; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence + // Allows only 0-377(octal) i.e. 0-255(decimal). + pp$8.regexp_eatLegacyOctalEscapeSequence = function(state) { if (this.regexp_eatOctalDigit(state)) { - var n2 = state.lastIntValue; - if (n1 <= 3 && this.regexp_eatOctalDigit(state)) { - state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue; + var n1 = state.lastIntValue; + if (this.regexp_eatOctalDigit(state)) { + var n2 = state.lastIntValue; + if (n1 <= 3 && this.regexp_eatOctalDigit(state)) { + state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue; + } else { + state.lastIntValue = n1 * 8 + n2; + } } else { - state.lastIntValue = n1 * 8 + n2; + state.lastIntValue = n1; } - } else { - state.lastIntValue = n1; + return true } - return true - } - return false -}; - -// https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit -pp$9.regexp_eatOctalDigit = function(state) { - var ch = state.current(); - if (isOctalDigit(ch)) { - state.lastIntValue = ch - 0x30; /* 0 */ - state.advance(); - return true - } - state.lastIntValue = 0; - return false -}; -function isOctalDigit(ch) { - return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */ -} - -// https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits -// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit -// And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence -pp$9.regexp_eatFixedHexDigits = function(state, length) { - var start = state.pos; - state.lastIntValue = 0; - for (var i = 0; i < length; ++i) { + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit + pp$8.regexp_eatOctalDigit = function(state) { var ch = state.current(); - if (!isHexDigit(ch)) { - state.pos = start; - return false + if (isOctalDigit(ch)) { + state.lastIntValue = ch - 0x30; /* 0 */ + state.advance(); + return true } - state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); - state.advance(); + state.lastIntValue = 0; + return false + }; + function isOctalDigit(ch) { + return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */ } - return true -}; - -// Object type used to represent tokens. Note that normally, tokens -// simply exist as properties on the parser object. This is only -// used for the onToken callback and the external tokenizer. - -var Token = function Token(p) { - this.type = p.type; - this.value = p.value; - this.start = p.start; - this.end = p.end; - if (p.options.locations) - { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); } - if (p.options.ranges) - { this.range = [p.start, p.end]; } -}; - -// ## Tokenizer - -var pp$8 = Parser.prototype; - -// Move to the next token - -pp$8.next = function() { - if (this.options.onToken) - { this.options.onToken(new Token(this)); } - - this.lastTokEnd = this.end; - this.lastTokStart = this.start; - this.lastTokEndLoc = this.endLoc; - this.lastTokStartLoc = this.startLoc; - this.nextToken(); -}; - -pp$8.getToken = function() { - this.next(); - return new Token(this) -}; - -// If we're in an ES6 environment, make parsers iterable -if (typeof Symbol !== "undefined") - { pp$8[Symbol.iterator] = function() { - var this$1 = this; - return { - next: function () { - var token = this$1.getToken(); - return { - done: token.type === types.eof, - value: token - } + // https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit + // And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence + pp$8.regexp_eatFixedHexDigits = function(state, length) { + var start = state.pos; + state.lastIntValue = 0; + for (var i = 0; i < length; ++i) { + var ch = state.current(); + if (!isHexDigit(ch)) { + state.pos = start; + return false } + state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); + state.advance(); } - }; } + return true + }; + + // Object type used to represent tokens. Note that normally, tokens + // simply exist as properties on the parser object. This is only + // used for the onToken callback and the external tokenizer. + + var Token = function Token(p) { + this.type = p.type; + this.value = p.value; + this.start = p.start; + this.end = p.end; + if (p.options.locations) + { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); } + if (p.options.ranges) + { this.range = [p.start, p.end]; } + }; + + // ## Tokenizer -// Toggle strict mode. Re-reads the next number or string to please -// pedantic tests (`"use strict"; 010;` should fail). + var pp$9 = Parser.prototype; -pp$8.curContext = function() { - return this.context[this.context.length - 1] -}; + // Move to the next token -// Read a single token, updating the parser object's token-related -// properties. + pp$9.next = function() { + if (this.options.onToken) + { this.options.onToken(new Token(this)); } -pp$8.nextToken = function() { - var curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) { this.skipSpace(); } + this.lastTokEnd = this.end; + this.lastTokStart = this.start; + this.lastTokEndLoc = this.endLoc; + this.lastTokStartLoc = this.startLoc; + this.nextToken(); + }; - this.start = this.pos; - if (this.options.locations) { this.startLoc = this.curPosition(); } - if (this.pos >= this.input.length) { return this.finishToken(types.eof) } + pp$9.getToken = function() { + this.next(); + return new Token(this) + }; - if (curContext.override) { return curContext.override(this) } - else { this.readToken(this.fullCharCodeAtPos()); } -}; + // If we're in an ES6 environment, make parsers iterable + if (typeof Symbol !== "undefined") + { pp$9[Symbol.iterator] = function() { + var this$1 = this; + + return { + next: function () { + var token = this$1.getToken(); + return { + done: token.type === types.eof, + value: token + } + } + } + }; } -pp$8.readToken = function(code) { - // Identifier or keyword. '\uXXXX' sequences are allowed in - // identifiers, so '\' also dispatches to that. - if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) - { return this.readWord() } + // Toggle strict mode. Re-reads the next number or string to please + // pedantic tests (`"use strict"; 010;` should fail). - return this.getTokenFromCode(code) -}; + pp$9.curContext = function() { + return this.context[this.context.length - 1] + }; -pp$8.fullCharCodeAtPos = function() { - var code = this.input.charCodeAt(this.pos); - if (code <= 0xd7ff || code >= 0xe000) { return code } - var next = this.input.charCodeAt(this.pos + 1); - return (code << 10) + next - 0x35fdc00 -}; + // Read a single token, updating the parser object's token-related + // properties. -pp$8.skipBlockComment = function() { - var this$1 = this; + pp$9.nextToken = function() { + var curContext = this.curContext(); + if (!curContext || !curContext.preserveSpace) { this.skipSpace(); } - var startLoc = this.options.onComment && this.curPosition(); - var start = this.pos, end = this.input.indexOf("*/", this.pos += 2); - if (end === -1) { this.raise(this.pos - 2, "Unterminated comment"); } - this.pos = end + 2; - if (this.options.locations) { - lineBreakG.lastIndex = start; - var match; - while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { - ++this$1.curLine; - this$1.lineStart = match.index + match[0].length; - } - } - if (this.options.onComment) - { this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, - startLoc, this.curPosition()); } -}; - -pp$8.skipLineComment = function(startSkip) { - var this$1 = this; - - var start = this.pos; - var startLoc = this.options.onComment && this.curPosition(); - var ch = this.input.charCodeAt(this.pos += startSkip); - while (this.pos < this.input.length && !isNewLine(ch)) { - ch = this$1.input.charCodeAt(++this$1.pos); - } - if (this.options.onComment) - { this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, - startLoc, this.curPosition()); } -}; + this.start = this.pos; + if (this.options.locations) { this.startLoc = this.curPosition(); } + if (this.pos >= this.input.length) { return this.finishToken(types.eof) } -// Called at the start of the parse and after every token. Skips -// whitespace and comments, and. + if (curContext.override) { return curContext.override(this) } + else { this.readToken(this.fullCharCodeAtPos()); } + }; -pp$8.skipSpace = function() { - var this$1 = this; + pp$9.readToken = function(code) { + // Identifier or keyword. '\uXXXX' sequences are allowed in + // identifiers, so '\' also dispatches to that. + if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) + { return this.readWord() } - loop: while (this.pos < this.input.length) { - var ch = this$1.input.charCodeAt(this$1.pos); - switch (ch) { - case 32: case 160: // ' ' - ++this$1.pos; - break - case 13: - if (this$1.input.charCodeAt(this$1.pos + 1) === 10) { - ++this$1.pos; - } - case 10: case 8232: case 8233: - ++this$1.pos; - if (this$1.options.locations) { - ++this$1.curLine; - this$1.lineStart = this$1.pos; + return this.getTokenFromCode(code) + }; + + pp$9.fullCharCodeAtPos = function() { + var code = this.input.charCodeAt(this.pos); + if (code <= 0xd7ff || code >= 0xe000) { return code } + var next = this.input.charCodeAt(this.pos + 1); + return (code << 10) + next - 0x35fdc00 + }; + + pp$9.skipBlockComment = function() { + var startLoc = this.options.onComment && this.curPosition(); + var start = this.pos, end = this.input.indexOf("*/", this.pos += 2); + if (end === -1) { this.raise(this.pos - 2, "Unterminated comment"); } + this.pos = end + 2; + if (this.options.locations) { + lineBreakG.lastIndex = start; + var match; + while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { + ++this.curLine; + this.lineStart = match.index + match[0].length; } - break - case 47: // '/' - switch (this$1.input.charCodeAt(this$1.pos + 1)) { - case 42: // '*' - this$1.skipBlockComment(); + } + if (this.options.onComment) + { this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, + startLoc, this.curPosition()); } + }; + + pp$9.skipLineComment = function(startSkip) { + var start = this.pos; + var startLoc = this.options.onComment && this.curPosition(); + var ch = this.input.charCodeAt(this.pos += startSkip); + while (this.pos < this.input.length && !isNewLine(ch)) { + ch = this.input.charCodeAt(++this.pos); + } + if (this.options.onComment) + { this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, + startLoc, this.curPosition()); } + }; + + // Called at the start of the parse and after every token. Skips + // whitespace and comments, and. + + pp$9.skipSpace = function() { + loop: while (this.pos < this.input.length) { + var ch = this.input.charCodeAt(this.pos); + switch (ch) { + case 32: case 160: // ' ' + ++this.pos; + break + case 13: + if (this.input.charCodeAt(this.pos + 1) === 10) { + ++this.pos; + } + case 10: case 8232: case 8233: + ++this.pos; + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } break - case 47: - this$1.skipLineComment(2); + case 47: // '/' + switch (this.input.charCodeAt(this.pos + 1)) { + case 42: // '*' + this.skipBlockComment(); + break + case 47: + this.skipLineComment(2); + break + default: + break loop + } break default: - break loop + if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this.pos; + } else { + break loop + } } - break - default: - if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this$1.pos; - } else { - break loop + } + }; + + // Called at the end of every token. Sets `end`, `val`, and + // maintains `context` and `exprAllowed`, and skips the space after + // the token, so that the next one's `start` will point at the + // right position. + + pp$9.finishToken = function(type, val) { + this.end = this.pos; + if (this.options.locations) { this.endLoc = this.curPosition(); } + var prevType = this.type; + this.type = type; + this.value = val; + + this.updateContext(prevType); + }; + + // ### Token reading + + // This is the function that is called to fetch the next token. It + // is somewhat obscure, because it works in character codes rather + // than characters, and because operator parsing has been inlined + // into it. + // + // All in the name of speed. + // + pp$9.readToken_dot = function() { + var next = this.input.charCodeAt(this.pos + 1); + if (next >= 48 && next <= 57) { return this.readNumber(true) } + var next2 = this.input.charCodeAt(this.pos + 2); + if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' + this.pos += 3; + return this.finishToken(types.ellipsis) + } else { + ++this.pos; + return this.finishToken(types.dot) + } + }; + + pp$9.readToken_slash = function() { // '/' + var next = this.input.charCodeAt(this.pos + 1); + if (this.exprAllowed) { ++this.pos; return this.readRegexp() } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.slash, 1) + }; + + pp$9.readToken_mult_modulo_exp = function(code) { // '%*' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + var tokentype = code === 42 ? types.star : types.modulo; + + // exponentiation operator ** and **= + if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) { + ++size; + tokentype = types.starstar; + next = this.input.charCodeAt(this.pos + 2); + } + + if (next === 61) { return this.finishOp(types.assign, size + 1) } + return this.finishOp(tokentype, size) + }; + + pp$9.readToken_pipe_amp = function(code) { // '|&' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) { return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2) } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1) + }; + + pp$9.readToken_caret = function() { // '^' + var next = this.input.charCodeAt(this.pos + 1); + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.bitwiseXOR, 1) + }; + + pp$9.readToken_plus_min = function(code) { // '+-' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) { + if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && + (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) { + // A `-->` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken() } + return this.finishOp(types.incDec, 2) } - } -}; - -// Called at the end of every token. Sets `end`, `val`, and -// maintains `context` and `exprAllowed`, and skips the space after -// the token, so that the next one's `start` will point at the -// right position. - -pp$8.finishToken = function(type, val) { - this.end = this.pos; - if (this.options.locations) { this.endLoc = this.curPosition(); } - var prevType = this.type; - this.type = type; - this.value = val; - - this.updateContext(prevType); -}; - -// ### Token reading - -// This is the function that is called to fetch the next token. It -// is somewhat obscure, because it works in character codes rather -// than characters, and because operator parsing has been inlined -// into it. -// -// All in the name of speed. -// -pp$8.readToken_dot = function() { - var next = this.input.charCodeAt(this.pos + 1); - if (next >= 48 && next <= 57) { return this.readNumber(true) } - var next2 = this.input.charCodeAt(this.pos + 2); - if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' - this.pos += 3; - return this.finishToken(types.ellipsis) - } else { - ++this.pos; - return this.finishToken(types.dot) - } -}; - -pp$8.readToken_slash = function() { // '/' - var next = this.input.charCodeAt(this.pos + 1); - if (this.exprAllowed) { ++this.pos; return this.readRegexp() } - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(types.slash, 1) -}; - -pp$8.readToken_mult_modulo_exp = function(code) { // '%*' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - var tokentype = code === 42 ? types.star : types.modulo; - - // exponentiation operator ** and **= - if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) { - ++size; - tokentype = types.starstar; - next = this.input.charCodeAt(this.pos + 2); - } + if (next === 61) { return this.finishOp(types.assign, 2) } + return this.finishOp(types.plusMin, 1) + }; - if (next === 61) { return this.finishOp(types.assign, size + 1) } - return this.finishOp(tokentype, size) -}; - -pp$8.readToken_pipe_amp = function(code) { // '|&' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2) } - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1) -}; - -pp$8.readToken_caret = function() { // '^' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(types.bitwiseXOR, 1) -}; - -pp$8.readToken_plus_min = function(code) { // '+-' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { - if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && - (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) { - // A `-->` line comment - this.skipLineComment(3); + pp$9.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types.assign, size + 1) } + return this.finishOp(types.bitShift, size) + } + if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && + this.input.charCodeAt(this.pos + 3) === 45) { + // ` * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options) + }).join(' ') +} + +function replaceTilde (comp, options) { + var r = options.loose ? re[TILDELOOSE] : re[TILDE] + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else if (pr) { + debug('replaceTilde pr', pr) + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } else { + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options) + }).join(' ') +} + +function replaceCaret (comp, options) { + debug('caret', comp, options) + var r = options.loose ? re[CARETLOOSE] : re[CARET] + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + if (M === '0') { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else { + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + (+M + 1) + '.0.0' + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0' + } + } + + debug('caret return', ret) + return ret + }) +} + +function replaceXRanges (comp, options) { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options) + }).join(' ') +} + +function replaceXRange (comp, options) { + comp = comp.trim() + var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + var xM = isX(M) + var xm = xM || isX(m) + var xp = xm || isX(p) + var anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + ret = gtlt + M + '.' + m + '.' + p + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars (comp, options) { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[STAR], '') +} + +// This function is passed to string.replace(re[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = '>=' + fM + '.0.0' + } else if (isX(fp)) { + from = '>=' + fM + '.' + fm + '.0' + } else { + from = '>=' + from + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = '<' + (+tM + 1) + '.0.0' + } else if (isX(tp)) { + to = '<' + tM + '.' + (+tm + 1) + '.0' + } else if (tpr) { + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr + } else { + to = '<=' + to + } + + return (from + ' ' + to).trim() +} + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + version = new SemVer(version, this.options) + } + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false +} + +function testSet (set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + +exports.satisfies = satisfies +function satisfies (version, range, options) { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} + +exports.maxSatisfying = maxSatisfying +function maxSatisfying (versions, range, options) { + var max = null + var maxSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} + +exports.minSatisfying = minSatisfying +function minSatisfying (versions, range, options) { + var min = null + var minSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} + +exports.minVersion = minVersion +function minVersion (range, loose) { + range = new Range(range, loose) + + var minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + comparators.forEach(function (comparator) { + // Clone to avoid manipulating the comparator's semver object. + var compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!minver || gt(minver, compver)) { + minver = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error('Unexpected operation: ' + comparator.operator) + } + }) + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} + +exports.validRange = validRange +function validRange (range, options) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr +function ltr (version, range, options) { + return outside(version, range, '<', options) +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr +function gtr (version, range, options) { + return outside(version, range, '>', options) +} + +exports.outside = outside +function outside (version, range, hilo, options) { + version = new SemVer(version, options) + range = new Range(range, options) + + var gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + var high = null + var low = null + + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +exports.prerelease = prerelease +function prerelease (version, options) { + var parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} + +exports.intersects = intersects +function intersects (r1, r2, options) { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} + +exports.coerce = coerce +function coerce (version) { + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + var match = version.match(re[COERCE]) + + if (match == null) { + return null + } + + return parse(match[1] + + '.' + (match[2] || '0') + + '.' + (match[3] || '0')) +} diff --git a/tools/node_modules/eslint/node_modules/eslint-scope/lib/index.js b/tools/node_modules/eslint/node_modules/eslint-scope/lib/index.js index f48252fc5f4b22..0f16fa40f8323f 100644 --- a/tools/node_modules/eslint/node_modules/eslint-scope/lib/index.js +++ b/tools/node_modules/eslint/node_modules/eslint-scope/lib/index.js @@ -68,7 +68,7 @@ function defaultOptions() { directive: false, nodejsScope: false, impliedStrict: false, - sourceType: "script", // one of ['script', 'module'] + sourceType: "script", // one of ['script', 'module'] ecmaVersion: 5, childVisitorKeys: null, fallback: "iteration" @@ -93,7 +93,7 @@ function updateDeeply(target, override) { } for (const key in override) { - if (override.hasOwnProperty(key)) { + if (Object.prototype.hasOwnProperty.call(override, key)) { const val = override[key]; if (isHashObject(val)) { diff --git a/tools/node_modules/eslint/node_modules/eslint-scope/lib/referencer.js b/tools/node_modules/eslint/node_modules/eslint-scope/lib/referencer.js index 55d0223df8bf2c..29f853293361d0 100644 --- a/tools/node_modules/eslint/node_modules/eslint-scope/lib/referencer.js +++ b/tools/node_modules/eslint/node_modules/eslint-scope/lib/referencer.js @@ -81,7 +81,7 @@ class Importer extends esrecurse.Visitor { this.declaration, null, null - )); + )); }); } @@ -151,20 +151,26 @@ class Referencer extends esrecurse.Visitor { assignment.right, maybeImplicitGlobal, pattern !== assignment.left, - init); + init + ); }); } visitPattern(node, options, callback) { + let visitPatternOptions = options; + let visitPatternCallback = callback; + if (typeof options === "function") { - callback = options; - options = { processRightHandNodes: false }; + visitPatternCallback = options; + visitPatternOptions = { processRightHandNodes: false }; } + traverseIdentifierInPattern( this.options, node, - options.processRightHandNodes ? this : null, - callback); + visitPatternOptions.processRightHandNodes ? this : null, + visitPatternCallback + ); } visitFunction(node) { @@ -180,14 +186,14 @@ class Referencer extends esrecurse.Visitor { // id is defined in upper scope this.currentScope().__define(node.id, - new Definition( - Variable.FunctionName, - node.id, - node, - null, - null, - null - )); + new Definition( + Variable.FunctionName, + node.id, + node, + null, + null, + null + )); } // FunctionExpression with name creates its special scope; @@ -258,14 +264,14 @@ class Referencer extends esrecurse.Visitor { visitClass(node) { if (node.type === Syntax.ClassDeclaration) { this.currentScope().__define(node.id, - new Definition( - Variable.ClassName, - node.id, - node, - null, - null, - null - )); + new Definition( + Variable.ClassName, + node.id, + node, + null, + null, + null + )); } this.visit(node.superClass); @@ -274,11 +280,11 @@ class Referencer extends esrecurse.Visitor { if (node.id) { this.currentScope().__define(node.id, - new Definition( - Variable.ClassName, - node.id, - node - )); + new Definition( + Variable.ClassName, + node.id, + node + )); } this.visit(node.body); diff --git a/tools/node_modules/eslint/node_modules/eslint-scope/lib/scope.js b/tools/node_modules/eslint/node_modules/eslint-scope/lib/scope.js index f0c3006c601f62..5c4c967780a3e5 100644 --- a/tools/node_modules/eslint/node_modules/eslint-scope/lib/scope.js +++ b/tools/node_modules/eslint/node_modules/eslint-scope/lib/scope.js @@ -161,7 +161,7 @@ class Scope { */ this.type = type; - /** + /** * The scoped {@link Variable}s of this scope, as { Variable.name * : Variable }. * @member {Map} Scope#set @@ -192,13 +192,13 @@ class Scope { */ this.block = block; - /** + /** * The {@link Reference|references} that are not resolved with this scope. * @member {Reference[]} Scope#through */ this.through = []; - /** + /** * The scoped {@link Variable}s of this scope. In the case of a * 'function' scope this includes the automatic argument arguments as * its first element, as well as all further formal arguments. @@ -206,7 +206,7 @@ class Scope { */ this.variables = []; - /** + /** * Any variable {@link Reference|reference} found in this scope. This * includes occurrences of local variables as well as variables from * parent scopes (including the global scope). For local variables @@ -217,7 +217,7 @@ class Scope { */ this.references = []; - /** + /** * For 'global' and 'function' scopes, this is a self-reference. For * other scope types this is the variableScope value of the * parent scope. @@ -226,38 +226,38 @@ class Scope { this.variableScope = (this.type === "global" || this.type === "function" || this.type === "module") ? this : upperScope.variableScope; - /** + /** * Whether this scope is created by a FunctionExpression. * @member {boolean} Scope#functionExpressionScope */ this.functionExpressionScope = false; - /** + /** * Whether this is a scope that contains an 'eval()' invocation. * @member {boolean} Scope#directCallToEvalScope */ this.directCallToEvalScope = false; - /** + /** * @member {boolean} Scope#thisFound */ this.thisFound = false; this.__left = []; - /** + /** * Reference to the parent {@link Scope|scope}. * @member {Scope} Scope#upper */ this.upper = upperScope; - /** + /** * Whether 'use strict' is in effect in this scope. * @member {boolean} Scope#isStrict */ this.isStrict = isStrictScope(this, block, isMethodDefinition, scopeManager.__useDirective()); - /** + /** * List of nested {@link Scope}s. * @member {Scope[]} Scope#childScopes */ @@ -414,11 +414,12 @@ class Scope { __define(node, def) { if (node && node.type === Syntax.Identifier) { this.__defineGeneric( - node.name, - this.set, - this.variables, - node, - def); + node.name, + this.set, + this.variables, + node, + def + ); } } @@ -550,14 +551,14 @@ class GlobalScope extends Scope { const info = implicit[i]; this.__defineImplicit(info.pattern, - new Definition( - Variable.ImplicitGlobalVariable, - info.pattern, - info.node, - null, - null, - null - )); + new Definition( + Variable.ImplicitGlobalVariable, + info.pattern, + info.node, + null, + null, + null + )); } @@ -569,11 +570,12 @@ class GlobalScope extends Scope { __defineImplicit(node, def) { if (node && node.type === Syntax.Identifier) { this.__defineGeneric( - node.name, - this.implicit.set, - this.implicit.variables, - node, - def); + node.name, + this.implicit.set, + this.implicit.variables, + node, + def + ); } } } @@ -588,14 +590,14 @@ class FunctionExpressionNameScope extends Scope { constructor(scopeManager, upperScope, block) { super(scopeManager, "function-expression-name", upperScope, block, false); this.__define(block.id, - new Definition( - Variable.FunctionName, - block.id, - block, - null, - null, - null - )); + new Definition( + Variable.FunctionName, + block.id, + block, + null, + null, + null + )); this.functionExpressionScope = true; } } @@ -684,11 +686,12 @@ class FunctionScope extends Scope { __defineArguments() { this.__defineGeneric( - "arguments", - this.set, - this.variables, - null, - null); + "arguments", + this.set, + this.variables, + null, + null + ); this.taints.set("arguments", true); } @@ -710,7 +713,7 @@ class FunctionScope extends Scope { // It's invalid resolution in the following case: return !( variable.scope === this && - ref.identifier.range[0] < bodyStart && // the reference is in the parameter part. + ref.identifier.range[0] < bodyStart && // the reference is in the parameter part. variable.defs.every(d => d.name.range[0] >= bodyStart) // the variable is in the body. ); } diff --git a/tools/node_modules/eslint/node_modules/eslint-scope/package.json b/tools/node_modules/eslint/node_modules/eslint-scope/package.json index f3239af383b050..1c7fa4450b0c9c 100644 --- a/tools/node_modules/eslint/node_modules/eslint-scope/package.json +++ b/tools/node_modules/eslint/node_modules/eslint-scope/package.json @@ -10,20 +10,21 @@ "deprecated": false, "description": "ECMAScript scope analyzer for ESLint", "devDependencies": { - "chai": "^3.4.1", - "eslint": "^3.15.0", - "eslint-config-eslint": "^4.0.0", + "@typescript-eslint/parser": "^1.11.0", + "chai": "^4.2.0", + "eslint": "^6.0.1", + "eslint-config-eslint": "^5.0.1", + "eslint-plugin-node": "^9.1.0", "eslint-release": "^1.0.0", - "espree": "^3.1.1", + "espree": "^6.0.0", "istanbul": "^0.4.5", - "mocha": "^3.2.0", + "mocha": "^6.1.4", "npm-license": "^0.3.3", - "shelljs": "^0.7.6", - "typescript": "~2.0.10", - "typescript-eslint-parser": "^1.0.0" + "shelljs": "^0.8.3", + "typescript": "^3.5.2" }, "engines": { - "node": ">=4.0.0" + "node": ">=8.0.0" }, "files": [ "LICENSE", @@ -47,5 +48,5 @@ "publish-release": "eslint-publish-release", "test": "node Makefile.js test" }, - "version": "4.0.3" + "version": "5.0.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-utils/index.js b/tools/node_modules/eslint/node_modules/eslint-utils/index.js index a74dd9037ac2f9..d501e86d3f9681 100644 --- a/tools/node_modules/eslint/node_modules/eslint-utils/index.js +++ b/tools/node_modules/eslint/node_modules/eslint-utils/index.js @@ -3,6 +3,10 @@ Object.defineProperty(exports, '__esModule', { value: true }); +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var evk = _interopDefault(require('eslint-visitor-keys')); + /** * Get the innermost scope which contains a given location. * @param {Scope} initialScope The initial scope to search. @@ -742,12 +746,291 @@ function getFunctionNameWithKind(node) { return tokens.join(" ") } +const typeConversionBinaryOps = Object.freeze( + new Set([ + "==", + "!=", + "<", + "<=", + ">", + ">=", + "<<", + ">>", + ">>>", + "+", + "-", + "*", + "/", + "%", + "|", + "^", + "&", + "in", + ]) +); +const typeConversionUnaryOps = Object.freeze(new Set(["-", "+", "!", "~"])); +const visitor = Object.freeze( + Object.assign(Object.create(null), { + $visit(node, options, visitorKeys) { + const { type } = node; + + if (typeof this[type] === "function") { + return this[type](node, options, visitorKeys) + } + + return this.$visitChildren(node, options, visitorKeys) + }, + + $visitChildren(node, options, visitorKeys) { + const { type } = node; + + for (const key of visitorKeys[type] || evk.getKeys(node)) { + const value = node[key]; + + if (Array.isArray(value)) { + for (const element of value) { + if ( + element && + this.$visit(element, options, visitorKeys) + ) { + return true + } + } + } else if (value && this.$visit(value, options, visitorKeys)) { + return true + } + } + + return false + }, + + ArrowFunctionExpression() { + return false + }, + AssignmentExpression() { + return true + }, + AwaitExpression() { + return true + }, + BinaryExpression(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + typeConversionBinaryOps.has(node.operator) && + (node.left.type !== "Literal" || node.right.type !== "Literal") + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + CallExpression() { + return true + }, + FunctionExpression() { + return false + }, + ImportExpression() { + return true + }, + MemberExpression(node, options, visitorKeys) { + if (options.considerGetters) { + return true + } + if ( + options.considerImplicitTypeConversion && + node.computed && + node.property.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + MethodDefinition(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + node.computed && + node.key.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + NewExpression() { + return true + }, + Property(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + node.computed && + node.key.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + UnaryExpression(node, options, visitorKeys) { + if (node.operator === "delete") { + return true + } + if ( + options.considerImplicitTypeConversion && + typeConversionUnaryOps.has(node.operator) && + node.argument.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + UpdateExpression() { + return true + }, + YieldExpression() { + return true + }, + }) +); + +/** + * Check whether a given node has any side effect or not. + * @param {Node} node The node to get. + * @param {SourceCode} sourceCode The source code object. + * @param {object} [options] The option object. + * @param {boolean} [options.considerGetters=false] If `true` then it considers member accesses as the node which has side effects. + * @param {boolean} [options.considerImplicitTypeConversion=false] If `true` then it considers implicit type conversion as the node which has side effects. + * @param {object} [options.visitorKeys=evk.KEYS] The keys to traverse nodes. Use `context.getSourceCode().visitorKeys`. + * @returns {boolean} `true` if the node has a certain side effect. + */ +function hasSideEffect( + node, + sourceCode, + { considerGetters = false, considerImplicitTypeConversion = false } = {} +) { + return visitor.$visit( + node, + { considerGetters, considerImplicitTypeConversion }, + sourceCode.visitorKeys || evk.KEYS + ) +} + +/** + * Get the left parenthesis of the parent node syntax if it exists. + * E.g., `if (a) {}` then the `(`. + * @param {Node} node The AST node to check. + * @param {SourceCode} sourceCode The source code object to get tokens. + * @returns {Token|null} The left parenthesis of the parent node syntax + */ +function getParentSyntaxParen(node, sourceCode) { + const parent = node.parent; + + switch (parent.type) { + case "CallExpression": + case "NewExpression": + if (parent.arguments.length === 1 && parent.arguments[0] === node) { + return sourceCode.getTokenAfter( + parent.callee, + isOpeningParenToken + ) + } + return null + + case "DoWhileStatement": + if (parent.test === node) { + return sourceCode.getTokenAfter( + parent.body, + isOpeningParenToken + ) + } + return null + + case "IfStatement": + case "WhileStatement": + if (parent.test === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + case "ImportExpression": + if (parent.source === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + case "SwitchStatement": + if (parent.discriminant === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + case "WithStatement": + if (parent.object === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + default: + return null + } +} + +/** + * Check whether a given node is parenthesized or not. + * @param {number} times The number of parantheses. + * @param {Node} node The AST node to check. + * @param {SourceCode} sourceCode The source code object to get tokens. + * @returns {boolean} `true` if the node is parenthesized the given times. + */ +/** + * Check whether a given node is parenthesized or not. + * @param {Node} node The AST node to check. + * @param {SourceCode} sourceCode The source code object to get tokens. + * @returns {boolean} `true` if the node is parenthesized. + */ +function isParenthesized( + timesOrNode, + nodeOrSourceCode, + optionalSourceCode +) { + let times, node, sourceCode, maybeLeftParen, maybeRightParen; + if (typeof timesOrNode === "number") { + times = timesOrNode | 0; + node = nodeOrSourceCode; + sourceCode = optionalSourceCode; + if (!(times >= 1)) { + throw new TypeError("'times' should be a positive integer.") + } + } else { + times = 1; + node = timesOrNode; + sourceCode = nodeOrSourceCode; + } + + if (node == null) { + return false + } + + maybeLeftParen = maybeRightParen = node; + do { + maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen); + maybeRightParen = sourceCode.getTokenAfter(maybeRightParen); + } while ( + maybeLeftParen != null && + maybeRightParen != null && + isOpeningParenToken(maybeLeftParen) && + isClosingParenToken(maybeRightParen) && + // Avoid false positive such as `if (a) {}` + maybeLeftParen !== getParentSyntaxParen(node, sourceCode) && + --times > 0 + ) + + return times === 0 +} + /** * @author Toru Nagashima * See LICENSE file in root directory for full license. */ -const placeholder = /\$(?:[$&`']|[1-9][0-9]?)/g; +const placeholder = /\$(?:[$&`']|[1-9][0-9]?)/gu; /** @type {WeakMap} */ const internal = new WeakMap(); @@ -814,7 +1097,6 @@ function replaceS(matcher, str, replacement) { return chunks.join("") } -//eslint-disable-next-line valid-jsdoc /** * Replace a given string by a given matcher. * @param {PatternMatcher} matcher The pattern matcher. @@ -890,7 +1172,6 @@ class PatternMatcher { return !ret.done } - //eslint-disable-next-line valid-jsdoc /** * Replace a given string. * @param {string} str The string to be replaced. @@ -904,8 +1185,8 @@ class PatternMatcher { } } -const SENTINEL_TYPE = /^(?:.+?Statement|.+?Declaration|(?:Array|ArrowFunction|Assignment|Call|Class|Function|Member|New|Object)Expression|AssignmentPattern|Program|VariableDeclarator)$/; -const IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/; +const SENTINEL_TYPE = /^(?:.+?Statement|.+?Declaration|(?:Array|ArrowFunction|Assignment|Call|Class|Function|Member|New|Object)Expression|AssignmentPattern|Program|VariableDeclarator)$/u; +const IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u; const has = Function.call.bind(Object.hasOwnProperty); const READ = Symbol("read"); @@ -1126,7 +1407,7 @@ class ReferenceTracker { * @param {object} traceMap The trace map. * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references. */ - //eslint-disable-next-line complexity, require-jsdoc + //eslint-disable-next-line complexity *_iteratePropertyReferences(rootNode, path, traceMap) { let node = rootNode; while (!SENTINEL_TYPE.test(node.parent.type)) { @@ -1342,6 +1623,7 @@ var index = { getPropertyName, getStaticValue, getStringIfConstant, + hasSideEffect, isArrowToken, isClosingBraceToken, isClosingBracketToken, @@ -1363,16 +1645,20 @@ var index = { isOpeningBraceToken, isOpeningBracketToken, isOpeningParenToken, + isParenthesized, isSemicolonToken, PatternMatcher, READ, ReferenceTracker, }; -exports.default = index; exports.CALL = CALL; exports.CONSTRUCT = CONSTRUCT; exports.ESM = ESM; +exports.PatternMatcher = PatternMatcher; +exports.READ = READ; +exports.ReferenceTracker = ReferenceTracker; +exports.default = index; exports.findVariable = findVariable; exports.getFunctionHeadLocation = getFunctionHeadLocation; exports.getFunctionNameWithKind = getFunctionNameWithKind; @@ -1380,6 +1666,7 @@ exports.getInnermostScope = getInnermostScope; exports.getPropertyName = getPropertyName; exports.getStaticValue = getStaticValue; exports.getStringIfConstant = getStringIfConstant; +exports.hasSideEffect = hasSideEffect; exports.isArrowToken = isArrowToken; exports.isClosingBraceToken = isClosingBraceToken; exports.isClosingBracketToken = isClosingBracketToken; @@ -1401,8 +1688,6 @@ exports.isNotSemicolonToken = isNotSemicolonToken; exports.isOpeningBraceToken = isOpeningBraceToken; exports.isOpeningBracketToken = isOpeningBracketToken; exports.isOpeningParenToken = isOpeningParenToken; +exports.isParenthesized = isParenthesized; exports.isSemicolonToken = isSemicolonToken; -exports.PatternMatcher = PatternMatcher; -exports.READ = READ; -exports.ReferenceTracker = ReferenceTracker; //# sourceMappingURL=index.js.map diff --git a/tools/node_modules/eslint/node_modules/eslint-utils/index.mjs b/tools/node_modules/eslint/node_modules/eslint-utils/index.mjs index 0ec1ad777e51eb..e050ba0e1b7c52 100644 --- a/tools/node_modules/eslint/node_modules/eslint-utils/index.mjs +++ b/tools/node_modules/eslint/node_modules/eslint-utils/index.mjs @@ -1,4 +1,6 @@ /*! @author Toru Nagashima */ +import evk from 'eslint-visitor-keys'; + /** * Get the innermost scope which contains a given location. * @param {Scope} initialScope The initial scope to search. @@ -738,12 +740,291 @@ function getFunctionNameWithKind(node) { return tokens.join(" ") } +const typeConversionBinaryOps = Object.freeze( + new Set([ + "==", + "!=", + "<", + "<=", + ">", + ">=", + "<<", + ">>", + ">>>", + "+", + "-", + "*", + "/", + "%", + "|", + "^", + "&", + "in", + ]) +); +const typeConversionUnaryOps = Object.freeze(new Set(["-", "+", "!", "~"])); +const visitor = Object.freeze( + Object.assign(Object.create(null), { + $visit(node, options, visitorKeys) { + const { type } = node; + + if (typeof this[type] === "function") { + return this[type](node, options, visitorKeys) + } + + return this.$visitChildren(node, options, visitorKeys) + }, + + $visitChildren(node, options, visitorKeys) { + const { type } = node; + + for (const key of visitorKeys[type] || evk.getKeys(node)) { + const value = node[key]; + + if (Array.isArray(value)) { + for (const element of value) { + if ( + element && + this.$visit(element, options, visitorKeys) + ) { + return true + } + } + } else if (value && this.$visit(value, options, visitorKeys)) { + return true + } + } + + return false + }, + + ArrowFunctionExpression() { + return false + }, + AssignmentExpression() { + return true + }, + AwaitExpression() { + return true + }, + BinaryExpression(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + typeConversionBinaryOps.has(node.operator) && + (node.left.type !== "Literal" || node.right.type !== "Literal") + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + CallExpression() { + return true + }, + FunctionExpression() { + return false + }, + ImportExpression() { + return true + }, + MemberExpression(node, options, visitorKeys) { + if (options.considerGetters) { + return true + } + if ( + options.considerImplicitTypeConversion && + node.computed && + node.property.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + MethodDefinition(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + node.computed && + node.key.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + NewExpression() { + return true + }, + Property(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + node.computed && + node.key.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + UnaryExpression(node, options, visitorKeys) { + if (node.operator === "delete") { + return true + } + if ( + options.considerImplicitTypeConversion && + typeConversionUnaryOps.has(node.operator) && + node.argument.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, + UpdateExpression() { + return true + }, + YieldExpression() { + return true + }, + }) +); + +/** + * Check whether a given node has any side effect or not. + * @param {Node} node The node to get. + * @param {SourceCode} sourceCode The source code object. + * @param {object} [options] The option object. + * @param {boolean} [options.considerGetters=false] If `true` then it considers member accesses as the node which has side effects. + * @param {boolean} [options.considerImplicitTypeConversion=false] If `true` then it considers implicit type conversion as the node which has side effects. + * @param {object} [options.visitorKeys=evk.KEYS] The keys to traverse nodes. Use `context.getSourceCode().visitorKeys`. + * @returns {boolean} `true` if the node has a certain side effect. + */ +function hasSideEffect( + node, + sourceCode, + { considerGetters = false, considerImplicitTypeConversion = false } = {} +) { + return visitor.$visit( + node, + { considerGetters, considerImplicitTypeConversion }, + sourceCode.visitorKeys || evk.KEYS + ) +} + +/** + * Get the left parenthesis of the parent node syntax if it exists. + * E.g., `if (a) {}` then the `(`. + * @param {Node} node The AST node to check. + * @param {SourceCode} sourceCode The source code object to get tokens. + * @returns {Token|null} The left parenthesis of the parent node syntax + */ +function getParentSyntaxParen(node, sourceCode) { + const parent = node.parent; + + switch (parent.type) { + case "CallExpression": + case "NewExpression": + if (parent.arguments.length === 1 && parent.arguments[0] === node) { + return sourceCode.getTokenAfter( + parent.callee, + isOpeningParenToken + ) + } + return null + + case "DoWhileStatement": + if (parent.test === node) { + return sourceCode.getTokenAfter( + parent.body, + isOpeningParenToken + ) + } + return null + + case "IfStatement": + case "WhileStatement": + if (parent.test === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + case "ImportExpression": + if (parent.source === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + case "SwitchStatement": + if (parent.discriminant === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + case "WithStatement": + if (parent.object === node) { + return sourceCode.getFirstToken(parent, 1) + } + return null + + default: + return null + } +} + +/** + * Check whether a given node is parenthesized or not. + * @param {number} times The number of parantheses. + * @param {Node} node The AST node to check. + * @param {SourceCode} sourceCode The source code object to get tokens. + * @returns {boolean} `true` if the node is parenthesized the given times. + */ +/** + * Check whether a given node is parenthesized or not. + * @param {Node} node The AST node to check. + * @param {SourceCode} sourceCode The source code object to get tokens. + * @returns {boolean} `true` if the node is parenthesized. + */ +function isParenthesized( + timesOrNode, + nodeOrSourceCode, + optionalSourceCode +) { + let times, node, sourceCode, maybeLeftParen, maybeRightParen; + if (typeof timesOrNode === "number") { + times = timesOrNode | 0; + node = nodeOrSourceCode; + sourceCode = optionalSourceCode; + if (!(times >= 1)) { + throw new TypeError("'times' should be a positive integer.") + } + } else { + times = 1; + node = timesOrNode; + sourceCode = nodeOrSourceCode; + } + + if (node == null) { + return false + } + + maybeLeftParen = maybeRightParen = node; + do { + maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen); + maybeRightParen = sourceCode.getTokenAfter(maybeRightParen); + } while ( + maybeLeftParen != null && + maybeRightParen != null && + isOpeningParenToken(maybeLeftParen) && + isClosingParenToken(maybeRightParen) && + // Avoid false positive such as `if (a) {}` + maybeLeftParen !== getParentSyntaxParen(node, sourceCode) && + --times > 0 + ) + + return times === 0 +} + /** * @author Toru Nagashima * See LICENSE file in root directory for full license. */ -const placeholder = /\$(?:[$&`']|[1-9][0-9]?)/g; +const placeholder = /\$(?:[$&`']|[1-9][0-9]?)/gu; /** @type {WeakMap} */ const internal = new WeakMap(); @@ -810,7 +1091,6 @@ function replaceS(matcher, str, replacement) { return chunks.join("") } -//eslint-disable-next-line valid-jsdoc /** * Replace a given string by a given matcher. * @param {PatternMatcher} matcher The pattern matcher. @@ -886,7 +1166,6 @@ class PatternMatcher { return !ret.done } - //eslint-disable-next-line valid-jsdoc /** * Replace a given string. * @param {string} str The string to be replaced. @@ -900,8 +1179,8 @@ class PatternMatcher { } } -const SENTINEL_TYPE = /^(?:.+?Statement|.+?Declaration|(?:Array|ArrowFunction|Assignment|Call|Class|Function|Member|New|Object)Expression|AssignmentPattern|Program|VariableDeclarator)$/; -const IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/; +const SENTINEL_TYPE = /^(?:.+?Statement|.+?Declaration|(?:Array|ArrowFunction|Assignment|Call|Class|Function|Member|New|Object)Expression|AssignmentPattern|Program|VariableDeclarator)$/u; +const IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u; const has = Function.call.bind(Object.hasOwnProperty); const READ = Symbol("read"); @@ -1122,7 +1401,7 @@ class ReferenceTracker { * @param {object} traceMap The trace map. * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references. */ - //eslint-disable-next-line complexity, require-jsdoc + //eslint-disable-next-line complexity *_iteratePropertyReferences(rootNode, path, traceMap) { let node = rootNode; while (!SENTINEL_TYPE.test(node.parent.type)) { @@ -1338,6 +1617,7 @@ var index = { getPropertyName, getStaticValue, getStringIfConstant, + hasSideEffect, isArrowToken, isClosingBraceToken, isClosingBracketToken, @@ -1359,6 +1639,7 @@ var index = { isOpeningBraceToken, isOpeningBracketToken, isOpeningParenToken, + isParenthesized, isSemicolonToken, PatternMatcher, READ, @@ -1366,5 +1647,5 @@ var index = { }; export default index; -export { CALL, CONSTRUCT, ESM, findVariable, getFunctionHeadLocation, getFunctionNameWithKind, getInnermostScope, getPropertyName, getStaticValue, getStringIfConstant, isArrowToken, isClosingBraceToken, isClosingBracketToken, isClosingParenToken, isColonToken, isCommaToken, isCommentToken, isNotArrowToken, isNotClosingBraceToken, isNotClosingBracketToken, isNotClosingParenToken, isNotColonToken, isNotCommaToken, isNotCommentToken, isNotOpeningBraceToken, isNotOpeningBracketToken, isNotOpeningParenToken, isNotSemicolonToken, isOpeningBraceToken, isOpeningBracketToken, isOpeningParenToken, isSemicolonToken, PatternMatcher, READ, ReferenceTracker }; +export { CALL, CONSTRUCT, ESM, PatternMatcher, READ, ReferenceTracker, findVariable, getFunctionHeadLocation, getFunctionNameWithKind, getInnermostScope, getPropertyName, getStaticValue, getStringIfConstant, hasSideEffect, isArrowToken, isClosingBraceToken, isClosingBracketToken, isClosingParenToken, isColonToken, isCommaToken, isCommentToken, isNotArrowToken, isNotClosingBraceToken, isNotClosingBracketToken, isNotClosingParenToken, isNotColonToken, isNotCommaToken, isNotCommentToken, isNotOpeningBraceToken, isNotOpeningBracketToken, isNotOpeningParenToken, isNotSemicolonToken, isOpeningBraceToken, isOpeningBracketToken, isOpeningParenToken, isParenthesized, isSemicolonToken }; //# sourceMappingURL=index.mjs.map diff --git a/tools/node_modules/eslint/node_modules/eslint-utils/package.json b/tools/node_modules/eslint/node_modules/eslint-utils/package.json index 9157ef76634ddd..b6e49c8b9d384c 100644 --- a/tools/node_modules/eslint/node_modules/eslint-utils/package.json +++ b/tools/node_modules/eslint/node_modules/eslint-utils/package.json @@ -6,22 +6,26 @@ "url": "https://github.com/mysticatea/eslint-utils/issues" }, "bundleDependencies": false, - "dependencies": {}, + "dependencies": { + "eslint-visitor-keys": "^1.0.0" + }, "deprecated": false, "description": "Utilities for ESLint plugins.", "devDependencies": { - "@mysticatea/eslint-plugin": "^5.0.1", + "@mysticatea/eslint-plugin": "^10.0.3", "codecov": "^3.0.2", - "eslint": "^5.0.1", + "dot-prop": "^4.2.0", + "eslint": "^5.16.0", "esm": "^3.0.55", - "espree": "^4.0.0", + "espree": "^5.0.1", "mocha": "^5.2.0", - "nyc": "^12.0.2", + "nyc": "^13.0.1", "opener": "^1.4.3", "rimraf": "^2.6.2", - "rollup": "^0.62.0", + "rollup": "^1.16.7", "rollup-plugin-sourcemaps": "^0.4.2", - "vuepress": "github:mysticatea/vuepress#skip-waiting" + "vuepress": "^0.14.4", + "warun": "^1.0.0" }, "engines": { "node": ">=6" @@ -35,6 +39,7 @@ ], "license": "MIT", "main": "index", + "module": "index.mjs", "name": "eslint-utils", "repository": { "type": "git", @@ -54,7 +59,8 @@ "preversion": "npm test && npm run -s build", "prewatch": "npm run -s clean", "test": "nyc mocha --reporter dot \"test/*.js\"", - "watch": "mocha --require esm --reporter dot --watch --growl \"test/*.js\"" + "watch": "warun \"{src,test}/**/*.js\" -- nyc --reporter lcov mocha --reporter dot \"test/*.js\"" }, - "version": "1.3.1" + "sideEffects": false, + "version": "1.4.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/external-editor/README.md b/tools/node_modules/eslint/node_modules/external-editor/README.md index a6c69017ea10b4..9eb135b643cd56 100644 --- a/tools/node_modules/eslint/node_modules/external-editor/README.md +++ b/tools/node_modules/eslint/node_modules/external-editor/README.md @@ -7,7 +7,7 @@ A node module to edit a string with a users preferred text editor using $VISUAL or $ENVIRONMENT. -Version: 3.0.3 +Version: 3.1.0 As of version 3.0.0, the minimum version of node supported is 4. @@ -63,15 +63,17 @@ A full featured example #### API **Convenience Methods** -- `edit(text)` +- `edit(text, config)` - `text` (string) *Optional* Defaults to empty string + - `config` (Config) *Optional* Options for temporary file creation - **Returns** (string) The contents of the file - Could throw `CreateFileError`, `ReadFileError`, or `LaunchEditorError`, or `RemoveFileError` -- `editAsync(text, callback)` +- `editAsync(text, callback, config)` - `text` (string) *Optional* Defaults to empty string - `callback` (function (error, text)) - `error` could be of type `CreateFileError`, `ReadFileError`, or `LaunchEditorError`, or `RemoveFileError` - - `text`(string) The contents of the file + - `text`(string) The contents of the file + - `config` (Config) *Optional* Options for temporary file creation **Errors** @@ -83,8 +85,9 @@ A full featured example **External Editor Public Methods** -- `new ExternalEditor(text)` +- `new ExternalEditor(text, config)` - `text` (string) *Optional* Defaults to empty string + - `config` (Config) *Optional* Options for temporary file creation - Could throw `CreateFileError` - `run()` Launches the editor. - **Returns** (string) The contents of the file @@ -105,6 +108,14 @@ A full featured example exists and would need be removed manually. - `lastExitStatus` (number) The last exit code emitted from the editor. +**Config Options** + +- `prefix` (string) *Optional* A prefix for the file name. +- `postfix` (string; *Optional* A postfix for the file name. Useful if you want to provide an extension. +- `mode` (number) *Optional* Which mode to create the file with. e.g. 644 +- `template` (string) *Optional* A template for the filename. See [tmp](https://www.npmjs.com/package/tmp). +- `dir` (string) *Optional* Which path to store the file. + ## Errors All errors have a simple message explaining what went wrong. They all also have an `originalError` property containing diff --git a/tools/node_modules/eslint/node_modules/external-editor/main/errors/CreateFileError.js b/tools/node_modules/eslint/node_modules/external-editor/main/errors/CreateFileError.js index ca3f876d9e1994..7faa34c82c7790 100644 --- a/tools/node_modules/eslint/node_modules/external-editor/main/errors/CreateFileError.js +++ b/tools/node_modules/eslint/node_modules/external-editor/main/errors/CreateFileError.js @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () { ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); - } + }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tools/node_modules/eslint/node_modules/external-editor/main/errors/LaunchEditorError.js b/tools/node_modules/eslint/node_modules/external-editor/main/errors/LaunchEditorError.js index 3ab4817989c817..85a164e7a8fa86 100644 --- a/tools/node_modules/eslint/node_modules/external-editor/main/errors/LaunchEditorError.js +++ b/tools/node_modules/eslint/node_modules/external-editor/main/errors/LaunchEditorError.js @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () { ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); - } + }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tools/node_modules/eslint/node_modules/external-editor/main/errors/ReadFileError.js b/tools/node_modules/eslint/node_modules/external-editor/main/errors/ReadFileError.js index 7845d8deda2110..69e0513627ac0d 100644 --- a/tools/node_modules/eslint/node_modules/external-editor/main/errors/ReadFileError.js +++ b/tools/node_modules/eslint/node_modules/external-editor/main/errors/ReadFileError.js @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () { ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); - } + }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tools/node_modules/eslint/node_modules/external-editor/main/errors/RemoveFileError.js b/tools/node_modules/eslint/node_modules/external-editor/main/errors/RemoveFileError.js index 238570870e03f0..23d266f248cb46 100644 --- a/tools/node_modules/eslint/node_modules/external-editor/main/errors/RemoveFileError.js +++ b/tools/node_modules/eslint/node_modules/external-editor/main/errors/RemoveFileError.js @@ -11,7 +11,7 @@ var __extends = (this && this.__extends) || (function () { ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); - } + }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tools/node_modules/eslint/node_modules/external-editor/main/index.js b/tools/node_modules/eslint/node_modules/external-editor/main/index.js index 3fa210e4b3ab50..258f31964b73b2 100644 --- a/tools/node_modules/eslint/node_modules/external-editor/main/index.js +++ b/tools/node_modules/eslint/node_modules/external-editor/main/index.js @@ -3,7 +3,7 @@ * Node External Editor * * Kevin Gravier - * MIT 2018 + * MIT 2019 */ Object.defineProperty(exports, "__esModule", { value: true }); var chardet_1 = require("chardet"); @@ -19,17 +19,17 @@ var ReadFileError_1 = require("./errors/ReadFileError"); exports.ReadFileError = ReadFileError_1.ReadFileError; var RemoveFileError_1 = require("./errors/RemoveFileError"); exports.RemoveFileError = RemoveFileError_1.RemoveFileError; -function edit(text) { +function edit(text, fileOptions) { if (text === void 0) { text = ""; } - var editor = new ExternalEditor(text); + var editor = new ExternalEditor(text, fileOptions); editor.run(); editor.cleanup(); return editor.text; } exports.edit = edit; -function editAsync(text, callback) { +function editAsync(text, callback, fileOptions) { if (text === void 0) { text = ""; } - var editor = new ExternalEditor(text); + var editor = new ExternalEditor(text, fileOptions); editor.runAsync(function (err, result) { if (err) { setImmediate(callback, err, null); @@ -47,10 +47,14 @@ function editAsync(text, callback) { } exports.editAsync = editAsync; var ExternalEditor = /** @class */ (function () { - function ExternalEditor(text) { + function ExternalEditor(text, fileOptions) { if (text === void 0) { text = ""; } this.text = ""; + this.fileOptions = {}; this.text = text; + if (fileOptions) { + this.fileOptions = fileOptions; + } this.determineEditor(); this.createTemporaryFile(); } @@ -124,8 +128,12 @@ var ExternalEditor = /** @class */ (function () { }; ExternalEditor.prototype.createTemporaryFile = function () { try { - this.tempFile = tmp_1.tmpNameSync({}); - fs_1.writeFileSync(this.tempFile, this.text, { encoding: "utf8" }); + this.tempFile = tmp_1.tmpNameSync(this.fileOptions); + var opt = { encoding: "utf8" }; + if (this.fileOptions.hasOwnProperty("mode")) { + opt.mode = this.fileOptions.mode; + } + fs_1.writeFileSync(this.tempFile, this.text, opt); } catch (createFileError) { throw new CreateFileError_1.CreateFileError(createFileError); diff --git a/tools/node_modules/eslint/node_modules/external-editor/package.json b/tools/node_modules/eslint/node_modules/external-editor/package.json index c13988c0d393e0..ea87070894f653 100644 --- a/tools/node_modules/eslint/node_modules/external-editor/package.json +++ b/tools/node_modules/eslint/node_modules/external-editor/package.json @@ -26,14 +26,14 @@ "@types/chai": "^4.1.4", "@types/chardet": "^0.5.0", "@types/mocha": "^5.2.5", - "@types/node": "^10.9.4", + "@types/node": "^10.14.12", "@types/tmp": "0.0.33", "chai": "^4.0.0", "es6-shim": "^0.35.3", "mocha": "^5.2.0", "ts-node": "^7.0.1", - "tslint": "^5.11.0", - "typescript": "^3.0.3" + "tslint": "^5.18.0", + "typescript": "^3.5.2" }, "engines": { "node": ">=4" @@ -60,9 +60,8 @@ "scripts": { "compile": "tsc -p tsconfig.json", "lint": "tslint './src/**/*.ts' './test/**/*.ts'", - "test": "npm run lint && npm run unit", - "unit": "mocha --recursive --require ts-node/register --timeout 10000 ./test/spec 'test/spec/**/*.ts'" + "test": "mocha --recursive --require ts-node/register --timeout 10000 ./test/spec 'test/spec/**/*.ts'" }, "types": "main/index.d.ts", - "version": "3.0.3" + "version": "3.1.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/glob-parent/LICENSE b/tools/node_modules/eslint/node_modules/glob-parent/LICENSE index 734076d8affcff..63222d7a8f9f5c 100644 --- a/tools/node_modules/eslint/node_modules/glob-parent/LICENSE +++ b/tools/node_modules/eslint/node_modules/glob-parent/LICENSE @@ -1,6 +1,6 @@ The ISC License -Copyright (c) 2015 Elan Shanker +Copyright (c) 2015, 2019 Elan Shanker Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/tools/node_modules/eslint/node_modules/glob-parent/README.md b/tools/node_modules/eslint/node_modules/glob-parent/README.md index 3bec5c78e49dd7..c7fbe3202264a2 100644 --- a/tools/node_modules/eslint/node_modules/glob-parent/README.md +++ b/tools/node_modules/eslint/node_modules/glob-parent/README.md @@ -1,17 +1,16 @@ -glob-parent [![Build Status](https://travis-ci.org/es128/glob-parent.svg)](https://travis-ci.org/es128/glob-parent) [![Coverage Status](https://img.shields.io/coveralls/es128/glob-parent.svg)](https://coveralls.io/r/es128/glob-parent?branch=master) -====== -Javascript module to extract the non-magic parent path from a glob string. +

+ + + +

-[![NPM](https://nodei.co/npm/glob-parent.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/glob-parent/) -[![NPM](https://nodei.co/npm-dl/glob-parent.png?height=3&months=9)](https://nodei.co/npm-dl/glob-parent/) +# glob-parent -Usage ------ -```sh -npm install glob-parent --save -``` +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Extract the non-magic parent path from a glob string. -**Examples** +## Usage ```js var globParent = require('glob-parent'); @@ -35,12 +34,18 @@ globParent('path/foo/'); // 'path/foo' globParent('path/foo'); // 'path' (see issue #3 for details) ``` +## API + +### `globParent(maybeGlobString)` + +Takes a string and returns the part of the path before the glob begins. Be aware of Escaping rules and Limitations below. + ## Escaping The following characters have special significance in glob patterns and must be escaped if you want them to be treated as regular path characters: -- `?` (question mark) -- `*` (star) +- `?` (question mark) unless used as a path segment alone +- `*` (asterisk) - `|` (pipe) - `(` (opening parenthesis) - `)` (closing parenthesis) @@ -58,7 +63,7 @@ globParent('foo/\\[bar]/') // 'foo/[bar]' ## Limitations -#### Braces & Brackets +### Braces & Brackets This library attempts a quick and imperfect method of determining which path parts have glob magic without fully parsing/lexing the pattern. There are some advanced use cases that can trip it up, such as nested braces where the outer @@ -67,7 +72,7 @@ yourself in the unlikely circumstance of being affected by this or need to ensure higher-fidelity glob handling in your library, it is recommended that you pre-process your input with [expand-braces] and/or [expand-brackets]. -#### Windows +### Windows Backslashes are not valid path separators for globs. If a path with backslashes is provided anyway, for simple cases, glob-parent will replace the path separator for you and return the non-glob parent path (now with @@ -96,14 +101,28 @@ globParent('./foo \\[bar]') // 'foo [bar]' globParent('./foo \\[bar]*') // '.' ``` +## License -Change Log ----------- -[See release notes page on GitHub](https://github.com/es128/glob-parent/releases) - -License -------- -[ISC](https://raw.github.com/es128/glob-parent/master/LICENSE) +ISC [expand-braces]: https://github.com/jonschlinkert/expand-braces [expand-brackets]: https://github.com/jonschlinkert/expand-brackets + +[downloads-image]: https://img.shields.io/npm/dm/glob-parent.svg +[npm-url]: https://www.npmjs.com/package/glob-parent +[npm-image]: https://img.shields.io/npm/v/glob-parent.svg + +[azure-pipelines-url]: https://dev.azure.com/gulpjs/gulp/_build/latest?definitionId=2&branchName=master +[azure-pipelines-image]: https://dev.azure.com/gulpjs/gulp/_apis/build/status/glob-parent?branchName=master + +[travis-url]: https://travis-ci.org/gulpjs/glob-parent +[travis-image]: https://img.shields.io/travis/gulpjs/glob-parent.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/glob-parent +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/glob-parent.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/glob-parent +[coveralls-image]: https://img.shields.io/coveralls/gulpjs/glob-parent/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/tools/node_modules/eslint/node_modules/glob-parent/index.js b/tools/node_modules/eslint/node_modules/glob-parent/index.js index 3a14a539f04754..900d3fbe3bd1af 100644 --- a/tools/node_modules/eslint/node_modules/glob-parent/index.js +++ b/tools/node_modules/eslint/node_modules/glob-parent/index.js @@ -1,24 +1,34 @@ 'use strict'; -var path = require('path'); -var isglob = require('is-glob'); -var pathDirname = require('path-dirname'); +var isGlob = require('is-glob'); +var pathPosixDirname = require('path').posix.dirname; var isWin32 = require('os').platform() === 'win32'; +var slash = '/'; +var backslash = /\\/g; +var enclosure = /[\{\[].*[\/]*.*[\}\]]$/; +var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; +var escaped = /\\([\*\?\|\[\]\(\)\{\}])/g; + module.exports = function globParent(str) { - // flip windows path separators - if (isWin32 && str.indexOf('/') < 0) str = str.split('\\').join('/'); + // flip windows path separators + if (isWin32 && str.indexOf(slash) < 0) { + str = str.replace(backslash, slash); + } - // special case for strings ending in enclosure containing path separator - if (/[\{\[].*[\/]*.*[\}\]]$/.test(str)) str += '/'; + // special case for strings ending in enclosure containing path separator + if (enclosure.test(str)) { + str += slash; + } - // preserves full path in case of trailing path separator - str += 'a'; + // preserves full path in case of trailing path separator + str += 'a'; - // remove path parts that are globby - do {str = pathDirname.posix(str)} - while (isglob(str) || /(^|[^\\])([\{\[]|\([^\)]+$)/.test(str)); + // remove path parts that are globby + do { + str = pathPosixDirname(str); + } while (isGlob(str) || globby.test(str)); - // remove escape chars and return result - return str.replace(/\\([\*\?\|\[\]\(\)\{\}])/g, '$1'); + // remove escape chars and return result + return str.replace(escaped, '$1'); }; diff --git a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/README.md b/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/README.md deleted file mode 100644 index e71dc2ceb9856a..00000000000000 --- a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-glob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-glob) - -> Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-glob -``` - -You might also be interested in [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob). - -## Usage - -```js -var isGlob = require('is-glob'); -``` - -**True** - -Patterns that have glob characters or regex patterns will return `true`: - -```js -isGlob('!foo.js'); -isGlob('*.js'); -isGlob('**/abc.js'); -isGlob('abc/*.js'); -isGlob('abc/(aaa|bbb).js'); -isGlob('abc/[a-z].js'); -isGlob('abc/{a,b}.js'); -isGlob('abc/?.js'); -//=> true -``` - -Extglobs - -```js -isGlob('abc/@(a).js'); -isGlob('abc/!(a).js'); -isGlob('abc/+(a).js'); -isGlob('abc/*(a).js'); -isGlob('abc/?(a).js'); -//=> true -``` - -**False** - -Escaped globs or extglobs return `false`: - -```js -isGlob('abc/\\@(a).js'); -isGlob('abc/\\!(a).js'); -isGlob('abc/\\+(a).js'); -isGlob('abc/\\*(a).js'); -isGlob('abc/\\?(a).js'); -isGlob('\\!foo.js'); -isGlob('\\*.js'); -isGlob('\\*\\*/abc.js'); -isGlob('abc/\\*.js'); -isGlob('abc/\\(aaa|bbb).js'); -isGlob('abc/\\[a-z].js'); -isGlob('abc/\\{a,b}.js'); -isGlob('abc/\\?.js'); -//=> false -``` - -Patterns that do not have glob patterns return `false`: - -```js -isGlob('abc.js'); -isGlob('abc/def/ghi.js'); -isGlob('foo.js'); -isGlob('abc/@.js'); -isGlob('abc/+.js'); -isGlob(); -isGlob(null); -//=> false -``` - -Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)): - -```js -isGlob(['**/*.js']); -isGlob(['foo.js']); -//=> false -``` - -## About - -### Related projects - -* [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble "Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit") -* [base](https://www.npmjs.com/package/base): base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://github.com/node-base/base) | [homepage](https://github.com/node-base/base "base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.") -* [update](https://www.npmjs.com/package/update): Be scalable! Update is a new, open source developer framework and CLI for automating updates… [more](https://github.com/update/update) | [homepage](https://github.com/update/update "Be scalable! Update is a new, open source developer framework and CLI for automating updates of any kind in code projects.") -* [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb "Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor**
| -| --- | --- | -| 40 | [jonschlinkert](https://github.com/jonschlinkert) | -| 1 | [tuvistavie](https://github.com/tuvistavie) | - -### Building docs - -_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ - -To generate the readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install -g verb verb-generate-readme && verb -``` - -### Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -### License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/is-glob/blob/master/LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._ \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/index.js b/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/index.js deleted file mode 100644 index 2ecbe2a74ec48b..00000000000000 --- a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/*! - * is-glob - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - */ - -var isExtglob = require('is-extglob'); - -module.exports = function isGlob(str) { - if (typeof str !== 'string' || str === '') { - return false; - } - - if (isExtglob(str)) return true; - - var regex = /(\\).|([*?]|\[.*\]|\{.*\}|\(.*\|.*\)|^!)/; - var match; - - while ((match = regex.exec(str))) { - if (match[2]) return true; - str = str.slice(match.index + match[0].length); - } - return false; -}; diff --git a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/package.json b/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/package.json deleted file mode 100644 index e871a90c80aea6..00000000000000 --- a/tools/node_modules/eslint/node_modules/glob-parent/node_modules/is-glob/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-glob/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Daniel Perez", - "email": "daniel@claudetech.com", - "url": "http://tuvistavie.com" - }, - { - "name": "Jon Schlinkert", - "email": "jon.schlinkert@sellside.com", - "url": "http://twitter.com/jonschlinkert" - } - ], - "dependencies": { - "is-extglob": "^2.1.0" - }, - "deprecated": false, - "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.", - "devDependencies": { - "gulp-format-md": "^0.1.10", - "mocha": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/is-glob", - "keywords": [ - "bash", - "braces", - "check", - "exec", - "expression", - "extglob", - "glob", - "globbing", - "globstar", - "is", - "match", - "matches", - "pattern", - "regex", - "regular", - "string", - "test" - ], - "license": "MIT", - "main": "index.js", - "name": "is-glob", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-glob.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "layout": "default", - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "assemble", - "base", - "update", - "verb" - ] - }, - "reflinks": [ - "assemble", - "bach", - "base", - "composer", - "gulp", - "has-glob", - "is-valid-glob", - "micromatch", - "npm", - "scaffold", - "verb", - "vinyl" - ] - }, - "version": "3.1.0" -} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/glob-parent/package.json b/tools/node_modules/eslint/node_modules/glob-parent/package.json index fd6efef9308208..f59d1f99f39cda 100644 --- a/tools/node_modules/eslint/node_modules/glob-parent/package.json +++ b/tools/node_modules/eslint/node_modules/glob-parent/package.json @@ -1,27 +1,44 @@ { "author": { - "name": "Elan Shanker", - "url": "https://github.com/es128" + "name": "Gulp Team", + "email": "team@gulpjs.com", + "url": "https://gulpjs.com/" }, "bugs": { - "url": "https://github.com/es128/glob-parent/issues" + "url": "https://github.com/gulpjs/glob-parent/issues" }, "bundleDependencies": false, + "contributors": [ + { + "name": "Elan Shanker", + "url": "https://github.com/es128" + }, + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com" + } + ], "dependencies": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" + "is-glob": "^4.0.1" }, "deprecated": false, - "description": "Strips glob magic from a string to provide the parent directory path", + "description": "Extract the non-magic parent path from a glob string.", "devDependencies": { - "coveralls": "^2.11.2", - "istanbul": "^0.3.5", - "mocha": "^2.1.0" + "coveralls": "github:phated/node-coveralls#2.x", + "eslint": "^2.13.1", + "eslint-config-gulp": "^3.0.1", + "expect": "^1.20.2", + "mocha": "^6.0.2", + "nyc": "^13.3.0" + }, + "engines": { + "node": ">= 6" }, "files": [ + "LICENSE", "index.js" ], - "homepage": "https://github.com/es128/glob-parent", + "homepage": "https://github.com/gulpjs/glob-parent#readme", "keywords": [ "glob", "parent", @@ -37,11 +54,14 @@ "name": "glob-parent", "repository": { "type": "git", - "url": "git+https://github.com/es128/glob-parent.git" + "url": "git+https://github.com/gulpjs/glob-parent.git" }, "scripts": { - "ci-test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls", - "test": "istanbul test node_modules/mocha/bin/_mocha" + "azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit", + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "lint": "eslint .", + "pretest": "npm run lint", + "test": "nyc mocha --async-only" }, - "version": "3.1.0" + "version": "5.0.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/import-fresh/package.json b/tools/node_modules/eslint/node_modules/import-fresh/package.json index 8ccb9f8b4e98e9..73e9316d8999b7 100644 --- a/tools/node_modules/eslint/node_modules/import-fresh/package.json +++ b/tools/node_modules/eslint/node_modules/import-fresh/package.json @@ -17,13 +17,15 @@ "devDependencies": { "ava": "^1.0.1", "heapdump": "^0.3.12", + "tsd": "^0.7.3", "xo": "^0.23.0" }, "engines": { "node": ">=6" }, "files": [ - "index.js" + "index.js", + "index.d.ts" ], "homepage": "https://github.com/sindresorhus/import-fresh#readme", "keywords": [ @@ -43,7 +45,7 @@ }, "scripts": { "heapdump": "node heapdump.js", - "test": "xo && ava" + "test": "xo && ava && tsd" }, - "version": "3.0.0" + "version": "3.1.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/import-fresh/readme.md b/tools/node_modules/eslint/node_modules/import-fresh/readme.md index 29758c91f75da2..f5414b8cf33fdd 100644 --- a/tools/node_modules/eslint/node_modules/import-fresh/readme.md +++ b/tools/node_modules/eslint/node_modules/import-fresh/readme.md @@ -45,6 +45,14 @@ importFresh('./foo')(); - [import-lazy](https://github.com/sindresorhus/import-lazy) - Import modules lazily -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/tools/node_modules/eslint/node_modules/inquirer/README.md b/tools/node_modules/eslint/node_modules/inquirer/README.md index 1f03655f7914dc..70d71e12a11065 100644 --- a/tools/node_modules/eslint/node_modules/inquirer/README.md +++ b/tools/node_modules/eslint/node_modules/inquirer/README.md @@ -442,3 +442,8 @@ An S3 object selector for Inquirer. [**inquirer-autosubmit-prompt**](https://github.com/yaodingyd/inquirer-autosubmit-prompt)
Auto submit based on your current input, saving one extra enter + +[**inquirer-file-tree-selection-prompt**](https://github.com/anc95/inquirer-file-tree-selection)
+Inquirer prompt for to select a file or directory in file tree + +![inquirer-file-tree-selection-prompt](https://github.com/anc95/inquirer-file-tree-selection/blob/master/example/screenshot.gif) \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/input.js b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/input.js index a1f5789d365115..2a090ad159c535 100644 --- a/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/input.js +++ b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/input.js @@ -91,6 +91,8 @@ class InputPrompt extends Base { } onError(state) { + this.rl.line += state.value; + this.rl.cursor += state.value.length; this.render(state.isValid); } diff --git a/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/password.js b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/password.js index dfbd1d46cc57d8..d5343b39e30d6c 100644 --- a/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/password.js +++ b/tools/node_modules/eslint/node_modules/inquirer/lib/prompts/password.js @@ -101,6 +101,11 @@ class PasswordPrompt extends Base { } onKeypress() { + // If user press a key, just clear the default value + if (this.opt.default) { + this.opt.default = undefined; + } + this.render(); } } diff --git a/tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/index.js b/tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/index.js deleted file mode 100644 index 9788c96dfa3b0c..00000000000000 --- a/tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; -const ansiRegex = require('ansi-regex'); - -const stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; - -module.exports = stripAnsi; -module.exports.default = stripAnsi; diff --git a/tools/node_modules/eslint/node_modules/inquirer/package.json b/tools/node_modules/eslint/node_modules/inquirer/package.json index 686c4cea9cc2f9..b0b63fdc1893d3 100644 --- a/tools/node_modules/eslint/node_modules/inquirer/package.json +++ b/tools/node_modules/eslint/node_modules/inquirer/package.json @@ -14,7 +14,7 @@ "cli-width": "^2.0.0", "external-editor": "^3.0.3", "figures": "^2.0.0", - "lodash": "^4.17.11", + "lodash": "^4.17.12", "mute-stream": "0.0.7", "run-async": "^2.2.0", "rxjs": "^6.4.0", @@ -40,7 +40,7 @@ "lib", "README.md" ], - "gitHead": "b951b48e46930b3fe6300b7f42f58d3042579619", + "gitHead": "da5d0e22de84486240b12f52643fbd573f8d0d38", "homepage": "https://github.com/SBoudrias/Inquirer.js#readme", "keywords": [ "command", @@ -63,5 +63,5 @@ "prepublishOnly": "cp ../../README.md .", "test": "nyc mocha test/**/* -r ./test/before" }, - "version": "6.4.1" + "version": "6.5.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/lodash/LICENSE b/tools/node_modules/eslint/node_modules/lodash/LICENSE index c6f2f6145e79b8..77c42f1408a38a 100644 --- a/tools/node_modules/eslint/node_modules/lodash/LICENSE +++ b/tools/node_modules/eslint/node_modules/lodash/LICENSE @@ -1,4 +1,4 @@ -Copyright JS Foundation and other contributors +Copyright OpenJS Foundation and other contributors Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors diff --git a/tools/node_modules/eslint/node_modules/lodash/README.md b/tools/node_modules/eslint/node_modules/lodash/README.md index ba111a5a54ff20..292832fef2ff16 100644 --- a/tools/node_modules/eslint/node_modules/lodash/README.md +++ b/tools/node_modules/eslint/node_modules/lodash/README.md @@ -1,4 +1,4 @@ -# lodash v4.17.11 +# lodash v4.17.15 The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules. @@ -28,12 +28,12 @@ var at = require('lodash/at'); var curryN = require('lodash/fp/curryN'); ``` -See the [package source](https://github.com/lodash/lodash/tree/4.17.11-npm) for more details. +See the [package source](https://github.com/lodash/lodash/tree/4.17.15-npm) for more details. **Note:**
Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL. ## Support -Tested in Chrome 68-69, Firefox 61-62, IE 11, Edge 17, Safari 10-11, Node.js 6-10, & PhantomJS 2.1.1.
+Tested in Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12.
Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. diff --git a/tools/node_modules/eslint/node_modules/lodash/_baseClone.js b/tools/node_modules/eslint/node_modules/lodash/_baseClone.js index 6f73684f2a6084..290de9275def00 100644 --- a/tools/node_modules/eslint/node_modules/lodash/_baseClone.js +++ b/tools/node_modules/eslint/node_modules/lodash/_baseClone.js @@ -140,16 +140,10 @@ function baseClone(value, bitmask, customizer, key, object, stack) { value.forEach(function(subValue) { result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); }); - - return result; - } - - if (isMap(value)) { + } else if (isMap(value)) { value.forEach(function(subValue, key) { result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); - - return result; } var keysFunc = isFull diff --git a/tools/node_modules/eslint/node_modules/lodash/_baseMerge.js b/tools/node_modules/eslint/node_modules/lodash/_baseMerge.js index c5868f04c5ea3d..c98b5eb0b6acc0 100644 --- a/tools/node_modules/eslint/node_modules/lodash/_baseMerge.js +++ b/tools/node_modules/eslint/node_modules/lodash/_baseMerge.js @@ -22,8 +22,8 @@ function baseMerge(object, source, srcIndex, customizer, stack) { return; } baseFor(source, function(srcValue, key) { + stack || (stack = new Stack); if (isObject(srcValue)) { - stack || (stack = new Stack); baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); } else { diff --git a/tools/node_modules/eslint/node_modules/lodash/_createRound.js b/tools/node_modules/eslint/node_modules/lodash/_createRound.js index bf9b713fcb2b79..88be5df396b61c 100644 --- a/tools/node_modules/eslint/node_modules/lodash/_createRound.js +++ b/tools/node_modules/eslint/node_modules/lodash/_createRound.js @@ -1,9 +1,11 @@ -var toInteger = require('./toInteger'), +var root = require('./_root'), + toInteger = require('./toInteger'), toNumber = require('./toNumber'), toString = require('./toString'); /* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; +var nativeIsFinite = root.isFinite, + nativeMin = Math.min; /** * Creates a function like `_.round`. @@ -17,7 +19,7 @@ function createRound(methodName) { return function(number, precision) { number = toNumber(number); precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); - if (precision) { + if (precision && nativeIsFinite(number)) { // Shift with exponential notation to avoid floating-point issues. // See [MDN](https://mdn.io/round#Examples) for more details. var pair = (toString(number) + 'e').split('e'), diff --git a/tools/node_modules/eslint/node_modules/lodash/_safeGet.js b/tools/node_modules/eslint/node_modules/lodash/_safeGet.js index 411b062053fc65..b070897db29cac 100644 --- a/tools/node_modules/eslint/node_modules/lodash/_safeGet.js +++ b/tools/node_modules/eslint/node_modules/lodash/_safeGet.js @@ -1,5 +1,5 @@ /** - * Gets the value at `key`, unless `key` is "__proto__". + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". * * @private * @param {Object} object The object to query. @@ -7,6 +7,10 @@ * @returns {*} Returns the property value. */ function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + if (key == '__proto__') { return; } diff --git a/tools/node_modules/eslint/node_modules/lodash/core.js b/tools/node_modules/eslint/node_modules/lodash/core.js index e333c15b986734..89c77ded06308d 100644 --- a/tools/node_modules/eslint/node_modules/lodash/core.js +++ b/tools/node_modules/eslint/node_modules/lodash/core.js @@ -2,7 +2,7 @@ * @license * Lodash (Custom Build) * Build: `lodash core -o ./dist/lodash.core.js` - * Copyright JS Foundation and other contributors + * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors @@ -13,7 +13,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.17.11'; + var VERSION = '4.17.15'; /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; diff --git a/tools/node_modules/eslint/node_modules/lodash/core.min.js b/tools/node_modules/eslint/node_modules/lodash/core.min.js index bd1e5453f3617b..bb543ff54abc0a 100644 --- a/tools/node_modules/eslint/node_modules/lodash/core.min.js +++ b/tools/node_modules/eslint/node_modules/lodash/core.min.js @@ -25,5 +25,5 @@ return G(2,n)},o.pick=$n,o.slice=function(n,t,r){var e=null==n?0:n.length;return return t(n),n},o.thru=function(n,t){return t(n)},o.toArray=function(n){return M(n)?n.length?A(n):[]:W(n)},o.values=W,o.extend=Bn,Y(o,o),o.clone=function(n){return V(n)?Nn(n)?A(n):k(n,_n(n)):n},o.escape=function(n){return(n=Q(n))&&rn.test(n)?n.replace(tn,fn):n},o.every=function(n,t,r){return t=r?Z:t,f(n,g(t))},o.find=An,o.forEach=z,o.has=function(n,t){return null!=n&&pn.call(n,t)},o.head=q,o.identity=X,o.indexOf=P,o.isArguments=n,o.isArray=Nn,o.isBoolean=function(n){return true===n||false===n||H(n)&&"[object Boolean]"==hn.call(n); },o.isDate=function(n){return H(n)&&"[object Date]"==hn.call(n)},o.isEmpty=function(t){return M(t)&&(Nn(t)||L(t)||U(t.splice)||n(t))?!t.length:!_n(t).length},o.isEqual=function(n,t){return b(n,t)},o.isFinite=function(n){return typeof n=="number"&&gn(n)},o.isFunction=U,o.isNaN=function(n){return K(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=K,o.isObject=V,o.isRegExp=function(n){return H(n)&&"[object RegExp]"==hn.call(n)},o.isString=L,o.isUndefined=function(n){return n===Z},o.last=function(n){ var t=null==n?0:n.length;return t?n[t-1]:Z},o.max=function(n){return n&&n.length?a(n,X,v):Z},o.min=function(n){return n&&n.length?a(n,X,_):Z},o.noConflict=function(){return on._===this&&(on._=vn),this},o.noop=function(){},o.reduce=C,o.result=function(n,t,r){return t=null==n?Z:n[t],t===Z&&(t=r),U(t)?t.call(n):t},o.size=function(n){return null==n?0:(n=M(n)?n:_n(n),n.length)},o.some=function(n,t,r){return t=r?Z:t,E(n,g(t))},o.uniqueId=function(n){var t=++sn;return Q(n)+t},o.each=z,o.first=q,Y(o,function(){ -var n={};return s(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.17.11",mn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:an)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);o.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Nn(u)?u:[],n)}return this[r](function(r){return t.apply(Nn(r)?r:[],n); +var n={};return s(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.17.15",mn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:an)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);o.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Nn(u)?u:[],n)}return this[r](function(r){return t.apply(Nn(r)?r:[],n); })}}),o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=function(){return w(this.__wrapped__,this.__actions__)},typeof define=="function"&&typeof define.amd=="object"&&define.amd?(on._=o, define(function(){return o})):cn?((cn.exports=o)._=o,un._=o):on._=o}).call(this); \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/lodash/debounce.js b/tools/node_modules/eslint/node_modules/lodash/debounce.js index 205e49f342480e..8f751d53d11886 100644 --- a/tools/node_modules/eslint/node_modules/lodash/debounce.js +++ b/tools/node_modules/eslint/node_modules/lodash/debounce.js @@ -173,6 +173,7 @@ function debounce(func, wait, options) { } if (maxing) { // Handle invocations in a tight loop. + clearTimeout(timerId); timerId = setTimeout(timerExpired, wait); return invokeFunc(lastCallTime); } diff --git a/tools/node_modules/eslint/node_modules/lodash/lodash.js b/tools/node_modules/eslint/node_modules/lodash/lodash.js index cb139dd81ebee6..9b95dfefe87f73 100644 --- a/tools/node_modules/eslint/node_modules/lodash/lodash.js +++ b/tools/node_modules/eslint/node_modules/lodash/lodash.js @@ -1,7 +1,7 @@ /** * @license * Lodash - * Copyright JS Foundation and other contributors + * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors @@ -12,7 +12,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.17.11'; + var VERSION = '4.17.15'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; @@ -2671,16 +2671,10 @@ value.forEach(function(subValue) { result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); }); - - return result; - } - - if (isMap(value)) { + } else if (isMap(value)) { value.forEach(function(subValue, key) { result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); - - return result; } var keysFunc = isFull @@ -3604,8 +3598,8 @@ return; } baseFor(source, function(srcValue, key) { + stack || (stack = new Stack); if (isObject(srcValue)) { - stack || (stack = new Stack); baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); } else { @@ -5422,7 +5416,7 @@ return function(number, precision) { number = toNumber(number); precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); - if (precision) { + if (precision && nativeIsFinite(number)) { // Shift with exponential notation to avoid floating-point issues. // See [MDN](https://mdn.io/round#Examples) for more details. var pair = (toString(number) + 'e').split('e'), @@ -6605,7 +6599,7 @@ } /** - * Gets the value at `key`, unless `key` is "__proto__". + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". * * @private * @param {Object} object The object to query. @@ -6613,6 +6607,10 @@ * @returns {*} Returns the property value. */ function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + if (key == '__proto__') { return; } @@ -10413,6 +10411,7 @@ } if (maxing) { // Handle invocations in a tight loop. + clearTimeout(timerId); timerId = setTimeout(timerExpired, wait); return invokeFunc(lastCallTime); } @@ -14799,9 +14798,12 @@ , 'g'); // Use a sourceURL for easier debugging. + // The sourceURL gets injected into the source that's eval-ed, so be careful + // with lookup (in case of e.g. prototype pollution), and strip newlines if any. + // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection. var sourceURL = '//# sourceURL=' + - ('sourceURL' in options - ? options.sourceURL + (hasOwnProperty.call(options, 'sourceURL') + ? (options.sourceURL + '').replace(/[\r\n]/g, ' ') : ('lodash.templateSources[' + (++templateCounter) + ']') ) + '\n'; @@ -14834,7 +14836,9 @@ // If `variable` is not specified wrap a with-statement around the generated // code to add the data object to the top of the scope chain. - var variable = options.variable; + // Like with sourceURL, we take care to not check the option's prototype, + // as this configuration is a code injection vector. + var variable = hasOwnProperty.call(options, 'variable') && options.variable; if (!variable) { source = 'with (obj) {\n' + source + '\n}\n'; } @@ -17039,10 +17043,11 @@ baseForOwn(LazyWrapper.prototype, function(func, methodName) { var lodashFunc = lodash[methodName]; if (lodashFunc) { - var key = (lodashFunc.name + ''), - names = realNames[key] || (realNames[key] = []); - - names.push({ 'name': methodName, 'func': lodashFunc }); + var key = lodashFunc.name + ''; + if (!hasOwnProperty.call(realNames, key)) { + realNames[key] = []; + } + realNames[key].push({ 'name': methodName, 'func': lodashFunc }); } }); diff --git a/tools/node_modules/eslint/node_modules/lodash/lodash.min.js b/tools/node_modules/eslint/node_modules/lodash/lodash.min.js index c911263442db41..13ec307dac5a6f 100644 --- a/tools/node_modules/eslint/node_modules/lodash/lodash.min.js +++ b/tools/node_modules/eslint/node_modules/lodash/lodash.min.js @@ -6,132 +6,132 @@ return true}function i(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r"']/g,G=RegExp(V.source),H=RegExp(K.source),J=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nn=/^\w*$/,tn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rn=/[\\^$.*+?()[\]{}|]/g,en=RegExp(rn.source),un=/^\s+|\s+$/g,on=/^\s+/,fn=/\s+$/,cn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,an=/\{\n\/\* \[wrapped with (.+)\] \*/,ln=/,? & /,sn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hn=/\\(\\)?/g,pn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_n=/\w*$/,vn=/^[-+]0x[0-9a-f]+$/i,gn=/^0b[01]+$/i,dn=/^\[object .+?Constructor\]$/,yn=/^0o[0-7]+$/i,bn=/^(?:0|[1-9]\d*)$/,xn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,jn=/($^)/,wn=/['\n\r\u2028\u2029\\]/g,mn="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",An="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+mn,kn="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",En=RegExp("['\u2019]","g"),Sn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),On=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+kn+mn,"g"),In=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",An].join("|"),"g"),Rn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),zn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wn="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Un={}; -Un["[object Float32Array]"]=Un["[object Float64Array]"]=Un["[object Int8Array]"]=Un["[object Int16Array]"]=Un["[object Int32Array]"]=Un["[object Uint8Array]"]=Un["[object Uint8ClampedArray]"]=Un["[object Uint16Array]"]=Un["[object Uint32Array]"]=true,Un["[object Arguments]"]=Un["[object Array]"]=Un["[object ArrayBuffer]"]=Un["[object Boolean]"]=Un["[object DataView]"]=Un["[object Date]"]=Un["[object Error]"]=Un["[object Function]"]=Un["[object Map]"]=Un["[object Number]"]=Un["[object Object]"]=Un["[object RegExp]"]=Un["[object Set]"]=Un["[object String]"]=Un["[object WeakMap]"]=false; -var Bn={};Bn["[object Arguments]"]=Bn["[object Array]"]=Bn["[object ArrayBuffer]"]=Bn["[object DataView]"]=Bn["[object Boolean]"]=Bn["[object Date]"]=Bn["[object Float32Array]"]=Bn["[object Float64Array]"]=Bn["[object Int8Array]"]=Bn["[object Int16Array]"]=Bn["[object Int32Array]"]=Bn["[object Map]"]=Bn["[object Number]"]=Bn["[object Object]"]=Bn["[object RegExp]"]=Bn["[object Set]"]=Bn["[object String]"]=Bn["[object Symbol]"]=Bn["[object Uint8Array]"]=Bn["[object Uint8ClampedArray]"]=Bn["[object Uint16Array]"]=Bn["[object Uint32Array]"]=true, -Bn["[object Error]"]=Bn["[object Function]"]=Bn["[object WeakMap]"]=false;var Ln={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Cn=parseFloat,Dn=parseInt,Mn=typeof global=="object"&&global&&global.Object===Object&&global,Tn=typeof self=="object"&&self&&self.Object===Object&&self,$n=Mn||Tn||Function("return this")(),Fn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Nn=Fn&&typeof module=="object"&&module&&!module.nodeType&&module,Pn=Nn&&Nn.exports===Fn,Zn=Pn&&Mn.process,qn=function(){ -try{var n=Nn&&Nn.require&&Nn.require("util").types;return n?n:Zn&&Zn.binding&&Zn.binding("util")}catch(n){}}(),Vn=qn&&qn.isArrayBuffer,Kn=qn&&qn.isDate,Gn=qn&&qn.isMap,Hn=qn&&qn.isRegExp,Jn=qn&&qn.isSet,Yn=qn&&qn.isTypedArray,Qn=b("length"),Xn=x({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e", -"\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a", -"\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I", -"\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r", -"\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ", -"\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),nt=x({"&":"&","<":"<",">":">",'"':""","'":"'"}),tt=x({"&":"&","<":"<",">":">",""":'"',"'":"'"}),rt=function x(mn){function An(n){if(yu(n)&&!ff(n)&&!(n instanceof Ln)){if(n instanceof On)return n;if(oi.call(n,"__wrapped__"))return Fe(n)}return new On(n)}function kn(){}function On(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=T}function Ln(n){ -this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Mn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function _t(n,t,e,u,i,o){var f,c=1&t,a=2&t,l=4&t;if(e&&(f=i?e(n,u,i,o):e(n)),f!==T)return f;if(!du(n))return n;if(u=ff(n)){if(f=me(n),!c)return Lr(n,f)}else{var s=vo(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(af(n))return Ir(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:Ae(n),!c)return a?Mr(n,lt(f,n)):Dr(n,at(f,n))}else{if(!Bn[s])return i?n:{};f=ke(n,s,c)}}if(o||(o=new Zn), -i=o.get(n))return i;if(o.set(n,f),pf(n))return n.forEach(function(r){f.add(_t(r,t,e,r,n,o))}),f;if(sf(n))return n.forEach(function(r,u){f.set(u,_t(r,t,e,u,n,o))}),f;var a=l?a?ve:_e:a?Uu:Wu,p=u?T:a(n);return r(p||n,function(r,u){p&&(u=r,r=n[u]),ot(f,u,_t(r,t,e,u,n,o))}),f}function vt(n){var t=Wu(n);return function(r){return gt(r,n,t)}}function gt(n,t,r){var e=r.length;if(null==n)return!e;for(n=Qu(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===T&&!(u in n)||!i(o))return false}return true}function dt(n,t,r){if(typeof n!="function")throw new ti("Expected a function"); -return bo(function(){n.apply(T,r)},t)}function yt(n,t,r,e){var u=-1,i=o,a=true,l=n.length,s=[],h=t.length;if(!l)return s;r&&(t=c(t,E(r))),e?(i=f,a=false):200<=t.length&&(i=O,a=false,t=new Nn(t));n:for(;++ut}function Rt(n,t){return null!=n&&oi.call(n,t)}function zt(n,t){return null!=n&&t in Qu(n)}function Wt(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=Ku(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,E(t))),s=Ci(p.length,s), -l[a]=!r&&(t||120<=u&&120<=p.length)?new Nn(a&&p):T}var p=n[0],_=-1,v=l[0];n:for(;++_r.length?t:Et(t,hr(r,0,-1)),r=null==t?t:t[Me(Ve(r))],null==r?T:n(r,t,e)}function Lt(n){return yu(n)&&"[object Arguments]"==Ot(n)}function Ct(n){ -return yu(n)&&"[object ArrayBuffer]"==Ot(n)}function Dt(n){return yu(n)&&"[object Date]"==Ot(n)}function Mt(n,t,r,e,u){if(n===t)return true;if(null==n||null==t||!yu(n)&&!yu(t))return n!==n&&t!==t;n:{var i=ff(n),o=ff(t),f=i?"[object Array]":vo(n),c=o?"[object Array]":vo(t),f="[object Arguments]"==f?"[object Object]":f,c="[object Arguments]"==c?"[object Object]":c,a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&af(n)){if(!af(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Zn),t=i||_f(n)?se(n,t,r,e,Mt,u):he(n,t,f,r,e,Mt,u);else{ +}function A(n,t){for(var r=-1,e=Array(n);++r"']/g,G=RegExp(V.source),H=RegExp(K.source),J=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nn=/^\w*$/,tn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rn=/[\\^$.*+?()[\]{}|]/g,en=RegExp(rn.source),un=/^\s+|\s+$/g,on=/^\s+/,fn=/\s+$/,cn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,an=/\{\n\/\* \[wrapped with (.+)\] \*/,ln=/,? & /,sn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hn=/\\(\\)?/g,pn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_n=/\w*$/,vn=/^[-+]0x[0-9a-f]+$/i,gn=/^0b[01]+$/i,dn=/^\[object .+?Constructor\]$/,yn=/^0o[0-7]+$/i,bn=/^(?:0|[1-9]\d*)$/,xn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,jn=/($^)/,wn=/['\n\r\u2028\u2029\\]/g,mn="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",An="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+mn,En="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",kn=RegExp("['\u2019]","g"),Sn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),On=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+En+mn,"g"),In=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",An].join("|"),"g"),Rn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),zn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wn="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Bn={}; +Bn["[object Float32Array]"]=Bn["[object Float64Array]"]=Bn["[object Int8Array]"]=Bn["[object Int16Array]"]=Bn["[object Int32Array]"]=Bn["[object Uint8Array]"]=Bn["[object Uint8ClampedArray]"]=Bn["[object Uint16Array]"]=Bn["[object Uint32Array]"]=true,Bn["[object Arguments]"]=Bn["[object Array]"]=Bn["[object ArrayBuffer]"]=Bn["[object Boolean]"]=Bn["[object DataView]"]=Bn["[object Date]"]=Bn["[object Error]"]=Bn["[object Function]"]=Bn["[object Map]"]=Bn["[object Number]"]=Bn["[object Object]"]=Bn["[object RegExp]"]=Bn["[object Set]"]=Bn["[object String]"]=Bn["[object WeakMap]"]=false; +var Ln={};Ln["[object Arguments]"]=Ln["[object Array]"]=Ln["[object ArrayBuffer]"]=Ln["[object DataView]"]=Ln["[object Boolean]"]=Ln["[object Date]"]=Ln["[object Float32Array]"]=Ln["[object Float64Array]"]=Ln["[object Int8Array]"]=Ln["[object Int16Array]"]=Ln["[object Int32Array]"]=Ln["[object Map]"]=Ln["[object Number]"]=Ln["[object Object]"]=Ln["[object RegExp]"]=Ln["[object Set]"]=Ln["[object String]"]=Ln["[object Symbol]"]=Ln["[object Uint8Array]"]=Ln["[object Uint8ClampedArray]"]=Ln["[object Uint16Array]"]=Ln["[object Uint32Array]"]=true, +Ln["[object Error]"]=Ln["[object Function]"]=Ln["[object WeakMap]"]=false;var Un={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Cn=parseFloat,Dn=parseInt,Mn=typeof global=="object"&&global&&global.Object===Object&&global,Tn=typeof self=="object"&&self&&self.Object===Object&&self,$n=Mn||Tn||Function("return this")(),Fn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Nn=Fn&&typeof module=="object"&&module&&!module.nodeType&&module,Pn=Nn&&Nn.exports===Fn,Zn=Pn&&Mn.process,qn=function(){ +try{var n=Nn&&Nn.f&&Nn.f("util").types;return n?n:Zn&&Zn.binding&&Zn.binding("util")}catch(n){}}(),Vn=qn&&qn.isArrayBuffer,Kn=qn&&qn.isDate,Gn=qn&&qn.isMap,Hn=qn&&qn.isRegExp,Jn=qn&&qn.isSet,Yn=qn&&qn.isTypedArray,Qn=b("length"),Xn=x({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I", +"\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C", +"\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i", +"\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r", +"\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij", +"\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),nt=x({"&":"&","<":"<",">":">",'"':""","'":"'"}),tt=x({"&":"&","<":"<",">":">",""":'"',"'":"'"}),rt=function x(mn){function An(n){if(yu(n)&&!ff(n)&&!(n instanceof Un)){if(n instanceof On)return n;if(oi.call(n,"__wrapped__"))return Fe(n)}return new On(n)}function En(){}function On(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=T}function Un(n){this.__wrapped__=n, +this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Mn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function _t(n,t,e,u,i,o){var f,c=1&t,a=2&t,l=4&t;if(e&&(f=i?e(n,u,i,o):e(n)),f!==T)return f;if(!du(n))return n;if(u=ff(n)){if(f=me(n),!c)return Ur(n,f)}else{var s=vo(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(af(n))return Ir(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:Ae(n),!c)return a?Mr(n,lt(f,n)):Dr(n,at(f,n))}else{if(!Ln[s])return i?n:{};f=Ee(n,s,c)}}if(o||(o=new Zn), +i=o.get(n))return i;o.set(n,f),pf(n)?n.forEach(function(r){f.add(_t(r,t,e,r,n,o))}):sf(n)&&n.forEach(function(r,u){f.set(u,_t(r,t,e,u,n,o))});var a=l?a?ve:_e:a?Bu:Wu,p=u?T:a(n);return r(p||n,function(r,u){p&&(u=r,r=n[u]),ot(f,u,_t(r,t,e,u,n,o))}),f}function vt(n){var t=Wu(n);return function(r){return gt(r,n,t)}}function gt(n,t,r){var e=r.length;if(null==n)return!e;for(n=Qu(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===T&&!(u in n)||!i(o))return false}return true}function dt(n,t,r){if(typeof n!="function")throw new ti("Expected a function"); +return bo(function(){n.apply(T,r)},t)}function yt(n,t,r,e){var u=-1,i=o,a=true,l=n.length,s=[],h=t.length;if(!l)return s;r&&(t=c(t,k(r))),e?(i=f,a=false):200<=t.length&&(i=O,a=false,t=new Nn(t));n:for(;++ut}function Rt(n,t){return null!=n&&oi.call(n,t)}function zt(n,t){return null!=n&&t in Qu(n)}function Wt(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=Ku(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,k(t))),s=Ci(p.length,s), +l[a]=!r&&(t||120<=u&&120<=p.length)?new Nn(a&&p):T}var p=n[0],_=-1,v=l[0];n:for(;++_r.length?t:kt(t,hr(r,0,-1)),r=null==t?t:t[Me(Ve(r))],null==r?T:n(r,t,e)}function Ut(n){return yu(n)&&"[object Arguments]"==Ot(n)}function Ct(n){ +return yu(n)&&"[object ArrayBuffer]"==Ot(n)}function Dt(n){return yu(n)&&"[object Date]"==Ot(n)}function Mt(n,t,r,e,u){if(n===t)t=true;else if(null==n||null==t||!yu(n)&&!yu(t))t=n!==n&&t!==t;else n:{var i=ff(n),o=ff(t),f=i?"[object Array]":vo(n),c=o?"[object Array]":vo(t),f="[object Arguments]"==f?"[object Object]":f,c="[object Arguments]"==c?"[object Object]":c,a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&af(n)){if(!af(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Zn),t=i||_f(n)?se(n,t,r,e,Mt,u):he(n,t,f,r,e,Mt,u);else{ if(!(1&r)&&(i=a&&oi.call(n,"__wrapped__"),f=o&&oi.call(t,"__wrapped__"),i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Zn),t=Mt(n,t,r,e,u);break n}if(c)t:if(u||(u=new Zn),i=1&r,f=_e(n),o=f.length,c=_e(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:oi.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++at?r:0,Se(t,r)?n[t]:T}function Xt(n,t,r){var e=-1;return t=c(t.length?t:[$u],E(ye())),n=Gt(n,function(n,r,u){return{a:c(t,function(t){return t(n)}), -b:++e,c:n}}),w(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e=f){e=c;break n}e=c*("desc"==r[e]?-1:1);break n}}e=n.b-t.b}return e})}function nr(n,t){return tr(n,t,function(t,r){return zu(n,r)})}function tr(n,t,r){for(var e=-1,u=t.length,i={};++et||9007199254740991t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Ku(u);++e=u){for(;e>>1,o=n[i];null!==o&&!wu(o)&&(r?o<=t:ot.length?n:Et(n,hr(t,0,-1)),null==n||delete n[Me(Ve(t))]}function jr(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++ie)return e?br(n[0]):[];for(var u=-1,i=Ku(e);++u=e?n:hr(n,t,r)}function Ir(n,t){if(t)return n.slice();var r=n.length,r=gi?gi(r):new n.constructor(r);return n.copy(r),r}function Rr(n){var t=new n.constructor(n.byteLength);return new vi(t).set(new vi(n)),t}function zr(n,t){return new n.constructor(t?Rr(n.buffer):n.buffer,n.byteOffset,n.length); -}function Wr(n,t){if(n!==t){var r=n!==T,e=null===n,u=n===n,i=wu(n),o=t!==T,f=null===t,c=t===t,a=wu(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&nu?T:i,u=1),t=Qu(t);++eo&&f[0]!==a&&f[o-1]!==a?[]:B(f,a),o-=c.length,or?r?or(t,n):t:(r=or(t,Oi(n/D(t))),Rn.test(t)?Or(M(r),0,n).join(""):r.slice(0,n))}function te(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=Ku(l+c),h=this&&this!==$n&&this instanceof i?f:t;++at||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Ur(e,r,h[4]):r,i[4]=e?B(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Br(e,r,h[6]):r,i[6]=e?B(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Ci(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0],t=i[1], -r=i[2],e=i[3],u=i[4],f=i[9]=i[9]===T?c?0:n.length:Li(i[9]-a,0),!f&&24&t&&(t&=-25),c=t&&1!=t?8==t||16==t?Kr(n,t,f):32!=t&&33!=t||u.length?Jr.apply(T,i):te(n,t,r,e):Pr(n,t,r),Le((h?co:yo)(c,i),n,t)}function ce(n,t,r,e){return n===T||lu(n,ei[r])&&!oi.call(e,r)?t:n}function ae(n,t,r,e,u,i){return du(n)&&du(t)&&(i.set(t,n),Yt(n,t,T,ae,i),i.delete(t)),n}function le(n){return xu(n)?T:n}function se(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t; +}else{if(f=new Zn,e)var s=e(a,l,c,n,t,f);if(s===T?!Mt(l,a,3,e,f):!s)return false}}return true}function Ft(n){return!(!du(n)||ci&&ci in n)&&(_u(n)?hi:dn).test(Te(n))}function Nt(n){return yu(n)&&"[object RegExp]"==Ot(n)}function Pt(n){return yu(n)&&"[object Set]"==vo(n)}function Zt(n){return yu(n)&&gu(n.length)&&!!Bn[Ot(n)]}function qt(n){return typeof n=="function"?n:null==n?$u:typeof n=="object"?ff(n)?Jt(n[0],n[1]):Ht(n):Zu(n)}function Vt(n){if(!ze(n))return Li(n);var t,r=[];for(t in Qu(n))oi.call(n,t)&&"constructor"!=t&&r.push(t); +return r}function Kt(n,t){return nt?r:0,Se(t,r)?n[t]:T}function Xt(n,t,r){var e=-1;return t=c(t.length?t:[$u],k(ye())),n=Gt(n,function(n){return{ +a:c(t,function(t){return t(n)}),b:++e,c:n}}),w(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e=f?c:c*("desc"==r[e]?-1:1);break n}}e=n.b-t.b}return e})}function nr(n,t){return tr(n,t,function(t,r){return zu(n,r)})}function tr(n,t,r){for(var e=-1,u=t.length,i={};++et||9007199254740991t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Ku(u);++e=u){for(;e>>1,o=n[i];null!==o&&!wu(o)&&(r?o<=t:ot.length?n:kt(n,hr(t,0,-1)),null==n||delete n[Me(Ve(t))]}function jr(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++ie)return e?br(n[0]):[];for(var u=-1,i=Ku(e);++u=e?n:hr(n,t,r)}function Ir(n,t){if(t)return n.slice();var r=n.length,r=gi?gi(r):new n.constructor(r);return n.copy(r),r}function Rr(n){var t=new n.constructor(n.byteLength);return new vi(t).set(new vi(n)), +t}function zr(n,t){return new n.constructor(t?Rr(n.buffer):n.buffer,n.byteOffset,n.length)}function Wr(n,t){if(n!==t){var r=n!==T,e=null===n,u=n===n,i=wu(n),o=t!==T,f=null===t,c=t===t,a=wu(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&nu?T:i,u=1),t=Qu(t);++eo&&f[0]!==a&&f[o-1]!==a?[]:L(f,a), +o-=c.length,or?r?or(t,n):t:(r=or(t,Oi(n/D(t))),Rn.test(t)?Or(M(r),0,n).join(""):r.slice(0,n))}function te(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=Ku(l+c),h=this&&this!==$n&&this instanceof i?f:t;++at||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Br(e,r,h[4]):r,i[4]=e?L(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Lr(e,r,h[6]):r,i[6]=e?L(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Ci(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0], +t=i[1],r=i[2],e=i[3],u=i[4],f=i[9]=i[9]===T?c?0:n.length:Ui(i[9]-a,0),!f&&24&t&&(t&=-25),Ue((h?co:yo)(t&&1!=t?8==t||16==t?Kr(n,t,f):32!=t&&33!=t||u.length?Jr.apply(T,i):te(n,t,r,e):Pr(n,t,r),i),n,t)}function ce(n,t,r,e){return n===T||lu(n,ei[r])&&!oi.call(e,r)?t:n}function ae(n,t,r,e,u,i){return du(n)&&du(t)&&(i.set(t,n),Yt(n,t,T,ae,i),i.delete(t)),n}function le(n){return xu(n)?T:n}function se(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t; var c=-1,a=true,l=2&r?new Nn:T;for(i.set(n,t),i.set(t,n);++cr&&(r=Li(e+r,0)),_(n,ye(t,3),r)):-1}function Pe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==T&&(u=ku(r),u=0>r?Li(e+u,0):Ci(u,e-1)),_(n,ye(t,3),u,true)}function Ze(n){return(null==n?0:n.length)?wt(n,1):[]; -}function qe(n){return n&&n.length?n[0]:T}function Ve(n){var t=null==n?0:n.length;return t?n[t-1]:T}function Ke(n,t){return n&&n.length&&t&&t.length?er(n,t):n}function Ge(n){return null==n?n:$i.call(n)}function He(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){if(hu(n))return t=Li(n.length,t),true}),A(t,function(t){return c(n,b(t))})}function Je(t,r){if(!t||!t.length)return[];var e=He(t);return null==r?e:c(e,function(t){return n(r,T,t)})}function Ye(n){return n=An(n),n.__chain__=true,n; -}function Qe(n,t){return t(n)}function Xe(){return this}function nu(n,t){return(ff(n)?r:uo)(n,ye(t,3))}function tu(n,t){return(ff(n)?e:io)(n,ye(t,3))}function ru(n,t){return(ff(n)?c:Gt)(n,ye(t,3))}function eu(n,t,r){return t=r?T:t,t=n&&null==t?n.length:t,fe(n,128,T,T,T,T,t)}function uu(n,t){var r;if(typeof t!="function")throw new ti("Expected a function");return n=ku(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=T),r}}function iu(n,t,r){return t=r?T:t,n=fe(n,8,T,T,T,T,T,t),n.placeholder=iu.placeholder, -n}function ou(n,t,r){return t=r?T:t,n=fe(n,16,T,T,T,T,T,t),n.placeholder=ou.placeholder,n}function fu(n,t,r){function e(t){var r=c,e=a;return c=a=T,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===T||r>=t||0>r||g&&n>=l}function i(){var n=Go();if(u(n))return o(n);var r,e=bo;r=n-_,n=t-(n-p),r=g?Ci(n,l-r):n,h=e(i,r)}function o(n){return h=T,d&&c?e(n):(c=a=T,s)}function f(){var n=Go(),r=u(n);if(c=arguments,a=this,p=n,r){if(h===T)return _=n=p,h=bo(i,t),v?e(n):s;if(g)return h=bo(i,t),e(p)}return h===T&&(h=bo(i,t)), -s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new ti("Expected a function");return t=Su(t)||0,du(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Li(Su(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==T&&lo(h),_=0,c=p=a=h=T},f.flush=function(){return h===T?s:o(Go())},f}function cu(n,t){if(typeof n!="function"||null!=t&&typeof t!="function")throw new ti("Expected a function");var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;return i.has(u)?i.get(u):(e=n.apply(this,e), -r.cache=i.set(u,e)||i,e)};return r.cache=new(cu.Cache||Fn),r}function au(n){if(typeof n!="function")throw new ti("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function lu(n,t){return n===t||n!==n&&t!==t}function su(n){return null!=n&&gu(n.length)&&!_u(n)}function hu(n){return yu(n)&&su(n)}function pu(n){if(!yu(n))return false; -var t=Ot(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!xu(n)}function _u(n){return!!du(n)&&(n=Ot(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function vu(n){return typeof n=="number"&&n==ku(n)}function gu(n){return typeof n=="number"&&-1=n}function du(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function yu(n){return null!=n&&typeof n=="object"; -}function bu(n){return typeof n=="number"||yu(n)&&"[object Number]"==Ot(n)}function xu(n){return!(!yu(n)||"[object Object]"!=Ot(n))&&(n=di(n),null===n||(n=oi.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&ii.call(n)==li))}function ju(n){return typeof n=="string"||!ff(n)&&yu(n)&&"[object String]"==Ot(n)}function wu(n){return typeof n=="symbol"||yu(n)&&"[object Symbol]"==Ot(n)}function mu(n){if(!n)return[];if(su(n))return ju(n)?M(n):Lr(n);if(wi&&n[wi]){n=n[wi]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value); -return r}return t=vo(n),("[object Map]"==t?W:"[object Set]"==t?L:Lu)(n)}function Au(n){return n?(n=Su(n),n===$||n===-$?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function ku(n){n=Au(n);var t=n%1;return n===n?t?n-t:n:0}function Eu(n){return n?pt(ku(n),0,4294967295):0}function Su(n){if(typeof n=="number")return n;if(wu(n))return F;if(du(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n,n=du(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(un,"");var t=gn.test(n);return t||yn.test(n)?Dn(n.slice(2),t?2:8):vn.test(n)?F:+n; -}function Ou(n){return Cr(n,Uu(n))}function Iu(n){return null==n?"":yr(n)}function Ru(n,t,r){return n=null==n?T:Et(n,t),n===T?r:n}function zu(n,t){return null!=n&&we(n,t,zt)}function Wu(n){return su(n)?qn(n):Vt(n)}function Uu(n){if(su(n))n=qn(n,true);else if(du(n)){var t,r=ze(n),e=[];for(t in n)("constructor"!=t||!r&&oi.call(n,t))&&e.push(t);n=e}else{if(t=[],null!=n)for(r in Qu(n))t.push(r);n=t}return n}function Bu(n,t){if(null==n)return{};var r=c(ve(n),function(n){return[n]});return t=ye(t),tr(n,r,function(n,r){ -return t(n,r[0])})}function Lu(n){return null==n?[]:S(n,Wu(n))}function Cu(n){return $f(Iu(n).toLowerCase())}function Du(n){return(n=Iu(n))&&n.replace(xn,Xn).replace(Sn,"")}function Mu(n,t,r){return n=Iu(n),t=r?T:t,t===T?zn.test(n)?n.match(In)||[]:n.match(sn)||[]:n.match(t)||[]}function Tu(n){return function(){return n}}function $u(n){return n}function Fu(n){return qt(typeof n=="function"?n:_t(n,1))}function Nu(n,t,e){var u=Wu(t),i=kt(t,u);null!=e||du(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=kt(t,Wu(t))); -var o=!(du(e)&&"chain"in e&&!e.chain),f=_u(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Lr(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function Pu(){}function Zu(n){return Ie(n)?b(Me(n)):rr(n)}function qu(){return[]}function Vu(){return false}mn=null==mn?$n:rt.defaults($n.Object(),mn,rt.pick($n,Wn));var Ku=mn.Array,Gu=mn.Date,Hu=mn.Error,Ju=mn.Function,Yu=mn.Math,Qu=mn.Object,Xu=mn.RegExp,ni=mn.String,ti=mn.TypeError,ri=Ku.prototype,ei=Qu.prototype,ui=mn["__core-js_shared__"],ii=Ju.prototype.toString,oi=ei.hasOwnProperty,fi=0,ci=function(){ -var n=/[^.]+$/.exec(ui&&ui.keys&&ui.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),ai=ei.toString,li=ii.call(Qu),si=$n._,hi=Xu("^"+ii.call(oi).replace(rn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pi=Pn?mn.Buffer:T,_i=mn.Symbol,vi=mn.Uint8Array,gi=pi?pi.allocUnsafe:T,di=U(Qu.getPrototypeOf,Qu),yi=Qu.create,bi=ei.propertyIsEnumerable,xi=ri.splice,ji=_i?_i.isConcatSpreadable:T,wi=_i?_i.iterator:T,mi=_i?_i.toStringTag:T,Ai=function(){try{var n=je(Qu,"defineProperty"); -return n({},"",{}),n}catch(n){}}(),ki=mn.clearTimeout!==$n.clearTimeout&&mn.clearTimeout,Ei=Gu&&Gu.now!==$n.Date.now&&Gu.now,Si=mn.setTimeout!==$n.setTimeout&&mn.setTimeout,Oi=Yu.ceil,Ii=Yu.floor,Ri=Qu.getOwnPropertySymbols,zi=pi?pi.isBuffer:T,Wi=mn.isFinite,Ui=ri.join,Bi=U(Qu.keys,Qu),Li=Yu.max,Ci=Yu.min,Di=Gu.now,Mi=mn.parseInt,Ti=Yu.random,$i=ri.reverse,Fi=je(mn,"DataView"),Ni=je(mn,"Map"),Pi=je(mn,"Promise"),Zi=je(mn,"Set"),qi=je(mn,"WeakMap"),Vi=je(Qu,"create"),Ki=qi&&new qi,Gi={},Hi=Te(Fi),Ji=Te(Ni),Yi=Te(Pi),Qi=Te(Zi),Xi=Te(qi),no=_i?_i.prototype:T,to=no?no.valueOf:T,ro=no?no.toString:T,eo=function(){ -function n(){}return function(t){return du(t)?yi?yi(t):(n.prototype=t,t=new n,n.prototype=T,t):{}}}();An.templateSettings={escape:J,evaluate:Y,interpolate:Q,variable:"",imports:{_:An}},An.prototype=kn.prototype,An.prototype.constructor=An,On.prototype=eo(kn.prototype),On.prototype.constructor=On,Ln.prototype=eo(kn.prototype),Ln.prototype.constructor=Ln,Mn.prototype.clear=function(){this.__data__=Vi?Vi(null):{},this.size=0},Mn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n], +return typeof n.constructor!="function"||ze(n)?{}:eo(di(n))}function Ee(n,t,r){var e=n.constructor;switch(t){case"[object ArrayBuffer]":return Rr(n);case"[object Boolean]":case"[object Date]":return new e(+n);case"[object DataView]":return t=r?Rr(n.buffer):n.buffer,new n.constructor(t,n.byteOffset,n.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]": +case"[object Uint16Array]":case"[object Uint32Array]":return zr(n,r);case"[object Map]":return new e;case"[object Number]":case"[object String]":return new e(n);case"[object RegExp]":return t=new n.constructor(n.source,_n.exec(n)),t.lastIndex=n.lastIndex,t;case"[object Set]":return new e;case"[object Symbol]":return to?Qu(to.call(n)):{}}}function ke(n){return ff(n)||of(n)||!!(ji&&n&&n[ji])}function Se(n,t){var r=typeof n;return t=null==t?9007199254740991:t,!!t&&("number"==r||"symbol"!=r&&bn.test(n))&&-1r&&(r=Ui(e+r,0)),_(n,ye(t,3),r)):-1}function Pe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==T&&(u=Eu(r),u=0>r?Ui(e+u,0):Ci(u,e-1)), +_(n,ye(t,3),u,true)}function Ze(n){return(null==n?0:n.length)?wt(n,1):[]}function qe(n){return n&&n.length?n[0]:T}function Ve(n){var t=null==n?0:n.length;return t?n[t-1]:T}function Ke(n,t){return n&&n.length&&t&&t.length?er(n,t):n}function Ge(n){return null==n?n:$i.call(n)}function He(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){if(hu(n))return t=Ui(n.length,t),true}),A(t,function(t){return c(n,b(t))})}function Je(t,r){if(!t||!t.length)return[];var e=He(t);return null==r?e:c(e,function(t){ +return n(r,T,t)})}function Ye(n){return n=An(n),n.__chain__=true,n}function Qe(n,t){return t(n)}function Xe(){return this}function nu(n,t){return(ff(n)?r:uo)(n,ye(t,3))}function tu(n,t){return(ff(n)?e:io)(n,ye(t,3))}function ru(n,t){return(ff(n)?c:Gt)(n,ye(t,3))}function eu(n,t,r){return t=r?T:t,t=n&&null==t?n.length:t,fe(n,128,T,T,T,T,t)}function uu(n,t){var r;if(typeof t!="function")throw new ti("Expected a function");return n=Eu(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=T), +r}}function iu(n,t,r){return t=r?T:t,n=fe(n,8,T,T,T,T,T,t),n.placeholder=iu.placeholder,n}function ou(n,t,r){return t=r?T:t,n=fe(n,16,T,T,T,T,T,t),n.placeholder=ou.placeholder,n}function fu(n,t,r){function e(t){var r=c,e=a;return c=a=T,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===T||r>=t||0>r||g&&n>=l}function i(){var n=Go();if(u(n))return o(n);var r,e=bo;r=n-_,n=t-(n-p),r=g?Ci(n,l-r):n,h=e(i,r)}function o(n){return h=T,d&&c?e(n):(c=a=T,s)}function f(){var n=Go(),r=u(n);if(c=arguments, +a=this,p=n,r){if(h===T)return _=n=p,h=bo(i,t),v?e(n):s;if(g)return lo(h),h=bo(i,t),e(p)}return h===T&&(h=bo(i,t)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new ti("Expected a function");return t=Su(t)||0,du(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Ui(Su(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==T&&lo(h),_=0,c=p=a=h=T},f.flush=function(){return h===T?s:o(Go())},f}function cu(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache; +return i.has(u)?i.get(u):(e=n.apply(this,e),r.cache=i.set(u,e)||i,e)}if(typeof n!="function"||null!=t&&typeof t!="function")throw new ti("Expected a function");return r.cache=new(cu.Cache||Fn),r}function au(n){if(typeof n!="function")throw new ti("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function lu(n,t){return n===t||n!==n&&t!==t; +}function su(n){return null!=n&&gu(n.length)&&!_u(n)}function hu(n){return yu(n)&&su(n)}function pu(n){if(!yu(n))return false;var t=Ot(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!xu(n)}function _u(n){return!!du(n)&&(n=Ot(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function vu(n){return typeof n=="number"&&n==Eu(n)}function gu(n){return typeof n=="number"&&-1=n; +}function du(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function yu(n){return null!=n&&typeof n=="object"}function bu(n){return typeof n=="number"||yu(n)&&"[object Number]"==Ot(n)}function xu(n){return!(!yu(n)||"[object Object]"!=Ot(n))&&(n=di(n),null===n||(n=oi.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&ii.call(n)==li))}function ju(n){return typeof n=="string"||!ff(n)&&yu(n)&&"[object String]"==Ot(n)}function wu(n){return typeof n=="symbol"||yu(n)&&"[object Symbol]"==Ot(n); +}function mu(n){if(!n)return[];if(su(n))return ju(n)?M(n):Ur(n);if(wi&&n[wi]){n=n[wi]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=vo(n),("[object Map]"==t?W:"[object Set]"==t?U:Uu)(n)}function Au(n){return n?(n=Su(n),n===$||n===-$?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Eu(n){n=Au(n);var t=n%1;return n===n?t?n-t:n:0}function ku(n){return n?pt(Eu(n),0,4294967295):0}function Su(n){if(typeof n=="number")return n;if(wu(n))return F;if(du(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n, +n=du(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(un,"");var t=gn.test(n);return t||yn.test(n)?Dn(n.slice(2),t?2:8):vn.test(n)?F:+n}function Ou(n){return Cr(n,Bu(n))}function Iu(n){return null==n?"":yr(n)}function Ru(n,t,r){return n=null==n?T:kt(n,t),n===T?r:n}function zu(n,t){return null!=n&&we(n,t,zt)}function Wu(n){return su(n)?qn(n):Vt(n)}function Bu(n){if(su(n))n=qn(n,true);else if(du(n)){var t,r=ze(n),e=[];for(t in n)("constructor"!=t||!r&&oi.call(n,t))&&e.push(t);n=e}else{if(t=[], +null!=n)for(r in Qu(n))t.push(r);n=t}return n}function Lu(n,t){if(null==n)return{};var r=c(ve(n),function(n){return[n]});return t=ye(t),tr(n,r,function(n,r){return t(n,r[0])})}function Uu(n){return null==n?[]:S(n,Wu(n))}function Cu(n){return $f(Iu(n).toLowerCase())}function Du(n){return(n=Iu(n))&&n.replace(xn,Xn).replace(Sn,"")}function Mu(n,t,r){return n=Iu(n),t=r?T:t,t===T?zn.test(n)?n.match(In)||[]:n.match(sn)||[]:n.match(t)||[]}function Tu(n){return function(){return n}}function $u(n){return n; +}function Fu(n){return qt(typeof n=="function"?n:_t(n,1))}function Nu(n,t,e){var u=Wu(t),i=Et(t,u);null!=e||du(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=Et(t,Wu(t)));var o=!(du(e)&&"chain"in e&&!e.chain),f=_u(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Ur(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function Pu(){} +function Zu(n){return Ie(n)?b(Me(n)):rr(n)}function qu(){return[]}function Vu(){return false}mn=null==mn?$n:rt.defaults($n.Object(),mn,rt.pick($n,Wn));var Ku=mn.Array,Gu=mn.Date,Hu=mn.Error,Ju=mn.Function,Yu=mn.Math,Qu=mn.Object,Xu=mn.RegExp,ni=mn.String,ti=mn.TypeError,ri=Ku.prototype,ei=Qu.prototype,ui=mn["__core-js_shared__"],ii=Ju.prototype.toString,oi=ei.hasOwnProperty,fi=0,ci=function(){var n=/[^.]+$/.exec(ui&&ui.keys&&ui.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),ai=ei.toString,li=ii.call(Qu),si=$n._,hi=Xu("^"+ii.call(oi).replace(rn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pi=Pn?mn.Buffer:T,_i=mn.Symbol,vi=mn.Uint8Array,gi=pi?pi.g:T,di=B(Qu.getPrototypeOf,Qu),yi=Qu.create,bi=ei.propertyIsEnumerable,xi=ri.splice,ji=_i?_i.isConcatSpreadable:T,wi=_i?_i.iterator:T,mi=_i?_i.toStringTag:T,Ai=function(){ +try{var n=je(Qu,"defineProperty");return n({},"",{}),n}catch(n){}}(),Ei=mn.clearTimeout!==$n.clearTimeout&&mn.clearTimeout,ki=Gu&&Gu.now!==$n.Date.now&&Gu.now,Si=mn.setTimeout!==$n.setTimeout&&mn.setTimeout,Oi=Yu.ceil,Ii=Yu.floor,Ri=Qu.getOwnPropertySymbols,zi=pi?pi.isBuffer:T,Wi=mn.isFinite,Bi=ri.join,Li=B(Qu.keys,Qu),Ui=Yu.max,Ci=Yu.min,Di=Gu.now,Mi=mn.parseInt,Ti=Yu.random,$i=ri.reverse,Fi=je(mn,"DataView"),Ni=je(mn,"Map"),Pi=je(mn,"Promise"),Zi=je(mn,"Set"),qi=je(mn,"WeakMap"),Vi=je(Qu,"create"),Ki=qi&&new qi,Gi={},Hi=Te(Fi),Ji=Te(Ni),Yi=Te(Pi),Qi=Te(Zi),Xi=Te(qi),no=_i?_i.prototype:T,to=no?no.valueOf:T,ro=no?no.toString:T,eo=function(){ +function n(){}return function(t){return du(t)?yi?yi(t):(n.prototype=t,t=new n,n.prototype=T,t):{}}}();An.templateSettings={escape:J,evaluate:Y,interpolate:Q,variable:"",imports:{_:An}},An.prototype=En.prototype,An.prototype.constructor=An,On.prototype=eo(En.prototype),On.prototype.constructor=On,Un.prototype=eo(En.prototype),Un.prototype.constructor=Un,Mn.prototype.clear=function(){this.__data__=Vi?Vi(null):{},this.size=0},Mn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n], this.size-=n?1:0,n},Mn.prototype.get=function(n){var t=this.__data__;return Vi?(n=t[n],"__lodash_hash_undefined__"===n?T:n):oi.call(t,n)?t[n]:T},Mn.prototype.has=function(n){var t=this.__data__;return Vi?t[n]!==T:oi.call(t,n)},Mn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Vi&&t===T?"__lodash_hash_undefined__":t,this},Tn.prototype.clear=function(){this.__data__=[],this.size=0},Tn.prototype.delete=function(n){var t=this.__data__;return n=ft(t,n),!(0>n)&&(n==t.length-1?t.pop():xi.call(t,n,1), --this.size,true)},Tn.prototype.get=function(n){var t=this.__data__;return n=ft(t,n),0>n?T:t[n][1]},Tn.prototype.has=function(n){return-1e?(++this.size,r.push([n,t])):r[e][1]=t,this},Fn.prototype.clear=function(){this.size=0,this.__data__={hash:new Mn,map:new(Ni||Tn),string:new Mn}},Fn.prototype.delete=function(n){return n=be(this,n).delete(n),this.size-=n?1:0,n},Fn.prototype.get=function(n){return be(this,n).get(n); },Fn.prototype.has=function(n){return be(this,n).has(n)},Fn.prototype.set=function(n,t){var r=be(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},Nn.prototype.add=Nn.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},Nn.prototype.has=function(n){return this.__data__.has(n)},Zn.prototype.clear=function(){this.__data__=new Tn,this.size=0},Zn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Zn.prototype.get=function(n){ -return this.__data__.get(n)},Zn.prototype.has=function(n){return this.__data__.has(n)},Zn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Tn){var e=r.__data__;if(!Ni||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Fn(e)}return r.set(n,t),this.size=r.size,this};var uo=Fr(mt),io=Fr(At,true),oo=Nr(),fo=Nr(true),co=Ki?function(n,t){return Ki.set(n,t),n}:$u,ao=Ai?function(n,t){return Ai(n,"toString",{configurable:true,enumerable:false,value:Tu(t),writable:true})}:$u,lo=ki||function(n){ -return $n.clearTimeout(n)},so=Zi&&1/L(new Zi([,-0]))[1]==$?function(n){return new Zi(n)}:Pu,ho=Ki?function(n){return Ki.get(n)}:Pu,po=Ri?function(n){return null==n?[]:(n=Qu(n),i(Ri(n),function(t){return bi.call(n,t)}))}:qu,_o=Ri?function(n){for(var t=[];n;)a(t,po(n)),n=di(n);return t}:qu,vo=Ot;(Fi&&"[object DataView]"!=vo(new Fi(new ArrayBuffer(1)))||Ni&&"[object Map]"!=vo(new Ni)||Pi&&"[object Promise]"!=vo(Pi.resolve())||Zi&&"[object Set]"!=vo(new Zi)||qi&&"[object WeakMap]"!=vo(new qi))&&(vo=function(n){ +return this.__data__.get(n)},Zn.prototype.has=function(n){return this.__data__.has(n)},Zn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Tn){var e=r.__data__;if(!Ni||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Fn(e)}return r.set(n,t),this.size=r.size,this};var uo=Fr(mt),io=Fr(At,true),oo=Nr(),fo=Nr(true),co=Ki?function(n,t){return Ki.set(n,t),n}:$u,ao=Ai?function(n,t){return Ai(n,"toString",{configurable:true,enumerable:false,value:Tu(t),writable:true})}:$u,lo=Ei||function(n){ +return $n.clearTimeout(n)},so=Zi&&1/U(new Zi([,-0]))[1]==$?function(n){return new Zi(n)}:Pu,ho=Ki?function(n){return Ki.get(n)}:Pu,po=Ri?function(n){return null==n?[]:(n=Qu(n),i(Ri(n),function(t){return bi.call(n,t)}))}:qu,_o=Ri?function(n){for(var t=[];n;)a(t,po(n)),n=di(n);return t}:qu,vo=Ot;(Fi&&"[object DataView]"!=vo(new Fi(new ArrayBuffer(1)))||Ni&&"[object Map]"!=vo(new Ni)||Pi&&"[object Promise]"!=vo(Pi.resolve())||Zi&&"[object Set]"!=vo(new Zi)||qi&&"[object WeakMap]"!=vo(new qi))&&(vo=function(n){ var t=Ot(n);if(n=(n="[object Object]"==t?n.constructor:T)?Te(n):"")switch(n){case Hi:return"[object DataView]";case Ji:return"[object Map]";case Yi:return"[object Promise]";case Qi:return"[object Set]";case Xi:return"[object WeakMap]"}return t});var go=ui?_u:Vu,yo=Ce(co),bo=Si||function(n,t){return $n.setTimeout(n,t)},xo=Ce(ao),jo=function(n){n=cu(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(tn,function(n,r,e,u){ -t.push(e?u.replace(hn,"$1"):r||n)}),t}),wo=fr(function(n,t){return hu(n)?yt(n,wt(t,1,hu,true)):[]}),mo=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),ye(r,2)):[]}),Ao=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),T,r):[]}),ko=fr(function(n){var t=c(n,kr);return t.length&&t[0]===n[0]?Wt(t):[]}),Eo=fr(function(n){var t=Ve(n),r=c(n,kr);return t===Ve(r)?t=T:r.pop(),r.length&&r[0]===n[0]?Wt(r,ye(t,2)):[]}),So=fr(function(n){var t=Ve(n),r=c(n,kr);return(t=typeof t=="function"?t:T)&&r.pop(), -r.length&&r[0]===n[0]?Wt(r,T,t):[]}),Oo=fr(Ke),Io=pe(function(n,t){var r=null==n?0:n.length,e=ht(n,t);return ur(n,c(t,function(n){return Se(n,r)?+n:n}).sort(Wr)),e}),Ro=fr(function(n){return br(wt(n,1,hu,true))}),zo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T),br(wt(n,1,hu,true),ye(t,2))}),Wo=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return br(wt(n,1,hu,true),T,t)}),Uo=fr(function(n,t){return hu(n)?yt(n,t):[]}),Bo=fr(function(n){return mr(i(n,hu))}),Lo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T), -mr(i(n,hu),ye(t,2))}),Co=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return mr(i(n,hu),T,t)}),Do=fr(He),Mo=fr(function(n){var t=n.length,t=1=t}),of=Lt(function(){return arguments}())?Lt:function(n){return yu(n)&&oi.call(n,"callee")&&!bi.call(n,"callee")},ff=Ku.isArray,cf=Vn?E(Vn):Ct,af=zi||Vu,lf=Kn?E(Kn):Dt,sf=Gn?E(Gn):Tt,hf=Hn?E(Hn):Nt,pf=Jn?E(Jn):Pt,_f=Yn?E(Yn):Zt,vf=ee(Kt),gf=ee(function(n,t){return n<=t}),df=$r(function(n,t){ -if(ze(t)||su(t))Cr(t,Wu(t),n);else for(var r in t)oi.call(t,r)&&ot(n,r,t[r])}),yf=$r(function(n,t){Cr(t,Uu(t),n)}),bf=$r(function(n,t,r,e){Cr(t,Uu(t),n,e)}),xf=$r(function(n,t,r,e){Cr(t,Wu(t),n,e)}),jf=pe(ht),wf=fr(function(n,t){n=Qu(n);var r=-1,e=t.length,u=2--n)return t.apply(this,arguments)}},An.ary=eu,An.assign=df,An.assignIn=yf,An.assignInWith=bf,An.assignWith=xf,An.at=jf,An.before=uu,An.bind=Ho,An.bindAll=Nf,An.bindKey=Jo,An.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return ff(n)?n:[n]},An.chain=Ye,An.chunk=function(n,t,r){if(t=(r?Oe(n,t,r):t===T)?1:Li(ku(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Ku(Oi(r/t));et?0:t,e)):[]},An.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:ku(t),t=e-t,hr(n,0,0>t?0:t)):[]},An.dropRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true,true):[]; -},An.dropWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true):[]},An.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&Oe(n,t,r)&&(r=0,e=u),u=n.length,r=ku(r),0>r&&(r=-r>u?0:u+r),e=e===T||e>u?u:ku(e),0>e&&(e+=u),e=r>e?0:Eu(e);r>>0,r?(n=Iu(n))&&(typeof t=="string"||null!=t&&!hf(t))&&(t=yr(t),!t&&Rn.test(n))?Or(M(n),0,r):n.split(t,r):[]},An.spread=function(t,r){if(typeof t!="function")throw new ti("Expected a function");return r=null==r?0:Li(ku(r),0), -fr(function(e){var u=e[r];return e=Or(e,0,r),u&&a(e,u),n(t,this,e)})},An.tail=function(n){var t=null==n?0:n.length;return t?hr(n,1,t):[]},An.take=function(n,t,r){return n&&n.length?(t=r||t===T?1:ku(t),hr(n,0,0>t?0:t)):[]},An.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:ku(t),t=e-t,hr(n,0>t?0:t,e)):[]},An.takeRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),false,true):[]},An.takeWhile=function(n,t){return n&&n.length?jr(n,ye(t,3)):[]},An.tap=function(n,t){return t(n), -n},An.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ti("Expected a function");return du(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),fu(n,t,{leading:e,maxWait:t,trailing:u})},An.thru=Qe,An.toArray=mu,An.toPairs=zf,An.toPairsIn=Wf,An.toPath=function(n){return ff(n)?c(n,Me):wu(n)?[n]:Lr(jo(Iu(n)))},An.toPlainObject=Ou,An.transform=function(n,t,e){var u=ff(n),i=u||af(n)||_f(n);if(t=ye(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:du(n)&&_u(o)?eo(di(n)):{}; -}return(i?r:mt)(n,function(n,r,u){return t(e,n,r,u)}),e},An.unary=function(n){return eu(n,1)},An.union=Ro,An.unionBy=zo,An.unionWith=Wo,An.uniq=function(n){return n&&n.length?br(n):[]},An.uniqBy=function(n,t){return n&&n.length?br(n,ye(t,2)):[]},An.uniqWith=function(n,t){return t=typeof t=="function"?t:T,n&&n.length?br(n,T,t):[]},An.unset=function(n,t){return null==n||xr(n,t)},An.unzip=He,An.unzipWith=Je,An.update=function(n,t,r){return null!=n&&(r=Er(r),n=lr(n,t,r(Et(n,t)),void 0)),n},An.updateWith=function(n,t,r,e){ -return e=typeof e=="function"?e:T,null!=n&&(r=Er(r),n=lr(n,t,r(Et(n,t)),e)),n},An.values=Lu,An.valuesIn=function(n){return null==n?[]:S(n,Uu(n))},An.without=Uo,An.words=Mu,An.wrap=function(n,t){return nf(Er(t),n)},An.xor=Bo,An.xorBy=Lo,An.xorWith=Co,An.zip=Do,An.zipObject=function(n,t){return Ar(n||[],t||[],ot)},An.zipObjectDeep=function(n,t){return Ar(n||[],t||[],lr)},An.zipWith=Mo,An.entries=zf,An.entriesIn=Wf,An.extend=yf,An.extendWith=bf,Nu(An,An),An.add=Qf,An.attempt=Ff,An.camelCase=Uf,An.capitalize=Cu, +t.push(e?u.replace(hn,"$1"):r||n)}),t}),wo=fr(function(n,t){return hu(n)?yt(n,wt(t,1,hu,true)):[]}),mo=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),ye(r,2)):[]}),Ao=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),T,r):[]}),Eo=fr(function(n){var t=c(n,Er);return t.length&&t[0]===n[0]?Wt(t):[]}),ko=fr(function(n){var t=Ve(n),r=c(n,Er);return t===Ve(r)?t=T:r.pop(),r.length&&r[0]===n[0]?Wt(r,ye(t,2)):[]}),So=fr(function(n){var t=Ve(n),r=c(n,Er);return(t=typeof t=="function"?t:T)&&r.pop(), +r.length&&r[0]===n[0]?Wt(r,T,t):[]}),Oo=fr(Ke),Io=pe(function(n,t){var r=null==n?0:n.length,e=ht(n,t);return ur(n,c(t,function(n){return Se(n,r)?+n:n}).sort(Wr)),e}),Ro=fr(function(n){return br(wt(n,1,hu,true))}),zo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T),br(wt(n,1,hu,true),ye(t,2))}),Wo=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return br(wt(n,1,hu,true),T,t)}),Bo=fr(function(n,t){return hu(n)?yt(n,t):[]}),Lo=fr(function(n){return mr(i(n,hu))}),Uo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T), +mr(i(n,hu),ye(t,2))}),Co=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return mr(i(n,hu),T,t)}),Do=fr(He),Mo=fr(function(n){var t=n.length,t=1=t}),of=Ut(function(){return arguments}())?Ut:function(n){return yu(n)&&oi.call(n,"callee")&&!bi.call(n,"callee")},ff=Ku.isArray,cf=Vn?k(Vn):Ct,af=zi||Vu,lf=Kn?k(Kn):Dt,sf=Gn?k(Gn):Tt,hf=Hn?k(Hn):Nt,pf=Jn?k(Jn):Pt,_f=Yn?k(Yn):Zt,vf=ee(Kt),gf=ee(function(n,t){return n<=t}),df=$r(function(n,t){ +if(ze(t)||su(t))Cr(t,Wu(t),n);else for(var r in t)oi.call(t,r)&&ot(n,r,t[r])}),yf=$r(function(n,t){Cr(t,Bu(t),n)}),bf=$r(function(n,t,r,e){Cr(t,Bu(t),n,e)}),xf=$r(function(n,t,r,e){Cr(t,Wu(t),n,e)}),jf=pe(ht),wf=fr(function(n,t){n=Qu(n);var r=-1,e=t.length,u=2--n)return t.apply(this,arguments)}},An.ary=eu,An.assign=df,An.assignIn=yf,An.assignInWith=bf,An.assignWith=xf,An.at=jf,An.before=uu,An.bind=Ho,An.bindAll=Nf,An.bindKey=Jo,An.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return ff(n)?n:[n]},An.chain=Ye,An.chunk=function(n,t,r){if(t=(r?Oe(n,t,r):t===T)?1:Ui(Eu(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Ku(Oi(r/t));et?0:t,e)):[]},An.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:Eu(t),t=e-t,hr(n,0,0>t?0:t)):[]},An.dropRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true,true):[]; +},An.dropWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true):[]},An.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&Oe(n,t,r)&&(r=0,e=u),u=n.length,r=Eu(r),0>r&&(r=-r>u?0:u+r),e=e===T||e>u?u:Eu(e),0>e&&(e+=u),e=r>e?0:ku(e);r>>0,r?(n=Iu(n))&&(typeof t=="string"||null!=t&&!hf(t))&&(t=yr(t),!t&&Rn.test(n))?Or(M(n),0,r):n.split(t,r):[]},An.spread=function(t,r){if(typeof t!="function")throw new ti("Expected a function");return r=null==r?0:Ui(Eu(r),0), +fr(function(e){var u=e[r];return e=Or(e,0,r),u&&a(e,u),n(t,this,e)})},An.tail=function(n){var t=null==n?0:n.length;return t?hr(n,1,t):[]},An.take=function(n,t,r){return n&&n.length?(t=r||t===T?1:Eu(t),hr(n,0,0>t?0:t)):[]},An.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:Eu(t),t=e-t,hr(n,0>t?0:t,e)):[]},An.takeRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),false,true):[]},An.takeWhile=function(n,t){return n&&n.length?jr(n,ye(t,3)):[]},An.tap=function(n,t){return t(n), +n},An.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ti("Expected a function");return du(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),fu(n,t,{leading:e,maxWait:t,trailing:u})},An.thru=Qe,An.toArray=mu,An.toPairs=zf,An.toPairsIn=Wf,An.toPath=function(n){return ff(n)?c(n,Me):wu(n)?[n]:Ur(jo(Iu(n)))},An.toPlainObject=Ou,An.transform=function(n,t,e){var u=ff(n),i=u||af(n)||_f(n);if(t=ye(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:du(n)&&_u(o)?eo(di(n)):{}; +}return(i?r:mt)(n,function(n,r,u){return t(e,n,r,u)}),e},An.unary=function(n){return eu(n,1)},An.union=Ro,An.unionBy=zo,An.unionWith=Wo,An.uniq=function(n){return n&&n.length?br(n):[]},An.uniqBy=function(n,t){return n&&n.length?br(n,ye(t,2)):[]},An.uniqWith=function(n,t){return t=typeof t=="function"?t:T,n&&n.length?br(n,T,t):[]},An.unset=function(n,t){return null==n||xr(n,t)},An.unzip=He,An.unzipWith=Je,An.update=function(n,t,r){return null==n?n:lr(n,t,kr(r)(kt(n,t)),void 0)},An.updateWith=function(n,t,r,e){ +return e=typeof e=="function"?e:T,null!=n&&(n=lr(n,t,kr(r)(kt(n,t)),e)),n},An.values=Uu,An.valuesIn=function(n){return null==n?[]:S(n,Bu(n))},An.without=Bo,An.words=Mu,An.wrap=function(n,t){return nf(kr(t),n)},An.xor=Lo,An.xorBy=Uo,An.xorWith=Co,An.zip=Do,An.zipObject=function(n,t){return Ar(n||[],t||[],ot)},An.zipObjectDeep=function(n,t){return Ar(n||[],t||[],lr)},An.zipWith=Mo,An.entries=zf,An.entriesIn=Wf,An.extend=yf,An.extendWith=bf,Nu(An,An),An.add=Qf,An.attempt=Ff,An.camelCase=Bf,An.capitalize=Cu, An.ceil=Xf,An.clamp=function(n,t,r){return r===T&&(r=t,t=T),r!==T&&(r=Su(r),r=r===r?r:0),t!==T&&(t=Su(t),t=t===t?t:0),pt(Su(n),t,r)},An.clone=function(n){return _t(n,4)},An.cloneDeep=function(n){return _t(n,5)},An.cloneDeepWith=function(n,t){return t=typeof t=="function"?t:T,_t(n,5,t)},An.cloneWith=function(n,t){return t=typeof t=="function"?t:T,_t(n,4,t)},An.conformsTo=function(n,t){return null==t||gt(n,t,Wu(t))},An.deburr=Du,An.defaultTo=function(n,t){return null==n||n!==n?t:n},An.divide=nc,An.endsWith=function(n,t,r){ -n=Iu(n),t=yr(t);var e=n.length,e=r=r===T?e:pt(ku(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},An.eq=lu,An.escape=function(n){return(n=Iu(n))&&H.test(n)?n.replace(K,nt):n},An.escapeRegExp=function(n){return(n=Iu(n))&&en.test(n)?n.replace(rn,"\\$&"):n},An.every=function(n,t,r){var e=ff(n)?u:bt;return r&&Oe(n,t,r)&&(t=T),e(n,ye(t,3))},An.find=Fo,An.findIndex=Ne,An.findKey=function(n,t){return p(n,ye(t,3),mt)},An.findLast=No,An.findLastIndex=Pe,An.findLastKey=function(n,t){return p(n,ye(t,3),At); -},An.floor=tc,An.forEach=nu,An.forEachRight=tu,An.forIn=function(n,t){return null==n?n:oo(n,ye(t,3),Uu)},An.forInRight=function(n,t){return null==n?n:fo(n,ye(t,3),Uu)},An.forOwn=function(n,t){return n&&mt(n,ye(t,3))},An.forOwnRight=function(n,t){return n&&At(n,ye(t,3))},An.get=Ru,An.gt=ef,An.gte=uf,An.has=function(n,t){return null!=n&&we(n,t,Rt)},An.hasIn=zu,An.head=qe,An.identity=$u,An.includes=function(n,t,r,e){return n=su(n)?n:Lu(n),r=r&&!e?ku(r):0,e=n.length,0>r&&(r=Li(e+r,0)),ju(n)?r<=e&&-1r&&(r=Li(e+r,0)),v(n,t,r)):-1},An.inRange=function(n,t,r){return t=Au(t),r===T?(r=t,t=0):r=Au(r),n=Su(n),n>=Ci(t,r)&&nr&&(r=Ui(e+r,0)),ju(n)?r<=e&&-1r&&(r=Ui(e+r,0)),v(n,t,r)):-1},An.inRange=function(n,t,r){return t=Au(t),r===T?(r=t,t=0):r=Au(r),n=Su(n),n>=Ci(t,r)&&n=n},An.isSet=pf,An.isString=ju,An.isSymbol=wu,An.isTypedArray=_f,An.isUndefined=function(n){return n===T},An.isWeakMap=function(n){return yu(n)&&"[object WeakMap]"==vo(n)},An.isWeakSet=function(n){return yu(n)&&"[object WeakSet]"==Ot(n)},An.join=function(n,t){return null==n?"":Ui.call(n,t)},An.kebabCase=Bf,An.last=Ve,An.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==T&&(u=ku(r),u=0>u?Li(e+u,0):Ci(u,e-1)), -t===t)n:{for(r=u+1;r--;)if(n[r]===t){n=r;break n}n=r}else n=_(n,d,u,true);return n},An.lowerCase=Lf,An.lowerFirst=Cf,An.lt=vf,An.lte=gf,An.max=function(n){return n&&n.length?xt(n,$u,It):T},An.maxBy=function(n,t){return n&&n.length?xt(n,ye(t,2),It):T},An.mean=function(n){return y(n,$u)},An.meanBy=function(n,t){return y(n,ye(t,2))},An.min=function(n){return n&&n.length?xt(n,$u,Kt):T},An.minBy=function(n,t){return n&&n.length?xt(n,ye(t,2),Kt):T},An.stubArray=qu,An.stubFalse=Vu,An.stubObject=function(){ -return{}},An.stubString=function(){return""},An.stubTrue=function(){return true},An.multiply=rc,An.nth=function(n,t){return n&&n.length?Qt(n,ku(t)):T},An.noConflict=function(){return $n._===this&&($n._=si),this},An.noop=Pu,An.now=Go,An.pad=function(n,t,r){n=Iu(n);var e=(t=ku(t))?D(n):0;return!t||e>=t?n:(t=(t-e)/2,ne(Ii(t),r)+n+ne(Oi(t),r))},An.padEnd=function(n,t,r){n=Iu(n);var e=(t=ku(t))?D(n):0;return t&&et){var e=n;n=t,t=e}return r||n%1||t%1?(r=Ti(),Ci(n+r*(t-n+Cn("1e-"+((r+"").length-1))),t)):ir(n,t)},An.reduce=function(n,t,r){var e=ff(n)?l:j,u=3>arguments.length;return e(n,ye(t,4),r,u,uo)},An.reduceRight=function(n,t,r){ -var e=ff(n)?s:j,u=3>arguments.length;return e(n,ye(t,4),r,u,io)},An.repeat=function(n,t,r){return t=(r?Oe(n,t,r):t===T)?1:ku(t),or(Iu(n),t)},An.replace=function(){var n=arguments,t=Iu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},An.result=function(n,t,r){t=Sr(t,n);var e=-1,u=t.length;for(u||(u=1,n=T);++en||9007199254740991=i)return n;if(i=r-D(e),1>i)return e;if(r=o?Or(o,0,i).join(""):n.slice(0,i),u===T)return r+e;if(o&&(i+=r.length-i),hf(u)){if(n.slice(i).search(u)){var f=r;for(u.global||(u=Xu(u.source,Iu(_n.exec(u))+"g")), -u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===T?i:c)}}else n.indexOf(yr(u),i)!=i&&(u=r.lastIndexOf(u),-1e.__dir__?"Right":"")}),e},Ln.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;Ln.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({ -iteratee:ye(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){var r="take"+(t?"Right":"");Ln.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Ln.prototype[n]=function(){return this.__filtered__?new Ln(this):this[r](1)}}),Ln.prototype.compact=function(){return this.filter($u)},Ln.prototype.find=function(n){return this.filter(n).head()},Ln.prototype.findLast=function(n){return this.reverse().find(n); -},Ln.prototype.invokeMap=fr(function(n,t){return typeof n=="function"?new Ln(this):this.map(function(r){return Bt(r,n,t)})}),Ln.prototype.reject=function(n){return this.filter(au(ye(n)))},Ln.prototype.slice=function(n,t){n=ku(n);var r=this;return r.__filtered__&&(0t)?new Ln(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==T&&(t=ku(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Ln.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Ln.prototype.toArray=function(){return this.take(4294967295); -},mt(Ln.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=An[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(An.prototype[t]=function(){var t=this.__wrapped__,o=e?[1]:arguments,f=t instanceof Ln,c=o[0],l=f||ff(t),s=function(n){return n=u.apply(An,a([n],o)),e&&h?n[0]:n};l&&r&&typeof c=="function"&&1!=c.length&&(f=l=false);var h=this.__chain__,p=!!this.__actions__.length,c=i&&!h,f=f&&!p;return!i&&l?(t=f?t:new Ln(this),t=n.apply(t,o),t.__actions__.push({ -func:Qe,args:[s],thisArg:T}),new On(t,h)):c&&f?n.apply(this,o):(t=this.thru(s),c?e?t.value()[0]:t.value():t)})}),r("pop push shift sort splice unshift".split(" "),function(n){var t=ri[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);An.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(ff(u)?u:[],n)}return this[r](function(r){return t.apply(ff(r)?r:[],n)})}}),mt(Ln.prototype,function(n,t){var r=An[t];if(r){var e=r.name+""; -(Gi[e]||(Gi[e]=[])).push({name:t,func:r})}}),Gi[Jr(T,2).name]=[{name:"wrapper",func:T}],Ln.prototype.clone=function(){var n=new Ln(this.__wrapped__);return n.__actions__=Lr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Lr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Lr(this.__views__),n},Ln.prototype.reverse=function(){if(this.__filtered__){var n=new Ln(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n; -},Ln.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=ff(t),u=0>r,i=e?t.length:0;n=0;for(var o=i,f=this.__views__,c=-1,a=f.length;++c=this.__values__.length;return{done:n,value:n?T:this.__values__[this.__index__++]}},An.prototype.plant=function(n){for(var t,r=this;r instanceof kn;){ -var e=Fe(r);e.__index__=0,e.__values__=T,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},An.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Ln?(this.__actions__.length&&(n=new Ln(this)),n=n.reverse(),n.__actions__.push({func:Qe,args:[Ge],thisArg:T}),new On(n,this.__chain__)):this.thru(Ge)},An.prototype.toJSON=An.prototype.valueOf=An.prototype.value=function(){return wr(this.__wrapped__,this.__actions__)},An.prototype.first=An.prototype.head,wi&&(An.prototype[wi]=Xe), -An}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?($n._=rt, define(function(){return rt})):Nn?((Nn.exports=rt)._=rt,Fn._=rt):$n._=rt}).call(this); \ No newline at end of file +An.isSafeInteger=function(n){return vu(n)&&-9007199254740991<=n&&9007199254740991>=n},An.isSet=pf,An.isString=ju,An.isSymbol=wu,An.isTypedArray=_f,An.isUndefined=function(n){return n===T},An.isWeakMap=function(n){return yu(n)&&"[object WeakMap]"==vo(n)},An.isWeakSet=function(n){return yu(n)&&"[object WeakSet]"==Ot(n)},An.join=function(n,t){return null==n?"":Bi.call(n,t)},An.kebabCase=Lf,An.last=Ve,An.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==T&&(u=Eu(r),u=0>u?Ui(e+u,0):Ci(u,e-1)), +t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=_(n,d,u,true);return n},An.lowerCase=Uf,An.lowerFirst=Cf,An.lt=vf,An.lte=gf,An.max=function(n){return n&&n.length?xt(n,$u,It):T},An.maxBy=function(n,t){return n&&n.length?xt(n,ye(t,2),It):T},An.mean=function(n){return y(n,$u)},An.meanBy=function(n,t){return y(n,ye(t,2))},An.min=function(n){return n&&n.length?xt(n,$u,Kt):T},An.minBy=function(n,t){return n&&n.length?xt(n,ye(t,2),Kt):T},An.stubArray=qu,An.stubFalse=Vu,An.stubObject=function(){return{}},An.stubString=function(){ +return""},An.stubTrue=function(){return true},An.multiply=rc,An.nth=function(n,t){return n&&n.length?Qt(n,Eu(t)):T},An.noConflict=function(){return $n._===this&&($n._=si),this},An.noop=Pu,An.now=Go,An.pad=function(n,t,r){n=Iu(n);var e=(t=Eu(t))?D(n):0;return!t||e>=t?n:(t=(t-e)/2,ne(Ii(t),r)+n+ne(Oi(t),r))},An.padEnd=function(n,t,r){n=Iu(n);var e=(t=Eu(t))?D(n):0;return t&&et){var e=n;n=t,t=e}return r||n%1||t%1?(r=Ti(),Ci(n+r*(t-n+Cn("1e-"+((r+"").length-1))),t)):ir(n,t)},An.reduce=function(n,t,r){var e=ff(n)?l:j,u=3>arguments.length;return e(n,ye(t,4),r,u,uo)},An.reduceRight=function(n,t,r){var e=ff(n)?s:j,u=3>arguments.length; +return e(n,ye(t,4),r,u,io)},An.repeat=function(n,t,r){return t=(r?Oe(n,t,r):t===T)?1:Eu(t),or(Iu(n),t)},An.replace=function(){var n=arguments,t=Iu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},An.result=function(n,t,r){t=Sr(t,n);var e=-1,u=t.length;for(u||(u=1,n=T);++en||9007199254740991=i)return n;if(i=r-D(e),1>i)return e;if(r=o?Or(o,0,i).join(""):n.slice(0,i),u===T)return r+e;if(o&&(i+=r.length-i),hf(u)){if(n.slice(i).search(u)){ +var f=r;for(u.global||(u=Xu(u.source,Iu(_n.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===T?i:c)}}else n.indexOf(yr(u),i)!=i&&(u=r.lastIndexOf(u),-1e.__dir__?"Right":"")}),e},Un.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){ +var r=t+1,e=1==r||3==r;Un.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:ye(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){var r="take"+(t?"Right":"");Un.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Un.prototype[n]=function(){return this.__filtered__?new Un(this):this[r](1)}}),Un.prototype.compact=function(){return this.filter($u)},Un.prototype.find=function(n){ +return this.filter(n).head()},Un.prototype.findLast=function(n){return this.reverse().find(n)},Un.prototype.invokeMap=fr(function(n,t){return typeof n=="function"?new Un(this):this.map(function(r){return Lt(r,n,t)})}),Un.prototype.reject=function(n){return this.filter(au(ye(n)))},Un.prototype.slice=function(n,t){n=Eu(n);var r=this;return r.__filtered__&&(0t)?new Un(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==T&&(t=Eu(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Un.prototype.takeRightWhile=function(n){ +return this.reverse().takeWhile(n).reverse()},Un.prototype.toArray=function(){return this.take(4294967295)},mt(Un.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=An[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(An.prototype[t]=function(){function t(n){return n=u.apply(An,a([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Un,l=f[0],s=c||ff(o);s&&r&&typeof l=="function"&&1!=l.length&&(c=s=false);var h=this.__chain__,p=!!this.__actions__.length,l=i&&!h,c=c&&!p; +return!i&&s?(o=c?o:new Un(this),o=n.apply(o,f),o.__actions__.push({func:Qe,args:[t],thisArg:T}),new On(o,h)):l&&c?n.apply(this,f):(o=this.thru(t),l?e?o.value()[0]:o.value():o)})}),r("pop push shift sort splice unshift".split(" "),function(n){var t=ri[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);An.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(ff(u)?u:[],n)}return this[r](function(r){return t.apply(ff(r)?r:[],n)}); +}}),mt(Un.prototype,function(n,t){var r=An[t];if(r){var e=r.name+"";oi.call(Gi,e)||(Gi[e]=[]),Gi[e].push({name:t,func:r})}}),Gi[Jr(T,2).name]=[{name:"wrapper",func:T}],Un.prototype.clone=function(){var n=new Un(this.__wrapped__);return n.__actions__=Ur(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Ur(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Ur(this.__views__),n},Un.prototype.reverse=function(){if(this.__filtered__){var n=new Un(this); +n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Un.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=ff(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c=this.__values__.length;return{done:n,value:n?T:this.__values__[this.__index__++]}},An.prototype.plant=function(n){ +for(var t,r=this;r instanceof En;){var e=Fe(r);e.__index__=0,e.__values__=T,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},An.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Un?(this.__actions__.length&&(n=new Un(this)),n=n.reverse(),n.__actions__.push({func:Qe,args:[Ge],thisArg:T}),new On(n,this.__chain__)):this.thru(Ge)},An.prototype.toJSON=An.prototype.valueOf=An.prototype.value=function(){return wr(this.__wrapped__,this.__actions__)},An.prototype.first=An.prototype.head, +wi&&(An.prototype[wi]=Xe),An}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?($n._=rt, define(function(){return rt})):Nn?((Nn.exports=rt)._=rt,Fn._=rt):$n._=rt}).call(this); \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/lodash/package.json b/tools/node_modules/eslint/node_modules/lodash/package.json index 73236b6290042b..ccf80be0796354 100644 --- a/tools/node_modules/eslint/node_modules/lodash/package.json +++ b/tools/node_modules/eslint/node_modules/lodash/package.json @@ -1,8 +1,7 @@ { "author": { "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" + "email": "john.david.dalton@gmail.com" }, "bugs": { "url": "https://github.com/lodash/lodash/issues" @@ -11,13 +10,11 @@ "contributors": [ { "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" + "email": "john.david.dalton@gmail.com" }, { "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" + "email": "mathias@qiwi.be" } ], "deprecated": false, @@ -39,5 +36,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash-archive/lodash-cli for testing details.\"" }, - "version": "4.17.11" + "version": "4.17.15" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/lodash/template.js b/tools/node_modules/eslint/node_modules/lodash/template.js index 16539eec2f78d6..f71d13024982f0 100644 --- a/tools/node_modules/eslint/node_modules/lodash/template.js +++ b/tools/node_modules/eslint/node_modules/lodash/template.js @@ -27,6 +27,12 @@ var reNoMatch = /($^)/; /** Used to match unescaped characters in compiled string literals. */ var reUnescapedString = /['\n\r\u2028\u2029\\]/g; +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + /** * Creates a compiled template function that can interpolate data properties * in "interpolate" delimiters, HTML-escape interpolated data properties in @@ -162,7 +168,14 @@ function template(string, options, guard) { , 'g'); // Use a sourceURL for easier debugging. - var sourceURL = 'sourceURL' in options ? '//# sourceURL=' + options.sourceURL + '\n' : ''; + // The sourceURL gets injected into the source that's eval-ed, so be careful + // with lookup (in case of e.g. prototype pollution), and strip newlines if any. + // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection. + var sourceURL = hasOwnProperty.call(options, 'sourceURL') + ? ('//# sourceURL=' + + (options.sourceURL + '').replace(/[\r\n]/g, ' ') + + '\n') + : ''; string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { interpolateValue || (interpolateValue = esTemplateValue); @@ -193,7 +206,9 @@ function template(string, options, guard) { // If `variable` is not specified wrap a with-statement around the generated // code to add the data object to the top of the scope chain. - var variable = options.variable; + // Like with sourceURL, we take care to not check the option's prototype, + // as this configuration is a code injection vector. + var variable = hasOwnProperty.call(options, 'variable') && options.variable; if (!variable) { source = 'with (obj) {\n' + source + '\n}\n'; } diff --git a/tools/node_modules/eslint/node_modules/path-dirname/index.js b/tools/node_modules/eslint/node_modules/path-dirname/index.js deleted file mode 100644 index ed67817a0045b0..00000000000000 --- a/tools/node_modules/eslint/node_modules/path-dirname/index.js +++ /dev/null @@ -1,143 +0,0 @@ -'use strict'; - -var path = require('path'); -var inspect = require('util').inspect; - -function assertPath(path) { - if (typeof path !== 'string') { - throw new TypeError('Path must be a string. Received ' + inspect(path)); - } -} - -function posix(path) { - assertPath(path); - if (path.length === 0) - return '.'; - var code = path.charCodeAt(0); - var hasRoot = (code === 47/*/*/); - var end = -1; - var matchedSlash = true; - for (var i = path.length - 1; i >= 1; --i) { - code = path.charCodeAt(i); - if (code === 47/*/*/) { - if (!matchedSlash) { - end = i; - break; - } - } else { - // We saw the first non-path separator - matchedSlash = false; - } - } - - if (end === -1) - return hasRoot ? '/' : '.'; - if (hasRoot && end === 1) - return '//'; - return path.slice(0, end); -} - -function win32(path) { - assertPath(path); - var len = path.length; - if (len === 0) - return '.'; - var rootEnd = -1; - var end = -1; - var matchedSlash = true; - var offset = 0; - var code = path.charCodeAt(0); - - // Try to match a root - if (len > 1) { - if (code === 47/*/*/ || code === 92/*\*/) { - // Possible UNC root - - rootEnd = offset = 1; - - code = path.charCodeAt(1); - if (code === 47/*/*/ || code === 92/*\*/) { - // Matched double path separator at beginning - var j = 2; - var last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - code = path.charCodeAt(j); - if (code === 47/*/*/ || code === 92/*\*/) - break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more path separators - for (; j < len; ++j) { - code = path.charCodeAt(j); - if (code !== 47/*/*/ && code !== 92/*\*/) - break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - for (; j < len; ++j) { - code = path.charCodeAt(j); - if (code === 47/*/*/ || code === 92/*\*/) - break; - } - if (j === len) { - // We matched a UNC root only - return path; - } - if (j !== last) { - // We matched a UNC root with leftovers - - // Offset by 1 to include the separator after the UNC root to - // treat it as a "normal root" on top of a (UNC) root - rootEnd = offset = j + 1; - } - } - } - } - } else if ((code >= 65/*A*/ && code <= 90/*Z*/) || - (code >= 97/*a*/ && code <= 122/*z*/)) { - // Possible device root - - code = path.charCodeAt(1); - if (path.charCodeAt(1) === 58/*:*/) { - rootEnd = offset = 2; - if (len > 2) { - code = path.charCodeAt(2); - if (code === 47/*/*/ || code === 92/*\*/) - rootEnd = offset = 3; - } - } - } - } else if (code === 47/*/*/ || code === 92/*\*/) { - return path[0]; - } - - for (var i = len - 1; i >= offset; --i) { - code = path.charCodeAt(i); - if (code === 47/*/*/ || code === 92/*\*/) { - if (!matchedSlash) { - end = i; - break; - } - } else { - // We saw the first non-path separator - matchedSlash = false; - } - } - - if (end === -1) { - if (rootEnd === -1) - return '.'; - else - end = rootEnd; - } - return path.slice(0, end); -} - -module.exports = process.platform === 'win32' ? win32 : posix; -module.exports.posix = posix; -module.exports.win32 = win32; diff --git a/tools/node_modules/eslint/node_modules/path-dirname/package.json b/tools/node_modules/eslint/node_modules/path-dirname/package.json deleted file mode 100644 index 81aad7d043f386..00000000000000 --- a/tools/node_modules/eslint/node_modules/path-dirname/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "author": { - "name": "Elan Shanker" - }, - "bugs": { - "url": "https://github.com/es128/path-dirname/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Node.js path.dirname() ponyfill", - "files": [ - "index.js" - ], - "homepage": "https://github.com/es128/path-dirname#readme", - "keywords": [ - "dirname", - "dir", - "path", - "paths", - "file", - "built-in", - "util", - "utils", - "core", - "stdlib", - "ponyfill", - "polyfill", - "shim" - ], - "license": "MIT", - "name": "path-dirname", - "repository": { - "type": "git", - "url": "git+https://github.com/es128/path-dirname.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.2" -} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/path-dirname/readme.md b/tools/node_modules/eslint/node_modules/path-dirname/readme.md deleted file mode 100644 index 652a5623dfca72..00000000000000 --- a/tools/node_modules/eslint/node_modules/path-dirname/readme.md +++ /dev/null @@ -1,53 +0,0 @@ -# path-dirname [![Build Status](https://travis-ci.org/es128/path-dirname.svg?branch=master)](https://travis-ci.org/es128/path-dirname) - -> Node.js [`path.dirname()`](https://nodejs.org/api/path.html#path_path_dirname_path) [ponyfill](https://ponyfill.com) - -This was needed in order to expose `path.posix.dirname()` on Node.js v0.10 - -## Install - -``` -$ npm install --save path-dirname -``` - - -## Usage - -```js -const pathDirname = require('path-dirname'); - -pathDirname('/home/foo'); -//=> '/home' -pathDirname('C:\\Users\\foo'); -//=> 'C:\\Users' -pathDirname('foo'); -//=> '.' -pathDirname('foo/bar'); -//=> 'foo' - -//Using posix version for consistent output when dealing with glob escape chars -pathDirname.win32('C:\\Users\\foo/\\*bar'); -//=> 'C:\\Users\\foo/' -pathDirname.posix('C:\\Users\\foo/\\*bar'); -//=> 'C:\\Users\\foo' -``` - - -## API - -See the [`path.dirname()` docs](https://nodejs.org/api/path.html#path_path_dirname_path). - -### pathDirname(path) - -### pathDirname.posix(path) - -POSIX specific version. - -### pathDirname.win32(path) - -Windows specific version. - - -## License - -MIT diff --git a/tools/node_modules/eslint/node_modules/semver/README.md b/tools/node_modules/eslint/node_modules/semver/README.md index e5ccececf4808f..7de4504d8171df 100644 --- a/tools/node_modules/eslint/node_modules/semver/README.md +++ b/tools/node_modules/eslint/node_modules/semver/README.md @@ -4,7 +4,7 @@ semver(1) -- The semantic versioner for npm ## Install ```bash -npm install --save semver +npm install semver ```` ## Usage @@ -60,6 +60,12 @@ Options: Coerce a string into SemVer if possible (does not imply --loose) +--rtl + Coerce version strings right to left + +--ltr + Coerce version strings left to right (default) + Program exits successfully if any valid version satisfies all supplied ranges, and prints all satisfying versions. @@ -231,7 +237,7 @@ comparator. Allows minor-level changes if not. #### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` -Allows changes that do not modify the left-most non-zero digit in the +Allows changes that do not modify the left-most non-zero element in the `[major, minor, patch]` tuple. In other words, this allows patch and minor updates for versions `1.0.0` and above, patch updates for versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. @@ -354,6 +360,9 @@ strings that they parse. `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. * `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions in descending order when passed to `Array.sort()`. +* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions + are equal. Sorts in ascending order if passed to `Array.sort()`. + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. * `diff(v1, v2)`: Returns difference between two versions by the release type (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), or null if the versions are the same. @@ -396,16 +405,39 @@ range, use the `satisfies(version, range)` function. ### Coercion -* `coerce(version)`: Coerces a string to semver if possible - -This aims to provide a very forgiving translation of a non-semver -string to semver. It looks for the first digit in a string, and -consumes all remaining characters which satisfy at least a partial semver -(e.g., `1`, `1.2`, `1.2.3`) up to the max permitted length (256 characters). -Longer versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). -All surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes `3.4.0`). -Only text which lacks digits will fail coercion (`version one` is not valid). -The maximum length for any semver component considered for coercion is 16 characters; -longer components will be ignored (`10000000000000000.4.7.4` becomes `4.7.4`). -The maximum value for any semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; -higher value components are invalid (`9999999999999999.4.7.4` is likely invalid). +* `coerce(version, options)`: Coerces a string to semver if possible + +This aims to provide a very forgiving translation of a non-semver string to +semver. It looks for the first digit in a string, and consumes all +remaining characters which satisfy at least a partial semver (e.g., `1`, +`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer +versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All +surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes +`3.4.0`). Only text which lacks digits will fail coercion (`version one` +is not valid). The maximum length for any semver component considered for +coercion is 16 characters; longer components will be ignored +(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any +semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value +components are invalid (`9999999999999999.4.7.4` is likely invalid). + +If the `options.rtl` flag is set, then `coerce` will return the right-most +coercible tuple that does not share an ending index with a longer coercible +tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not +`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of +any other overlapping SemVer tuple. + +### Clean + +* `clean(version)`: Clean a string to be a valid semver if possible + +This will return a cleaned and trimmed semver version. If the provided version is not valid a null will be returned. This does not work for ranges. + +ex. +* `s.clean(' = v 2.1.5foo')`: `null` +* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'` +* `s.clean(' = v 2.1.5-foo')`: `null` +* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'` +* `s.clean('=v2.1.5')`: `'2.1.5'` +* `s.clean(' =v2.1.5')`: `2.1.5` +* `s.clean(' 2.1.5 ')`: `'2.1.5'` +* `s.clean('~1.0.0')`: `null` diff --git a/tools/node_modules/eslint/node_modules/semver/bin/.semver.js.swp b/tools/node_modules/eslint/node_modules/semver/bin/.semver.js.swp new file mode 100644 index 00000000000000..c22a49e3a4edda Binary files /dev/null and b/tools/node_modules/eslint/node_modules/semver/bin/.semver.js.swp differ diff --git a/tools/node_modules/eslint/node_modules/semver/bin/semver.js b/tools/node_modules/eslint/node_modules/semver/bin/semver.js new file mode 100755 index 00000000000000..666034a75d8442 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/semver/bin/semver.js @@ -0,0 +1,174 @@ +#!/usr/bin/env node +// Standalone semver comparison program. +// Exits successfully and prints matching version(s) if +// any supplied version is valid and passes all tests. + +var argv = process.argv.slice(2) + +var versions = [] + +var range = [] + +var inc = null + +var version = require('../package.json').version + +var loose = false + +var includePrerelease = false + +var coerce = false + +var rtl = false + +var identifier + +var semver = require('../semver') + +var reverse = false + +var options = {} + +main() + +function main () { + if (!argv.length) return help() + while (argv.length) { + var a = argv.shift() + var indexOfEqualSign = a.indexOf('=') + if (indexOfEqualSign !== -1) { + a = a.slice(0, indexOfEqualSign) + argv.unshift(a.slice(indexOfEqualSign + 1)) + } + switch (a) { + case '-rv': case '-rev': case '--rev': case '--reverse': + reverse = true + break + case '-l': case '--loose': + loose = true + break + case '-p': case '--include-prerelease': + includePrerelease = true + break + case '-v': case '--version': + versions.push(argv.shift()) + break + case '-i': case '--inc': case '--increment': + switch (argv[0]) { + case 'major': case 'minor': case 'patch': case 'prerelease': + case 'premajor': case 'preminor': case 'prepatch': + inc = argv.shift() + break + default: + inc = 'patch' + break + } + break + case '--preid': + identifier = argv.shift() + break + case '-r': case '--range': + range.push(argv.shift()) + break + case '-c': case '--coerce': + coerce = true + break + case '--rtl': + rtl = true + break + case '--ltr': + rtl = false + break + case '-h': case '--help': case '-?': + return help() + default: + versions.push(a) + break + } + } + + var options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl } + + versions = versions.map(function (v) { + return coerce ? (semver.coerce(v, options) || { version: v }).version : v + }).filter(function (v) { + return semver.valid(v) + }) + if (!versions.length) return fail() + if (inc && (versions.length !== 1 || range.length)) { return failInc() } + + for (var i = 0, l = range.length; i < l; i++) { + versions = versions.filter(function (v) { + return semver.satisfies(v, range[i], options) + }) + if (!versions.length) return fail() + } + return success(versions) +} + +function failInc () { + console.error('--inc can only be used on a single version with no range') + fail() +} + +function fail () { process.exit(1) } + +function success () { + var compare = reverse ? 'rcompare' : 'compare' + versions.sort(function (a, b) { + return semver[compare](a, b, options) + }).map(function (v) { + return semver.clean(v, options) + }).map(function (v) { + return inc ? semver.inc(v, inc, options, identifier) : v + }).forEach(function (v, i, _) { console.log(v) }) +} + +function help () { + console.log(['SemVer ' + version, + '', + 'A JavaScript implementation of the https://semver.org/ specification', + 'Copyright Isaac Z. Schlueter', + '', + 'Usage: semver [options] [ [...]]', + 'Prints valid versions sorted by SemVer precedence', + '', + 'Options:', + '-r --range ', + ' Print versions that match the specified range.', + '', + '-i --increment []', + ' Increment a version by the specified level. Level can', + ' be one of: major, minor, patch, premajor, preminor,', + " prepatch, or prerelease. Default level is 'patch'.", + ' Only one version may be specified.', + '', + '--preid ', + ' Identifier to be used to prefix premajor, preminor,', + ' prepatch or prerelease version increments.', + '', + '-l --loose', + ' Interpret versions and ranges loosely', + '', + '-p --include-prerelease', + ' Always include prerelease versions in range matching', + '', + '-c --coerce', + ' Coerce a string into SemVer if possible', + ' (does not imply --loose)', + '', + '--rtl', + ' Coerce version strings right to left', + '', + '--ltr', + ' Coerce version strings left to right (default)', + '', + 'Program exits successfully if any valid version satisfies', + 'all supplied ranges, and prints all satisfying versions.', + '', + 'If no satisfying versions are found, then exits failure.', + '', + 'Versions are printed in ascending order, so supplying', + 'multiple versions to the utility will just sort them.' + ].join('\n')) +} diff --git a/tools/node_modules/eslint/node_modules/semver/package.json b/tools/node_modules/eslint/node_modules/semver/package.json index c81acfc3af0d68..12dd2eace77264 100644 --- a/tools/node_modules/eslint/node_modules/semver/package.json +++ b/tools/node_modules/eslint/node_modules/semver/package.json @@ -1,6 +1,6 @@ { "bin": { - "semver": "./bin/semver" + "semver": "./bin/semver.js" }, "bugs": { "url": "https://github.com/npm/node-semver/issues" @@ -9,7 +9,7 @@ "deprecated": false, "description": "The semantic version parser used by npm.", "devDependencies": { - "tap": "^13.0.0-rc.18" + "tap": "^14.3.1" }, "files": [ "bin", @@ -25,7 +25,7 @@ "url": "git+https://github.com/npm/node-semver.git" }, "scripts": { - "postpublish": "git push origin --all; git push origin --tags", + "postpublish": "git push origin --follow-tags", "postversion": "npm publish", "preversion": "npm test", "test": "tap" @@ -33,5 +33,5 @@ "tap": { "check-coverage": true }, - "version": "5.7.0" + "version": "6.2.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/semver/semver.js b/tools/node_modules/eslint/node_modules/semver/semver.js index d315d5d68b179e..fd6453f49e0b13 100644 --- a/tools/node_modules/eslint/node_modules/semver/semver.js +++ b/tools/node_modules/eslint/node_modules/semver/semver.js @@ -160,11 +160,13 @@ src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' // Coercion. // Extract anything that could conceivably be a part of a valid semver var COERCE = R++ -src[COERCE] = '(?:^|[^\\d])' + +src[COERCE] = '(^|[^\\d])' + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:$|[^\\d])' +var COERCERTL = R++ +re[COERCERTL] = new RegExp(src[COERCE], 'g') // Tilde ranges. // Meaning is "reasonably at or greater than" @@ -425,6 +427,30 @@ SemVer.prototype.comparePre = function (other) { } while (++i) } +SemVer.prototype.compareBuild = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + var i = 0 + do { + var a = this.build[i] + var b = other.build[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + // preminor will bump the version up to the next minor release, and immediately // down to pre-release. premajor and prepatch work the same way. SemVer.prototype.inc = function (release, identifier) { @@ -619,6 +645,13 @@ function compareLoose (a, b) { return compare(a, b, true) } +exports.compareBuild = compareBuild +function compareBuild (a, b, loose) { + var versionA = new SemVer(a, loose) + var versionB = new SemVer(b, loose) + return versionA.compare(versionB) || versionA.compareBuild(versionB) +} + exports.rcompare = rcompare function rcompare (a, b, loose) { return compare(b, a, loose) @@ -627,14 +660,14 @@ function rcompare (a, b, loose) { exports.sort = sort function sort (list, loose) { return list.sort(function (a, b) { - return exports.compare(a, b, loose) + return exports.compareBuild(a, b, loose) }) } exports.rsort = rsort function rsort (list, loose) { return list.sort(function (a, b) { - return exports.rcompare(a, b, loose) + return exports.compareBuild(b, a, loose) }) } @@ -754,7 +787,7 @@ Comparator.prototype.parse = function (comp) { throw new TypeError('Invalid comparator: ' + comp) } - this.operator = m[1] + this.operator = m[1] !== undefined ? m[1] : '' if (this.operator === '=') { this.operator = '' } @@ -774,12 +807,16 @@ Comparator.prototype.toString = function () { Comparator.prototype.test = function (version) { debug('Comparator.test', version, this.options.loose) - if (this.semver === ANY) { + if (this.semver === ANY || version === ANY) { return true } if (typeof version === 'string') { - version = new SemVer(version, this.options) + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } } return cmp(version, this.operator, this.semver, this.options) @@ -800,9 +837,15 @@ Comparator.prototype.intersects = function (comp, options) { var rangeTmp if (this.operator === '') { + if (this.value === '') { + return true + } rangeTmp = new Range(comp.value, options) return satisfies(this.value, rangeTmp, options) } else if (comp.operator === '') { + if (comp.value === '') { + return true + } rangeTmp = new Range(this.value, options) return satisfies(comp.semver, rangeTmp, options) } @@ -934,16 +977,40 @@ Range.prototype.intersects = function (range, options) { } return this.set.some(function (thisComparators) { - return thisComparators.every(function (thisComparator) { - return range.set.some(function (rangeComparators) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) + return ( + isSatisfiable(thisComparators, options) && + range.set.some(function (rangeComparators) { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every(function (thisComparator) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) }) - }) + ) }) } +// take a set of comparators and determine whether there +// exists a version which can satisfy it +function isSatisfiable (comparators, options) { + var result = true + var remainingComparators = comparators.slice() + var testComparator = remainingComparators.pop() + + while (result && remainingComparators.length) { + result = remainingComparators.every(function (otherComparator) { + return testComparator.intersects(otherComparator, options) + }) + + testComparator = remainingComparators.pop() + } + + return result +} + // Mostly just for testing and legacy API reasons exports.toComparators = toComparators function toComparators (range, options) { @@ -1099,10 +1166,14 @@ function replaceXRange (comp, options) { gtlt = '' } + // if we're including prereleases in the match, then we need + // to fix this to -0, the lowest possible prerelease value + pr = options.includePrerelease ? '-0' : '' + if (xM) { if (gtlt === '>' || gtlt === '<') { // nothing is allowed - ret = '<0.0.0' + ret = '<0.0.0-0' } else { // nothing is forbidden ret = '*' @@ -1139,11 +1210,12 @@ function replaceXRange (comp, options) { } } - ret = gtlt + M + '.' + m + '.' + p + ret = gtlt + M + '.' + m + '.' + p + pr } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + ret = '>=' + M + '.' + m + '.0' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + pr } debug('xRange return', ret) @@ -1200,7 +1272,11 @@ Range.prototype.test = function (version) { } if (typeof version === 'string') { - version = new SemVer(version, this.options) + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } } for (var i = 0; i < this.set.length; i++) { @@ -1462,22 +1538,52 @@ function intersects (r1, r2, options) { } exports.coerce = coerce -function coerce (version) { +function coerce (version, options) { if (version instanceof SemVer) { return version } + if (typeof version === 'number') { + version = String(version) + } + if (typeof version !== 'string') { return null } - var match = version.match(re[COERCE]) + options = options || {} + + var match = null + if (!options.rtl) { + match = version.match(re[COERCE]) + } else { + // Find the right-most coercible string that does not share + // a terminus with a more left-ward coercible string. + // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' + // + // Walk through the string checking with a /g regexp + // Manually set the index so as to pick up overlapping matches. + // Stop when we get a match that ends at the string end, since no + // coercible string can be more right-ward without the same terminus. + var next + while ((next = re[COERCERTL].exec(version)) && + (!match || match.index + match[0].length !== version.length) + ) { + if (!match || + next.index + next[0].length !== match.index + match[0].length) { + match = next + } + re[COERCERTL].lastIndex = next.index + next[1].length + next[2].length + } + // leave it in a clean state + re[COERCERTL].lastIndex = -1 + } - if (match == null) { + if (match === null) { return null } - return parse(match[1] + - '.' + (match[2] || '0') + - '.' + (match[3] || '0')) + return parse(match[2] + + '.' + (match[3] || '0') + + '.' + (match[4] || '0'), options) } diff --git a/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/index.js b/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/index.js new file mode 100644 index 00000000000000..96e0292c8e2f64 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/index.js @@ -0,0 +1,4 @@ +'use strict'; +const ansiRegex = require('ansi-regex'); + +module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input; diff --git a/tools/node_modules/eslint/node_modules/inquirer/node_modules/ansi-regex/license b/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/license similarity index 100% rename from tools/node_modules/eslint/node_modules/inquirer/node_modules/ansi-regex/license rename to tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/license diff --git a/tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/package.json b/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/package.json similarity index 76% rename from tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/package.json rename to tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/package.json index 0c379e41c1aa24..472b3021ed8201 100644 --- a/tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/package.json +++ b/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/package.json @@ -9,21 +9,19 @@ }, "bundleDependencies": false, "dependencies": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^3.0.0" }, "deprecated": false, - "description": "Strip ANSI escape codes from a string", + "description": "Strip ANSI escape codes", "devDependencies": { - "ava": "^1.3.1", - "tsd-check": "^0.5.0", - "xo": "^0.24.0" + "ava": "*", + "xo": "*" }, "engines": { - "node": ">=6" + "node": ">=4" }, "files": [ - "index.js", - "index.d.ts" + "index.js" ], "homepage": "https://github.com/chalk/strip-ansi#readme", "keywords": [ @@ -57,7 +55,7 @@ "url": "git+https://github.com/chalk/strip-ansi.git" }, "scripts": { - "test": "xo && ava && tsd-check" + "test": "xo && ava" }, - "version": "5.2.0" + "version": "4.0.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/readme.md b/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/readme.md similarity index 50% rename from tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/readme.md rename to tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/readme.md index 8681fe8af44242..dc76f0cb1a0595 100644 --- a/tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/readme.md +++ b/tools/node_modules/eslint/node_modules/string-width/node_modules/strip-ansi/readme.md @@ -1,20 +1,7 @@ # strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) -> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string +> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) ---- - -
- - Get professional support for 'strip-ansi' with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
- ---- ## Install @@ -30,21 +17,12 @@ const stripAnsi = require('strip-ansi'); stripAnsi('\u001B[4mUnicorn\u001B[0m'); //=> 'Unicorn' - -stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -//=> 'Click' ``` -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - ## Related - [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module -- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module - [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes - [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes - [chalk](https://github.com/chalk/chalk) - Terminal string styling done right diff --git a/tools/node_modules/eslint/node_modules/strip-ansi/index.js b/tools/node_modules/eslint/node_modules/strip-ansi/index.js index 96e0292c8e2f64..9788c96dfa3b0c 100644 --- a/tools/node_modules/eslint/node_modules/strip-ansi/index.js +++ b/tools/node_modules/eslint/node_modules/strip-ansi/index.js @@ -1,4 +1,7 @@ 'use strict'; const ansiRegex = require('ansi-regex'); -module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input; +const stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; + +module.exports = stripAnsi; +module.exports.default = stripAnsi; diff --git a/tools/node_modules/eslint/node_modules/inquirer/node_modules/ansi-regex/index.js b/tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/index.js similarity index 100% rename from tools/node_modules/eslint/node_modules/inquirer/node_modules/ansi-regex/index.js rename to tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/index.js diff --git a/tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/license b/tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/license similarity index 100% rename from tools/node_modules/eslint/node_modules/inquirer/node_modules/strip-ansi/license rename to tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/license diff --git a/tools/node_modules/eslint/node_modules/inquirer/node_modules/ansi-regex/package.json b/tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/package.json similarity index 100% rename from tools/node_modules/eslint/node_modules/inquirer/node_modules/ansi-regex/package.json rename to tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/package.json diff --git a/tools/node_modules/eslint/node_modules/inquirer/node_modules/ansi-regex/readme.md b/tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/readme.md similarity index 100% rename from tools/node_modules/eslint/node_modules/inquirer/node_modules/ansi-regex/readme.md rename to tools/node_modules/eslint/node_modules/strip-ansi/node_modules/ansi-regex/readme.md diff --git a/tools/node_modules/eslint/node_modules/strip-ansi/package.json b/tools/node_modules/eslint/node_modules/strip-ansi/package.json index 472b3021ed8201..0c379e41c1aa24 100644 --- a/tools/node_modules/eslint/node_modules/strip-ansi/package.json +++ b/tools/node_modules/eslint/node_modules/strip-ansi/package.json @@ -9,19 +9,21 @@ }, "bundleDependencies": false, "dependencies": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^4.1.0" }, "deprecated": false, - "description": "Strip ANSI escape codes", + "description": "Strip ANSI escape codes from a string", "devDependencies": { - "ava": "*", - "xo": "*" + "ava": "^1.3.1", + "tsd-check": "^0.5.0", + "xo": "^0.24.0" }, "engines": { - "node": ">=4" + "node": ">=6" }, "files": [ - "index.js" + "index.js", + "index.d.ts" ], "homepage": "https://github.com/chalk/strip-ansi#readme", "keywords": [ @@ -55,7 +57,7 @@ "url": "git+https://github.com/chalk/strip-ansi.git" }, "scripts": { - "test": "xo && ava" + "test": "xo && ava && tsd-check" }, - "version": "4.0.0" + "version": "5.2.0" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/strip-ansi/readme.md b/tools/node_modules/eslint/node_modules/strip-ansi/readme.md index dc76f0cb1a0595..8681fe8af44242 100644 --- a/tools/node_modules/eslint/node_modules/strip-ansi/readme.md +++ b/tools/node_modules/eslint/node_modules/strip-ansi/readme.md @@ -1,7 +1,20 @@ # strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) -> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) +> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string +--- + +
+ + Get professional support for 'strip-ansi' with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
+ +--- ## Install @@ -17,12 +30,21 @@ const stripAnsi = require('strip-ansi'); stripAnsi('\u001B[4mUnicorn\u001B[0m'); //=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' ``` +## Security + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + + ## Related - [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module - [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes - [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes - [chalk](https://github.com/chalk/chalk) - Terminal string styling done right diff --git a/tools/node_modules/eslint/node_modules/strip-json-comments/index.js b/tools/node_modules/eslint/node_modules/strip-json-comments/index.js index 4e6576e6d3c388..c37da3de24849c 100644 --- a/tools/node_modules/eslint/node_modules/strip-json-comments/index.js +++ b/tools/node_modules/eslint/node_modules/strip-json-comments/index.js @@ -1,32 +1,35 @@ 'use strict'; -var singleComment = 1; -var multiComment = 2; +const singleComment = Symbol('singleComment'); +const multiComment = Symbol('multiComment'); +const stripWithoutWhitespace = () => ''; +const stripWithWhitespace = (string, start, end) => string.slice(start, end).replace(/\S/g, ' '); -function stripWithoutWhitespace() { - return ''; -} +const isEscaped = (jsonString, quotePosition) => { + let index = quotePosition - 1; + let backslashCount = 0; -function stripWithWhitespace(str, start, end) { - return str.slice(start, end).replace(/\S/g, ' '); -} + while (jsonString[index] === '\\') { + index -= 1; + backslashCount += 1; + } + + return Boolean(backslashCount % 2); +}; -module.exports = function (str, opts) { - opts = opts || {}; +module.exports = (jsonString, options = {}) => { + const strip = options.whitespace === false ? stripWithoutWhitespace : stripWithWhitespace; - var currentChar; - var nextChar; - var insideString = false; - var insideComment = false; - var offset = 0; - var ret = ''; - var strip = opts.whitespace === false ? stripWithoutWhitespace : stripWithWhitespace; + let insideString = false; + let insideComment = false; + let offset = 0; + let result = ''; - for (var i = 0; i < str.length; i++) { - currentChar = str[i]; - nextChar = str[i + 1]; + for (let i = 0; i < jsonString.length; i++) { + const currentCharacter = jsonString[i]; + const nextCharacter = jsonString[i + 1]; - if (!insideComment && currentChar === '"') { - var escaped = str[i - 1] === '\\' && str[i - 2] !== '\\'; + if (!insideComment && currentCharacter === '"') { + const escaped = isEscaped(jsonString, i); if (!escaped) { insideString = !insideString; } @@ -36,35 +39,35 @@ module.exports = function (str, opts) { continue; } - if (!insideComment && currentChar + nextChar === '//') { - ret += str.slice(offset, i); + if (!insideComment && currentCharacter + nextCharacter === '//') { + result += jsonString.slice(offset, i); offset = i; insideComment = singleComment; i++; - } else if (insideComment === singleComment && currentChar + nextChar === '\r\n') { + } else if (insideComment === singleComment && currentCharacter + nextCharacter === '\r\n') { i++; insideComment = false; - ret += strip(str, offset, i); + result += strip(jsonString, offset, i); offset = i; continue; - } else if (insideComment === singleComment && currentChar === '\n') { + } else if (insideComment === singleComment && currentCharacter === '\n') { insideComment = false; - ret += strip(str, offset, i); + result += strip(jsonString, offset, i); offset = i; - } else if (!insideComment && currentChar + nextChar === '/*') { - ret += str.slice(offset, i); + } else if (!insideComment && currentCharacter + nextCharacter === '/*') { + result += jsonString.slice(offset, i); offset = i; insideComment = multiComment; i++; continue; - } else if (insideComment === multiComment && currentChar + nextChar === '*/') { + } else if (insideComment === multiComment && currentCharacter + nextCharacter === '*/') { i++; insideComment = false; - ret += strip(str, offset, i + 1); + result += strip(jsonString, offset, i + 1); offset = i + 1; continue; } } - return ret + (insideComment ? strip(str.substr(offset)) : str.substr(offset)); + return result + (insideComment ? strip(jsonString.slice(offset)) : jsonString.slice(offset)); }; diff --git a/tools/node_modules/eslint/node_modules/strip-json-comments/license b/tools/node_modules/eslint/node_modules/strip-json-comments/license index 654d0bfe943437..e7af2f77107d73 100644 --- a/tools/node_modules/eslint/node_modules/strip-json-comments/license +++ b/tools/node_modules/eslint/node_modules/strip-json-comments/license @@ -1,21 +1,9 @@ -The MIT License (MIT) +MIT License Copyright (c) Sindre Sorhus (sindresorhus.com) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/node_modules/eslint/node_modules/strip-json-comments/package.json b/tools/node_modules/eslint/node_modules/strip-json-comments/package.json index dd3c353b821377..e10695c2825cfe 100644 --- a/tools/node_modules/eslint/node_modules/strip-json-comments/package.json +++ b/tools/node_modules/eslint/node_modules/strip-json-comments/package.json @@ -11,28 +11,30 @@ "deprecated": false, "description": "Strip comments from JSON. Lets you use comments in your JSON files!", "devDependencies": { - "ava": "*", - "xo": "*" + "ava": "^1.4.1", + "matcha": "^0.7.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" }, "files": [ - "index.js" + "index.js", + "index.d.ts" ], "homepage": "https://github.com/sindresorhus/strip-json-comments#readme", "keywords": [ "json", "strip", + "comments", "remove", "delete", "trim", - "comments", "multiline", "parse", "config", "configuration", - "conf", "settings", "util", "env", @@ -45,7 +47,8 @@ "url": "git+https://github.com/sindresorhus/strip-json-comments.git" }, "scripts": { - "test": "xo && ava" + "bench": "matcha benchmark.js", + "test": "xo && ava && tsd" }, - "version": "2.0.1" + "version": "3.0.1" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/strip-json-comments/readme.md b/tools/node_modules/eslint/node_modules/strip-json-comments/readme.md index 0ee58dfe3a2e9b..9ebfc206c4fed5 100644 --- a/tools/node_modules/eslint/node_modules/strip-json-comments/readme.md +++ b/tools/node_modules/eslint/node_modules/strip-json-comments/readme.md @@ -6,27 +6,30 @@ This is now possible: ```js { - // rainbows + // Rainbows "unicorn": /* ❤ */ "cake" } ``` It will replace single-line comments `//` and multi-line comments `/**/` with whitespace. This allows JSON error positions to remain as close as possible to the original source. -Also available as a [gulp](https://github.com/sindresorhus/gulp-strip-json-comments)/[grunt](https://github.com/sindresorhus/grunt-strip-json-comments)/[broccoli](https://github.com/sindresorhus/broccoli-strip-json-comments) plugin. +Also available as a [Gulp](https://github.com/sindresorhus/gulp-strip-json-comments)/[Grunt](https://github.com/sindresorhus/grunt-strip-json-comments)/[Broccoli](https://github.com/sindresorhus/broccoli-strip-json-comments) plugin. ## Install ``` -$ npm install --save strip-json-comments +$ npm install strip-json-comments ``` ## Usage ```js -const json = '{/*rainbows*/"unicorn":"cake"}'; +const json = `{ + // Rainbows + "unicorn": /* ❤ */ "cake" +}`; JSON.parse(stripJsonComments(json)); //=> {unicorn: 'cake'} @@ -35,9 +38,9 @@ JSON.parse(stripJsonComments(json)); ## API -### stripJsonComments(input, [options]) +### stripJsonComments(jsonString, [options]) -#### input +#### jsonString Type: `string` @@ -45,14 +48,23 @@ Accepts a string with JSON and returns a string without comments. #### options +Type: `object` + ##### whitespace -Type: `boolean` +Type: `boolean`
Default: `true` Replace comments with whitespace instead of stripping them entirely. +## Benchmark + +``` +$ npm run bench +``` + + ## Related - [strip-json-comments-cli](https://github.com/sindresorhus/strip-json-comments-cli) - CLI for this module @@ -61,4 +73,4 @@ Replace comments with whitespace instead of stripping them entirely. ## License -MIT © [Sindre Sorhus](http://sindresorhus.com) +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/tools/node_modules/eslint/node_modules/table/dist/alignString.js b/tools/node_modules/eslint/node_modules/table/dist/alignString.js index a599ce8f9b5e1a..24dc423f9033fe 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/alignString.js +++ b/tools/node_modules/eslint/node_modules/table/dist/alignString.js @@ -80,7 +80,7 @@ const alignString = (subject, containerWidth, alignment) => { throw new TypeError('Alignment parameter value must be a string.'); } - if (alignments.indexOf(alignment) === -1) { + if (!alignments.includes(alignment)) { throw new Error('Alignment parameter value must be a known alignment parameter value (left, right, center).'); } diff --git a/tools/node_modules/eslint/node_modules/table/dist/alignString.js.flow b/tools/node_modules/eslint/node_modules/table/dist/alignString.js.flow index 16936a44c14dcf..f0383ff460a5bb 100644 --- a/tools/node_modules/eslint/node_modules/table/dist/alignString.js.flow +++ b/tools/node_modules/eslint/node_modules/table/dist/alignString.js.flow @@ -74,7 +74,7 @@ export default (subject, containerWidth, alignment) => { throw new TypeError('Alignment parameter value must be a string.'); } - if (alignments.indexOf(alignment) === -1) { + if (!alignments.includes(alignment)) { throw new Error('Alignment parameter value must be a known alignment parameter value (left, right, center).'); } diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/index.js b/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/index.js deleted file mode 100644 index c25448009f304d..00000000000000 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -module.exports = options => { - options = Object.assign({ - onlyFirst: false - }, options); - - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, options.onlyFirst ? undefined : 'g'); -}; diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/license b/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/license deleted file mode 100644 index e7af2f77107d73..00000000000000 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/package.json b/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/package.json deleted file mode 100644 index db8f3cc8c7d14e..00000000000000 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/chalk/ansi-regex/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Regular expression for matching ANSI escape codes", - "devDependencies": { - "ava": "^0.25.0", - "xo": "^0.23.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/chalk/ansi-regex#readme", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "license": "MIT", - "name": "ansi-regex", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/ansi-regex.git" - }, - "scripts": { - "test": "xo && ava", - "view-supported": "node fixtures/view-codes.js" - }, - "version": "4.1.0" -} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/readme.md b/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/readme.md deleted file mode 100644 index d19c44667e704b..00000000000000 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ansi-regex/readme.md +++ /dev/null @@ -1,87 +0,0 @@ -# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) - -> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) - ---- - -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
- ---- - - -## Install - -``` -$ npm install ansi-regex -``` - - -## Usage - -```js -const ansiRegex = require('ansi-regex'); - -ansiRegex().test('\u001B[4mcake\u001B[0m'); -//=> true - -ansiRegex().test('cake'); -//=> false - -'\u001B[4mcake\u001B[0m'.match(ansiRegex()); -//=> ['\u001B[4m', '\u001B[0m'] - -'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); -//=> ['\u001B[4m'] - -'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); -//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] -``` - - -## API - -### ansiRegex([options]) - -Returns a regex for matching ANSI escape codes. - -#### options - -##### onlyFirst - -Type: `boolean`
-Default: `false` *(Matches any ANSI escape codes in a string)* - -Match only the first ANSI escape. - - -## FAQ - -### Why do you test for codes not in the ECMA 48 standard? - -Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. - -On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/index.js b/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/index.js deleted file mode 100644 index 9788c96dfa3b0c..00000000000000 --- a/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; -const ansiRegex = require('ansi-regex'); - -const stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; - -module.exports = stripAnsi; -module.exports.default = stripAnsi; diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/license b/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/license deleted file mode 100644 index e7af2f77107d73..00000000000000 --- a/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/package.json b/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/package.json deleted file mode 100644 index 0c379e41c1aa24..00000000000000 --- a/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/chalk/strip-ansi/issues" - }, - "bundleDependencies": false, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "deprecated": false, - "description": "Strip ANSI escape codes from a string", - "devDependencies": { - "ava": "^1.3.1", - "tsd-check": "^0.5.0", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/chalk/strip-ansi#readme", - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "name": "strip-ansi", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/strip-ansi.git" - }, - "scripts": { - "test": "xo && ava && tsd-check" - }, - "version": "5.2.0" -} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/readme.md b/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/readme.md deleted file mode 100644 index 8681fe8af44242..00000000000000 --- a/tools/node_modules/eslint/node_modules/table/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,61 +0,0 @@ -# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) - -> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string - ---- - -
- - Get professional support for 'strip-ansi' with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
- ---- - -## Install - -``` -$ npm install strip-ansi -``` - - -## Usage - -```js -const stripAnsi = require('strip-ansi'); - -stripAnsi('\u001B[4mUnicorn\u001B[0m'); -//=> 'Unicorn' - -stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -//=> 'Click' -``` - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## Related - -- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module -- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module -- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes -- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/tools/node_modules/eslint/node_modules/table/package.json b/tools/node_modules/eslint/node_modules/table/package.json index 54ffba30c84313..6d2a7df80c04ac 100644 --- a/tools/node_modules/eslint/node_modules/table/package.json +++ b/tools/node_modules/eslint/node_modules/table/package.json @@ -9,37 +9,37 @@ }, "bundleDependencies": false, "dependencies": { - "ajv": "^6.9.1", - "lodash": "^4.17.11", + "ajv": "^6.10.2", + "lodash": "^4.17.14", "slice-ansi": "^2.1.0", "string-width": "^3.0.0" }, "deprecated": false, "description": "Formats data into a string table.", "devDependencies": { - "@babel/cli": "^7.2.3", - "@babel/core": "^7.2.2", - "@babel/node": "^7.2.2", - "@babel/plugin-transform-flow-strip-types": "^7.2.3", - "@babel/preset-env": "^7.3.1", - "@babel/register": "^7.0.0", + "@babel/cli": "^7.5.0", + "@babel/core": "^7.5.4", + "@babel/node": "^7.5.0", + "@babel/plugin-transform-flow-strip-types": "^7.4.4", + "@babel/preset-env": "^7.5.4", + "@babel/register": "^7.4.4", "ajv-cli": "^3.0.0", - "ajv-keywords": "^3.4.0", - "babel-plugin-istanbul": "^5.1.0", + "ajv-keywords": "^3.4.1", + "babel-plugin-istanbul": "^5.1.4", "babel-plugin-transform-export-default-name": "^2.0.4", "chai": "^4.2.0", "chalk": "^2.4.2", - "coveralls": "^3.0.2", + "coveralls": "^3.0.5", "eslint": "^5.13.0", "eslint-config-canonical": "^16.1.0", - "flow-bin": "^0.92.1", - "flow-copy-source": "^2.0.2", - "gitdown": "^2.5.7", - "husky": "^1.3.1", - "mocha": "^5.2.0", - "nyc": "^13.2.0", - "semantic-release": "^15.13.3", - "sinon": "^7.2.3" + "flow-bin": "^0.102.0", + "flow-copy-source": "^2.0.7", + "gitdown": "^3.1.1", + "husky": "^3.0.0", + "mocha": "^6.1.4", + "nyc": "^14.1.1", + "semantic-release": "^15.13.18", + "sinon": "^7.3.2" }, "engines": { "node": ">=6.0.0" @@ -85,5 +85,5 @@ "lint": "npm run build && eslint ./src ./test && flow", "test": "mocha --require @babel/register" }, - "version": "5.4.1" + "version": "5.4.4" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/tslib/README.md b/tools/node_modules/eslint/node_modules/tslib/README.md index 3fd109d7317bbc..84c47cab59d0aa 100644 --- a/tools/node_modules/eslint/node_modules/tslib/README.md +++ b/tools/node_modules/eslint/node_modules/tslib/README.md @@ -102,9 +102,9 @@ You will need to add a `paths` mapping for `tslib`, e.g. For Bower users: For JSPM users: ```json -{ - "compilerOptions": { - "module": "system", +{ + "compilerOptions": { + "module": "system", "importHelpers": true, "baseUrl": "./", "paths": { @@ -112,9 +112,9 @@ For JSPM users: } } } -``` - - +``` + + # Contribute There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript. diff --git a/tools/node_modules/eslint/node_modules/tslib/tslib.es6.js b/tools/node_modules/eslint/node_modules/tslib/tslib.es6.js index 9b31275ec36647..08d746f54c02bb 100644 --- a/tools/node_modules/eslint/node_modules/tslib/tslib.es6.js +++ b/tools/node_modules/eslint/node_modules/tslib/tslib.es6.js @@ -37,9 +37,9 @@ export var __assign = function() { } return __assign.apply(this, arguments); } - -export function __rest(s, e) { - var t = {}; + +export function __rest(s, e) { + var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") @@ -50,9 +50,9 @@ export function __rest(s, e) { return t; } -export function __decorate(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); +export function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } @@ -134,9 +134,9 @@ export function __read(o, n) { return ar; } -export function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); +export function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); return ar; } @@ -151,9 +151,9 @@ export function __spreadArrays() { export function __await(v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } - -export function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + +export function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } diff --git a/tools/node_modules/eslint/node_modules/tslib/tslib.js b/tools/node_modules/eslint/node_modules/tslib/tslib.js index 523106e3bbcee0..1eae417046f6eb 100644 --- a/tools/node_modules/eslint/node_modules/tslib/tslib.js +++ b/tools/node_modules/eslint/node_modules/tslib/tslib.js @@ -19,9 +19,9 @@ var __rest; var __decorate; var __param; var __metadata; -var __awaiter; -var __generator; -var __exportStar; +var __awaiter; +var __generator; +var __exportStar; var __values; var __read; var __spread; @@ -29,9 +29,9 @@ var __spreadArrays; var __await; var __asyncGenerator; var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; +var __asyncValues; +var __makeTemplateObject; +var __importStar; var __importDefault; (function (factory) { var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; @@ -74,9 +74,9 @@ var __importDefault; } return t; }; - - __rest = function (s, e) { - var t = {}; + + __rest = function (s, e) { + var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") @@ -87,9 +87,9 @@ var __importDefault; return t; }; - __decorate = function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; @@ -171,9 +171,9 @@ var __importDefault; return ar; }; - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); return ar; }; @@ -188,9 +188,9 @@ var __importDefault; __await = function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }; - - __asyncGenerator = function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } @@ -238,9 +238,9 @@ var __importDefault; exporter("__decorate", __decorate); exporter("__param", __param); exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); exporter("__values", __values); exporter("__read", __read); exporter("__spread", __spread); @@ -248,8 +248,8 @@ var __importDefault; exporter("__await", __await); exporter("__asyncGenerator", __asyncGenerator); exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); exporter("__importDefault", __importDefault); }); diff --git a/tools/node_modules/eslint/node_modules/v8-compile-cache/LICENSE b/tools/node_modules/eslint/node_modules/v8-compile-cache/LICENSE new file mode 100644 index 00000000000000..b72b6701877c7f --- /dev/null +++ b/tools/node_modules/eslint/node_modules/v8-compile-cache/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 Andres Suarez + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tools/node_modules/eslint/node_modules/v8-compile-cache/README.md b/tools/node_modules/eslint/node_modules/v8-compile-cache/README.md new file mode 100644 index 00000000000000..ad0ede6188c23a --- /dev/null +++ b/tools/node_modules/eslint/node_modules/v8-compile-cache/README.md @@ -0,0 +1,53 @@ +# v8-compile-cache + +[![Build Status](https://travis-ci.org/zertosh/v8-compile-cache.svg?branch=master)](https://travis-ci.org/zertosh/v8-compile-cache) + +`v8-compile-cache` attaches a `require` hook to use [V8's code cache](https://v8project.blogspot.com/2015/07/code-caching.html) to speed up instantiation time. The "code cache" is the work of parsing and compiling done by V8. + +The ability to tap into V8 to produce/consume this cache was introduced in [Node v5.7.0](https://nodejs.org/en/blog/release/v5.7.0/). + +## Usage + +1. Add the dependency: + + ```sh + $ npm install --save v8-compile-cache + ``` + +2. Then, in your entry module add: + + ```js + require('v8-compile-cache'); + ``` + +**Requiring `v8-compile-cache` in Node <5.7.0 is a noop – but you need at least Node 4.0.0 to support the ES2015 syntax used by `v8-compile-cache`.** + +## Options + +Set the environment variable `DISABLE_V8_COMPILE_CACHE=1` to disable the cache. + +## Internals + +The caches are stored in `$TMP/v8-compile-cache/V8_VERSION`, where there are `.BLOB` and `.MAP` files corresponding to the entry module that required `v8-compile-cache`. The cache is _entry module specific_ because it is faster to load the entire code cache into memory at once, than it is to read it from disk on a file-by-file basis. + +## Benchmarks + +See https://github.com/zertosh/v8-compile-cache/tree/master/bench. + +**Load Times:** + +| Module | Without Cache | With Cache | +| ---------------- | -------------:| ----------:| +| `babel-core` | `218ms` | `185ms` | +| `yarn` | `153ms` | `113ms` | +| `yarn` (bundled) | `228ms` | `105ms` | + +_^ Includes the overhead of loading the cache itself._ + +## Acknowledgements + +* `FileSystemBlobStore` and `NativeCompileCache` are based on Atom's implementation of their v8 compile cache: + - https://github.com/atom/atom/blob/b0d7a8a/src/file-system-blob-store.js + - https://github.com/atom/atom/blob/b0d7a8a/src/native-compile-cache.js +* `mkdirpSync` is based on: + - https://github.com/substack/node-mkdirp/blob/f2003bb/index.js#L55-L98 diff --git a/tools/node_modules/eslint/node_modules/v8-compile-cache/package.json b/tools/node_modules/eslint/node_modules/v8-compile-cache/package.json new file mode 100644 index 00000000000000..30189995283fe8 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/v8-compile-cache/package.json @@ -0,0 +1,42 @@ +{ + "author": { + "name": "Andres Suarez", + "email": "zertosh@gmail.com" + }, + "bugs": { + "url": "https://github.com/zertosh/v8-compile-cache/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Require hook for automatic V8 compile cache persistence", + "devDependencies": { + "babel-core": "6.23.1", + "eslint": "^3.15.0", + "flow-parser": "0.38.0", + "rimraf": "^2.5.4", + "rxjs": "5.2.0", + "semver": "^5.3.0", + "tap": "^10.1.1", + "temp": "^0.8.3", + "yarn": "0.20.3" + }, + "files": [ + "v8-compile-cache.js" + ], + "homepage": "https://github.com/zertosh/v8-compile-cache#readme", + "license": "MIT", + "main": "v8-compile-cache.js", + "name": "v8-compile-cache", + "repository": { + "type": "git", + "url": "git+https://github.com/zertosh/v8-compile-cache.git" + }, + "scripts": { + "bench": "bench/run.sh", + "lint": "eslint --max-warnings=0 .", + "posttest": "npm run lint", + "test": "tap test/*-test.js" + }, + "version": "2.0.3" +} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/v8-compile-cache/v8-compile-cache.js b/tools/node_modules/eslint/node_modules/v8-compile-cache/v8-compile-cache.js new file mode 100644 index 00000000000000..e7a226b8a91063 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/v8-compile-cache/v8-compile-cache.js @@ -0,0 +1,365 @@ +'use strict'; + +const Module = require('module'); +const crypto = require('crypto'); +const fs = require('fs'); +const path = require('path'); +const vm = require('vm'); +const os = require('os'); + +const hasOwnProperty = Object.prototype.hasOwnProperty; + +//------------------------------------------------------------------------------ +// FileSystemBlobStore +//------------------------------------------------------------------------------ + +class FileSystemBlobStore { + constructor(directory, prefix) { + const name = prefix ? slashEscape(prefix + '.') : ''; + this._blobFilename = path.join(directory, name + 'BLOB'); + this._mapFilename = path.join(directory, name + 'MAP'); + this._lockFilename = path.join(directory, name + 'LOCK'); + this._directory = directory; + this._load(); + } + + has(key, invalidationKey) { + if (hasOwnProperty.call(this._memoryBlobs, key)) { + return this._invalidationKeys[key] === invalidationKey; + } else if (hasOwnProperty.call(this._storedMap, key)) { + return this._storedMap[key][0] === invalidationKey; + } + return false; + } + + get(key, invalidationKey) { + if (hasOwnProperty.call(this._memoryBlobs, key)) { + if (this._invalidationKeys[key] === invalidationKey) { + return this._memoryBlobs[key]; + } + } else if (hasOwnProperty.call(this._storedMap, key)) { + const mapping = this._storedMap[key]; + if (mapping[0] === invalidationKey) { + return this._storedBlob.slice(mapping[1], mapping[2]); + } + } + } + + set(key, invalidationKey, buffer) { + this._invalidationKeys[key] = invalidationKey; + this._memoryBlobs[key] = buffer; + this._dirty = true; + } + + delete(key) { + if (hasOwnProperty.call(this._memoryBlobs, key)) { + this._dirty = true; + delete this._memoryBlobs[key]; + } + if (hasOwnProperty.call(this._invalidationKeys, key)) { + this._dirty = true; + delete this._invalidationKeys[key]; + } + if (hasOwnProperty.call(this._storedMap, key)) { + this._dirty = true; + delete this._storedMap[key]; + } + } + + isDirty() { + return this._dirty; + } + + save() { + const dump = this._getDump(); + const blobToStore = Buffer.concat(dump[0]); + const mapToStore = JSON.stringify(dump[1]); + + try { + mkdirpSync(this._directory); + fs.writeFileSync(this._lockFilename, 'LOCK', {flag: 'wx'}); + } catch (error) { + // Swallow the exception if we fail to acquire the lock. + return false; + } + + try { + fs.writeFileSync(this._blobFilename, blobToStore); + fs.writeFileSync(this._mapFilename, mapToStore); + } catch (error) { + throw error; + } finally { + fs.unlinkSync(this._lockFilename); + } + + return true; + } + + _load() { + try { + this._storedBlob = fs.readFileSync(this._blobFilename); + this._storedMap = JSON.parse(fs.readFileSync(this._mapFilename)); + } catch (e) { + this._storedBlob = Buffer.alloc(0); + this._storedMap = {}; + } + this._dirty = false; + this._memoryBlobs = {}; + this._invalidationKeys = {}; + } + + _getDump() { + const buffers = []; + const newMap = {}; + let offset = 0; + + function push(key, invalidationKey, buffer) { + buffers.push(buffer); + newMap[key] = [invalidationKey, offset, offset + buffer.length]; + offset += buffer.length; + } + + for (const key of Object.keys(this._memoryBlobs)) { + const buffer = this._memoryBlobs[key]; + const invalidationKey = this._invalidationKeys[key]; + push(key, invalidationKey, buffer); + } + + for (const key of Object.keys(this._storedMap)) { + if (hasOwnProperty.call(newMap, key)) continue; + const mapping = this._storedMap[key]; + const buffer = this._storedBlob.slice(mapping[1], mapping[2]); + push(key, mapping[0], buffer); + } + + return [buffers, newMap]; + } +} + +//------------------------------------------------------------------------------ +// NativeCompileCache +//------------------------------------------------------------------------------ + +class NativeCompileCache { + constructor() { + this._cacheStore = null; + this._previousModuleCompile = null; + } + + setCacheStore(cacheStore) { + this._cacheStore = cacheStore; + } + + install() { + const self = this; + const hasRequireResolvePaths = typeof require.resolve.paths === 'function'; + this._previousModuleCompile = Module.prototype._compile; + Module.prototype._compile = function(content, filename) { + const mod = this; + + function require(id) { + return mod.require(id); + } + + // https://github.com/nodejs/node/blob/v10.15.3/lib/internal/modules/cjs/helpers.js#L28 + function resolve(request, options) { + return Module._resolveFilename(request, mod, false, options); + } + require.resolve = resolve; + + // https://github.com/nodejs/node/blob/v10.15.3/lib/internal/modules/cjs/helpers.js#L37 + // resolve.resolve.paths was added in v8.9.0 + if (hasRequireResolvePaths) { + resolve.paths = function paths(request) { + return Module._resolveLookupPaths(request, mod, true); + }; + } + + require.main = process.mainModule; + + // Enable support to add extra extension types + require.extensions = Module._extensions; + require.cache = Module._cache; + + const dirname = path.dirname(filename); + + const compiledWrapper = self._moduleCompile(filename, content); + + // We skip the debugger setup because by the time we run, node has already + // done that itself. + + const args = [mod.exports, require, mod, filename, dirname, process, global]; + return compiledWrapper.apply(mod.exports, args); + }; + } + + uninstall() { + Module.prototype._compile = this._previousModuleCompile; + } + + _moduleCompile(filename, content) { + // https://github.com/nodejs/node/blob/v7.5.0/lib/module.js#L511 + + // Remove shebang + var contLen = content.length; + if (contLen >= 2) { + if (content.charCodeAt(0) === 35/*#*/ && + content.charCodeAt(1) === 33/*!*/) { + if (contLen === 2) { + // Exact match + content = ''; + } else { + // Find end of shebang line and slice it off + var i = 2; + for (; i < contLen; ++i) { + var code = content.charCodeAt(i); + if (code === 10/*\n*/ || code === 13/*\r*/) break; + } + if (i === contLen) { + content = ''; + } else { + // Note that this actually includes the newline character(s) in the + // new output. This duplicates the behavior of the regular + // expression that was previously used to replace the shebang line + content = content.slice(i); + } + } + } + } + + // create wrapper function + var wrapper = Module.wrap(content); + + var invalidationKey = crypto + .createHash('sha1') + .update(content, 'utf8') + .digest('hex'); + + var buffer = this._cacheStore.get(filename, invalidationKey); + + var script = new vm.Script(wrapper, { + filename: filename, + lineOffset: 0, + displayErrors: true, + cachedData: buffer, + produceCachedData: true, + }); + + if (script.cachedDataProduced) { + this._cacheStore.set(filename, invalidationKey, script.cachedData); + } else if (script.cachedDataRejected) { + this._cacheStore.delete(filename); + } + + var compiledWrapper = script.runInThisContext({ + filename: filename, + lineOffset: 0, + columnOffset: 0, + displayErrors: true, + }); + + return compiledWrapper; + } +} + +//------------------------------------------------------------------------------ +// utilities +// +// https://github.com/substack/node-mkdirp/blob/f2003bb/index.js#L55-L98 +// https://github.com/zertosh/slash-escape/blob/e7ebb99/slash-escape.js +//------------------------------------------------------------------------------ + +function mkdirpSync(p_) { + _mkdirpSync(path.resolve(p_), parseInt('0777', 8) & ~process.umask()); +} + +function _mkdirpSync(p, mode) { + try { + fs.mkdirSync(p, mode); + } catch (err0) { + if (err0.code === 'ENOENT') { + _mkdirpSync(path.dirname(p)); + _mkdirpSync(p); + } else { + try { + const stat = fs.statSync(p); + if (!stat.isDirectory()) { throw err0; } + } catch (err1) { + throw err0; + } + } + } +} + +function slashEscape(str) { + const ESCAPE_LOOKUP = { + '\\': 'zB', + ':': 'zC', + '/': 'zS', + '\x00': 'z0', + 'z': 'zZ', + }; + return str.replace(/[\\:\/\x00z]/g, match => (ESCAPE_LOOKUP[match])); +} + +function supportsCachedData() { + const script = new vm.Script('""', {produceCachedData: true}); + // chakracore, as of v1.7.1.0, returns `false`. + return script.cachedDataProduced === true; +} + +function getCacheDir() { + // Avoid cache ownership issues on POSIX systems. + const dirname = typeof process.getuid === 'function' + ? 'v8-compile-cache-' + process.getuid() + : 'v8-compile-cache'; + const version = typeof process.versions.v8 === 'string' + ? process.versions.v8 + : typeof process.versions.chakracore === 'string' + ? 'chakracore-' + process.versions.chakracore + : 'node-' + process.version; + const cacheDir = path.join(os.tmpdir(), dirname, version); + return cacheDir; +} + +function getParentName() { + // `module.parent.filename` is undefined or null when: + // * node -e 'require("v8-compile-cache")' + // * node -r 'v8-compile-cache' + // * Or, requiring from the REPL. + const parentName = module.parent && typeof module.parent.filename === 'string' + ? module.parent.filename + : process.cwd(); + return parentName; +} + +//------------------------------------------------------------------------------ +// main +//------------------------------------------------------------------------------ + +if (!process.env.DISABLE_V8_COMPILE_CACHE && supportsCachedData()) { + const cacheDir = getCacheDir(); + const prefix = getParentName(); + const blobStore = new FileSystemBlobStore(cacheDir, prefix); + + const nativeCompileCache = new NativeCompileCache(); + nativeCompileCache.setCacheStore(blobStore); + nativeCompileCache.install(); + + process.once('exit', code => { + if (blobStore.isDirty()) { + blobStore.save(); + } + nativeCompileCache.uninstall(); + }); +} + +module.exports.__TEST__ = { + FileSystemBlobStore, + NativeCompileCache, + mkdirpSync, + slashEscape, + supportsCachedData, + getCacheDir, + getParentName, +}; diff --git a/tools/node_modules/eslint/node_modules/xtend/LICENCE b/tools/node_modules/eslint/node_modules/xtend/LICENSE similarity index 97% rename from tools/node_modules/eslint/node_modules/xtend/LICENCE rename to tools/node_modules/eslint/node_modules/xtend/LICENSE index 1a14b437e87a8f..0099f4f6c77f40 100644 --- a/tools/node_modules/eslint/node_modules/xtend/LICENCE +++ b/tools/node_modules/eslint/node_modules/xtend/LICENSE @@ -1,3 +1,4 @@ +The MIT License (MIT) Copyright (c) 2012-2014 Raynos. Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/tools/node_modules/eslint/node_modules/xtend/Makefile b/tools/node_modules/eslint/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf49dc1a3..00000000000000 --- a/tools/node_modules/eslint/node_modules/xtend/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -browser: - node ./support/compile - -.PHONY: browser \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/xtend/README.md b/tools/node_modules/eslint/node_modules/xtend/README.md index 093cb2978e4af0..ecae00d585cbd1 100644 --- a/tools/node_modules/eslint/node_modules/xtend/README.md +++ b/tools/node_modules/eslint/node_modules/xtend/README.md @@ -16,7 +16,7 @@ var extend = require("xtend") // extend returns a new object. Does not mutate arguments var combination = extend({ a: "a", - b: 'c' + b: "c" }, { b: "b" }) @@ -25,7 +25,7 @@ var combination = extend({ ## Stability status: Locked -## MIT Licenced +## MIT Licensed [3]: http://ci.testling.com/Raynos/xtend.png diff --git a/tools/node_modules/eslint/node_modules/xtend/package.json b/tools/node_modules/eslint/node_modules/xtend/package.json index 3303e0d2f725bf..970fcf29de706d 100644 --- a/tools/node_modules/eslint/node_modules/xtend/package.json +++ b/tools/node_modules/eslint/node_modules/xtend/package.json @@ -59,5 +59,5 @@ "iphone/6.0..latest" ] }, - "version": "4.0.1" + "version": "4.0.2" } \ No newline at end of file diff --git a/tools/node_modules/eslint/package.json b/tools/node_modules/eslint/package.json index 530373a2204808..88a2141a91afa4 100644 --- a/tools/node_modules/eslint/package.json +++ b/tools/node_modules/eslint/package.json @@ -18,7 +18,7 @@ "debug": "^4.0.1", "doctrine": "^3.0.0", "eslint-plugin-markdown": "^1.0.0", - "eslint-scope": "^4.0.3", + "eslint-scope": "^5.0.0", "eslint-utils": "^1.3.1", "eslint-visitor-keys": "^1.0.0", "espree": "^6.0.0", @@ -26,28 +26,29 @@ "esutils": "^2.0.2", "file-entry-cache": "^5.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^3.1.0", + "glob-parent": "^5.0.0", "globals": "^11.7.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^6.2.2", + "inquirer": "^6.4.1", "is-glob": "^4.0.0", "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.3.0", - "lodash": "^4.17.11", + "lodash": "^4.17.14", "minimatch": "^3.0.4", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", "optionator": "^0.8.2", "progress": "^2.0.0", "regexpp": "^2.0.1", - "semver": "^5.5.1", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", "table": "^5.2.3", - "text-table": "^0.2.0" + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" }, "deprecated": false, "description": "An AST-based pattern checker for JavaScript.", @@ -80,22 +81,22 @@ "leche": "^2.2.3", "lint-staged": "^8.1.5", "load-perf": "^0.2.0", - "markdownlint": "^0.13.0", - "markdownlint-cli": "^0.15.0", - "metro-memory-fs": "^0.53.1", + "markdownlint": "^0.15.0", + "markdownlint-cli": "^0.17.0", + "metro-memory-fs": "^0.54.1", "mocha": "^6.1.2", "mocha-junit-reporter": "^1.23.0", "npm-license": "^0.3.3", - "nyc": "^13.3.0", + "nyc": "^14.1.1", "proxyquire": "^2.0.1", - "puppeteer": "^1.14.0", - "recast": "^0.17.6", + "puppeteer": "^1.18.0", + "recast": "^0.18.1", "regenerator-runtime": "^0.13.2", "shelljs": "^0.8.2", "sinon": "^7.3.2", "temp": "^0.9.0", - "webpack": "^4.29.6", - "webpack-cli": "^3.3.0", + "webpack": "^4.35.0", + "webpack-cli": "^3.3.5", "yorkie": "^2.0.0" }, "engines": { @@ -148,5 +149,5 @@ "test": "node Makefile.js test", "webpack": "node Makefile.js webpack" }, - "version": "6.0.1" + "version": "6.1.0" } \ No newline at end of file diff --git a/tools/pkgsrc/comment b/tools/pkgsrc/comment deleted file mode 100644 index 819497523d0646..00000000000000 --- a/tools/pkgsrc/comment +++ /dev/null @@ -1 +0,0 @@ -V8 JavaScript for clients and servers (nodejs.org package) diff --git a/tools/pkgsrc/description b/tools/pkgsrc/description deleted file mode 100644 index b070f52fb6b092..00000000000000 --- a/tools/pkgsrc/description +++ /dev/null @@ -1,7 +0,0 @@ -Node.js is an evented I/O framework for the V8 JavaScript engine. It is -intended for writing scalable network programs such as web servers. - -Packaged by nodejs.org - -Homepage: -https://nodejs.org/ diff --git a/tools/snapshot/snapshot_builder.cc b/tools/snapshot/snapshot_builder.cc index 8cf4cad8d0bdf0..7f409a8fcd2482 100644 --- a/tools/snapshot/snapshot_builder.cc +++ b/tools/snapshot/snapshot_builder.cc @@ -70,7 +70,7 @@ std::string SnapshotBuilder::Generate( Isolate* isolate = Isolate::Allocate(); per_process::v8_platform.Platform()->RegisterIsolate(isolate, uv_default_loop()); - NodeMainInstance* main_instance = nullptr; + std::unique_ptr main_instance; std::string result; { diff --git a/tools/test.py b/tools/test.py index 2247db36359890..ff08749425eb5a 100755 --- a/tools/test.py +++ b/tools/test.py @@ -638,15 +638,10 @@ def RunProcess(context, timeout, args, **rest): prev_error_mode = Win32SetErrorMode(error_mode) Win32SetErrorMode(error_mode | prev_error_mode) - faketty = rest.pop('faketty', False) - pty_out = rest.pop('pty_out') - process = subprocess.Popen( args = popen_args, **rest ) - if faketty: - os.close(rest['stdout']) if utils.IsWindows() and context.suppress_dialogs and prev_error_mode != SEM_INVALID_VALUE: Win32SetErrorMode(prev_error_mode) # Compute the end time - if the process crosses this limit we @@ -658,28 +653,6 @@ def RunProcess(context, timeout, args, **rest): # loop and keep track of whether or not it times out. exit_code = None sleep_time = INITIAL_SLEEP_TIME - output = '' - if faketty: - while True: - if time.time() >= end_time: - # Kill the process and wait for it to exit. - KillTimedOutProcess(context, process.pid) - exit_code = process.wait() - timed_out = True - break - - # source: http://stackoverflow.com/a/12471855/1903116 - # related: http://stackoverflow.com/q/11165521/1903116 - try: - data = os.read(pty_out, 9999) - except OSError as e: - if e.errno != errno.EIO: - raise - break # EIO means EOF on some systems - else: - if not data: # EOF - break - output += data while exit_code is None: if (not end_time is None) and (time.time() >= end_time): @@ -693,7 +666,7 @@ def RunProcess(context, timeout, args, **rest): sleep_time = sleep_time * SLEEP_TIME_FACTOR if sleep_time > MAX_SLEEP_TIME: sleep_time = MAX_SLEEP_TIME - return (process, exit_code, timed_out, output) + return (process, exit_code, timed_out) def PrintError(str): @@ -715,31 +688,12 @@ def CheckedUnlink(name): PrintError("os.unlink() " + str(e)) break -def Execute(args, context, timeout=None, env=None, faketty=False, disable_core_files=False, input=None): +def Execute(args, context, timeout=None, env=None, disable_core_files=False, stdin=None): + (fd_out, outname) = tempfile.mkstemp() + (fd_err, errname) = tempfile.mkstemp() + if env is None: env = {} - if faketty: - import pty - (out_master, fd_out) = pty.openpty() - fd_in = fd_err = fd_out - pty_out = out_master - - if input is not None: - # Before writing input data, disable echo so the input doesn't show - # up as part of the output. - import termios - attr = termios.tcgetattr(fd_in) - attr[3] = attr[3] & ~termios.ECHO - termios.tcsetattr(fd_in, termios.TCSADRAIN, attr) - - os.write(pty_out, input) - os.write(pty_out, '\x04') # End-of-file marker (Ctrl+D) - else: - (fd_out, outname) = tempfile.mkstemp() - (fd_err, errname) = tempfile.mkstemp() - fd_in = 0 - pty_out = None - env_copy = os.environ.copy() # Remove NODE_PATH @@ -758,28 +712,22 @@ def disableCoreFiles(): resource.setrlimit(resource.RLIMIT_CORE, (0,0)) preexec_fn = disableCoreFiles - (process, exit_code, timed_out, output) = RunProcess( + (process, exit_code, timed_out) = RunProcess( context, timeout, args = args, - stdin = fd_in, + stdin = stdin, stdout = fd_out, stderr = fd_err, env = env_copy, - faketty = faketty, - pty_out = pty_out, preexec_fn = preexec_fn ) - if faketty: - os.close(out_master) - errors = '' - else: - os.close(fd_out) - os.close(fd_err) - output = open(outname).read() - errors = open(errname).read() - CheckedUnlink(outname) - CheckedUnlink(errname) + os.close(fd_out) + os.close(fd_err) + output = open(outname).read() + errors = open(errname).read() + CheckedUnlink(outname) + CheckedUnlink(errname) return CommandOutput(exit_code, timed_out, output, errors) diff --git a/tools/v8_gypfiles/broken/v8vtune.gyp b/tools/v8_gypfiles/broken/v8vtune.gyp deleted file mode 100644 index 2a756d4b8089b3..00000000000000 --- a/tools/v8_gypfiles/broken/v8vtune.gyp +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 2012 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. - -{ - 'variables': { - 'v8_code': 1, - }, - 'includes': ['toolchain.gypi', 'features.gypi'], - 'targets': [ - { - 'target_name': 'v8_vtune', - 'type': 'static_library', - 'dependencies': [ - 'v8.gyp:v8', - ], - 'sources': [ - '../src/third_party/vtune/ittnotify_config.h', - '../src/third_party/vtune/ittnotify_types.h', - '../src/third_party/vtune/jitprofiling.cc', - '../src/third_party/vtune/jitprofiling.h', - '../src/third_party/vtune/v8-vtune.h', - '../src/third_party/vtune/vtune-jit.cc', - '../src/third_party/vtune/vtune-jit.h', - ], - 'direct_dependent_settings': { - 'defines': ['ENABLE_VTUNE_JIT_INTERFACE',], - 'conditions': [ - ['OS != "win"', { - 'libraries': ['-ldl',], - }], - ], - }, - }, - ], -} diff --git a/tools/v8_gypfiles/d8.gyp b/tools/v8_gypfiles/d8.gyp index a5fc10113fac68..e995c3cf560d2f 100644 --- a/tools/v8_gypfiles/d8.gyp +++ b/tools/v8_gypfiles/d8.gyp @@ -4,9 +4,8 @@ { 'variables': { + 'V8_ROOT': '../../deps/v8', 'v8_code': 1, - # Enable support for Intel VTune. Supported on ia32/x64 only - 'v8_enable_vtunejit%': 0, 'v8_enable_i18n_support%': 1, }, 'includes': ['toolchain.gypi', 'features.gypi'], @@ -18,23 +17,24 @@ 'v8.gyp:v8', 'v8.gyp:v8_libbase', 'v8.gyp:v8_libplatform', + 'v8.gyp:generate_bytecode_builtins_list', ], # Generated source files need this explicitly: 'include_dirs+': [ - '..', + '<(V8_ROOT)', '<(DEPTH)', '<(SHARED_INTERMEDIATE_DIR)', ], 'sources': [ - '../src/async-hooks-wrapper.cc', - '../src/async-hooks-wrapper.h', - '../src/d8-console.cc', - '../src/d8-console.h', - '../src/d8-js.cc', - '../src/d8-platforms.cc', - '../src/d8-platforms.h', - '../src/d8.cc', - '../src/d8.h', + '<(V8_ROOT)/src/async-hooks-wrapper.cc', + '<(V8_ROOT)/src/async-hooks-wrapper.h', + '<(V8_ROOT)/src/d8-console.cc', + '<(V8_ROOT)/src/d8-console.h', + '<(V8_ROOT)/src/d8-js.cc', + '<(V8_ROOT)/src/d8-platforms.cc', + '<(V8_ROOT)/src/d8-platforms.h', + '<(V8_ROOT)/src/d8.cc', + '<(V8_ROOT)/src/d8.h', ], 'conditions': [ [ 'want_separate_host_toolset==1', { @@ -46,10 +46,10 @@ ['(OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="netbsd" \ or OS=="openbsd" or OS=="solaris" or OS=="android" \ or OS=="qnx" or OS=="aix")', { - 'sources': [ '../src/d8-posix.cc', ] + 'sources': [ '<(V8_ROOT)/src/d8-posix.cc', ] }], [ 'OS=="win"', { - 'sources': [ '../src/d8-windows.cc', ] + 'sources': [ '<(V8_ROOT)/src/d8-windows.cc', ] }], [ 'component!="shared_library"', { 'conditions': [ @@ -62,11 +62,6 @@ }], ], }], - ['v8_enable_vtunejit==1', { - 'dependencies': [ - 'v8vtune.gyp:v8_vtune', - ], - }], ['v8_enable_i18n_support==1', { 'dependencies': [ '<(icu_gyp_path):icui18n', diff --git a/tools/v8_gypfiles/features.gypi b/tools/v8_gypfiles/features.gypi index 23dd84a49dd013..570c6ace907d3a 100644 --- a/tools/v8_gypfiles/features.gypi +++ b/tools/v8_gypfiles/features.gypi @@ -102,9 +102,6 @@ # Sets -dENABLE_GDB_JIT_INTERFACE. 'v8_enable_gdbjit%': 0, - # Sets -dENABLE_VTUNE_JIT_INTERFACE. - 'v8_enable_vtunejit%': 0, - # Currently set for node by common.gypi, avoiding default because of gyp file bug. # Should be turned on only for debugging. #'v8_enable_handle_zapping%': 0, @@ -225,9 +222,6 @@ ['v8_enable_gdbjit==1', { 'defines': ['ENABLE_GDB_JIT_INTERFACE',], }], - ['v8_enable_vtunejit==1', { - 'defines': ['ENABLE_VTUNE_JIT_INTERFACE',], - }], ['v8_enable_minor_mc==1', { 'defines': ['ENABLE_MINOR_MC',], }], diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index 46fb49295f3d82..f0a6aeb69e0eae 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -2536,16 +2536,24 @@ }, }], ['OS=="aix"', { + 'variables': { + # Used to differentiate `AIX` and `OS400`(IBM i). + 'aix_variant_name': '