diff --git a/.eslintignore b/.eslintignore index 9b5c5fccb643e4..6791fbf312a08b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,7 +2,7 @@ lib/internal/v8_prof_polyfill.js lib/punycode.js test/addons/??_*/ test/fixtures -test/**/node_modules test/disabled test/tmp*/ -tools/doc/node_modules +tools/eslint +node_modules diff --git a/.eslintrc b/.eslintrc index f9b0ef3b015f77..120bca8d2f3b4b 100644 --- a/.eslintrc +++ b/.eslintrc @@ -5,7 +5,7 @@ env: rules: # Possible Errors # http://eslint.org/docs/rules/#possible-errors - comma-dangle: [2, "only-multiline"] + comma-dangle: [2, only-multiline] no-control-regex: 2 no-debugger: 2 no-dupe-args: 2 @@ -14,7 +14,7 @@ rules: no-empty-character-class: 2 no-ex-assign: 2 no-extra-boolean-cast: 2 - no-extra-parens: [2, "functions"] + no-extra-parens: [2, functions] no-extra-semi: 2 no-func-assign: 2 no-invalid-regexp: 2 @@ -38,46 +38,47 @@ rules: # Strict Mode # http://eslint.org/docs/rules/#strict-mode - strict: [2, "global"] + strict: [2, global] # Variables # http://eslint.org/docs/rules/#variables no-delete-var: 2 no-undef: 2 - no-unused-vars: [2, {"args": "none"}] + no-unused-vars: [2, {args: none}] # Node.js and CommonJS # http://eslint.org/docs/rules/#nodejs-and-commonjs no-mixed-requires: 2 no-new-require: 2 no-path-concat: 2 - no-restricted-modules: [2, "sys", "_linklist"] + no-restricted-modules: [2, sys, _linklist] # Stylistic Issues # http://eslint.org/docs/rules/#stylistic-issues + brace-style: [2, 1tbs, {allowSingleLine: true}] comma-spacing: 2 eol-last: 2 indent: [2, 2, {SwitchCase: 1}] - key-spacing: [2, {mode: "minimum"}] + key-spacing: [2, {mode: minimum}] keyword-spacing: 2 - linebreak-style: [2, "unix"] + linebreak-style: [2, unix] max-len: [2, 80, 2] new-parens: 2 no-mixed-spaces-and-tabs: 2 no-multiple-empty-lines: [2, {max: 2}] no-trailing-spaces: 2 - quotes: [2, "single", "avoid-escape"] + quotes: [2, single, avoid-escape] semi: 2 - space-before-blocks: [2, "always"] - space-before-function-paren: [2, "never"] - space-in-parens: [2, "never"] + space-before-blocks: [2, always] + space-before-function-paren: [2, never] + space-in-parens: [2, never] space-infix-ops: 2 space-unary-ops: 2 # ECMAScript 6 # http://eslint.org/docs/rules/#ecmascript-6 - arrow-parens: [2, "always"] - arrow-spacing: [2, {"before": true, "after": true}] + arrow-parens: [2, always] + arrow-spacing: [2, {before: true, after: true}] constructor-super: 2 no-class-assign: 2 no-confusing-arrow: 2 @@ -92,27 +93,27 @@ rules: align-function-arguments: 2 align-multiline-assignment: 2 assert-fail-single-argument: 2 - new-with-error: [2, "Error", "RangeError", "TypeError", "SyntaxError", "ReferenceError"] + new-with-error: [2, Error, RangeError, TypeError, SyntaxError, ReferenceError] no-deepEqual: 2 no-definegetter-definesetter: 2 # Global scoped method and vars globals: - DTRACE_HTTP_CLIENT_REQUEST : false - LTTNG_HTTP_CLIENT_REQUEST : false - COUNTER_HTTP_CLIENT_REQUEST : false - DTRACE_HTTP_CLIENT_RESPONSE : false - LTTNG_HTTP_CLIENT_RESPONSE : false - COUNTER_HTTP_CLIENT_RESPONSE : false - DTRACE_HTTP_SERVER_REQUEST : false - LTTNG_HTTP_SERVER_REQUEST : false - COUNTER_HTTP_SERVER_REQUEST : false - DTRACE_HTTP_SERVER_RESPONSE : false - LTTNG_HTTP_SERVER_RESPONSE : false - COUNTER_HTTP_SERVER_RESPONSE : false - DTRACE_NET_STREAM_END : false - LTTNG_NET_STREAM_END : false - COUNTER_NET_SERVER_CONNECTION_CLOSE : false - DTRACE_NET_SERVER_CONNECTION : false - LTTNG_NET_SERVER_CONNECTION : false - COUNTER_NET_SERVER_CONNECTION : false + COUNTER_HTTP_CLIENT_REQUEST: false + COUNTER_HTTP_CLIENT_RESPONSE: false + COUNTER_HTTP_SERVER_REQUEST: false + COUNTER_HTTP_SERVER_RESPONSE: false + COUNTER_NET_SERVER_CONNECTION: false + COUNTER_NET_SERVER_CONNECTION_CLOSE: false + DTRACE_HTTP_CLIENT_REQUEST: false + DTRACE_HTTP_CLIENT_RESPONSE: false + DTRACE_HTTP_SERVER_REQUEST: false + DTRACE_HTTP_SERVER_RESPONSE: false + DTRACE_NET_SERVER_CONNECTION: false + DTRACE_NET_STREAM_END: false + LTTNG_HTTP_CLIENT_REQUEST: false + LTTNG_HTTP_CLIENT_RESPONSE: false + LTTNG_HTTP_SERVER_REQUEST: false + LTTNG_HTTP_SERVER_RESPONSE: false + LTTNG_NET_SERVER_CONNECTION: false + LTTNG_NET_STREAM_END: false diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 3ae4132fbcbdc7..4c115cb593573f 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,9 +1,9 @@ @@ -9,15 +9,14 @@ Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md ##### Checklist -- [ ] `make -j4 test` (UNIX) or `vcbuild test nosign` (Windows) passes -- [ ] a test and/or benchmark is included +- [ ] `make -j4 test` (UNIX), or `vcbuild test nosign` (Windows) passes +- [ ] tests and/or benchmarks are included - [ ] documentation is changed or added -- [ ] the commit message follows commit guidelines - +- [ ] commit message follows commit guidelines ##### Affected core subsystem(s) - + ##### Description of change - + diff --git a/BUILDING.md b/BUILDING.md index e9bf0bc01337f2..532c478bbb736b 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -99,8 +99,10 @@ $ node -e "console.log('Hello from Node.js ' + process.version)" Prerequisites: * [Python 2.6 or 2.7](https://www.python.org/downloads/) -* Visual Studio 2013 / 2015, all editions including the Community edition, or -* Visual Studio Express 2013 / 2015 for Desktop +* One of: + * [Visual C++ Build Tools](http://landinghub.visualstudio.com/visual-cpp-build-tools) + * [Visual Studio](https://www.visualstudio.com/) 2013 / 2015, all editions including the Community edition + * [Visual Studio](https://www.visualstudio.com/) Express 2013 / 2015 for Desktop * Basic Unix tools required for some tests, [Git for Windows](http://git-scm.com/download/win) includes Git Bash and tools which can be included in the global `PATH`. @@ -117,8 +119,8 @@ To run the tests: To test if Node.js was built correctly: -``` -$ node -e "console.log('Hello from Node.js ' + process.version)" +```text +> Release\node -e "console.log('Hello from Node.js', process.version)" ``` ### Android / Android-based devices (e.g., Firefox OS) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86676b4bb2cbe3..6a695f79a5d87e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,9 @@ release. -6.2.1
+6.3.0
+6.2.2
+6.2.1
6.2.0
6.1.0
6.0.0
@@ -52,7 +54,9 @@ release. 5.0.0
-4.4.5
+4.4.7
+4.4.6 +4.4.5 4.4.4
4.4.3
4.4.2
@@ -74,7 +78,8 @@ release. 4.0.0
-0.12.14
+0.12.15
+0.12.14
0.12.13
0.12.12
0.12.11
@@ -91,7 +96,8 @@ release. 0.12.0
-0.10.45
+0.10.46
+0.10.45
0.10.44
0.10.43
0.10.42
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 57a30b12210ae1..50db95b3de9537 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -150,6 +150,9 @@ $ ./configure && make -j8 test Make sure the linter is happy and that all tests pass. Please, do not submit patches that fail either check. +Running `make test` will run the linter as well unless one or more tests fail. +If you want to run the linter without running tests, use `make lint`. + If you are updating tests and just want to run a single test to check it, you can use this syntax to run it exactly as the test harness would: diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 2337353cb7b4f7..06cec91e7db8b6 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -46,7 +46,7 @@ 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 +modification. See [Consensus Seeking Process](#consensus-seeking-process) below for further detail on the consensus model used for governance. Collaborators may opt to elevate significant or controversial diff --git a/Makefile b/Makefile index 8d1796d14324dd..f66d1732fc48d8 100644 --- a/Makefile +++ b/Makefile @@ -19,9 +19,9 @@ ifdef QUICKCHECK endif ifdef ENABLE_V8_TAP - TAP_V8 := --junitout v8-tap.xml - TAP_V8_INTL := --junitout v8-intl-tap.xml - TAP_V8_BENCHMARKS := --junitout v8-benchmarks-tap.xml + TAP_V8 := --junitout $(PWD)/v8-tap.xml + TAP_V8_INTL := --junitout $(PWD)/v8-intl-tap.xml + TAP_V8_BENCHMARKS := --junitout $(PWD)/v8-benchmarks-tap.xml endif V8_TEST_OPTIONS = $(V8_EXTRA_TEST_OPTIONS) @@ -112,13 +112,13 @@ cctest: all v8: tools/make-v8.sh v8 - $(MAKE) -C deps/v8 $(V8_ARCH) $(V8_BUILD_OPTIONS) + $(MAKE) -C deps/v8 $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS) test: all $(MAKE) build-addons $(MAKE) cctest $(PYTHON) tools/test.py --mode=release -J \ - addon doctool known_issues message pseudo-tty parallel sequential + addons doctool known_issues message pseudo-tty parallel sequential $(MAKE) lint test-parallel: all @@ -184,11 +184,25 @@ test-all: test-build test/gc/node_modules/weak/build/Release/weakref.node test-all-valgrind: test-build $(PYTHON) tools/test.py --mode=debug,release --valgrind +CI_NATIVE_SUITES := addons +CI_JS_SUITES := doctool known_issues message parallel pseudo-tty sequential + +# Build and test addons without building anything else +test-ci-native: | test/addons/.buildstamp + $(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \ + --mode=release --flaky-tests=$(FLAKY_TESTS) \ + $(TEST_CI_ARGS) $(CI_NATIVE_SUITES) + +# This target should not use a native compiler at all +test-ci-js: + $(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \ + --mode=release --flaky-tests=$(FLAKY_TESTS) \ + $(TEST_CI_ARGS) $(CI_JS_SUITES) + test-ci: | build-addons $(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \ --mode=release --flaky-tests=$(FLAKY_TESTS) \ - $(TEST_CI_ARGS) addons doctool known_issues message pseudo-tty parallel \ - sequential + $(TEST_CI_ARGS) $(CI_NATIVE_SUITES) $(CI_JS_SUITES) test-release: test-build $(PYTHON) tools/test.py --mode=release @@ -232,7 +246,7 @@ test-timers-clean: ifneq ("","$(wildcard deps/v8/tools/run-tests.py)") -test-v8: +test-v8: v8 # note: performs full test unless QUICKCHECK is specified deps/v8/tools/run-tests.py --arch=$(V8_ARCH) \ --mode=$(BUILDTYPE_LOWER) $(V8_TEST_OPTIONS) $(QUICKCHECK_ARG) \ @@ -240,14 +254,14 @@ test-v8: --shell-dir=$(PWD)/deps/v8/out/$(V8_ARCH).$(BUILDTYPE_LOWER) \ $(TAP_V8) -test-v8-intl: +test-v8-intl: v8 # note: performs full test unless QUICKCHECK is specified deps/v8/tools/run-tests.py --arch=$(V8_ARCH) \ --mode=$(BUILDTYPE_LOWER) --no-presubmit $(QUICKCHECK_ARG) \ --shell-dir=deps/v8/out/$(V8_ARCH).$(BUILDTYPE_LOWER) intl \ $(TAP_V8_INTL) -test-v8-benchmarks: +test-v8-benchmarks: v8 deps/v8/tools/run-tests.py --arch=$(V8_ARCH) --mode=$(BUILDTYPE_LOWER) \ --download-data $(QUICKCHECK_ARG) --no-presubmit \ --shell-dir=deps/v8/out/$(V8_ARCH).$(BUILDTYPE_LOWER) benchmarks \ @@ -299,9 +313,11 @@ docopen: out/doc/api/all.html docclean: -rm -rf out/doc -run-ci: +build-ci: $(PYTHON) ./configure $(CONFIG_FLAGS) $(MAKE) + +run-ci: build-ci $(MAKE) test-ci RAWVER=$(shell $(PYTHON) tools/getnodeversion.py) @@ -662,27 +678,19 @@ bench-idle: $(NODE) benchmark/idle_clients.js & jslint: - $(NODE) tools/jslint.js -J benchmark lib src test tools/doc \ - tools/eslint-rules tools/jslint.js + $(NODE) tools/jslint.js -J benchmark lib src test tools jslint-ci: $(NODE) tools/jslint.js $(PARALLEL_ARGS) -f tap -o test-eslint.tap \ - benchmark lib src test tools/doc \ - tools/eslint-rules tools/jslint.js + benchmark lib src test tools CPPLINT_EXCLUDE ?= -CPPLINT_EXCLUDE += src/node_lttng.cc CPPLINT_EXCLUDE += src/node_root_certs.h -CPPLINT_EXCLUDE += src/node_lttng_tp.h -CPPLINT_EXCLUDE += src/node_win32_perfctr_provider.cc CPPLINT_EXCLUDE += src/queue.h CPPLINT_EXCLUDE += src/tree.h -CPPLINT_EXCLUDE += src/v8abbr.h CPPLINT_EXCLUDE += $(wildcard test/addons/??_*/*.cc test/addons/??_*/*.h) CPPLINT_FILES = $(filter-out $(CPPLINT_EXCLUDE), $(wildcard \ - deps/debugger-agent/include/* \ - deps/debugger-agent/src/* \ src/*.c \ src/*.cc \ src/*.h \ @@ -715,4 +723,4 @@ endif bench-all bench bench-misc bench-array bench-buffer bench-net \ bench-http bench-fs bench-tls cctest run-ci test-v8 test-v8-intl \ test-v8-benchmarks test-v8-all v8 lint-ci bench-ci jslint-ci doc-only \ - $(TARBALL)-headers + $(TARBALL)-headers test-ci test-ci-native test-ci-js build-ci diff --git a/README.md b/README.md index 5098135b307444..10aadde17ba7d5 100644 --- a/README.md +++ b/README.md @@ -170,6 +170,7 @@ information about the governance of the Node.js project, see * [benjamingr](https://github.com/benjamingr) - **Benjamin Gruenbaum** <benjamingr@gmail.com> * [bmeck](https://github.com/bmeck) - **Bradley Farias** <bradley.meck@gmail.com> * [brendanashworth](https://github.com/brendanashworth) - **Brendan Ashworth** <brendan.ashworth@me.com> +* [bzoz](https://github.com/bzoz) - **Bartosz Sosnowski** <bartosz@janeasystems.com> * [calvinmetcalf](https://github.com/calvinmetcalf) - **Calvin Metcalf** <calvin.metcalf@gmail.com> * [claudiorodriguez](https://github.com/claudiorodriguez) - **Claudio Rodriguez** <cjrodr@yahoo.com> * [domenic](https://github.com/domenic) - **Domenic Denicola** <d@domenic.me> @@ -186,6 +187,7 @@ information about the governance of the Node.js project, see * [joaocgreis](https://github.com/joaocgreis) - **João Reis** <reis@janeasystems.com> * [julianduque](https://github.com/julianduque) - **Julian Duque** <julianduquej@gmail.com> * [JungMinu](https://github.com/JungMinu) - **Minwoo Jung** <jmwsoft@gmail.com> +* [lance](https://github.com/lance) - **Lance Ball** <lball@redhat.com> * [lxe](https://github.com/lxe) - **Aleksey Smolenchuk** <lxe@lxe.co> * [matthewloring](https://github.com/matthewloring) - **Matthew Loring** <mattloring@google.com> * [mcollina](https://github.com/mcollina) - **Matteo Collina** <matteo.collina@gmail.com> @@ -203,6 +205,7 @@ information about the governance of the Node.js project, see * [robertkowalski](https://github.com/robertkowalski) - **Robert Kowalski** <rok@kowalski.gd> * [romankl](https://github.com/romankl) - **Roman Klauke** <romaaan.git@gmail.com> * [ronkorving](https://github.com/ronkorving) - **Ron Korving** <ron@ronkorving.nl> +* [RReverser](https://github.com/RReverser) - **Ingvar Stepanyan** <me@rreverser.com> * [saghul](https://github.com/saghul) - **Saúl Ibarra Corretgé** <saghul@gmail.com> * [sam-github](https://github.com/sam-github) - **Sam Roberts** <vieuxtech@gmail.com> * [santigimeno](https://github.com/santigimeno) - **Santiago Gimeno** <santiago.gimeno@gmail.com> diff --git a/benchmark/buffers/buffer-swap.js b/benchmark/buffers/buffer-swap.js index 4ff9a23d418f4d..0793c77c8fcb80 100644 --- a/benchmark/buffers/buffer-swap.js +++ b/benchmark/buffers/buffer-swap.js @@ -1,61 +1,90 @@ 'use strict'; const common = require('../common.js'); +const v8 = require('v8'); const bench = common.createBenchmark(main, { - method: ['swap16', 'swap32', 'htons', 'htonl'], - len: [4, 64, 512, 768, 1024, 1536, 2056, 4096, 8192], - n: [1e6] + aligned: ['true', 'false'], + method: ['swap16', 'swap32', 'swap64'/*, 'htons', 'htonl', 'htonll'*/], + len: [8, 64, 128, 256, 512, 768, 1024, 1536, 2056, 4096, 8192], + n: [5e7] }); // The htons and htonl methods below are used to benchmark the // performance difference between doing the byteswap in pure // javascript regardless of Buffer size as opposed to dropping -// down to the native layer for larger Buffer sizes. +// down to the native layer for larger Buffer sizes. Commented +// out by default because they are slow for big buffers. If +// re-evaluating the crossover point, uncomment those methods +// and comment out their implementations in lib/buffer.js so +// C++ version will always be used. + +function swap(b, n, m) { + const i = b[n]; + b[n] = b[m]; + b[m] = i; +} Buffer.prototype.htons = function htons() { if (this.length % 2 !== 0) throw new RangeError(); - for (var i = 0, n = 0; i < this.length; i += 2) { - n = this[i]; - this[i] = this[i + 1]; - this[i + 1] = n; + for (var i = 0; i < this.length; i += 2) { + swap(this, i, i + 1); } return this; }; Buffer.prototype.htonl = function htonl() { - if (this.length % 2 !== 0) + if (this.length % 4 !== 0) + throw new RangeError(); + for (var i = 0; i < this.length; i += 4) { + swap(this, i, i + 3); + swap(this, i + 1, i + 2); + } + return this; +}; + +Buffer.prototype.htonll = function htonl() { + if (this.length % 8 !== 0) throw new RangeError(); - for (var i = 0, n = 0; i < this.length; i += 4) { - n = this[i]; - this[i] = this[i + 3]; - this[i + 3] = n; - n = this[i + 1]; - this[i + 1] = this[i + 2]; - this[i + 2] = n; + for (var i = 0; i < this.length; i += 8) { + swap(this, i, i + 7); + swap(this, i + 1, i + 6); + swap(this, i + 2, i + 5); + swap(this, i + 3, i + 4); } return this; }; -function createBuffer(len) { +function createBuffer(len, aligned) { + len += aligned ? 0 : 1; const buf = Buffer.allocUnsafe(len); for (var i = 1; i <= len; i++) buf[i - 1] = i; - return buf; + return aligned ? buf : buf.slice(1); } -function bufferSwap(n, buf, method) { - for (var i = 1; i <= n; i++) - buf[method](); +function genMethod(method) { + const fnString = + 'return function ' + method + '(n, buf) {' + + ' for (var i = 0; i <= n; i++)' + + ' buf.' + method + '();' + + '}'; + return (new Function(fnString))(); } function main(conf) { const method = conf.method; const len = conf.len | 0; const n = conf.n | 0; - const buf = createBuffer(len); + const aligned = conf.aligned || 'true'; + const buf = createBuffer(len, aligned === 'true'); + const bufferSwap = genMethod(method); + + v8.setFlagsFromString('--allow_natives_syntax'); + eval('%OptimizeFunctionOnNextCall(bufferSwap)'); + bench.start(); - bufferSwap(n, buf, method); + bufferSwap(n, buf); bench.end(n); } diff --git a/benchmark/child_process/child-process-read-ipc.js b/benchmark/child_process/child-process-read-ipc.js index 82e833980fee75..28f2b6f9272772 100644 --- a/benchmark/child_process/child-process-read-ipc.js +++ b/benchmark/child_process/child-process-read-ipc.js @@ -1,6 +1,5 @@ 'use strict'; -if (process.argv[2] === 'child') -{ +if (process.argv[2] === 'child') { const len = +process.argv[3]; const msg = `"${'.'.repeat(len)}"`; while (true) { diff --git a/benchmark/common.js b/benchmark/common.js index 71b93d038aeb23..d49aef106f1c11 100644 --- a/benchmark/common.js +++ b/benchmark/common.js @@ -191,13 +191,11 @@ function parseOpts(options) { var num = keys.length; var conf = {}; for (var i = 2; i < process.argv.length; i++) { - var match = process.argv[i].match(/^(.+)=(.*)$/); + var match = process.argv[i].match(/^(.+?)=([\s\S]*)$/); if (!match || !match[1] || !options[match[1]]) { return null; } else { - conf[match[1]] = (match[2].length && isFinite(match[2]) - ? +match[2] - : match[2]); + conf[match[1]] = match[2]; num--; } } @@ -238,8 +236,6 @@ Benchmark.prototype.report = function(value) { console.log('%s: %s', heading, value.toFixed(5)); else if (outputFormat == 'csv') console.log('%s,%s', heading, value.toFixed(5)); - - process.exit(0); }; Benchmark.prototype.getHeading = function() { @@ -247,11 +243,11 @@ Benchmark.prototype.getHeading = function() { if (outputFormat == 'default') { return this._name + ' ' + Object.keys(conf).map(function(key) { - return key + '=' + conf[key]; + return key + '=' + JSON.stringify('' + conf[key]); }).join(' '); } else if (outputFormat == 'csv') { return this._name + ',' + Object.keys(conf).map(function(key) { - return conf[key]; + return JSON.stringify('' + conf[key]); }).join(','); } }; diff --git a/benchmark/crypto/get-ciphers.js b/benchmark/crypto/get-ciphers.js new file mode 100644 index 00000000000000..257c9af2fd531e --- /dev/null +++ b/benchmark/crypto/get-ciphers.js @@ -0,0 +1,20 @@ +'use strict'; + +const common = require('../common.js'); + +const bench = common.createBenchmark(main, { + n: [1, 5000], + v: ['crypto', 'tls'] +}); + +function main(conf) { + const n = +conf.n; + const v = conf.v; + const method = require(v).getCiphers; + var i = 0; + + common.v8ForceOptimization(method); + bench.start(); + for (; i < n; i++) method(); + bench.end(n); +} diff --git a/benchmark/dgram/array-vs-concat.js b/benchmark/dgram/array-vs-concat.js index e47229811e8471..2a82ea48c754ed 100644 --- a/benchmark/dgram/array-vs-concat.js +++ b/benchmark/dgram/array-vs-concat.js @@ -41,7 +41,6 @@ var dgram = require('dgram'); function server() { var sent = 0; - var received = 0; var socket = dgram.createSocket('udp4'); var onsend = type === 'concat' ? onsendConcat : onsendMulti; @@ -71,9 +70,5 @@ function server() { }, dur * 1000); }); - socket.on('message', function(buf, rinfo) { - received++; - }); - socket.bind(PORT); } diff --git a/benchmark/http/_chunky_http_client.js b/benchmark/http/_chunky_http_client.js index 158be5a0eb6424..bde4eed7444e6f 100644 --- a/benchmark/http/_chunky_http_client.js +++ b/benchmark/http/_chunky_http_client.js @@ -50,8 +50,6 @@ function main(conf) { } } - var success = 0; - var failure = 0; var min = 10; var size = 0; var mod = 317; @@ -69,14 +67,12 @@ function main(conf) { if ((d.length === pattern.length && d === pattern) || (d.length > pattern.length && d.slice(0, pattern.length) === pattern)) { - success += 1; did = true; } else { pattern = 'HTTP/1.1 '; if ((d.length === pattern.length && d === pattern) || (d.length > pattern.length && d.slice(0, pattern.length) === pattern)) { - failure += 1; did = true; } } diff --git a/benchmark/http/check_invalid_header_char.js b/benchmark/http/check_invalid_header_char.js new file mode 100644 index 00000000000000..bef44e63167078 --- /dev/null +++ b/benchmark/http/check_invalid_header_char.js @@ -0,0 +1,42 @@ +'use strict'; + +const common = require('../common.js'); +const _checkInvalidHeaderChar = require('_http_common')._checkInvalidHeaderChar; + +const bench = common.createBenchmark(main, { + key: [ + // Valid + '', + '1', + '\t\t\t\t\t\t\t\t\t\tFoo bar baz', + 'keep-alive', + 'close', + 'gzip', + '20091', + 'private', + 'text/html; charset=utf-8', + 'text/plain', + 'Sat, 07 May 2016 16:54:48 GMT', + 'SAMEORIGIN', + 'en-US', + + // Invalid + 'Here is a value that is really a folded header value\r\n this should be \ + supported, but it is not currently', + '中文呢', // unicode + 'foo\nbar', + '\x7F' + ], + n: [5e8], +}); + +function main(conf) { + var n = +conf.n; + var key = conf.key; + + bench.start(); + for (var i = 0; i < n; i++) { + _checkInvalidHeaderChar(key); + } + bench.end(n); +} diff --git a/benchmark/http/check_is_http_token.js b/benchmark/http/check_is_http_token.js index 9e0b8279b58ed0..a317e05a4a12d2 100644 --- a/benchmark/http/check_is_http_token.js +++ b/benchmark/http/check_is_http_token.js @@ -37,7 +37,7 @@ const bench = common.createBenchmark(main, { ':alternate-protocol', // fast bailout 'alternate-protocol:' // slow bailout ], - n: [1e6], + n: [5e8], }); function main(conf) { diff --git a/benchmark/misc/util-extend-vs-object-assign.js b/benchmark/misc/util-extend-vs-object-assign.js new file mode 100644 index 00000000000000..caea42ce914cf5 --- /dev/null +++ b/benchmark/misc/util-extend-vs-object-assign.js @@ -0,0 +1,40 @@ +'use strict'; + +const common = require('../common.js'); +const util = require('util'); +const v8 = require('v8'); + +const bench = common.createBenchmark(main, { + type: ['extend', 'assign'], + n: [10e4] +}); + +function main(conf) { + let fn; + const n = conf.n | 0; + let v8command; + + if (conf.type === 'extend') { + fn = util._extend; + v8command = '%OptimizeFunctionOnNextCall(util._extend)'; + } else if (conf.type === 'assign') { + fn = Object.assign; + // Object.assign is built-in, cannot be optimized + v8command = ''; + } + + // Force-optimize the method to test so that the benchmark doesn't + // get disrupted by the optimizer kicking in halfway through. + for (var i = 0; i < conf.type.length * 10; i += 1) + fn({}, process.env); + + v8.setFlagsFromString('--allow_natives_syntax'); + eval(v8command); + + var obj = new Proxy({}, { set: function(a, b, c) { return true; } }); + + bench.start(); + for (var j = 0; j < n; j += 1) + fn(obj, process.env); + bench.end(n); +} diff --git a/benchmark/net/punycode.js b/benchmark/net/punycode.js new file mode 100644 index 00000000000000..f4d22557ac5d65 --- /dev/null +++ b/benchmark/net/punycode.js @@ -0,0 +1,75 @@ +'use strict'; + +const common = require('../common.js'); +const icu = process.binding('icu'); +const punycode = require('punycode'); + +const bench = common.createBenchmark(main, { + method: ['punycode', 'icu'], + n: [1024], + val: [ + 'افغانستا.icom.museum', + 'الجزائر.icom.museum', + 'österreich.icom.museum', + 'বাংলাদেশ.icom.museum', + 'беларусь.icom.museum', + 'belgië.icom.museum', + 'българия.icom.museum', + 'تشادر.icom.museum', + '中国.icom.museum', + 'القمر.icom.museum', + 'κυπρος.icom.museum', + 'českárepublika.icom.museum', + 'مصر.icom.museum', + 'ελλάδα.icom.museum', + 'magyarország.icom.museum', + 'ísland.icom.museum', + 'भारत.icom.museum', + 'ايران.icom.museum', + 'éire.icom.museum', + 'איקו״ם.ישראל.museum', + '日本.icom.museum', + 'الأردن.icom.museum' + ] +}); + +function usingPunycode(val) { + punycode.toUnicode(punycode.toASCII(val)); +} + +function usingICU(val) { + icu.toUnicode(icu.toASCII(val)); +} + +function runPunycode(n, val) { + common.v8ForceOptimization(usingPunycode, val); + var i = 0; + bench.start(); + for (; i < n; i++) + usingPunycode(val); + bench.end(n); +} + +function runICU(n, val) { + common.v8ForceOptimization(usingICU, val); + var i = 0; + bench.start(); + for (; i < n; i++) + usingICU(val); + bench.end(n); +} + +function main(conf) { + const n = +conf.n; + const val = conf.val; + switch (conf.method) { + case 'punycode': + runPunycode(n, val); + break; + case 'icu': + runICU(n, val); + break; + default: + throw new Error('Unexpected method'); + } +} diff --git a/benchmark/static_http_server.js b/benchmark/static_http_server.js index 43c493675933e7..13067d7b3eb890 100644 --- a/benchmark/static_http_server.js +++ b/benchmark/static_http_server.js @@ -6,7 +6,6 @@ var port = 12346; var n = 700; var bytes = 1024 * 5; -var requests = 0; var responses = 0; var body = 'C'.repeat(bytes); @@ -37,6 +36,5 @@ server.listen(port, function() { }); }); req.id = i; - requests++; } }); diff --git a/benchmark/streams/readable-bigread.js b/benchmark/streams/readable-bigread.js new file mode 100644 index 00000000000000..50f10c44119141 --- /dev/null +++ b/benchmark/streams/readable-bigread.js @@ -0,0 +1,32 @@ +'use strict'; + +const common = require('../common'); +const v8 = require('v8'); +const Readable = require('stream').Readable; + +const bench = common.createBenchmark(main, { + n: [100e1] +}); + +function main(conf) { + const n = +conf.n; + const b = new Buffer(32); + const s = new Readable(); + function noop() {} + s._read = noop; + + // Force optimization before starting the benchmark + s.push(b); + v8.setFlagsFromString('--allow_natives_syntax'); + eval('%OptimizeFunctionOnNextCall(s.read)'); + s.push(b); + while (s.read(128)); + + bench.start(); + for (var k = 0; k < n; ++k) { + for (var i = 0; i < 1e4; ++i) + s.push(b); + while (s.read(128)); + } + bench.end(n); +} diff --git a/benchmark/streams/readable-bigunevenread.js b/benchmark/streams/readable-bigunevenread.js new file mode 100644 index 00000000000000..ce6e41c5d30eac --- /dev/null +++ b/benchmark/streams/readable-bigunevenread.js @@ -0,0 +1,32 @@ +'use strict'; + +const common = require('../common'); +const v8 = require('v8'); +const Readable = require('stream').Readable; + +const bench = common.createBenchmark(main, { + n: [100e1] +}); + +function main(conf) { + const n = +conf.n; + const b = new Buffer(32); + const s = new Readable(); + function noop() {} + s._read = noop; + + // Force optimization before starting the benchmark + s.push(b); + v8.setFlagsFromString('--allow_natives_syntax'); + eval('%OptimizeFunctionOnNextCall(s.read)'); + s.push(b); + while (s.read(106)); + + bench.start(); + for (var k = 0; k < n; ++k) { + for (var i = 0; i < 1e4; ++i) + s.push(b); + while (s.read(106)); + } + bench.end(n); +} diff --git a/benchmark/streams/readable-boundaryread.js b/benchmark/streams/readable-boundaryread.js new file mode 100644 index 00000000000000..93a6616361ba18 --- /dev/null +++ b/benchmark/streams/readable-boundaryread.js @@ -0,0 +1,33 @@ +'use strict'; + +const common = require('../common'); +const v8 = require('v8'); +const Readable = require('stream').Readable; + +const bench = common.createBenchmark(main, { + n: [200e1] +}); + +function main(conf) { + const n = +conf.n; + const b = new Buffer(32); + const s = new Readable(); + function noop() {} + s._read = noop; + + // Force optimization before starting the benchmark + s.push(b); + v8.setFlagsFromString('--allow_natives_syntax'); + eval('%OptimizeFunctionOnNextCall(s.push)'); + eval('%OptimizeFunctionOnNextCall(s.read)'); + s.push(b); + while (s.read(32)); + + bench.start(); + for (var k = 0; k < n; ++k) { + for (var i = 0; i < 1e4; ++i) + s.push(b); + while (s.read(32)); + } + bench.end(n); +} diff --git a/benchmark/streams/readable-readall.js b/benchmark/streams/readable-readall.js new file mode 100644 index 00000000000000..07626fd7978b9a --- /dev/null +++ b/benchmark/streams/readable-readall.js @@ -0,0 +1,32 @@ +'use strict'; + +const common = require('../common'); +const v8 = require('v8'); +const Readable = require('stream').Readable; + +const bench = common.createBenchmark(main, { + n: [50e2] +}); + +function main(conf) { + const n = +conf.n; + const b = new Buffer(32); + const s = new Readable(); + function noop() {} + s._read = noop; + + // Force optimization before starting the benchmark + s.push(b); + v8.setFlagsFromString('--allow_natives_syntax'); + eval('%OptimizeFunctionOnNextCall(s.read)'); + s.push(b); + while (s.read()); + + bench.start(); + for (var k = 0; k < n; ++k) { + for (var i = 0; i < 1e4; ++i) + s.push(b); + while (s.read()); + } + bench.end(n); +} diff --git a/benchmark/streams/readable-unevenread.js b/benchmark/streams/readable-unevenread.js new file mode 100644 index 00000000000000..4a69bd97a94bcf --- /dev/null +++ b/benchmark/streams/readable-unevenread.js @@ -0,0 +1,32 @@ +'use strict'; + +const common = require('../common'); +const v8 = require('v8'); +const Readable = require('stream').Readable; + +const bench = common.createBenchmark(main, { + n: [100e1] +}); + +function main(conf) { + const n = +conf.n; + const b = new Buffer(32); + const s = new Readable(); + function noop() {} + s._read = noop; + + // Force optimization before starting the benchmark + s.push(b); + v8.setFlagsFromString('--allow_natives_syntax'); + eval('%OptimizeFunctionOnNextCall(s.read)'); + s.push(b); + while (s.read(12)); + + bench.start(); + for (var k = 0; k < n; ++k) { + for (var i = 0; i < 1e4; ++i) + s.push(b); + while (s.read(12)); + } + bench.end(n); +} diff --git a/benchmark/timers/immediate.js b/benchmark/timers/immediate.js new file mode 100644 index 00000000000000..7d85dc0325a8be --- /dev/null +++ b/benchmark/timers/immediate.js @@ -0,0 +1,113 @@ +'use strict'; +var common = require('../common.js'); + +var bench = common.createBenchmark(main, { + thousands: [2000], + type: ['depth', 'depth1', 'breadth', 'breadth1', 'breadth4', 'clear'] +}); + +function main(conf) { + var N = +conf.thousands * 1e3; + switch (conf.type) { + case 'depth': + depth(N); + break; + case 'depth1': + depth1(N); + break; + case 'breadth': + breadth(N); + break; + case 'breadth1': + breadth1(N); + break; + case 'breadth4': + breadth4(N); + break; + case 'clear': + clear(N); + break; + } +} + +// setImmediate tail recursion, 0 arguments +function depth(N) { + var n = 0; + bench.start(); + setImmediate(cb); + function cb() { + n++; + if (n === N) + bench.end(N / 1e3); + else + setImmediate(cb); + } +} + +// setImmediate tail recursion, 1 argument +function depth1(N) { + var n = 0; + bench.start(); + setImmediate(cb, 1); + function cb(a1) { + n++; + if (n === N) + bench.end(N / 1e3); + else + setImmediate(cb, 1); + } +} + +// concurrent setImmediate, 0 arguments +function breadth(N) { + var n = 0; + bench.start(); + function cb() { + n++; + if (n === N) + bench.end(N / 1e3); + } + for (var i = 0; i < N; i++) { + setImmediate(cb); + } +} + +// concurrent setImmediate, 1 argument +function breadth1(N) { + var n = 0; + bench.start(); + function cb(a1) { + n++; + if (n === N) + bench.end(N / 1e3); + } + for (var i = 0; i < N; i++) { + setImmediate(cb, 1); + } +} + +// concurrent setImmediate, 4 arguments +function breadth4(N) { + var n = 0; + bench.start(); + function cb(a1, a2, a3, a4) { + n++; + if (n === N) + bench.end(N / 1e3); + } + for (var i = 0; i < N; i++) { + setImmediate(cb, 1, 2, 3, 4); + } +} + +function clear(N) { + bench.start(); + function cb(a1) { + if (a1 === 2) + bench.end(N / 1e3); + } + for (var i = 0; i < N; i++) { + clearImmediate(setImmediate(cb, 1)); + } + setImmediate(cb, 2); +} diff --git a/benchmark/tls/convertprotocols.js b/benchmark/tls/convertprotocols.js new file mode 100644 index 00000000000000..32da0fe6fde271 --- /dev/null +++ b/benchmark/tls/convertprotocols.js @@ -0,0 +1,20 @@ +'use strict'; + +const common = require('../common.js'); +const tls = require('tls'); + +const bench = common.createBenchmark(main, { + n: [1, 50000] +}); + +function main(conf) { + const n = +conf.n; + + var i = 0; + var m = {}; + common.v8ForceOptimization( + tls.convertNPNProtocols, ['ABC', 'XYZ123', 'FOO'], m); + bench.start(); + for (; i < n; i++) tls.convertNPNProtocols(['ABC', 'XYZ123', 'FOO'], m); + bench.end(n); +} diff --git a/benchmark/url/url-format.js b/benchmark/url/url-format.js new file mode 100644 index 00000000000000..3f7df8a0bc4536 --- /dev/null +++ b/benchmark/url/url-format.js @@ -0,0 +1,33 @@ +'use strict'; +const common = require('../common.js'); +const url = require('url'); +const v8 = require('v8'); + +const bench = common.createBenchmark(main, { + type: 'one two'.split(' '), + n: [25e6] +}); + +function main(conf) { + const type = conf.type; + const n = conf.n | 0; + + const inputs = { + one: {slashes: true, host: 'localhost'}, + two: {protocol: 'file:', pathname: '/foo'}, + }; + const input = inputs[type] || ''; + + // Force-optimize url.format() so that the benchmark doesn't get + // disrupted by the optimizer kicking in halfway through. + for (const name in inputs) + url.format(inputs[name]); + + v8.setFlagsFromString('--allow_natives_syntax'); + eval('%OptimizeFunctionOnNextCall(url.format)'); + + bench.start(); + for (var i = 0; i < n; i += 1) + url.format(input); + bench.end(n); +} diff --git a/common.gypi b/common.gypi index 8da603d00f618e..646db0d7bbb339 100644 --- a/common.gypi +++ b/common.gypi @@ -11,6 +11,11 @@ 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way 'python%': 'python', + 'node_shared%': 'false', + 'node_use_v8_platform%': 'true', + 'node_use_bundled_v8%': 'true', + 'node_module_version%': '', + 'node_tag%': '', 'uv_library%': 'static_library', @@ -288,8 +293,12 @@ 'ldflags': [ '-maix64' ], }], ], + 'ldflags': [ '-Wl,-bbigtoc' ], 'ldflags!': [ '-rdynamic' ], }], + [ 'node_shared=="true"', { + 'cflags': [ '-fPIC' ], + }], ], }], [ 'OS=="android"', { diff --git a/configure b/configure index f7a3f41ae02821..b23bfc36a282d0 100755 --- a/configure +++ b/configure @@ -24,6 +24,10 @@ from gyp.common import GetFlavor sys.path.insert(0, os.path.join(root_dir, 'tools', 'configure.d')) import nodedownload +# imports in tools/ +sys.path.insert(0, os.path.join(root_dir, 'tools')) +import getmoduleversion + # parse our options parser = optparse.OptionParser() @@ -244,6 +248,11 @@ parser.add_option('--release-urlbase', '`sourceUrl` and `headersUrl`. When compiling a release build, this ' 'will default to https://nodejs.org/download/release/') +parser.add_option('--enable-d8', + action='store_true', + dest='enable_d8', + help=optparse.SUPPRESS_HELP) # Unsupported, undocumented. + parser.add_option('--v8-options', action='store', dest='v8_options', @@ -420,6 +429,26 @@ parser.add_option('--without-inspector', dest='without_inspector', help='disable experimental V8 inspector support') +parser.add_option('--shared', + action='store_true', + dest='shared', + help='compile shared library for embedding node in another project. ' + + '(This mode is not officially supported for regular applications)') + +parser.add_option('--without-v8-platform', + action='store_true', + dest='without_v8_platform', + default=False, + help='do not initialize v8 platform during node.js startup. ' + + '(This mode is not officially supported for regular applications)') + +parser.add_option('--without-bundled-v8', + action='store_true', + dest='without_bundled_v8', + default=False, + help='do not use V8 includes from the bundled deps folder. ' + + '(This mode is not officially supported for regular applications)') + (options, args) = parser.parse_args() # Expand ~ in the install prefix now, it gets written to multiple files. @@ -810,12 +839,15 @@ def configure_node(o): o['variables']['node_target_type'] = 'static_library' o['variables']['node_no_browser_globals'] = b(options.no_browser_globals) + o['variables']['node_shared'] = b(options.shared) + o['variables']['node_module_version'] = int(getmoduleversion.get_version()) if options.linked_module: o['variables']['library_files'] = options.linked_module o['variables']['asan'] = int(options.enable_asan or 0) o['variables']['v8_inspector'] = b(not options.without_inspector) + o['variables']['debug_devtools'] = 'node' if options.use_xcode and options.use_ninja: raise Exception('--xcode and --ninja cannot be used together.') @@ -855,6 +887,14 @@ def configure_v8(o): o['variables']['v8_optimized_debug'] = 0 # Compile with -O0 in debug builds. o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables. o['variables']['v8_use_snapshot'] = 'false' if options.without_snapshot else 'true' + o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform) + o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8) + o['variables']['node_enable_d8'] = b(options.enable_d8) + if options.enable_d8: + o['variables']['test_isolation_mode'] = 'noop' # Needed by d8.gyp. + if options.without_bundled_v8 and options.enable_d8: + raise Exception('--enable-d8 is incompatible with --without-bundled-v8.') + def configure_openssl(o): o['variables']['node_use_openssl'] = b(not options.without_ssl) diff --git a/deps/icu-small/source/data/in/icudt57l.dat b/deps/icu-small/source/data/in/icudt57l.dat index e2e8caab68322b..87131f44e10ac4 100644 Binary files a/deps/icu-small/source/data/in/icudt57l.dat and b/deps/icu-small/source/data/in/icudt57l.dat differ diff --git a/deps/npm/.travis.yml b/deps/npm/.travis.yml index 69cb956a99b3ab..d4cef3e3d15175 100644 --- a/deps/npm/.travis.yml +++ b/deps/npm/.travis.yml @@ -1,11 +1,16 @@ language: node_js node_js: - - "6" + # LTS is our most important target - "4" + # next LTS and master is next most important + - "6" + # still in LTS maintenance until fall 2016 + # (also still in wide use) + - "0.10" + # will be unsupported as soon as 6 becomes LTS and 7 released - "5" + # technically in LTS / distros, unbeloved - "0.12" - - "0.10" - - "0.8" env: - DEPLOY_VERSION=testing before_install: diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index 6eb95dbebdc431..9e9000de638ccb 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -402,3 +402,9 @@ Gianluca Casati André Herculano Wyatt Preul Myles Borins +Elliot Lee +Dmitry Kirilyuk +Aaron Tribou +Tapani Moilanen +Han Seoul-Oh +Aleksey Shvayka diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index 9b5a0323d0c812..4f94100434f573 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,513 @@ +### v3.10.3 (2016-06-23) + +Given that we had not one, but two updates to our RC this past week, it +should come as no surprise that this week's full release is a bit +lighter. We have some documentation patches and a couple of bug fixes via +dependency updates. + +If you haven't yet checked out last week's release, +[v3.10.0](https://github.com/npm/npm/releases/tag/v3.10.0) +and the two follow up releases +[v3.10.1](https://github.com/npm/npm/releases/tag/v3.10.1) +and +[v3.10.2](https://github.com/npm/npm/releases/tag/v3.10.2), +you really should do so. They're the most important releases we've had in +quite a while, fixing a bunch of critical bugs (including an issue +impacting publishing with Node.js 6.x) and of course, bringing in the new +and improved progress bar. + +#### BUM SYMLINKS BURN NO MORE + +There's been a bug lurking where broken symlinks in your `node_modules` +folder could cause all manner of mischief, from crashes to empty `npm ls` +results. The intrepid [@watilde](https://github.com/watilde) tracked this +down for us. + +This addresses the root cause of the outdated crasher we protected +against earlier this week in +[#13115](https://github.com/npm/npm/issues/13115). + +This also fixes [#9564](https://github.com/npm/npm/issues/9564), the +problem where a bad symlink in your global modules would result in an +empty result when you ran `npm ls -g`. + +This ALSO likely fixes numerous "Missing argument #1" errors. (But surely +not all of them as that's actually just a generic arity and +type-validation failure.) + +* [`ca92ac4`](https://github.com/npm/npm/commit/ca92ac455b841a708dd89262ff88d503b125d717) + [npm/read-package-tree#6](https://github.com/npm/read-package-tree/pull/6) + `read-package-tree@5.1.5`: + Make bad symlinks be non-fatal errors when reading the tree off disk. + ([@watilde](https://github.com/watilde)) + +#### BETTER UNICODE DETECTION + +* [`6c3f7f0`](https://github.com/npm/npm/commit/6c3f7f043f09fc2aa19ffd3f956787635fa6f4d0) + `has-unicode@2.0.1`: + Fix unicode detection on a number of Linux distributions. + ([@Darkhogg](https://github.com/Darkhogg)) ([@gagern](https://github.com/gagern)) + + +#### DOCUMENTATION FIXES + +* [`b9243ee`](https://github.com/npm/npm/commit/b9243ee60a3d60505c2502dc8633811b42c8aaea) + [#13127](https://github.com/npm/npm/pull/13127) + Remove extra backtick from `npm ls` documentation. + ([@shvaikalesh](https://github.com/shvaikalesh)) +* [`e05c0c2`](https://github.com/npm/npm/commit/e05c0c243cc702f9c392c001f668a90b57eaeb0e) + [iarna/has-unicode#3](https://github.com/iarna/has-unicode/pull/3) + [iarna/has-unicode#4](https://github.com/iarna/has-unicode/pull/4) + [#13084](https://github.com/npm/npm/pull/13084) + Correct changelog entry for shrinkwrap lifecycle order. + ([@SimenB](https://github.com/SimenB)) +* [`823994f`](https://github.com/npm/npm/commit/823994f100a0e59e1dd109e312811f971968ec75) + [#13080](https://github.com/npm/npm/pull/13080) + Describe using `npm pack` to see a dry run of publication results in + the `npm publish` documentation. + ([@laughinghan](https://github.com/laughinghan)) + +#### DEPENDENCY UPDATES + +* [`e44d2db`](https://github.com/npm/npm/commit/e44d2db1ad0d860ca08e99c81135bd399fb733b1) + `aproba@1.0.4`: Documentation updates and minor refactoring. + ([@iarna](https://github.com/iarna)) + +### v3.10.2 (2016-06-17): + +This is a quick hotfix release with two small bug fixes. First, there was +an issue where the new progress bar would overwrite interactive prompts, +that is, those found in `npm login` and `npm init`. Second, if the +directory you were running `npm outdated` on was a bad link or otherwise had +unrecoverable errors then npm would crash instead of printing the error. + +* [`fbefb86`](https://github.com/npm/npm/commit/fbefb8675b26320b295f481b4872ce99f0180807) + [`7779e9f`](https://github.com/npm/npm/commit/7779e9fb9430f6547532c67f2471864d62bbd5bc) + [#13105](https://github.com/npm/npm/issues/13105) + Disable progress bar in `adduser` and `init`. +* [`6a33b2c`](https://github.com/npm/npm/commit/6a33b2c13f637a41e25cd0339925bc430b50358a) + [#13115](https://github.com/npm/npm/issues/13115) + Ensure that errors reading the package tree for `outdated` does not result + in crashs. + ([@iarna](https://github.com/iarna)) + +### v3.10.1 (2016-06-17): + +There are two very important bug fixes and one long-awaited (and signifcant!) +deprecation in this hotfix release. [Hold on.](http://butt.holdings/) + +#### *WHOA* + +When Node.js 6.0.0 was released, the CLI team noticed an alarming upsurge in +bugs related to important files (like `README.md`) not being included in +published packages. The new bugs looked much like +[#5082](https://github.com/npm/npm/issues/5082), which had been around in one +form or another since April, 2014. #5082 used to be a very rare (and obnoxious) +bug that the CLI team hadn't had much luck reproducing, and we'd basically +marked it down as a race condition that arose on machines using slow and / or +rotating-media-based hard drives. + +Under 6.0.0, the behavior was reliable enough to be nearly deterministic, and +made it very difficult for publishers using `.npmignore` files in combination +with `"files"` stanzas in `package.json` to get their packages onto the +registry without one or more files missing from the packed tarball. The entire +saga is contained within [the issue](https://github.com/npm/npm/issues/5082), +but the summary is that an improvement to the performance of +[`fs.realpath()`](https://nodejs.org/api/fs.html#fs_fs_realpath_path_options_callback) +made it much more likely that the packing code would lose the race. + +Fixing this has proven to be very difficult, in part because the code used by +npm to produce package tarballs is more complicated than, strictly speaking, it +needs to be. [**@evanlucas**](https://github.com/evanlucas) contributed [a +patch](https://github.com/npm/fstream/pull/50) that passed the tests in a +[special test suite](https://github.com/othiym23/eliminate-5082) that I +([**@othiym23**](https://github.com/othiym23)) created (with help from +[**@addaleax**](https://github.com/addaleax)), but only _after_ we'd released +the fixed version of that package did we learn that it actually made the +problem _worse_ in other situations in npm proper. Eventually, +[**@rvagg**](https://github.com/rvagg) put together a more durable fix that +appears to completely address the errant behavior under Node.js 6.0.0. That's +the patch included in this release. Everybody should chip in for redback +insurance for Rod and his family; he's done the community a huge favor. + +Does this mean the long (2+ year) saga of #5082 is now over? At this point, I'm +going to quote from my latest summary on the issue: + +> The CLI team (mostly me, with input from the rest of the team) has decided that +> the overall complexity of the interaction between `fstream`, `fstream-ignore`, +> `fstream-npm`, and `node-tar` has grown more convoluted than the team is +> comfortable (maybe even capable of) supporting. +> +> - While I believe that @rvagg's (very targeted) fix addresses _this_ issue, I +> would be shocked if there aren't other race conditions in npm's packing +> logic. I've already identified a couple other places in the code that are +> most likely race conditions, even if they're harder to trigger than the +> current one. +> - The way that dependency bundling is integrated leads to a situation in +> which a bunch of logic is duplicated between `fstream-npm` and +> `lib/utils/tar.js` in npm itself, and the way `fstream`'s extension +> mechanism works makes this difficult to clean up. This caused a nasty +> regression ([#13088](https://github.com/npm/fstream/pull/50), see below) as +> of ~`npm@3.8.7` where the dependencies of `bundledDependencies` were no +> longer being included in the built package tarballs. +> - The interaction between `.npmignore`, `.gitignore`, and `files` is hopelessly +> complicated, scattered in many places throughout the code. We've been +> discussing [making the ignores and includes logic clearer and more +> predictable](https://github.com/npm/npm/wiki/Files-and-Ignores), and the +> current code fights our efforts to clean that up. +> +> So, our intention is still to replace `fstream`, `fstream-ignore`, and +> `fstream-npm` with something much simpler and purpose-built. There's no real +> reason to have a stream abstraction here when a simple recursive-descent +> filesystem visitor and a synchronous function that can answer whether a given +> path should be included in the packed tarball would do the job adequately. +> +> What's not yet clear is whether we'll need to replace `node-tar` in the +> process. `node-tar` is a very robust implementation of tar (it handles, like, +> everything), and it also includes some very important tweaks to prevent several +> classes of security exploits involving maliciously crafted packages. However, +> its packing API involves passing in an `fstream` instance, so we'd either need +> to produce something that follows enough of `fstream`'s contract for `node-tar` +> to keep working, or swap `node-tar` out for something like `tar-stream` (and +> then ensuring that our use of `tar-stream` is secure, which could involve +> security patches for either npm or `tar-stream`). + +The testing and review of `fstream@1.0.10` that the team has done leads us to +believe that this bug is fixed, but I'm feeling more than a little paranoid +about fstream now, so it's important that people keep a close eye on their +publishes for a while and let us know immediately if they notice any +irregularities. + +* [`8802f6c`](https://github.com/npm/npm/commit/8802f6c152ea35cb9e5269c077c3a2f9df411afc) + [#5082](https://github.com/npm/npm/issues/5082) `fstream@1.0.10`: Ensure that + entries are collected after a paused stream resumes. + ([@rvagg](https://github.com/rvagg)) +* [`c189723`](https://github.com/npm/npm/commit/c189723110497a17dac3b0596f2916deeed93ee7) + [#5082](https://github.com/npm/npm/issues/5082) Remove the warning introduced + in `npm@3.10.0`, because it should no longer be necessary. + ([@othiym23](https://github.com/othiym23)) + +#### *ERK* + +Because the interaction between `fstream`, `fstream-ignore`, `fsream-npm`, and +`node-tar` is so complex, it's proven difficult to add support for npm features +like `bundledDependencies` without duplicating some logic within npm's code +base. While [fixing a completely unrelated +bug](https://github.com/npm/npm/issues/9642), we "cleaned up" some of this +seemingly duplicated code, and in the process removed the code that ensured +that the dependencies of `bundledDependencies` are themselves bundled. We've +brought that code back into the code base (without reopening #9642), and added +a test to ensure that this regression can't recur. + +* [`1b6ceca`](https://github.com/npm/npm/commit/1b6ceca32fc81ca7cc7ac2eb7d11f687e6f87f26) + [#13088](https://github.com/npm/npm/issues/13088) Partially restore npm's own + version of the `fstream-npm` function `applyIgnores` to ensure that the + dependencies of `bundledDependencies` are included in published packages. + ([@iarna](https://github.com/iarna)) + +#### GOODBYE, FAITHFUL FRIEND + +At NodeConf Adventure 2016 (RIP in peace, Mikeal Rogers's NodeConf!), the CLI +team had an opportunity to talk to representatives from some of the larger +companies that we knew were still using Node.js 0.8 in production. After asking +them whether they were still using 0.8, we got back blank stares and questions +like, "0.8? You mean, from four years ago?" After establishing that being able +to run npm in their legacy environments was no longer necessary, the CLI team +made the decision to drop support for 0.8. (Faithful observers of our [team +meetings](https://github.com/npm/npm/issues?utf8=%E2%9C%93&q=is%3Aissue+npm+cli+team+meeting+) +will have known this was the plan for NodeConf since the beginning of 2016.) + +In practice, this means only what's in the commit below: we've removed 0.8 from +our continuous integration test matrix below, and will no longer be habitually +testing changes under Node 0.8. We may also give ourselves permission to use +`setImmediate()` in test code. However, since the project still supports +Node.js 0.10 and 0.12, it's unlikely that patches that rely on ES 2015 +functionality will land anytime soon. + +Looking forward, the team's current plan is to drop support for Node.js 0.10 +when its LTS maintenace window expires in October, 2016, and 0.12 when its +maintenance / LTS window ends at the end of 2016. We will also drop support for +Node.js 5.x when Node.js 6 becomes LTS and Node.js 7 is released, also in the +October-December 2016 timeframe. + +(Confused about Node.js's LTS policy? [Don't +be!](https://github.com/nodejs/LTS) If you look at [this +diagram](https://github.com/nodejs/LTS/blob/ce364a94b0e0619eba570cd57be396573e1ef889/schedule.png), +it should make all of the preceding clear.) + +If, in practice, this doesn't work with distribution packagers or other +community stakeholders responsible for packaging and distributing Node.js and +npm, please reach out to us. Aligning the npm CLI's LTS policy with Node's +helps everybody minimize the amount of work they need to do, and since all of +our teams are small and very busy, this is somewhere between a necessity and +non-negotiable. + +* [`d6afd5f`](https://github.com/npm/npm/commit/d6afd5ffb1b19e5d94aeee666afcb8adaced58db) + Remove 0.8 from the Node.js testing matrix, and reorder to match real-world + priority, with comments. ([@othiym23](https://github.com/othiym23)) + +### v3.10.0 (2016-06-16): + +Do we have a release for you! We have our first new lifecycle since +`version`, a new progress bar and a bunch of bug fixes. +[I'm](https://github.com/iarna) really excited about this release, let me +tell you!! + +#### DANGER: PUBLISHING ON NODE 6.0.0 + +Publishing and packing are buggy under Node versions greater than 6.0.0. +Please use Node.js LTS (4.4.x) to publish packages. See +[#5082](https://github.com/npm/npm/issues/5082) for details and current +status. + +* [`4e52cef`](https://github.com/npm/npm/commit/4e52cef3d4170c8abab98149666ec599f8363233) + [#13077](https://github.com/npm/npm/pull/13077) + Warn when using Node 6+. + ([@othiym23](https://github.com/othiym23)) + +#### NEW LIFECYCLE SCRIPT: `shrinkwrap` + +* [`e8c80f2`](https://github.com/npm/npm/commit/e8c80f20bfd5d1618e85dbab41660d6f3e5ce405) + [#10744](https://github.com/npm/npm/issues/10744) + You can now add `preshrinkwrap`, `shrinkwrap` and `postshrinkwrap` to your `package.json` + scripts section. They are run when you run `npm shrinkwrap` or `npm install --save` with + an `npm-shrinkwrap.json` present in your module directory. + + `preshrinkwrap` and `shrinkwrap` is run prior to generating the new `npm-shrinkwrap.json` + and `postshrinkwrap` is run after. + ([@SimenB](https://github.com/SimenB)) + +#### NEW PROGRESS BAR + +![Install with new progress bar](http://shared.by.re-becca.org/misc-images/new-gauge-color.gif) + +We have a new progress bar and a bunch of related improvements! + +##### BLOCKING BLOCKING + +**!!WARNING!!** As a part of this change we now explicitly set +`process.stdout` and `process.stderr` to be _blocking_ if they are ttys, +using [set-blocking](https://www.npmjs.com/package/set-blocking). This is +necessary to ensure that we can fully erase the progress bar before we start +writing other things out to the console. + +Prior to Node.js 6.0.0, they were already blocking on Windows, and MacOS. +Meanwhile, on Linux they were always non-blocking but had large (64kb) +buffers, which largely made this a non-issue there. Starting with Node.js +6.0.0 they became non-blocking on MacOS and that caused some unexpected +issues (see [nodejs/node#6456](https://github.com/nodejs/node/issues/6456)). + +If you are a Linux user, it's plausible that this might have a performance +impact if your terminal can't keep up with output rate. If you experience +this, we want to know! Please [file an +issue](https://github.com/npm/npm/issues/new) at our issue tracker. + +##### BETTER LAYOUT + +Let's start by talking about what goes into the new progress bar: + +``` +⸨░░░░░░░░░░⠂⠂⠂⠂⠂⠂⠂⠂⸩ ⠹ loadExtraneous: verb afterAdd /Users/rebecca/.npm/null/0.0.0/package/package.json written + ↑‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ ↑ ‾‾‾‾‾‾‾‾‾↑‾‾‾‾ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾↑‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ + percent complete spinner current thing we're doing most recent log line +``` + +The _spinner_ is intended as an activity indicator–it moves whenever +npm sends something to its logs. It also spins at a constant speed while +waiting on the network. + +The _current thing we're doing_ relates to how we track how much work has +been done. It's the name of the unit of work we most recently started or +completed some of. Sometimes these names are more obvious than others and +that's something we'll look at improving over time. + +And finally, the _most recent log line_ is exactly that, it's the most +recent line that you would have seen if you were running with +`--loglevel=silly` or were watching the `npm-debug.log`. These are written +to be useful to the npm developers above all else, so they may sometimes be +a little cryptic. + +* [`6789978`](https://github.com/npm/npm/commit/6789978ab0713f67928177a9109fed43953ccbda) + [#13075](https://github.com/npm/npm/pull/13075) + `npmlog@3.1.2`: Update to the latest npmlog, which includes the new and + improved progress bar layout. + ([@iarna](https://github.com/iarna)) + +##### MORE PERFORMANT + +The underlying code for the progress bar was rewritten, in part with +performance in mind. Previously whenever you updated the progress bar it +would check an internal variable for how long it had been since the last +update and if it had been long enough, it would print out what you gave it. +With the new progress bar we do updates at a fixed interval (with +`setInterval`) and "updating" the progress bar just updates some variables +that will be used when the next tick of the progress bar happens. Currently +progress bar updates happen every 50ms, although that's open to tuning. + +##### WIDE(R) COMPATIBILITY + +I spent a lot of time working our Unicode support. There were a few issues +that plagued us: + +Previously one of the characters we used was _ambiguous width_ which means +that it was possible to configure your terminal to display it as _full +width_. If you did this, the output would be broken because we assumed it +was a _half width_ character. We no longer use any of these characters. + +Previously, we defaulted to using Unicode on Windows. This isn't a safe +assumption, however, as folks in non-US locales often use other code pages +for their terminals. Windows doesn't provide* any facility available to +Node.js for determining the current code page, so we no longer try to use +Unicode on Windows. + +_\* The facilities it does provide are a command line tool and a windows +system call. The former isn't satisfactory for speed reasons and the latter +can't be accessed from a JS-only Node.js program._ + +##### FOR THE FUTURE: THEMES + +The new version of the progress bar library supports plugable themes. Adding +support to npm shouldn't be too difficult. The built in themes are: + +* `ASCII` – The fallback theme which is always available. +* `colorASCII` – Inverts the color of the completed portion of the progress + bar. The default on Windows and usually on Linux. (Color support is + determined by looking at the `TERM` environment variable.) +* `brailleSpinner` – A braille based spinner and other unicode enhancements. MacOS only. +* `colorBrailleSpinner` – The default on MacOS, a combination of the above two. + +##### LESS GARBLED OUTPUT + +As a part of landing this I've also taken the opportunity to more +systematically disable the progress bar prior to printing to `stdout` or +running external commands (in particular: git). This should ensure that the +progress bar doesn't get left on screen after something else prints +something. We also are now much more zealous about erasing the progress bar +on exit, so if you `Ctrl-C` out of an install we'll still cleanup the +progress bar. + +* [`63f153c`](https://github.com/npm/npm/commit/63f153c743f9354376bfb9dad42bd028a320fd1f) + [#13075](https://github.com/npm/npm/pull/13075) + Consistently make sure that the progress bar is hidden before we try to + write to stdout. + ([@iarna](https://github.com/iarna)) +* [`8da79fa`](https://github.com/npm/npm/commit/8da79fa60de4972dca406887623d4e430d1609a1) + [#13075](https://github.com/npm/npm/pull/13075) + Be more methodical about disabling progress bars before running external + commands. + ([@iarna](https://github.com/iarna)) + +#### REPLACE `process.nextTick` WITH `asap` ASAP + +* [`5873b56`](https://github.com/npm/npm/commit/5873b56cb315437dfe97e747811c0b9c297bfd38) + [`254ad7e`](https://github.com/npm/npm/commit/254ad7e38f978b81046d242297fe8b122bfb5852) + [#12754](https://github.com/npm/npm/issues/12754) + Use `asap` in preference over `process.nextTick` to avoid recursion warnings. + Under the hood `asap` uses `setImmediate` when available and falls back to + `process.nextTick` when it's not. Versions of node that don't support + `setImmediate` have a version of `process.nextTick` that actually behaves + like the current `setImmediate`. + ([@lxe](https://github.com/lxe)) + +#### FIXES AND REFACTORING + +Sometimes the installer would get it into its head that it could move or +remove things that it really shouldn't have. While the reproducers for this were +often a bit complicated (the core reproducer involved five symlinks(!)), it turns +out this is an easy scenario to end up in if your project has a bunch of small +modules and you're linking them while developing them. + +Fixing this ended up involving doing an important and overdue rewrite of how +the installer keeps track of (and interrogates) the relationships between +modules. This likely fixes other related bugs, and in the coming weeks +we'll verify and close them as we find them. There are a whole slew of +commits related to this rewrite, and if you'd like to learn more check +out the PR where I describe what I did in detail: [#12775](https://github.com/npm/npm/pull/12775) + +* [`8f3e111`](https://github.com/npm/npm/commit/8f3e111fdd2ce7824864f77b04e5206bdaf961a1) + [`c0b0ed1`](https://github.com/npm/npm/commit/c0b0ed1e9945c01b2e68bf22af3fe4005aa4bcd4) + [#10800](https://github.com/npm/npm/issues/10800) + Remove install pruning stage–this was obsoleted by making the installer keep + itself up to date as it goes along. This is NOT related to `npm prune`. + ([@iarna](https://github.com/iarna)) + +#### MAKE OUTDATED MORE WIDELY LEGIBLE + +* [`21c60e9`](https://github.com/npm/npm/commit/21c60e9bb56d47da17b79681f2142b3dcf4c804b) + [#12843](https://github.com/npm/npm/pull/12843) + In `npm outdated, stop coloring the _Location_ and _Package Type_ columns. + Previously they were colored dark gray, which was hard to read for some + users. + ([@tribou](https://github.com/tribou)) + +#### DOCUMENTATION UPDATE + +* [`eb0a72e`](https://github.com/npm/npm/commit/eb0a72eb95862c1d0d41a259d138ab601d538793) + [#12983](https://github.com/npm/npm/pull/12983) + Describe how to run the lifecycle scripts of dependencies. How you do + this changed with `npm` v2. + ([@Tapppi](https://github.com/Tapppi)) + +### DEPENDENCY UPDATES + +* [`da743dc`](https://github.com/npm/npm/commit/da743dc2153fed8baca3dada611b188f53ab5931) + `which@1.2.10`: + Fix bug where unnecessary special case path handling for Windows could + produce unexpected results on Unix systems. + ([@isaacs](https://github.com/isaacs)) +* [`4533bd5`](https://github.com/npm/npm/commit/4533bd501d54aeedfec3884f4fd54e8c2edd6020) + `npm-user-validate@0.1.4`: + Validate the length of usernames. + ([@aredridel](https://github.com/aredridel)) +* [`4a18922`](https://github.com/npm/npm/commit/4a18922e56f9dc902fbb4daa8f5fafa4a1b89376) + `glob@7.0.4`: + Fixes issues with Node 6 and "long or excessively symlink-looping paths". + ([@isaacs](https://github.com/isaacs)) +* [`257fe11`](https://github.com/npm/npm/commit/257fe11052987e5cfec2abdf52392dd95a6c6ef3) + `npm-package-arg@4.2.0`: + Add `escapedName` to the result. It is suitable for passing through to a + registry without further processing. + ([@nexdrew](https://github.com/nexdrew)) +* [`dda3ca7`](https://github.com/npm/npm/commit/dda3ca70f74879106589ef29e167c8b91ef5aa4c) + `wrappy@1.0.2` + ([@zkat](https://github.com/zkat)) +* [`25f1db5`](https://github.com/npm/npm/commit/25f1db504d0fd8c97211835f0027027fe95e0ef3) + `readable-stream@2.1.4` + ([@calvinmetcalf](https://github.com/calvinmetcalf)) +* [`9d64fe6`](https://github.com/npm/npm/commit/9d64fe676ebc6949c687ffb85bd93eca3137fc0d) + `abbrev@1.0.9` + ([@isaacs](https://github.com/isaacs)) + +### v3.9.6 (2016-06-02): + +#### SMALL OUTPUT TWEAK + +* [`0bdc9d1`](https://github.com/npm/npm/commit/0bdc9d13b73df07e63a58470ea001fda490e5869) + [#12879](https://github.com/npm/npm/pull/12879) + The usage output for npm commands was somehow under the impression that + the singular form of `aliases` is `aliase`. This has been corrected to show + `alias` instead. + ([@intelliot](https://github.com/intelliot)) + +#### DOC UPDATES + +* [`f771b49`](https://github.com/npm/npm/commit/f771b49f5d65bbef540c231fbfcca71cacdce4db) + [#12933](https://github.com/npm/npm/pull/12933) + Add `config.gypi` to list of files that are always ignored in the + `package.json` manpage. + ([@Jokero](https://github.com/Jokero)) + +#### DEPENDENCY UPDATES + +* [`61c1d9c`](https://github.com/npm/npm/commit/61c1d9cd4b2296bd41d55a5c58e35ca5f028b9bc) + [#12926](https://github.com/npm/npm/pull/12926) + Removed unused dependency `lodash.isarray`. + ([@mmalecki](https://github.com/mmalecki)) +* [`168ed28`](https://github.com/npm/npm/commit/168ed2834b2c6db8bb39f81baadc0bf275807328) + [#12926](https://github.com/npm/npm/pull/12926) + Removed unused dependency `lodash.keys`. + ([@mmalecki](https://github.com/mmalecki)) + ### v3.9.5 (2016-05-27): Just a quick point release. We had an issue where I (Kat) included the diff --git a/deps/npm/appveyor.yml b/deps/npm/appveyor.yml index 47d806df34c041..6bec7c49389b91 100644 --- a/deps/npm/appveyor.yml +++ b/deps/npm/appveyor.yml @@ -2,13 +2,15 @@ environment: matrix: # LTS is our most important target - nodejs_version: "4" - # latest - - nodejs_version: "5" - # I like 0.10 better than 0.12 + # next LTS and master is next most important + - nodejs_version: "6" + # still in LTS maintenance until fall 2016 + # (also still in wide use) - nodejs_version: "0.10" + # will be unsupported as soon as 6 becomes LTS and 7 released + - nodejs_version: "5" + # technically in LTS / distros, unbeloved - nodejs_version: "0.12" - # EOL summer 2016, most likely - - nodejs_version: "0.8" COVERALLS_REPO_TOKEN: secure: XdC0aySefK0HLh1GNk6aKrzZPbCfPQLyA4mYtFGEp4DrTuZA/iuCUS0LDqFYO8JQ platform: diff --git a/deps/npm/doc/cli/npm-ls.md b/deps/npm/doc/cli/npm-ls.md index 70835189aae582..65e8366d467ec2 100644 --- a/deps/npm/doc/cli/npm-ls.md +++ b/deps/npm/doc/cli/npm-ls.md @@ -89,7 +89,7 @@ Display only the dependency tree for packages in `devDependencies`. When "dev" or "development", is an alias to `dev`. -When "prod" or "production", is an alias to `production`.` +When "prod" or "production", is an alias to `production`. ## SEE ALSO diff --git a/deps/npm/doc/cli/npm-publish.md b/deps/npm/doc/cli/npm-publish.md index 4ffefb88235ffa..fa512e1a174dc6 100644 --- a/deps/npm/doc/cli/npm-publish.md +++ b/deps/npm/doc/cli/npm-publish.md @@ -48,6 +48,10 @@ Once a package is published with a given name and version, that specific name and version combination can never be used again, even if it is removed with npm-unpublish(1). +For a "dry run" that does everything except actually publishing to the +registry, see `npm-pack(1)`, which figures out the files to be included and +packs them into a tarball to be uploaded to the registry. + ## SEE ALSO * npm-registry(7) @@ -56,3 +60,4 @@ it is removed with npm-unpublish(1). * npm-owner(1) * npm-deprecate(1) * npm-tag(1) +* npm-pack(1) diff --git a/deps/npm/doc/cli/npm-shrinkwrap.md b/deps/npm/doc/cli/npm-shrinkwrap.md index c79418a2484b0a..6fc7d96f7c2253 100644 --- a/deps/npm/doc/cli/npm-shrinkwrap.md +++ b/deps/npm/doc/cli/npm-shrinkwrap.md @@ -109,6 +109,14 @@ resolution using "version" if one isn't. 2. The tree is walked and any missing dependencies are installed in the usual fashion. +If `preshrinkwrap`, `shrinkwrap` or `postshrinkwrap` are in the `scripts` property of the +`package.json`, they will be executed by running `npm shrinkwrap`. +`preshrinkwrap` and `shrinkwrap` are executed before the shrinkwrap, `postshrinkwrap` is +executed afterwards. For example to run some postprocessing on the generated file: + + "scripts": { "postshrinkwrap": "node fix-shrinkwrap.js" } + + ### Using shrinkwrapped packages Using a shrinkwrapped package is no different than using any other @@ -174,5 +182,7 @@ contents rather than versions. ## SEE ALSO * npm-install(1) +* npm-run-script(1) +* npm-scripts(7) * package.json(5) * npm-ls(1) diff --git a/deps/npm/doc/files/package.json.md b/deps/npm/doc/files/package.json.md index a52f9f011d27b4..98b77af3e534d4 100644 --- a/deps/npm/doc/files/package.json.md +++ b/deps/npm/doc/files/package.json.md @@ -202,6 +202,7 @@ Conversely, some files are always ignored: * `npm-debug.log` * `.npmrc` * `node_modules` +* `config.gypi` ## main diff --git a/deps/npm/doc/misc/npm-config.md b/deps/npm/doc/misc/npm-config.md index ac372bd7a19b13..764555ea4a060a 100644 --- a/deps/npm/doc/misc/npm-config.md +++ b/deps/npm/doc/misc/npm-config.md @@ -676,7 +676,7 @@ Set to true to run in "production" mode. ### progress -* Default: true +* Default: true, unless TRAVIS or CI env vars set. * Type: Boolean When set to `true`, npm will display a progress bar during time intensive diff --git a/deps/npm/doc/misc/npm-scripts.md b/deps/npm/doc/misc/npm-scripts.md index 972ba90bc5934b..9ec75cc5ddf3dd 100644 --- a/deps/npm/doc/misc/npm-scripts.md +++ b/deps/npm/doc/misc/npm-scripts.md @@ -32,11 +32,14 @@ following scripts: * prerestart, restart, postrestart: Run by the `npm restart` command. Note: `npm restart` will run the stop and start scripts if no `restart` script is provided. +* preshrinkwrap, shrinkwrap, postshrinkwrap: + Run by the `npm shrinkwrap` command. Additionally, arbitrary scripts can be executed by running `npm run-script `. *Pre* and *post* commands with matching names will be run for those as well (e.g. `premyscript`, `myscript`, -`postmyscript`). +`postmyscript`). Scripts from dependencies can be run with `npm explore + -- npm run `. ## COMMON USES diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index cb2ac114941266..f29b1d371e9f6d 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -126,5 +126,5 @@

SEE ALSO

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

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index 2ccc693d0fdc01..cf63d917cf7c59 100644 --- a/deps/npm/html/doc/cli/npm-adduser.html +++ b/deps/npm/html/doc/cli/npm-adduser.html @@ -72,5 +72,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html index 7d68f93fb4b91d..edfad8410b3ded 100644 --- a/deps/npm/html/doc/cli/npm-bin.html +++ b/deps/npm/html/doc/cli/npm-bin.html @@ -35,5 +35,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html index 19df5f7696d9bd..6b0ba4da0eb7bb 100644 --- a/deps/npm/html/doc/cli/npm-bugs.html +++ b/deps/npm/html/doc/cli/npm-bugs.html @@ -55,5 +55,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html index e551d1a5e3a075..ff4d8c41b0c6a2 100644 --- a/deps/npm/html/doc/cli/npm-build.html +++ b/deps/npm/html/doc/cli/npm-build.html @@ -40,5 +40,5 @@

DESCRIPTION

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

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html index c6113347df0833..4970a1e72b26c1 100644 --- a/deps/npm/html/doc/cli/npm-cache.html +++ b/deps/npm/html/doc/cli/npm-cache.html @@ -81,5 +81,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html index e24db0e6223e5c..0cc67c6b8023b1 100644 --- a/deps/npm/html/doc/cli/npm-completion.html +++ b/deps/npm/html/doc/cli/npm-completion.html @@ -43,5 +43,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html index 17dfb2b07d67cc..c4338e24db3a9d 100644 --- a/deps/npm/html/doc/cli/npm-config.html +++ b/deps/npm/html/doc/cli/npm-config.html @@ -67,5 +67,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index e138ec02e86f68..53ac72d3d646a8 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -61,5 +61,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index 56fbb309b849df..e7f08317ad3c4c 100644 --- a/deps/npm/html/doc/cli/npm-deprecate.html +++ b/deps/npm/html/doc/cli/npm-deprecate.html @@ -38,5 +38,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-dist-tag.html b/deps/npm/html/doc/cli/npm-dist-tag.html index 5d6420a4b9cb8a..73d81b75a701ac 100644 --- a/deps/npm/html/doc/cli/npm-dist-tag.html +++ b/deps/npm/html/doc/cli/npm-dist-tag.html @@ -87,5 +87,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html index 12827e099d5af1..ff63edf7976d41 100644 --- a/deps/npm/html/doc/cli/npm-docs.html +++ b/deps/npm/html/doc/cli/npm-docs.html @@ -56,5 +56,5 @@

SEE ALSO

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

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html index e1dc8657aabbcf..4c3db7f749a284 100644 --- a/deps/npm/html/doc/cli/npm-explore.html +++ b/deps/npm/html/doc/cli/npm-explore.html @@ -49,5 +49,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html index 50be2a7fbc8c15..e1c8633bb2ae2e 100644 --- a/deps/npm/html/doc/cli/npm-help-search.html +++ b/deps/npm/html/doc/cli/npm-help-search.html @@ -45,5 +45,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html index 230dd39a81d5f8..7997896bb2487c 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -50,5 +50,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html index 9f0299102e4bdb..32b0326ae868aa 100644 --- a/deps/npm/html/doc/cli/npm-init.html +++ b/deps/npm/html/doc/cli/npm-init.html @@ -48,5 +48,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-install-test.html b/deps/npm/html/doc/cli/npm-install-test.html index 9dfe6e6258d940..e236e425a3c630 100644 --- a/deps/npm/html/doc/cli/npm-install-test.html +++ b/deps/npm/html/doc/cli/npm-install-test.html @@ -42,4 +42,4 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index 57215505751fd9..7866afcdb2f563 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -312,5 +312,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index 77796a29a86749..b3ee5da28c9878 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -73,5 +73,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/cli/npm-logout.html b/deps/npm/html/doc/cli/npm-logout.html index 1c9b74872b6985..7b054c5fef1fcf 100644 --- a/deps/npm/html/doc/cli/npm-logout.html +++ b/deps/npm/html/doc/cli/npm-logout.html @@ -51,5 +51,5 @@

scope

       - + diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index 5f17c5a7f6da2b..ff0ce5947edb62 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -21,7 +21,7 @@

SYNOPSIS

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

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

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

@@ -79,7 +79,7 @@

only

  • Type: String
  • When "dev" or "development", is an alias to dev.

    -

    When "prod" or "production", is an alias to production.`

    +

    When "prod" or "production", is an alias to production.

    SEE ALSO

    • npm-config(1)
    • @@ -104,5 +104,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index 43339f7f868bd5..414468a4959f91 100644 --- a/deps/npm/html/doc/cli/npm-outdated.html +++ b/deps/npm/html/doc/cli/npm-outdated.html @@ -116,5 +116,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html index 34ec3a1cb86137..15a5902a6ab019 100644 --- a/deps/npm/html/doc/cli/npm-owner.html +++ b/deps/npm/html/doc/cli/npm-owner.html @@ -51,5 +51,5 @@

      SEE ALSO

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

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-ping.html b/deps/npm/html/doc/cli/npm-ping.html index 404a83c6a3b40f..f6b275cfd1e141 100644 --- a/deps/npm/html/doc/cli/npm-ping.html +++ b/deps/npm/html/doc/cli/npm-ping.html @@ -32,4 +32,4 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index 243562b5bbc4c1..5e85f6567f6840 100644 --- a/deps/npm/html/doc/cli/npm-prefix.html +++ b/deps/npm/html/doc/cli/npm-prefix.html @@ -38,5 +38,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html index 3c97535fd99f23..85540d1ffbc74b 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -40,5 +40,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index 018380e14a1471..4a7f7242636900 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -51,6 +51,9 @@

      SYNOPSIS

      Once a package is published with a given name and version, that specific name and version combination can never be used again, even if it is removed with npm-unpublish(1).

      +

      For a "dry run" that does everything except actually publishing to the +registry, see npm-pack(1), which figures out the files to be included and +packs them into a tarball to be uploaded to the registry.

      SEE ALSO

      @@ -72,5 +76,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html index c5bcdab1e463a3..aa3b2766c730ff 100644 --- a/deps/npm/html/doc/cli/npm-rebuild.html +++ b/deps/npm/html/doc/cli/npm-rebuild.html @@ -35,5 +35,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html index d7efceb7103b34..36b34ac815c8d5 100644 --- a/deps/npm/html/doc/cli/npm-repo.html +++ b/deps/npm/html/doc/cli/npm-repo.html @@ -41,5 +41,5 @@

      SEE ALSO

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

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html index ab40e4b34447e7..76dcf86db12b59 100644 --- a/deps/npm/html/doc/cli/npm-root.html +++ b/deps/npm/html/doc/cli/npm-root.html @@ -35,5 +35,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html index 1b9c103991ce5d..91f5d69b8dd261 100644 --- a/deps/npm/html/doc/cli/npm-run-script.html +++ b/deps/npm/html/doc/cli/npm-run-script.html @@ -63,5 +63,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html index 2c300fe206e6fd..339239957b0f1c 100644 --- a/deps/npm/html/doc/cli/npm-search.html +++ b/deps/npm/html/doc/cli/npm-search.html @@ -57,5 +57,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html index eb1b1f276b1e42..633cc0a545b9ad 100644 --- a/deps/npm/html/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html @@ -99,7 +99,12 @@

      SYNOPSIS

    • The tree is walked and any missing dependencies are installed in the usual fashion.

    • -

      Using shrinkwrapped packages

      +

      If preshrinkwrap, shrinkwrap or postshrinkwrap are in the scripts property of the +package.json, they will be executed by running npm shrinkwrap. +preshrinkwrap and shrinkwrap are executed before the shrinkwrap, postshrinkwrap is +executed afterwards. For example to run some postprocessing on the generated file:

      +
      "scripts": { "postshrinkwrap": "node fix-shrinkwrap.js" }
      +

      Using shrinkwrapped packages

      Using a shrinkwrapped package is no different than using any other package: you can npm install it by hand, or add a dependency to your package.json file and npm install it.

      @@ -154,6 +159,8 @@

      Caveats

      SEE ALSO

      @@ -169,5 +176,5 @@

      SEE ALSO

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

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html index 9d79cb387d5995..9b1e2375fc843d 100644 --- a/deps/npm/html/doc/cli/npm-stars.html +++ b/deps/npm/html/doc/cli/npm-stars.html @@ -36,5 +36,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html index 1d8291d76450cf..fabb59c82916b9 100644 --- a/deps/npm/html/doc/cli/npm-start.html +++ b/deps/npm/html/doc/cli/npm-start.html @@ -39,5 +39,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html index 8792d034aec471..99c73800514167 100644 --- a/deps/npm/html/doc/cli/npm-stop.html +++ b/deps/npm/html/doc/cli/npm-stop.html @@ -34,5 +34,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-tag.html b/deps/npm/html/doc/cli/npm-tag.html index 5a7281f9968076..e1c88fd82f5369 100644 --- a/deps/npm/html/doc/cli/npm-tag.html +++ b/deps/npm/html/doc/cli/npm-tag.html @@ -63,5 +63,5 @@

      SEE ALSO

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

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html index 4398089f5029ad..a23c21e87be4b8 100644 --- a/deps/npm/html/doc/cli/npm-test.html +++ b/deps/npm/html/doc/cli/npm-test.html @@ -38,5 +38,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html index 7dca76e4a9e440..f6576a57cce3bb 100644 --- a/deps/npm/html/doc/cli/npm-uninstall.html +++ b/deps/npm/html/doc/cli/npm-uninstall.html @@ -60,5 +60,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html index 4b7dfaf77f1e6b..637db014068ec5 100644 --- a/deps/npm/html/doc/cli/npm-unpublish.html +++ b/deps/npm/html/doc/cli/npm-unpublish.html @@ -47,5 +47,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html index 22aba1cc031415..2c665efdbe1ab5 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -118,5 +118,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html index 7c991ff32838d0..c4ad92100fd3a8 100644 --- a/deps/npm/html/doc/cli/npm-version.html +++ b/deps/npm/html/doc/cli/npm-version.html @@ -100,5 +100,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index 06e3712262e9a3..b5b4c6d4100465 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -86,5 +86,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index 0ed957e1c48401..a4672dfc3fc7db 100644 --- a/deps/npm/html/doc/cli/npm-whoami.html +++ b/deps/npm/html/doc/cli/npm-whoami.html @@ -33,5 +33,5 @@

      SEE ALSO

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

      npm

      javascript package manager

      SYNOPSIS

      npm <command> [args]
       

      VERSION

      -

      3.9.5

      +

      3.10.3

      DESCRIPTION

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

      AUTHOR

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

      +i@izs.me

      SEE ALSO

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

        SEE ALSO

               - + diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html index a01276b2b5837e..bcfd0279138d5c 100644 --- a/deps/npm/html/doc/files/npm-folders.html +++ b/deps/npm/html/doc/files/npm-folders.html @@ -182,5 +182,5 @@

        SEE ALSO

               - + diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html index a01276b2b5837e..bcfd0279138d5c 100644 --- a/deps/npm/html/doc/files/npm-global.html +++ b/deps/npm/html/doc/files/npm-global.html @@ -182,5 +182,5 @@

        SEE ALSO

               - + diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html index b656d2874766cb..56fc6594dcb983 100644 --- a/deps/npm/html/doc/files/npm-json.html +++ b/deps/npm/html/doc/files/npm-json.html @@ -160,6 +160,7 @@

        files

      • npm-debug.log
      • .npmrc
      • node_modules
      • +
      • config.gypi

      main

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

      SEE ALSO

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

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html index b656d2874766cb..56fc6594dcb983 100644 --- a/deps/npm/html/doc/files/package.json.html +++ b/deps/npm/html/doc/files/package.json.html @@ -160,6 +160,7 @@

      files

    • npm-debug.log
    • .npmrc
    • node_modules
    • +
    • config.gypi

    main

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

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index 5cfb9fae3e3d5e..d12a7e132e65c9 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -162,5 +162,5 @@

    semver(7)

           - + diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html index e1a5ec57ba4b22..1f923462fba90d 100644 --- a/deps/npm/html/doc/misc/npm-coding-style.html +++ b/deps/npm/html/doc/misc/npm-coding-style.html @@ -153,5 +153,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html index 0dce28b7165d19..7541b826d2d573 100644 --- a/deps/npm/html/doc/misc/npm-config.html +++ b/deps/npm/html/doc/misc/npm-config.html @@ -582,7 +582,7 @@

    production

    progress

      -
    • Default: true
    • +
    • Default: true, unless TRAVIS or CI env vars set.
    • Type: Boolean

    When set to true, npm will display a progress bar during time intensive @@ -862,5 +862,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html index 72fa5d16effcb2..8b932609710b75 100644 --- a/deps/npm/html/doc/misc/npm-developers.html +++ b/deps/npm/html/doc/misc/npm-developers.html @@ -194,5 +194,5 @@

    SEE ALSO

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

    npm-disputes

    Handling Module

    SYNOPSIS

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

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

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

    DESCRIPTION

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

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html index 80873484ec924e..1d5a6eb8cd5fcf 100644 --- a/deps/npm/html/doc/misc/npm-index.html +++ b/deps/npm/html/doc/misc/npm-index.html @@ -162,4 +162,4 @@

    semver(7)

           - + diff --git a/deps/npm/html/doc/misc/npm-orgs.html b/deps/npm/html/doc/misc/npm-orgs.html index 7dd6a9f50e1fe0..5ba1b7cb592ddd 100644 --- a/deps/npm/html/doc/misc/npm-orgs.html +++ b/deps/npm/html/doc/misc/npm-orgs.html @@ -86,4 +86,4 @@

    Team Admins create teams

           - + diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html index b29efa7b9eec1c..c0a7fa512ec1a3 100644 --- a/deps/npm/html/doc/misc/npm-registry.html +++ b/deps/npm/html/doc/misc/npm-registry.html @@ -70,5 +70,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html index bfe08b7b371ee1..21b22d926c219a 100644 --- a/deps/npm/html/doc/misc/npm-scope.html +++ b/deps/npm/html/doc/misc/npm-scope.html @@ -91,5 +91,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html index 55381c51998c60..53cbe9223f7149 100644 --- a/deps/npm/html/doc/misc/npm-scripts.html +++ b/deps/npm/html/doc/misc/npm-scripts.html @@ -40,11 +40,14 @@

    DESCRIPTION

  • prerestart, restart, postrestart: Run by the npm restart command. Note: npm restart will run the stop and start scripts if no restart script is provided.
  • +
  • preshrinkwrap, shrinkwrap, postshrinkwrap: +Run by the npm shrinkwrap command.
  • Additionally, arbitrary scripts can be executed by running npm run-script <stage>. Pre and post commands with matching names will be run for those as well (e.g. premyscript, myscript, -postmyscript).

    +postmyscript). Scripts from dependencies can be run with `npm explore

    +

    -- npm run `.

    COMMON USES

    If you need to perform operations on your package before it is used, in a way that is not dependent on the operating system or architecture of the @@ -208,5 +211,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html index 939c95aca44340..67c84990727f8d 100644 --- a/deps/npm/html/doc/misc/removing-npm.html +++ b/deps/npm/html/doc/misc/removing-npm.html @@ -57,5 +57,5 @@

    SEE ALSO

           - + diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html index 0f7dc970e9f92d..0d2f0919dd5b07 100644 --- a/deps/npm/html/doc/misc/semver.html +++ b/deps/npm/html/doc/misc/semver.html @@ -302,5 +302,5 @@

    Ranges

           - + diff --git a/deps/npm/lib/access.js b/deps/npm/lib/access.js index 69527c2aa4b347..ad7a1f54bd34a1 100644 --- a/deps/npm/lib/access.js +++ b/deps/npm/lib/access.js @@ -5,6 +5,7 @@ var resolve = require('path').resolve var readPackageJson = require('read-package-json') var mapToRegistry = require('./utils/map-to-registry.js') var npm = require('./npm.js') +var output = require('./utils/output.js') var whoami = require('./whoami') @@ -62,7 +63,9 @@ function access (args, cb) { params.auth = auth try { return npm.registry.access(cmd, uri, params, function (err, data) { - !err && data && console.log(JSON.stringify(data, undefined, 2)) + if (!err && data) { + output(JSON.stringify(data, undefined, 2)) + } cb(err, data) }) } catch (e) { diff --git a/deps/npm/lib/adduser.js b/deps/npm/lib/adduser.js index 3a7425d471b2be..e04af0556b8ce9 100644 --- a/deps/npm/lib/adduser.js +++ b/deps/npm/lib/adduser.js @@ -4,7 +4,9 @@ var log = require('npmlog') var npm = require('./npm.js') var read = require('read') var userValidate = require('npm-user-validate') +var output = require('./utils/output') var usage = require('./utils/usage') +var chain = require('slide').chain var crypto try { @@ -30,15 +32,14 @@ function adduser (args, cb) { e: creds.email || '' } var u = {} - var fns = [readUsername, readPassword, readEmail, save] - loop() - function loop (er) { - if (er) return cb(er) - var fn = fns.shift() - if (fn) return fn(c, u, loop) - cb() - } + log.disableProgress() + chain([ + [readUsername, c, u], + [readPassword, c, u], + [readEmail, c, u], + [save, c, u] + ], cb) } function readUsername (c, u, cb) { @@ -173,7 +174,7 @@ function save (c, u, cb) { log.info('adduser', 'Authorized user %s', u.u) var scopeMessage = scope ? ' to scope ' + scope : '' - console.log('Logged in as %s%s on %s.', u.u, scopeMessage, uri) + output('Logged in as %s%s on %s.', u.u, scopeMessage, uri) npm.config.save('user', cb) }) } diff --git a/deps/npm/lib/bin.js b/deps/npm/lib/bin.js index 2e02617d35a790..7258893b9c3918 100644 --- a/deps/npm/lib/bin.js +++ b/deps/npm/lib/bin.js @@ -2,6 +2,7 @@ module.exports = bin var npm = require('./npm.js') var osenv = require('osenv') +var output = require('./utils/output.js') bin.usage = 'npm bin [--global]' @@ -13,7 +14,7 @@ function bin (args, silent, cb) { var b = npm.bin var PATH = osenv.path() - if (!silent) console.log(b) + if (!silent) output(b) process.nextTick(cb.bind(this, null, b)) if (npm.config.get('global') && PATH.indexOf(b) === -1) { diff --git a/deps/npm/lib/build.js b/deps/npm/lib/build.js index e9da59a23dc5a3..fbe78c746d0978 100644 --- a/deps/npm/lib/build.js +++ b/deps/npm/lib/build.js @@ -22,6 +22,7 @@ var asyncMap = require('slide').asyncMap var ini = require('ini') var writeFile = require('write-file-atomic') var packageId = require('./utils/package-id.js') +var output = require('./utils/output.js') module.exports = build build.usage = 'npm build []' @@ -211,9 +212,7 @@ function linkBins (pkg, folder, parent, gtop, cb) { var out = npm.config.get('parseable') ? dest + '::' + src + ':BINFILE' : dest + ' -> ' + src - log.clearProgress() - console.log(out) - log.showProgress() + output(out) cb() }) } diff --git a/deps/npm/lib/cache.js b/deps/npm/lib/cache.js index 757ba6e79df709..5ad07dfdcdbebe 100644 --- a/deps/npm/lib/cache.js +++ b/deps/npm/lib/cache.js @@ -82,6 +82,7 @@ var npa = require('npm-package-arg') var getStat = require('./cache/get-stat.js') var cachedPackageRoot = require('./cache/cached-package-root.js') var mapToRegistry = require('./utils/map-to-registry.js') +var output = require('./utils/output.js') cache.usage = 'npm cache add ' + '\nnpm cache add ' + @@ -182,7 +183,7 @@ function ls (args, cb) { prefix = '~' + prefix.substr(process.env.HOME.length) } ls_(normalize(args), npm.config.get('depth'), function (er, files) { - console.log(files.map(function (f) { + output(files.map(function (f) { return path.join(prefix, f) }).join('\n').trim()) cb(er, files) diff --git a/deps/npm/lib/completion.js b/deps/npm/lib/completion.js index 6f6cfd810b246c..3157255bfb625b 100644 --- a/deps/npm/lib/completion.js +++ b/deps/npm/lib/completion.js @@ -14,6 +14,7 @@ var shorthandNames = Object.keys(shorthands) var allConfs = configNames.concat(shorthandNames) var once = require('once') var isWindowsShell = require('./utils/is-windows-shell.js') +var output = require('./utils/output.js') completion.completion = function (opts, cb) { if (opts.w > 3) return cb() @@ -203,7 +204,7 @@ function wrapCb (cb, opts) { console.error([er && er.stack, compls, opts.partialWord]) if (er || compls.length === 0) return cb(er) - console.log(compls.join('\n')) + output(compls.join('\n')) cb() } } diff --git a/deps/npm/lib/config.js b/deps/npm/lib/config.js index 80958ec5fc2799..7112e88c5f7d6e 100644 --- a/deps/npm/lib/config.js +++ b/deps/npm/lib/config.js @@ -11,6 +11,7 @@ var editor = require('editor') var os = require('os') var umask = require('./utils/umask') var usage = require('./utils/usage') +var output = require('./utils/output') config.usage = usage( 'config', @@ -148,7 +149,7 @@ function get (key, cb) { } var val = npm.config.get(key) if (key.match(/umask/)) val = umask.toString(val) - console.log(val) + output(val) cb() } @@ -278,7 +279,7 @@ function list (cb) { '; HOME = ' + process.env.HOME + '\n' + '; "npm config ls -l" to show all defaults.\n' - console.log(msg) + output(msg) return cb() } @@ -294,7 +295,7 @@ function list (cb) { }) msg += '\n' - console.log(msg) + output(msg) return cb() } diff --git a/deps/npm/lib/dist-tag.js b/deps/npm/lib/dist-tag.js index 0e9d914d398823..7c20ea99015304 100644 --- a/deps/npm/lib/dist-tag.js +++ b/deps/npm/lib/dist-tag.js @@ -8,6 +8,7 @@ var npm = require('./npm.js') var mapToRegistry = require('./utils/map-to-registry.js') var readLocalPkg = require('./utils/read-local-package.js') var usage = require('./utils/usage') +var output = require('./utils/output.js') distTag.usage = usage( 'dist-tag', @@ -77,7 +78,7 @@ function add (spec, tag, cb) { npm.registry.distTags.add(base, params, function (er) { if (er) return cb(er) - console.log('+' + t + ': ' + pkg + '@' + version) + output('+' + t + ': ' + pkg + '@' + version) cb() }) }) @@ -108,7 +109,7 @@ function remove (tag, pkg, cb) { npm.registry.distTags.rm(base, params, function (er) { if (er) return cb(er) - console.log('-' + tag + ': ' + pkg + '@' + version) + output('-' + tag + ': ' + pkg + '@' + version) cb() }) }) @@ -132,7 +133,7 @@ function list (pkg, cb) { var msg = Object.keys(tags).map(function (k) { return k + ': ' + tags[k] }).sort().join('\n') - console.log(msg) + output(msg) cb(er, tags) }) } diff --git a/deps/npm/lib/explore.js b/deps/npm/lib/explore.js index 05b5220d5f14eb..5640d5f1577612 100644 --- a/deps/npm/lib/explore.js +++ b/deps/npm/lib/explore.js @@ -12,6 +12,7 @@ var fs = require('graceful-fs') var isWindowsShell = require('./utils/is-windows-shell.js') var escapeExecPath = require('./utils/escape-exec-path.js') var escapeArg = require('./utils/escape-arg.js') +var output = require('./utils/output.js') function explore (args, cb) { if (args.length < 1 || !args[0]) return cb(explore.usage) @@ -42,7 +43,7 @@ function explore (args, cb) { } if (!shellArgs.length) { - console.log( + output( '\nExploring ' + cwd + '\n' + "Type 'exit' or ^D when finished\n" ) diff --git a/deps/npm/lib/help-search.js b/deps/npm/lib/help-search.js index 8a138feebed420..ffbe554b7bc064 100644 --- a/deps/npm/lib/help-search.js +++ b/deps/npm/lib/help-search.js @@ -7,6 +7,7 @@ var asyncMap = require('slide').asyncMap var npm = require('./npm.js') var glob = require('glob') var color = require('ansicolors') +var output = require('./utils/output.js') helpSearch.usage = 'npm help-search ' @@ -135,7 +136,7 @@ function searchFiles (args, files, cb) { } if (results.length === 0) { - console.log('No results for ' + args.map(JSON.stringify).join(' ')) + output('No results for ' + args.map(JSON.stringify).join(' ')) return cb() } @@ -206,6 +207,6 @@ function formatResults (args, results, cb) { '(run with -l or --long to see more context)' } - console.log(out.trim()) + output(out.trim()) cb(null, results) } diff --git a/deps/npm/lib/help.js b/deps/npm/lib/help.js index cecc6e02b086ea..cfac917999ece8 100644 --- a/deps/npm/lib/help.js +++ b/deps/npm/lib/help.js @@ -15,6 +15,7 @@ var glob = require('glob') var cmdList = require('./config/cmd-list').cmdList var shorthands = require('./config/cmd-list').shorthands var commands = cmdList.concat(Object.keys(shorthands)) +var output = require('./utils/output.js') function help (args, cb) { var argv = npm.config.get('argv').cooked @@ -43,7 +44,7 @@ function help (args, cb) { npm.commands[section].usage) { npm.config.set('loglevel', 'silent') log.level = 'silent' - console.log(npm.commands[section].usage) + output(npm.commands[section].usage) return cb() } @@ -161,7 +162,7 @@ function htmlMan (man) { function npmUsage (valid, cb) { npm.config.set('loglevel', 'silent') log.level = 'silent' - console.log([ + output([ '\nUsage: npm ', '', 'where is one of:', diff --git a/deps/npm/lib/init.js b/deps/npm/lib/init.js index e3eb3d40dd5618..a5d102c1f314f7 100644 --- a/deps/npm/lib/init.js +++ b/deps/npm/lib/init.js @@ -5,15 +5,17 @@ module.exports = init var log = require('npmlog') var npm = require('./npm.js') var initJson = require('init-package-json') +var output = require('./utils/output.js') init.usage = 'npm init [--force|-f|--yes|-y]' function init (args, cb) { var dir = process.cwd() log.pause() + log.disableProgress() var initFile = npm.config.get('init-module') if (!initJson.yes(npm.config)) { - console.log([ + output([ 'This utility will walk you through creating a package.json file.', 'It only covers the most common items, and tries to guess sensible defaults.', '', diff --git a/deps/npm/lib/install.js b/deps/npm/lib/install.js index 53153e14634e98..1fb5a4f4e6d0ab 100644 --- a/deps/npm/lib/install.js +++ b/deps/npm/lib/install.js @@ -113,6 +113,7 @@ var lock = locker.lock var unlock = locker.unlock var ls = require('./ls.js') var parseJSON = require('./utils/parse-json.js') +var output = require('./utils/output.js') // install specific libraries var copyTree = require('./install/copy-tree.js') @@ -123,7 +124,6 @@ var loadDevDeps = require('./install/deps.js').loadDevDeps var getAllMetadata = require('./install/deps.js').getAllMetadata var loadRequestedDeps = require('./install/deps.js').loadRequestedDeps var loadExtraneous = require('./install/deps.js').loadExtraneous -var pruneTree = require('./install/prune-tree.js') var diffTrees = require('./install/diff-trees.js') var checkPermissions = require('./install/check-permissions.js') var decomposeActions = require('./install/decompose-actions.js') @@ -136,9 +136,11 @@ var doSerialActions = require('./install/actions.js').doSerial var doReverseSerialActions = require('./install/actions.js').doReverseSerial var doParallelActions = require('./install/actions.js').doParallel var doOneAction = require('./install/actions.js').doOne +var removeObsoleteDep = require('./install/deps.js').removeObsoleteDep var packageId = require('./utils/package-id.js') var moduleName = require('./utils/module-name.js') var errorMessage = require('./utils/error-message.js') +var andIgnoreErrors = require('./install/and-ignore-errors.js') function unlockCB (lockPath, name, cb) { validate('SSF', arguments) @@ -363,9 +365,8 @@ Installer.prototype.loadIdealTree = function (cb) { [this, this.loadAllDepsIntoIdealTree], [this, this.finishTracker, 'loadAllDepsIntoIdealTree'], - [this, function (next) { recalculateMetadata(this.idealTree, log, next) }], - [this, this.debugTree, 'idealTree:prePrune', 'idealTree'], - [this, function (next) { next(pruneTree(this.idealTree)) }] + // TODO: Remove this (should no longer be necessary, instead counter productive) + [this, function (next) { recalculateMetadata(this.idealTree, log, next) }] ], cb) } @@ -419,21 +420,18 @@ Installer.prototype.computeLinked = function (cb) { var cmd = action[0] var pkg = action[1] if (cmd !== 'add' && cmd !== 'update') return next() - var isReqByTop = pkg.package._requiredBy.filter(function (name) { return name === '/' }).length - var isReqByUser = pkg.package._requiredBy.filter(function (name) { return name === '#USER' }).length - var isExtraneous = pkg.package._requiredBy.length === 0 + var isReqByTop = pkg.requiredBy.filter(function (mod) { return mod.isTop }).length + var isReqByUser = pkg.userRequired + var isExtraneous = pkg.requiredBy.length === 0 if (!isReqByTop && !isReqByUser && !isExtraneous) return next() isLinkable(pkg, function (install, link) { if (install) linkTodoList.push(['global-install', pkg]) if (link) linkTodoList.push(['global-link', pkg]) - if (install || link) { - pkg.parent.children = pkg.parent.children.filter(function (child) { return child !== pkg }) - } + if (install || link) removeObsoleteDep(pkg) next() }) }, function () { if (linkTodoList.length === 0) return cb() - pruneTree(self.idealTree) self.differences.length = 0 Array.prototype.push.apply(self.differences, linkTodoList) diffTrees(self.currentTree, self.idealTree, self.differences, log.newGroup('d2'), cb) @@ -633,8 +631,8 @@ Installer.prototype.normalizeTree = function (log, cb) { log.silly('install', 'normalizeTree') recalculateMetadata(this.currentTree, log, iferr(cb, function (tree) { tree.children.forEach(function (child) { - if (child.package._requiredBy.length === 0) { - child.package._requiredBy.push('#EXISTING') + if (child.requiredBy.length === 0) { + child.existing = true } }) cb(null, tree) @@ -655,17 +653,16 @@ Installer.prototype.printInstalled = function (cb) { validate('F', arguments) log.silly('install', 'printInstalled') var self = this - log.clearProgress() this.differences.forEach(function (action) { var mutation = action[0] var child = action[1] var name = packageId(child) var where = path.relative(self.where, child.path) if (mutation === 'remove') { - console.log('- ' + name + ' ' + where) + output('- ' + name + ' ' + where) } else if (mutation === 'move') { var oldWhere = path.relative(self.where, child.fromPath) - console.log(name + ' ' + oldWhere + ' -> ' + where) + output(name + ' ' + oldWhere + ' -> ' + where) } }) var addedOrMoved = this.differences.filter(function (action) { @@ -676,10 +673,9 @@ Installer.prototype.printInstalled = function (cb) { var child = action[1] return child.path }) - log.showProgress() if (!addedOrMoved.length) return cb() + // TODO: remove the recalculateMetadata, should not be needed recalculateMetadata(this.idealTree, log, iferr(cb, function (tree) { - log.clearProgress() // These options control both how installs happen AND how `ls` shows output. // Something like `npm install --production` only installs production deps. // By contrast `npm install --production foo` installs `foo` and the @@ -691,10 +687,7 @@ Installer.prototype.printInstalled = function (cb) { npm.config.set('dev', false) npm.config.set('only', '') npm.config.set('also', '') - ls.fromTree(self.where, tree, addedOrMoved, false, function () { - log.showProgress() - cb() - }) + ls.fromTree(self.where, tree, addedOrMoved, false, andIgnoreErrors(cb)) })) } diff --git a/deps/npm/lib/install/actions.js b/deps/npm/lib/install/actions.js index 5d162f86d0a511..1c7462030c2a5a 100644 --- a/deps/npm/lib/install/actions.js +++ b/deps/npm/lib/install/actions.js @@ -63,7 +63,7 @@ function andHandleOptionalDepErrors (pkg, next) { return function (er) { if (!er) return next.apply(null, arguments) markAsFailed(pkg) - var anyFatal = pkg.userRequired || !pkg.parent + var anyFatal = pkg.userRequired || pkg.isTop for (var ii = 0; ii < pkg.requiredBy.length; ++ii) { var parent = pkg.requiredBy[ii] var isFatal = failedDependency(parent, pkg) diff --git a/deps/npm/lib/install/deps.js b/deps/npm/lib/install/deps.js index edc317f846de87..886e8419135767 100644 --- a/deps/npm/lib/install/deps.js +++ b/deps/npm/lib/install/deps.js @@ -10,6 +10,7 @@ var iferr = require('iferr') var npa = require('npm-package-arg') var validate = require('aproba') var realizePackageSpecifier = require('realize-package-specifier') +var asap = require('asap') var dezalgo = require('dezalgo') var fetchPackageMetadata = require('../fetch-package-metadata.js') var andAddParentToErrors = require('./and-add-parent-to-errors.js') @@ -78,15 +79,17 @@ function doesChildVersionMatch (child, requested, requestor) { return semver.satisfies(child.package.version, requested.spec) } +// TODO: Rename to maybe computeMetadata or computeRelationships exports.recalculateMetadata = function (tree, log, next) { recalculateMetadata(tree, log, {}, next) } +exports._childDependencySpecifier = childDependencySpecifier function childDependencySpecifier (tree, name, spec, cb) { if (!tree.resolved) tree.resolved = {} if (!tree.resolved[name]) tree.resolved[name] = {} if (tree.resolved[name][spec]) { - return process.nextTick(function () { + return asap(function () { cb(null, tree.resolved[name][spec]) }) } @@ -101,19 +104,24 @@ function recalculateMetadata (tree, log, seen, next) { validate('OOOF', arguments) if (seen[tree.path]) return next() seen[tree.path] = true - if (tree.parent == null) resetMetadata(tree) - function markDeps (spec, done) { - validate('SF', arguments) - var matched = spec.match(/^(@?[^@]+)@(.*)$/) - childDependencySpecifier(tree, matched[1], matched[2], function (er, req) { + if (tree.parent == null) { + resetMetadata(tree) + tree.isTop = true + } + + function markDeps (toMark, done) { + var name = toMark.name + var spec = toMark.spec + var kind = toMark.kind + childDependencySpecifier(tree, name, spec, function (er, req) { if (er || !req.name) return done() var child = findRequirement(tree, req.name, req) if (child) { resolveWithExistingModule(child, tree, log, andIgnoreErrors(done)) - } else if (tree.package.dependencies[req.name] != null) { + } else if (kind === 'dep') { tree.missingDeps[req.name] = req.rawSpec done() - } else if (tree.package.devDependencies[req.name] != null) { + } else if (kind === 'dev') { tree.missingDevDeps[req.name] = req.rawSpec done() } else { @@ -121,15 +129,16 @@ function recalculateMetadata (tree, log, seen, next) { } }) } - function specs (deps) { - return Object.keys(deps).map(function (depname) { return depname + '@' + deps[depname] }) + + function makeMarkable (deps, kind) { + if (!deps) return [] + return Object.keys(deps).map(function (depname) { return { name: depname, spec: deps[depname], kind: kind } }) } // Ensure dependencies and dev dependencies are marked as required - var tomark = specs(tree.package.dependencies) - if (!tree.parent && (npm.config.get('dev') || !npm.config.get('production'))) { - tomark = union(tomark, specs(tree.package.devDependencies)) - } + var tomark = makeMarkable(tree.package.dependencies, 'dep') + if (tree.isTop) tomark = union(tomark, makeMarkable(tree.package.devDependencies, 'dev')) + // Ensure any children ONLY from a shrinkwrap are also included var childrenOnlyInShrinkwrap = tree.children.filter(function (child) { return child.fromShrinkwrap && @@ -137,7 +146,13 @@ function recalculateMetadata (tree, log, seen, next) { !tree.package.devDependencies[child.package.name] }) var tomarkOnlyInShrinkwrap = childrenOnlyInShrinkwrap.map(function (child) { - return child.package._spec + var name = child.package.name + var matched = child.package._spec.match(/^@?[^@]+@(.*)$/) + var spec = matched ? matched[1] : child.package._spec + var kind = tree.package.dependencies[name] ? 'dep' + : tree.package.devDependencies[name] ? 'dev' + : 'dep' + return { name: name, spec: spec, kind: kind } }) tomark = union(tomark, tomarkOnlyInShrinkwrap) @@ -148,9 +163,7 @@ function recalculateMetadata (tree, log, seen, next) { [asyncMap, tomark, markDeps], [asyncMap, tree.children, function (child, done) { recalculateMetadata(child, log, seen, done) }] ], function () { - tree.userRequired = tree.package._requiredBy.some(function (req) { return req === '#USER' }) - tree.existing = tree.package._requiredBy.some(function (req) { return req === '#EXISTING' }) - tree.package._location = flatNameFromTree(tree) + tree.location = flatNameFromTree(tree) next(null, tree) }) } @@ -158,18 +171,23 @@ function recalculateMetadata (tree, log, seen, next) { function addRequiredDep (tree, child, cb) { isDep(tree, child, function (childIsDep, childIsProdDep, childIsDevDep) { if (!childIsDep) return cb(false) - var name = childIsProdDep ? flatNameFromTree(tree) : '#DEV:' + flatNameFromTree(tree) - replaceModuleName(child.package, '_requiredBy', name) - replaceModule(child, 'requiredBy', tree) - replaceModule(tree, 'requires', child) + replaceModuleByPath(child, 'requiredBy', tree) + replaceModuleByName(tree, 'requires', child) + if (childIsProdDep && tree.missingDeps) delete tree.missingDeps[moduleName(child)] + if (childIsDevDep && tree.missingDevDeps) delete tree.missingDevDeps[moduleName(child)] cb(true) }) } -exports._removeObsoleteDep = removeObsoleteDep +exports.removeObsoleteDep = removeObsoleteDep function removeObsoleteDep (child) { if (child.removed) return child.removed = true + // remove from physical tree + if (child.parent) { + child.parent.children = child.parent.children.filter(function (pchild) { return pchild !== child }) + } + // remove from logical tree var requires = child.requires || [] requires.forEach(function (requirement) { requirement.requiredBy = requirement.requiredBy.filter(function (reqBy) { return reqBy !== child }) @@ -243,9 +261,7 @@ exports.loadRequestedDeps = function (args, tree, saveToDependencies, log, next) // won't be when we're done), flag it as "depending" on the user // themselves, so we don't remove it as a dep that no longer exists addRequiredDep(tree, child, function (childIsDep) { - if (!childIsDep) { - replaceModuleName(child.package, '_requiredBy', '#USER') - } + if (!childIsDep) child.userRequired = true depLoaded(null, child, tracker) }) })) @@ -266,13 +282,13 @@ exports.removeDeps = function (args, tree, saveToDependencies, log, next) { validate('AOOF', [args, tree, log, next]) args.forEach(function (pkg) { var pkgName = moduleName(pkg) + var toRemove = tree.children.filter(moduleNameMatches(pkgName)) + var pkgToRemove = toRemove[0] || createChild({package: {name: pkgName}}) if (saveToDependencies) { - var toRemove = tree.children.filter(moduleNameMatches(pkgName)) - var pkgToRemove = toRemove[0] || createChild({package: {name: pkgName}}) - replaceModule(tree, 'removed', pkgToRemove) + replaceModuleByPath(tree, 'removed', pkgToRemove) pkgToRemove.save = saveToDependencies } - tree.children = tree.children.filter(noModuleNameMatches(pkgName)) + removeObsoleteDep(pkgToRemove) }) log.finish() next() @@ -313,7 +329,6 @@ var failedDependency = exports.failedDependency = function (tree, name_pkg) { pkg = name_pkg name = moduleName(pkg) } - tree.children = tree.children.filter(noModuleNameMatches(name)) if (isDepOptional(tree, name)) { @@ -322,10 +337,14 @@ var failedDependency = exports.failedDependency = function (tree, name_pkg) { tree.failed = true - if (!tree.parent) return true + if (tree.isTop) return true if (tree.userRequired) return true + removeObsoleteDep(tree) + + if (!tree.requiredBy) return false + for (var ii = 0; ii < tree.requiredBy.length; ++ii) { var requireParent = tree.requiredBy[ii] if (failedDependency(requireParent, tree.package)) { @@ -367,7 +386,7 @@ function andHandleOptionalErrors (log, tree, name, done) { exports.loadDeps = loadDeps function loadDeps (tree, log, next) { validate('OOF', arguments) - if (tree.loaded || (tree.parent && tree.parent.failed)) return andFinishTracker.now(log, next) + if (tree.loaded || (tree.parent && tree.parent.failed) || tree.removed) return andFinishTracker.now(log, next) if (tree.parent) tree.loaded = true if (!tree.package.dependencies) tree.package.dependencies = {} asyncMap(Object.keys(tree.package.dependencies), function (dep, done) { @@ -446,38 +465,44 @@ function resolveWithExistingModule (child, tree, log, next) { var updatePhantomChildren = exports.updatePhantomChildren = function (current, child) { validate('OO', arguments) while (current && current !== child.parent) { - // FIXME: phantomChildren doesn't actually belong in the package.json - if (!current.package._phantomChildren) current.package._phantomChildren = {} - current.package._phantomChildren[moduleName(child)] = child.package.version + if (!current.phantomChildren) current.phantomChildren = {} + current.phantomChildren[moduleName(child)] = child current = current.parent } } function flatNameFromTree (tree) { validate('O', arguments) - if (!tree.parent) return '/' + if (tree.isTop) return '/' var path = flatNameFromTree(tree.parent) if (path !== '/') path += '/' return flatName(path, tree) } -exports._replaceModuleName = replaceModuleName -function replaceModuleName (obj, key, name) { - validate('OSS', arguments) - obj[key] = union(obj[key] || [], [name]) +exports._replaceModuleByPath = replaceModuleByPath +function replaceModuleByPath (obj, key, child) { + return replaceModule(obj, key, child, function (replacing, child) { + return replacing.path === child.path + }) +} + +exports._replaceModuleByName = replaceModuleByName +function replaceModuleByName (obj, key, child) { + var childName = moduleName(child) + return replaceModule(obj, key, child, function (replacing, child) { + return moduleName(replacing) === childName + }) } -exports._replaceModule = replaceModule -function replaceModule (obj, key, child) { - validate('OSO', arguments) +function replaceModule (obj, key, child, matchBy) { + validate('OSOF', arguments) if (!obj[key]) obj[key] = [] // we replace children with a new array object instead of mutating it // because mutating it results in weird failure states. // I would very much like to know _why_ this is. =/ var children = [].concat(obj[key]) - var childName = moduleName(child) for (var replaceAt = 0; replaceAt < children.length; ++replaceAt) { - if (moduleName(children[replaceAt]) === childName) break + if (matchBy(children[replaceAt], child)) break } var replacing = children.splice(replaceAt, 1, child) obj[key] = children @@ -514,15 +539,17 @@ function resolveWithNewModule (pkg, tree, log, next) { children: pkg._bundled || [], isLink: tree.isLink }) + delete pkg._bundled + var hasBundled = child.children.length - var replaced = replaceModule(parent, 'children', child) + var replaced = replaceModuleByName(parent, 'children', child) if (replaced) removeObsoleteDep(replaced) addRequiredDep(tree, child, function () { - pkg._location = flatNameFromTree(child) + child.location = flatNameFromTree(child) if (tree.parent && parent !== tree) updatePhantomChildren(tree.parent, child) - if (pkg._bundled) { + if (hasBundled) { inflateBundled(child, child.children) } @@ -584,7 +611,7 @@ var findRequirement = exports.findRequirement = function (tree, name, requested, if (matches.length) return matches[0] return null } - if (!tree.parent) return null + if (tree.isTop) return null return findRequirement(tree.parent, name, requested, requestor) } @@ -618,13 +645,12 @@ var earliestInstallable = exports.earliestInstallable = function (requiredBy, tr return null } - // FIXME: phantomChildren doesn't actually belong in the package.json - if (tree.package._phantomChildren && tree.package._phantomChildren[pkg.name]) return null + if (tree.phantomChildren && tree.phantomChildren[pkg.name]) return null - if (!tree.parent) return tree + if (tree.isTop) return tree if (tree.isGlobal) return tree - if (npm.config.get('global-style') && !tree.parent.parent) return tree + if (npm.config.get('global-style') && tree.parent.isTop) return tree if (npm.config.get('legacy-bundling')) return tree return (earliestInstallable(requiredBy, tree.parent, pkg) || tree) diff --git a/deps/npm/lib/install/diff-trees.js b/deps/npm/lib/install/diff-trees.js index 8000124604e272..578cda90cec885 100644 --- a/deps/npm/lib/install/diff-trees.js +++ b/deps/npm/lib/install/diff-trees.js @@ -59,17 +59,15 @@ function requiredByAllLinked (node) { return node.requiredBy.filter(isLink).length === node.requiredBy.length } -function isNotReqByTop (req) { - return req !== '/' && // '/' is the top level itself - req !== '#USER' && // #USER - req !== '#EXTRANEOUS' +function isNotTopOrExtraneous (node) { + return !node.isTop && !node.userRequired && !node.existing } var sortActions = module.exports.sortActions = function (differences) { var actions = {} differences.forEach(function (action) { var child = action[1] - actions[child.package._location] = action + actions[child.location] = action }) var sorted = [] @@ -77,14 +75,18 @@ var sortActions = module.exports.sortActions = function (differences) { var sortedlocs = Object.keys(actions).sort(sortByLocation) - // Do top level deps first, this stops the sorting by required order from - // unsorting these deps. + // We're going to sort the actions taken on top level dependencies first, before + // considering the order of transitive deps. Because we're building our list + // from the bottom up, this means we will return a list with top level deps LAST. + // This is important in terms of keeping installations as consistent as possible + // as folks add new dependencies. var toplocs = sortedlocs.filter(function (location) { var mod = actions[location][1] - if (!mod.package._requiredBy) return true - // If the module is required by ANY non-top level package - // then we don't want to include this. - return !mod.package._requiredBy.some(isNotReqByTop) + if (!mod.requiredBy) return true + // If this module is required by any non-top level module + // or by any extraneous module, eg user requested or existing + // then we don't want to give this priority sorting. + return !mod.requiredBy.some(isNotTopOrExtraneous) }) toplocs.concat(sortedlocs).forEach(function (location) { @@ -94,12 +96,16 @@ var sortActions = module.exports.sortActions = function (differences) { function sortByLocation (aa, bb) { return bb.localeCompare(aa) } + function sortModuleByLocation (aa, bb) { + return sortByLocation(aa && aa.location, bb && bb.location) + } function sortByDeps (action) { var mod = action[1] - if (added[mod.package._location]) return - added[mod.package._location] = action - mod.package._requiredBy.sort().forEach(function (location) { - if (actions[location]) sortByDeps(actions[location]) + if (added[mod.location]) return + added[mod.location] = action + if (!mod.requiredBy) mod.requiredBy = [] + mod.requiredBy.sort(sortModuleByLocation).forEach(function (mod) { + if (actions[mod.location]) sortByDeps(actions[mod.location]) }) sorted.unshift(action) } diff --git a/deps/npm/lib/install/inflate-shrinkwrap.js b/deps/npm/lib/install/inflate-shrinkwrap.js index b38181b9f19e83..1853f2c068cb93 100644 --- a/deps/npm/lib/install/inflate-shrinkwrap.js +++ b/deps/npm/lib/install/inflate-shrinkwrap.js @@ -55,6 +55,7 @@ var inflateShrinkwrap = module.exports = function (tree, swdeps, finishInflating }) tree.children.push(child) if (pkg._bundled) { + delete pkg._bundled inflateBundled(child, child.children) } inflateShrinkwrap(child, sw.dependencies || {}, next) diff --git a/deps/npm/lib/install/is-dev.js b/deps/npm/lib/install/is-dev.js index b1f2c4b6614975..e0fae4eb82dc41 100644 --- a/deps/npm/lib/install/is-dev.js +++ b/deps/npm/lib/install/is-dev.js @@ -1,7 +1,26 @@ 'use strict' -var isDev = exports.isDev = function (node) { - return node.package._requiredBy.some(function (req) { return req === '#DEV:/' }) +var moduleName = require('../utils/module-name.js') + +function andIsDev (name) { + return function (req) { + return req.package && + req.package.devDependencies && + req.package.devDependencies[name] + } } + +exports.isDev = function (node) { + return node.requiredBy.some(andIsDev(moduleName(node))) +} + +function andIsOnlyDev (name) { + var isThisDev = andIsDev(name) + return function (req) { + return isThisDev(req) && + (!req.package.dependencies || !req.package.dependencies[name]) + } +} + exports.isOnlyDev = function (node) { - return node.package._requiredBy.length === 1 && isDev(node) + return node.requiredBy.every(andIsOnlyDev(moduleName(node))) } diff --git a/deps/npm/lib/install/is-extraneous.js b/deps/npm/lib/install/is-extraneous.js index cd4d954668426a..f0d599965fe598 100644 --- a/deps/npm/lib/install/is-extraneous.js +++ b/deps/npm/lib/install/is-extraneous.js @@ -1,14 +1,37 @@ 'use strict' -var path = require('path') -var isDev = require('./is-dev.js').isDev -var npm = require('../npm.js') - -module.exports = function (tree) { - var pkg = tree.package - var requiredBy = pkg._requiredBy.filter(function (req) { return req[0] !== '#' }) - var isTopLevel = tree.parent == null - var isChildOfTop = !isTopLevel && tree.parent.parent == null - var isTopGlobal = isChildOfTop && tree.parent.path === path.resolve(npm.globalDir, '..') - var topHasNoPackageJson = isChildOfTop && tree.parent.error - return !isTopLevel && (!isChildOfTop || !topHasNoPackageJson) && !isTopGlobal && requiredBy.length === 0 && !isDev(tree) +module.exports = isExtraneous + +function isExtraneous (tree) { + var result = !isNotExtraneous(tree) + return result +} + +function isNotRequired (tree) { + return tree.requiredBy && tree.requiredBy.length === 0 +} + +function parentHasNoPjson (tree) { + return tree.parent && tree.parent.isTop && tree.parent.error +} + +function topHasNoPjson (tree) { + var top = tree + while (!top.isTop) top = top.parent + return top.error +} + +function isNotExtraneous (tree, isCycle) { + if (!isCycle) isCycle = {} + if (tree.isTop || tree.userRequired) { + return true + } else if (isNotRequired(tree) && parentHasNoPjson(tree)) { + return true + } else if (isCycle[tree.path]) { + return topHasNoPjson(tree) + } else { + isCycle[tree.path] = true + return tree.requiredBy && tree.requiredBy.some(function (node) { + return isNotExtraneous(node, Object.create(isCycle)) + }) + } } diff --git a/deps/npm/lib/install/mutate-into-logical-tree.js b/deps/npm/lib/install/mutate-into-logical-tree.js index 833aa94c9400cc..b2059da906079c 100644 --- a/deps/npm/lib/install/mutate-into-logical-tree.js +++ b/deps/npm/lib/install/mutate-into-logical-tree.js @@ -8,6 +8,24 @@ var validateAllPeerDeps = require('./deps.js').validateAllPeerDeps var packageId = require('../utils/package-id.js') var moduleName = require('../utils/module-name.js') +// Return true if tree is a part of a cycle that: +// A) Never connects to the top of the tree +// B) Has not not had a point in the cycle arbitraryly declared its top +// yet. +function isDisconnectedCycle (tree, seen) { + if (!seen) seen = {} + if (tree.isTop || tree.cycleTop || tree.requiredBy.length === 0) { + return false + } else if (seen[tree.path]) { + return true + } else { + seen[tree.path] = true + return tree.requiredBy.every(function (node) { + return isDisconnectedCycle(node, Object.create(seen)) + }) + } +} + var mutateIntoLogicalTree = module.exports = function (tree) { validate('O', arguments) @@ -18,35 +36,29 @@ var mutateIntoLogicalTree = module.exports = function (tree) { var flat = flattenTree(tree) - function getNode (flatname) { - return flatname.substr(0, 5) === '#DEV:' - ? flat[flatname.substr(5)] - : flat[flatname] - } - Object.keys(flat).sort().forEach(function (flatname) { var node = flat[flatname] - var requiredBy = node.package._requiredBy || [] - var requiredByNames = requiredBy.filter(function (parentFlatname) { - var parentNode = getNode(parentFlatname) - if (!parentNode) return false - return parentNode.package.dependencies[moduleName(node)] || - (parentNode.package.devDependencies && parentNode.package.devDependencies[moduleName(node)]) - }) - requiredBy = requiredByNames.map(getNode) - - node.requiredBy = requiredBy - - if (!requiredBy.length) return + if (!node.requiredBy.length) return - if (node.parent) node.parent.children = without(node.parent.children, node) + if (node.parent) { + // If a node is a cycle that never reaches the root of the logical + // tree then we'll leave it attached to the root, or else it + // would go missing. Further we'll note that this is the node in the + // cycle that we picked arbitrarily to be the one attached to the root. + // others will fall + if (isDisconnectedCycle(node)) { + node.cycleTop = true + // Nor do we want to disconnect non-cyclical extraneous modules from the tree. + } else if (node.requiredBy.length) { + // regular deps though, we do, as we're moving them into the capable + // hands of the modules that require them. + node.parent.children = without(node.parent.children, node) + } + } - requiredBy.forEach(function (parentNode) { + node.requiredBy.forEach(function (parentNode) { parentNode.children = union(parentNode.children, [node]) }) - if (node.package._requiredBy.some(function (nodename) { return nodename[0] === '#' })) { - tree.children = union(tree.children, [node]) - } }) return tree } @@ -70,18 +82,27 @@ function translateTree_ (tree, seen) { tree.children.forEach(function (child) { pkg.dependencies[moduleName(child)] = translateTree_(child, seen) }) - Object.keys(tree.missingDeps).forEach(function (name) { + + function markMissing (name, requiredBy) { if (pkg.dependencies[name]) { + if (pkg.dependencies[name].missing) return pkg.dependencies[name].invalid = true pkg.dependencies[name].realName = name pkg.dependencies[name].extraneous = false } else { pkg.dependencies[name] = { - requiredBy: tree.missingDeps[name], + requiredBy: requiredBy, missing: true, optional: !!pkg.optionalDependencies[name] } } + } + + Object.keys(tree.missingDeps).forEach(function (name) { + markMissing(name, tree.missingDeps[name]) + }) + Object.keys(tree.missingDevDeps).forEach(function (name) { + markMissing(name, tree.missingDevDeps[name]) }) var checkForMissingPeers = (tree.parent ? [] : [tree]).concat(tree.children) checkForMissingPeers.filter(function (child) { diff --git a/deps/npm/lib/install/node.js b/deps/npm/lib/install/node.js index c76dc765ba493c..a5b766b0549946 100644 --- a/deps/npm/lib/install/node.js +++ b/deps/npm/lib/install/node.js @@ -2,11 +2,10 @@ var defaultTemplate = { package: { + version: '', dependencies: {}, devDependencies: {}, - optionalDependencies: {}, - _requiredBy: [], - _phantomChildren: {} + optionalDependencies: {} }, loaded: false, children: [], @@ -14,10 +13,13 @@ var defaultTemplate = { requires: [], missingDeps: {}, missingDevDeps: {}, + phantomChildren: {}, path: null, realpath: null, + location: null, userRequired: false, - existing: false + existing: false, + isTop: false } function isLink (node) { @@ -34,7 +36,7 @@ var create = exports.create = function (node, template) { if (node[key] != null) return node[key] = template[key] }) - if (isLink(node) || isLink(node.parent)) { + if (isLink(node.parent)) { node.isLink = true } return node @@ -48,14 +50,17 @@ function reset (node, seen) { if (seen[node.path]) return seen[node.path] = true var child = create(node) - child.package._requiredBy = child.package._requiredBy.filter(function (req) { - return req[0] === '#' - }) - child.requiredBy = [] - child.package._phantomChildren = {} + // FIXME: cleaning up after read-package-json's mess =( if (child.package._id === '@') delete child.package._id + + child.isTop = false + child.requiredBy = [] + child.requires = [] child.missingDeps = {} + child.missingDevDeps = {} + child.phantomChildren = {} + child.location = null + child.children.forEach(function (child) { reset(child, seen) }) - if (!child.package.version) child.package.version = '' } diff --git a/deps/npm/lib/install/prune-tree.js b/deps/npm/lib/install/prune-tree.js deleted file mode 100644 index eb3edf4f75bafc..00000000000000 --- a/deps/npm/lib/install/prune-tree.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict' -var validate = require('aproba') -var flattenTree = require('./flatten-tree.js') - -function isNotPackage (mod) { - return function (parentMod) { return mod !== parentMod } -} - -module.exports = function pruneTree (tree) { - validate('O', arguments) - var flat = flattenTree(tree) - // we just do this repeatedly until there are no more orphaned packages - // which isn't as effecient as it could be on a REALLY big tree - // but we'll face that if it proves to be an issue - var removedPackage - do { - removedPackage = false - Object.keys(flat).forEach(function (flatname) { - var child = flat[flatname] - if (!child.parent) return - child.package._requiredBy = (child.package._requiredBy || []).filter(function (req) { - var isDev = req.substr(0, 4) === '#DEV' - if (req[0] === '#' && !isDev) return true - if (flat[req]) return true - if (!isDev) return false - var reqChildAsDevDep = flat[req.substr(5)] - return reqChildAsDevDep && !reqChildAsDevDep.parent - }) - if (!child.package._requiredBy.length) { - removedPackage = true - delete flat[flatname] - child.parent.children = child.parent.children.filter(isNotPackage(child)) - } - }) - } while (removedPackage) -} diff --git a/deps/npm/lib/install/save.js b/deps/npm/lib/install/save.js index acbe8c5bb3579f..708da61c8a9488 100644 --- a/deps/npm/lib/install/save.js +++ b/deps/npm/lib/install/save.js @@ -12,6 +12,7 @@ var npm = require('../npm.js') var deepSortObject = require('../utils/deep-sort-object.js') var parseJSON = require('../utils/parse-json.js') var moduleName = require('../utils/module-name.js') +var isOnlyDev = require('./is-dev.js').isOnlyDev // if the -S|--save option is specified, then write installed packages // as dependencies to a package.json file. @@ -49,8 +50,7 @@ function saveShrinkwrap (tree, next) { var shrinkwrap = tree.package._shrinkwrap || {dependencies: {}} var hasDevOnlyDeps = tree.requires.filter(function (dep) { - var devReqs = dep.package._requiredBy.filter(function (name) { return name.substr(0, 4) === '#DEV' }) - return devReqs.length === dep.package._requiredBy.length + return isOnlyDev(dep) }).some(function (dep) { return shrinkwrap.dependencies[dep.package.name] != null }) diff --git a/deps/npm/lib/install/update-package-json.js b/deps/npm/lib/install/update-package-json.js index 97b2f05bb0fa97..eee530c3cd803d 100644 --- a/deps/npm/lib/install/update-package-json.js +++ b/deps/npm/lib/install/update-package-json.js @@ -1,18 +1,46 @@ 'use strict' var path = require('path') var writeFileAtomic = require('write-file-atomic') +var moduleName = require('../utils/module-name.js') var deepSortObject = require('../utils/deep-sort-object.js') +var sortedObject = require('sorted-object') + +var sortKeys = [ + 'dependencies', 'devDependencies', 'bundleDependencies', + 'optionalDependencies', 'keywords', 'engines', 'scripts', + 'files' +] + +module.exports = function (mod, buildpath, next) { + var pkg = sortedObject(mod.package) + var name = moduleName(mod) + // Add our diagnostic keys to the package.json. + // Note that there are folks relying on these, for ex, the Visual Studio + // Node.js addon. + pkg._requiredBy = + mod.requiredBy + .map(function (req) { + if (req.package.devDependencies[name] && !req.package.dependencies[name]) { + return '#DEV:' + req.location + } else { + return req.location + } + }) + .concat(mod.userRequired ? ['#USER'] : []) + .concat(mod.existing ? ['#EXISTING'] : []) + .sort() + pkg._location = mod.location + pkg._phantomChildren = {} + Object.keys(mod.phantomChildren).sort().forEach(function (name) { + pkg._phantomChildren[name] = mod.phantomChildren[name].package.version + }) + + // sort keys that are known safe to sort to produce more consistent output + sortKeys.forEach(function (key) { + if (pkg[key] != null) pkg[key] = deepSortObject(pkg[key]) + }) + + var data = JSON.stringify(sortedObject(pkg), null, 2) + '\n' -module.exports = function (pkg, buildpath, next) { - // FIXME: This bundled dance is because we're sticking a big tree of bundled - // deps into the parsed package.json– it probably doesn't belong there =/ - // But the real reason we don't just dump it out is that it's the result - // of npm-read-tree, which produces circular data structures, due to the - // parent and children keys. - var bundled = pkg.package._bundled - delete pkg.package._bundled // FIXME - var packagejson = deepSortObject(pkg.package) - var data = JSON.stringify(packagejson, null, 2) + '\n' - pkg.package._bundled = bundled writeFileAtomic(path.resolve(buildpath, 'package.json'), data, next) } diff --git a/deps/npm/lib/link.js b/deps/npm/lib/link.js index 3624a16c98e6c7..54b8dcac7a428e 100644 --- a/deps/npm/lib/link.js +++ b/deps/npm/lib/link.js @@ -11,6 +11,7 @@ var path = require('path') var build = require('./build.js') var npa = require('npm-package-arg') var usage = require('./utils/usage') +var output = require('./utils/output.js') module.exports = link @@ -179,9 +180,7 @@ function resultPrinter (pkg, src, dest, rp, cb) { return parseableOutput(dest, rp || src, cb) } if (rp === src) rp = null - log.clearProgress() - console.log(where + ' -> ' + src + (rp ? ' -> ' + rp : '')) - log.showProgress() + output(where + ' -> ' + src + (rp ? ' -> ' + rp : '')) cb() } @@ -193,8 +192,6 @@ function parseableOutput (dest, rp, cb) { // *just* print the target folder. // However, we don't actually ever read the version number, so // the second field is always blank. - log.clearProgress() - console.log(dest + '::' + rp) - log.showProgress() + output(dest + '::' + rp) cb() } diff --git a/deps/npm/lib/ls.js b/deps/npm/lib/ls.js index d2fe14fb2f8702..ba5ab16e51ec7b 100644 --- a/deps/npm/lib/ls.js +++ b/deps/npm/lib/ls.js @@ -20,6 +20,7 @@ var mutateIntoLogicalTree = require('./install/mutate-into-logical-tree.js') var recalculateMetadata = require('./install/deps.js').recalculateMetadata var packageId = require('./utils/package-id.js') var usage = require('./utils/usage') +var output = require('./utils/output.js') ls.usage = usage( 'ls', @@ -99,7 +100,7 @@ var lsFromTree = ls.fromTree = function (dir, physicalTree, args, silent, cb) { } else if (data) { out = makeArchy(bfs, long, dir) } - console.log(out) + output(out) if (args.length && !data._found) process.exitCode = 1 diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js index 9d6cda386a7d4d..4f810152513ee0 100644 --- a/deps/npm/lib/npm.js +++ b/deps/npm/lib/npm.js @@ -22,6 +22,7 @@ var npmconf = require('./config/core.js') var log = require('npmlog') + var tty = require('tty') var path = require('path') var abbrev = require('abbrev') var which = require('which') @@ -30,6 +31,7 @@ var aliases = require('./config/cmd-list').aliases var cmdList = require('./config/cmd-list').cmdList var plumbing = require('./config/cmd-list').plumbing + var output = require('./utils/output.js') npm.config = { loaded: false, @@ -140,7 +142,7 @@ function defaultCb (er, data) { log.disableProgress() if (er) console.error(er.stack || er.message) - else console.log(data) + else output(data) } npm.deref = function (c) { @@ -261,7 +263,6 @@ npm.color = false break default: - var tty = require('tty') if (process.stdout.isTTY) npm.color = true else if (!tty.isatty) npm.color = true else if (tty.isatty(1)) npm.color = true @@ -269,19 +270,19 @@ break } - log.resume() + if (config.get('unicode')) { + log.enableUnicode() + } else { + log.disableUnicode() + } - if (config.get('progress')) { + if (config.get('progress') && (process.stderr.isTTY || (tty.isatty && tty.isatty(2)))) { log.enableProgress() } else { log.disableProgress() } - if (config.get('unicode')) { - log.enableUnicode() - } else { - log.disableUnicode() - } + log.resume() // at this point the configs are all set. // go ahead and spin up the registry client. diff --git a/deps/npm/lib/outdated.js b/deps/npm/lib/outdated.js index 50bdb363d1cdaf..dd597983650cfd 100644 --- a/deps/npm/lib/outdated.js +++ b/deps/npm/lib/outdated.js @@ -40,6 +40,7 @@ var mapToRegistry = require('./utils/map-to-registry.js') var isExtraneous = require('./install/is-extraneous.js') var recalculateMetadata = require('./install/deps.js').recalculateMetadata var moduleName = require('./utils/module-name.js') +var output = require('./utils/output.js') function uniqName (item) { return item[0].path + '|' + item[1] + '|' + item[7] @@ -75,6 +76,7 @@ function outdated (args, silent, cb) { if (npm.config.get('depth') === Infinity) npm.config.set('depth', 0) readPackageTree(dir, andRecalculateMetadata(function (er, tree) { + if (!tree) return cb(er) mutateIntoLogicalTree(tree) outdated_(args, '', tree, {}, 0, function (er, list) { list = uniq(list || []).sort(function (aa, bb) { @@ -82,11 +84,10 @@ function outdated (args, silent, cb) { aa[1].localeCompare(bb[1]) }) if (er || silent || list.length === 0) return cb(er, list) - log.disableProgress() if (npm.config.get('json')) { - console.log(makeJSON(list)) + output(makeJSON(list)) } else if (npm.config.get('parseable')) { - console.log(makeParseable(list)) + output(makeParseable(list)) } else { var outList = list.map(makePretty) var outHead = [ 'Package', @@ -108,7 +109,7 @@ function outdated (args, silent, cb) { align: ['l', 'r', 'r', 'r', 'l'], stringLength: function (s) { return ansiTrim(s).length } } - console.log(table(outTable, tableOpts)) + output(table(outTable, tableOpts)) } cb(null, list.map(function (item) { return [item[0].parent.path].concat(item.slice(1, 7)) })) }) @@ -142,8 +143,6 @@ function makePretty (p) { columns[0] = color[has === want || want === 'linked' ? 'yellow' : 'red'](columns[0]) // dep columns[2] = color.green(columns[2]) // want columns[3] = color.magenta(columns[3]) // latest - columns[4] = color.brightBlack(columns[4]) // dir - if (long) columns[5] = color.brightBlack(columns[5]) // type } return columns @@ -333,7 +332,7 @@ function shouldUpdate (args, tree, dep, has, req, depth, pkgpath, cb, type) { if (args.length && args.indexOf(dep) === -1) return skip() var parsed = npa(dep + '@' + req) - if (tree.isLink && (tree.parent !== null && tree.parent.parent === null)) { + if (tree.isLink && tree.parent && tree.parent.isTop) { return doIt('linked', 'linked') } if (parsed.type === 'git' || parsed.type === 'hosted') { diff --git a/deps/npm/lib/owner.js b/deps/npm/lib/owner.js index 2cc3eef3b9175a..64d086af78f9b1 100644 --- a/deps/npm/lib/owner.js +++ b/deps/npm/lib/owner.js @@ -5,6 +5,7 @@ var log = require('npmlog') var mapToRegistry = require('./utils/map-to-registry.js') var readLocalPkg = require('./utils/read-local-package.js') var usage = require('./utils/usage') +var output = require('./utils/output.js') owner.usage = usage( 'owner', @@ -127,7 +128,7 @@ function ls (pkg, cb) { return o.name + ' <' + o.email + '>' }).join('\n') } - console.log(msg) + output(msg) cb(er, owners) }) }) @@ -258,9 +259,9 @@ function mutate (pkg, user, mutation, cb) { if (er) { log.error('owner mutate', 'Failed to update package metadata') } else if (m.length > beforeMutation) { - console.log('+ %s (%s)', user, pkg) + output('+ %s (%s)', user, pkg) } else if (m.length < beforeMutation) { - console.log('- %s (%s)', user, pkg) + output('- %s (%s)', user, pkg) } cb(er, data) diff --git a/deps/npm/lib/pack.js b/deps/npm/lib/pack.js index c98f5f202016b8..ede59dd12c207e 100644 --- a/deps/npm/lib/pack.js +++ b/deps/npm/lib/pack.js @@ -12,6 +12,7 @@ var path = require('path') var cwd = process.cwd() var writeStreamAtomic = require('fs-write-stream-atomic') var cachedPackageRoot = require('./cache/cached-package-root.js') +var output = require('./utils/output.js') pack.usage = 'npm pack [[<@scope>/]...]' @@ -39,7 +40,7 @@ function printFiles (files, cb) { files = files.map(function (file) { return path.relative(cwd, file) }) - console.log(files.join('\n')) + output(files.join('\n')) cb() } diff --git a/deps/npm/lib/ping.js b/deps/npm/lib/ping.js index 23b18bfba079a5..a86150508d2678 100644 --- a/deps/npm/lib/ping.js +++ b/deps/npm/lib/ping.js @@ -1,4 +1,5 @@ var npm = require('./npm.js') +var output = require('./utils/output.js') module.exports = ping @@ -14,7 +15,7 @@ function ping (args, silent, cb) { var auth = npm.config.getCredentialsByURI(registry) npm.registry.ping(registry, {auth: auth}, function (er, pong) { - if (!silent) console.log(JSON.stringify(pong)) + if (!silent) output(JSON.stringify(pong)) cb(er, er ? null : pong) }) } diff --git a/deps/npm/lib/prefix.js b/deps/npm/lib/prefix.js index 42f61103f64a2e..fb20389c457b2e 100644 --- a/deps/npm/lib/prefix.js +++ b/deps/npm/lib/prefix.js @@ -1,6 +1,7 @@ module.exports = prefix var npm = require('./npm.js') +var output = require('./utils/output.js') prefix.usage = 'npm prefix [-g]' @@ -9,6 +10,6 @@ function prefix (args, silent, cb) { cb = silent silent = false } - if (!silent) console.log(npm.prefix) + if (!silent) output(npm.prefix) process.nextTick(cb.bind(this, null, npm.prefix)) } diff --git a/deps/npm/lib/publish.js b/deps/npm/lib/publish.js index 45de4f24b40ef9..e1826df9d47966 100644 --- a/deps/npm/lib/publish.js +++ b/deps/npm/lib/publish.js @@ -13,6 +13,7 @@ var createReadStream = require('graceful-fs').createReadStream var npa = require('npm-package-arg') var semver = require('semver') var getPublishConfig = require('./utils/get-publish-config.js') +var output = require('./utils/output.js') publish.usage = 'npm publish [|] [--tag ] [--access ]' + "\n\nPublishes '.' if no argument supplied" + @@ -147,8 +148,7 @@ function publish_ (arg, data, isRetry, cachedir, cb) { // report the unpublish error if this was a retry and unpublish failed if (er && isRetry && isRetry !== true) return cb(isRetry) if (er) return cb(er) - log.clearProgress() - console.log('+ ' + data._id) + output('+ ' + data._id) cb() }) }) diff --git a/deps/npm/lib/rebuild.js b/deps/npm/lib/rebuild.js index 29492c27f22783..2673b1cfea66a3 100644 --- a/deps/npm/lib/rebuild.js +++ b/deps/npm/lib/rebuild.js @@ -7,6 +7,7 @@ var log = require('npmlog') var npm = require('./npm.js') var npa = require('npm-package-arg') var usage = require('./utils/usage') +var output = require('./utils/output.js') rebuild.usage = usage( 'rebuild', @@ -33,11 +34,9 @@ function rebuild (args, cb) { function cleanBuild (folders, set, cb) { npm.commands.build(folders, function (er) { if (er) return cb(er) - log.clearProgress() - console.log(folders.map(function (f) { + output(folders.map(function (f) { return set[f] + ' ' + f }).join('\n')) - log.showProgress() cb() }) } diff --git a/deps/npm/lib/root.js b/deps/npm/lib/root.js index 958361d351a4b0..82a804aff5391b 100644 --- a/deps/npm/lib/root.js +++ b/deps/npm/lib/root.js @@ -1,6 +1,7 @@ module.exports = root var npm = require('./npm.js') +var output = require('./utils/output.js') root.usage = 'npm root [-g]' @@ -9,6 +10,6 @@ function root (args, silent, cb) { cb = silent silent = false } - if (!silent) console.log(npm.dir) + if (!silent) output(npm.dir) process.nextTick(cb.bind(this, null, npm.dir)) } diff --git a/deps/npm/lib/run-script.js b/deps/npm/lib/run-script.js index f9c6872aa96a8e..05bc1fe98b7763 100644 --- a/deps/npm/lib/run-script.js +++ b/deps/npm/lib/run-script.js @@ -7,6 +7,7 @@ var readJson = require('read-package-json') var log = require('npmlog') var chain = require('slide').chain var usage = require('./utils/usage') +var output = require('./utils/output.js') runScript.usage = usage( 'run-script', @@ -91,13 +92,13 @@ function list (cb) { } if (npm.config.get('json')) { - console.log(JSON.stringify(d.scripts || {}, null, 2)) + output(JSON.stringify(d.scripts || {}, null, 2)) return cb(null, allScripts) } if (npm.config.get('parseable')) { allScripts.forEach(function (script) { - console.log(script + ':' + d.scripts[script]) + output(script + ':' + d.scripts[script]) }) return cb(null, allScripts) } @@ -105,18 +106,18 @@ function list (cb) { var s = '\n ' var prefix = ' ' if (scripts.length) { - console.log('Lifecycle scripts included in %s:', d.name) + output('Lifecycle scripts included in %s:', d.name) } scripts.forEach(function (script) { - console.log(prefix + script + s + d.scripts[script]) + output(prefix + script + s + d.scripts[script]) }) if (!scripts.length && runScripts.length) { - console.log('Scripts available in %s via `npm run-script`:', d.name) + output('Scripts available in %s via `npm run-script`:', d.name) } else if (runScripts.length) { - console.log('\navailable via `npm run-script`:') + output('\navailable via `npm run-script`:') } runScripts.forEach(function (script) { - console.log(prefix + script + s + d.scripts[script]) + output(prefix + script + s + d.scripts[script]) }) return cb(null, allScripts) }) diff --git a/deps/npm/lib/search.js b/deps/npm/lib/search.js index d71102ac3ed68c..cd6d5ed8ea54db 100644 --- a/deps/npm/lib/search.js +++ b/deps/npm/lib/search.js @@ -5,6 +5,7 @@ var npm = require('./npm.js') var columnify = require('columnify') var updateIndex = require('./cache/update-index.js') var usage = require('./utils/usage') +var output = require('./utils/output.js') search.usage = usage( 'search', @@ -70,7 +71,7 @@ function search (args, silent, staleness, cb) { // prettify and print it, and then provide the raw // data to the cb. if (er || silent) return cb(er, data) - console.log(prettify(data, args)) + output(prettify(data, args)) cb(null, data) }) } diff --git a/deps/npm/lib/shrinkwrap.js b/deps/npm/lib/shrinkwrap.js index 9a6d8e76bd549e..c6a41842fcc4b2 100644 --- a/deps/npm/lib/shrinkwrap.js +++ b/deps/npm/lib/shrinkwrap.js @@ -7,8 +7,10 @@ var path = require('path') var log = require('npmlog') var writeFileAtomic = require('write-file-atomic') var iferr = require('iferr') +var readPackageJson = require('read-package-json') var readPackageTree = require('read-package-tree') var validate = require('aproba') +var chain = require('slide').chain var npm = require('./npm.js') var recalculateMetadata = require('./install/deps.js').recalculateMetadata var validatePeerDeps = require('./install/deps.js').validatePeerDeps @@ -16,6 +18,8 @@ var isExtraneous = require('./install/is-extraneous.js') var isOnlyDev = require('./install/is-dev.js').isOnlyDev var packageId = require('./utils/package-id.js') var moduleName = require('./utils/module-name.js') +var output = require('./utils/output.js') +var lifecycle = require('./utils/lifecycle.js') shrinkwrap.usage = 'npm shrinkwrap' @@ -30,11 +34,24 @@ function shrinkwrap (args, silent, cb) { } var dir = path.resolve(npm.dir, '..') + var packagePath = path.join(npm.localPrefix, 'package.json') npm.config.set('production', true) - readPackageTree(dir, andRecalculateMetadata(iferr(cb, function (tree) { - var pkginfo = treeToShrinkwrap(tree, !!npm.config.get('dev') || /^dev(elopment)?$/.test(npm.config.get('also'))) - shrinkwrap_(pkginfo, silent, cb) - }))) + + readPackageJson(packagePath, iferr(cb, function (data) { + lifecycle(data, 'preshrinkwrap', function () { + readPackageTree(dir, andRecalculateMetadata(iferr(cb, function (tree) { + var pkginfo = treeToShrinkwrap(tree, !!npm.config.get('dev') || /^dev(elopment)?$/.test(npm.config.get('also'))) + + chain([ + [lifecycle, tree.package, 'shrinkwrap'], + [shrinkwrap_, pkginfo, silent], + [lifecycle, tree.package, 'postshrinkwrap'] + ], iferr(cb, function (data) { + cb(null, data[0]) + })) + }))) + }) + })) } function andRecalculateMetadata (next) { @@ -122,9 +139,7 @@ function save (pkginfo, silent, cb) { writeFileAtomic(file, swdata, function (er) { if (er) return cb(er) if (silent) return cb(null, pkginfo) - log.clearProgress() - console.log('wrote npm-shrinkwrap.json') - log.showProgress() + output('wrote npm-shrinkwrap.json') cb(null, pkginfo) }) } diff --git a/deps/npm/lib/star.js b/deps/npm/lib/star.js index ce141688b9339f..f19cb4b07bebb9 100644 --- a/deps/npm/lib/star.js +++ b/deps/npm/lib/star.js @@ -5,6 +5,7 @@ var log = require('npmlog') var asyncMap = require('slide').asyncMap var mapToRegistry = require('./utils/map-to-registry.js') var usage = require('./utils/usage') +var output = require('./utils/output.js') star.usage = usage( 'star', @@ -34,7 +35,7 @@ function star (args, cb) { } npm.registry.star(uri, params, function (er, data, raw, req) { if (!er) { - console.log(s + ' ' + pkg) + output(s + ' ' + pkg) log.verbose('star', data) } cb(er, data, raw, req) diff --git a/deps/npm/lib/stars.js b/deps/npm/lib/stars.js index 4ad8f02e59dca9..4771079356a174 100644 --- a/deps/npm/lib/stars.js +++ b/deps/npm/lib/stars.js @@ -5,6 +5,7 @@ stars.usage = 'npm stars []' var npm = require('./npm.js') var log = require('npmlog') var mapToRegistry = require('./utils/map-to-registry.js') +var output = require('./utils/output.js') function stars (args, cb) { npm.commands.whoami([], true, function (er, username) { @@ -38,7 +39,7 @@ function stars (args, cb) { log.warn('stars', 'user has not starred any packages.') } else { data.rows.forEach(function (a) { - console.log(a.value) + output(a.value) }) } cb() diff --git a/deps/npm/lib/substack.js b/deps/npm/lib/substack.js index c39a5dcc482a8d..428e0a5898b6ee 100644 --- a/deps/npm/lib/substack.js +++ b/deps/npm/lib/substack.js @@ -1,5 +1,6 @@ module.exports = substack var npm = require('./npm.js') +var output = require('./utils/output.js') var isms = [ '\u001b[32mbeep \u001b[35mboop\u001b[m', @@ -14,7 +15,7 @@ var isms = [ function substack (args, cb) { var i = Math.floor(Math.random() * isms.length) - console.log(isms[i]) + output(isms[i]) var c = args.shift() if (c) npm.commands[c](args, cb) else cb() diff --git a/deps/npm/lib/team.js b/deps/npm/lib/team.js index 324d8df5e22848..f99063b2787148 100644 --- a/deps/npm/lib/team.js +++ b/deps/npm/lib/team.js @@ -1,5 +1,6 @@ var mapToRegistry = require('./utils/map-to-registry.js') var npm = require('./npm') +var output = require('./utils/output.js') module.exports = team @@ -44,7 +45,7 @@ function team (args, cb) { team: entity[1], user: args.shift() }, function (err, data) { - !err && data && console.log(JSON.stringify(data, undefined, 2)) + !err && data && output(JSON.stringify(data, undefined, 2)) cb(err, data) }) } catch (e) { diff --git a/deps/npm/lib/unbuild.js b/deps/npm/lib/unbuild.js index f5efb1ee6d2ca8..9ba5972d8a3666 100644 --- a/deps/npm/lib/unbuild.js +++ b/deps/npm/lib/unbuild.js @@ -12,6 +12,7 @@ var asyncMap = require('slide').asyncMap var chain = require('slide').chain var log = require('npmlog') var build = require('./build.js') +var output = require('./utils/output.js') // args is a list of folders. // remove any bins/etc, and then delete the folder. @@ -40,9 +41,7 @@ function unbuild_ (silent) { [lifecycle, pkg, 'preuninstall', folder, false, true], [lifecycle, pkg, 'uninstall', folder, false, true], !silent && function (cb) { - log.clearProgress() - console.log('unbuild ' + pkg._id) - log.showProgress() + output('unbuild ' + pkg._id) cb() }, [rmStuff, pkg, folder], diff --git a/deps/npm/lib/unpublish.js b/deps/npm/lib/unpublish.js index 63f87b8207d246..ee050c2846206a 100644 --- a/deps/npm/lib/unpublish.js +++ b/deps/npm/lib/unpublish.js @@ -8,6 +8,7 @@ var path = require('path') var mapToRegistry = require('./utils/map-to-registry.js') var npa = require('npm-package-arg') var getPublishConfig = require('./utils/get-publish-config.js') +var output = require('./utils/output.js') unpublish.usage = 'npm unpublish [<@scope>/][@]' @@ -89,7 +90,7 @@ function gotProject (project, version, publishConfig, cb_) { function cb (er) { if (er) return cb_(er) - console.log('- ' + project + (version ? '@' + version : '')) + output('- ' + project + (version ? '@' + version : '')) cb_() } diff --git a/deps/npm/lib/utils/git.js b/deps/npm/lib/utils/git.js index dc021300ea0d7d..4d05c75b867e37 100644 --- a/deps/npm/lib/utils/git.js +++ b/deps/npm/lib/utils/git.js @@ -11,6 +11,7 @@ var which = require('which') var git = npm.config.get('git') var assert = require('assert') var log = require('npmlog') +var noProgressTillDone = require('./no-progress-while-running.js').tillDone function prefixGitArgs () { return process.platform === 'win32' ? ['-c', 'core.longpaths=true'] : [] @@ -19,7 +20,7 @@ function prefixGitArgs () { function execGit (args, options, cb) { log.info('git', args) var fullArgs = prefixGitArgs().concat(args || []) - return exec(git, fullArgs, options, cb) + return exec(git, fullArgs, options, noProgressTillDone(cb)) } function spawnGit (args, options) { diff --git a/deps/npm/lib/utils/lifecycle.js b/deps/npm/lib/utils/lifecycle.js index fd1a59b74c75bc..6a862366f28374 100644 --- a/deps/npm/lib/utils/lifecycle.js +++ b/deps/npm/lib/utils/lifecycle.js @@ -14,6 +14,7 @@ var PATH = 'PATH' var uidNumber = require('uid-number') var umask = require('./umask') var usage = require('./usage') +var output = require('./output.js') // windows calls it's path 'Path' usually, but this is not guaranteed. if (process.platform === 'win32') { @@ -182,9 +183,7 @@ function runCmd (note, cmd, pkg, env, stage, wd, unsafe, cb) { var group = unsafe ? null : npm.config.get('group') if (log.level !== 'silent') { - log.clearProgress() - console.log(note) - log.showProgress() + output(note) } log.verbose('lifecycle', logid(pkg, stage), 'unsafe-perm in lifecycle', unsafe) @@ -232,8 +231,6 @@ function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) { log.verbose('lifecycle', logid(pkg, stage), 'CWD:', wd) log.silly('lifecycle', logid(pkg, stage), 'Args:', [shFlag, cmd]) - var progressEnabled = log.progressEnabled - if (progressEnabled) log.disableProgress() var proc = spawn(sh, [shFlag, cmd], conf) proc.on('error', procError) @@ -249,7 +246,6 @@ function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) { process.once('SIGTERM', procKill) function procError (er) { - if (progressEnabled) log.enableProgress() if (er) { log.info('lifecycle', logid(pkg, stage), 'Failed to exec ' + stage + ' script') er.message = pkg._id + ' ' + stage + ': `' + cmd + '`\n' + diff --git a/deps/npm/lib/utils/no-progress-while-running.js b/deps/npm/lib/utils/no-progress-while-running.js new file mode 100644 index 00000000000000..961fa8b5556bbc --- /dev/null +++ b/deps/npm/lib/utils/no-progress-while-running.js @@ -0,0 +1,23 @@ +'use strict' +var log = require('npmlog') +var progressEnabled +var running = 0 + +var startRunning = exports.startRunning = function () { + if (progressEnabled == null) progressEnabled = log.progressEnabled + if (progressEnabled) log.disableProgress() + ++running +} + +var stopRunning = exports.stopRunning = function () { + --running + if (progressEnabled && running === 0) log.enableProgress() +} + +exports.tillDone = function noProgressTillDone (cb) { + startRunning() + return function () { + stopRunning() + cb.apply(this, arguments) + } +} diff --git a/deps/npm/lib/utils/output.js b/deps/npm/lib/utils/output.js new file mode 100644 index 00000000000000..3dd66cbdd2ab8d --- /dev/null +++ b/deps/npm/lib/utils/output.js @@ -0,0 +1,8 @@ +'use strict' +var log = require('npmlog') +// output to stdout in a progress bar compatible way +module.exports = function () { + log.clearProgress() + console.log.apply(console, arguments) + log.showProgress() +} diff --git a/deps/npm/lib/utils/pulse-till-done.js b/deps/npm/lib/utils/pulse-till-done.js index fc6450e0030015..26692413068a53 100644 --- a/deps/npm/lib/utils/pulse-till-done.js +++ b/deps/npm/lib/utils/pulse-till-done.js @@ -7,9 +7,10 @@ var pulse module.exports = function (prefix, cb) { validate('SF', [prefix, cb]) + if (!prefix) prefix = 'network' if (!pulsers++) { pulse = setInterval(function () { - log.gauge.pulse('network') + log.gauge.pulse(prefix) }, 250) } return function () { diff --git a/deps/npm/lib/utils/spawn.js b/deps/npm/lib/utils/spawn.js index e389d83e02c64d..b164a6acba0f30 100644 --- a/deps/npm/lib/utils/spawn.js +++ b/deps/npm/lib/utils/spawn.js @@ -2,15 +2,31 @@ module.exports = spawn var _spawn = require('child_process').spawn var EventEmitter = require('events').EventEmitter +var npwr = require('./no-progress-while-running.js') + +function willCmdOutput (stdio) { + if (stdio === 'inherit') return true + if (!Array.isArray(stdio)) return false + for (var fh = 1; fh <= 2; ++fh) { + if (stdio[fh] === 'inherit') return true + if (stdio[fh] === 1 || stdio[fh] === 2) return true + } + return false +} function spawn (cmd, args, options) { + var cmdWillOutput = willCmdOutput(options && options.stdio) + + if (cmdWillOutput) npwr.startRunning() var raw = _spawn(cmd, args, options) var cooked = new EventEmitter() raw.on('error', function (er) { + if (cmdWillOutput) npwr.stopRunning() er.file = cmd cooked.emit('error', er) }).on('close', function (code, signal) { + if (cmdWillOutput) npwr.stopRunning() // Create ENOENT error because Node.js v0.8 will not emit // an `error` event if the command could not be found. if (code === 127) { diff --git a/deps/npm/lib/utils/tar.js b/deps/npm/lib/utils/tar.js index 98f6e4ff64e33f..1e00040dbb12e2 100644 --- a/deps/npm/lib/utils/tar.js +++ b/deps/npm/lib/utils/tar.js @@ -20,9 +20,9 @@ var myUid = process.getuid && process.getuid() var myGid = process.getgid && process.getgid() var readPackageTree = require('read-package-tree') var union = require('lodash.union') -var flattenTree = require('../install/flatten-tree.js') var moduleName = require('./module-name.js') var packageId = require('./package-id.js') +var pulseTillDone = require('../utils/pulse-till-done.js') if (process.env.SUDO_UID && myUid === 0) { if (!isNaN(process.env.SUDO_UID)) myUid = +process.env.SUDO_UID @@ -40,18 +40,20 @@ function pack (tarball, folder, pkg, cb) { readJson(path.join(folder, 'package.json'), function (er, pkg) { if (er || !pkg.bundleDependencies) { - pack_(tarball, folder, null, null, pkg, cb) + pack_(tarball, folder, null, pkg, cb) } else { // we require this at runtime due to load-order issues, because recursive // requires fail if you replace the exports object, and we do, not in deps, but // in a dep of it. var recalculateMetadata = require('../install/deps.js').recalculateMetadata - readPackageTree(folder, iferr(cb, function (tree) { - recalculateMetadata(tree, log.newGroup('pack:' + packageId(pkg)), iferr(cb, function () { - pack_(tarball, folder, tree, flattenTree(tree), pkg, cb) + readPackageTree(folder, pulseTillDone('pack:readTree:' + packageId(pkg), iferr(cb, function (tree) { + var recalcGroup = log.newGroup('pack:recalc:' + packageId(pkg)) + recalculateMetadata(tree, recalcGroup, iferr(cb, function () { + recalcGroup.finish() + pack_(tarball, folder, tree, pkg, pulseTillDone('pack:' + packageId(pkg), cb)) })) - })) + }))) } }) } @@ -61,9 +63,96 @@ function BundledPacker (props) { } inherits(BundledPacker, Packer) +BundledPacker.prototype.applyIgnores = function (entry, partial, entryObj) { + if (!entryObj || entryObj.type !== 'Directory') { + // package.json files can never be ignored. + if (entry === 'package.json') return true + + // readme files should never be ignored. + if (entry.match(/^readme(\.[^\.]*)$/i)) return true + + // license files should never be ignored. + if (entry.match(/^(license|licence)(\.[^\.]*)?$/i)) return true + + // copyright notice files should never be ignored. + if (entry.match(/^(notice)(\.[^\.]*)?$/i)) return true + + // changelogs should never be ignored. + if (entry.match(/^(changes|changelog|history)(\.[^\.]*)?$/i)) return true + } + + // special rules. see below. + if (entry === 'node_modules' && this.packageRoot) return true + + // package.json main file should never be ignored. + var mainFile = this.package && this.package.main + if (mainFile && path.resolve(this.path, entry) === path.resolve(this.path, mainFile)) return true + + // some files are *never* allowed under any circumstances + // (VCS folders, native build cruft, npm cruft, regular cruft) + if (entry === '.git' || + entry === 'CVS' || + entry === '.svn' || + entry === '.hg' || + entry === '.lock-wscript' || + entry.match(/^\.wafpickle-[0-9]+$/) || + (this.parent && this.parent.packageRoot && this.basename === 'build' && + entry === 'config.gypi') || + entry === 'npm-debug.log' || + entry === '.npmrc' || + entry.match(/^\..*\.swp$/) || + entry === '.DS_Store' || + entry.match(/^\._/) + ) { + return false + } + + // in a node_modules folder, we only include bundled dependencies + // also, prevent packages in node_modules from being affected + // by rules set in the containing package, so that + // bundles don't get busted. + // Also, once in a bundle, everything is installed as-is + // To prevent infinite cycles in the case of cyclic deps that are + // linked with npm link, even in a bundle, deps are only bundled + // if they're not already present at a higher level. + if (this.bundleMagic) { + // bubbling up. stop here and allow anything the bundled pkg allows + if (entry.indexOf('/') !== -1) return true + + // never include the .bin. It's typically full of platform-specific + // stuff like symlinks and .cmd files anyway. + if (entry === '.bin') return false + + // the package root. + var p = this.parent + // the package before this one. + var pp = p && p.parent + + // if this entry has already been bundled, and is a symlink, + // and it is the *same* symlink as this one, then exclude it. + if (pp && pp.bundleLinks && this.bundleLinks && + pp.bundleLinks[entry] && + pp.bundleLinks[entry] === this.bundleLinks[entry]) { + return false + } + + // since it's *not* a symbolic link, if we're *already* in a bundle, + // then we should include everything. + if (pp && pp.package && pp.basename === 'node_modules') { + return true + } + + // only include it at this point if it's a bundleDependency + return this.isBundled(entry) + } + // if (this.bundled) return true + + return Packer.prototype.applyIgnores.call(this, entry, partial, entryObj) +} + function nameMatch (name) { return function (other) { return name === moduleName(other) } } -function pack_ (tarball, folder, tree, flatTree, pkg, cb) { +function pack_ (tarball, folder, tree, pkg, cb) { function InstancePacker (props) { BundledPacker.call(this, props) } @@ -81,18 +170,17 @@ function pack_ (tarball, folder, tree, flatTree, pkg, cb) { if (bd.indexOf(name) !== -1) return true var pkg = tree.children.filter(nameMatch(name))[0] if (!pkg) return false - var requiredBy = union([], pkg.package._requiredBy) + var requiredBy = [].concat(pkg.requiredBy) var seen = {} while (requiredBy.length) { - var req = requiredBy.shift() - if (seen[req]) continue - seen[req] = true - var reqPkg = flatTree[req] + var reqPkg = requiredBy.shift() + if (seen[reqPkg.path]) continue + seen[reqPkg.path] = true if (!reqPkg) continue if (reqPkg.parent === tree && bd.indexOf(moduleName(reqPkg)) !== -1) { return true } - requiredBy = union(requiredBy, reqPkg.package._requiredBy) + requiredBy = union(requiredBy, reqPkg.requiredBy) } return false } diff --git a/deps/npm/lib/utils/usage.js b/deps/npm/lib/utils/usage.js index 261d84ee8e06d5..ba069e645e156b 100644 --- a/deps/npm/lib/utils/usage.js +++ b/deps/npm/lib/utils/usage.js @@ -11,7 +11,7 @@ module.exports = function usage (cmd, txt, opt) { if (opt || post.length > 0) txt += '\n\n' if (post.length === 1) { - txt += 'aliase: ' + txt += 'alias: ' txt += post.join(', ') } else if (post.length > 1) { txt += 'aliases: ' diff --git a/deps/npm/lib/version.js b/deps/npm/lib/version.js index 448c7713cedbca..e69560fa9a8590 100644 --- a/deps/npm/lib/version.js +++ b/deps/npm/lib/version.js @@ -13,6 +13,7 @@ var git = require('./utils/git.js') var assert = require('assert') var lifecycle = require('./utils/lifecycle.js') var parseJSON = require('./utils/parse-json.js') +var output = require('./utils/output.js') version.usage = 'npm version [ | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]' + '\n(run in package dir)\n' + @@ -121,7 +122,7 @@ function readPackage (cb) { function updatePackage (newVersion, silent, cb_) { function cb (er) { - if (!er && !silent) console.log('v' + newVersion) + if (!er && !silent) output('v' + newVersion) cb_(er) } @@ -174,7 +175,7 @@ function dump (data, cb) { if (npm.config.get('json')) v = JSON.stringify(v, null, 2) - console.log(v) + output(v) cb() } diff --git a/deps/npm/lib/view.js b/deps/npm/lib/view.js index 79c440426b9fbc..5bf1cbf248a771 100644 --- a/deps/npm/lib/view.js +++ b/deps/npm/lib/view.js @@ -288,6 +288,10 @@ function printData (data, name, cb) { // there's one at the beginning if (/^\s*\n/.test(msg)) msg += '\n' + // disable the progress bar entirely, as we can't meaningfully update it if + // we may have partial lines printed. + log.disableProgress() + // print directly to stdout to not unnecessarily add blank lines process.stdout.write(msg) diff --git a/deps/npm/lib/visnup.js b/deps/npm/lib/visnup.js index b0352fd6d049f2..a61bacb73bf952 100644 --- a/deps/npm/lib/visnup.js +++ b/deps/npm/lib/visnup.js @@ -1,5 +1,6 @@ module.exports = visnup var npm = require('./npm.js') +var output = require('./utils/output.js') var handsomeFace = [ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 237, 236, 236, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], @@ -31,7 +32,7 @@ var handsomeFace = [ function visnup (args, cb) { handsomeFace.forEach(function (line) { - console.log(line.map(function (ch) { + output(line.map(function (ch) { return '\u001b[' + (ch ? '48;5;' + ch : ch) + 'm' }).join(' ')) }) diff --git a/deps/npm/lib/whoami.js b/deps/npm/lib/whoami.js index feb6fab95ae89c..e8af6595d15cc1 100644 --- a/deps/npm/lib/whoami.js +++ b/deps/npm/lib/whoami.js @@ -1,4 +1,5 @@ var npm = require('./npm.js') +var output = require('./utils/output.js') module.exports = whoami @@ -17,7 +18,7 @@ function whoami (args, silent, cb) { var auth = npm.config.getCredentialsByURI(registry) if (auth) { if (auth.username) { - if (!silent) console.log(auth.username) + if (!silent) output(auth.username) return process.nextTick(cb.bind(this, null, auth.username)) } else if (auth.token) { return npm.registry.whoami(registry, { auth: auth }, function (er, username) { @@ -30,7 +31,7 @@ function whoami (args, silent, cb) { return cb(needNewSession) } - if (!silent) console.log(username) + if (!silent) output(username) cb(null, username) }) } diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1 index 199a6d0472cb3f..ee683f3faa33e3 100644 --- a/deps/npm/man/man1/npm-README.1 +++ b/deps/npm/man/man1/npm-README.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "June 2016" "" "" +.TH "NPM" "1" "July 2016" "" "" .SH "NAME" \fBnpm\fR \- a JavaScript package manager .P diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1 index 6cddb81db0b400..b286750f75738a 100644 --- a/deps/npm/man/man1/npm-access.1 +++ b/deps/npm/man/man1/npm-access.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ACCESS" "1" "June 2016" "" "" +.TH "NPM\-ACCESS" "1" "July 2016" "" "" .SH "NAME" \fBnpm-access\fR \- Set access level on published packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1 index 3a22940ba695a6..d5ab3388dbade7 100644 --- a/deps/npm/man/man1/npm-adduser.1 +++ b/deps/npm/man/man1/npm-adduser.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ADDUSER" "1" "June 2016" "" "" +.TH "NPM\-ADDUSER" "1" "July 2016" "" "" .SH "NAME" \fBnpm-adduser\fR \- Add a registry user account .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1 index c34af76a619b2a..79c96247b3c36e 100644 --- a/deps/npm/man/man1/npm-bin.1 +++ b/deps/npm/man/man1/npm-bin.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BIN" "1" "June 2016" "" "" +.TH "NPM\-BIN" "1" "July 2016" "" "" .SH "NAME" \fBnpm-bin\fR \- Display npm bin folder .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1 index c348ba34d642be..6ff470e37d230d 100644 --- a/deps/npm/man/man1/npm-bugs.1 +++ b/deps/npm/man/man1/npm-bugs.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUGS" "1" "June 2016" "" "" +.TH "NPM\-BUGS" "1" "July 2016" "" "" .SH "NAME" \fBnpm-bugs\fR \- Bugs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-build.1 b/deps/npm/man/man1/npm-build.1 index 315daad2dea794..7ff15443520619 100644 --- a/deps/npm/man/man1/npm-build.1 +++ b/deps/npm/man/man1/npm-build.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUILD" "1" "June 2016" "" "" +.TH "NPM\-BUILD" "1" "July 2016" "" "" .SH "NAME" \fBnpm-build\fR \- Build a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bundle.1 b/deps/npm/man/man1/npm-bundle.1 index 098b0d31779233..a5a155afef5a86 100644 --- a/deps/npm/man/man1/npm-bundle.1 +++ b/deps/npm/man/man1/npm-bundle.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUNDLE" "1" "June 2016" "" "" +.TH "NPM\-BUNDLE" "1" "July 2016" "" "" .SH "NAME" \fBnpm-bundle\fR \- REMOVED .SH DESCRIPTION diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1 index b325ea394907e3..d398aec675d311 100644 --- a/deps/npm/man/man1/npm-cache.1 +++ b/deps/npm/man/man1/npm-cache.1 @@ -1,4 +1,4 @@ -.TH "NPM\-CACHE" "1" "June 2016" "" "" +.TH "NPM\-CACHE" "1" "July 2016" "" "" .SH "NAME" \fBnpm-cache\fR \- Manipulates packages cache .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1 index 859abbc8ccf01f..921bdffa3d2548 100644 --- a/deps/npm/man/man1/npm-completion.1 +++ b/deps/npm/man/man1/npm-completion.1 @@ -1,4 +1,4 @@ -.TH "NPM\-COMPLETION" "1" "June 2016" "" "" +.TH "NPM\-COMPLETION" "1" "July 2016" "" "" .SH "NAME" \fBnpm-completion\fR \- Tab Completion for npm .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1 index bd4b143e87ee56..42ac398922f68e 100644 --- a/deps/npm/man/man1/npm-config.1 +++ b/deps/npm/man/man1/npm-config.1 @@ -1,4 +1,4 @@ -.TH "NPM\-CONFIG" "1" "June 2016" "" "" +.TH "NPM\-CONFIG" "1" "July 2016" "" "" .SH "NAME" \fBnpm-config\fR \- Manage the npm configuration files .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1 index cfcea6b98a1414..ff30caa4f06f99 100644 --- a/deps/npm/man/man1/npm-dedupe.1 +++ b/deps/npm/man/man1/npm-dedupe.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DEDUPE" "1" "June 2016" "" "" +.TH "NPM\-DEDUPE" "1" "July 2016" "" "" .SH "NAME" \fBnpm-dedupe\fR \- Reduce duplication .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1 index 6a2844032ecef5..14804f667f2a1f 100644 --- a/deps/npm/man/man1/npm-deprecate.1 +++ b/deps/npm/man/man1/npm-deprecate.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DEPRECATE" "1" "June 2016" "" "" +.TH "NPM\-DEPRECATE" "1" "July 2016" "" "" .SH "NAME" \fBnpm-deprecate\fR \- Deprecate a version of a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1 index 7c8fe79e82abcd..1e76f9ddb90afb 100644 --- a/deps/npm/man/man1/npm-dist-tag.1 +++ b/deps/npm/man/man1/npm-dist-tag.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DIST\-TAG" "1" "June 2016" "" "" +.TH "NPM\-DIST\-TAG" "1" "July 2016" "" "" .SH "NAME" \fBnpm-dist-tag\fR \- Modify package distribution tags .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1 index 0a887f2f9fab79..f48035491d9a71 100644 --- a/deps/npm/man/man1/npm-docs.1 +++ b/deps/npm/man/man1/npm-docs.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DOCS" "1" "June 2016" "" "" +.TH "NPM\-DOCS" "1" "July 2016" "" "" .SH "NAME" \fBnpm-docs\fR \- Docs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1 index 754fec8d725b67..7d021c379bc2ab 100644 --- a/deps/npm/man/man1/npm-edit.1 +++ b/deps/npm/man/man1/npm-edit.1 @@ -1,4 +1,4 @@ -.TH "NPM\-EDIT" "1" "June 2016" "" "" +.TH "NPM\-EDIT" "1" "July 2016" "" "" .SH "NAME" \fBnpm-edit\fR \- Edit an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1 index fc88e338fbe738..c903dbc6c10ec8 100644 --- a/deps/npm/man/man1/npm-explore.1 +++ b/deps/npm/man/man1/npm-explore.1 @@ -1,4 +1,4 @@ -.TH "NPM\-EXPLORE" "1" "June 2016" "" "" +.TH "NPM\-EXPLORE" "1" "July 2016" "" "" .SH "NAME" \fBnpm-explore\fR \- Browse an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1 index 1cf9884a2492a6..5051b9f15f7e38 100644 --- a/deps/npm/man/man1/npm-help-search.1 +++ b/deps/npm/man/man1/npm-help-search.1 @@ -1,4 +1,4 @@ -.TH "NPM\-HELP\-SEARCH" "1" "June 2016" "" "" +.TH "NPM\-HELP\-SEARCH" "1" "July 2016" "" "" .SH "NAME" \fBnpm-help-search\fR \- Search npm help documentation .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1 index 0c100ceebd5995..4f7c51b05552c8 100644 --- a/deps/npm/man/man1/npm-help.1 +++ b/deps/npm/man/man1/npm-help.1 @@ -1,4 +1,4 @@ -.TH "NPM\-HELP" "1" "June 2016" "" "" +.TH "NPM\-HELP" "1" "July 2016" "" "" .SH "NAME" \fBnpm-help\fR \- Get help on npm .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1 index 94955f53957327..5bf262a91cd1d8 100644 --- a/deps/npm/man/man1/npm-init.1 +++ b/deps/npm/man/man1/npm-init.1 @@ -1,4 +1,4 @@ -.TH "NPM\-INIT" "1" "June 2016" "" "" +.TH "NPM\-INIT" "1" "July 2016" "" "" .SH "NAME" \fBnpm-init\fR \- Interactively create a package\.json file .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1 index c50a9ed3c31a8e..00edb05ef5241b 100644 --- a/deps/npm/man/man1/npm-install-test.1 +++ b/deps/npm/man/man1/npm-install-test.1 @@ -1,4 +1,4 @@ -.TH "NPM" "" "June 2016" "" "" +.TH "NPM" "" "July 2016" "" "" .SH "NAME" \fBnpm\fR .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index f416a314bbb24b..abb1cee2cb6cc2 100644 --- a/deps/npm/man/man1/npm-install.1 +++ b/deps/npm/man/man1/npm-install.1 @@ -1,4 +1,4 @@ -.TH "NPM\-INSTALL" "1" "June 2016" "" "" +.TH "NPM\-INSTALL" "1" "July 2016" "" "" .SH "NAME" \fBnpm-install\fR \- Install a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1 index 847f39dd53c668..39ef63626b3337 100644 --- a/deps/npm/man/man1/npm-link.1 +++ b/deps/npm/man/man1/npm-link.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LINK" "1" "June 2016" "" "" +.TH "NPM\-LINK" "1" "July 2016" "" "" .SH "NAME" \fBnpm-link\fR \- Symlink a package folder .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1 index 2cc4416a24509f..58bafbe8a8e93c 100644 --- a/deps/npm/man/man1/npm-logout.1 +++ b/deps/npm/man/man1/npm-logout.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LOGOUT" "1" "June 2016" "" "" +.TH "NPM\-LOGOUT" "1" "July 2016" "" "" .SH "NAME" \fBnpm-logout\fR \- Log out of the registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index 8dc00cbee997c8..b3c4b9ea0ed57c 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LS" "1" "June 2016" "" "" +.TH "NPM\-LS" "1" "July 2016" "" "" .SH "NAME" \fBnpm-ls\fR \- List installed packages .SH SYNOPSIS @@ -22,7 +22,7 @@ For example, running \fBnpm ls promzard\fP in npm's source tree will show: .P .RS 2 .nf -npm@3.9.5 /path/to/npm +npm@3.10.3 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 .fi @@ -117,7 +117,7 @@ Type: String .P When "dev" or "development", is an alias to \fBdev\fP\|\. .P -When "prod" or "production", is an alias to \fBproduction\fP\|\.` +When "prod" or "production", is an alias to \fBproduction\fP\|\. .SH SEE ALSO .RS 0 .IP \(bu 2 diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1 index 85175129d44bd2..4f1a781707fdfc 100644 --- a/deps/npm/man/man1/npm-outdated.1 +++ b/deps/npm/man/man1/npm-outdated.1 @@ -1,4 +1,4 @@ -.TH "NPM\-OUTDATED" "1" "June 2016" "" "" +.TH "NPM\-OUTDATED" "1" "July 2016" "" "" .SH "NAME" \fBnpm-outdated\fR \- Check for outdated packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1 index d5f259ab85aeec..fe78681ef0b19d 100644 --- a/deps/npm/man/man1/npm-owner.1 +++ b/deps/npm/man/man1/npm-owner.1 @@ -1,4 +1,4 @@ -.TH "NPM\-OWNER" "1" "June 2016" "" "" +.TH "NPM\-OWNER" "1" "July 2016" "" "" .SH "NAME" \fBnpm-owner\fR \- Manage package owners .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1 index 494ceb0174fa96..7926b837be1bfc 100644 --- a/deps/npm/man/man1/npm-pack.1 +++ b/deps/npm/man/man1/npm-pack.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PACK" "1" "June 2016" "" "" +.TH "NPM\-PACK" "1" "July 2016" "" "" .SH "NAME" \fBnpm-pack\fR \- Create a tarball from a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-ping.1 b/deps/npm/man/man1/npm-ping.1 index 2d0948ba1ddfbe..737d3589ff5975 100644 --- a/deps/npm/man/man1/npm-ping.1 +++ b/deps/npm/man/man1/npm-ping.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PING" "1" "June 2016" "" "" +.TH "NPM\-PING" "1" "July 2016" "" "" .SH "NAME" \fBnpm-ping\fR \- Ping npm registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1 index 10b3c6ee9f913e..fb11988956d9f4 100644 --- a/deps/npm/man/man1/npm-prefix.1 +++ b/deps/npm/man/man1/npm-prefix.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PREFIX" "1" "June 2016" "" "" +.TH "NPM\-PREFIX" "1" "July 2016" "" "" .SH "NAME" \fBnpm-prefix\fR \- Display prefix .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1 index 19da451f7d268c..b6e3c5afd53cfb 100644 --- a/deps/npm/man/man1/npm-prune.1 +++ b/deps/npm/man/man1/npm-prune.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PRUNE" "1" "June 2016" "" "" +.TH "NPM\-PRUNE" "1" "July 2016" "" "" .SH "NAME" \fBnpm-prune\fR \- Remove extraneous packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1 index cf77289be6a77f..b103bb726e8c75 100644 --- a/deps/npm/man/man1/npm-publish.1 +++ b/deps/npm/man/man1/npm-publish.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PUBLISH" "1" "June 2016" "" "" +.TH "NPM\-PUBLISH" "1" "July 2016" "" "" .SH "NAME" \fBnpm-publish\fR \- Publish a package .SH SYNOPSIS @@ -52,6 +52,10 @@ the specified registry\. Once a package is published with a given name and version, that specific name and version combination can never be used again, even if it is removed with npm help unpublish\. +.P +For a "dry run" that does everything except actually publishing to the +registry, see npm help \fBnpm\-pack\fP, which figures out the files to be included and +packs them into a tarball to be uploaded to the registry\. .SH SEE ALSO .RS 0 .IP \(bu 2 @@ -66,6 +70,8 @@ npm help owner npm help deprecate .IP \(bu 2 npm help tag +.IP \(bu 2 +npm help pack .RE diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1 index 44dd89da924fba..93ae08be090cf7 100644 --- a/deps/npm/man/man1/npm-rebuild.1 +++ b/deps/npm/man/man1/npm-rebuild.1 @@ -1,4 +1,4 @@ -.TH "NPM\-REBUILD" "1" "June 2016" "" "" +.TH "NPM\-REBUILD" "1" "July 2016" "" "" .SH "NAME" \fBnpm-rebuild\fR \- Rebuild a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1 index 6da71e6fd1d261..406e0973290793 100644 --- a/deps/npm/man/man1/npm-repo.1 +++ b/deps/npm/man/man1/npm-repo.1 @@ -1,4 +1,4 @@ -.TH "NPM\-REPO" "1" "June 2016" "" "" +.TH "NPM\-REPO" "1" "July 2016" "" "" .SH "NAME" \fBnpm-repo\fR \- Open package repository page in the browser .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1 index 10e662a15d337a..d47e17f6474f31 100644 --- a/deps/npm/man/man1/npm-restart.1 +++ b/deps/npm/man/man1/npm-restart.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RESTART" "1" "June 2016" "" "" +.TH "NPM\-RESTART" "1" "July 2016" "" "" .SH "NAME" \fBnpm-restart\fR \- Restart a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1 index 9b7d7ba614af7f..27f85d634b2599 100644 --- a/deps/npm/man/man1/npm-root.1 +++ b/deps/npm/man/man1/npm-root.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ROOT" "1" "June 2016" "" "" +.TH "NPM\-ROOT" "1" "July 2016" "" "" .SH "NAME" \fBnpm-root\fR \- Display npm root .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1 index f2f6e5a07417cd..01381138a8e2bd 100644 --- a/deps/npm/man/man1/npm-run-script.1 +++ b/deps/npm/man/man1/npm-run-script.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RUN\-SCRIPT" "1" "June 2016" "" "" +.TH "NPM\-RUN\-SCRIPT" "1" "July 2016" "" "" .SH "NAME" \fBnpm-run-script\fR \- Run arbitrary package scripts .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1 index 62247cc3f3191c..ee9b07cfe014ab 100644 --- a/deps/npm/man/man1/npm-search.1 +++ b/deps/npm/man/man1/npm-search.1 @@ -1,4 +1,4 @@ -.TH "NPM\-SEARCH" "1" "June 2016" "" "" +.TH "NPM\-SEARCH" "1" "July 2016" "" "" .SH "NAME" \fBnpm-search\fR \- Search for packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1 index f00ca28e82f9ba..3242ee6aff2892 100644 --- a/deps/npm/man/man1/npm-shrinkwrap.1 +++ b/deps/npm/man/man1/npm-shrinkwrap.1 @@ -1,4 +1,4 @@ -.TH "NPM\-SHRINKWRAP" "1" "June 2016" "" "" +.TH "NPM\-SHRINKWRAP" "1" "July 2016" "" "" .SH "NAME" \fBnpm-shrinkwrap\fR \- Lock down dependency versions .SH SYNOPSIS @@ -141,6 +141,17 @@ resolution using "version" if one isn't\. .IP 2. 3 The tree is walked and any missing dependencies are installed in the usual fashion\. +.RE +.P +If \fBpreshrinkwrap\fP, \fBshrinkwrap\fP or \fBpostshrinkwrap\fP are in the \fBscripts\fP property of the +\fBpackage\.json\fP, they will be executed by running \fBnpm shrinkwrap\fP\|\. +\fBpreshrinkwrap\fP and \fBshrinkwrap\fP are executed before the shrinkwrap, \fBpostshrinkwrap\fP is +executed afterwards\. For example to run some postprocessing on the generated file: +.P +.RS 2 +.nf +"scripts": { "postshrinkwrap": "node fix\-shrinkwrap\.js" } +.fi .RE .SS Using shrinkwrapped packages .P @@ -216,6 +227,10 @@ contents rather than versions\. .IP \(bu 2 npm help install .IP \(bu 2 +npm help run\-script +.IP \(bu 2 +npm help 7 scripts +.IP \(bu 2 npm help 5 package\.json .IP \(bu 2 npm help ls diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1 index be6dc68d1fcaca..ded49f816ca109 100644 --- a/deps/npm/man/man1/npm-star.1 +++ b/deps/npm/man/man1/npm-star.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STAR" "1" "June 2016" "" "" +.TH "NPM\-STAR" "1" "July 2016" "" "" .SH "NAME" \fBnpm-star\fR \- Mark your favorite packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1 index faef97d2dfa65b..86bcc451c45614 100644 --- a/deps/npm/man/man1/npm-stars.1 +++ b/deps/npm/man/man1/npm-stars.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STARS" "1" "June 2016" "" "" +.TH "NPM\-STARS" "1" "July 2016" "" "" .SH "NAME" \fBnpm-stars\fR \- View packages marked as favorites .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1 index cb09bea2c7e7fb..096c072065f3bb 100644 --- a/deps/npm/man/man1/npm-start.1 +++ b/deps/npm/man/man1/npm-start.1 @@ -1,4 +1,4 @@ -.TH "NPM\-START" "1" "June 2016" "" "" +.TH "NPM\-START" "1" "July 2016" "" "" .SH "NAME" \fBnpm-start\fR \- Start a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1 index 9fa9e8f018154f..b00d2033ce9fc2 100644 --- a/deps/npm/man/man1/npm-stop.1 +++ b/deps/npm/man/man1/npm-stop.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STOP" "1" "June 2016" "" "" +.TH "NPM\-STOP" "1" "July 2016" "" "" .SH "NAME" \fBnpm-stop\fR \- Stop a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-tag.1 b/deps/npm/man/man1/npm-tag.1 index 7c4564d5e5115e..bb94a873fe50fb 100644 --- a/deps/npm/man/man1/npm-tag.1 +++ b/deps/npm/man/man1/npm-tag.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TAG" "1" "June 2016" "" "" +.TH "NPM\-TAG" "1" "July 2016" "" "" .SH "NAME" \fBnpm-tag\fR \- Tag a published version .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1 index 0ec2aaf28a1c3b..b3344ffc59765c 100644 --- a/deps/npm/man/man1/npm-team.1 +++ b/deps/npm/man/man1/npm-team.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TEAM" "1" "June 2016" "" "" +.TH "NPM\-TEAM" "1" "July 2016" "" "" .SH "NAME" \fBnpm-team\fR \- Manage organization teams and team memberships .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1 index 18407f3fdeb354..2635d70ebe7773 100644 --- a/deps/npm/man/man1/npm-test.1 +++ b/deps/npm/man/man1/npm-test.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TEST" "1" "June 2016" "" "" +.TH "NPM\-TEST" "1" "July 2016" "" "" .SH "NAME" \fBnpm-test\fR \- Test a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1 index c248eaef5d98b8..0bb84146302271 100644 --- a/deps/npm/man/man1/npm-uninstall.1 +++ b/deps/npm/man/man1/npm-uninstall.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UNINSTALL" "1" "June 2016" "" "" +.TH "NPM\-UNINSTALL" "1" "July 2016" "" "" .SH "NAME" \fBnpm-uninstall\fR \- Remove a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1 index 1d1a47774ce8d0..159ab628a78d4b 100644 --- a/deps/npm/man/man1/npm-unpublish.1 +++ b/deps/npm/man/man1/npm-unpublish.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UNPUBLISH" "1" "June 2016" "" "" +.TH "NPM\-UNPUBLISH" "1" "July 2016" "" "" .SH "NAME" \fBnpm-unpublish\fR \- Remove a package from the registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1 index 3c2ff59eb5ccb5..9f8a77b3ec495f 100644 --- a/deps/npm/man/man1/npm-update.1 +++ b/deps/npm/man/man1/npm-update.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UPDATE" "1" "June 2016" "" "" +.TH "NPM\-UPDATE" "1" "July 2016" "" "" .SH "NAME" \fBnpm-update\fR \- Update a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1 index 2ddcabd61bc585..7e942b16ea348b 100644 --- a/deps/npm/man/man1/npm-version.1 +++ b/deps/npm/man/man1/npm-version.1 @@ -1,4 +1,4 @@ -.TH "NPM\-VERSION" "1" "June 2016" "" "" +.TH "NPM\-VERSION" "1" "July 2016" "" "" .SH "NAME" \fBnpm-version\fR \- Bump a package version .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1 index a1261bd548acbe..cc25f085a3e97d 100644 --- a/deps/npm/man/man1/npm-view.1 +++ b/deps/npm/man/man1/npm-view.1 @@ -1,4 +1,4 @@ -.TH "NPM\-VIEW" "1" "June 2016" "" "" +.TH "NPM\-VIEW" "1" "July 2016" "" "" .SH "NAME" \fBnpm-view\fR \- View registry info .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1 index 2fe942f8ed76c4..e0cf8bb9a0ed22 100644 --- a/deps/npm/man/man1/npm-whoami.1 +++ b/deps/npm/man/man1/npm-whoami.1 @@ -1,4 +1,4 @@ -.TH "NPM\-WHOAMI" "1" "June 2016" "" "" +.TH "NPM\-WHOAMI" "1" "July 2016" "" "" .SH "NAME" \fBnpm-whoami\fR \- Display npm username .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index cc2a401e45083d..a48effc9ba8a62 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "June 2016" "" "" +.TH "NPM" "1" "July 2016" "" "" .SH "NAME" \fBnpm\fR \- javascript package manager .SH SYNOPSIS @@ -10,7 +10,7 @@ npm [args] .RE .SH VERSION .P -3.9.5 +3.10.3 .SH DESCRIPTION .P npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/man/man5/npm-folders.5 b/deps/npm/man/man5/npm-folders.5 index e5d5002cf2dae6..6a5c69676f89e0 100644 --- a/deps/npm/man/man5/npm-folders.5 +++ b/deps/npm/man/man5/npm-folders.5 @@ -1,4 +1,4 @@ -.TH "NPM\-FOLDERS" "5" "June 2016" "" "" +.TH "NPM\-FOLDERS" "5" "July 2016" "" "" .SH "NAME" \fBnpm-folders\fR \- Folder Structures Used by npm .SH DESCRIPTION diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5 index e5d5002cf2dae6..6a5c69676f89e0 100644 --- a/deps/npm/man/man5/npm-global.5 +++ b/deps/npm/man/man5/npm-global.5 @@ -1,4 +1,4 @@ -.TH "NPM\-FOLDERS" "5" "June 2016" "" "" +.TH "NPM\-FOLDERS" "5" "July 2016" "" "" .SH "NAME" \fBnpm-folders\fR \- Folder Structures Used by npm .SH DESCRIPTION diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5 index 9afbea0c3d78aa..6f9dc9dc467a59 100644 --- a/deps/npm/man/man5/npm-json.5 +++ b/deps/npm/man/man5/npm-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\.JSON" "5" "June 2016" "" "" +.TH "PACKAGE\.JSON" "5" "July 2016" "" "" .SH "NAME" \fBpackage.json\fR \- Specifics of npm's package\.json handling .SH DESCRIPTION @@ -261,6 +261,8 @@ Conversely, some files are always ignored: \fB\|\.npmrc\fP .IP \(bu 2 \fBnode_modules\fP +.IP \(bu 2 +\fBconfig\.gypi\fP .RE .SH main diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5 index f70ee7da749a55..3bcab8e76b1f14 100644 --- a/deps/npm/man/man5/npmrc.5 +++ b/deps/npm/man/man5/npmrc.5 @@ -1,4 +1,4 @@ -.TH "NPMRC" "5" "June 2016" "" "" +.TH "NPMRC" "5" "July 2016" "" "" .SH "NAME" \fBnpmrc\fR \- The npm config files .SH DESCRIPTION diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5 index 9afbea0c3d78aa..6f9dc9dc467a59 100644 --- a/deps/npm/man/man5/package.json.5 +++ b/deps/npm/man/man5/package.json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\.JSON" "5" "June 2016" "" "" +.TH "PACKAGE\.JSON" "5" "July 2016" "" "" .SH "NAME" \fBpackage.json\fR \- Specifics of npm's package\.json handling .SH DESCRIPTION @@ -261,6 +261,8 @@ Conversely, some files are always ignored: \fB\|\.npmrc\fP .IP \(bu 2 \fBnode_modules\fP +.IP \(bu 2 +\fBconfig\.gypi\fP .RE .SH main diff --git a/deps/npm/man/man7/npm-coding-style.7 b/deps/npm/man/man7/npm-coding-style.7 index 7fd20b52975e01..14cb636613aa0a 100644 --- a/deps/npm/man/man7/npm-coding-style.7 +++ b/deps/npm/man/man7/npm-coding-style.7 @@ -1,4 +1,4 @@ -.TH "NPM\-CODING\-STYLE" "7" "June 2016" "" "" +.TH "NPM\-CODING\-STYLE" "7" "July 2016" "" "" .SH "NAME" \fBnpm-coding-style\fR \- npm's "funny" coding style .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-config.7 b/deps/npm/man/man7/npm-config.7 index 6153cd4e168442..3c6246659bef55 100644 --- a/deps/npm/man/man7/npm-config.7 +++ b/deps/npm/man/man7/npm-config.7 @@ -1,4 +1,4 @@ -.TH "NPM\-CONFIG" "7" "June 2016" "" "" +.TH "NPM\-CONFIG" "7" "July 2016" "" "" .SH "NAME" \fBnpm-config\fR \- More than you probably want to know about npm configuration .SH DESCRIPTION @@ -936,7 +936,7 @@ Set the NODE_ENV="production" for lifecycle scripts\. .SS progress .RS 0 .IP \(bu 2 -Default: true +Default: true, unless TRAVIS or CI env vars set\. .IP \(bu 2 Type: Boolean diff --git a/deps/npm/man/man7/npm-developers.7 b/deps/npm/man/man7/npm-developers.7 index de6895f69a9056..8d95928286de5e 100644 --- a/deps/npm/man/man7/npm-developers.7 +++ b/deps/npm/man/man7/npm-developers.7 @@ -1,4 +1,4 @@ -.TH "NPM\-DEVELOPERS" "7" "June 2016" "" "" +.TH "NPM\-DEVELOPERS" "7" "July 2016" "" "" .SH "NAME" \fBnpm-developers\fR \- Developer Guide .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-disputes.7 b/deps/npm/man/man7/npm-disputes.7 index 4f6c315be015f6..b8d8f854759141 100644 --- a/deps/npm/man/man7/npm-disputes.7 +++ b/deps/npm/man/man7/npm-disputes.7 @@ -1,4 +1,4 @@ -.TH "NPM\-DISPUTES" "7" "June 2016" "" "" +.TH "NPM\-DISPUTES" "7" "July 2016" "" "" .SH "NAME" \fBnpm-disputes\fR \- Handling Module Name Disputes .SH SYNOPSIS diff --git a/deps/npm/man/man7/npm-index.7 b/deps/npm/man/man7/npm-index.7 index 778666b9517205..b6790ccb32486a 100644 --- a/deps/npm/man/man7/npm-index.7 +++ b/deps/npm/man/man7/npm-index.7 @@ -1,4 +1,4 @@ -.TH "NPM\-INDEX" "7" "June 2016" "" "" +.TH "NPM\-INDEX" "7" "July 2016" "" "" .SH "NAME" \fBnpm-index\fR \- Index of all npm documentation .SS npm help README diff --git a/deps/npm/man/man7/npm-orgs.7 b/deps/npm/man/man7/npm-orgs.7 index 2961014fb88699..bbea89569d1cf3 100644 --- a/deps/npm/man/man7/npm-orgs.7 +++ b/deps/npm/man/man7/npm-orgs.7 @@ -1,4 +1,4 @@ -.TH "NPM\-ORGS" "7" "June 2016" "" "" +.TH "NPM\-ORGS" "7" "July 2016" "" "" .SH "NAME" \fBnpm-orgs\fR \- Working with Teams & Orgs .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-registry.7 b/deps/npm/man/man7/npm-registry.7 index 743710179f6ed4..62b7d770098148 100644 --- a/deps/npm/man/man7/npm-registry.7 +++ b/deps/npm/man/man7/npm-registry.7 @@ -1,4 +1,4 @@ -.TH "NPM\-REGISTRY" "7" "June 2016" "" "" +.TH "NPM\-REGISTRY" "7" "July 2016" "" "" .SH "NAME" \fBnpm-registry\fR \- The JavaScript Package Registry .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-scope.7 b/deps/npm/man/man7/npm-scope.7 index 0adc8bd29b5bc3..9533637b5254c4 100644 --- a/deps/npm/man/man7/npm-scope.7 +++ b/deps/npm/man/man7/npm-scope.7 @@ -1,4 +1,4 @@ -.TH "NPM\-SCOPE" "7" "June 2016" "" "" +.TH "NPM\-SCOPE" "7" "July 2016" "" "" .SH "NAME" \fBnpm-scope\fR \- Scoped packages .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-scripts.7 b/deps/npm/man/man7/npm-scripts.7 index 4e382cd98b53a1..4190fc08b3c225 100644 --- a/deps/npm/man/man7/npm-scripts.7 +++ b/deps/npm/man/man7/npm-scripts.7 @@ -1,4 +1,4 @@ -.TH "NPM\-SCRIPTS" "7" "June 2016" "" "" +.TH "NPM\-SCRIPTS" "7" "July 2016" "" "" .SH "NAME" \fBnpm-scripts\fR \- How npm handles the "scripts" field .SH DESCRIPTION @@ -44,13 +44,18 @@ Run by the \fBnpm start\fP command\. prerestart, restart, postrestart: Run by the \fBnpm restart\fP command\. Note: \fBnpm restart\fP will run the stop and start scripts if no \fBrestart\fP script is provided\. +.IP \(bu 2 +preshrinkwrap, shrinkwrap, postshrinkwrap: +Run by the \fBnpm shrinkwrap\fP command\. .RE .P Additionally, arbitrary scripts can be executed by running \fBnpm run\-script \fP\|\. \fIPre\fR and \fIpost\fR commands with matching names will be run for those as well (e\.g\. \fBpremyscript\fP, \fBmyscript\fP, -\fBpostmyscript\fP)\. +\fBpostmyscript\fP)\. Scripts from dependencies can be run with `npm explore +.P + \-\- npm run `\. .SH COMMON USES .P If you need to perform operations on your package before it is used, in a way diff --git a/deps/npm/man/man7/removing-npm.7 b/deps/npm/man/man7/removing-npm.7 index 0df248fbc08320..9cfaae2aac45fa 100644 --- a/deps/npm/man/man7/removing-npm.7 +++ b/deps/npm/man/man7/removing-npm.7 @@ -1,4 +1,4 @@ -.TH "NPM\-REMOVAL" "1" "June 2016" "" "" +.TH "NPM\-REMOVAL" "1" "July 2016" "" "" .SH "NAME" \fBnpm-removal\fR \- Cleaning the Slate .SH SYNOPSIS diff --git a/deps/npm/man/man7/semver.7 b/deps/npm/man/man7/semver.7 index 8705628acaa67d..dd46a2e314750d 100644 --- a/deps/npm/man/man7/semver.7 +++ b/deps/npm/man/man7/semver.7 @@ -1,4 +1,4 @@ -.TH "SEMVER" "7" "June 2016" "" "" +.TH "SEMVER" "7" "July 2016" "" "" .SH "NAME" \fBsemver\fR \- The semantic versioner for npm .SH Usage diff --git a/deps/npm/node_modules/abbrev/.travis.yml b/deps/npm/node_modules/abbrev/.travis.yml deleted file mode 100644 index 991d04b6e2272b..00000000000000 --- a/deps/npm/node_modules/abbrev/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - '0.10' - - '0.12' - - 'iojs' diff --git a/deps/npm/node_modules/abbrev/CONTRIBUTING.md b/deps/npm/node_modules/abbrev/CONTRIBUTING.md deleted file mode 100644 index 2f302612f81630..00000000000000 --- a/deps/npm/node_modules/abbrev/CONTRIBUTING.md +++ /dev/null @@ -1,3 +0,0 @@ - To get started, sign the - Contributor License Agreement. diff --git a/deps/npm/node_modules/abbrev/package.json b/deps/npm/node_modules/abbrev/package.json index d3e3a661edcd3c..17ac1cad3239fb 100644 --- a/deps/npm/node_modules/abbrev/package.json +++ b/deps/npm/node_modules/abbrev/package.json @@ -1,31 +1,91 @@ { - "name": "abbrev", - "version": "1.0.7", - "description": "Like ruby's abbrev module, but in js", + "_args": [ + [ + { + "raw": "abbrev@1.0.9", + "scope": null, + "name": "abbrev", + "rawSpec": "1.0.9", + "spec": "1.0.9", + "type": "version" + }, + "/Users/rebecca/code/npm" + ] + ], + "_from": "abbrev@1.0.9", + "_id": "abbrev@1.0.9", + "_inCache": true, + "_installable": true, + "_location": "/abbrev", + "_nodeVersion": "4.4.4", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/abbrev-1.0.9.tgz_1466016055839_0.7825860097073019" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.9.1", + "_phantomChildren": {}, + "_requested": { + "raw": "abbrev@1.0.9", + "scope": null, + "name": "abbrev", + "rawSpec": "1.0.9", + "spec": "1.0.9", + "type": "version" + }, + "_requiredBy": [ + "#USER", + "/", + "/nopt", + "/tap/nyc/istanbul" + ], + "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "_shasum": "91b4792588a7738c25f35dd6f63752a2f8776135", + "_shrinkwrap": null, + "_spec": "abbrev@1.0.9", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me" }, - "main": "abbrev.js", - "scripts": { - "test": "tap test.js --cov" + "bugs": { + "url": "https://github.com/isaacs/abbrev-js/issues" + }, + "dependencies": {}, + "description": "Like ruby's abbrev module, but in js", + "devDependencies": { + "tap": "^5.7.2" }, + "directories": {}, + "dist": { + "shasum": "91b4792588a7738c25f35dd6f63752a2f8776135", + "tarball": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz" + }, + "files": [ + "abbrev.js" + ], + "gitHead": "c386cd9dbb1d8d7581718c54d4ba944cc9298d6f", + "homepage": "https://github.com/isaacs/abbrev-js#readme", + "license": "ISC", + "main": "abbrev.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "abbrev", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git+ssh://git@github.com/isaacs/abbrev-js.git" }, - "license": "ISC", - "devDependencies": { - "tap": "^1.2.0" - }, - "readme": "# abbrev-js\n\nJust like [ruby's Abbrev](http://apidock.com/ruby/Abbrev).\n\nUsage:\n\n var abbrev = require(\"abbrev\");\n abbrev(\"foo\", \"fool\", \"folding\", \"flop\");\n \n // returns:\n { fl: 'flop'\n , flo: 'flop'\n , flop: 'flop'\n , fol: 'folding'\n , fold: 'folding'\n , foldi: 'folding'\n , foldin: 'folding'\n , folding: 'folding'\n , foo: 'foo'\n , fool: 'fool'\n }\n\nThis is handy for command-line scripts, or other cases where you want to be able to accept shorthands.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/abbrev-js/issues" + "scripts": { + "test": "tap test.js --cov" }, - "homepage": "https://github.com/isaacs/abbrev-js#readme", - "_id": "abbrev@1.0.7", - "_shasum": "5b6035b2ee9d4fb5cf859f08a9be81b208491843", - "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz", - "_from": "abbrev@>=1.0.7 <1.1.0" + "version": "1.0.9" } diff --git a/deps/npm/node_modules/abbrev/test.js b/deps/npm/node_modules/abbrev/test.js deleted file mode 100644 index eb30e421cb9836..00000000000000 --- a/deps/npm/node_modules/abbrev/test.js +++ /dev/null @@ -1,47 +0,0 @@ -var abbrev = require('./abbrev.js') -var assert = require("assert") -var util = require("util") - -console.log("TAP version 13") -var count = 0 - -function test (list, expect) { - count++ - var actual = abbrev(list) - assert.deepEqual(actual, expect, - "abbrev("+util.inspect(list)+") === " + util.inspect(expect) + "\n"+ - "actual: "+util.inspect(actual)) - actual = abbrev.apply(exports, list) - assert.deepEqual(abbrev.apply(exports, list), expect, - "abbrev("+list.map(JSON.stringify).join(",")+") === " + util.inspect(expect) + "\n"+ - "actual: "+util.inspect(actual)) - console.log('ok - ' + list.join(' ')) -} - -test([ "ruby", "ruby", "rules", "rules", "rules" ], -{ rub: 'ruby' -, ruby: 'ruby' -, rul: 'rules' -, rule: 'rules' -, rules: 'rules' -}) -test(["fool", "foom", "pool", "pope"], -{ fool: 'fool' -, foom: 'foom' -, poo: 'pool' -, pool: 'pool' -, pop: 'pope' -, pope: 'pope' -}) -test(["a", "ab", "abc", "abcd", "abcde", "acde"], -{ a: 'a' -, ab: 'ab' -, abc: 'abc' -, abcd: 'abcd' -, abcde: 'abcde' -, ac: 'acde' -, acd: 'acde' -, acde: 'acde' -}) - -console.log("1..%d", count) diff --git a/deps/npm/node_modules/aproba/.npmignore b/deps/npm/node_modules/aproba/.npmignore deleted file mode 100644 index 24001896d6d0c9..00000000000000 --- a/deps/npm/node_modules/aproba/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -*~ -node_modules -.#* diff --git a/deps/npm/node_modules/aproba/README.md b/deps/npm/node_modules/aproba/README.md index 44e2263c2fa2d4..69e356eb6ab9fb 100644 --- a/deps/npm/node_modules/aproba/README.md +++ b/deps/npm/node_modules/aproba/README.md @@ -1,7 +1,7 @@ aproba ====== -A rediculously light-weight function argument validator +A ridiculously light-weight function argument validator ``` var validate = require("aproba") @@ -34,7 +34,11 @@ E | instanceof Error OR null Validation failures throw one of three exception types, distinguished by a `code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`. -If an error argument is found and is not null then the remaining arguments will not be validated. +If you pass in an invalid type then it will throw with a code of +`EUNKNOWNTYPE`. + +If an error argument is found and is not null then the remaining arguments +will not be validated. ### Why this exists diff --git a/deps/npm/node_modules/aproba/index.js b/deps/npm/node_modules/aproba/index.js index 6d1c17ece92d78..bb5ac3cda6d3e2 100644 --- a/deps/npm/node_modules/aproba/index.js +++ b/deps/npm/node_modules/aproba/index.js @@ -1,8 +1,12 @@ 'use strict' +function isArguments (thingy) { + return typeof thingy === 'object' && thingy.hasOwnProperty('callee') +} + var types = { '*': ['any', function () { return true }], - A: ['array', function (thingy) { return (Array.isArray && Array.isArray(thingy)) || (typeof thingy === 'object' && thingy.hasOwnProperty('callee')) }], + A: ['array', function (thingy) { return Array.isArray(thingy) || isArguments(thingy) }], S: ['string', function (thingy) { return typeof thingy === 'string' }], N: ['number', function (thingy) { return typeof thingy === 'number' }], F: ['function', function (thingy) { return typeof thingy === 'function' }], diff --git a/deps/npm/node_modules/aproba/package.json b/deps/npm/node_modules/aproba/package.json index 56452c406752e9..b5e08a31c11f9c 100644 --- a/deps/npm/node_modules/aproba/package.json +++ b/deps/npm/node_modules/aproba/package.json @@ -2,51 +2,55 @@ "_args": [ [ { - "name": "aproba", - "raw": "aproba@latest", - "rawSpec": "latest", + "raw": "aproba@~1.0.3", "scope": null, - "spec": "latest", - "type": "tag" + "escapedName": "aproba", + "name": "aproba", + "rawSpec": "~1.0.3", + "spec": ">=1.0.3 <1.1.0", + "type": "range" }, - "/Users/zkat/Documents/code/npm" + "/Users/rebecca/code/npm" ] ], - "_from": "aproba@latest", - "_id": "aproba@1.0.3", + "_from": "aproba@>=1.0.3 <1.1.0", + "_id": "aproba@1.0.4", "_inCache": true, "_installable": true, "_location": "/aproba", "_nodeVersion": "4.4.0", "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/aproba-1.0.3.tgz_1463784729571_0.7574592484161258" + "tmp": "tmp/aproba-1.0.4.tgz_1466718885402_0.5348939662799239" }, "_npmUser": { - "email": "me@re-becca.org", - "name": "iarna" + "name": "iarna", + "email": "me@re-becca.org" }, - "_npmVersion": "3.9.2", + "_npmVersion": "3.10.2", "_phantomChildren": {}, "_requested": { - "name": "aproba", - "raw": "aproba@latest", - "rawSpec": "latest", + "raw": "aproba@~1.0.3", "scope": null, - "spec": "latest", - "type": "tag" + "escapedName": "aproba", + "name": "aproba", + "rawSpec": "~1.0.3", + "spec": ">=1.0.3 <1.1.0", + "type": "range" }, "_requiredBy": [ - "/" + "#USER", + "/", + "/npmlog/gauge" ], - "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.0.3.tgz", - "_shasum": "7fb6da3a72c70249db63fd9b5c64b31af718a94f", + "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.0.4.tgz", + "_shasum": "2713680775e7614c8ba186c065d4e2e52d1072c0", "_shrinkwrap": null, - "_spec": "aproba@latest", - "_where": "/Users/zkat/Documents/code/npm", + "_spec": "aproba@~1.0.3", + "_where": "/Users/rebecca/code/npm", "author": { - "email": "me@re-becca.org", - "name": "Rebecca Turner" + "name": "Rebecca Turner", + "email": "me@re-becca.org" }, "bugs": { "url": "https://github.com/iarna/aproba/issues" @@ -54,17 +58,20 @@ "dependencies": {}, "description": "A rediculously light-weight argument validator", "devDependencies": { - "standard": "^7.1.0", - "tap": "^5.7.1" + "standard": "^7.1.2", + "tap": "^5.7.3" }, "directories": { "test": "test" }, "dist": { - "shasum": "7fb6da3a72c70249db63fd9b5c64b31af718a94f", - "tarball": "https://registry.npmjs.org/aproba/-/aproba-1.0.3.tgz" + "shasum": "2713680775e7614c8ba186c065d4e2e52d1072c0", + "tarball": "https://registry.npmjs.org/aproba/-/aproba-1.0.4.tgz" }, - "gitHead": "20cc4fc6589bbf870c3ca7bb8b9cb203af9d96a5", + "files": [ + "index.js" + ], + "gitHead": "c6c8f82d519b9ec3816f20f23a9101083c022200", "homepage": "https://github.com/iarna/aproba", "keywords": [ "argument", @@ -74,8 +81,8 @@ "main": "index.js", "maintainers": [ { - "email": "me@re-becca.org", - "name": "iarna" + "name": "iarna", + "email": "me@re-becca.org" } ], "name": "aproba", @@ -88,5 +95,5 @@ "scripts": { "test": "standard && tap test/*.js" }, - "version": "1.0.3" + "version": "1.0.4" } diff --git a/deps/npm/node_modules/aproba/test/index.js b/deps/npm/node_modules/aproba/test/index.js deleted file mode 100644 index b96fd4216e19b5..00000000000000 --- a/deps/npm/node_modules/aproba/test/index.js +++ /dev/null @@ -1,87 +0,0 @@ -'use strict' -var test = require('tap').test -var validate = require('../index.js') - -function thrown (t, code, msg, todo) { - validate('OSSF', arguments) - try { - todo() - t.fail(msg) - } catch (e) { - t.is(e.code, code, msg + e.message) - } -} - -function notThrown (t, msg, todo) { - validate('OSF', arguments) - try { - todo() - t.pass(msg) - } catch (e) { - t.fail(msg + '\n' + e.stack) - } -} - -test('general', function (t) { - t.plan(70) - var values = { - 'A': [], - 'S': 'test', - 'N': 123, - 'F': function () {}, - 'O': {}, - 'B': false, - 'E': new Error() - } - Object.keys(values).forEach(function (type) { - Object.keys(values).forEach(function (contraType) { - if (type === contraType) { - notThrown(t, type + ' matches ' + contraType, function () { - validate(type, [values[contraType]]) - }) - } else { - thrown(t, 'EINVALIDTYPE', type + ' does not match ' + contraType, function () { - validate(type, [values[contraType]]) - }) - } - }) - if (type === 'E') { - notThrown(t, 'null is ok for E', function () { - validate(type, [null]) - }) - } else { - thrown(t, 'EMISSINGARG', 'null not ok for ' + type, function () { - validate(type, [null]) - }) - } - }) - Object.keys(values).forEach(function (contraType) { - notThrown(t, '* matches ' + contraType, function () { - validate('*', [values[contraType]]) - }) - }) - thrown(t, 'EMISSINGARG', 'not enough args', function () { - validate('SNF', ['abc', 123]) - }) - thrown(t, 'ETOOMANYARGS', 'too many args', function () { - validate('SNF', ['abc', 123, function () {}, true]) - }) - notThrown(t, 'E matches null', function () { - validate('E', [null]) - }) - notThrown(t, 'E matches undefined', function () { - validate('E', [undefined]) - }) - notThrown(t, 'E w/ error requires nothing else', function () { - validate('ESN', [new Error(), 'foo']) - }) - thrown(t, 'EMISSINGARG', 'E w/o error works as usual', function () { - validate('ESN', [null, 'foo']) - }) - try { - validate('O', [[]]) - t.fail('object != array') - } catch (ex) { - t.match(ex.message, /Expected object but got array/, 'When reporting non-objects, uses aproba types') - } -}) diff --git a/deps/npm/node_modules/dezalgo/node_modules/asap/CHANGES.md b/deps/npm/node_modules/asap/CHANGES.md similarity index 100% rename from deps/npm/node_modules/dezalgo/node_modules/asap/CHANGES.md rename to deps/npm/node_modules/asap/CHANGES.md diff --git a/deps/npm/node_modules/dezalgo/node_modules/asap/LICENSE.md b/deps/npm/node_modules/asap/LICENSE.md similarity index 100% rename from deps/npm/node_modules/dezalgo/node_modules/asap/LICENSE.md rename to deps/npm/node_modules/asap/LICENSE.md diff --git a/deps/npm/node_modules/dezalgo/node_modules/asap/README.md b/deps/npm/node_modules/asap/README.md similarity index 100% rename from deps/npm/node_modules/dezalgo/node_modules/asap/README.md rename to deps/npm/node_modules/asap/README.md diff --git a/deps/npm/node_modules/dezalgo/node_modules/asap/asap.js b/deps/npm/node_modules/asap/asap.js similarity index 100% rename from deps/npm/node_modules/dezalgo/node_modules/asap/asap.js rename to deps/npm/node_modules/asap/asap.js diff --git a/deps/npm/node_modules/dezalgo/node_modules/asap/browser-asap.js b/deps/npm/node_modules/asap/browser-asap.js similarity index 100% rename from deps/npm/node_modules/dezalgo/node_modules/asap/browser-asap.js rename to deps/npm/node_modules/asap/browser-asap.js diff --git a/deps/npm/node_modules/dezalgo/node_modules/asap/browser-raw.js b/deps/npm/node_modules/asap/browser-raw.js similarity index 100% rename from deps/npm/node_modules/dezalgo/node_modules/asap/browser-raw.js rename to deps/npm/node_modules/asap/browser-raw.js diff --git a/deps/npm/node_modules/asap/package.json b/deps/npm/node_modules/asap/package.json new file mode 100644 index 00000000000000..9e796295d75c99 --- /dev/null +++ b/deps/npm/node_modules/asap/package.json @@ -0,0 +1,123 @@ +{ + "_args": [ + [ + { + "name": "asap", + "raw": "asap", + "rawSpec": "", + "scope": null, + "spec": "latest", + "type": "tag" + }, + "/Users/aleksey/npm" + ] + ], + "_from": "asap@latest", + "_id": "asap@2.0.4", + "_inCache": true, + "_installable": true, + "_location": "/asap", + "_nodeVersion": "0.10.32", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/asap-2.0.4.tgz_1463764720924_0.3805790115147829" + }, + "_npmUser": { + "email": "kris.kowal@cixar.com", + "name": "kriskowal" + }, + "_npmVersion": "2.14.7", + "_phantomChildren": {}, + "_requested": { + "name": "asap", + "raw": "asap", + "rawSpec": "", + "scope": null, + "spec": "latest", + "type": "tag" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://unpm.uberinternal.com/asap/-/asap-2.0.4.tgz", + "_shasum": "b391bf7f6bfbc65706022fec8f49c4b07fecf589", + "_shrinkwrap": null, + "_spec": "asap", + "_where": "/Users/aleksey/npm", + "browser": { + "./asap": "./browser-asap.js", + "./asap.js": "./browser-asap.js", + "./raw": "./browser-raw.js", + "./raw.js": "./browser-raw.js", + "./test/domain.js": "./test/browser-domain.js" + }, + "bugs": { + "url": "https://github.com/kriskowal/asap/issues" + }, + "dependencies": {}, + "description": "High-priority task queue for Node.js and browsers", + "devDependencies": { + "benchmark": "^1.0.0", + "events": "^1.0.1", + "jshint": "^2.5.1", + "knox": "^0.8.10", + "mr": "^2.0.5", + "opener": "^1.3.0", + "q": "^2.0.3", + "q-io": "^2.0.3", + "saucelabs": "^0.1.1", + "wd": "^0.2.21", + "weak-map": "^1.0.5" + }, + "directories": {}, + "dist": { + "shasum": "b391bf7f6bfbc65706022fec8f49c4b07fecf589", + "tarball": "https://unpm.uberinternal.com/asap/-/asap-2.0.4.tgz" + }, + "files": [ + "raw.js", + "asap.js", + "browser-raw.js", + "browser-asap.js" + ], + "gitHead": "26e815dafed7bc112924bf7a6be0d997abf1b407", + "homepage": "https://github.com/kriskowal/asap#readme", + "keywords": [ + "event", + "task", + "queue" + ], + "license": "MIT", + "main": "./asap.js", + "maintainers": [ + { + "email": "kris.kowal@cixar.com", + "name": "kriskowal" + }, + { + "email": "forbes@lindesay.co.uk", + "name": "forbeslindesay" + } + ], + "name": "asap", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/kriskowal/asap.git" + }, + "scripts": { + "benchmarks": "node benchmarks", + "lint": "jshint raw.js asap.js browser-raw.js browser-asap.js $(find scripts -name '*.js' | grep -v gauntlet)", + "test": "npm run lint && npm run test-node", + "test-browser": "node scripts/publish-bundle.js test/asap-test.js | xargs opener", + "test-node": "node test/asap-test.js", + "test-publish": "node scripts/publish-bundle.js test/asap-test.js | pbcopy", + "test-saucelabs": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-spot-configurations.json", + "test-saucelabs-all": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-all-configurations.json", + "test-saucelabs-worker": "node scripts/saucelabs-worker-test.js scripts/saucelabs-spot-configurations.json", + "test-saucelabs-worker-all": "node scripts/saucelabs-worker-test.js scripts/saucelabs-all-configurations.json", + "test-travis": "npm run lint && npm run test-node && npm run test-saucelabs && npm run test-saucelabs-worker" + }, + "version": "2.0.4" +} diff --git a/deps/npm/node_modules/dezalgo/node_modules/asap/raw.js b/deps/npm/node_modules/asap/raw.js similarity index 100% rename from deps/npm/node_modules/dezalgo/node_modules/asap/raw.js rename to deps/npm/node_modules/asap/raw.js diff --git a/deps/npm/node_modules/dezalgo/node_modules/asap/package.json b/deps/npm/node_modules/dezalgo/node_modules/asap/package.json deleted file mode 100644 index ba54d711f849cd..00000000000000 --- a/deps/npm/node_modules/dezalgo/node_modules/asap/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "asap", - "version": "2.0.3", - "description": "High-priority task queue for Node.js and browsers", - "keywords": [ - "event", - "task", - "queue" - ], - "license": { - "type": "MIT", - "url": "https://github.com/kriskowal/asap/raw/master/LICENSE.md" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/kriskowal/asap.git" - }, - "main": "./asap.js", - "browser": { - "./asap.js": "./browser-asap.js", - "./raw.js": "./browser-raw.js", - "./test/domain.js": "./test/browser-domain.js" - }, - "files": [ - "raw.js", - "asap.js", - "browser-raw.js", - "browser-asap.js" - ], - "scripts": { - "test": "npm run lint && npm run test-node", - "test-travis": "npm run lint && npm run test-node && npm run test-saucelabs && npm run test-saucelabs-worker", - "test-node": "node test/asap-test.js", - "test-publish": "node scripts/publish-bundle.js test/asap-test.js | pbcopy", - "test-browser": "node scripts/publish-bundle.js test/asap-test.js | xargs opener", - "test-saucelabs": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-spot-configurations.json", - "test-saucelabs-all": "node scripts/saucelabs.js test/asap-test.js scripts/saucelabs-all-configurations.json", - "test-saucelabs-worker": "node scripts/saucelabs-worker-test.js scripts/saucelabs-spot-configurations.json", - "test-saucelabs-worker-all": "node scripts/saucelabs-worker-test.js scripts/saucelabs-all-configurations.json", - "lint": "jshint raw.js asap.js browser-raw.js browser-asap.js $(find scripts -name '*.js' | grep -v gauntlet)" - }, - "devDependencies": { - "events": "^1.0.1", - "jshint": "^2.5.1", - "knox": "^0.8.10", - "mr": "^2.0.5", - "opener": "^1.3.0", - "q": "^2.0.3", - "q-io": "^2.0.3", - "saucelabs": "^0.1.1", - "wd": "^0.2.21", - "weak-map": "^1.0.5" - }, - "readme": "# ASAP\n\n[![Build Status](https://travis-ci.org/kriskowal/asap.png?branch=master)](https://travis-ci.org/kriskowal/asap)\n\nPromise and asynchronous observer libraries, as well as hand-rolled callback\nprograms and libraries, often need a mechanism to postpone the execution of a\ncallback until the next available event.\n(See [Designing API’s for Asynchrony][Zalgo].)\nThe `asap` function executes a task **as soon as possible** but not before it\nreturns, waiting only for the completion of the current event and previously\nscheduled tasks.\n\n```javascript\nasap(function () {\n // ...\n});\n```\n\n[Zalgo]: http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony\n\nThis CommonJS package provides an `asap` module that exports a function that\nexecutes a task function *as soon as possible*.\n\nASAP strives to schedule events to occur before yielding for IO, reflow,\nor redrawing.\nEach event receives an independent stack, with only platform code in parent\nframes and the events run in the order they are scheduled.\n\nASAP provides a fast event queue that will execute tasks until it is\nempty before yielding to the JavaScript engine's underlying event-loop.\nWhen a task gets added to a previously empty event queue, ASAP schedules a flush\nevent, preferring for that event to occur before the JavaScript engine has an\nopportunity to perform IO tasks or rendering, thus making the first task and\nsubsequent tasks semantically indistinguishable.\nASAP uses a variety of techniques to preserve this invariant on different\nversions of browsers and Node.js.\n\nBy design, ASAP prevents input events from being handled until the task\nqueue is empty.\nIf the process is busy enough, this may cause incoming connection requests to be\ndropped, and may cause existing connections to inform the sender to reduce the\ntransmission rate or stall.\nASAP allows this on the theory that, if there is enough work to do, there is no\nsense in looking for trouble.\nAs a consequence, ASAP can interfere with smooth animation.\nIf your task should be tied to the rendering loop, consider using\n`requestAnimationFrame` instead.\nA long sequence of tasks can also effect the long running script dialog.\nIf this is a problem, you may be able to use ASAP’s cousin `setImmediate` to\nbreak long processes into shorter intervals and periodically allow the browser\nto breathe.\n`setImmediate` will yield for IO, reflow, and repaint events.\nIt also returns a handler and can be canceled.\nFor a `setImmediate` shim, consider [YuzuJS setImmediate][setImmediate].\n\n[setImmediate]: https://github.com/YuzuJS/setImmediate\n\nTake care.\nASAP can sustain infinite recursive calls without warning.\nIt will not halt from a stack overflow, and it will not consume unbounded\nmemory.\nThis is behaviorally equivalent to an infinite loop.\nJust as with infinite loops, you can monitor a Node.js process for this behavior\nwith a heart-beat signal.\nAs with infinite loops, a very small amount of caution goes a long way to\navoiding problems.\n\n```javascript\nfunction loop() {\n asap(loop);\n}\nloop();\n```\n\nIn browsers, if a task throws an exception, it will not interrupt the flushing\nof high-priority tasks.\nThe exception will be postponed to a later, low-priority event to avoid\nslow-downs.\nIn Node.js, if a task throws an exception, ASAP will resume flushing only if—and\nonly after—the error is handled by `domain.on(\"error\")` or\n`process.on(\"uncaughtException\")`.\n\n## Raw ASAP\n\nChecking for exceptions comes at a cost.\nThe package also provides an `asap/raw` module that exports the underlying\nimplementation which is faster but stalls if a task throws an exception.\nThis internal version of the ASAP function does not check for errors.\nIf a task does throw an error, it will stall the event queue unless you manually\ncall `rawAsap.requestFlush()` before throwing the error, or any time after.\n\nIn Node.js, `asap/raw` also runs all tasks outside any domain.\nIf you need a task to be bound to your domain, you will have to do it manually.\n\n```js\nif (process.domain) {\n task = process.domain.bind(task);\n}\nrawAsap(task);\n```\n\n## Tasks\n\nA task may be any object that implements `call()`.\nA function will suffice, but closures tend not to be reusable and can cause\ngarbage collector churn.\nBoth `asap` and `rawAsap` accept task objects to give you the option of\nrecycling task objects or using higher callable object abstractions.\nSee the `asap` source for an illustration.\n\n\n## Compatibility\n\nASAP is tested on Node.js v0.10 and in a broad spectrum of web browsers.\nThe following charts capture the browser test results for the most recent\nrelease.\nThe first chart shows test results for ASAP running in the main window context.\nThe second chart shows test results for ASAP running in a web worker context.\nTest results are inconclusive (grey) on browsers that do not support web\nworkers.\nThese data are captured automatically by [Continuous\nIntegration][].\n\n[Continuous Integration]: https://github.com/kriskowal/asap/blob/master/CONTRIBUTING.md\n\n![Browser Compatibility](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-results-matrix.svg)\n\n![Compatibility in Web Workers](http://kriskowal-asap.s3-website-us-west-2.amazonaws.com/train/integration-2/saucelabs-worker-results-matrix.svg)\n\n## Caveats\n\nWhen a task is added to an empty event queue, it is not always possible to\nguarantee that the task queue will begin flushing immediately after the current\nevent.\nHowever, once the task queue begins flushing, it will not yield until the queue\nis empty, even if the queue grows while executing tasks.\n\nThe following browsers allow the use of [DOM mutation observers][] to access\nthe HTML [microtask queue][], and thus begin flushing ASAP's task queue\nimmediately at the end of the current event loop turn, before any rendering or\nIO:\n\n[microtask queue]: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#microtask-queue\n[DOM mutation observers]: http://dom.spec.whatwg.org/#mutation-observers\n\n- Android 4–4.3\n- Chrome 26–34\n- Firefox 14–29\n- Internet Explorer 11\n- iPad Safari 6–7.1\n- iPhone Safari 7–7.1\n- Safari 6–7\n\nIn the absense of mutation observers, there are a few browsers, and situations\nlike web workers in some of the above browsers, where [message channels][]\nwould be a useful way to avoid falling back to timers.\nMessage channels give direct access to the HTML [task queue][], so the ASAP\ntask queue would flush after any already queued rendering and IO tasks, but\nwithout having the minimum delay imposed by timers.\nHowever, among these browsers, Internet Explorer 10 and Safari do not reliably\ndispatch messages, so they are not worth the trouble to implement.\n\n[message channels]: http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#message-channels\n[task queue]: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#concept-task\n\n- Internet Explorer 10\n- Safair 5.0-1\n- Opera 11-12\n\nIn the absense of mutation observers, these browsers and the following browsers\nall fall back to using `setTimeout` and `setInterval` to ensure that a `flush`\noccurs.\nThe implementation uses both and cancels whatever handler loses the race, since\n`setTimeout` tends to occasionally skip tasks in unisolated circumstances.\nTimers generally delay the flushing of ASAP's task queue for four milliseconds.\n\n- Firefox 3–13\n- Internet Explorer 6–10\n- iPad Safari 4.3\n- Lynx 2.8.7\n\n\n## Heritage\n\nASAP has been factored out of the [Q][] asynchronous promise library.\nIt originally had a naïve implementation in terms of `setTimeout`, but\n[Malte Ubl][NonBlocking] provided an insight that `postMessage` might be\nuseful for creating a high-priority, no-delay event dispatch hack.\nSince then, Internet Explorer proposed and implemented `setImmediate`.\nRobert Katić began contributing to Q by measuring the performance of\nthe internal implementation of `asap`, paying particular attention to\nerror recovery.\nDomenic, Robert, and Kris Kowal collectively settled on the current strategy of\nunrolling the high-priority event queue internally regardless of what strategy\nwe used to dispatch the potentially lower-priority flush event.\nDomenic went on to make ASAP cooperate with Node.js domains.\n\n[Q]: https://github.com/kriskowal/q\n[NonBlocking]: http://www.nonblocking.io/2011/06/windownexttick.html\n\nFor further reading, Nicholas Zakas provided a thorough article on [The\nCase for setImmediate][NCZ].\n\n[NCZ]: http://www.nczonline.net/blog/2013/07/09/the-case-for-setimmediate/\n\nEmber’s RSVP promise implementation later [adopted][RSVP ASAP] the name ASAP but\nfurther developed the implentation.\nParticularly, The `MessagePort` implementation was abandoned due to interaction\n[problems with Mobile Internet Explorer][IE Problems] in favor of an\nimplementation backed on the newer and more reliable DOM `MutationObserver`\ninterface.\nThese changes were back-ported into this library.\n\n[IE Problems]: https://github.com/cujojs/when/issues/197\n[RSVP ASAP]: https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\nIn addition, ASAP factored into `asap` and `asap/raw`, such that `asap` remained\nexception-safe, but `asap/raw` provided a tight kernel that could be used for\ntasks that guaranteed that they would not throw exceptions.\nThis core is useful for promise implementations that capture thrown errors in\nrejected promises and do not need a second safety net.\nAt the same time, the exception handling in `asap` was factored into separate\nimplementations for Node.js and browsers, using the the [Browserify][Browser\nConfig] `browser` property in `package.json` to instruct browser module loaders\nand bundlers, including [Browserify][], [Mr][], and [Mop][], to use the\nbrowser-only implementation.\n\n[Browser Config]: https://gist.github.com/defunctzombie/4339901\n[Browserify]: https://github.com/substack/node-browserify\n[Mr]: https://github.com/montagejs/mr\n[Mop]: https://github.com/montagejs/mop\n\n## License\n\nCopyright 2009-2014 by Contributors\nMIT License (enclosed)\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/kriskowal/asap/issues" - }, - "homepage": "https://github.com/kriskowal/asap#readme", - "_id": "asap@2.0.3", - "_shasum": "1fc1d1564ee11620dfca6d67029850913f9f4679", - "_resolved": "https://registry.npmjs.org/asap/-/asap-2.0.3.tgz", - "_from": "asap@>=2.0.0 <3.0.0" -} diff --git a/deps/npm/node_modules/fstream/.travis.yml b/deps/npm/node_modules/fstream/.travis.yml index a092c82b26fc41..9f5972ab5aa1cd 100644 --- a/deps/npm/node_modules/fstream/.travis.yml +++ b/deps/npm/node_modules/fstream/.travis.yml @@ -1,9 +1,9 @@ language: node_js node_js: - - iojs - - 0.12 - - 0.10 - - 0.8 + - "6" + - "4" + - "0.10" + - "0.12" before_install: - "npm config set spin false" - "npm install -g npm/npm" diff --git a/deps/npm/node_modules/fstream/lib/collect.js b/deps/npm/node_modules/fstream/lib/collect.js index 6245e6ce492d20..e5d4f35833476e 100644 --- a/deps/npm/node_modules/fstream/lib/collect.js +++ b/deps/npm/node_modules/fstream/lib/collect.js @@ -3,6 +3,8 @@ module.exports = collect function collect (stream) { if (stream._collected) return + if (stream._paused) return stream.on('resume', collect.bind(null, stream)) + stream._collected = true stream.pause() diff --git a/deps/npm/node_modules/fstream/package.json b/deps/npm/node_modules/fstream/package.json index dd1f45fc99faf6..cb1ad42e11db23 100644 --- a/deps/npm/node_modules/fstream/package.json +++ b/deps/npm/node_modules/fstream/package.json @@ -1,19 +1,62 @@ { + "_args": [ + [ + { + "raw": "fstream@~1.0.10", + "scope": null, + "escapedName": "fstream", + "name": "fstream", + "rawSpec": "~1.0.10", + "spec": ">=1.0.10 <1.1.0", + "type": "range" + }, + "/Users/ogd/Documents/projects/npm/npm" + ] + ], + "_from": "fstream@>=1.0.10 <1.1.0", + "_id": "fstream@1.0.10", + "_inCache": true, + "_installable": true, + "_location": "/fstream", + "_nodeVersion": "4.4.5", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/fstream-1.0.10.tgz_1466189553883_0.3062701092567295" + }, + "_npmUser": { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + "_npmVersion": "3.10.0", + "_phantomChildren": {}, + "_requested": { + "raw": "fstream@~1.0.10", + "scope": null, + "escapedName": "fstream", + "name": "fstream", + "rawSpec": "~1.0.10", + "spec": ">=1.0.10 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "#USER", + "/", + "/fstream-npm/fstream-ignore", + "/node-gyp", + "/tar" + ], + "_resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.10.tgz", + "_shasum": "604e8a92fe26ffd9f6fae30399d4984e1ab22822", + "_shrinkwrap": null, + "_spec": "fstream@~1.0.10", + "_where": "/Users/ogd/Documents/projects/npm/npm", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, - "name": "fstream", - "description": "Advanced file system stream things", - "version": "1.0.8", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/fstream.git" - }, - "main": "fstream.js", - "engines": { - "node": ">=0.6" + "bugs": { + "url": "https://github.com/npm/fstream/issues" }, "dependencies": { "graceful-fs": "^4.1.2", @@ -21,32 +64,23 @@ "mkdirp": ">=0.5 0", "rimraf": "2" }, + "description": "Advanced file system stream things", "devDependencies": { "standard": "^4.0.0", "tap": "^1.2.0" }, - "scripts": { - "test": "standard && tap examples/*.js" - }, - "license": "ISC", - "gitHead": "d9f81146c50e687f1df04c1a0e7e4c173eb3dae2", - "bugs": { - "url": "https://github.com/isaacs/fstream/issues" - }, - "homepage": "https://github.com/isaacs/fstream#readme", - "_id": "fstream@1.0.8", - "_shasum": "7e8d7a73abb3647ef36e4b8a15ca801dba03d038", - "_from": "fstream@>=1.0.8 <1.1.0", - "_npmVersion": "2.14.3", - "_nodeVersion": "2.2.2", - "_npmUser": { - "name": "zkat", - "email": "kat@sykosomatic.org" - }, + "directories": {}, "dist": { - "shasum": "7e8d7a73abb3647ef36e4b8a15ca801dba03d038", - "tarball": "http://registry.npmjs.org/fstream/-/fstream-1.0.8.tgz" + "shasum": "604e8a92fe26ffd9f6fae30399d4984e1ab22822", + "tarball": "https://registry.npmjs.org/fstream/-/fstream-1.0.10.tgz" }, + "engines": { + "node": ">=0.6" + }, + "gitHead": "24fabdec32e334dd3b130d77b38c010e3119b102", + "homepage": "https://github.com/npm/fstream#readme", + "license": "ISC", + "main": "fstream.js", "maintainers": [ { "name": "iarna", @@ -65,7 +99,15 @@ "email": "kat@sykosomatic.org" } ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.8.tgz", - "readme": "ERROR: No README data found!" + "name": "fstream", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/fstream.git" + }, + "scripts": { + "test": "standard && tap examples/*.js" + }, + "version": "1.0.10" } diff --git a/deps/npm/node_modules/glob/README.md b/deps/npm/node_modules/glob/README.md deleted file mode 100644 index 9dd9384fa143c3..00000000000000 --- a/deps/npm/node_modules/glob/README.md +++ /dev/null @@ -1,365 +0,0 @@ -# Glob - -Match files using the patterns the shell uses, like stars and stuff. - -[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Build Status](https://ci.appveyor.com/api/projects/status/kd7f3yftf7unxlsx?svg=true)](https://ci.appveyor.com/project/isaacs/node-glob) [![Coverage Status](https://coveralls.io/repos/isaacs/node-glob/badge.svg?branch=master&service=github)](https://coveralls.io/github/isaacs/node-glob?branch=master) - -This is a glob implementation in JavaScript. It uses the `minimatch` -library to do its matching. - -![](oh-my-glob.gif) - -## Usage - -Install with npm - -``` -npm i glob -``` - -```javascript -var glob = require("glob") - -// options is optional -glob("**/*.js", options, function (er, files) { - // files is an array of filenames. - // If the `nonull` option is set, and nothing - // was found, then files is ["**/*.js"] - // er is an error object or null. -}) -``` - -## Glob Primer - -"Globs" are the patterns you type when you do stuff like `ls *.js` on -the command line, or put `build/*` in a `.gitignore` file. - -Before parsing the path part patterns, braced sections are expanded -into a set. Braced sections start with `{` and end with `}`, with any -number of comma-delimited sections within. Braced sections may contain -slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. - -The following characters have special magic meaning when used in a -path portion: - -* `*` Matches 0 or more characters in a single path portion -* `?` Matches 1 character -* `[...]` Matches a range of characters, similar to a RegExp range. - If the first character of the range is `!` or `^` then it matches - any character not in the range. -* `!(pattern|pattern|pattern)` Matches anything that does not match - any of the patterns provided. -* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the - patterns provided. -* `+(pattern|pattern|pattern)` Matches one or more occurrences of the - patterns provided. -* `*(a|b|c)` Matches zero or more occurrences of the patterns provided -* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns - provided -* `**` If a "globstar" is alone in a path portion, then it matches - zero or more directories and subdirectories searching for matches. - It does not crawl symlinked directories. - -### Dots - -If a file or directory path portion has a `.` as the first character, -then it will not match any glob pattern unless that pattern's -corresponding path part also has a `.` as its first character. - -For example, the pattern `a/.*/c` would match the file at `a/.b/c`. -However the pattern `a/*/c` would not, because `*` does not start with -a dot character. - -You can make glob treat dots as normal characters by setting -`dot:true` in the options. - -### Basename Matching - -If you set `matchBase:true` in the options, and the pattern has no -slashes in it, then it will seek for any file anywhere in the tree -with a matching basename. For example, `*.js` would match -`test/simple/basic.js`. - -### Empty Sets - -If no matching files are found, then an empty array is returned. This -differs from the shell, where the pattern itself is returned. For -example: - - $ echo a*s*d*f - a*s*d*f - -To get the bash-style behavior, set the `nonull:true` in the options. - -### See Also: - -* `man sh` -* `man bash` (Search for "Pattern Matching") -* `man 3 fnmatch` -* `man 5 gitignore` -* [minimatch documentation](https://github.com/isaacs/minimatch) - -## glob.hasMagic(pattern, [options]) - -Returns `true` if there are any special characters in the pattern, and -`false` otherwise. - -Note that the options affect the results. If `noext:true` is set in -the options object, then `+(a|b)` will not be considered a magic -pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` -then that is considered magical, unless `nobrace:true` is set in the -options. - -## glob(pattern, [options], cb) - -* `pattern` `{String}` Pattern to be matched -* `options` `{Object}` -* `cb` `{Function}` - * `err` `{Error | null}` - * `matches` `{Array}` filenames found matching the pattern - -Perform an asynchronous glob search. - -## glob.sync(pattern, [options]) - -* `pattern` `{String}` Pattern to be matched -* `options` `{Object}` -* return: `{Array}` filenames found matching the pattern - -Perform a synchronous glob search. - -## Class: glob.Glob - -Create a Glob object by instantiating the `glob.Glob` class. - -```javascript -var Glob = require("glob").Glob -var mg = new Glob(pattern, options, cb) -``` - -It's an EventEmitter, and starts walking the filesystem to find matches -immediately. - -### new glob.Glob(pattern, [options], [cb]) - -* `pattern` `{String}` pattern to search for -* `options` `{Object}` -* `cb` `{Function}` Called when an error occurs, or matches are found - * `err` `{Error | null}` - * `matches` `{Array}` filenames found matching the pattern - -Note that if the `sync` flag is set in the options, then matches will -be immediately available on the `g.found` member. - -### Properties - -* `minimatch` The minimatch object that the glob uses. -* `options` The options object passed in. -* `aborted` Boolean which is set to true when calling `abort()`. There - is no way at this time to continue a glob search after aborting, but - you can re-use the statCache to avoid having to duplicate syscalls. -* `cache` Convenience object. Each field has the following possible - values: - * `false` - Path does not exist - * `true` - Path exists - * `'FILE'` - Path exists, and is not a directory - * `'DIR'` - Path exists, and is a directory - * `[file, entries, ...]` - Path exists, is a directory, and the - array value is the results of `fs.readdir` -* `statCache` Cache of `fs.stat` results, to prevent statting the same - path multiple times. -* `symlinks` A record of which paths are symbolic links, which is - relevant in resolving `**` patterns. -* `realpathCache` An optional object which is passed to `fs.realpath` - to minimize unnecessary syscalls. It is stored on the instantiated - Glob object, and may be re-used. - -### Events - -* `end` When the matching is finished, this is emitted with all the - matches found. If the `nonull` option is set, and no match was found, - then the `matches` list contains the original pattern. The matches - are sorted, unless the `nosort` flag is set. -* `match` Every time a match is found, this is emitted with the specific - thing that matched. It is not deduplicated or resolved to a realpath. -* `error` Emitted when an unexpected error is encountered, or whenever - any fs error occurs if `options.strict` is set. -* `abort` When `abort()` is called, this event is raised. - -### Methods - -* `pause` Temporarily stop the search -* `resume` Resume the search -* `abort` Stop the search forever - -### Options - -All the options that can be passed to Minimatch can also be passed to -Glob to change pattern matching behavior. Also, some have been added, -or have glob-specific ramifications. - -All options are false by default, unless otherwise noted. - -All options are added to the Glob object, as well. - -If you are running many `glob` operations, you can pass a Glob object -as the `options` argument to a subsequent operation to shortcut some -`stat` and `readdir` calls. At the very least, you may pass in shared -`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that -parallel glob operations will be sped up by sharing information about -the filesystem. - -* `cwd` The current working directory in which to search. Defaults - to `process.cwd()`. -* `root` The place where patterns starting with `/` will be mounted - onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix - systems, and `C:\` or some such on Windows.) -* `dot` Include `.dot` files in normal matches and `globstar` matches. - Note that an explicit dot in a portion of the pattern will always - match dot files. -* `nomount` By default, a pattern starting with a forward-slash will be - "mounted" onto the root setting, so that a valid filesystem path is - returned. Set this flag to disable that behavior. -* `mark` Add a `/` character to directory matches. Note that this - requires additional stat calls. -* `nosort` Don't sort the results. -* `stat` Set to true to stat *all* results. This reduces performance - somewhat, and is completely unnecessary, unless `readdir` is presumed - to be an untrustworthy indicator of file existence. -* `silent` When an unusual error is encountered when attempting to - read a directory, a warning will be printed to stderr. Set the - `silent` option to true to suppress these warnings. -* `strict` When an unusual error is encountered when attempting to - read a directory, the process will just continue on in search of - other matches. Set the `strict` option to raise an error in these - cases. -* `cache` See `cache` property above. Pass in a previously generated - cache object to save some fs calls. -* `statCache` A cache of results of filesystem information, to prevent - unnecessary stat calls. While it should not normally be necessary - to set this, you may pass the statCache from one glob() call to the - options object of another, if you know that the filesystem will not - change between calls. (See "Race Conditions" below.) -* `symlinks` A cache of known symbolic links. You may pass in a - previously generated `symlinks` object to save `lstat` calls when - resolving `**` matches. -* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. -* `nounique` In some cases, brace-expanded patterns can result in the - same file showing up multiple times in the result set. By default, - this implementation prevents duplicates in the result set. Set this - flag to disable that behavior. -* `nonull` Set to never return an empty set, instead returning a set - containing the pattern itself. This is the default in glob(3). -* `debug` Set to enable debug logging in minimatch and glob. -* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. -* `noglobstar` Do not match `**` against multiple filenames. (Ie, - treat it as a normal `*` instead.) -* `noext` Do not match `+(a|b)` "extglob" patterns. -* `nocase` Perform a case-insensitive match. Note: on - case-insensitive filesystems, non-magic patterns will match by - default, since `stat` and `readdir` will not raise errors. -* `matchBase` Perform a basename-only match if the pattern does not - contain any slash characters. That is, `*.js` would be treated as - equivalent to `**/*.js`, matching all js files in all directories. -* `nodir` Do not match directories, only files. (Note: to match - *only* directories, simply put a `/` at the end of the pattern.) -* `ignore` Add a pattern or an array of glob patterns to exclude matches. - Note: `ignore` patterns are *always* in `dot:true` mode, regardless - of any other settings. -* `follow` Follow symlinked directories when expanding `**` patterns. - Note that this can result in a lot of duplicate references in the - presence of cyclic links. -* `realpath` Set to true to call `fs.realpath` on all of the results. - In the case of a symlink that cannot be resolved, the full absolute - path to the matched entry is returned (though it will usually be a - broken symlink) - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between node-glob and other -implementations, and are intentional. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.3, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -Note that symlinked directories are not crawled as part of a `**`, -though their contents may match against subsequent portions of the -pattern. This prevents infinite loops and duplicates and the like. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then glob returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. - -### Comments and Negation - -Previously, this module let you mark a pattern as a "comment" if it -started with a `#` character, or a "negated" pattern if it started -with a `!` character. - -These options were deprecated in version 5, and removed in version 6. - -To specify things that should not match, use the `ignore` option. - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only `/` -characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes will always -be interpreted as escape characters, not path separators. - -Results from absolute patterns such as `/foo/*` are mounted onto the -root setting using `path.join`. On windows, this will by default result -in `/foo/*` matching `C:\foo\bar.txt`. - -## Race Conditions - -Glob searching, by its very nature, is susceptible to race conditions, -since it relies on directory walking and such. - -As a result, it is possible that a file that exists when glob looks for -it may have been deleted or modified by the time it returns the result. - -As part of its internal implementation, this program caches all stat -and readdir calls that it makes, in order to cut down on system -overhead. However, this also makes it even more susceptible to races, -especially if the cache or statCache objects are reused between glob -calls. - -Users are thus advised not to use a glob result as a guarantee of -filesystem state in the face of rapid changes. For the vast majority -of operations, this is never a problem. - -## Contributing - -Any change to behavior (including bugfixes) must come with a test. - -Patches that fail tests or reduce performance will be rejected. - -``` -# to run tests -npm test - -# to re-generate test fixtures -npm run test-regen - -# to benchmark against bash/zsh -npm run bench - -# to profile javascript -npm run prof -``` diff --git a/deps/npm/node_modules/glob/glob.js b/deps/npm/node_modules/glob/glob.js index 4dba04adec43c4..02d15b755dd84e 100644 --- a/deps/npm/node_modules/glob/glob.js +++ b/deps/npm/node_modules/glob/glob.js @@ -41,6 +41,7 @@ module.exports = glob var fs = require('fs') +var rp = require('fs.realpath') var minimatch = require('minimatch') var Minimatch = minimatch.Minimatch var inherits = require('inherits') @@ -232,7 +233,7 @@ Glob.prototype._realpathSet = function (index, cb) { // one or more of the links in the realpath couldn't be // resolved. just return the abs value in that case. p = self._makeAbs(p) - fs.realpath(p, self.realpathCache, function (er, real) { + rp.realpath(p, self.realpathCache, function (er, real) { if (!er) set[real] = true else if (er.syscall === 'stat') diff --git a/deps/npm/node_modules/glob/node_modules/fs.realpath/LICENSE b/deps/npm/node_modules/glob/node_modules/fs.realpath/LICENSE new file mode 100644 index 00000000000000..5bd884c252ac49 --- /dev/null +++ b/deps/npm/node_modules/glob/node_modules/fs.realpath/LICENSE @@ -0,0 +1,43 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---- + +This library bundles a version of the `fs.realpath` and `fs.realpathSync` +methods from Node.js v0.10 under the terms of the Node.js MIT license. + +Node's license follows, also included at the header of `old.js` which contains +the licensed code: + + 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. diff --git a/deps/npm/node_modules/glob/node_modules/fs.realpath/README.md b/deps/npm/node_modules/glob/node_modules/fs.realpath/README.md new file mode 100644 index 00000000000000..a42ceac62663ac --- /dev/null +++ b/deps/npm/node_modules/glob/node_modules/fs.realpath/README.md @@ -0,0 +1,33 @@ +# fs.realpath + +A backwards-compatible fs.realpath for Node v6 and above + +In Node v6, the JavaScript implementation of fs.realpath was replaced +with a faster (but less resilient) native implementation. That raises +new and platform-specific errors and cannot handle long or excessively +symlink-looping paths. + +This module handles those cases by detecting the new errors and +falling back to the JavaScript implementation. On versions of Node +prior to v6, it has no effect. + +## USAGE + +```js +var rp = require('fs.realpath') + +// async version +rp.realpath(someLongAndLoopingPath, function (er, real) { + // the ELOOP was handled, but it was a bit slower +}) + +// sync version +var real = rp.realpathSync(someLongAndLoopingPath) + +// monkeypatch at your own risk! +// This replaces the fs.realpath/fs.realpathSync builtins +rp.monkeypatch() + +// un-do the monkeypatching +rp.unmonkeypatch() +``` diff --git a/deps/npm/node_modules/glob/node_modules/fs.realpath/index.js b/deps/npm/node_modules/glob/node_modules/fs.realpath/index.js new file mode 100644 index 00000000000000..b09c7c7e6364da --- /dev/null +++ b/deps/npm/node_modules/glob/node_modules/fs.realpath/index.js @@ -0,0 +1,66 @@ +module.exports = realpath +realpath.realpath = realpath +realpath.sync = realpathSync +realpath.realpathSync = realpathSync +realpath.monkeypatch = monkeypatch +realpath.unmonkeypatch = unmonkeypatch + +var fs = require('fs') +var origRealpath = fs.realpath +var origRealpathSync = fs.realpathSync + +var version = process.version +var ok = /^v[0-5]\./.test(version) +var old = require('./old.js') + +function newError (er) { + return er && er.syscall === 'realpath' && ( + er.code === 'ELOOP' || + er.code === 'ENOMEM' || + er.code === 'ENAMETOOLONG' + ) +} + +function realpath (p, cache, cb) { + if (ok) { + return origRealpath(p, cache, cb) + } + + if (typeof cache === 'function') { + cb = cache + cache = null + } + origRealpath(p, cache, function (er, result) { + if (newError(er)) { + old.realpath(p, cache, cb) + } else { + cb(er, result) + } + }) +} + +function realpathSync (p, cache) { + if (ok) { + return origRealpathSync(p, cache) + } + + try { + return origRealpathSync(p, cache) + } catch (er) { + if (newError(er)) { + return old.realpathSync(p, cache) + } else { + throw er + } + } +} + +function monkeypatch () { + fs.realpath = realpath + fs.realpathSync = realpathSync +} + +function unmonkeypatch () { + fs.realpath = origRealpath + fs.realpathSync = origRealpathSync +} diff --git a/deps/npm/node_modules/glob/node_modules/fs.realpath/old.js b/deps/npm/node_modules/glob/node_modules/fs.realpath/old.js new file mode 100644 index 00000000000000..b40305e73fd583 --- /dev/null +++ b/deps/npm/node_modules/glob/node_modules/fs.realpath/old.js @@ -0,0 +1,303 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var pathModule = require('path'); +var isWindows = process.platform === 'win32'; +var fs = require('fs'); + +// JavaScript implementation of realpath, ported from node pre-v6 + +var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); + +function rethrow() { + // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and + // is fairly slow to generate. + var callback; + if (DEBUG) { + var backtrace = new Error; + callback = debugCallback; + } else + callback = missingCallback; + + return callback; + + function debugCallback(err) { + if (err) { + backtrace.message = err.message; + err = backtrace; + missingCallback(err); + } + } + + function missingCallback(err) { + if (err) { + if (process.throwDeprecation) + throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs + else if (!process.noDeprecation) { + var msg = 'fs: missing callback ' + (err.stack || err.message); + if (process.traceDeprecation) + console.trace(msg); + else + console.error(msg); + } + } + } +} + +function maybeCallback(cb) { + return typeof cb === 'function' ? cb : rethrow(); +} + +var normalize = pathModule.normalize; + +// Regexp that finds the next partion of a (partial) path +// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] +if (isWindows) { + var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; +} else { + var nextPartRe = /(.*?)(?:[\/]+|$)/g; +} + +// Regex to find the device root, including trailing slash. E.g. 'c:\\'. +if (isWindows) { + var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; +} else { + var splitRootRe = /^[\/]*/; +} + +exports.realpathSync = function realpathSync(p, cache) { + // make p is absolute + p = pathModule.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return cache[p]; + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstatSync(base); + knownHard[base] = true; + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + // NB: p.length changes. + while (pos < p.length) { + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + continue; + } + + var resolvedLink; + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // some known symbolic link. no need to stat again. + resolvedLink = cache[base]; + } else { + var stat = fs.lstatSync(base); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + continue; + } + + // read the link if it wasn't read before + // dev/ino always return 0 on windows, so skip the check. + var linkTarget = null; + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + linkTarget = seenLinks[id]; + } + } + if (linkTarget === null) { + fs.statSync(base); + linkTarget = fs.readlinkSync(base); + } + resolvedLink = pathModule.resolve(previous, linkTarget); + // track this, if given a cache. + if (cache) cache[base] = resolvedLink; + if (!isWindows) seenLinks[id] = linkTarget; + } + + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + + if (cache) cache[original] = p; + + return p; +}; + + +exports.realpath = function realpath(p, cache, cb) { + if (typeof cb !== 'function') { + cb = maybeCallback(cache); + cache = null; + } + + // make p is absolute + p = pathModule.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return process.nextTick(cb.bind(null, null, cache[p])); + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstat(base, function(err) { + if (err) return cb(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + function LOOP() { + // stop if scanned past end of path + if (pos >= p.length) { + if (cache) cache[original] = p; + return cb(null, p); + } + + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + return process.nextTick(LOOP); + } + + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // known symbolic link. no need to stat again. + return gotResolvedLink(cache[base]); + } + + return fs.lstat(base, gotStat); + } + + function gotStat(err, stat) { + if (err) return cb(err); + + // if not a symlink, skip to the next path part + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + return process.nextTick(LOOP); + } + + // stat & read the link if not read before + // call gotTarget as soon as the link target is known + // dev/ino always return 0 on windows, so skip the check. + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + return gotTarget(null, seenLinks[id], base); + } + } + fs.stat(base, function(err) { + if (err) return cb(err); + + fs.readlink(base, function(err, target) { + if (!isWindows) seenLinks[id] = target; + gotTarget(err, target); + }); + }); + } + + function gotTarget(err, target, base) { + if (err) return cb(err); + + var resolvedLink = pathModule.resolve(previous, target); + if (cache) cache[base] = resolvedLink; + gotResolvedLink(resolvedLink); + } + + function gotResolvedLink(resolvedLink) { + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } +}; diff --git a/deps/npm/node_modules/glob/node_modules/fs.realpath/package.json b/deps/npm/node_modules/glob/node_modules/fs.realpath/package.json new file mode 100644 index 00000000000000..b235390a5d43b1 --- /dev/null +++ b/deps/npm/node_modules/glob/node_modules/fs.realpath/package.json @@ -0,0 +1,93 @@ +{ + "_args": [ + [ + { + "raw": "fs.realpath@^1.0.0", + "scope": null, + "name": "fs.realpath", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/glob" + ] + ], + "_from": "fs.realpath@>=1.0.0 <2.0.0", + "_id": "fs.realpath@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/glob/fs.realpath", + "_nodeVersion": "4.4.4", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/fs.realpath-1.0.0.tgz_1466015941059_0.3332864767871797" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.9.1", + "_phantomChildren": {}, + "_requested": { + "raw": "fs.realpath@^1.0.0", + "scope": null, + "name": "fs.realpath", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/glob" + ], + "_resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "_shasum": "1504ad2523158caa40db4a2787cb01411994ea4f", + "_shrinkwrap": null, + "_spec": "fs.realpath@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/glob", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/fs.realpath/issues" + }, + "dependencies": {}, + "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "1504ad2523158caa40db4a2787cb01411994ea4f", + "tarball": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + }, + "files": [ + "old.js", + "index.js" + ], + "gitHead": "03e7c884431fe185dfebbc9b771aeca339c1807a", + "homepage": "https://github.com/isaacs/fs.realpath#readme", + "keywords": [ + "realpath", + "fs", + "polyfill" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "fs.realpath", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/fs.realpath.git" + }, + "scripts": { + "test": "tap test/*.js --cov" + }, + "version": "1.0.0" +} diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore deleted file mode 100644 index 353546af2368e1..00000000000000 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -test -.gitignore -.travis.yml diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js deleted file mode 100644 index 36cde4de5c114b..00000000000000 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +++ /dev/null @@ -1,7 +0,0 @@ -var expand = require('./'); - -console.log(expand('http://any.org/archive{1996..1999}/vol{1..4}/part{a,b,c}.html')); -console.log(expand('http://www.numericals.com/file{1..100..10}.txt')); -console.log(expand('http://www.letters.com/file{a..z..2}.txt')); -console.log(expand('mkdir /usr/local/src/bash/{old,new,dist,bugs}')); -console.log(expand('chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}')); diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore index fd4f2b066b339e..ae5d8c36ac6522 100644 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +++ b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore @@ -1,2 +1,5 @@ -node_modules -.DS_Store +test +.gitignore +.travis.yml +Makefile +example.js diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml deleted file mode 100644 index 6e5919de39a312..00000000000000 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile deleted file mode 100644 index dd2730cfde0cab..00000000000000 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - -test: - @node_modules/.bin/tape test/*.js - -.PHONY: test diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md index 421f3aa5f951a2..d6880b2f36e72b 100644 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +++ b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md @@ -1,6 +1,6 @@ # balanced-match -Match balanced string pairs, like `{` and `}` or `` and ``. +Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! [![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) [![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) @@ -16,6 +16,7 @@ var balanced = require('balanced-match'); console.log(balanced('{', '}', 'pre{in{nested}}post')); console.log(balanced('{', '}', 'pre{first}between{second}post')); +console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); ``` The matches are: @@ -28,6 +29,7 @@ $ node example.js pre: 'pre', body: 'first', post: 'between{second}post' } +{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } ``` ## API diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js deleted file mode 100644 index 9ce76f480a4321..00000000000000 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +++ /dev/null @@ -1,4 +0,0 @@ -var balanced = require('./'); - -console.log(balanced('{', '}', 'pre{in{nested}}post')); -console.log(balanced('{', '}', 'pre{first}between{second}post')); diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js index 75f3d71cba90bc..4670f7f79f4d2a 100644 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +++ b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js @@ -1,5 +1,8 @@ module.exports = balanced; function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + var r = range(a, b, str); return r && { @@ -11,6 +14,11 @@ function balanced(a, b, str) { }; } +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + balanced.range = range; function range(a, b, str) { var begs, beg, left, right, result; diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json index 5de119ba5b5760..208e61972bfc94 100644 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +++ b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json @@ -1,41 +1,52 @@ { "_args": [ [ - "balanced-match@^0.3.0", + { + "raw": "balanced-match@^0.4.1", + "scope": null, + "name": "balanced-match", + "rawSpec": "^0.4.1", + "spec": ">=0.4.1 <0.5.0", + "type": "range" + }, "/Users/rebecca/code/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion" ] ], - "_from": "balanced-match@>=0.3.0 <0.4.0", - "_id": "balanced-match@0.3.0", + "_from": "balanced-match@>=0.4.1 <0.5.0", + "_id": "balanced-match@0.4.1", "_inCache": true, "_installable": true, "_location": "/glob/minimatch/brace-expansion/balanced-match", - "_nodeVersion": "4.2.1", + "_nodeVersion": "6.0.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/balanced-match-0.4.1.tgz_1462129663650_0.39764496590942144" + }, "_npmUser": { - "email": "julian@juliangruber.com", - "name": "juliangruber" + "name": "juliangruber", + "email": "julian@juliangruber.com" }, - "_npmVersion": "2.14.7", + "_npmVersion": "3.8.6", "_phantomChildren": {}, "_requested": { - "name": "balanced-match", - "raw": "balanced-match@^0.3.0", - "rawSpec": "^0.3.0", + "raw": "balanced-match@^0.4.1", "scope": null, - "spec": ">=0.3.0 <0.4.0", + "name": "balanced-match", + "rawSpec": "^0.4.1", + "spec": ">=0.4.1 <0.5.0", "type": "range" }, "_requiredBy": [ "/glob/minimatch/brace-expansion" ], - "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.3.0.tgz", - "_shasum": "a91cdd1ebef1a86659e70ff4def01625fc2d6756", + "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz", + "_shasum": "19053e2e0748eadb379da6c09d455cf5e1039335", "_shrinkwrap": null, - "_spec": "balanced-match@^0.3.0", + "_spec": "balanced-match@^0.4.1", "_where": "/Users/rebecca/code/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion", "author": { - "email": "mail@juliangruber.com", "name": "Julian Gruber", + "email": "mail@juliangruber.com", "url": "http://juliangruber.com" }, "bugs": { @@ -44,21 +55,21 @@ "dependencies": {}, "description": "Match balanced character pairs, like \"{\" and \"}\"", "devDependencies": { - "tape": "~4.2.2" + "tape": "~4.5.0" }, "directories": {}, "dist": { - "shasum": "a91cdd1ebef1a86659e70ff4def01625fc2d6756", - "tarball": "http://registry.npmjs.org/balanced-match/-/balanced-match-0.3.0.tgz" + "shasum": "19053e2e0748eadb379da6c09d455cf5e1039335", + "tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz" }, - "gitHead": "a7114b0986554787e90b7ac595a043ca75ea77e5", + "gitHead": "7004b289baaaab6a832f4901735e29d37cc2a863", "homepage": "https://github.com/juliangruber/balanced-match", "keywords": [ - "balanced", "match", - "parse", "regexp", - "test" + "test", + "balanced", + "parse" ], "license": "MIT", "main": "index.js", @@ -79,20 +90,20 @@ "test": "make test" }, "testling": { + "files": "test/*.js", "browsers": [ - "android-browser/4.2..latest", - "chrome/25..latest", - "chrome/canary", + "ie/8..latest", "firefox/20..latest", "firefox/nightly", - "ie/8..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", + "chrome/25..latest", + "chrome/canary", "opera/12..latest", "opera/next", - "safari/5.1..latest" - ], - "files": "test/*.js" + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] }, - "version": "0.3.0" + "version": "0.4.1" } diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js deleted file mode 100644 index f5e98e3f2a3240..00000000000000 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +++ /dev/null @@ -1,84 +0,0 @@ -var test = require('tape'); -var balanced = require('..'); - -test('balanced', function(t) { - t.deepEqual(balanced('{', '}', 'pre{in{nest}}post'), { - start: 3, - end: 12, - pre: 'pre', - body: 'in{nest}', - post: 'post' - }); - t.deepEqual(balanced('{', '}', '{{{{{{{{{in}post'), { - start: 8, - end: 11, - pre: '{{{{{{{{', - body: 'in', - post: 'post' - }); - t.deepEqual(balanced('{', '}', 'pre{body{in}post'), { - start: 8, - end: 11, - pre: 'pre{body', - body: 'in', - post: 'post' - }); - t.deepEqual(balanced('{', '}', 'pre}{in{nest}}post'), { - start: 4, - end: 13, - pre: 'pre}', - body: 'in{nest}', - post: 'post' - }); - t.deepEqual(balanced('{', '}', 'pre{body}between{body2}post'), { - start: 3, - end: 8, - pre: 'pre', - body: 'body', - post: 'between{body2}post' - }); - t.notOk(balanced('{', '}', 'nope'), 'should be notOk'); - t.deepEqual(balanced('', '', 'preinnestpost'), { - start: 3, - end: 19, - pre: 'pre', - body: 'innest', - post: 'post' - }); - t.deepEqual(balanced('', '', 'preinnestpost'), { - start: 7, - end: 23, - pre: 'pre', - body: 'innest', - post: 'post' - }); - t.deepEqual(balanced('{{', '}}', 'pre{{{in}}}post'), { - start: 3, - end: 9, - pre: 'pre', - body: '{in}', - post: 'post' - }); - t.deepEqual(balanced('{{{', '}}', 'pre{{{in}}}post'), { - start: 3, - end: 8, - pre: 'pre', - body: 'in', - post: '}post' - }); - t.deepEqual(balanced('{', '}', 'pre{{first}in{second}post'), { - start: 4, - end: 10, - pre: 'pre{', - body: 'first', - post: 'in{second}post' - }); - t.deepEqual(balanced('', 'prepost'), { - start: 3, - end: 4, - pre: 'pre', - body: '', - post: 'post' - }); - t.end(); -}); diff --git a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json index 2917f0eac0e7bf..3ffc8da5c03baa 100644 --- a/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +++ b/deps/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json @@ -1,76 +1,83 @@ { "_args": [ [ - "brace-expansion@^1.0.0", + { + "raw": "brace-expansion@^1.0.0", + "scope": null, + "name": "brace-expansion", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, "/Users/rebecca/code/npm/node_modules/glob/node_modules/minimatch" ] ], "_from": "brace-expansion@>=1.0.0 <2.0.0", - "_id": "brace-expansion@1.1.3", + "_id": "brace-expansion@1.1.5", "_inCache": true, "_installable": true, "_location": "/glob/minimatch/brace-expansion", - "_nodeVersion": "5.5.0", + "_nodeVersion": "4.4.5", "_npmOperationalInternal": { - "host": "packages-6-west.internal.npmjs.com", - "tmp": "tmp/brace-expansion-1.1.3.tgz_1455216688668_0.948847763473168" + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/brace-expansion-1.1.5.tgz_1465989660138_0.34528115345165133" }, "_npmUser": { - "email": "julian@juliangruber.com", - "name": "juliangruber" + "name": "juliangruber", + "email": "julian@juliangruber.com" }, - "_npmVersion": "3.3.12", + "_npmVersion": "2.15.5", "_phantomChildren": {}, "_requested": { - "name": "brace-expansion", "raw": "brace-expansion@^1.0.0", - "rawSpec": "^1.0.0", "scope": null, + "name": "brace-expansion", + "rawSpec": "^1.0.0", "spec": ">=1.0.0 <2.0.0", "type": "range" }, "_requiredBy": [ "/glob/minimatch" ], - "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.3.tgz", - "_shasum": "46bff50115d47fc9ab89854abb87d98078a10991", + "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.5.tgz", + "_shasum": "f5b4ad574e2cb7ccc1eb83e6fe79b8ecadf7a526", "_shrinkwrap": null, "_spec": "brace-expansion@^1.0.0", "_where": "/Users/rebecca/code/npm/node_modules/glob/node_modules/minimatch", "author": { - "email": "mail@juliangruber.com", "name": "Julian Gruber", + "email": "mail@juliangruber.com", "url": "http://juliangruber.com" }, "bugs": { "url": "https://github.com/juliangruber/brace-expansion/issues" }, "dependencies": { - "balanced-match": "^0.3.0", + "balanced-match": "^0.4.1", "concat-map": "0.0.1" }, "description": "Brace expansion as known from sh/bash", "devDependencies": { - "tape": "4.4.0" + "tape": "4.5.1" }, "directories": {}, "dist": { - "shasum": "46bff50115d47fc9ab89854abb87d98078a10991", - "tarball": "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.3.tgz" + "shasum": "f5b4ad574e2cb7ccc1eb83e6fe79b8ecadf7a526", + "tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.5.tgz" }, - "gitHead": "f0da1bb668e655f67b6b2d660c6e1c19e2a6f231", + "gitHead": "ff31acab078f1bb696ac4c55ca56ea24e6495fb6", "homepage": "https://github.com/juliangruber/brace-expansion", "keywords": [], "license": "MIT", "main": "index.js", "maintainers": [ { - "email": "julian@juliangruber.com", - "name": "juliangruber" + "name": "juliangruber", + "email": "julian@juliangruber.com" }, { - "email": "isaacs@npmjs.com", - "name": "isaacs" + "name": "isaacs", + "email": "isaacs@npmjs.com" } ], "name": "brace-expansion", @@ -85,6 +92,7 @@ "test": "tape test/*.js" }, "testling": { + "files": "test/*.js", "browsers": [ "ie/8..latest", "firefox/20..latest", @@ -97,8 +105,7 @@ "ipad/6.0..latest", "iphone/6.0..latest", "android-browser/4.2..latest" - ], - "files": "test/*.js" + ] }, - "version": "1.1.3" + "version": "1.1.5" } diff --git a/deps/npm/node_modules/glob/package.json b/deps/npm/node_modules/glob/package.json index cf191d217966b1..253686f9b4b37c 100644 --- a/deps/npm/node_modules/glob/package.json +++ b/deps/npm/node_modules/glob/package.json @@ -1,53 +1,62 @@ { "_args": [ [ - "glob@7.0.3", + { + "raw": "glob@~7.0.3", + "scope": null, + "name": "glob", + "rawSpec": "~7.0.3", + "spec": ">=7.0.3 <7.1.0", + "type": "range" + }, "/Users/rebecca/code/npm" ] ], - "_from": "glob@7.0.3", - "_id": "glob@7.0.3", + "_from": "glob@>=7.0.3 <7.1.0", + "_id": "glob@7.0.4", "_inCache": true, "_installable": true, "_location": "/glob", - "_nodeVersion": "5.6.0", + "_nodeVersion": "6.2.1", "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/glob-7.0.3.tgz_1457166529288_0.7840580905321985" + "tmp": "tmp/glob-7.0.4.tgz_1466098181857_0.6043217403348535" }, "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" }, - "_npmVersion": "3.7.3", + "_npmVersion": "3.9.3", "_phantomChildren": {}, "_requested": { - "name": "glob", - "raw": "glob@7.0.3", - "rawSpec": "7.0.3", + "raw": "glob@~7.0.3", "scope": null, - "spec": "7.0.3", - "type": "version" + "name": "glob", + "rawSpec": "~7.0.3", + "spec": ">=7.0.3 <7.1.0", + "type": "range" }, "_requiredBy": [ + "#USER", "/", "/rimraf", "/tap" ], - "_resolved": "https://registry.npmjs.org/glob/-/glob-7.0.3.tgz", - "_shasum": "0aa235931a4a96ac13d60ffac2fb877bd6ed4f58", + "_resolved": "https://registry.npmjs.org/glob/-/glob-7.0.4.tgz", + "_shasum": "3b44afa0943bdc31b2037b934791e2e084bcb7f6", "_shrinkwrap": null, - "_spec": "glob@7.0.3", + "_spec": "glob@~7.0.3", "_where": "/Users/rebecca/code/npm", "author": { - "email": "i@izs.me", "name": "Isaac Z. Schlueter", + "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { "url": "https://github.com/isaacs/node-glob/issues" }, "dependencies": { + "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "2 || 3", @@ -63,8 +72,8 @@ }, "directories": {}, "dist": { - "shasum": "0aa235931a4a96ac13d60ffac2fb877bd6ed4f58", - "tarball": "http://registry.npmjs.org/glob/-/glob-7.0.3.tgz" + "shasum": "3b44afa0943bdc31b2037b934791e2e084bcb7f6", + "tarball": "https://registry.npmjs.org/glob/-/glob-7.0.4.tgz" }, "engines": { "node": "*" @@ -74,14 +83,14 @@ "sync.js", "common.js" ], - "gitHead": "2fc2278ab857c7df117213a2fb431de090be6353", + "gitHead": "3f883c43fec4f8046cbea9497add3b8ba4ef0a37", "homepage": "https://github.com/isaacs/node-glob#readme", "license": "ISC", "main": "glob.js", "maintainers": [ { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" } ], "name": "glob", @@ -100,5 +109,5 @@ "test": "tap test/*.js --cov", "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js" }, - "version": "7.0.3" + "version": "7.0.4" } diff --git a/deps/npm/node_modules/glob/sync.js b/deps/npm/node_modules/glob/sync.js index 301577ab5f228f..bba2dc6a0c14e1 100644 --- a/deps/npm/node_modules/glob/sync.js +++ b/deps/npm/node_modules/glob/sync.js @@ -2,6 +2,7 @@ module.exports = globSync globSync.GlobSync = GlobSync var fs = require('fs') +var rp = require('fs.realpath') var minimatch = require('minimatch') var Minimatch = minimatch.Minimatch var Glob = require('./glob.js').Glob @@ -57,7 +58,7 @@ GlobSync.prototype._finish = function () { for (var p in matchset) { try { p = self._makeAbs(p) - var real = fs.realpathSync(p, self.realpathCache) + var real = rp.realpathSync(p, self.realpathCache) set[real] = true } catch (er) { if (er.syscall === 'stat') diff --git a/deps/npm/node_modules/has-unicode/.npmignore b/deps/npm/node_modules/has-unicode/.npmignore deleted file mode 100644 index 7e17cf19b7a16b..00000000000000 --- a/deps/npm/node_modules/has-unicode/.npmignore +++ /dev/null @@ -1,32 +0,0 @@ -# Logs -logs -*.log - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directory -# 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 - -# Editor temp files -*~ -.#* diff --git a/deps/npm/node_modules/has-unicode/index.js b/deps/npm/node_modules/has-unicode/index.js index 9bf537b1cd48e5..9b0fe445401311 100644 --- a/deps/npm/node_modules/has-unicode/index.js +++ b/deps/npm/node_modules/has-unicode/index.js @@ -10,12 +10,7 @@ var hasUnicode = module.exports = function () { // appropriate. if (os.type() == "Windows_NT") { return false } - var isUTF8 = /[.]UTF-8/ - if (isUTF8.test(process.env.LC_ALL) - || process.env.LC_CTYPE == 'UTF-8' - || isUTF8.test(process.env.LANG)) { - return true - } - - return false + var isUTF8 = /UTF-?8$/i + var ctype = process.env.LC_ALL || process.env.LC_CTYPE || process.env.LANG + return isUTF8.test(ctype) } diff --git a/deps/npm/node_modules/has-unicode/package.json b/deps/npm/node_modules/has-unicode/package.json index 924e3b7a097caf..4bfc95ee46f6eb 100644 --- a/deps/npm/node_modules/has-unicode/package.json +++ b/deps/npm/node_modules/has-unicode/package.json @@ -1,41 +1,57 @@ { "_args": [ [ - "has-unicode@2.0.0", + { + "raw": "has-unicode@~2.0.0", + "scope": null, + "escapedName": "has-unicode", + "name": "has-unicode", + "rawSpec": "~2.0.0", + "spec": ">=2.0.0 <2.1.0", + "type": "range" + }, "/Users/rebecca/code/npm" ] ], - "_from": "has-unicode@2.0.0", - "_id": "has-unicode@2.0.0", + "_from": "has-unicode@>=2.0.0 <2.1.0", + "_id": "has-unicode@2.0.1", "_inCache": true, "_installable": true, "_location": "/has-unicode", - "_nodeVersion": "4.2.2", + "_nodeVersion": "4.4.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/has-unicode-2.0.1.tgz_1466719828333_0.48896647873334587" + }, "_npmUser": { - "email": "me@re-becca.org", - "name": "iarna" + "name": "iarna", + "email": "me@re-becca.org" }, - "_npmVersion": "2.14.7", + "_npmVersion": "3.10.2", "_phantomChildren": {}, "_requested": { - "name": "has-unicode", - "raw": "has-unicode@2.0.0", - "rawSpec": "2.0.0", + "raw": "has-unicode@~2.0.0", "scope": null, - "spec": "2.0.0", - "type": "version" + "escapedName": "has-unicode", + "name": "has-unicode", + "rawSpec": "~2.0.0", + "spec": ">=2.0.0 <2.1.0", + "type": "range" }, "_requiredBy": [ - "/" + "#USER", + "/", + "/node-gyp/npmlog/gauge", + "/npmlog/gauge" ], - "_resolved": "file:../has-unicode", - "_shasum": "a3cd96c307ba41d559c5a2ee408c12a11c4c2ec3", + "_resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "_shasum": "e0e6fe6a28cf51138855e086d1691e771de2a8b9", "_shrinkwrap": null, - "_spec": "has-unicode@2.0.0", + "_spec": "has-unicode@~2.0.0", "_where": "/Users/rebecca/code/npm", "author": { - "email": "me@re-becca.org", - "name": "Rebecca Turner" + "name": "Rebecca Turner", + "email": "me@re-becca.org" }, "bugs": { "url": "https://github.com/iarna/has-unicode/issues" @@ -48,14 +64,17 @@ }, "directories": {}, "dist": { - "shasum": "a3cd96c307ba41d559c5a2ee408c12a11c4c2ec3", - "tarball": "http://registry.npmjs.org/has-unicode/-/has-unicode-2.0.0.tgz" + "shasum": "e0e6fe6a28cf51138855e086d1691e771de2a8b9", + "tarball": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz" }, - "gitHead": "fdd5de141a5564bdb5bc991d951209da40f6a598", + "files": [ + "index.js" + ], + "gitHead": "0a05df154e8d89a7fb9798da60b68c78c2df6646", "homepage": "https://github.com/iarna/has-unicode", "keywords": [ - "terminal", - "unicode" + "unicode", + "terminal" ], "license": "ISC", "main": "index.js", @@ -75,5 +94,5 @@ "scripts": { "test": "tap test/*.js" }, - "version": "2.0.0" + "version": "2.0.1" } diff --git a/deps/npm/node_modules/has-unicode/test/index.js b/deps/npm/node_modules/has-unicode/test/index.js deleted file mode 100644 index cbdfda335088ee..00000000000000 --- a/deps/npm/node_modules/has-unicode/test/index.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict" -var test = require("tap").test -var requireInject = require("require-inject") - -test("Windows", function (t) { - t.plan(1) - var hasUnicode = requireInject("../index.js", { - os: { type: function () { return "Windows_NT" } } - }) - t.is(hasUnicode(), false, "Windows is assumed NOT to be unicode aware") -}) -test("Unix Env", function (t) { - t.plan(3) - var hasUnicode = requireInject("../index.js", { - os: { type: function () { return "Linux" } }, - child_process: { exec: function (cmd,cb) { cb(new Error("not available")) } } - }) - process.env.LANG = "en_US.UTF-8" - process.env.LC_ALL = null - t.is(hasUnicode(), true, "Linux with a UTF8 language") - process.env.LANG = null - process.env.LC_ALL = "en_US.UTF-8" - t.is(hasUnicode(), true, "Linux with UTF8 locale") - process.env.LC_ALL = null - t.is(hasUnicode(), false, "Linux without UTF8 language or locale") -}) diff --git a/deps/npm/node_modules/lodash.isarray/README.md b/deps/npm/node_modules/lodash.isarray/README.md deleted file mode 100644 index da1580fabe9919..00000000000000 --- a/deps/npm/node_modules/lodash.isarray/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.isarray v4.0.0 - -The [lodash](https://lodash.com/) method `_.isArray` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.isarray -``` - -In Node.js: -```js -var isArray = require('lodash.isarray'); -``` - -See the [documentation](https://lodash.com/docs#isArray) or [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash.isarray) for more details. diff --git a/deps/npm/node_modules/lodash.isarray/index.js b/deps/npm/node_modules/lodash.isarray/index.js deleted file mode 100644 index 105fd4249e782f..00000000000000 --- a/deps/npm/node_modules/lodash.isarray/index.js +++ /dev/null @@ -1,35 +0,0 @@ -/** - * lodash 4.0.0 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @type Function - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -module.exports = isArray; diff --git a/deps/npm/node_modules/lodash.isarray/package.json b/deps/npm/node_modules/lodash.isarray/package.json deleted file mode 100644 index 606f67a82fcd5a..00000000000000 --- a/deps/npm/node_modules/lodash.isarray/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "_args": [ - [ - "lodash.isarray@latest", - "/Users/rebecca/code/npm" - ] - ], - "_from": "lodash.isarray@latest", - "_id": "lodash.isarray@4.0.0", - "_inCache": true, - "_installable": true, - "_location": "/lodash.isarray", - "_nodeVersion": "5.4.0", - "_npmUser": { - "email": "john.david.dalton@gmail.com", - "name": "jdalton" - }, - "_npmVersion": "2.14.15", - "_phantomChildren": {}, - "_requested": { - "name": "lodash.isarray", - "raw": "lodash.isarray@latest", - "rawSpec": "latest", - "scope": null, - "spec": "latest", - "type": "tag" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-4.0.0.tgz", - "_shasum": "2aca496b28c4ca6d726715313590c02e6ea34403", - "_shrinkwrap": null, - "_spec": "lodash.isarray@latest", - "_where": "/Users/rebecca/code/npm", - "author": { - "email": "john.david.dalton@gmail.com", - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": {}, - "description": "The lodash method `_.isArray` exported as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "2aca496b28c4ca6d726715313590c02e6ea34403", - "tarball": "http://registry.npmjs.org/lodash.isarray/-/lodash.isarray-4.0.0.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "isarray", - "lodash", - "lodash-modularized", - "stdlib", - "util" - ], - "license": "MIT", - "maintainers": [ - { - "name": "jdalton", - "email": "john.david.dalton@gmail.com" - }, - { - "name": "mathias", - "email": "mathias@qiwi.be" - }, - { - "name": "phated", - "email": "blaine@iceddev.com" - } - ], - "name": "lodash.isarray", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.0.0" -} diff --git a/deps/npm/node_modules/lodash.keys/README.md b/deps/npm/node_modules/lodash.keys/README.md deleted file mode 100644 index 5c9c49c6271996..00000000000000 --- a/deps/npm/node_modules/lodash.keys/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.keys v4.0.7 - -The [lodash](https://lodash.com/) method `_.keys` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.keys -``` - -In Node.js: -```js -var keys = require('lodash.keys'); -``` - -See the [documentation](https://lodash.com/docs#keys) or [package source](https://github.com/lodash/lodash/blob/4.0.7-npm-packages/lodash.keys) for more details. diff --git a/deps/npm/node_modules/lodash.keys/index.js b/deps/npm/node_modules/lodash.keys/index.js deleted file mode 100644 index 39530dfc6f7ab9..00000000000000 --- a/deps/npm/node_modules/lodash.keys/index.js +++ /dev/null @@ -1,468 +0,0 @@ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - stringTag = '[object String]'; - -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; - -/** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; -} - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetPrototype = Object.getPrototypeOf, - nativeKeys = Object.keys; - -/** - * The base implementation of `_.has` without support for deep paths. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHas(object, key) { - // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`, - // that are composed entirely of index properties, return `false` for - // `hasOwnProperty` checks of them. - return hasOwnProperty.call(object, key) || - (typeof object == 'object' && key in object && getPrototype(object) === null); -} - -/** - * The base implementation of `_.keys` which doesn't skip the constructor - * property of prototypes or treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeys(object) { - return nativeKeys(Object(object)); -} - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a - * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects - * Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ -var getLength = baseProperty('length'); - -/** - * Gets the `[[Prototype]]` of `value`. - * - * @private - * @param {*} value The value to query. - * @returns {null|Object} Returns the `[[Prototype]]`. - */ -function getPrototype(value) { - return nativeGetPrototype(Object(value)); -} - -/** - * Creates an array of index keys for `object` values of arrays, - * `arguments` objects, and strings, otherwise `null` is returned. - * - * @private - * @param {Object} object The object to query. - * @returns {Array|null} Returns index keys, else `null`. - */ -function indexKeys(object) { - var length = object ? object.length : undefined; - if (isLength(length) && - (isArray(object) || isString(object) || isArguments(object))) { - return baseTimes(length, String); - } - return null; -} - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); -} - -/** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; -} - -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -function isArguments(value) { - // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode. - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); -} - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @type {Function} - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(getLength(value)) && !isFunction(value); -} - -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); -} - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, - * else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); -} - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - var isProto = isPrototype(object); - if (!(isProto || isArrayLike(object))) { - return baseKeys(object); - } - var indexes = indexKeys(object), - skipIndexes = !!indexes, - result = indexes || [], - length = result.length; - - for (var key in object) { - if (baseHas(object, key) && - !(skipIndexes && (key == 'length' || isIndex(key, length))) && - !(isProto && key == 'constructor')) { - result.push(key); - } - } - return result; -} - -module.exports = keys; diff --git a/tools/eslint/node_modules/globby/node_modules/glob/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/LICENSE similarity index 100% rename from tools/eslint/node_modules/globby/node_modules/glob/LICENSE rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/LICENSE diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/README.md new file mode 100644 index 00000000000000..a57cf429d4a6fa --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/README.md @@ -0,0 +1,195 @@ +# npmlog + +The logger util that npm uses. + +This logger is very basic. It does the logging for npm. It supports +custom levels and colored output. + +By default, logs are written to stderr. If you want to send log messages +to outputs other than streams, then you can change the `log.stream` +member, or you can just listen to the events that it emits, and do +whatever you want with them. + +# Basic Usage + +``` +var log = require('npmlog') + +// additional stuff ---------------------------+ +// message ----------+ | +// prefix ----+ | | +// level -+ | | | +// v v v v + log.info('fyi', 'I have a kitty cat: %j', myKittyCat) +``` + +## log.level + +* {String} + +The level to display logs at. Any logs at or above this level will be +displayed. The special level `silent` will prevent anything from being +displayed ever. + +## log.record + +* {Array} + +An array of all the log messages that have been entered. + +## log.maxRecordSize + +* {Number} + +The maximum number of records to keep. If log.record gets bigger than +10% over this value, then it is sliced down to 90% of this value. + +The reason for the 10% window is so that it doesn't have to resize a +large array on every log entry. + +## log.prefixStyle + +* {Object} + +A style object that specifies how prefixes are styled. (See below) + +## log.headingStyle + +* {Object} + +A style object that specifies how the heading is styled. (See below) + +## log.heading + +* {String} Default: "" + +If set, a heading that is printed at the start of every line. + +## log.stream + +* {Stream} Default: `process.stderr` + +The stream where output is written. + +## log.enableColor() + +Force colors to be used on all messages, regardless of the output +stream. + +## log.disableColor() + +Disable colors on all messages. + +## log.enableProgress() + +Enable the display of log activity spinner and progress bar + +## log.disableProgress() + +Disable the display of a progress bar + +## log.enableUnicode() + +Force the unicode theme to be used for the progress bar. + +## log.disableUnicode() + +Disable the use of unicode in the progress bar. + +## log.setGaugeTemplate(template) + +Overrides the default gauge template. + +## log.pause() + +Stop emitting messages to the stream, but do not drop them. + +## log.resume() + +Emit all buffered messages that were written while paused. + +## log.log(level, prefix, message, ...) + +* `level` {String} The level to emit the message at +* `prefix` {String} A string prefix. Set to "" to skip. +* `message...` Arguments to `util.format` + +Emit a log message at the specified level. + +## log\[level](prefix, message, ...) + +For example, + +* log.silly(prefix, message, ...) +* log.verbose(prefix, message, ...) +* log.info(prefix, message, ...) +* log.http(prefix, message, ...) +* log.warn(prefix, message, ...) +* log.error(prefix, message, ...) + +Like `log.log(level, prefix, message, ...)`. In this way, each level is +given a shorthand, so you can do `log.info(prefix, message)`. + +## log.addLevel(level, n, style, disp) + +* `level` {String} Level indicator +* `n` {Number} The numeric level +* `style` {Object} Object with fg, bg, inverse, etc. +* `disp` {String} Optional replacement for `level` in the output. + +Sets up a new level with a shorthand function and so forth. + +Note that if the number is `Infinity`, then setting the level to that +will cause all log messages to be suppressed. If the number is +`-Infinity`, then the only way to show it is to enable all log messages. + +## log.newItem(name, todo, weight) + +* `name` {String} Optional; progress item name. +* `todo` {Number} Optional; total amount of work to be done. Default 0. +* `weight` {Number} Optional; the weight of this item relative to others. Default 1. + +This adds a new `are-we-there-yet` item tracker to the progress tracker. The +object returned has the `log[level]` methods but is otherwise an +`are-we-there-yet` `Tracker` object. + +## log.newStream(name, todo, weight) + +This adds a new `are-we-there-yet` stream tracker to the progress tracker. The +object returned has the `log[level]` methods but is otherwise an +`are-we-there-yet` `TrackerStream` object. + +## log.newGroup(name, weight) + +This adds a new `are-we-there-yet` tracker group to the progress tracker. The +object returned has the `log[level]` methods but is otherwise an +`are-we-there-yet` `TrackerGroup` object. + +# Events + +Events are all emitted with the message object. + +* `log` Emitted for all messages +* `log.` Emitted for all messages with the `` level. +* `` Messages with prefixes also emit their prefix as an event. + +# Style Objects + +Style objects can have the following fields: + +* `fg` {String} Color for the foreground text +* `bg` {String} Color for the background +* `bold`, `inverse`, `underline` {Boolean} Set the associated property +* `bell` {Boolean} Make a noise (This is pretty annoying, probably.) + +# Message Objects + +Every log event is emitted with a message object, and the `log.record` +list contains all of them that have been created. They have the +following fields: + +* `id` {Number} +* `level` {String} +* `prefix` {String} +* `message` {String} Result of `util.format()` +* `messageRaw` {Array} Arguments to `util.format()` diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/log.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/log.js new file mode 100644 index 00000000000000..8d781f17319084 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/log.js @@ -0,0 +1,251 @@ +'use strict' +var Progress = require('are-we-there-yet') +var Gauge = require('gauge') +var EE = require('events').EventEmitter +var log = exports = module.exports = new EE +var util = require('util') + +var ansi = require('ansi') +log.cursor = ansi(process.stderr) +log.stream = process.stderr + +// by default, let ansi decide based on tty-ness. +var colorEnabled = undefined +log.enableColor = function () { + colorEnabled = true + this.cursor.enabled = true +} +log.disableColor = function () { + colorEnabled = false + this.cursor.enabled = false +} + +// default level +log.level = 'info' + +log.gauge = new Gauge(log.cursor) +log.tracker = new Progress.TrackerGroup() + +// no progress bars unless asked +log.progressEnabled = false + +var gaugeTheme = undefined + +log.enableUnicode = function () { + gaugeTheme = Gauge.unicode + log.gauge.setTheme(gaugeTheme) +} + +log.disableUnicode = function () { + gaugeTheme = Gauge.ascii + log.gauge.setTheme(gaugeTheme) +} + +var gaugeTemplate = undefined +log.setGaugeTemplate = function (template) { + gaugeTemplate = template + log.gauge.setTemplate(gaugeTemplate) +} + +log.enableProgress = function () { + if (this.progressEnabled) return + this.progressEnabled = true + if (this._pause) return + this.tracker.on('change', this.showProgress) + this.gauge.enable() + this.showProgress() +} + +log.disableProgress = function () { + if (!this.progressEnabled) return + this.clearProgress() + this.progressEnabled = false + this.tracker.removeListener('change', this.showProgress) + this.gauge.disable() +} + +var trackerConstructors = ['newGroup', 'newItem', 'newStream'] + +var mixinLog = function (tracker) { + // mixin the public methods from log into the tracker + // (except: conflicts and one's we handle specially) + Object.keys(log).forEach(function (P) { + if (P[0] === '_') return + if (trackerConstructors.filter(function (C) { return C === P }).length) return + if (tracker[P]) return + if (typeof log[P] !== 'function') return + var func = log[P] + tracker[P] = function () { + return func.apply(log, arguments) + } + }) + // if the new tracker is a group, make sure any subtrackers get + // mixed in too + if (tracker instanceof Progress.TrackerGroup) { + trackerConstructors.forEach(function (C) { + var func = tracker[C] + tracker[C] = function () { return mixinLog(func.apply(tracker, arguments)) } + }) + } + return tracker +} + +// Add tracker constructors to the top level log object +trackerConstructors.forEach(function (C) { + log[C] = function () { return mixinLog(this.tracker[C].apply(this.tracker, arguments)) } +}) + +log.clearProgress = function () { + if (!this.progressEnabled) return + this.gauge.hide() +} + +log.showProgress = function (name, completed) { + if (!this.progressEnabled) return + if (completed == null) completed = this.tracker.completed() + this.gauge.show(name, completed) +}.bind(log) // bind for use in tracker's on-change listener + +// temporarily stop emitting, but don't drop +log.pause = function () { + this._paused = true +} + +log.resume = function () { + if (!this._paused) return + this._paused = false + + var b = this._buffer + this._buffer = [] + b.forEach(function (m) { + this.emitLog(m) + }, this) + if (this.progressEnabled) this.enableProgress() +} + +log._buffer = [] + +var id = 0 +log.record = [] +log.maxRecordSize = 10000 +log.log = function (lvl, prefix, message) { + var l = this.levels[lvl] + if (l === undefined) { + return this.emit('error', new Error(util.format( + 'Undefined log level: %j', lvl))) + } + + var a = new Array(arguments.length - 2) + var stack = null + for (var i = 2; i < arguments.length; i ++) { + var arg = a[i-2] = arguments[i] + + // resolve stack traces to a plain string. + if (typeof arg === 'object' && arg && + (arg instanceof Error) && arg.stack) { + arg.stack = stack = arg.stack + '' + } + } + if (stack) a.unshift(stack + '\n') + message = util.format.apply(util, a) + + var m = { id: id++, + level: lvl, + prefix: String(prefix || ''), + message: message, + messageRaw: a } + + this.emit('log', m) + this.emit('log.' + lvl, m) + if (m.prefix) this.emit(m.prefix, m) + + this.record.push(m) + var mrs = this.maxRecordSize + var n = this.record.length - mrs + if (n > mrs / 10) { + var newSize = Math.floor(mrs * 0.9) + this.record = this.record.slice(-1 * newSize) + } + + this.emitLog(m) +}.bind(log) + +log.emitLog = function (m) { + if (this._paused) { + this._buffer.push(m) + return + } + if (this.progressEnabled) this.gauge.pulse(m.prefix) + var l = this.levels[m.level] + if (l === undefined) return + if (l < this.levels[this.level]) return + if (l > 0 && !isFinite(l)) return + + var style = log.style[m.level] + var disp = log.disp[m.level] || m.level + this.clearProgress() + m.message.split(/\r?\n/).forEach(function (line) { + if (this.heading) { + this.write(this.heading, this.headingStyle) + this.write(' ') + } + this.write(disp, log.style[m.level]) + var p = m.prefix || '' + if (p) this.write(' ') + this.write(p, this.prefixStyle) + this.write(' ' + line + '\n') + }, this) + this.showProgress() +} + +log.write = function (msg, style) { + if (!this.cursor) return + if (this.stream !== this.cursor.stream) { + this.cursor = ansi(this.stream, { enabled: colorEnabled }) + var options = {} + if (gaugeTheme != null) options.theme = gaugeTheme + if (gaugeTemplate != null) options.template = gaugeTemplate + this.gauge = new Gauge(options, this.cursor) + } + + style = style || {} + if (style.fg) this.cursor.fg[style.fg]() + if (style.bg) this.cursor.bg[style.bg]() + if (style.bold) this.cursor.bold() + if (style.underline) this.cursor.underline() + if (style.inverse) this.cursor.inverse() + if (style.beep) this.cursor.beep() + this.cursor.write(msg).reset() +} + +log.addLevel = function (lvl, n, style, disp) { + if (!disp) disp = lvl + this.levels[lvl] = n + this.style[lvl] = style + if (!this[lvl]) this[lvl] = function () { + var a = new Array(arguments.length + 1) + a[0] = lvl + for (var i = 0; i < arguments.length; i ++) { + a[i + 1] = arguments[i] + } + return this.log.apply(this, a) + }.bind(this) + this.disp[lvl] = disp +} + +log.prefixStyle = { fg: 'magenta' } +log.headingStyle = { fg: 'white', bg: 'black' } + +log.style = {} +log.levels = {} +log.disp = {} +log.addLevel('silly', -Infinity, { inverse: true }, 'sill') +log.addLevel('verbose', 1000, { fg: 'blue', bg: 'black' }, 'verb') +log.addLevel('info', 2000, { fg: 'green' }) +log.addLevel('http', 3000, { fg: 'green', bg: 'black' }) +log.addLevel('warn', 4000, { fg: 'black', bg: 'yellow' }, 'WARN') +log.addLevel('error', 5000, { fg: 'red', bg: 'black' }, 'ERR!') +log.addLevel('silent', Infinity) + +// allow 'error' prefix +log.on('error', function(){}) diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/.npmignore b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/.npmignore similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/ansi/.npmignore rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/.npmignore diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/History.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/History.md similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/ansi/History.md rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/History.md diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/LICENSE similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/ansi/LICENSE rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/LICENSE diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/README.md similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/ansi/README.md rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/README.md diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/examples/beep/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/examples/beep/index.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/ansi/examples/beep/index.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/examples/beep/index.js diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/examples/clear/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/examples/clear/index.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/ansi/examples/clear/index.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/examples/clear/index.js diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/examples/cursorPosition.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/examples/cursorPosition.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/ansi/examples/cursorPosition.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/examples/cursorPosition.js diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/examples/progress/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/examples/progress/index.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/ansi/examples/progress/index.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/examples/progress/index.js diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/lib/ansi.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/lib/ansi.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/ansi/lib/ansi.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/lib/ansi.js diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/lib/newlines.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/lib/newlines.js similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/ansi/lib/newlines.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/lib/newlines.js diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/package.json similarity index 60% rename from deps/npm/node_modules/npmlog/node_modules/ansi/package.json rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/package.json index f02794d71e2188..ce2366e31e1044 100644 --- a/deps/npm/node_modules/npmlog/node_modules/ansi/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/package.json @@ -1,15 +1,33 @@ { "_args": [ [ - "ansi@~0.3.0", + { + "name": "ansi", + "raw": "ansi@~0.3.1", + "rawSpec": "~0.3.1", + "scope": null, + "spec": ">=0.3.1 <0.4.0", + "type": "range" + }, "/Users/rebecca/code/npm/node_modules/npmlog" + ], + [ + { + "name": "ansi", + "raw": "ansi@~0.3.1", + "rawSpec": "~0.3.1", + "scope": null, + "spec": ">=0.3.1 <0.4.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog" ] ], - "_from": "ansi@>=0.3.0 <0.4.0", + "_from": "ansi@~0.3.1", "_id": "ansi@0.3.1", "_inCache": true, "_installable": true, - "_location": "/npmlog/ansi", + "_location": "/node-gyp/npmlog/ansi", "_nodeVersion": "5.3.0", "_npmUser": { "email": "nathan@tootallnate.net", @@ -19,21 +37,21 @@ "_phantomChildren": {}, "_requested": { "name": "ansi", - "raw": "ansi@~0.3.0", - "rawSpec": "~0.3.0", + "raw": "ansi@~0.3.1", + "rawSpec": "~0.3.1", "scope": null, - "spec": ">=0.3.0 <0.4.0", + "spec": ">=0.3.1 <0.4.0", "type": "range" }, "_requiredBy": [ - "/npmlog", - "/npmlog/gauge" + "/node-gyp/npmlog", + "/node-gyp/npmlog/gauge" ], "_resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz", "_shasum": "0c42d4fb17160d5a9af1e484bace1c66922c1b21", "_shrinkwrap": null, - "_spec": "ansi@~0.3.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog", + "_spec": "ansi@~0.3.1", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog", "author": { "email": "nathan@tootallnate.net", "name": "Nathan Rajlich", @@ -48,30 +66,30 @@ "directories": {}, "dist": { "shasum": "0c42d4fb17160d5a9af1e484bace1c66922c1b21", - "tarball": "http://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz" + "tarball": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz" }, "gitHead": "4d0d4af94e0bdaa648bd7262acd3bde4b98d5246", "homepage": "https://github.com/TooTallNate/ansi.js#readme", "keywords": [ - "256", "ansi", - "color", - "cursor", "formatting", + "cursor", + "color", + "terminal", "rgb", - "stream", - "terminal" + "256", + "stream" ], "license": "MIT", "main": "./lib/ansi.js", "maintainers": [ { - "name": "TooTallNate", - "email": "nathan@tootallnate.net" + "email": "nathan@tootallnate.net", + "name": "TooTallNate" }, { - "name": "tootallnate", - "email": "nathan@tootallnate.net" + "email": "nathan@tootallnate.net", + "name": "tootallnate" } ], "name": "ansi", diff --git a/deps/npm/node_modules/abbrev/.npmignore b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/.npmignore similarity index 75% rename from deps/npm/node_modules/abbrev/.npmignore rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/.npmignore index 9d6cd2f025d4a6..bc818974f8633f 100644 --- a/deps/npm/node_modules/abbrev/.npmignore +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/.npmignore @@ -1,4 +1,5 @@ -.nyc_output -nyc_output +*~ +.#* node_modules coverage +.nyc_output diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/CHANGES.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/CHANGES.md new file mode 100644 index 00000000000000..e990b86ddfb416 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/CHANGES.md @@ -0,0 +1,19 @@ +Hi, figured we could actually use a changelog now: + +## 1.1.1 2016-01-29 + +* Fix a typo in stream completion tracker + +## 1.1.0 2016-01-29 + +* Rewrote completion percent computation to be low impact– no more walking a + tree of completion groups every time we need this info. Previously, with + medium sized tree of completion groups, even a relatively modest number of + calls to the top level `completed()` method would result in absurd numbers + of calls overall as it walked down the tree. We now, instead, keep track as + we bubble up changes, so the computation is limited to when data changes and + to the depth of that one branch, instead of _every_ node. (Plus, we were already + incurring _this_ cost, since we already bubbled out changes.) +* Moved different tracker types out to their own files. +* Made tests test for TOO MANY events too. +* Standarized the source code formatting diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/LICENSE new file mode 100644 index 00000000000000..af4588069db82d --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/LICENSE @@ -0,0 +1,5 @@ +Copyright (c) 2015, Rebecca Turner + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/README.md new file mode 100644 index 00000000000000..f8789800aa784c --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/README.md @@ -0,0 +1,194 @@ +are-we-there-yet +---------------- + +Track complex hiearchies of asynchronous task completion statuses. This is +intended to give you a way of recording and reporting the progress of the big +recursive fan-out and gather type workflows that are so common in async. + +What you do with this completion data is up to you, but the most common use case is to +feed it to one of the many progress bar modules. + +Most progress bar modules include a rudamentary version of this, but my +needs were more complex. + +Usage +===== + +```javascript +var TrackerGroup = require("are-we-there-yet").TrackerGroup + +var top = new TrackerGroup("program") + +var single = top.newItem("one thing", 100) +single.completeWork(20) + +console.log(top.completed()) // 0.2 + +fs.stat("file", function(er, stat) { + if (er) throw er + var stream = top.newStream("file", stat.size) + console.log(top.completed()) // now 0.1 as single is 50% of the job and is 20% complete + // and 50% * 20% == 10% + fs.createReadStream("file").pipe(stream).on("data", function (chunk) { + // do stuff with chunk + }) + top.on("change", function (name) { + // called each time a chunk is read from "file" + // top.completed() will start at 0.1 and fill up to 0.6 as the file is read + }) +}) +``` + +Shared Methods +============== + +All tracker objects described below have the following methods, they, along +with the event comprise the interface for consumers of tracker objects. + +* var completed = tracker.completed() + +Returns the ratio of completed work to work to be done. Range of 0 to 1. + +* tracker.finish() + +Marks the tracker as completed. With a TrackerGroup this marks all of its +components as completed. + +Marks all of the components of this tracker as finished, which in turn means +that `tracker.completed()` for this will now be 1. + +This will result in one or more `change` events being emitted. + +Events +====== + +All tracker objects emit `change` events with the following arguments: + +``` +function (name, completed, tracker) +``` + +`name` is the name of the tracker that originally emitted the event, +or if it didn't have one, the first containing tracker group that had one. + +`completed` is the percent complete (as returned by `tracker.completed()` method). + +`tracker` is the tracker object that you are listening for events on. + +TrackerGroup +============ + +* var tracker = new TrackerGroup(**name**) + + * **name** *(optional)* - The name of this tracker group, used in change + notifications if the component updating didn't have a name. Defaults to undefined. + +Creates a new empty tracker aggregation group. These are trackers whose +completion status is determined by the completion status of other trackers. + +* tracker.addUnit(**otherTracker**, **weight**) + + * **otherTracker** - Any of the other are-we-there-yet tracker objects + * **weight** *(optional)* - The weight to give the tracker, defaults to 1. + +Adds the **otherTracker** to this aggregation group. The weight determines +how long you expect this tracker to take to complete in proportion to other +units. So for instance, if you add one tracker with a weight of 1 and +another with a weight of 2, you're saying the second will take twice as long +to complete as the first. As such, the first will account for 33% of the +completion of this tracker and the second will account for the other 67%. + +Returns **otherTracker**. + +* var subGroup = tracker.newGroup(**name**, **weight**) + +The above is exactly equivalent to: + +```javascript + var subGroup = tracker.addUnit(new TrackerGroup(name), weight) +``` + +* var subItem = tracker.newItem(**name**, **todo**, **weight**) + +The above is exactly equivalent to: + +```javascript + var subItem = tracker.addUnit(new Tracker(name, todo), weight) +``` + +* var subStream = tracker.newStream(**name**, **todo**, **weight**) + +The above is exactly equivalent to: + +```javascript + var subStream = tracker.addUnit(new TrackerStream(name, todo), weight) +``` + +* console.log( tracker.debug() ) + +Returns a tree showing the completion of this tracker group and all of its +children, including recursively entering all of the children. + +Tracker +======= + +* var tracker = new Tracker(**name**, **todo**) + + * **name** *(optional)* The name of this counter to report in change + events. Defaults to undefined. + * **todo** *(optional)* The amount of work todo (a number). Defaults to 0. + +Ordinarily these are constructed as a part of a tracker group (via +`newItem`). + +* var completed = tracker.completed() + +Returns the ratio of completed work to work to be done. Range of 0 to 1. If +total work to be done is 0 then it will return 0. + +* tracker.addWork(**todo**) + + * **todo** A number to add to the amount of work to be done. + +Increases the amount of work to be done, thus decreasing the completion +percentage. Triggers a `change` event. + +* tracker.completeWork(**completed**) + + * **completed** A number to add to the work complete + +Increase the amount of work complete, thus increasing the completion percentage. +Will never increase the work completed past the amount of work todo. That is, +percentages > 100% are not allowed. Triggers a `change` event. + +* tracker.finish() + +Marks this tracker as finished, tracker.completed() will now be 1. Triggers +a `change` event. + +TrackerStream +============= + +* var tracker = new TrackerStream(**name**, **size**, **options**) + + * **name** *(optional)* The name of this counter to report in change + events. Defaults to undefined. + * **size** *(optional)* The number of bytes being sent through this stream. + * **options** *(optional)* A hash of stream options + +The tracker stream object is a pass through stream that updates an internal +tracker object each time a block passes through. It's intended to track +downloads, file extraction and other related activities. You use it by piping +your data source into it and then using it as your data source. + +If your data has a length attribute then that's used as the amount of work +completed when the chunk is passed through. If it does not (eg, object +streams) then each chunk counts as completing 1 unit of work, so your size +should be the total number of objects being streamed. + +* tracker.addWork(**todo**) + + * **todo** Increase the expected overall size by **todo** bytes. + +Increases the amount of work to be done, thus decreasing the completion +percentage. Triggers a `change` event. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/index.js new file mode 100644 index 00000000000000..57d8743fdad177 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/index.js @@ -0,0 +1,4 @@ +'use strict' +exports.TrackerGroup = require('./tracker-group.js') +exports.Tracker = require('./tracker.js') +exports.TrackerStream = require('./tracker-stream.js') diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/.npmignore b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/.npmignore new file mode 100644 index 00000000000000..c2658d7d1b3184 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/.npmignore @@ -0,0 +1 @@ +node_modules/ diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/History.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/History.md new file mode 100644 index 00000000000000..25959eab67b840 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/History.md @@ -0,0 +1,22 @@ + +1.0.0 / 2015-12-14 +================== + + * Merge pull request #12 from kasicka/master + * Add license text + +0.1.0 / 2014-10-17 +================== + + * adds `.fluent()` to api + +0.0.3 / 2014-01-13 +================== + + * fix receiver for .method() + +0.0.2 / 2014-01-13 +================== + + * Object.defineProperty() sucks + * Initial commit diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/License b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/License new file mode 100644 index 00000000000000..60de60addbe7e9 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/License @@ -0,0 +1,20 @@ +Copyright (c) 2015 TJ Holowaychuk + +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/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/Makefile b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/Makefile new file mode 100644 index 00000000000000..a9dcfd50dbdb22 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/Makefile @@ -0,0 +1,8 @@ + +test: + @./node_modules/.bin/mocha \ + --require should \ + --reporter spec \ + --bail + +.PHONY: test \ No newline at end of file diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/Readme.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/Readme.md new file mode 100644 index 00000000000000..ab8cf4ace15939 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/Readme.md @@ -0,0 +1,94 @@ + +# delegates + + Node method and accessor delegation utilty. + +## Installation + +``` +$ npm install delegates +``` + +## Example + +```js +var delegate = require('delegates'); + +... + +delegate(proto, 'request') + .method('acceptsLanguages') + .method('acceptsEncodings') + .method('acceptsCharsets') + .method('accepts') + .method('is') + .access('querystring') + .access('idempotent') + .access('socket') + .access('length') + .access('query') + .access('search') + .access('status') + .access('method') + .access('path') + .access('body') + .access('host') + .access('url') + .getter('subdomains') + .getter('protocol') + .getter('header') + .getter('stale') + .getter('fresh') + .getter('secure') + .getter('ips') + .getter('ip') +``` + +# API + +## Delegate(proto, prop) + +Creates a delegator instance used to configure using the `prop` on the given +`proto` object. (which is usually a prototype) + +## Delegate#method(name) + +Allows the given method `name` to be accessed on the host. + +## Delegate#getter(name) + +Creates a "getter" for the property with the given `name` on the delegated +object. + +## Delegate#setter(name) + +Creates a "setter" for the property with the given `name` on the delegated +object. + +## Delegate#access(name) + +Creates an "accessor" (ie: both getter *and* setter) for the property with the +given `name` on the delegated object. + +## Delegate#fluent(name) + +A unique type of "accessor" that works for a "fluent" API. When called as a +getter, the method returns the expected value. However, if the method is called +with a value, it will return itself so it can be chained. For example: + +```js +delegate(proto, 'request') + .fluent('query') + +// getter +var q = request.query(); + +// setter (chainable) +request + .query({ a: 1 }) + .query({ b: 2 }); +``` + +# License + + MIT diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/index.js new file mode 100644 index 00000000000000..17c222d52935c6 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/index.js @@ -0,0 +1,121 @@ + +/** + * Expose `Delegator`. + */ + +module.exports = Delegator; + +/** + * Initialize a delegator. + * + * @param {Object} proto + * @param {String} target + * @api public + */ + +function Delegator(proto, target) { + if (!(this instanceof Delegator)) return new Delegator(proto, target); + this.proto = proto; + this.target = target; + this.methods = []; + this.getters = []; + this.setters = []; + this.fluents = []; +} + +/** + * Delegate method `name`. + * + * @param {String} name + * @return {Delegator} self + * @api public + */ + +Delegator.prototype.method = function(name){ + var proto = this.proto; + var target = this.target; + this.methods.push(name); + + proto[name] = function(){ + return this[target][name].apply(this[target], arguments); + }; + + return this; +}; + +/** + * Delegator accessor `name`. + * + * @param {String} name + * @return {Delegator} self + * @api public + */ + +Delegator.prototype.access = function(name){ + return this.getter(name).setter(name); +}; + +/** + * Delegator getter `name`. + * + * @param {String} name + * @return {Delegator} self + * @api public + */ + +Delegator.prototype.getter = function(name){ + var proto = this.proto; + var target = this.target; + this.getters.push(name); + + proto.__defineGetter__(name, function(){ + return this[target][name]; + }); + + return this; +}; + +/** + * Delegator setter `name`. + * + * @param {String} name + * @return {Delegator} self + * @api public + */ + +Delegator.prototype.setter = function(name){ + var proto = this.proto; + var target = this.target; + this.setters.push(name); + + proto.__defineSetter__(name, function(val){ + return this[target][name] = val; + }); + + return this; +}; + +/** + * Delegator fluent accessor + * + * @param {String} name + * @return {Delegator} self + * @api public + */ + +Delegator.prototype.fluent = function (name) { + var proto = this.proto; + var target = this.target; + this.fluents.push(name); + + proto[name] = function(val){ + if ('undefined' != typeof val) { + this[target][name] = val; + return this; + } else { + return this[target][name]; + } + }; + + return this; +}; diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json new file mode 100644 index 00000000000000..502a040eda0f2e --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json @@ -0,0 +1,94 @@ +{ + "_args": [ + [ + { + "name": "delegates", + "raw": "delegates@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/are-we-there-yet" + ], + [ + { + "name": "delegates", + "raw": "delegates@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet" + ] + ], + "_from": "delegates@^1.0.0", + "_id": "delegates@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/node-gyp/npmlog/are-we-there-yet/delegates", + "_nodeVersion": "4.2.1", + "_npmUser": { + "email": "tj@vision-media.ca", + "name": "tjholowaychuk" + }, + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "name": "delegates", + "raw": "delegates@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/node-gyp/npmlog/are-we-there-yet" + ], + "_resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "_shasum": "84c6e159b81904fdca59a0ef44cd870d31250f9a", + "_shrinkwrap": null, + "_spec": "delegates@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet", + "bugs": { + "url": "https://github.com/visionmedia/node-delegates/issues" + }, + "dependencies": {}, + "description": "delegate methods and accessors to another property", + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "84c6e159b81904fdca59a0ef44cd870d31250f9a", + "tarball": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" + }, + "gitHead": "c4dc07ef1ed51c2b2a63f3585e5ef949ee577a49", + "homepage": "https://github.com/visionmedia/node-delegates#readme", + "keywords": [ + "delegate", + "delegation" + ], + "license": "MIT", + "maintainers": [ + { + "email": "tj@vision-media.ca", + "name": "tjholowaychuk" + }, + { + "email": "dominic@dbarnes.info", + "name": "dominicbarnes" + } + ], + "name": "delegates", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/visionmedia/node-delegates.git" + }, + "scripts": {}, + "version": "1.0.0" +} diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/test/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/test/index.js new file mode 100644 index 00000000000000..7b6e3d4df19d90 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/test/index.js @@ -0,0 +1,94 @@ + +var assert = require('assert'); +var delegate = require('..'); + +describe('.method(name)', function(){ + it('should delegate methods', function(){ + var obj = {}; + + obj.request = { + foo: function(bar){ + assert(this == obj.request); + return bar; + } + }; + + delegate(obj, 'request').method('foo'); + + obj.foo('something').should.equal('something'); + }) +}) + +describe('.getter(name)', function(){ + it('should delegate getters', function(){ + var obj = {}; + + obj.request = { + get type() { + return 'text/html'; + } + } + + delegate(obj, 'request').getter('type'); + + obj.type.should.equal('text/html'); + }) +}) + +describe('.setter(name)', function(){ + it('should delegate setters', function(){ + var obj = {}; + + obj.request = { + get type() { + return this._type.toUpperCase(); + }, + + set type(val) { + this._type = val; + } + } + + delegate(obj, 'request').setter('type'); + + obj.type = 'hey'; + obj.request.type.should.equal('HEY'); + }) +}) + +describe('.access(name)', function(){ + it('should delegate getters and setters', function(){ + var obj = {}; + + obj.request = { + get type() { + return this._type.toUpperCase(); + }, + + set type(val) { + this._type = val; + } + } + + delegate(obj, 'request').access('type'); + + obj.type = 'hey'; + obj.type.should.equal('HEY'); + }) +}) + +describe('.fluent(name)', function () { + it('should delegate in a fluent fashion', function () { + var obj = { + settings: { + env: 'development' + } + }; + + delegate(obj, 'settings').fluent('env'); + + obj.env().should.equal('development'); + obj.env('production').should.equal(obj); + obj.settings.env.should.equal('production'); + }) +}) diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/package.json new file mode 100644 index 00000000000000..bab98d6812a80a --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + { + "name": "are-we-there-yet", + "raw": "are-we-there-yet@~1.1.2", + "rawSpec": "~1.1.2", + "scope": null, + "spec": ">=1.1.2 <1.2.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/npmlog" + ], + [ + { + "name": "are-we-there-yet", + "raw": "are-we-there-yet@~1.1.2", + "rawSpec": "~1.1.2", + "scope": null, + "spec": ">=1.1.2 <1.2.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog" + ] + ], + "_from": "are-we-there-yet@~1.1.2", + "_id": "are-we-there-yet@1.1.2", + "_inCache": true, + "_installable": true, + "_location": "/node-gyp/npmlog/are-we-there-yet", + "_nodeVersion": "4.2.2", + "_npmOperationalInternal": { + "host": "packages-13-west.internal.npmjs.com", + "tmp": "tmp/are-we-there-yet-1.1.2.tgz_1458084397358_0.15847722673788667" + }, + "_npmUser": { + "email": "me@re-becca.org", + "name": "iarna" + }, + "_npmVersion": "3.8.1", + "_phantomChildren": {}, + "_requested": { + "name": "are-we-there-yet", + "raw": "are-we-there-yet@~1.1.2", + "rawSpec": "~1.1.2", + "scope": null, + "spec": ">=1.1.2 <1.2.0", + "type": "range" + }, + "_requiredBy": [ + "/node-gyp/npmlog" + ], + "_resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz", + "_shasum": "80e470e95a084794fe1899262c5667c6e88de1b3", + "_shrinkwrap": null, + "_spec": "are-we-there-yet@~1.1.2", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog", + "author": { + "name": "Rebecca Turner", + "url": "http://re-becca.org" + }, + "bugs": { + "url": "https://github.com/iarna/are-we-there-yet/issues" + }, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.0 || ^1.1.13" + }, + "description": "Keep track of the overall completion of many dispirate processes", + "devDependencies": { + "standard": "^6.0.8", + "tap": "^5.7.0" + }, + "directories": {}, + "dist": { + "shasum": "80e470e95a084794fe1899262c5667c6e88de1b3", + "tarball": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz" + }, + "gitHead": "dd5706e2204cb681e78031d0ffe156ed4cc75823", + "homepage": "https://github.com/iarna/are-we-there-yet", + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "email": "me@re-becca.org", + "name": "iarna" + } + ], + "name": "are-we-there-yet", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/iarna/are-we-there-yet.git" + }, + "scripts": { + "test": "standard && tap test/*.js" + }, + "version": "1.1.2" +} diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/lib/test-event.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/lib/test-event.js new file mode 100644 index 00000000000000..2aa7c05c5864fa --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/lib/test-event.js @@ -0,0 +1,29 @@ +'use strict' +var util = require('util') + +module.exports = function (obj, event, next) { + var timeout = setTimeout(gotTimeout, 10) + obj.once(event, gotResult) + + function gotTimeout () { + obj.removeListener(event, gotResult) + next(new Error('Timeout listening for ' + event)) + } + var result = [] + function gotResult () { + result = Array.prototype.slice.call(arguments) + clearTimeout(timeout) + timeout = setTimeout(gotNoMoreResults, 10) + obj.once(event, gotTooManyResults) + } + function gotNoMoreResults () { + obj.removeListener(event, gotTooManyResults) + var args = [null].concat(result) + next.apply(null, args) + } + function gotTooManyResults () { + var secondResult = Array.prototype.slice.call(arguments) + clearTimeout(timeout) + next(new Error('Got too many results, first ' + util.inspect(result) + ' and then ' + util.inspect(secondResult))) + } +} diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/tracker.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/tracker.js new file mode 100644 index 00000000000000..374c7739d0c011 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/tracker.js @@ -0,0 +1,57 @@ +'use strict' +var test = require('tap').test +var Tracker = require('../index.js').Tracker + +var testEvent = require('./lib/test-event.js') + +var name = 'test' + +test('initialization', function (t) { + var simple = new Tracker(name) + + t.is(simple.completed(), 0, 'Nothing todo is 0 completion') + t.done() +}) + +var track +var todo = 100 +test('completion', function (t) { + track = new Tracker(name, todo) + t.is(track.completed(), 0, 'Nothing done is 0 completion') + + testEvent(track, 'change', afterCompleteWork) + + track.completeWork(todo) + t.is(track.completed(), 1, 'completeWork: 100% completed') + + function afterCompleteWork (er, onChangeName) { + t.is(er, null, 'completeWork: on change event fired') + t.is(onChangeName, name, 'completeWork: on change emits the correct name') + t.done() + } +}) + +test('add more work', function (t) { + testEvent(track, 'change', afterAddWork) + track.addWork(todo) + t.is(track.completed(), 0.5, 'addWork: 50% completed') + function afterAddWork (er, onChangeName) { + t.is(er, null, 'addWork: on change event fired') + t.is(onChangeName, name, 'addWork: on change emits the correct name') + t.done() + } +}) + +test('complete more work', function (t) { + track.completeWork(200) + t.is(track.completed(), 1, 'completeWork: Over completion is still only 100% complete') + t.done() +}) + +test('finish is always 100%', function (t) { + var finishtest = new Tracker(name, todo) + finishtest.completeWork(50) + finishtest.finish() + t.is(finishtest.completed(), 1, 'finish: Explicitly finishing moves to 100%') + t.done() +}) diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/trackergroup.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/trackergroup.js new file mode 100644 index 00000000000000..799a7670b65934 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/trackergroup.js @@ -0,0 +1,96 @@ +'use strict' +var test = require('tap').test +var TrackerGroup = require('../index.js').TrackerGroup +var testEvent = require('./lib/test-event.js') + +test('TrackerGroup', function (t) { + var name = 'test' + + var track = new TrackerGroup(name) + t.is(track.completed(), 0, 'Nothing todo is 0 completion') + testEvent(track, 'change', afterFinishEmpty) + track.finish() + var a, b + function afterFinishEmpty (er, onChangeName, completion) { + t.is(er, null, 'finishEmpty: on change event fired') + t.is(onChangeName, name, 'finishEmpty: on change emits the correct name') + t.is(completion, 1, 'finishEmpty: passed through completion was correct') + t.is(track.completed(), 1, 'finishEmpty: Finishing an empty group actually finishes it') + + track = new TrackerGroup(name) + a = track.newItem('a', 10, 1) + b = track.newItem('b', 10, 1) + t.is(track.completed(), 0, 'Initially empty') + testEvent(track, 'change', afterCompleteWork) + a.completeWork(5) + } + function afterCompleteWork (er, onChangeName, completion) { + t.is(er, null, 'on change event fired') + t.is(onChangeName, 'a', 'on change emits the correct name') + t.is(completion, 0.25, 'Complete half of one is a quarter overall') + t.is(track.completed(), 0.25, 'Complete half of one is a quarter overall') + testEvent(track, 'change', afterFinishAll) + track.finish() + } + function afterFinishAll (er, onChangeName, completion) { + t.is(er, null, 'finishAll: on change event fired') + t.is(onChangeName, name, 'finishAll: on change emits the correct name') + t.is(completion, 1, 'Finishing everything ') + t.is(track.completed(), 1, 'Finishing everything ') + + track = new TrackerGroup(name) + a = track.newItem('a', 10, 2) + b = track.newItem('b', 10, 1) + t.is(track.completed(), 0, 'weighted: Initially empty') + testEvent(track, 'change', afterWeightedCompleteWork) + a.completeWork(5) + } + function afterWeightedCompleteWork (er, onChangeName, completion) { + t.is(er, null, 'weighted: on change event fired') + t.is(onChangeName, 'a', 'weighted: on change emits the correct name') + t.is(Math.floor(completion * 100), 33, 'weighted: Complete half of double weighted') + t.is(Math.floor(track.completed() * 100), 33, 'weighted: Complete half of double weighted') + testEvent(track, 'change', afterWeightedFinishAll) + track.finish() + } + function afterWeightedFinishAll (er, onChangeName, completion) { + t.is(er, null, 'weightedFinishAll: on change event fired') + t.is(onChangeName, name, 'weightedFinishAll: on change emits the correct name') + t.is(completion, 1, 'weightedFinishaAll: Finishing everything ') + t.is(track.completed(), 1, 'weightedFinishaAll: Finishing everything ') + + track = new TrackerGroup(name) + a = track.newGroup('a', 10) + b = track.newGroup('b', 10) + var a1 = a.newItem('a.1', 10) + a1.completeWork(5) + t.is(track.completed(), 0.25, 'nested: Initially quarter done') + testEvent(track, 'change', afterNestedComplete) + b.finish() + } + function afterNestedComplete (er, onChangeName, completion) { + t.is(er, null, 'nestedComplete: on change event fired') + t.is(onChangeName, 'b', 'nestedComplete: on change emits the correct name') + t.is(completion, 0.75, 'nestedComplete: Finishing everything ') + t.is(track.completed(), 0.75, 'nestedComplete: Finishing everything ') + t.end() + } +}) + +test('cycles', function (t) { + var track = new TrackerGroup('top') + testCycle(track, track) + var layer1 = track.newGroup('layer1') + testCycle(layer1, track) + t.end() + + function testCycle (addTo, toAdd) { + try { + addTo.addUnit(toAdd) + t.fail(toAdd.name) + } catch (ex) { + console.log(ex) + t.pass(toAdd.name) + } + } +}) diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/trackerstream.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/trackerstream.js new file mode 100644 index 00000000000000..65f04b03769190 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/trackerstream.js @@ -0,0 +1,51 @@ +'use strict' +var test = require('tap').test +var util = require('util') +var stream = require('readable-stream') +var TrackerStream = require('../index.js').TrackerStream +var testEvent = require('./lib/test-event.js') + +var Sink = function () { + stream.Writable.apply(this, arguments) +} +util.inherits(Sink, stream.Writable) +Sink.prototype._write = function (data, encoding, cb) { + cb() +} + +test('TrackerStream', function (t) { + t.plan(9) + + var name = 'test' + var track = new TrackerStream(name) + + t.is(track.completed(), 0, 'Nothing todo is 0 completion') + + var todo = 10 + track = new TrackerStream(name, todo) + t.is(track.completed(), 0, 'Nothing done is 0 completion') + + track.pipe(new Sink()) + + testEvent(track, 'change', afterCompleteWork) + track.write('0123456789') + function afterCompleteWork (er, onChangeName) { + t.is(er, null, 'write: on change event fired') + t.is(onChangeName, name, 'write: on change emits the correct name') + t.is(track.completed(), 1, 'write: 100% completed') + + testEvent(track, 'change', afterAddWork) + track.addWork(10) + } + function afterAddWork (er, onChangeName) { + t.is(er, null, 'addWork: on change event fired') + t.is(track.completed(), 0.5, 'addWork: 50% completed') + + testEvent(track, 'change', afterAllWork) + track.write('ABCDEFGHIJKLMNOPQRST') + } + function afterAllWork (er) { + t.is(er, null, 'allWork: on change event fired') + t.is(track.completed(), 1, 'allWork: 100% completed') + } +}) diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker-base.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker-base.js new file mode 100644 index 00000000000000..6f436875578a7a --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker-base.js @@ -0,0 +1,11 @@ +'use strict' +var EventEmitter = require('events').EventEmitter +var util = require('util') + +var trackerId = 0 +var TrackerBase = module.exports = function (name) { + EventEmitter.call(this) + this.id = ++trackerId + this.name = name +} +util.inherits(TrackerBase, EventEmitter) diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker-group.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker-group.js new file mode 100644 index 00000000000000..9759e1226db046 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker-group.js @@ -0,0 +1,107 @@ +'use strict' +var util = require('util') +var TrackerBase = require('./tracker-base.js') +var Tracker = require('./tracker.js') +var TrackerStream = require('./tracker-stream.js') + +var TrackerGroup = module.exports = function (name) { + TrackerBase.call(this, name) + this.parentGroup = null + this.trackers = [] + this.completion = {} + this.weight = {} + this.totalWeight = 0 + this.finished = false + this.bubbleChange = bubbleChange(this) +} +util.inherits(TrackerGroup, TrackerBase) + +function bubbleChange (trackerGroup) { + return function (name, completed, tracker) { + trackerGroup.completion[tracker.id] = completed + if (trackerGroup.finished) return + trackerGroup.emit('change', name || trackerGroup.name, trackerGroup.completed(), trackerGroup) + } +} + +TrackerGroup.prototype.nameInTree = function () { + var names = [] + var from = this + while (from) { + names.unshift(from.name) + from = from.parentGroup + } + return names.join('/') +} + +TrackerGroup.prototype.addUnit = function (unit, weight) { + if (unit.addUnit) { + var toTest = this + while (toTest) { + if (unit === toTest) { + throw new Error( + 'Attempted to add tracker group ' + + unit.name + ' to tree that already includes it ' + + this.nameInTree(this)) + } + toTest = toTest.parentGroup + } + unit.parentGroup = this + } + this.weight[unit.id] = weight || 1 + this.totalWeight += this.weight[unit.id] + this.trackers.push(unit) + this.completion[unit.id] = unit.completed() + unit.on('change', this.bubbleChange) + if (!this.finished) this.emit('change', unit.name, this.completion[unit.id], unit) + return unit +} + +TrackerGroup.prototype.completed = function () { + if (this.trackers.length === 0) return 0 + var valPerWeight = 1 / this.totalWeight + var completed = 0 + for (var ii = 0; ii < this.trackers.length; ii++) { + var trackerId = this.trackers[ii].id + completed += valPerWeight * this.weight[trackerId] * this.completion[trackerId] + } + return completed +} + +TrackerGroup.prototype.newGroup = function (name, weight) { + return this.addUnit(new TrackerGroup(name), weight) +} + +TrackerGroup.prototype.newItem = function (name, todo, weight) { + return this.addUnit(new Tracker(name, todo), weight) +} + +TrackerGroup.prototype.newStream = function (name, todo, weight) { + return this.addUnit(new TrackerStream(name, todo), weight) +} + +TrackerGroup.prototype.finish = function () { + this.finished = true + if (!this.trackers.length) this.addUnit(new Tracker(), 1, true) + for (var ii = 0; ii < this.trackers.length; ii++) { + var tracker = this.trackers[ii] + tracker.finish() + tracker.removeListener('change', this.bubbleChange) + } + this.emit('change', this.name, 1, this) +} + +var buffer = ' ' +TrackerGroup.prototype.debug = function (depth) { + depth = depth || 0 + var indent = depth ? buffer.substr(0, depth) : '' + var output = indent + (this.name || 'top') + ': ' + this.completed() + '\n' + this.trackers.forEach(function (tracker) { + if (tracker instanceof TrackerGroup) { + output += tracker.debug(depth + 1) + } else { + output += indent + ' ' + tracker.name + ': ' + tracker.completed() + '\n' + } + }) + return output +} diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker-stream.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker-stream.js new file mode 100644 index 00000000000000..fb9598ed4e9c31 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker-stream.js @@ -0,0 +1,35 @@ +'use strict' +var util = require('util') +var stream = require('readable-stream') +var delegate = require('delegates') +var Tracker = require('./tracker.js') + +var TrackerStream = module.exports = function (name, size, options) { + stream.Transform.call(this, options) + this.tracker = new Tracker(name, size) + this.name = name + this.id = this.tracker.id + this.tracker.on('change', delegateChange(this)) +} +util.inherits(TrackerStream, stream.Transform) + +function delegateChange (trackerStream) { + return function (name, completion, tracker) { + trackerStream.emit('change', name, completion, trackerStream) + } +} + +TrackerStream.prototype._transform = function (data, encoding, cb) { + this.tracker.completeWork(data.length ? data.length : 1) + this.push(data) + cb() +} + +TrackerStream.prototype._flush = function (cb) { + this.tracker.finish() + cb() +} + +delegate(TrackerStream.prototype, 'tracker') + .method('completed') + .method('addWork') diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker.js new file mode 100644 index 00000000000000..68c2339b45409a --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/are-we-there-yet/tracker.js @@ -0,0 +1,30 @@ +'use strict' +var util = require('util') +var TrackerBase = require('./tracker-base.js') + +var Tracker = module.exports = function (name, todo) { + TrackerBase.call(this, name) + this.workDone = 0 + this.workTodo = todo || 0 +} +util.inherits(Tracker, TrackerBase) + +Tracker.prototype.completed = function () { + return this.workTodo === 0 ? 0 : this.workDone / this.workTodo +} + +Tracker.prototype.addWork = function (work) { + this.workTodo += work + this.emit('change', this.name, this.completed(), this) +} + +Tracker.prototype.completeWork = function (work) { + this.workDone += work + if (this.workDone > this.workTodo) this.workDone = this.workTodo + this.emit('change', this.name, this.completed(), this) +} + +Tracker.prototype.finish = function () { + this.workTodo = this.workDone = 1 + this.emit('change', this.name, 1, this) +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/.npmignore b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/.npmignore similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/.npmignore rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/.npmignore diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/LICENSE new file mode 100644 index 00000000000000..e756052969b780 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2014, Rebecca Turner + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/README.md new file mode 100644 index 00000000000000..337dc9d8d45e14 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/README.md @@ -0,0 +1,166 @@ +gauge +===== + +A nearly stateless terminal based horizontal gauge / progress bar. + +```javascript +var Gauge = require("gauge") + +var gauge = new Gauge() + +gauge.show("test", 0.20) + +gauge.pulse("this") + +gauge.hide() +``` + +![](example.png) + + +### `var gauge = new Gauge([options], [ansiStream])` + +* **options** – *(optional)* An option object. (See [below] for details.) +* **ansiStream** – *(optional)* A stream that's been blessed by the [ansi] + module to include various commands for controlling the cursor in a terminal. + +[ansi]: https://www.npmjs.com/package/ansi +[below]: #theme-objects + +Constructs a new gauge. Gauges are drawn on a single line, and are not drawn +if the current terminal isn't a tty. + +If you resize your terminal in a way that can be detected then the gauge +will be drawn at the new size. As a general rule, growing your terminal will +be clean, but shrinking your terminal will result in cruft as we don't have +enough information to know where what we wrote previously is now located. + +The **options** object can have the following properties, all of which are +optional: + +* maxUpdateFrequency: defaults to 50 msec, the gauge will not be drawn more + than once in this period of time. This applies to `show` and `pulse` + calls, but if you `hide` and then `show` the gauge it will draw it + regardless of time since last draw. +* theme: defaults to Gauge.unicode` if the terminal supports + unicode according to [has-unicode], otherwise it defaults to `Gauge.ascii`. + Details on the [theme object](#theme-objects) are documented elsewhere. +* template: see [documentation elsewhere](#template-objects) for + defaults and details. + +[has-unicode]: https://www.npmjs.com/package/has-unicode + +If **ansiStream** isn't passed in, then one will be constructed from stderr +with `ansi(process.stderr)`. + +### `gauge.show([name, [completed]])` + +* **name** – *(optional)* The name of the current thing contributing to progress. Defaults to the last value used, or "". +* **completed** – *(optional)* The portion completed as a value between 0 and 1. Defaults to the last value used, or 0. + +If `process.stdout.isTTY` is false then this does nothing. If completed is 0 +and `gauge.pulse` has never been called, then similarly nothing will be printed. + +If `maxUpdateFrequency` msec haven't passed since the last call to `show` or +`pulse` then similarly, nothing will be printed. (Actually, the update is +deferred until `maxUpdateFrequency` msec have passed and if nothing else has +happened, the gauge update will happen.) + +### `gauge.hide()` + +Removes the gauge from the terminal. + +### `gauge.pulse([name])` + +* **name** – *(optional)* The specific thing that triggered this pulse + +Spins the spinner in the gauge to show output. If **name** is included then +it will be combined with the last name passed to `gauge.show` using the +subsection property of the theme (typically a right facing arrow). + +### `gauge.disable()` + +Hides the gauge and ignores further calls to `show` or `pulse`. + +### `gauge.enable()` + +Shows the gauge and resumes updating when `show` or `pulse` is called. + +### `gauge.setTheme(theme)` + +Change the active theme, will be displayed with the next show or pulse + +### `gauge.setTemplate(template)` + +Change the active template, will be displayed with the next show or pulse + +### Theme Objects + +There are two theme objects available as a part of the module, `Gauge.unicode` and `Gauge.ascii`. +Theme objects have the follow properties: + +| Property | Unicode | ASCII | +| ---------- | ------- | ----- | +| startgroup | ╢ | \| | +| endgroup | ╟ | \| | +| complete | █ | # | +| incomplete | ░ | - | +| spinner | ▀▐▄▌ | -\\\|/ | +| subsection | → | -> | + +*startgroup*, *endgroup* and *subsection* can be as many characters as you want. + +*complete* and *incomplete* should be a single character width each. + +*spinner* is a list of characters to use in turn when displaying an activity +spinner. The Gauge will spin as many characters as you give here. + +### Template Objects + +A template is an array of objects and strings that, after being evaluated, +will be turned into the gauge line. The default template is: + +```javascript +[ + {type: "name", separated: true, maxLength: 25, minLength: 25, align: "left"}, + {type: "spinner", separated: true}, + {type: "startgroup"}, + {type: "completionbar"}, + {type: "endgroup"} +] +``` + +The various template elements can either be **plain strings**, in which case they will +be be included verbatum in the output. + +If the template element is an object, it can have the following keys: + +* *type* can be: + * `name` – The most recent name passed to `show`; if this is in response to a + `pulse` then the name passed to `pulse` will be appended along with the + subsection property from the theme. + * `spinner` – If you've ever called `pulse` this will be one of the characters + from the spinner property of the theme. + * `startgroup` – The `startgroup` property from the theme. + * `completionbar` – This progress bar itself + * `endgroup` – The `endgroup` property from the theme. +* *separated* – If true, the element will be separated with spaces from things on + either side (and margins count as space, so it won't be indented), but only + if its included. +* *maxLength* – The maximum length for this element. If its value is longer it + will be truncated. +* *minLength* – The minimum length for this element. If its value is shorter it + will be padded according to the *align* value. +* *align* – (Default: left) Possible values "left", "right" and "center". Works + as you'd expect from word processors. +* *length* – Provides a single value for both *minLength* and *maxLength*. If both + *length* and *minLength or *maxLength* are specifed then the latter take precedence. + +### Tracking Completion + +If you have more than one thing going on that you want to track completion +of, you may find the related [are-we-there-yet] helpful. It's `change` +event can be wired up to the `show` method to get a more traditional +progress bar interface. + +[are-we-there-yet]: https://www.npmjs.com/package/are-we-there-yet diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/example.png b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/example.png similarity index 100% rename from deps/npm/node_modules/npmlog/node_modules/gauge/example.png rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/example.png diff --git a/deps/npm/node_modules/lodash.keys/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/LICENSE similarity index 100% rename from deps/npm/node_modules/lodash.keys/LICENSE rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/LICENSE diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md similarity index 80% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md index f43453bf2e04eb..57fb585913f433 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md @@ -1,4 +1,4 @@ -# lodash.pad v4.1.0 +# lodash.pad v4.4.0 The [lodash](https://lodash.com/) method `_.pad` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var pad = require('lodash.pad'); ``` -See the [documentation](https://lodash.com/docs#pad) or [package source](https://github.com/lodash/lodash/blob/4.1.0-npm-packages/lodash.pad) for more details. +See the [documentation](https://lodash.com/docs#pad) or [package source](https://github.com/lodash/lodash/blob/4.4.0-npm-packages/lodash.pad) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js similarity index 57% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js index 6220e0f831a714..876fbb967490ae 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js @@ -1,22 +1,25 @@ /** - * lodash 4.1.0 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation + * Copyright jQuery Foundation and other contributors + * Released under MIT license * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ -var repeat = require('lodash.repeat'), +var baseSlice = require('lodash._baseslice'), + baseToString = require('lodash._basetostring'), toString = require('lodash.tostring'); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 1.7976931348623157e+308, NAN = 0 / 0; /** `Object#toString` result references. */ var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; + genTag = '[object GeneratorFunction]', + symbolTag = '[object Symbol]'; /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g; @@ -95,7 +98,8 @@ function stringToArray(string) { var objectProto = Object.prototype; /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -104,30 +108,69 @@ var objectToString = objectProto.toString; var nativeCeil = Math.ceil, nativeFloor = Math.floor; +/** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ +function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; +} + +/** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ +function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); +} + /** * Creates the padding for `string` based on `length`. The `chars` string * is truncated if the number of characters exceeds `length`. * * @private - * @param {string} string The string to create padding for. - * @param {number} [length=0] The padding length. + * @param {number} length The padding length. * @param {string} [chars=' '] The string used as padding. * @returns {string} Returns the padding for `string`. */ -function createPadding(string, length, chars) { - length = toInteger(length); +function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); - var strLength = stringSize(string); - if (!length || strLength >= length) { - return ''; + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; } - var padLength = length - strLength; - chars = chars === undefined ? ' ' : (chars + ''); - - var result = repeat(chars, nativeCeil(padLength / stringSize(chars))); + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); return reHasComplexSymbol.test(chars) - ? stringToArray(result).slice(0, padLength).join('') - : result.slice(0, padLength); + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); } /** @@ -135,9 +178,11 @@ function createPadding(string, length, chars) { * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. * @example * * _.isFunction(_); @@ -148,18 +193,20 @@ function createPadding(string, length, chars) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } /** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. @@ -183,30 +230,80 @@ function isObject(value) { } /** - * Converts `value` to an integer. + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". * - * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 * @category Lang * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. + * @returns {number} Returns the converted number. * @example * - * _.toInteger(3); - * // => 3 + * _.toFinite(3.2); + * // => 3.2 * - * _.toInteger(Number.MIN_VALUE); - * // => 0 + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 * - * _.toInteger(Infinity); + * _.toFinite(Infinity); * // => 1.7976931348623157e+308 * - * _.toInteger('3'); - * // => 3 + * _.toFinite('3.2'); + * // => 3.2 */ -function toInteger(value) { +function toFinite(value) { if (!value) { return value === 0 ? value : 0; } @@ -215,8 +312,40 @@ function toInteger(value) { var sign = (value < 0 ? -1 : 1); return sign * MAX_INTEGER; } - var remainder = value % 1; - return value === value ? (remainder ? value - remainder : value) : 0; + return value === value ? value : 0; +} + +/** + * Converts `value` to an integer. + * + * **Note:** This function is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ +function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; } /** @@ -224,13 +353,14 @@ function toInteger(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {number} Returns the number. * @example * - * _.toNumber(3); - * // => 3 + * _.toNumber(3.2); + * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 @@ -238,10 +368,16 @@ function toInteger(value) { * _.toNumber(Infinity); * // => Infinity * - * _.toNumber('3'); - * // => 3 + * _.toNumber('3.2'); + * // => 3.2 */ function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } if (isObject(value)) { var other = isFunction(value.valueOf) ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; @@ -262,6 +398,7 @@ function toNumber(value) { * * @static * @memberOf _ + * @since 3.0.0 * @category String * @param {string} [string=''] The string to pad. * @param {number} [length=0] The padding length. @@ -282,15 +419,16 @@ function pad(string, length, chars) { string = toString(string); length = toInteger(length); - var strLength = stringSize(string); + var strLength = length ? stringSize(string) : 0; if (!length || strLength >= length) { return string; } - var mid = (length - strLength) / 2, - leftLength = nativeFloor(mid), - rightLength = nativeCeil(mid); - - return createPadding('', leftLength, chars) + string + createPadding('', rightLength, chars); + var mid = (length - strLength) / 2; + return ( + createPadding(nativeFloor(mid), chars) + + string + + createPadding(nativeCeil(mid), chars) + ); } module.exports = pad; diff --git a/deps/npm/node_modules/lodash.isarray/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/LICENSE similarity index 100% rename from deps/npm/node_modules/lodash.isarray/LICENSE rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/LICENSE diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/README.md new file mode 100644 index 00000000000000..8cd4181ccdc00d --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/README.md @@ -0,0 +1,18 @@ +# lodash._baseslice v4.0.0 + +The internal [lodash](https://lodash.com/) function `baseSlice` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._baseslice +``` + +In Node.js: +```js +var baseSlice = require('lodash._baseslice'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash._baseslice) for more details. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/index.js new file mode 100644 index 00000000000000..59293c3d0037a8 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/index.js @@ -0,0 +1,40 @@ +/** + * lodash 4.0.0 (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright 2012-2016 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +module.exports = baseSlice; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/package.json similarity index 55% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/package.json rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/package.json index b9946dcdbf7951..3be3e7b990dce3 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._baseslice/package.json @@ -1,42 +1,45 @@ { "_args": [ [ - "lodash.repeat@^4.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" + { + "name": "lodash._baseslice", + "raw": "lodash._baseslice@~4.0.0", + "rawSpec": "~4.0.0", + "scope": null, + "spec": ">=4.0.0 <4.1.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" ] ], - "_from": "lodash.repeat@>=4.0.0 <5.0.0", - "_id": "lodash.repeat@4.0.0", + "_from": "lodash._baseslice@>=4.0.0 <4.1.0", + "_id": "lodash._baseslice@4.0.0", "_inCache": true, "_installable": true, - "_location": "/npmlog/gauge/lodash.pad/lodash.repeat", - "_nodeVersion": "5.5.0", - "_npmOperationalInternal": { - "host": "packages-9-west.internal.npmjs.com", - "tmp": "tmp/lodash.repeat-4.0.0.tgz_1455602646227_0.7481637196615338" - }, + "_location": "/node-gyp/npmlog/gauge/lodash.pad/lodash._baseslice", + "_nodeVersion": "5.4.0", "_npmUser": { "email": "john.david.dalton@gmail.com", "name": "jdalton" }, - "_npmVersion": "2.14.18", + "_npmVersion": "2.14.15", "_phantomChildren": {}, "_requested": { - "name": "lodash.repeat", - "raw": "lodash.repeat@^4.0.0", - "rawSpec": "^4.0.0", + "name": "lodash._baseslice", + "raw": "lodash._baseslice@~4.0.0", + "rawSpec": "~4.0.0", "scope": null, - "spec": ">=4.0.0 <5.0.0", + "spec": ">=4.0.0 <4.1.0", "type": "range" }, "_requiredBy": [ - "/npmlog/gauge/lodash.pad" + "/node-gyp/npmlog/gauge/lodash.pad" ], - "_resolved": "https://registry.npmjs.org/lodash.repeat/-/lodash.repeat-4.0.0.tgz", - "_shasum": "aaf570b2ab0bfb0dda6d6e93291d54b30b1f7d22", + "_resolved": "https://registry.npmjs.org/lodash._baseslice/-/lodash._baseslice-4.0.0.tgz", + "_shasum": "f5ce1df982948ecaff63f223853415b7b9763704", "_shrinkwrap": null, - "_spec": "lodash.repeat@^4.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad", + "_spec": "lodash._baseslice@~4.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad", "author": { "email": "john.david.dalton@gmail.com", "name": "John-David Dalton", @@ -62,22 +65,16 @@ "url": "https://mathiasbynens.be/" } ], - "dependencies": { - "lodash.tostring": "^4.0.0" - }, - "description": "The lodash method `_.repeat` exported as a module.", + "dependencies": {}, + "description": "The internal lodash function `baseSlice` exported as a module.", "devDependencies": {}, "directories": {}, "dist": { - "shasum": "aaf570b2ab0bfb0dda6d6e93291d54b30b1f7d22", - "tarball": "http://registry.npmjs.org/lodash.repeat/-/lodash.repeat-4.0.0.tgz" + "shasum": "f5ce1df982948ecaff63f223853415b7b9763704", + "tarball": "https://registry.npmjs.org/lodash._baseslice/-/lodash._baseslice-4.0.0.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "repeat" - ], "license": "MIT", "maintainers": [ { @@ -93,7 +90,7 @@ "name": "phated" } ], - "name": "lodash.repeat", + "name": "lodash._baseslice", "optionalDependencies": {}, "readme": "ERROR: No README data found!", "repository": { diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/LICENSE new file mode 100644 index 00000000000000..e0c69d56032d15 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/README.md new file mode 100644 index 00000000000000..ba060c94dadea0 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/README.md @@ -0,0 +1,18 @@ +# lodash._basetostring v4.12.0 + +The internal [lodash](https://lodash.com/) function `baseToString` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._basetostring +``` + +In Node.js: +```js +var baseToString = require('lodash._basetostring'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/4.12.0-npm-packages/lodash._basetostring) for more details. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/index.js new file mode 100644 index 00000000000000..d5848107499c34 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/index.js @@ -0,0 +1,153 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** Used to determine if values are of the language type `Object`. */ +var objectTypes = { + 'function': true, + 'object': true +}; + +/** Detect free variable `exports`. */ +var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) + ? exports + : undefined; + +/** Detect free variable `module`. */ +var freeModule = (objectTypes[typeof module] && module && !module.nodeType) + ? module + : undefined; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + +/** Detect free variable `self`. */ +var freeSelf = checkGlobal(objectTypes[typeof self] && self); + +/** Detect free variable `window`. */ +var freeWindow = checkGlobal(objectTypes[typeof window] && window); + +/** Detect `this` as the global object. */ +var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + +/** + * Used as a reference to the global object. + * + * The `this` value is used if it's the global object to avoid Greasemonkey's + * restricted `window` object, otherwise the `window` object is used. + */ +var root = freeGlobal || + ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || + freeSelf || thisGlobal || Function('return this')(); + +/** + * Checks if `value` is a global object. + * + * @private + * @param {*} value The value to check. + * @returns {null|Object} Returns `value` if it's a global object, else `null`. + */ +function checkGlobal(value) { + return (value && value.Object === Object) ? value : null; +} + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Built-in value references. */ +var Symbol = root.Symbol; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +module.exports = baseToString; diff --git a/deps/npm/node_modules/lodash.keys/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/package.json similarity index 55% rename from deps/npm/node_modules/lodash.keys/package.json rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/package.json index 0308e51443fbac..afe25bfc79986b 100644 --- a/deps/npm/node_modules/lodash.keys/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/package.json @@ -1,19 +1,26 @@ { "_args": [ [ - "lodash.keys@latest", - "/Users/rebecca/code/npm" + { + "name": "lodash._basetostring", + "raw": "lodash._basetostring@~4.12.0", + "rawSpec": "~4.12.0", + "scope": null, + "spec": ">=4.12.0 <4.13.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" ] ], - "_from": "lodash.keys@latest", - "_id": "lodash.keys@4.0.7", + "_from": "lodash._basetostring@>=4.12.0 <4.13.0", + "_id": "lodash._basetostring@4.12.0", "_inCache": true, "_installable": true, - "_location": "/lodash.keys", + "_location": "/node-gyp/npmlog/gauge/lodash.pad/lodash._basetostring", "_nodeVersion": "5.5.0", "_npmOperationalInternal": { "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/lodash.keys-4.0.7.tgz_1463062346790_0.19413627637550235" + "tmp": "tmp/lodash._basetostring-4.12.0.tgz_1463062033665_0.6722894972190261" }, "_npmUser": { "email": "john.david.dalton@gmail.com", @@ -22,21 +29,21 @@ "_npmVersion": "2.15.5", "_phantomChildren": {}, "_requested": { - "name": "lodash.keys", - "raw": "lodash.keys@latest", - "rawSpec": "latest", + "name": "lodash._basetostring", + "raw": "lodash._basetostring@~4.12.0", + "rawSpec": "~4.12.0", "scope": null, - "spec": "latest", - "type": "tag" + "spec": ">=4.12.0 <4.13.0", + "type": "range" }, "_requiredBy": [ - "/" + "/node-gyp/npmlog/gauge/lodash.pad" ], - "_resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-4.0.7.tgz", - "_shasum": "30e1b3bd98e54d6a0611991812685b6bc47cb63b", + "_resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-4.12.0.tgz", + "_shasum": "9327c9dc5158866b7fa4b9d42f4638e5766dd9df", "_shrinkwrap": null, - "_spec": "lodash.keys@latest", - "_where": "/Users/rebecca/code/npm", + "_spec": "lodash._basetostring@~4.12.0", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad", "author": { "email": "john.david.dalton@gmail.com", "name": "John-David Dalton", @@ -63,19 +70,15 @@ } ], "dependencies": {}, - "description": "The lodash method `_.keys` exported as a module.", + "description": "The internal lodash function `baseToString` exported as a module.", "devDependencies": {}, "directories": {}, "dist": { - "shasum": "30e1b3bd98e54d6a0611991812685b6bc47cb63b", - "tarball": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-4.0.7.tgz" + "shasum": "9327c9dc5158866b7fa4b9d42f4638e5766dd9df", + "tarball": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-4.12.0.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "keys" - ], "license": "MIT", "maintainers": [ { @@ -91,7 +94,7 @@ "name": "phated" } ], - "name": "lodash.keys", + "name": "lodash._basetostring", "optionalDependencies": {}, "readme": "ERROR: No README data found!", "repository": { @@ -101,5 +104,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "version": "4.0.7" + "version": "4.12.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/LICENSE new file mode 100644 index 00000000000000..e0c69d56032d15 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/README.md similarity index 80% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/README.md rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/README.md index b3858fd68e7866..75aa6b0699b4df 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/README.md +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/README.md @@ -1,4 +1,4 @@ -# lodash.tostring v4.1.2 +# lodash.tostring v4.1.3 The [lodash](https://lodash.com/) method `_.toString` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var toString = require('lodash.tostring'); ``` -See the [documentation](https://lodash.com/docs#toString) or [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash.tostring) for more details. +See the [documentation](https://lodash.com/docs#toString) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.tostring) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/index.js similarity index 81% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/index.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/index.js index 5c0e3e2b987eb6..8a2cde39290e82 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/index.js +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/index.js @@ -1,10 +1,10 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation + * Copyright jQuery Foundation and other contributors + * Released under MIT license * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ /** Used as references for various `Number` constants. */ @@ -66,7 +66,8 @@ function checkGlobal(value) { var objectProto = Object.prototype; /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -78,12 +79,33 @@ var Symbol = root.Symbol; var symbolProto = Symbol ? Symbol.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. @@ -110,9 +132,11 @@ function isObjectLike(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. * @example * * _.isSymbol(Symbol.iterator); @@ -127,11 +151,12 @@ function isSymbol(value) { } /** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` and `undefined` values. The sign of `-0` is preserved. + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {string} Returns the string. @@ -147,18 +172,7 @@ function isSymbol(value) { * // => '1,2,3' */ function toString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (value == null) { - return ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + return value == null ? '' : baseToString(value); } module.exports = toString; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/package.json similarity index 68% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/package.json rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/package.json index 8ee1a50433d1f6..9b829d126b64f8 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/package.json @@ -1,25 +1,32 @@ { "_args": [ [ - "lodash.tostring@^4.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" + { + "name": "lodash.tostring", + "raw": "lodash.tostring@^4.0.0", + "rawSpec": "^4.0.0", + "scope": null, + "spec": ">=4.0.0 <5.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" ] ], "_from": "lodash.tostring@>=4.0.0 <5.0.0", - "_id": "lodash.tostring@4.1.2", + "_id": "lodash.tostring@4.1.3", "_inCache": true, "_installable": true, - "_location": "/npmlog/gauge/lodash.pad/lodash.tostring", + "_location": "/node-gyp/npmlog/gauge/lodash.pad/lodash.tostring", "_nodeVersion": "5.5.0", "_npmOperationalInternal": { - "host": "packages-13-west.internal.npmjs.com", - "tmp": "tmp/lodash.tostring-4.1.2.tgz_1456896853027_0.8195764778647572" + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/lodash.tostring-4.1.3.tgz_1463062634002_0.7874096168670803" }, "_npmUser": { "email": "john.david.dalton@gmail.com", "name": "jdalton" }, - "_npmVersion": "2.14.17", + "_npmVersion": "2.15.5", "_phantomChildren": {}, "_requested": { "name": "lodash.tostring", @@ -30,14 +37,13 @@ "type": "range" }, "_requiredBy": [ - "/npmlog/gauge/lodash.pad", - "/npmlog/gauge/lodash.pad/lodash.repeat" + "/node-gyp/npmlog/gauge/lodash.pad" ], - "_resolved": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.2.tgz", - "_shasum": "7d326a5cf64da4298f2fd35b688d848267535288", + "_resolved": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.3.tgz", + "_shasum": "5697f62973f30105a76c2deb3e2d1669f04fd825", "_shrinkwrap": null, "_spec": "lodash.tostring@^4.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad", "author": { "email": "john.david.dalton@gmail.com", "name": "John-David Dalton", @@ -68,8 +74,8 @@ "devDependencies": {}, "directories": {}, "dist": { - "shasum": "7d326a5cf64da4298f2fd35b688d848267535288", - "tarball": "http://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.2.tgz" + "shasum": "5697f62973f30105a76c2deb3e2d1669f04fd825", + "tarball": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.3.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -102,5 +108,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "version": "4.1.2" + "version": "4.1.3" } diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json similarity index 67% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json index 2b83241d5057e0..077525ba2a9737 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json @@ -1,25 +1,32 @@ { "_args": [ [ - "lodash.pad@^4.1.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge" + { + "name": "lodash.pad", + "raw": "lodash.pad@^4.1.0", + "rawSpec": "^4.1.0", + "scope": null, + "spec": ">=4.1.0 <5.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge" ] ], "_from": "lodash.pad@>=4.1.0 <5.0.0", - "_id": "lodash.pad@4.1.0", + "_id": "lodash.pad@4.4.0", "_inCache": true, "_installable": true, - "_location": "/npmlog/gauge/lodash.pad", + "_location": "/node-gyp/npmlog/gauge/lodash.pad", "_nodeVersion": "5.5.0", "_npmOperationalInternal": { - "host": "packages-9-west.internal.npmjs.com", - "tmp": "tmp/lodash.pad-4.1.0.tgz_1455615516420_0.3130727862007916" + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/lodash.pad-4.4.0.tgz_1463062450475_0.3613762252498418" }, "_npmUser": { "email": "john.david.dalton@gmail.com", "name": "jdalton" }, - "_npmVersion": "2.14.18", + "_npmVersion": "2.15.5", "_phantomChildren": {}, "_requested": { "name": "lodash.pad", @@ -30,13 +37,13 @@ "type": "range" }, "_requiredBy": [ - "/npmlog/gauge" + "/node-gyp/npmlog/gauge" ], - "_resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-4.1.0.tgz", - "_shasum": "dbbe3a9681fccb69970473a2263f50c196ac3aa9", + "_resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-4.4.0.tgz", + "_shasum": "faa38df26c0a69ec5086a82246c958e150dcb1ab", "_shrinkwrap": null, "_spec": "lodash.pad@^4.1.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge", "author": { "email": "john.david.dalton@gmail.com", "name": "John-David Dalton", @@ -52,7 +59,7 @@ "url": "http://allyoucanleet.com/" }, { - "email": "blaine@iceddev.com", + "email": "blaine.bublitz@gmail.com", "name": "Blaine Bublitz", "url": "https://github.com/phated" }, @@ -63,15 +70,16 @@ } ], "dependencies": { - "lodash.repeat": "^4.0.0", + "lodash._baseslice": "~4.0.0", + "lodash._basetostring": "~4.12.0", "lodash.tostring": "^4.0.0" }, "description": "The lodash method `_.pad` exported as a module.", "devDependencies": {}, "directories": {}, "dist": { - "shasum": "dbbe3a9681fccb69970473a2263f50c196ac3aa9", - "tarball": "http://registry.npmjs.org/lodash.pad/-/lodash.pad-4.1.0.tgz" + "shasum": "faa38df26c0a69ec5086a82246c958e150dcb1ab", + "tarball": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-4.4.0.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -104,5 +112,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "version": "4.1.0" + "version": "4.4.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/LICENSE new file mode 100644 index 00000000000000..e0c69d56032d15 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/README.md similarity index 80% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/README.md rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/README.md index ac84987849bf1a..909eef8f2215ef 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/README.md +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/README.md @@ -1,4 +1,4 @@ -# lodash.padend v4.2.0 +# lodash.padend v4.5.0 The [lodash](https://lodash.com/) method `_.padEnd` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var padEnd = require('lodash.padend'); ``` -See the [documentation](https://lodash.com/docs#padEnd) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.padend) for more details. +See the [documentation](https://lodash.com/docs#padEnd) or [package source](https://github.com/lodash/lodash/blob/4.5.0-npm-packages/lodash.padend) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/index.js similarity index 56% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/index.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/index.js index d7c813a1dbd015..5af50372e338dd 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/index.js +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/index.js @@ -1,22 +1,25 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation + * Copyright jQuery Foundation and other contributors + * Released under MIT license * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ -var repeat = require('lodash.repeat'), +var baseSlice = require('lodash._baseslice'), + baseToString = require('lodash._basetostring'), toString = require('lodash.tostring'); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 1.7976931348623157e+308, NAN = 0 / 0; /** `Object#toString` result references. */ var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; + genTag = '[object GeneratorFunction]', + symbolTag = '[object Symbol]'; /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g; @@ -95,38 +98,79 @@ function stringToArray(string) { var objectProto = Object.prototype; /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; /* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil; +var nativeCeil = Math.ceil, + nativeFloor = Math.floor; + +/** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ +function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; +} + +/** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ +function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); +} /** * Creates the padding for `string` based on `length`. The `chars` string * is truncated if the number of characters exceeds `length`. * * @private - * @param {string} string The string to create padding for. - * @param {number} [length=0] The padding length. + * @param {number} length The padding length. * @param {string} [chars=' '] The string used as padding. * @returns {string} Returns the padding for `string`. */ -function createPadding(string, length, chars) { - length = toInteger(length); +function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); - var strLength = stringSize(string); - if (!length || strLength >= length) { - return ''; + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; } - var padLength = length - strLength; - chars = chars === undefined ? ' ' : (chars + ''); - - var result = repeat(chars, nativeCeil(padLength / stringSize(chars))); + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); return reHasComplexSymbol.test(chars) - ? stringToArray(result).slice(0, padLength).join('') - : result.slice(0, padLength); + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); } /** @@ -134,9 +178,11 @@ function createPadding(string, length, chars) { * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. * @example * * _.isFunction(_); @@ -147,18 +193,20 @@ function createPadding(string, length, chars) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } /** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. @@ -182,30 +230,80 @@ function isObject(value) { } /** - * Converts `value` to an integer. + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". * - * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 * @category Lang * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. + * @returns {number} Returns the converted number. * @example * - * _.toInteger(3); - * // => 3 + * _.toFinite(3.2); + * // => 3.2 * - * _.toInteger(Number.MIN_VALUE); - * // => 0 + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 * - * _.toInteger(Infinity); + * _.toFinite(Infinity); * // => 1.7976931348623157e+308 * - * _.toInteger('3'); - * // => 3 + * _.toFinite('3.2'); + * // => 3.2 */ -function toInteger(value) { +function toFinite(value) { if (!value) { return value === 0 ? value : 0; } @@ -214,8 +312,40 @@ function toInteger(value) { var sign = (value < 0 ? -1 : 1); return sign * MAX_INTEGER; } - var remainder = value % 1; - return value === value ? (remainder ? value - remainder : value) : 0; + return value === value ? value : 0; +} + +/** + * Converts `value` to an integer. + * + * **Note:** This function is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ +function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; } /** @@ -223,13 +353,14 @@ function toInteger(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {number} Returns the number. * @example * - * _.toNumber(3); - * // => 3 + * _.toNumber(3.2); + * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 @@ -237,10 +368,16 @@ function toInteger(value) { * _.toNumber(Infinity); * // => Infinity * - * _.toNumber('3'); - * // => 3 + * _.toNumber('3.2'); + * // => 3.2 */ function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } if (isObject(value)) { var other = isFunction(value.valueOf) ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; @@ -261,6 +398,7 @@ function toNumber(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category String * @param {string} [string=''] The string to pad. * @param {number} [length=0] The padding length. @@ -279,7 +417,12 @@ function toNumber(value) { */ function padEnd(string, length, chars) { string = toString(string); - return string + createPadding(string, length, chars); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (string + createPadding(length - strLength, chars)) + : string; } module.exports = padEnd; diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/LICENSE new file mode 100644 index 00000000000000..b054ca5a3ac7d6 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2016 The Dojo Foundation +Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/README.md new file mode 100644 index 00000000000000..8cd4181ccdc00d --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/README.md @@ -0,0 +1,18 @@ +# lodash._baseslice v4.0.0 + +The internal [lodash](https://lodash.com/) function `baseSlice` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._baseslice +``` + +In Node.js: +```js +var baseSlice = require('lodash._baseslice'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash._baseslice) for more details. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/index.js new file mode 100644 index 00000000000000..59293c3d0037a8 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/index.js @@ -0,0 +1,40 @@ +/** + * lodash 4.0.0 (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright 2012-2016 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +module.exports = baseSlice; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/package.json similarity index 50% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/package.json rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/package.json index e98ee4125c0d0c..69dbad217da375 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._baseslice/package.json @@ -1,44 +1,56 @@ { "_args": [ [ - "lodash.repeat@^4.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" + { + "name": "lodash._baseslice", + "raw": "lodash._baseslice@~4.0.0", + "rawSpec": "~4.0.0", + "scope": null, + "spec": ">=4.0.0 <4.1.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" ], [ - "lodash.repeat@^4.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend" + { + "name": "lodash._baseslice", + "raw": "lodash._baseslice@~4.0.0", + "rawSpec": "~4.0.0", + "scope": null, + "spec": ">=4.0.0 <4.1.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend" ] ], - "_from": "lodash.repeat@>=4.0.0 <5.0.0", - "_id": "lodash.repeat@4.0.0", + "_from": "lodash._baseslice@~4.0.0", + "_id": "lodash._baseslice@4.0.0", "_inCache": true, "_installable": true, - "_location": "/npmlog/gauge/lodash.padend/lodash.repeat", - "_nodeVersion": "5.5.0", - "_npmOperationalInternal": { - "host": "packages-9-west.internal.npmjs.com", - "tmp": "tmp/lodash.repeat-4.0.0.tgz_1455602646227_0.7481637196615338" - }, + "_location": "/node-gyp/npmlog/gauge/lodash.padend/lodash._baseslice", + "_nodeVersion": "5.4.0", "_npmUser": { "email": "john.david.dalton@gmail.com", "name": "jdalton" }, - "_npmVersion": "2.14.18", + "_npmVersion": "2.14.15", "_phantomChildren": {}, "_requested": { - "name": "lodash.repeat", - "raw": "lodash.repeat@^4.0.0", - "rawSpec": "^4.0.0", + "name": "lodash._baseslice", + "raw": "lodash._baseslice@~4.0.0", + "rawSpec": "~4.0.0", "scope": null, - "spec": ">=4.0.0 <5.0.0", + "spec": ">=4.0.0 <4.1.0", "type": "range" }, "_requiredBy": [ - "/npmlog/gauge/lodash.padend" + "/node-gyp/npmlog/gauge/lodash.padend" ], + "_resolved": "https://registry.npmjs.org/lodash._baseslice/-/lodash._baseslice-4.0.0.tgz", + "_shasum": "f5ce1df982948ecaff63f223853415b7b9763704", "_shrinkwrap": null, - "_spec": "lodash.repeat@^4.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend", + "_spec": "lodash._baseslice@~4.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend", "author": { "email": "john.david.dalton@gmail.com", "name": "John-David Dalton", @@ -64,22 +76,16 @@ "url": "https://mathiasbynens.be/" } ], - "dependencies": { - "lodash.tostring": "^4.0.0" - }, - "description": "The lodash method `_.repeat` exported as a module.", + "dependencies": {}, + "description": "The internal lodash function `baseSlice` exported as a module.", "devDependencies": {}, "directories": {}, "dist": { - "shasum": "aaf570b2ab0bfb0dda6d6e93291d54b30b1f7d22", - "tarball": "http://registry.npmjs.org/lodash.repeat/-/lodash.repeat-4.0.0.tgz" + "shasum": "f5ce1df982948ecaff63f223853415b7b9763704", + "tarball": "https://registry.npmjs.org/lodash._baseslice/-/lodash._baseslice-4.0.0.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "repeat" - ], "license": "MIT", "maintainers": [ { @@ -95,7 +101,7 @@ "name": "phated" } ], - "name": "lodash.repeat", + "name": "lodash._baseslice", "optionalDependencies": {}, "readme": "ERROR: No README data found!", "repository": { diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/LICENSE new file mode 100644 index 00000000000000..e0c69d56032d15 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/README.md new file mode 100644 index 00000000000000..ba060c94dadea0 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/README.md @@ -0,0 +1,18 @@ +# lodash._basetostring v4.12.0 + +The internal [lodash](https://lodash.com/) function `baseToString` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._basetostring +``` + +In Node.js: +```js +var baseToString = require('lodash._basetostring'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/4.12.0-npm-packages/lodash._basetostring) for more details. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/index.js new file mode 100644 index 00000000000000..d5848107499c34 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/index.js @@ -0,0 +1,153 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** Used to determine if values are of the language type `Object`. */ +var objectTypes = { + 'function': true, + 'object': true +}; + +/** Detect free variable `exports`. */ +var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) + ? exports + : undefined; + +/** Detect free variable `module`. */ +var freeModule = (objectTypes[typeof module] && module && !module.nodeType) + ? module + : undefined; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + +/** Detect free variable `self`. */ +var freeSelf = checkGlobal(objectTypes[typeof self] && self); + +/** Detect free variable `window`. */ +var freeWindow = checkGlobal(objectTypes[typeof window] && window); + +/** Detect `this` as the global object. */ +var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + +/** + * Used as a reference to the global object. + * + * The `this` value is used if it's the global object to avoid Greasemonkey's + * restricted `window` object, otherwise the `window` object is used. + */ +var root = freeGlobal || + ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || + freeSelf || thisGlobal || Function('return this')(); + +/** + * Checks if `value` is a global object. + * + * @private + * @param {*} value The value to check. + * @returns {null|Object} Returns `value` if it's a global object, else `null`. + */ +function checkGlobal(value) { + return (value && value.Object === Object) ? value : null; +} + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Built-in value references. */ +var Symbol = root.Symbol; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +module.exports = baseToString; diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/package.json new file mode 100644 index 00000000000000..11810e229268cb --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash._basetostring/package.json @@ -0,0 +1,119 @@ +{ + "_args": [ + [ + { + "name": "lodash._basetostring", + "raw": "lodash._basetostring@~4.12.0", + "rawSpec": "~4.12.0", + "scope": null, + "spec": ">=4.12.0 <4.13.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" + ], + [ + { + "name": "lodash._basetostring", + "raw": "lodash._basetostring@~4.12.0", + "rawSpec": "~4.12.0", + "scope": null, + "spec": ">=4.12.0 <4.13.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend" + ] + ], + "_from": "lodash._basetostring@~4.12.0", + "_id": "lodash._basetostring@4.12.0", + "_inCache": true, + "_installable": true, + "_location": "/node-gyp/npmlog/gauge/lodash.padend/lodash._basetostring", + "_nodeVersion": "5.5.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/lodash._basetostring-4.12.0.tgz_1463062033665_0.6722894972190261" + }, + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.15.5", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._basetostring", + "raw": "lodash._basetostring@~4.12.0", + "rawSpec": "~4.12.0", + "scope": null, + "spec": ">=4.12.0 <4.13.0", + "type": "range" + }, + "_requiredBy": [ + "/node-gyp/npmlog/gauge/lodash.padend" + ], + "_resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-4.12.0.tgz", + "_shasum": "9327c9dc5158866b7fa4b9d42f4638e5766dd9df", + "_shrinkwrap": null, + "_spec": "lodash._basetostring@~4.12.0", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + { + "email": "blaine.bublitz@gmail.com", + "name": "Blaine Bublitz", + "url": "https://github.com/phated" + }, + { + "email": "mathias@qiwi.be", + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The internal lodash function `baseToString` exported as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "9327c9dc5158866b7fa4b9d42f4638e5766dd9df", + "tarball": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-4.12.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + { + "email": "mathias@qiwi.be", + "name": "mathias" + }, + { + "email": "blaine@iceddev.com", + "name": "phated" + } + ], + "name": "lodash._basetostring", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.12.0" +} diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/LICENSE new file mode 100644 index 00000000000000..e0c69d56032d15 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/README.md similarity index 80% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/README.md rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/README.md index b3858fd68e7866..75aa6b0699b4df 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/README.md +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/README.md @@ -1,4 +1,4 @@ -# lodash.tostring v4.1.2 +# lodash.tostring v4.1.3 The [lodash](https://lodash.com/) method `_.toString` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var toString = require('lodash.tostring'); ``` -See the [documentation](https://lodash.com/docs#toString) or [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash.tostring) for more details. +See the [documentation](https://lodash.com/docs#toString) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.tostring) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/index.js similarity index 81% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/index.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/index.js index 5c0e3e2b987eb6..8a2cde39290e82 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/index.js +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/index.js @@ -1,10 +1,10 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation + * Copyright jQuery Foundation and other contributors + * Released under MIT license * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ /** Used as references for various `Number` constants. */ @@ -66,7 +66,8 @@ function checkGlobal(value) { var objectProto = Object.prototype; /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -78,12 +79,33 @@ var Symbol = root.Symbol; var symbolProto = Symbol ? Symbol.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. @@ -110,9 +132,11 @@ function isObjectLike(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. * @example * * _.isSymbol(Symbol.iterator); @@ -127,11 +151,12 @@ function isSymbol(value) { } /** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` and `undefined` values. The sign of `-0` is preserved. + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {string} Returns the string. @@ -147,18 +172,7 @@ function isSymbol(value) { * // => '1,2,3' */ function toString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (value == null) { - return ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + return value == null ? '' : baseToString(value); } module.exports = toString; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/package.json similarity index 58% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/package.json rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/package.json index 61501df10307e9..176ced6107ecca 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/package.json @@ -1,29 +1,43 @@ { "_args": [ [ - "lodash.tostring@^4.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" + { + "name": "lodash.tostring", + "raw": "lodash.tostring@^4.0.0", + "rawSpec": "^4.0.0", + "scope": null, + "spec": ">=4.0.0 <5.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" ], [ - "lodash.tostring@^4.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend" + { + "name": "lodash.tostring", + "raw": "lodash.tostring@^4.0.0", + "rawSpec": "^4.0.0", + "scope": null, + "spec": ">=4.0.0 <5.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend" ] ], - "_from": "lodash.tostring@>=4.0.0 <5.0.0", - "_id": "lodash.tostring@4.1.2", + "_from": "lodash.tostring@^4.0.0", + "_id": "lodash.tostring@4.1.3", "_inCache": true, "_installable": true, - "_location": "/npmlog/gauge/lodash.padend/lodash.tostring", + "_location": "/node-gyp/npmlog/gauge/lodash.padend/lodash.tostring", "_nodeVersion": "5.5.0", "_npmOperationalInternal": { - "host": "packages-13-west.internal.npmjs.com", - "tmp": "tmp/lodash.tostring-4.1.2.tgz_1456896853027_0.8195764778647572" + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/lodash.tostring-4.1.3.tgz_1463062634002_0.7874096168670803" }, "_npmUser": { "email": "john.david.dalton@gmail.com", "name": "jdalton" }, - "_npmVersion": "2.14.17", + "_npmVersion": "2.15.5", "_phantomChildren": {}, "_requested": { "name": "lodash.tostring", @@ -34,12 +48,13 @@ "type": "range" }, "_requiredBy": [ - "/npmlog/gauge/lodash.padend", - "/npmlog/gauge/lodash.padend/lodash.repeat" + "/node-gyp/npmlog/gauge/lodash.padend" ], + "_resolved": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.3.tgz", + "_shasum": "5697f62973f30105a76c2deb3e2d1669f04fd825", "_shrinkwrap": null, "_spec": "lodash.tostring@^4.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend", "author": { "email": "john.david.dalton@gmail.com", "name": "John-David Dalton", @@ -70,8 +85,8 @@ "devDependencies": {}, "directories": {}, "dist": { - "shasum": "7d326a5cf64da4298f2fd35b688d848267535288", - "tarball": "http://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.2.tgz" + "shasum": "5697f62973f30105a76c2deb3e2d1669f04fd825", + "tarball": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.3.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -104,5 +119,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "version": "4.1.2" + "version": "4.1.3" } diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/package.json similarity index 67% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/package.json rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/package.json index fa826877c5a5e4..e00e08add68262 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/package.json @@ -1,25 +1,32 @@ { "_args": [ [ - "lodash.padend@^4.1.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge" + { + "name": "lodash.padend", + "raw": "lodash.padend@^4.1.0", + "rawSpec": "^4.1.0", + "scope": null, + "spec": ">=4.1.0 <5.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge" ] ], "_from": "lodash.padend@>=4.1.0 <5.0.0", - "_id": "lodash.padend@4.2.0", + "_id": "lodash.padend@4.5.0", "_inCache": true, "_installable": true, - "_location": "/npmlog/gauge/lodash.padend", + "_location": "/node-gyp/npmlog/gauge/lodash.padend", "_nodeVersion": "5.5.0", "_npmOperationalInternal": { - "host": "packages-6-west.internal.npmjs.com", - "tmp": "tmp/lodash.padend-4.2.0.tgz_1455615519416_0.9670630963519216" + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/lodash.padend-4.5.0.tgz_1463062451966_0.5034168094862252" }, "_npmUser": { "email": "john.david.dalton@gmail.com", "name": "jdalton" }, - "_npmVersion": "2.14.18", + "_npmVersion": "2.15.5", "_phantomChildren": {}, "_requested": { "name": "lodash.padend", @@ -30,13 +37,13 @@ "type": "range" }, "_requiredBy": [ - "/npmlog/gauge" + "/node-gyp/npmlog/gauge" ], - "_resolved": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.2.0.tgz", - "_shasum": "b84e8c3401d4538055c6e321a51e3aee19881a18", + "_resolved": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.5.0.tgz", + "_shasum": "a289e9377ee2e6de8ba7f11f3a8eb326070b7619", "_shrinkwrap": null, "_spec": "lodash.padend@^4.1.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge", "author": { "email": "john.david.dalton@gmail.com", "name": "John-David Dalton", @@ -52,7 +59,7 @@ "url": "http://allyoucanleet.com/" }, { - "email": "blaine@iceddev.com", + "email": "blaine.bublitz@gmail.com", "name": "Blaine Bublitz", "url": "https://github.com/phated" }, @@ -63,15 +70,16 @@ } ], "dependencies": { - "lodash.repeat": "^4.0.0", + "lodash._baseslice": "~4.0.0", + "lodash._basetostring": "~4.12.0", "lodash.tostring": "^4.0.0" }, "description": "The lodash method `_.padEnd` exported as a module.", "devDependencies": {}, "directories": {}, "dist": { - "shasum": "b84e8c3401d4538055c6e321a51e3aee19881a18", - "tarball": "http://registry.npmjs.org/lodash.padend/-/lodash.padend-4.2.0.tgz" + "shasum": "a289e9377ee2e6de8ba7f11f3a8eb326070b7619", + "tarball": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.5.0.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -104,5 +112,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "version": "4.2.0" + "version": "4.5.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/LICENSE new file mode 100644 index 00000000000000..e0c69d56032d15 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/README.md similarity index 80% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/README.md rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/README.md index d3176b0012afb9..bcc1c5aa6710e0 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/README.md +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/README.md @@ -1,4 +1,4 @@ -# lodash.padstart v4.2.0 +# lodash.padstart v4.5.0 The [lodash](https://lodash.com/) method `_.padStart` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var padStart = require('lodash.padstart'); ``` -See the [documentation](https://lodash.com/docs#padStart) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.padstart) for more details. +See the [documentation](https://lodash.com/docs#padStart) or [package source](https://github.com/lodash/lodash/blob/4.5.0-npm-packages/lodash.padstart) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/index.js similarity index 56% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/index.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/index.js index 9f403a1f857fae..456889536633cb 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/index.js +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/index.js @@ -1,22 +1,25 @@ /** - * lodash 4.2.0 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation + * Copyright jQuery Foundation and other contributors + * Released under MIT license * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ -var repeat = require('lodash.repeat'), +var baseSlice = require('lodash._baseslice'), + baseToString = require('lodash._basetostring'), toString = require('lodash.tostring'); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 1.7976931348623157e+308, NAN = 0 / 0; /** `Object#toString` result references. */ var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; + genTag = '[object GeneratorFunction]', + symbolTag = '[object Symbol]'; /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g; @@ -95,38 +98,79 @@ function stringToArray(string) { var objectProto = Object.prototype; /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; /* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil; +var nativeCeil = Math.ceil, + nativeFloor = Math.floor; + +/** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ +function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; +} + +/** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ +function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); +} /** * Creates the padding for `string` based on `length`. The `chars` string * is truncated if the number of characters exceeds `length`. * * @private - * @param {string} string The string to create padding for. - * @param {number} [length=0] The padding length. + * @param {number} length The padding length. * @param {string} [chars=' '] The string used as padding. * @returns {string} Returns the padding for `string`. */ -function createPadding(string, length, chars) { - length = toInteger(length); +function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); - var strLength = stringSize(string); - if (!length || strLength >= length) { - return ''; + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; } - var padLength = length - strLength; - chars = chars === undefined ? ' ' : (chars + ''); - - var result = repeat(chars, nativeCeil(padLength / stringSize(chars))); + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); return reHasComplexSymbol.test(chars) - ? stringToArray(result).slice(0, padLength).join('') - : result.slice(0, padLength); + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); } /** @@ -134,9 +178,11 @@ function createPadding(string, length, chars) { * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. * @example * * _.isFunction(_); @@ -147,18 +193,20 @@ function createPadding(string, length, chars) { */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. + // in Safari 8 which returns 'object' for typed array and weak map constructors, + // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } /** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ + * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. @@ -182,30 +230,80 @@ function isObject(value) { } /** - * Converts `value` to an integer. + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". * - * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 * @category Lang * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. + * @returns {number} Returns the converted number. * @example * - * _.toInteger(3); - * // => 3 + * _.toFinite(3.2); + * // => 3.2 * - * _.toInteger(Number.MIN_VALUE); - * // => 0 + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 * - * _.toInteger(Infinity); + * _.toFinite(Infinity); * // => 1.7976931348623157e+308 * - * _.toInteger('3'); - * // => 3 + * _.toFinite('3.2'); + * // => 3.2 */ -function toInteger(value) { +function toFinite(value) { if (!value) { return value === 0 ? value : 0; } @@ -214,8 +312,40 @@ function toInteger(value) { var sign = (value < 0 ? -1 : 1); return sign * MAX_INTEGER; } - var remainder = value % 1; - return value === value ? (remainder ? value - remainder : value) : 0; + return value === value ? value : 0; +} + +/** + * Converts `value` to an integer. + * + * **Note:** This function is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ +function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; } /** @@ -223,13 +353,14 @@ function toInteger(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {number} Returns the number. * @example * - * _.toNumber(3); - * // => 3 + * _.toNumber(3.2); + * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 @@ -237,10 +368,16 @@ function toInteger(value) { * _.toNumber(Infinity); * // => Infinity * - * _.toNumber('3'); - * // => 3 + * _.toNumber('3.2'); + * // => 3.2 */ function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } if (isObject(value)) { var other = isFunction(value.valueOf) ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; @@ -261,6 +398,7 @@ function toNumber(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category String * @param {string} [string=''] The string to pad. * @param {number} [length=0] The padding length. @@ -279,7 +417,12 @@ function toNumber(value) { */ function padStart(string, length, chars) { string = toString(string); - return createPadding(string, length, chars) + string; + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (createPadding(length - strLength, chars) + string) + : string; } module.exports = padStart; diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/LICENSE new file mode 100644 index 00000000000000..b054ca5a3ac7d6 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2016 The Dojo Foundation +Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/README.md new file mode 100644 index 00000000000000..8cd4181ccdc00d --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/README.md @@ -0,0 +1,18 @@ +# lodash._baseslice v4.0.0 + +The internal [lodash](https://lodash.com/) function `baseSlice` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._baseslice +``` + +In Node.js: +```js +var baseSlice = require('lodash._baseslice'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash._baseslice) for more details. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/index.js new file mode 100644 index 00000000000000..59293c3d0037a8 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/index.js @@ -0,0 +1,40 @@ +/** + * lodash 4.0.0 (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright 2012-2016 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +module.exports = baseSlice; diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/package.json new file mode 100644 index 00000000000000..bf0bf651135204 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._baseslice/package.json @@ -0,0 +1,115 @@ +{ + "_args": [ + [ + { + "name": "lodash._baseslice", + "raw": "lodash._baseslice@~4.0.0", + "rawSpec": "~4.0.0", + "scope": null, + "spec": ">=4.0.0 <4.1.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" + ], + [ + { + "name": "lodash._baseslice", + "raw": "lodash._baseslice@~4.0.0", + "rawSpec": "~4.0.0", + "scope": null, + "spec": ">=4.0.0 <4.1.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart" + ] + ], + "_from": "lodash._baseslice@~4.0.0", + "_id": "lodash._baseslice@4.0.0", + "_inCache": true, + "_installable": true, + "_location": "/node-gyp/npmlog/gauge/lodash.padstart/lodash._baseslice", + "_nodeVersion": "5.4.0", + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.14.15", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._baseslice", + "raw": "lodash._baseslice@~4.0.0", + "rawSpec": "~4.0.0", + "scope": null, + "spec": ">=4.0.0 <4.1.0", + "type": "range" + }, + "_requiredBy": [ + "/node-gyp/npmlog/gauge/lodash.padstart" + ], + "_resolved": "https://registry.npmjs.org/lodash._baseslice/-/lodash._baseslice-4.0.0.tgz", + "_shasum": "f5ce1df982948ecaff63f223853415b7b9763704", + "_shrinkwrap": null, + "_spec": "lodash._baseslice@~4.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + { + "email": "blaine@iceddev.com", + "name": "Blaine Bublitz", + "url": "https://github.com/phated" + }, + { + "email": "mathias@qiwi.be", + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The internal lodash function `baseSlice` exported as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "f5ce1df982948ecaff63f223853415b7b9763704", + "tarball": "https://registry.npmjs.org/lodash._baseslice/-/lodash._baseslice-4.0.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + { + "email": "mathias@qiwi.be", + "name": "mathias" + }, + { + "email": "blaine@iceddev.com", + "name": "phated" + } + ], + "name": "lodash._baseslice", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.0.0" +} diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/LICENSE new file mode 100644 index 00000000000000..e0c69d56032d15 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/README.md new file mode 100644 index 00000000000000..ba060c94dadea0 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/README.md @@ -0,0 +1,18 @@ +# lodash._basetostring v4.12.0 + +The internal [lodash](https://lodash.com/) function `baseToString` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._basetostring +``` + +In Node.js: +```js +var baseToString = require('lodash._basetostring'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/4.12.0-npm-packages/lodash._basetostring) for more details. diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/index.js new file mode 100644 index 00000000000000..d5848107499c34 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/index.js @@ -0,0 +1,153 @@ +/** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** Used to determine if values are of the language type `Object`. */ +var objectTypes = { + 'function': true, + 'object': true +}; + +/** Detect free variable `exports`. */ +var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) + ? exports + : undefined; + +/** Detect free variable `module`. */ +var freeModule = (objectTypes[typeof module] && module && !module.nodeType) + ? module + : undefined; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + +/** Detect free variable `self`. */ +var freeSelf = checkGlobal(objectTypes[typeof self] && self); + +/** Detect free variable `window`. */ +var freeWindow = checkGlobal(objectTypes[typeof window] && window); + +/** Detect `this` as the global object. */ +var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + +/** + * Used as a reference to the global object. + * + * The `this` value is used if it's the global object to avoid Greasemonkey's + * restricted `window` object, otherwise the `window` object is used. + */ +var root = freeGlobal || + ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || + freeSelf || thisGlobal || Function('return this')(); + +/** + * Checks if `value` is a global object. + * + * @private + * @param {*} value The value to check. + * @returns {null|Object} Returns `value` if it's a global object, else `null`. + */ +function checkGlobal(value) { + return (value && value.Object === Object) ? value : null; +} + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Built-in value references. */ +var Symbol = root.Symbol; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +module.exports = baseToString; diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/package.json new file mode 100644 index 00000000000000..1c42ea67ec4288 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash._basetostring/package.json @@ -0,0 +1,119 @@ +{ + "_args": [ + [ + { + "name": "lodash._basetostring", + "raw": "lodash._basetostring@~4.12.0", + "rawSpec": "~4.12.0", + "scope": null, + "spec": ">=4.12.0 <4.13.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" + ], + [ + { + "name": "lodash._basetostring", + "raw": "lodash._basetostring@~4.12.0", + "rawSpec": "~4.12.0", + "scope": null, + "spec": ">=4.12.0 <4.13.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart" + ] + ], + "_from": "lodash._basetostring@~4.12.0", + "_id": "lodash._basetostring@4.12.0", + "_inCache": true, + "_installable": true, + "_location": "/node-gyp/npmlog/gauge/lodash.padstart/lodash._basetostring", + "_nodeVersion": "5.5.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/lodash._basetostring-4.12.0.tgz_1463062033665_0.6722894972190261" + }, + "_npmUser": { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + "_npmVersion": "2.15.5", + "_phantomChildren": {}, + "_requested": { + "name": "lodash._basetostring", + "raw": "lodash._basetostring@~4.12.0", + "rawSpec": "~4.12.0", + "scope": null, + "spec": ">=4.12.0 <4.13.0", + "type": "range" + }, + "_requiredBy": [ + "/node-gyp/npmlog/gauge/lodash.padstart" + ], + "_resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-4.12.0.tgz", + "_shasum": "9327c9dc5158866b7fa4b9d42f4638e5766dd9df", + "_shrinkwrap": null, + "_spec": "lodash._basetostring@~4.12.0", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart", + "author": { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + "bugs": { + "url": "https://github.com/lodash/lodash/issues" + }, + "contributors": [ + { + "email": "john.david.dalton@gmail.com", + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + }, + { + "email": "blaine.bublitz@gmail.com", + "name": "Blaine Bublitz", + "url": "https://github.com/phated" + }, + { + "email": "mathias@qiwi.be", + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + } + ], + "dependencies": {}, + "description": "The internal lodash function `baseToString` exported as a module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "9327c9dc5158866b7fa4b9d42f4638e5766dd9df", + "tarball": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-4.12.0.tgz" + }, + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "maintainers": [ + { + "email": "john.david.dalton@gmail.com", + "name": "jdalton" + }, + { + "email": "mathias@qiwi.be", + "name": "mathias" + }, + { + "email": "blaine@iceddev.com", + "name": "phated" + } + ], + "name": "lodash._basetostring", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/lodash/lodash.git" + }, + "scripts": { + "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" + }, + "version": "4.12.0" +} diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/LICENSE b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/LICENSE new file mode 100644 index 00000000000000..e0c69d56032d15 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/LICENSE @@ -0,0 +1,47 @@ +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/README.md b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/README.md similarity index 80% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/README.md rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/README.md index b3858fd68e7866..75aa6b0699b4df 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/README.md +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/README.md @@ -1,4 +1,4 @@ -# lodash.tostring v4.1.2 +# lodash.tostring v4.1.3 The [lodash](https://lodash.com/) method `_.toString` exported as a [Node.js](https://nodejs.org/) module. @@ -15,4 +15,4 @@ In Node.js: var toString = require('lodash.tostring'); ``` -See the [documentation](https://lodash.com/docs#toString) or [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash.tostring) for more details. +See the [documentation](https://lodash.com/docs#toString) or [package source](https://github.com/lodash/lodash/blob/4.1.3-npm-packages/lodash.tostring) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/index.js similarity index 81% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/index.js rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/index.js index 5c0e3e2b987eb6..8a2cde39290e82 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/index.js +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/index.js @@ -1,10 +1,10 @@ /** - * lodash 4.1.2 (Custom Build) + * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation + * Copyright jQuery Foundation and other contributors + * Released under MIT license * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ /** Used as references for various `Number` constants. */ @@ -66,7 +66,8 @@ function checkGlobal(value) { var objectProto = Object.prototype; /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -78,12 +79,33 @@ var Symbol = root.Symbol; var symbolProto = Symbol ? Symbol.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. @@ -110,9 +132,11 @@ function isObjectLike(value) { * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @returns {boolean} Returns `true` if `value` is correctly classified, + * else `false`. * @example * * _.isSymbol(Symbol.iterator); @@ -127,11 +151,12 @@ function isSymbol(value) { } /** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` and `undefined` values. The sign of `-0` is preserved. + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ + * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {string} Returns the string. @@ -147,18 +172,7 @@ function isSymbol(value) { * // => '1,2,3' */ function toString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (value == null) { - return ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + return value == null ? '' : baseToString(value); } module.exports = toString; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/package.json similarity index 58% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/package.json rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/package.json index a50df30e2cbe25..32c5752c9d3706 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/package.json @@ -1,29 +1,43 @@ { "_args": [ [ - "lodash.tostring@^4.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" + { + "name": "lodash.tostring", + "raw": "lodash.tostring@^4.0.0", + "rawSpec": "^4.0.0", + "scope": null, + "spec": ">=4.0.0 <5.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" ], [ - "lodash.tostring@^4.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart" + { + "name": "lodash.tostring", + "raw": "lodash.tostring@^4.0.0", + "rawSpec": "^4.0.0", + "scope": null, + "spec": ">=4.0.0 <5.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart" ] ], - "_from": "lodash.tostring@>=4.0.0 <5.0.0", - "_id": "lodash.tostring@4.1.2", + "_from": "lodash.tostring@^4.0.0", + "_id": "lodash.tostring@4.1.3", "_inCache": true, "_installable": true, - "_location": "/npmlog/gauge/lodash.padstart/lodash.tostring", + "_location": "/node-gyp/npmlog/gauge/lodash.padstart/lodash.tostring", "_nodeVersion": "5.5.0", "_npmOperationalInternal": { - "host": "packages-13-west.internal.npmjs.com", - "tmp": "tmp/lodash.tostring-4.1.2.tgz_1456896853027_0.8195764778647572" + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/lodash.tostring-4.1.3.tgz_1463062634002_0.7874096168670803" }, "_npmUser": { "email": "john.david.dalton@gmail.com", "name": "jdalton" }, - "_npmVersion": "2.14.17", + "_npmVersion": "2.15.5", "_phantomChildren": {}, "_requested": { "name": "lodash.tostring", @@ -34,12 +48,13 @@ "type": "range" }, "_requiredBy": [ - "/npmlog/gauge/lodash.padstart", - "/npmlog/gauge/lodash.padstart/lodash.repeat" + "/node-gyp/npmlog/gauge/lodash.padstart" ], + "_resolved": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.3.tgz", + "_shasum": "5697f62973f30105a76c2deb3e2d1669f04fd825", "_shrinkwrap": null, "_spec": "lodash.tostring@^4.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart", "author": { "email": "john.david.dalton@gmail.com", "name": "John-David Dalton", @@ -70,8 +85,8 @@ "devDependencies": {}, "directories": {}, "dist": { - "shasum": "7d326a5cf64da4298f2fd35b688d848267535288", - "tarball": "http://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.2.tgz" + "shasum": "5697f62973f30105a76c2deb3e2d1669f04fd825", + "tarball": "https://registry.npmjs.org/lodash.tostring/-/lodash.tostring-4.1.3.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -104,5 +119,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "version": "4.1.2" + "version": "4.1.3" } diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/package.json similarity index 67% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/package.json rename to deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/package.json index 0a4deb7c03e0a6..57fc4ead9a08bf 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/package.json +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/package.json @@ -1,25 +1,32 @@ { "_args": [ [ - "lodash.padstart@^4.1.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge" + { + "name": "lodash.padstart", + "raw": "lodash.padstart@^4.1.0", + "rawSpec": "^4.1.0", + "scope": null, + "spec": ">=4.1.0 <5.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge" ] ], "_from": "lodash.padstart@>=4.1.0 <5.0.0", - "_id": "lodash.padstart@4.2.0", + "_id": "lodash.padstart@4.5.0", "_inCache": true, "_installable": true, - "_location": "/npmlog/gauge/lodash.padstart", + "_location": "/node-gyp/npmlog/gauge/lodash.padstart", "_nodeVersion": "5.5.0", "_npmOperationalInternal": { - "host": "packages-6-west.internal.npmjs.com", - "tmp": "tmp/lodash.padstart-4.2.0.tgz_1455615522339_0.6710881665349007" + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/lodash.padstart-4.5.0.tgz_1463062453524_0.18468116875737906" }, "_npmUser": { "email": "john.david.dalton@gmail.com", "name": "jdalton" }, - "_npmVersion": "2.14.18", + "_npmVersion": "2.15.5", "_phantomChildren": {}, "_requested": { "name": "lodash.padstart", @@ -30,13 +37,13 @@ "type": "range" }, "_requiredBy": [ - "/npmlog/gauge" + "/node-gyp/npmlog/gauge" ], - "_resolved": "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.2.0.tgz", - "_shasum": "e36f89fd6c3b5072219087695b765de83ec96985", + "_resolved": "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.5.0.tgz", + "_shasum": "3ea190f6734841c3364d279d11e056726b60a79a", "_shrinkwrap": null, "_spec": "lodash.padstart@^4.1.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge", "author": { "email": "john.david.dalton@gmail.com", "name": "John-David Dalton", @@ -52,7 +59,7 @@ "url": "http://allyoucanleet.com/" }, { - "email": "blaine@iceddev.com", + "email": "blaine.bublitz@gmail.com", "name": "Blaine Bublitz", "url": "https://github.com/phated" }, @@ -63,15 +70,16 @@ } ], "dependencies": { - "lodash.repeat": "^4.0.0", + "lodash._baseslice": "~4.0.0", + "lodash._basetostring": "~4.12.0", "lodash.tostring": "^4.0.0" }, "description": "The lodash method `_.padStart` exported as a module.", "devDependencies": {}, "directories": {}, "dist": { - "shasum": "e36f89fd6c3b5072219087695b765de83ec96985", - "tarball": "http://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.2.0.tgz" + "shasum": "3ea190f6734841c3364d279d11e056726b60a79a", + "tarball": "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.5.0.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -104,5 +112,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "version": "4.2.0" + "version": "4.5.0" } diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/package.json b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/package.json new file mode 100644 index 00000000000000..6d3424f0acbdbb --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + { + "name": "gauge", + "raw": "gauge@~1.2.5", + "rawSpec": "~1.2.5", + "scope": null, + "spec": ">=1.2.5 <1.3.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog" + ] + ], + "_from": "gauge@>=1.2.5 <1.3.0", + "_id": "gauge@1.2.7", + "_inCache": true, + "_installable": true, + "_location": "/node-gyp/npmlog/gauge", + "_nodeVersion": "4.2.2", + "_npmOperationalInternal": { + "host": "packages-9-west.internal.npmjs.com", + "tmp": "tmp/gauge-1.2.7.tgz_1455835409513_0.6293477965518832" + }, + "_npmUser": { + "email": "me@re-becca.org", + "name": "iarna" + }, + "_npmVersion": "3.7.2", + "_phantomChildren": {}, + "_requested": { + "name": "gauge", + "raw": "gauge@~1.2.5", + "rawSpec": "~1.2.5", + "scope": null, + "spec": ">=1.2.5 <1.3.0", + "type": "range" + }, + "_requiredBy": [ + "/node-gyp/npmlog" + ], + "_resolved": "https://registry.npmjs.org/gauge/-/gauge-1.2.7.tgz", + "_shasum": "e9cec5483d3d4ee0ef44b60a7d99e4935e136d93", + "_shrinkwrap": null, + "_spec": "gauge@~1.2.5", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp/node_modules/npmlog", + "author": { + "email": "me@re-becca.org", + "name": "Rebecca Turner" + }, + "bugs": { + "url": "https://github.com/iarna/gauge/issues" + }, + "dependencies": { + "ansi": "^0.3.0", + "has-unicode": "^2.0.0", + "lodash.pad": "^4.1.0", + "lodash.padend": "^4.1.0", + "lodash.padstart": "^4.1.0" + }, + "description": "A terminal based horizontal guage", + "devDependencies": { + "tap": "^5.6.0" + }, + "directories": {}, + "dist": { + "shasum": "e9cec5483d3d4ee0ef44b60a7d99e4935e136d93", + "tarball": "https://registry.npmjs.org/gauge/-/gauge-1.2.7.tgz" + }, + "gitHead": "75a7d0a4ed67489ac992ed3d211bed60376ca7c1", + "homepage": "https://github.com/iarna/gauge", + "keywords": [ + "progressbar", + "progress", + "gauge" + ], + "license": "ISC", + "main": "progress-bar.js", + "maintainers": [ + { + "email": "me@re-becca.org", + "name": "iarna" + } + ], + "name": "gauge", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/iarna/gauge.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.2.7" +} diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/progress-bar.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/progress-bar.js new file mode 100644 index 00000000000000..ddfc4a44be4ded --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/progress-bar.js @@ -0,0 +1,225 @@ +"use strict" +var hasUnicode = require("has-unicode") +var ansi = require("ansi") +var align = { + center: require("lodash.pad"), + left: require("lodash.padend"), + right: require("lodash.padstart") +} +var defaultStream = process.stderr +function isTTY() { + return process.stderr.isTTY +} +function getWritableTTYColumns() { + // Writing to the final column wraps the line + // We have to use stdout here, because Node's magic SIGWINCH handler only + // updates process.stdout, not process.stderr + return process.stdout.columns - 1 +} + +var ProgressBar = module.exports = function (options, cursor) { + if (! options) options = {} + if (! cursor && options.write) { + cursor = options + options = {} + } + if (! cursor) { + cursor = ansi(defaultStream) + } + this.cursor = cursor + this.showing = false + this.theme = options.theme || (hasUnicode() ? ProgressBar.unicode : ProgressBar.ascii) + this.template = options.template || [ + {type: "name", separated: true, length: 25}, + {type: "spinner", separated: true}, + {type: "startgroup"}, + {type: "completionbar"}, + {type: "endgroup"} + ] + this.updatefreq = options.maxUpdateFrequency == null ? 50 : options.maxUpdateFrequency + this.lastName = "" + this.lastCompleted = 0 + this.spun = 0 + this.last = new Date(0) + + var self = this + this._handleSizeChange = function () { + if (!self.showing) return + self.hide() + self.show() + } +} +ProgressBar.prototype = {} + +ProgressBar.unicode = { + startgroup: "╢", + endgroup: "╟", + complete: "█", + incomplete: "░", + spinner: "▀▐▄▌", + subsection: "→" +} + +ProgressBar.ascii = { + startgroup: "|", + endgroup: "|", + complete: "#", + incomplete: "-", + spinner: "-\\|/", + subsection: "->" +} + +ProgressBar.prototype.setTheme = function(theme) { + this.theme = theme +} + +ProgressBar.prototype.setTemplate = function(template) { + this.template = template +} + +ProgressBar.prototype._enableResizeEvents = function() { + process.stdout.on('resize', this._handleSizeChange) +} + +ProgressBar.prototype._disableResizeEvents = function() { + process.stdout.removeListener('resize', this._handleSizeChange) +} + +ProgressBar.prototype.disable = function() { + this.hide() + this.disabled = true +} + +ProgressBar.prototype.enable = function() { + this.disabled = false + this.show() +} + +ProgressBar.prototype.hide = function() { + if (!isTTY()) return + if (this.disabled) return + this.cursor.show() + if (this.showing) this.cursor.up(1) + this.cursor.horizontalAbsolute(0).eraseLine() + this.showing = false +} + +var repeat = function (str, count) { + var out = "" + for (var ii=0; ii=0.0.0 <1.0.0||>=1.0.0 <2.0.0||>=2.0.0 <3.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/node-gyp" + ] + ], + "_from": "npmlog@>=0.0.0 <1.0.0||>=1.0.0 <2.0.0||>=2.0.0 <3.0.0", + "_id": "npmlog@2.0.4", + "_inCache": true, + "_installable": true, + "_location": "/node-gyp/npmlog", + "_nodeVersion": "5.10.1", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/npmlog-2.0.4.tgz_1463616637725_0.461703865788877" + }, + "_npmUser": { + "email": "kat@sykosomatic.org", + "name": "zkat" + }, + "_npmVersion": "3.9.1", + "_phantomChildren": { + "has-unicode": "2.0.0", + "readable-stream": "2.1.3" + }, + "_requested": { + "name": "npmlog", + "raw": "npmlog@0 || 1 || 2", + "rawSpec": "0 || 1 || 2", + "scope": null, + "spec": ">=0.0.0 <1.0.0||>=1.0.0 <2.0.0||>=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/node-gyp" + ], + "_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-2.0.4.tgz", + "_shasum": "98b52530f2514ca90d09ec5b22c8846722375692", + "_shrinkwrap": null, + "_spec": "npmlog@0 || 1 || 2", + "_where": "/Users/rebecca/code/npm/node_modules/node-gyp", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/npm/npmlog/issues" + }, + "dependencies": { + "ansi": "~0.3.1", + "are-we-there-yet": "~1.1.2", + "gauge": "~1.2.5" + }, + "description": "logger for npm", + "devDependencies": { + "tap": "~5.7.0" + }, + "directories": {}, + "dist": { + "shasum": "98b52530f2514ca90d09ec5b22c8846722375692", + "tarball": "https://registry.npmjs.org/npmlog/-/npmlog-2.0.4.tgz" + }, + "files": [ + "log.js" + ], + "gitHead": "3732fd4ba1ca2d47c6102343e6c3fb7e66df7fe5", + "homepage": "https://github.com/npm/npmlog#readme", + "license": "ISC", + "main": "log.js", + "maintainers": [ + { + "email": "me@re-becca.org", + "name": "iarna" + }, + { + "email": "i@izs.me", + "name": "isaacs" + }, + { + "email": "ogd@aoaioxxysz.net", + "name": "othiym23" + }, + { + "email": "kat@sykosomatic.org", + "name": "zkat" + } + ], + "name": "npmlog", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/npmlog.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "2.0.4" +} diff --git a/deps/npm/node_modules/normalize-git-url/test/basic.js~ b/deps/npm/node_modules/normalize-git-url/test/basic.js~ new file mode 100644 index 00000000000000..00ac6d3131b445 --- /dev/null +++ b/deps/npm/node_modules/normalize-git-url/test/basic.js~ @@ -0,0 +1,56 @@ +var test = require('tap').test + +var normalize = require('../normalize-git-url.js') + +test('basic normalization tests', function (t) { + t.same( + normalize('git+ssh://user@hostname:project.git#commit-ish'), + { url: 'user@hostname:project.git', branch: 'commit-ish' } + ) + t.same( + normalize('git+http://user@hostname/project/blah.git#commit-ish'), + { url: 'http://user@hostname/project/blah.git', branch: 'commit-ish' } + ) + t.same( + normalize('git+https://user@hostname/project/blah.git#commit-ish'), + { url: 'https://user@hostname/project/blah.git', branch: 'commit-ish' } + ) + t.same( + normalize('git+ssh://git@github.com:npm/npm.git#v1.0.27'), + { url: 'git@github.com:npm/npm.git', branch: 'v1.0.27' } + ) + t.same( + normalize('git+ssh://git@github.com:org/repo#dev'), + { url: 'git@github.com:org/repo', branch: 'dev' } + ) + t.same( + normalize('git+ssh://git@github.com/org/repo#dev'), + { url: 'ssh://git@github.com/org/repo', branch: 'dev' } + ) + t.same( + normalize('git+ssh://foo:22/some/path'), + { url: 'ssh://foo:22/some/path', branch: 'master' } + ) + t.same( + normalize('git@github.com:org/repo#dev'), + { url: 'git@github.com:org/repo', branch: 'dev' } + ) + t.same( + normalize('git+https://github.com/KenanY/node-uuid'), + { url: 'https://github.com/KenanY/node-uuid', branch: 'master' } + ) + t.same( + normalize('git+https://github.com/KenanY/node-uuid#7a018f2d075b03a73409e8356f9b29c9ad4ea2c5'), + { url: 'https://github.com/KenanY/node-uuid', branch: '7a018f2d075b03a73409e8356f9b29c9ad4ea2c5' } + ) + t.same( + normalize('git+ssh://git@git.example.com:b/b.git#v1.0.0'), + { url: 'git@git.example.com:b/b.git', branch: 'v1.0.0' } + ) + t.same( + normalize('git+ssh://git@github.com:npm/npm-proto.git#othiym23/organized'), + { url: 'git@github.com:npm/npm-proto.git', branch: 'othiym23/organized' } + ) + + t.end() +}) diff --git a/deps/npm/node_modules/npm-package-arg/.npmignore b/deps/npm/node_modules/npm-package-arg/.npmignore new file mode 100644 index 00000000000000..c2658d7d1b3184 --- /dev/null +++ b/deps/npm/node_modules/npm-package-arg/.npmignore @@ -0,0 +1 @@ +node_modules/ diff --git a/deps/npm/node_modules/npm-package-arg/.travis.yml b/deps/npm/node_modules/npm-package-arg/.travis.yml index ab9182bf24ab56..e5a5a8b9ec5683 100644 --- a/deps/npm/node_modules/npm-package-arg/.travis.yml +++ b/deps/npm/node_modules/npm-package-arg/.travis.yml @@ -1,10 +1,9 @@ language: node_js node_js: + - "6" - "5" - "4" - - iojs - "0.12" - "0.10" - - "0.8" sudo: false script: "npm test" diff --git a/deps/npm/node_modules/npm-package-arg/README.md b/deps/npm/node_modules/npm-package-arg/README.md index 82968a4bef8c0f..9f4aee1c056bd9 100644 --- a/deps/npm/node_modules/npm-package-arg/README.md +++ b/deps/npm/node_modules/npm-package-arg/README.md @@ -22,12 +22,13 @@ var parsed = npa("@bar/foo@1.2") // Returns an object like: { - raw: '@bar/foo@1.2', // what was passed in - name: "@bar/foo", // the name of the package - scope: "@bar", // the private scope of the package, or null - type: "range", // the type of specifier this is - spec: ">=1.2.0 <1.3.0" // the expanded specifier - rawSpec: "1.2" // the specifier as passed in + raw: '@bar/foo@1.2', // what was passed in + name: '@bar/foo', // the name of the package + escapedName: '@bar%2ffoo', // the escaped name, for making requests against a registry + scope: '@bar', // the scope of the package, or null + type: 'range', // the type of specifier this is + spec: '>=1.2.0 <1.3.0', // the expanded specifier + rawSpec: '1.2' // the specifier as passed in } // Parsing urls pointing at hosted git services produces a variation: @@ -38,6 +39,7 @@ var parsed = npa("git+https://github.com/user/foo") raw: 'git+https://github.com/user/foo', scope: null, name: null, + escapedName: null, rawSpec: 'git+https://github.com/user/foo', spec: 'user/foo', type: 'hosted', @@ -97,8 +99,11 @@ keys: * `rawSpec` - The part after the `name@...`, as it was originally provided. * `scope` - If a name is something like `@org/module` then the `scope` - field will be set to `org`. If it doesn't have a scoped name, then + field will be set to `@org`. If it doesn't have a scoped name, then scope is `null`. +* `escapedName` - A version of `name` escaped to match the npm scoped packages + specification. Mostly used when making requests against a registry. When + `name` is `null`, `escapedName` will also be `null`. If you only include a name and no specifier part, eg, `foo` or `foo@` then a default of `latest` will be used (as of 4.1.0). This is contrast with diff --git a/deps/npm/node_modules/npm-package-arg/npa.js b/deps/npm/node_modules/npm-package-arg/npa.js index 1e6deb1ec7c22d..07139696d30921 100644 --- a/deps/npm/node_modules/npm-package-arg/npa.js +++ b/deps/npm/node_modules/npm-package-arg/npa.js @@ -1,57 +1,61 @@ -var url = require("url") -var assert = require("assert") -var util = require("util") -var semver = require("semver") -var path = require("path") -var HostedGit = require("hosted-git-info") +var url = require('url') +var assert = require('assert') +var util = require('util') +var semver = require('semver') +var HostedGit = require('hosted-git-info') module.exports = npa -var isWindows = process.platform === "win32" || global.FAKE_WINDOWS +var isWindows = process.platform === 'win32' || global.FAKE_WINDOWS var slashRe = isWindows ? /\\|[/]/ : /[/]/ var parseName = /^(?:@([^/]+?)[/])?([^/]+?)$/ var nameAt = /^(@([^/]+?)[/])?([^/]+?)@/ -var debug = util.debuglog ? util.debuglog("npa") - : /\bnpa\b/i.test(process.env.NODE_DEBUG || "") - ? function () { - console.error("NPA: " + util.format.apply(util, arguments).split("\n").join("\nNPA: ")) - } : function () {} +var debug = util.debuglog + ? util.debuglog('npa') + : /\bnpa\b/i.test(process.env.NODE_DEBUG || '') + ? function () { + console.error('NPA: ' + util.format.apply(util, arguments).split('\n').join('\nNPA: ')) + } + : function () {} function validName (name) { if (!name) { - debug("not a name %j", name) + debug('not a name %j', name) return false } var n = name.trim() - if (!n || n.charAt(0) === "." - || !n.match(/^[a-zA-Z0-9]/) - || n.match(/[/()&?#|<>@:%\s\\*'"!~`]/) - || n.toLowerCase() === "node_modules" - || n !== encodeURIComponent(n) - || n.toLowerCase() === "favicon.ico") { - debug("not a valid name %j", name) + if (!n || n.charAt(0) === '.' || + !n.match(/^[a-zA-Z0-9]/) || + n.match(/[/()&?#|<>@:%\s\\*'"!~`]/) || + n.toLowerCase() === 'node_modules' || + n !== encodeURIComponent(n) || + n.toLowerCase() === 'favicon.ico') { + debug('not a valid name %j', name) return false } return n } function npa (arg) { - assert.equal(typeof arg, "string") + assert.equal(typeof arg, 'string') arg = arg.trim() - var res = new Result + var res = new Result() res.raw = arg res.scope = null + res.escapedName = null // See if it's something like foo@... var nameparse = arg.match(nameAt) - debug("nameparse", nameparse) + debug('nameparse', nameparse) if (nameparse && validName(nameparse[3]) && - (!nameparse[2] || validName(nameparse[2]))) { - res.name = (nameparse[1] || "") + nameparse[3] - if (nameparse[2]) - res.scope = "@" + nameparse[2] + (!nameparse[2] || validName(nameparse[2]))) { + res.name = (nameparse[1] || '') + nameparse[3] + res.escapedName = escapeName(res.name) + if (nameparse[2]) { + res.scope = '@' + nameparse[2] + } arg = arg.substr(nameparse[0].length) } else { res.name = null @@ -61,13 +65,13 @@ function npa (arg) { res.spec = arg var urlparse = url.parse(arg) - debug("urlparse", urlparse) + debug('urlparse', urlparse) // windows paths look like urls // don't be fooled! if (isWindows && urlparse && urlparse.protocol && - urlparse.protocol.match(/^[a-zA-Z]:$/)) { - debug("windows url-ish local path", urlparse) + urlparse.protocol.match(/^[a-zA-Z]:$/)) { + debug('windows url-ish local path', urlparse) urlparse = {} } @@ -82,32 +86,34 @@ function npa (arg) { // if it's got / chars in it, then assume that it's local. if (res.name) { - if (arg == '') arg = 'latest' + if (arg === '') arg = 'latest' var version = semver.valid(arg, true) var range = semver.validRange(arg, true) // foo@... if (version) { res.spec = version - res.type = "version" + res.type = 'version' } else if (range) { res.spec = range - res.type = "range" + res.type = 'range' } else if (slashRe.test(arg)) { parseLocal(res, arg) } else { - res.type = "tag" + res.type = 'tag' res.spec = arg } } else { var p = arg.match(parseName) if (p && validName(p[2]) && - (!p[1] || validName(p[1]))) { - res.type = "tag" - res.spec = "latest" - res.rawSpec = "" + (!p[1] || validName(p[1]))) { + res.type = 'tag' + res.spec = 'latest' + res.rawSpec = '' res.name = arg - if (p[1]) - res.scope = "@" + p[1] + res.escapedName = escapeName(res.name) + if (p[1]) { + res.scope = '@' + p[1] + } } else { parseLocal(res, arg) } @@ -116,52 +122,57 @@ function npa (arg) { return res } +function escapeName (name) { + // scoped packages in couch must have slash url-encoded, e.g. @foo%2Fbar + return name && name.replace('/', '%2f') +} + function parseLocal (res, arg) { // turns out nearly every character is allowed in fs paths if (/\0/.test(arg)) { - throw new Error("Invalid Path: " + JSON.stringify(arg)) + throw new Error('Invalid Path: ' + JSON.stringify(arg)) } - res.type = "local" + res.type = 'local' res.spec = arg } function parseUrl (res, arg, urlparse) { var gitHost = HostedGit.fromUrl(arg) if (gitHost) { - res.type = "hosted" - res.spec = gitHost.toString(), + res.type = 'hosted' + res.spec = gitHost.toString() res.hosted = { - type: gitHost.type, - ssh: gitHost.ssh(), - sshUrl: gitHost.sshurl(), - httpsUrl: gitHost.https(), - gitUrl: gitHost.git(), - shortcut: gitHost.shortcut(), - directUrl: gitHost.file("package.json") + type: gitHost.type, + ssh: gitHost.ssh(), + sshUrl: gitHost.sshurl(), + httpsUrl: gitHost.https(), + gitUrl: gitHost.git(), + shortcut: gitHost.shortcut(), + directUrl: gitHost.file('package.json') } return res } // check the protocol, and then see if it's git or not switch (urlparse.protocol) { - case "git:": - case "git+http:": - case "git+https:": - case "git+rsync:": - case "git+ftp:": - case "git+ssh:": - case "git+file:": - res.type = "git" - res.spec = arg.replace(/^git[+]/, "") + case 'git:': + case 'git+http:': + case 'git+https:': + case 'git+rsync:': + case 'git+ftp:': + case 'git+ssh:': + case 'git+file:': + res.type = 'git' + res.spec = arg.replace(/^git[+]/, '') break - case "http:": - case "https:": - res.type = "remote" + case 'http:': + case 'https:': + res.type = 'remote' res.spec = arg break - case "file:": - res.type = "local" + case 'file:': + res.type = 'local' if (isWindows && arg.match(/^file:\/\/\/?[a-z]:/i)) { // Windows URIs usually parse all wrong, so we just take matters // into our own hands, in this case. @@ -172,19 +183,17 @@ function parseUrl (res, arg, urlparse) { break default: - throw new Error("Unsupported URL Type: " + arg) - break + throw new Error('Unsupported URL Type: ' + arg) } return res } - function Result () { - if (!(this instanceof Result)) return new Result + if (!(this instanceof Result)) return new Result() } -Result.prototype.name = null -Result.prototype.type = null -Result.prototype.spec = null -Result.prototype.raw = null +Result.prototype.name = null +Result.prototype.type = null +Result.prototype.spec = null +Result.prototype.raw = null Result.prototype.hosted = null diff --git a/deps/npm/node_modules/npm-package-arg/package.json b/deps/npm/node_modules/npm-package-arg/package.json index 1044852bcd330f..b9f5b4d4a66dd2 100644 --- a/deps/npm/node_modules/npm-package-arg/package.json +++ b/deps/npm/node_modules/npm-package-arg/package.json @@ -1,88 +1,97 @@ { "_args": [ [ - "npm-package-arg@4.1.1", - "/Users/zkat/Documents/code/npm" + { + "raw": "npm-package-arg@4.2.0", + "scope": null, + "name": "npm-package-arg", + "rawSpec": "4.2.0", + "spec": "4.2.0", + "type": "version" + }, + "/Users/rebecca/code/npm" ] ], - "_from": "npm-package-arg@>=4.1.0 <4.2.0", - "_id": "npm-package-arg@4.1.1", + "_from": "npm-package-arg@4.2.0", + "_id": "npm-package-arg@4.2.0", "_inCache": true, "_installable": true, "_location": "/npm-package-arg", - "_nodeVersion": "5.6.0", + "_nodeVersion": "6.2.1", "_npmOperationalInternal": { "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/npm-package-arg-4.1.1.tgz_1461107377267_0.3723941845819354" + "tmp": "tmp/npm-package-arg-4.2.0.tgz_1465952856229_0.8071578682865947" }, "_npmUser": { - "email": "kat@sykosomatic.org", - "name": "zkat" + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" }, - "_npmVersion": "3.8.7", + "_npmVersion": "3.9.6", "_phantomChildren": {}, "_requested": { - "name": "npm-package-arg", - "raw": "npm-package-arg@4.1.1", - "rawSpec": "4.1.1", + "raw": "npm-package-arg@4.2.0", "scope": null, - "spec": "4.1.1", + "name": "npm-package-arg", + "rawSpec": "4.2.0", + "spec": "4.2.0", "type": "version" }, "_requiredBy": [ + "#USER", "/", "/init-package-json", "/npm-registry-client", "/realize-package-specifier" ], - "_resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-4.1.1.tgz", - "_shasum": "86d9dca985b4c5e5d59772dfd5de6919998a495a", + "_resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-4.2.0.tgz", + "_shasum": "809bc61cabf54bd5ff94f6165c89ba8ee88c115c", "_shrinkwrap": null, - "_spec": "npm-package-arg@4.1.1", - "_where": "/Users/zkat/Documents/code/npm", + "_spec": "npm-package-arg@4.2.0", + "_where": "/Users/rebecca/code/npm", "author": { - "email": "i@izs.me", "name": "Isaac Z. Schlueter", + "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { "url": "https://github.com/npm/npm-package-arg/issues" }, "dependencies": { - "hosted-git-info": "^2.1.4", - "semver": "4 || 5" + "hosted-git-info": "^2.1.5", + "semver": "^5.1.0" }, "description": "Parse the things that can be arguments to `npm install`", "devDependencies": { - "tap": "^1.2.0" + "standard": "^7.1.2", + "tap": "^5.7.2" }, "directories": { "test": "test" }, "dist": { - "shasum": "86d9dca985b4c5e5d59772dfd5de6919998a495a", - "tarball": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-4.1.1.tgz" + "shasum": "809bc61cabf54bd5ff94f6165c89ba8ee88c115c", + "tarball": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-4.2.0.tgz" }, - "gitHead": "b39730cf0362576be0f3d3bfbc090af512a6afd2", + "gitHead": "b54a9286ef387dd1fd109c54a42e8de45d7b07e8", "homepage": "https://github.com/npm/npm-package-arg", "license": "ISC", "main": "npa.js", "maintainers": [ { - "email": "me@re-becca.org", - "name": "iarna" + "name": "iarna", + "email": "me@re-becca.org" }, { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" }, { - "email": "ogd@aoaioxxysz.net", - "name": "othiym23" + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" }, { - "email": "kat@sykosomatic.org", - "name": "zkat" + "name": "zkat", + "email": "kat@sykosomatic.org" } ], "name": "npm-package-arg", @@ -93,7 +102,7 @@ "url": "git+https://github.com/npm/npm-package-arg.git" }, "scripts": { - "test": "tap test/*.js" + "test": "standard && tap --coverage test/*.js" }, - "version": "4.1.1" + "version": "4.2.0" } diff --git a/deps/npm/node_modules/npm-package-arg/test/basic.js b/deps/npm/node_modules/npm-package-arg/test/basic.js index 7e4112b460e34c..95f260a3c7c784 100644 --- a/deps/npm/node_modules/npm-package-arg/test/basic.js +++ b/deps/npm/node_modules/npm-package-arg/test/basic.js @@ -1,168 +1,187 @@ -var npa = require("../npa.js") -var path = require("path") +var npa = require('../npa.js') +var path = require('path') -require("tap").test("basic", function (t) { +require('tap').test('basic', function (t) { t.setMaxListeners(999) var tests = { - "foo@1.2": { - name: "foo", - type: "range", - spec: ">=1.2.0 <1.3.0", - raw: "foo@1.2", - rawSpec: "1.2" - }, - - "@foo/bar": { - raw: "@foo/bar", - name: "@foo/bar", - scope: "@foo", - rawSpec: "", - spec: "latest", - type: "tag" - }, - - "@foo/bar@": { - raw: "@foo/bar@", - name: "@foo/bar", - scope: "@foo", - rawSpec: "", - spec: "latest", - type: "tag" - }, - - "@foo/bar@baz": { - raw: "@foo/bar@baz", - name: "@foo/bar", - scope: "@foo", - rawSpec: "baz", - spec: "baz", - type: "tag" - }, - - "@f fo o al/ a d s ;f ": { - raw: "@f fo o al/ a d s ;f", + 'foo@1.2': { + name: 'foo', + escapedName: 'foo', + type: 'range', + spec: '>=1.2.0 <1.3.0', + raw: 'foo@1.2', + rawSpec: '1.2' + }, + + '@foo/bar': { + raw: '@foo/bar', + name: '@foo/bar', + escapedName: '@foo%2fbar', + scope: '@foo', + rawSpec: '', + spec: 'latest', + type: 'tag' + }, + + '@foo/bar@': { + raw: '@foo/bar@', + name: '@foo/bar', + escapedName: '@foo%2fbar', + scope: '@foo', + rawSpec: '', + spec: 'latest', + type: 'tag' + }, + + '@foo/bar@baz': { + raw: '@foo/bar@baz', + name: '@foo/bar', + escapedName: '@foo%2fbar', + scope: '@foo', + rawSpec: 'baz', + spec: 'baz', + type: 'tag' + }, + + '@f fo o al/ a d s ;f ': { + raw: '@f fo o al/ a d s ;f', name: null, - rawSpec: "@f fo o al/ a d s ;f", - spec: "@f fo o al/ a d s ;f", - type: "local" + escapedName: null, + rawSpec: '@f fo o al/ a d s ;f', + spec: '@f fo o al/ a d s ;f', + type: 'local' }, - "foo@1.2.3": { - name: "foo", - type: "version", - spec: "1.2.3", - raw: "foo@1.2.3" + 'foo@1.2.3': { + name: 'foo', + escapedName: 'foo', + type: 'version', + spec: '1.2.3', + raw: 'foo@1.2.3' }, - "foo@=v1.2.3": { - name: "foo", - type: "version", - spec: "1.2.3", - raw: "foo@=v1.2.3", - rawSpec: "=v1.2.3" + 'foo@=v1.2.3': { + name: 'foo', + escapedName: 'foo', + type: 'version', + spec: '1.2.3', + raw: 'foo@=v1.2.3', + rawSpec: '=v1.2.3' }, - "git+ssh://git@notgithub.com/user/foo#1.2.3": { + 'git+ssh://git@notgithub.com/user/foo#1.2.3': { name: null, - type: "git", - spec: "ssh://git@notgithub.com/user/foo#1.2.3", - raw: "git+ssh://git@notgithub.com/user/foo#1.2.3" + escapedName: null, + type: 'git', + spec: 'ssh://git@notgithub.com/user/foo#1.2.3', + raw: 'git+ssh://git@notgithub.com/user/foo#1.2.3' }, - "git+file://path/to/repo#1.2.3": { + 'git+file://path/to/repo#1.2.3': { name: null, - type: "git", - spec: "file://path/to/repo#1.2.3", - raw: "git+file://path/to/repo#1.2.3" + escapedName: null, + type: 'git', + spec: 'file://path/to/repo#1.2.3', + raw: 'git+file://path/to/repo#1.2.3' }, - "git://notgithub.com/user/foo": { + 'git://notgithub.com/user/foo': { name: null, - type: "git", - spec: "git://notgithub.com/user/foo", - raw: "git://notgithub.com/user/foo" + escapedName: null, + type: 'git', + spec: 'git://notgithub.com/user/foo', + raw: 'git://notgithub.com/user/foo' }, - "@foo/bar@git+ssh://notgithub.com/user/foo": { - name: "@foo/bar", - scope: "@foo", - spec: "ssh://notgithub.com/user/foo", - rawSpec: "git+ssh://notgithub.com/user/foo", - raw: "@foo/bar@git+ssh://notgithub.com/user/foo" + '@foo/bar@git+ssh://notgithub.com/user/foo': { + name: '@foo/bar', + escapedName: '@foo%2fbar', + scope: '@foo', + spec: 'ssh://notgithub.com/user/foo', + rawSpec: 'git+ssh://notgithub.com/user/foo', + raw: '@foo/bar@git+ssh://notgithub.com/user/foo' }, - "/path/to/foo": { + '/path/to/foo': { name: null, - type: "local", - spec: path.resolve(__dirname, "/path/to/foo"), - raw: "/path/to/foo" + escapedName: null, + type: 'local', + spec: path.resolve(__dirname, '/path/to/foo'), + raw: '/path/to/foo' }, - "file:path/to/foo": { + 'file:path/to/foo': { name: null, - type: "local", - spec: "path/to/foo", - raw: "file:path/to/foo" + escapedName: null, + type: 'local', + spec: 'path/to/foo', + raw: 'file:path/to/foo' }, - "file:~/path/to/foo": { + 'file:~/path/to/foo': { name: null, - type: "local", - spec: "~/path/to/foo", - raw: "file:~/path/to/foo" + escapedName: null, + type: 'local', + spec: '~/path/to/foo', + raw: 'file:~/path/to/foo' }, - "file:../path/to/foo": { + 'file:../path/to/foo': { name: null, - type: "local", - spec: "../path/to/foo", - raw: "file:../path/to/foo" + escapedName: null, + type: 'local', + spec: '../path/to/foo', + raw: 'file:../path/to/foo' }, - "file:///path/to/foo": { + 'file:///path/to/foo': { name: null, - type: "local", - spec: "/path/to/foo", - raw: "file:///path/to/foo" + escapedName: null, + type: 'local', + spec: '/path/to/foo', + raw: 'file:///path/to/foo' }, - "https://server.com/foo.tgz": { + 'https://server.com/foo.tgz': { name: null, - type: "remote", - spec: "https://server.com/foo.tgz", - raw: "https://server.com/foo.tgz" - }, - - "foo@latest": { - name: "foo", - type: "tag", - spec: "latest", - raw: "foo@latest" - }, - - "foo": { - name: "foo", - type: "tag", - spec: "latest", - raw: "foo" + escapedName: null, + type: 'remote', + spec: 'https://server.com/foo.tgz', + raw: 'https://server.com/foo.tgz' + }, + + 'foo@latest': { + name: 'foo', + escapedName: 'foo', + type: 'tag', + spec: 'latest', + raw: 'foo@latest' + }, + + 'foo': { + name: 'foo', + escapedName: 'foo', + type: 'tag', + spec: 'latest', + raw: 'foo' } } Object.keys(tests).forEach(function (arg) { var res = npa(arg) - t.type(res, "Result", arg + " is result") - t.has(res, tests[arg], arg + " matches expectations") + t.type(res, 'Result', arg + ' is result') + t.has(res, tests[arg], arg + ' matches expectations') }) // Completely unreasonable invalid garbage throws an error - t.throws(function() { - npa("this is not a \0 valid package name or url") + t.throws(function () { + npa('this is not a \0 valid package name or url') }) - t.throws(function() { - npa("gopher://yea right") - }, "Unsupported URL Type: gopher://yea right") + t.throws(function () { + npa('gopher://yea right') + }, 'Unsupported URL Type: gopher://yea right') t.end() }) diff --git a/deps/npm/node_modules/npm-package-arg/test/bitbucket.js b/deps/npm/node_modules/npm-package-arg/test/bitbucket.js index 1dff34ffa8afb9..53efd89862e49b 100644 --- a/deps/npm/node_modules/npm-package-arg/test/bitbucket.js +++ b/deps/npm/node_modules/npm-package-arg/test/bitbucket.js @@ -1,81 +1,80 @@ -var npa = require("../npa.js") -var path = require("path") +var npa = require('../npa.js') -require("tap").test("basic", function (t) { +require('tap').test('basic', function (t) { t.setMaxListeners(999) var tests = { - "bitbucket:user/foo-js": { + 'bitbucket:user/foo-js': { name: null, - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "bitbucket:user/foo-js", - raw: "bitbucket:user/foo-js" + type: 'hosted', + hosted: { type: 'bitbucket' }, + spec: 'bitbucket:user/foo-js', + raw: 'bitbucket:user/foo-js' }, - "bitbucket:user/foo-js#bar/baz": { + 'bitbucket:user/foo-js#bar/baz': { name: null, - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "bitbucket:user/foo-js#bar/baz", - raw: "bitbucket:user/foo-js#bar/baz" + type: 'hosted', + hosted: { type: 'bitbucket' }, + spec: 'bitbucket:user/foo-js#bar/baz', + raw: 'bitbucket:user/foo-js#bar/baz' }, - "bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /": { + 'bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /': { name: null, - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /", - raw: "bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /" + type: 'hosted', + hosted: { type: 'bitbucket' }, + spec: 'bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /', + raw: 'bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /' }, - "bitbucket:user/foo-js#bar/baz/bin": { + 'bitbucket:user/foo-js#bar/baz/bin': { name: null, - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "bitbucket:user/foo-js#bar/baz/bin", - raw: "bitbucket:user/foo-js#bar/baz/bin" + type: 'hosted', + hosted: { type: 'bitbucket' }, + spec: 'bitbucket:user/foo-js#bar/baz/bin', + raw: 'bitbucket:user/foo-js#bar/baz/bin' }, - "foo@bitbucket:user/foo-js": { - name: "foo", - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "bitbucket:user/foo-js", - raw: "foo@bitbucket:user/foo-js" + 'foo@bitbucket:user/foo-js': { + name: 'foo', + type: 'hosted', + hosted: { type: 'bitbucket' }, + spec: 'bitbucket:user/foo-js', + raw: 'foo@bitbucket:user/foo-js' }, - "git+ssh://git@bitbucket.org/user/foo#1.2.3": { + 'git+ssh://git@bitbucket.org/user/foo#1.2.3': { name: null, - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "git+ssh://git@bitbucket.org/user/foo.git#1.2.3", - raw: "git+ssh://git@bitbucket.org/user/foo#1.2.3" + type: 'hosted', + hosted: { type: 'bitbucket' }, + spec: 'git+ssh://git@bitbucket.org/user/foo.git#1.2.3', + raw: 'git+ssh://git@bitbucket.org/user/foo#1.2.3' }, - "https://bitbucket.org/user/foo.git": { + 'https://bitbucket.org/user/foo.git': { name: null, - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "git+https://bitbucket.org/user/foo.git", - raw: "https://bitbucket.org/user/foo.git" + type: 'hosted', + hosted: { type: 'bitbucket' }, + spec: 'git+https://bitbucket.org/user/foo.git', + raw: 'https://bitbucket.org/user/foo.git' }, - "@foo/bar@git+ssh://bitbucket.org/user/foo": { - name: "@foo/bar", - scope: "@foo", - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "git+ssh://git@bitbucket.org/user/foo.git", - rawSpec: "git+ssh://bitbucket.org/user/foo", - raw: "@foo/bar@git+ssh://bitbucket.org/user/foo" + '@foo/bar@git+ssh://bitbucket.org/user/foo': { + name: '@foo/bar', + scope: '@foo', + type: 'hosted', + hosted: { type: 'bitbucket' }, + spec: 'git+ssh://git@bitbucket.org/user/foo.git', + rawSpec: 'git+ssh://bitbucket.org/user/foo', + raw: '@foo/bar@git+ssh://bitbucket.org/user/foo' } } Object.keys(tests).forEach(function (arg) { var res = npa(arg) - t.type(res, "Result", arg + " is a result") - t.has(res, tests[arg], arg + " matches expectations") + t.type(res, 'Result', arg + ' is a result') + t.has(res, tests[arg], arg + ' matches expectations') }) t.end() diff --git a/deps/npm/node_modules/npm-package-arg/test/github.js b/deps/npm/node_modules/npm-package-arg/test/github.js index a2c146002b76c2..a7cc1f462fd116 100644 --- a/deps/npm/node_modules/npm-package-arg/test/github.js +++ b/deps/npm/node_modules/npm-package-arg/test/github.js @@ -1,105 +1,103 @@ -var npa = require("../npa.js") -var path = require("path") +var npa = require('../npa.js') -require("tap").test("basic", function (t) { +require('tap').test('basic', function (t) { t.setMaxListeners(999) var tests = { - "user/foo-js": { + 'user/foo-js': { name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "github:user/foo-js", - raw: "user/foo-js" + type: 'hosted', + hosted: { type: 'github' }, + spec: 'github:user/foo-js', + raw: 'user/foo-js' }, - "user/foo-js#bar/baz": { + 'user/foo-js#bar/baz': { name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "github:user/foo-js#bar/baz", - raw: "user/foo-js#bar/baz" + type: 'hosted', + hosted: { type: 'github' }, + spec: 'github:user/foo-js#bar/baz', + raw: 'user/foo-js#bar/baz' }, - "user..blerg--/..foo-js# . . . . . some . tags / / /": { + 'user..blerg--/..foo-js# . . . . . some . tags / / /': { name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "github:user..blerg--/..foo-js# . . . . . some . tags / / /", - raw: "user..blerg--/..foo-js# . . . . . some . tags / / /" + type: 'hosted', + hosted: { type: 'github' }, + spec: 'github:user..blerg--/..foo-js# . . . . . some . tags / / /', + raw: 'user..blerg--/..foo-js# . . . . . some . tags / / /' }, - "user/foo-js#bar/baz/bin": { + 'user/foo-js#bar/baz/bin': { name: null, - type: "hosted", - hosted: { type: "github" }, - raw: "github:user/foo-js#bar/baz/bin", - raw: "user/foo-js#bar/baz/bin" + type: 'hosted', + hosted: { type: 'github' }, + raw: 'user/foo-js#bar/baz/bin' }, - "foo@user/foo-js": { - name: "foo", - type: "hosted", - hosted: { type: "github" }, - spec: "github:user/foo-js", - raw: "foo@user/foo-js" + 'foo@user/foo-js': { + name: 'foo', + type: 'hosted', + hosted: { type: 'github' }, + spec: 'github:user/foo-js', + raw: 'foo@user/foo-js' }, - "github:user/foo-js": { + 'github:user/foo-js': { name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "github:user/foo-js", - raw: "github:user/foo-js" + type: 'hosted', + hosted: { type: 'github' }, + spec: 'github:user/foo-js', + raw: 'github:user/foo-js' }, - "git+ssh://git@github.com/user/foo#1.2.3": { + 'git+ssh://git@github.com/user/foo#1.2.3': { name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "git+ssh://git@github.com/user/foo.git#1.2.3", - raw: "git+ssh://git@github.com/user/foo#1.2.3" + type: 'hosted', + hosted: { type: 'github' }, + spec: 'git+ssh://git@github.com/user/foo.git#1.2.3', + raw: 'git+ssh://git@github.com/user/foo#1.2.3' }, - "git://github.com/user/foo": { + 'git://github.com/user/foo': { name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "git://github.com/user/foo.git", - raw: "git://github.com/user/foo" + type: 'hosted', + hosted: { type: 'github' }, + spec: 'git://github.com/user/foo.git', + raw: 'git://github.com/user/foo' }, - "https://github.com/user/foo.git": { + 'https://github.com/user/foo.git': { name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "git+https://github.com/user/foo.git", - raw: "https://github.com/user/foo.git" + type: 'hosted', + hosted: { type: 'github' }, + spec: 'git+https://github.com/user/foo.git', + raw: 'https://github.com/user/foo.git' }, - "@foo/bar@git+ssh://github.com/user/foo": { - name: "@foo/bar", - scope: "@foo", - type: "hosted", - hosted: { type: "github" }, - spec: "git+ssh://git@github.com/user/foo.git", - rawSpec: "git+ssh://github.com/user/foo", - raw: "@foo/bar@git+ssh://github.com/user/foo" + '@foo/bar@git+ssh://github.com/user/foo': { + name: '@foo/bar', + scope: '@foo', + type: 'hosted', + hosted: { type: 'github' }, + spec: 'git+ssh://git@github.com/user/foo.git', + rawSpec: 'git+ssh://github.com/user/foo', + raw: '@foo/bar@git+ssh://github.com/user/foo' }, - "foo@bar/foo": { - name: "foo", - type: "hosted", - hosted: { type: "github" }, - spec: "github:bar/foo", - raw: "foo@bar/foo" - } + 'foo@bar/foo': { + name: 'foo', + type: 'hosted', + hosted: { type: 'github' }, + spec: 'github:bar/foo', + raw: 'foo@bar/foo' + } } Object.keys(tests).forEach(function (arg) { var res = npa(arg) - t.type(res, "Result", arg + " is a result") - t.has(res, tests[arg], arg + " matches expectations") + t.type(res, 'Result', arg + ' is a result') + t.has(res, tests[arg], arg + ' matches expectations') }) t.end() diff --git a/deps/npm/node_modules/npm-package-arg/test/gitlab.js b/deps/npm/node_modules/npm-package-arg/test/gitlab.js index c9a8ef9f25b80e..b1bff98f9c1151 100644 --- a/deps/npm/node_modules/npm-package-arg/test/gitlab.js +++ b/deps/npm/node_modules/npm-package-arg/test/gitlab.js @@ -1,81 +1,78 @@ -var npa = require("../npa.js") -var path = require("path") +var npa = require('../npa.js') -require("tap").test("basic", function (t) { +require('tap').test('basic', function (t) { t.setMaxListeners(999) var tests = { - "gitlab:user/foo-js": { + 'gitlab:user/foo-js': { name: null, - type: "hosted", - hosted: { type: "gitlab" }, - raw: "gitlab:user/foo-js", - raw: "gitlab:user/foo-js" + type: 'hosted', + hosted: { type: 'gitlab' }, + raw: 'gitlab:user/foo-js' }, - "gitlab:user/foo-js#bar/baz": { + 'gitlab:user/foo-js#bar/baz': { name: null, - type: "hosted", - hosted: { type: "gitlab" }, - raw: "gitlab:user/foo-js#bar/baz", - raw: "gitlab:user/foo-js#bar/baz" + type: 'hosted', + hosted: { type: 'gitlab' }, + raw: 'gitlab:user/foo-js#bar/baz' }, - "gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /": { + 'gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /': { name: null, - type: "hosted", - hosted: { type: "gitlab" }, - spec: "gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /", - raw: "gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /" + type: 'hosted', + hosted: { type: 'gitlab' }, + spec: 'gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /', + raw: 'gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /' }, - "gitlab:user/foo-js#bar/baz/bin": { + 'gitlab:user/foo-js#bar/baz/bin': { name: null, - type: "hosted", - hosted: { type: "gitlab" }, - spec: "gitlab:user/foo-js#bar/baz/bin", - raw: "gitlab:user/foo-js#bar/baz/bin" + type: 'hosted', + hosted: { type: 'gitlab' }, + spec: 'gitlab:user/foo-js#bar/baz/bin', + raw: 'gitlab:user/foo-js#bar/baz/bin' }, - "foo@gitlab:user/foo-js": { - name: "foo", - type: "hosted", - hosted: { type: "gitlab" }, - spec: "gitlab:user/foo-js", - raw: "foo@gitlab:user/foo-js" + 'foo@gitlab:user/foo-js': { + name: 'foo', + type: 'hosted', + hosted: { type: 'gitlab' }, + spec: 'gitlab:user/foo-js', + raw: 'foo@gitlab:user/foo-js' }, - "git+ssh://git@gitlab.com/user/foo#1.2.3": { + 'git+ssh://git@gitlab.com/user/foo#1.2.3': { name: null, - type: "hosted", - hosted: { type: "gitlab" }, - spec: "git+ssh://git@gitlab.com/user/foo.git#1.2.3", - raw: "git+ssh://git@gitlab.com/user/foo#1.2.3" + type: 'hosted', + hosted: { type: 'gitlab' }, + spec: 'git+ssh://git@gitlab.com/user/foo.git#1.2.3', + raw: 'git+ssh://git@gitlab.com/user/foo#1.2.3' }, - "https://gitlab.com/user/foo.git": { + 'https://gitlab.com/user/foo.git': { name: null, - type: "hosted", - hosted: { type: "gitlab" }, - spec: "git+https://gitlab.com/user/foo.git", - raw: "https://gitlab.com/user/foo.git" + type: 'hosted', + hosted: { type: 'gitlab' }, + spec: 'git+https://gitlab.com/user/foo.git', + raw: 'https://gitlab.com/user/foo.git' }, - "@foo/bar@git+ssh://gitlab.com/user/foo": { - name: "@foo/bar", - scope: "@foo", - type: "hosted", - hosted: { type: "gitlab" }, - spec: "git+ssh://git@gitlab.com/user/foo.git", - rawSpec: "git+ssh://gitlab.com/user/foo", - raw: "@foo/bar@git+ssh://gitlab.com/user/foo" + '@foo/bar@git+ssh://gitlab.com/user/foo': { + name: '@foo/bar', + scope: '@foo', + type: 'hosted', + hosted: { type: 'gitlab' }, + spec: 'git+ssh://git@gitlab.com/user/foo.git', + rawSpec: 'git+ssh://gitlab.com/user/foo', + raw: '@foo/bar@git+ssh://gitlab.com/user/foo' } } Object.keys(tests).forEach(function (arg) { var res = npa(arg) - t.type(res, "Result", arg + " is a result") - t.has(res, tests[arg], arg + " matches expectations") + t.type(res, 'Result', arg + ' is a result') + t.has(res, tests[arg], arg + ' matches expectations') }) t.end() diff --git a/deps/npm/node_modules/npm-package-arg/test/windows.js b/deps/npm/node_modules/npm-package-arg/test/windows.js index b91416e2f96e52..a10fa5b6861700 100644 --- a/deps/npm/node_modules/npm-package-arg/test/windows.js +++ b/deps/npm/node_modules/npm-package-arg/test/windows.js @@ -1,69 +1,75 @@ global.FAKE_WINDOWS = true -var npa = require("../npa.js") -var test = require("tap").test -var path = require("path") +var npa = require('../npa.js') +var test = require('tap').test var cases = { - "C:\\x\\y\\z": { - raw: "C:\\x\\y\\z", + 'C:\\x\\y\\z': { + raw: 'C:\\x\\y\\z', scope: null, name: null, - rawSpec: "C:\\x\\y\\z", - spec: "C:\\x\\y\\z", - type: "local" + escapedName: null, + rawSpec: 'C:\\x\\y\\z', + spec: 'C:\\x\\y\\z', + type: 'local' }, - "foo@C:\\x\\y\\z": { - raw: "foo@C:\\x\\y\\z", + 'foo@C:\\x\\y\\z': { + raw: 'foo@C:\\x\\y\\z', scope: null, - name: "foo", - rawSpec: "C:\\x\\y\\z", - spec: "C:\\x\\y\\z", - type: "local" + name: 'foo', + escapedName: 'foo', + rawSpec: 'C:\\x\\y\\z', + spec: 'C:\\x\\y\\z', + type: 'local' }, - "foo@file:///C:\\x\\y\\z": { - raw: "foo@file:///C:\\x\\y\\z", + 'foo@file:///C:\\x\\y\\z': { + raw: 'foo@file:///C:\\x\\y\\z', scope: null, - name: "foo", - rawSpec: "file:///C:\\x\\y\\z", - spec: "C:\\x\\y\\z", - type: "local" + name: 'foo', + escapedName: 'foo', + rawSpec: 'file:///C:\\x\\y\\z', + spec: 'C:\\x\\y\\z', + type: 'local' }, - "foo@file://C:\\x\\y\\z": { - raw: "foo@file://C:\\x\\y\\z", + 'foo@file://C:\\x\\y\\z': { + raw: 'foo@file://C:\\x\\y\\z', scope: null, - name: "foo", - rawSpec: "file://C:\\x\\y\\z", - spec: "C:\\x\\y\\z", - type: "local" + name: 'foo', + escapedName: 'foo', + rawSpec: 'file://C:\\x\\y\\z', + spec: 'C:\\x\\y\\z', + type: 'local' }, - "file:///C:\\x\\y\\z": { - raw: "file:///C:\\x\\y\\z", + 'file:///C:\\x\\y\\z': { + raw: 'file:///C:\\x\\y\\z', scope: null, name: null, - rawSpec: "file:///C:\\x\\y\\z", - spec: "C:\\x\\y\\z", - type: "local" + escapedName: null, + rawSpec: 'file:///C:\\x\\y\\z', + spec: 'C:\\x\\y\\z', + type: 'local' }, - "file://C:\\x\\y\\z": { - raw: "file://C:\\x\\y\\z", + 'file://C:\\x\\y\\z': { + raw: 'file://C:\\x\\y\\z', scope: null, name: null, - rawSpec: "file://C:\\x\\y\\z", - spec: "C:\\x\\y\\z", - type: "local" + escapedName: null, + rawSpec: 'file://C:\\x\\y\\z', + spec: 'C:\\x\\y\\z', + type: 'local' }, - "foo@/foo/bar/baz": { - raw: "foo@/foo/bar/baz", + 'foo@/foo/bar/baz': { + raw: 'foo@/foo/bar/baz', scope: null, - name: "foo", - rawSpec: "/foo/bar/baz", - spec: "/foo/bar/baz", - type: "local" + name: 'foo', + escapedName: 'foo', + rawSpec: '/foo/bar/baz', + spec: '/foo/bar/baz', + type: 'local' } } -test("parse a windows path", function (t) { +test('parse a windows path', function (t) { Object.keys(cases).forEach(function (c) { var expect = cases[c] var actual = npa(c) diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/index.js index 571c276783c779..a4f40f845faa65 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/index.js +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/index.js @@ -8,13 +8,36 @@ if (!process.version || module.exports = process.nextTick; } -function nextTick(fn) { - var args = new Array(arguments.length - 1); - var i = 0; - while (i < args.length) { - args[i++] = arguments[i]; +function nextTick(fn, arg1, arg2, arg3) { + if (typeof fn !== 'function') { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args, i; + switch (len) { + case 0: + case 1: + return process.nextTick(fn); + case 2: + return process.nextTick(function afterTickOne() { + fn.call(null, arg1); + }); + case 3: + return process.nextTick(function afterTickTwo() { + fn.call(null, arg1, arg2); + }); + case 4: + return process.nextTick(function afterTickThree() { + fn.call(null, arg1, arg2, arg3); + }); + default: + args = new Array(len - 1); + i = 0; + while (i < args.length) { + args[i++] = arguments[i]; + } + return process.nextTick(function afterTick() { + fn.apply(null, args); + }); } - process.nextTick(function afterTick() { - fn.apply(null, args); - }); } diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/package.json index 3718b900c60510..f0ee8b940e9e4a 100644 --- a/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/package.json +++ b/deps/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream/node_modules/process-nextick-args/package.json @@ -1,25 +1,32 @@ { "_args": [ [ - "process-nextick-args@~1.0.6", - "/Users/rebecca/code/npm/node_modules/readable-stream" - ], - [ - "process-nextick-args@~1.0.6", + { + "name": "process-nextick-args", + "raw": "process-nextick-args@~1.0.6", + "rawSpec": "~1.0.6", + "scope": null, + "spec": ">=1.0.6 <1.1.0", + "type": "range" + }, "/Users/rebecca/code/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream" ] ], "_from": "process-nextick-args@>=1.0.6 <1.1.0", - "_id": "process-nextick-args@1.0.6", + "_id": "process-nextick-args@1.0.7", "_inCache": true, "_installable": true, "_location": "/npm-registry-client/concat-stream/readable-stream/process-nextick-args", - "_nodeVersion": "4.1.1", + "_nodeVersion": "5.11.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/process-nextick-args-1.0.7.tgz_1462394251778_0.36989671061746776" + }, "_npmUser": { "email": "calvin.metcalf@gmail.com", "name": "cwmma" }, - "_npmVersion": "2.14.4", + "_npmVersion": "3.8.6", "_phantomChildren": {}, "_requested": { "name": "process-nextick-args", @@ -32,6 +39,8 @@ "_requiredBy": [ "/npm-registry-client/concat-stream/readable-stream" ], + "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "_shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", "_shrinkwrap": null, "_spec": "process-nextick-args@~1.0.6", "_where": "/Users/rebecca/code/npm/node_modules/npm-registry-client/node_modules/concat-stream/node_modules/readable-stream", @@ -46,10 +55,10 @@ }, "directories": {}, "dist": { - "shasum": "0f96b001cea90b12592ce566edb97ec11e69bd05", - "tarball": "http://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.6.tgz" + "shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3", + "tarball": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" }, - "gitHead": "e85787b05a8c3c1adb714f332d822e9162699c78", + "gitHead": "5c00899ab01dd32f93ad4b5743da33da91404f39", "homepage": "https://github.com/calvinmetcalf/process-nextick-args", "license": "MIT", "main": "index.js", @@ -69,5 +78,5 @@ "scripts": { "test": "node test.js" }, - "version": "1.0.6" + "version": "1.0.7" } diff --git a/deps/npm/node_modules/npm-registry-client/package.json b/deps/npm/node_modules/npm-registry-client/package.json index ca717a0bd3b952..20ff75226d8a8e 100644 --- a/deps/npm/node_modules/npm-registry-client/package.json +++ b/deps/npm/node_modules/npm-registry-client/package.json @@ -1,28 +1,34 @@ { "_args": [ [ - "npm-registry-client@latest", + { + "name": "npm-registry-client", + "raw": "npm-registry-client@latest", + "rawSpec": "latest", + "scope": null, + "spec": "latest", + "type": "tag" + }, "/Users/rebecca/code/npm" ] ], "_from": "npm-registry-client@latest", - "_id": "npm-registry-client@7.1.0", + "_id": "npm-registry-client@7.1.2", "_inCache": true, "_installable": true, "_location": "/npm-registry-client", - "_nodeVersion": "5.4.0", + "_nodeVersion": "4.4.0", "_npmOperationalInternal": { - "host": "packages-5-east.internal.npmjs.com", - "tmp": "tmp/npm-registry-client-7.1.0.tgz_1456435497334_0.35472381697036326" + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/npm-registry-client-7.1.2.tgz_1466040796551_0.645394338760525" }, "_npmUser": { "email": "me@re-becca.org", "name": "iarna" }, - "_npmVersion": "3.7.5", + "_npmVersion": "3.9.2", "_phantomChildren": { - "inherits": "2.0.1", - "readable-stream": "2.0.5" + "inherits": "2.0.1" }, "_requested": { "name": "npm-registry-client", @@ -35,7 +41,8 @@ "_requiredBy": [ "/" ], - "_shasum": "e3be14ab279fe5123e15ab5c8a650445415664a5", + "_resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.1.2.tgz", + "_shasum": "ddf243a2bd149d35172fe680aff40dfa20054bc3", "_shrinkwrap": null, "_spec": "npm-registry-client@latest", "_where": "/Users/rebecca/code/npm", @@ -54,7 +61,7 @@ "mkdirp": "^0.5.0", "normalize-package-data": "~1.0.1 || ^2.0.0", "npm-package-arg": "^3.0.0 || ^4.0.0", - "npmlog": "~2.0.0", + "npmlog": "~2.0.0 || ~3.1.0", "once": "^1.3.0", "request": "^2.47.0", "retry": "^0.8.0", @@ -72,10 +79,10 @@ }, "directories": {}, "dist": { - "shasum": "e3be14ab279fe5123e15ab5c8a650445415664a5", - "tarball": "http://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.1.0.tgz" + "shasum": "ddf243a2bd149d35172fe680aff40dfa20054bc3", + "tarball": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-7.1.2.tgz" }, - "gitHead": "d077cb652152a8c265369d9d169cba8a52239fb4", + "gitHead": "0b595c4769f314a12661d537a328cf4e5658a00f", "homepage": "https://github.com/npm/npm-registry-client#readme", "license": "ISC", "main": "index.js", @@ -99,7 +106,7 @@ ], "name": "npm-registry-client", "optionalDependencies": { - "npmlog": "~2.0.0" + "npmlog": "~2.0.0 || ~3.1.0" }, "readme": "ERROR: No README data found!", "repository": { @@ -108,5 +115,5 @@ "scripts": { "test": "standard && tap test/*.js" }, - "version": "7.1.0" + "version": "7.1.2" } diff --git a/deps/npm/node_modules/npm-user-validate/.travis.yml b/deps/npm/node_modules/npm-user-validate/.travis.yml index a12e3f0fdebc13..6ff074b74880dd 100644 --- a/deps/npm/node_modules/npm-user-validate/.travis.yml +++ b/deps/npm/node_modules/npm-user-validate/.travis.yml @@ -1,4 +1,7 @@ language: node_js +before_install: +- npm install -g npm@latest +sudo: false node_js: - "0.8" - - "0.10" \ No newline at end of file + - "0.10" diff --git a/deps/npm/node_modules/npm-user-validate/npm-user-validate.js b/deps/npm/node_modules/npm-user-validate/npm-user-validate.js index f18e13ccf7271f..c9da9cd1c90f0e 100644 --- a/deps/npm/node_modules/npm-user-validate/npm-user-validate.js +++ b/deps/npm/node_modules/npm-user-validate/npm-user-validate.js @@ -4,9 +4,10 @@ exports.username = username var requirements = exports.requirements = { username: { - lowerCase: 'Username must be lowercase', - urlSafe: 'Username may not contain non-url-safe chars', - dot: 'Username may not start with "."' + length: 'Name length must be less than or equal to 576 characters long', + lowerCase: 'Name must be lowercase', + urlSafe: 'Name may not contain non-url-safe chars', + dot: 'Name may not start with "."' }, password: {}, email: { @@ -27,6 +28,10 @@ function username (un) { return new Error(requirements.username.dot) } + if (un.length > 576) { + return new Error(requirements.username.length) + } + return null } diff --git a/deps/npm/node_modules/npm-user-validate/package.json b/deps/npm/node_modules/npm-user-validate/package.json index 2cc56691ec4fd4..84204f8a4b1dd0 100644 --- a/deps/npm/node_modules/npm-user-validate/package.json +++ b/deps/npm/node_modules/npm-user-validate/package.json @@ -1,56 +1,101 @@ { - "name": "npm-user-validate", - "version": "0.1.2", - "description": "User validations for npm", - "main": "npm-user-validate.js", - "devDependencies": { - "tap": "0.4.3" + "_args": [ + [ + { + "raw": "npm-user-validate@latest", + "scope": null, + "escapedName": "npm-user-validate", + "name": "npm-user-validate", + "rawSpec": "latest", + "spec": "latest", + "type": "tag" + }, + "/Users/rebecca/code/npm" + ] + ], + "_from": "npm-user-validate@latest", + "_id": "npm-user-validate@0.1.4", + "_inCache": true, + "_installable": true, + "_location": "/npm-user-validate", + "_nodeVersion": "5.11.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/npm-user-validate-0.1.4.tgz_1466105686124_0.06683815410360694" }, - "scripts": { - "test": "tap test/*.js" + "_npmUser": { + "name": "aredridel", + "email": "aria@npmjs.com" }, - "repository": { - "type": "git", - "url": "git://github.com/npm/npm-user-validate.git" + "_npmVersion": "3.9.6", + "_phantomChildren": {}, + "_requested": { + "raw": "npm-user-validate@latest", + "scope": null, + "escapedName": "npm-user-validate", + "name": "npm-user-validate", + "rawSpec": "latest", + "spec": "latest", + "type": "tag" }, - "keywords": [ - "npm", - "validation", - "registry" + "_requiredBy": [ + "#USER", + "/" ], + "_resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.4.tgz", + "_shasum": "18fcbe53cf921eb8e6339314665b187955b1a837", + "_shrinkwrap": null, + "_spec": "npm-user-validate@latest", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Robert Kowalski", "email": "rok@kowalski.gd" }, - "license": "BSD-2-Clause", - "gitHead": "e5b280babff5b73fe74b496461bcf424a51881e1", "bugs": { "url": "https://github.com/npm/npm-user-validate/issues" }, - "homepage": "https://github.com/npm/npm-user-validate#readme", - "_id": "npm-user-validate@0.1.2", - "_shasum": "d585da0b47c9f41a9e6ca684b6fd84ba41ebe87d", - "_from": "npm-user-validate@>=0.1.2 <0.2.0", - "_npmVersion": "2.10.0", - "_nodeVersion": "2.0.1", - "_npmUser": { - "name": "isaacs", - "email": "isaacs@npmjs.com" + "dependencies": {}, + "description": "User validations for npm", + "devDependencies": { + "tap": "^1.2.0" }, + "directories": {}, "dist": { - "shasum": "d585da0b47c9f41a9e6ca684b6fd84ba41ebe87d", - "tarball": "http://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.2.tgz" + "shasum": "18fcbe53cf921eb8e6339314665b187955b1a837", + "tarball": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.4.tgz" }, + "gitHead": "ab804940b6846f8cc63f87692cea85b1906c967a", + "homepage": "https://github.com/npm/npm-user-validate#readme", + "keywords": [ + "npm", + "validation", + "registry" + ], + "license": "BSD-2-Clause", + "main": "npm-user-validate.js", "maintainers": [ { - "name": "robertkowalski", - "email": "rok@kowalski.gd" + "name": "aredridel", + "email": "aria@npmjs.com" }, { "name": "isaacs", "email": "i@izs.me" + }, + { + "name": "robertkowalski", + "email": "rok@kowalski.gd" } ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-0.1.2.tgz" + "name": "npm-user-validate", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/npm/npm-user-validate.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.1.4" } diff --git a/deps/npm/node_modules/npm-user-validate/test/username.test.js b/deps/npm/node_modules/npm-user-validate/test/username.test.js index d30ec8afe71491..83528eec82a76d 100644 --- a/deps/npm/node_modules/npm-user-validate/test/username.test.js +++ b/deps/npm/node_modules/npm-user-validate/test/username.test.js @@ -2,25 +2,41 @@ var test = require('tap').test var v = require('../npm-user-validate.js').username test('username must be lowercase', function (t) { - err = v('ERRR') + var err = v('ERRR') t.type(err, 'object') + t.match(err.message, /lowercase/) t.end() }) test('username may not contain non-url-safe chars', function (t) { - err = v('f ') + var err = v('f ') t.type(err, 'object') + t.match(err.message, /url-safe/) t.end() }) test('username may not start with "."', function (t) { - err = v('.username') + var err = v('.username') t.type(err, 'object') + t.match(err.message, /start with.*\./) t.end() }) +test('username may not be longer than 576 characters', function (t) { + var err = v('bacon-ipsum-dolor-amet-tongue-short-loin-landjaeger-tenderloin-ball-tip-pork-loin-porchetta-pig-pork-chop-beef-ribs-pork-belly--shankle-t-bone-turducken-tongue-landjaeger-pork-loin-beef-chicken-short-loin-venison-capicola--brisket-leberkas-pork-beef-ribs-kevin-short-ribs-tail-bresaola-ham--rump-fatback-short-ribs-frankfurter-boudin--turkey-cupim-tri-tip-pork-chop-landjaeger-frankfurter-ham-hock---kielbasa-sausage-sirloin-short-loin-bacon-tenderloin-biltong-spare-ribs-cow-beef-ribs-tongue-cupim-filet-mignon-drumstick--pork-chop-tenderloin-brisket-pork-belly-leberkas-and-a-pickle') + t.type(err, 'object') + t.match(err.message, /less than or equal to 576/) + t.end() +}); + +test('username may be as long as 576 characters', function (t) { + var err = v('bacon-ipsum-dolor-amet-tongue-short-loin-landjaeger-tenderloin-ball-tip-pork-loin-porchetta-pig-pork-chop-beef-ribs-pork-belly--shankle-t-bone-turducken-tongue-landjaeger-pork-loin-beef-chicken-short-loin-venison-capicola--brisket-leberkas-pork-beef-ribs-kevin-short-ribs-tail-bresaola-ham--rump-fatback-short-ribs-frankfurter-boudin--turkey-cupim-tri-tip-pork-chop-landjaeger-frankfurter-ham-hock---kielbasa-sausage-sirloin-short-loin-bacon-tenderloin-biltong-spare-ribs-cow-beef-ribs-tongue-cupim-filet-mignon-drumstick--pork-chop-tenderloin-brisket-pork-belly-leberkas-beef') + t.type(err, 'null') + t.end() +}); + test('username is ok', function (t) { - err = v('ente') + var err = v('ente') t.type(err, 'null') t.end() }) diff --git a/deps/npm/node_modules/npmlog/.travis.yml b/deps/npm/node_modules/npmlog/.travis.yml deleted file mode 100644 index e76e1ac81ff366..00000000000000 --- a/deps/npm/node_modules/npmlog/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: node_js -sudo: false -node_js: - - "5" - - "4" - - iojs - - "0.12" - - "0.10" - - "0.8" -before_install: - - "npm install -g npm" -script: "npm test" -notifications: - slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 diff --git a/deps/npm/node_modules/npmlog/CHANGELOG.md b/deps/npm/node_modules/npmlog/CHANGELOG.md new file mode 100644 index 00000000000000..f549a1f3de81e3 --- /dev/null +++ b/deps/npm/node_modules/npmlog/CHANGELOG.md @@ -0,0 +1,36 @@ +### v3.1.2 + +* Update to `gauge@1.6.0` adding support for default values for template + items. + +### v3.1.1 + +* Update to `gauge@1.5.3` to fix to `1.x` compatibility when it comes to + when a progress bar is enabled. In `1.x` if you didn't have a TTY the + progress bar was never shown. In `2.x` it merely defaults to disabled, + but you can enable it explicitly if you still want progress updates. + +### v3.1.0 + +* Update to `gauge@2.5.2`: + * Updates the `signal-exit` dependency which fixes an incompatibility with + the node profiler. + * Uses externalizes its ansi code generation in `console-control-strings` +* Make the default progress bar include the last line printed, colored as it + would be when printing to a tty. + +### v3.0.0 + +* Switch to `gauge@2.0.0`, for better performance, better look. +* Set stderr/stdout blocking if they're tty's, so that we can hide a + progress bar going to stderr and then safely print to stdout. Without + this the two can end up overlapping producing confusing and sometimes + corrupted output. + +### v2.0.0 + +* Make the `error` event non-fatal so that folks can use it as a prefix. + +### v1.0.0 + +* Add progress bar with `gauge@1.1.0` diff --git a/deps/npm/node_modules/npmlog/README.md b/deps/npm/node_modules/npmlog/README.md index a57cf429d4a6fa..dba35501614e91 100644 --- a/deps/npm/node_modules/npmlog/README.md +++ b/deps/npm/node_modules/npmlog/README.md @@ -98,7 +98,13 @@ Disable the use of unicode in the progress bar. ## log.setGaugeTemplate(template) -Overrides the default gauge template. +Set a template for outputting the progress bar. See the [gauge documentation] for details. + +[gauge documentation]: https://npmjs.com/package/gauge + +## log.setGaugeThemeset(themes) + +Select a themeset to pick themes from for the progress bar. See the [gauge documentation] for details. ## log.pause() @@ -193,3 +199,12 @@ following fields: * `prefix` {String} * `message` {String} Result of `util.format()` * `messageRaw` {Array} Arguments to `util.format()` + +# Blocking TTYs + +We use [`set-blocking`](https://npmjs.com/package/set-blocking) to set +stderr and stdout blocking if they are tty's and have the setBlocking call. +This is a work around for an issue in early versions of Node.js 6.x, which +made stderr and stdout non-blocking on OSX. (They are always blocking +Windows and were never blocking on Linux.) `npmlog` needs them to be blocking +so that it can allow output to stdout and stderr to be interlaced. diff --git a/deps/npm/node_modules/npmlog/example.js b/deps/npm/node_modules/npmlog/example.js deleted file mode 100644 index c009fb15777fbe..00000000000000 --- a/deps/npm/node_modules/npmlog/example.js +++ /dev/null @@ -1,39 +0,0 @@ -var log = require('./log.js') - -log.heading = 'npm' - -console.error('log.level=silly') -log.level = 'silly' -log.silly('silly prefix', 'x = %j', {foo:{bar:'baz'}}) -log.verbose('verbose prefix', 'x = %j', {foo:{bar:'baz'}}) -log.info('info prefix', 'x = %j', {foo:{bar:'baz'}}) -log.http('http prefix', 'x = %j', {foo:{bar:'baz'}}) -log.warn('warn prefix', 'x = %j', {foo:{bar:'baz'}}) -log.error('error prefix', 'x = %j', {foo:{bar:'baz'}}) -log.silent('silent prefix', 'x = %j', {foo:{bar:'baz'}}) - -console.error('log.level=silent') -log.level = 'silent' -log.silly('silly prefix', 'x = %j', {foo:{bar:'baz'}}) -log.verbose('verbose prefix', 'x = %j', {foo:{bar:'baz'}}) -log.info('info prefix', 'x = %j', {foo:{bar:'baz'}}) -log.http('http prefix', 'x = %j', {foo:{bar:'baz'}}) -log.warn('warn prefix', 'x = %j', {foo:{bar:'baz'}}) -log.error('error prefix', 'x = %j', {foo:{bar:'baz'}}) -log.silent('silent prefix', 'x = %j', {foo:{bar:'baz'}}) - -console.error('log.level=info') -log.level = 'info' -log.silly('silly prefix', 'x = %j', {foo:{bar:'baz'}}) -log.verbose('verbose prefix', 'x = %j', {foo:{bar:'baz'}}) -log.info('info prefix', 'x = %j', {foo:{bar:'baz'}}) -log.http('http prefix', 'x = %j', {foo:{bar:'baz'}}) -log.warn('warn prefix', 'x = %j', {foo:{bar:'baz'}}) -log.error('error prefix', 'x = %j', {foo:{bar:'baz'}}) -log.silent('silent prefix', 'x = %j', {foo:{bar:'baz'}}) -log.error('404', 'This is a longer\n'+ - 'message, with some details\n'+ - 'and maybe a stack.\n'+ - new Error('a 404 error').stack) -log.addLevel('noise', 10000, {beep: true}) -log.noise(false, 'LOUD NOISES') diff --git a/deps/npm/node_modules/npmlog/log.js b/deps/npm/node_modules/npmlog/log.js index 8d781f17319084..e5b70f1f80b743 100644 --- a/deps/npm/node_modules/npmlog/log.js +++ b/deps/npm/node_modules/npmlog/log.js @@ -2,49 +2,76 @@ var Progress = require('are-we-there-yet') var Gauge = require('gauge') var EE = require('events').EventEmitter -var log = exports = module.exports = new EE +var log = exports = module.exports = new EE() var util = require('util') -var ansi = require('ansi') -log.cursor = ansi(process.stderr) -log.stream = process.stderr +var setBlocking = require('set-blocking') +var consoleControl = require('console-control-strings') + +setBlocking(true) +var stream = process.stderr +Object.defineProperty(log, 'stream', { + set: function (newStream) { + stream = newStream + if (this.gauge) this.gauge.setWriteTo(stream, stream) + }, + get: function () { + return stream + } +}) + +// by default, decide based on tty-ness. +var colorEnabled +log.useColor = function () { + return colorEnabled != null ? colorEnabled : stream.isTTY +} -// by default, let ansi decide based on tty-ness. -var colorEnabled = undefined log.enableColor = function () { colorEnabled = true - this.cursor.enabled = true + this.gauge.setTheme({hasColor: colorEnabled, hasUnicode: unicodeEnabled}) } log.disableColor = function () { colorEnabled = false - this.cursor.enabled = false + this.gauge.setTheme({hasColor: colorEnabled, hasUnicode: unicodeEnabled}) } // default level log.level = 'info' -log.gauge = new Gauge(log.cursor) +log.gauge = new Gauge(stream, { + theme: {hasColor: log.useColor()}, + template: [ + {type: 'progressbar', length: 20}, + {type: 'activityIndicator', kerning: 1, length: 1}, + {type: 'section', default: ''}, + ':', + {type: 'logline', kerning: 1, default: ''} + ] +}) + log.tracker = new Progress.TrackerGroup() // no progress bars unless asked log.progressEnabled = false -var gaugeTheme = undefined +var unicodeEnabled log.enableUnicode = function () { - gaugeTheme = Gauge.unicode - log.gauge.setTheme(gaugeTheme) + unicodeEnabled = true + this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled}) } log.disableUnicode = function () { - gaugeTheme = Gauge.ascii - log.gauge.setTheme(gaugeTheme) + unicodeEnabled = false + this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled}) +} + +log.setGaugeThemeset = function (themes) { + this.gauge.setThemeset(themes) } -var gaugeTemplate = undefined log.setGaugeTemplate = function (template) { - gaugeTemplate = template - log.gauge.setTemplate(gaugeTemplate) + this.gauge.setTemplate(template) } log.enableProgress = function () { @@ -95,15 +122,26 @@ trackerConstructors.forEach(function (C) { log[C] = function () { return mixinLog(this.tracker[C].apply(this.tracker, arguments)) } }) -log.clearProgress = function () { - if (!this.progressEnabled) return - this.gauge.hide() +log.clearProgress = function (cb) { + if (!this.progressEnabled) return cb && process.nextTick(cb) + this.gauge.hide(cb) } log.showProgress = function (name, completed) { if (!this.progressEnabled) return - if (completed == null) completed = this.tracker.completed() - this.gauge.show(name, completed) + var values = {} + if (name) values.section = name + var last = log.record[log.record.length - 1] + if (last) { + values.subsection = last.prefix + var disp = log.disp[last.level] || last.level + var logline = this._format(disp, log.style[last.level]) + if (last.prefix) logline += ' ' + this._format(last.prefix, this.prefixStyle) + logline += ' ' + last.message.split(/\r?\n/)[0] + values.logline = logline + } + values.completed = completed || this.tracker.completed() + this.gauge.show(values) }.bind(log) // bind for use in tracker's on-change listener // temporarily stop emitting, but don't drop @@ -137,8 +175,8 @@ log.log = function (lvl, prefix, message) { var a = new Array(arguments.length - 2) var stack = null - for (var i = 2; i < arguments.length; i ++) { - var arg = a[i-2] = arguments[i] + for (var i = 2; i < arguments.length; i++) { + var arg = a[i - 2] = arguments[i] // resolve stack traces to a plain string. if (typeof arg === 'object' && arg && @@ -181,7 +219,6 @@ log.emitLog = function (m) { if (l < this.levels[this.level]) return if (l > 0 && !isFinite(l)) return - var style = log.style[m.level] var disp = log.disp[m.level] || m.level this.clearProgress() m.message.split(/\r?\n/).forEach(function (line) { @@ -198,38 +235,48 @@ log.emitLog = function (m) { this.showProgress() } -log.write = function (msg, style) { - if (!this.cursor) return - if (this.stream !== this.cursor.stream) { - this.cursor = ansi(this.stream, { enabled: colorEnabled }) - var options = {} - if (gaugeTheme != null) options.theme = gaugeTheme - if (gaugeTemplate != null) options.template = gaugeTemplate - this.gauge = new Gauge(options, this.cursor) +log._format = function (msg, style) { + if (!stream) return + + var output = '' + if (this.useColor()) { + style = style || {} + var settings = [] + if (style.fg) settings.push(style.fg) + if (style.bg) settings.push('bg' + style.bg[0].toUpperCase() + style.bg.slice(1)) + if (style.bold) settings.push('bold') + if (style.underline) settings.push('underline') + if (style.inverse) settings.push('inverse') + if (settings.length) output += consoleControl.color(settings) + if (style.beep) output += consoleControl.beep() } + output += msg + if (this.useColor()) { + output += consoleControl.color('reset') + } + return output +} - style = style || {} - if (style.fg) this.cursor.fg[style.fg]() - if (style.bg) this.cursor.bg[style.bg]() - if (style.bold) this.cursor.bold() - if (style.underline) this.cursor.underline() - if (style.inverse) this.cursor.inverse() - if (style.beep) this.cursor.beep() - this.cursor.write(msg).reset() +log.write = function (msg, style) { + if (!stream) return + + stream.write(this._format(msg, style)) } log.addLevel = function (lvl, n, style, disp) { if (!disp) disp = lvl this.levels[lvl] = n this.style[lvl] = style - if (!this[lvl]) this[lvl] = function () { - var a = new Array(arguments.length + 1) - a[0] = lvl - for (var i = 0; i < arguments.length; i ++) { - a[i + 1] = arguments[i] - } - return this.log.apply(this, a) - }.bind(this) + if (!this[lvl]) { + this[lvl] = function () { + var a = new Array(arguments.length + 1) + a[0] = lvl + for (var i = 0; i < arguments.length; i++) { + a[i + 1] = arguments[i] + } + return this.log.apply(this, a) + }.bind(this) + } this.disp[lvl] = disp } @@ -248,4 +295,4 @@ log.addLevel('error', 5000, { fg: 'red', bg: 'black' }, 'ERR!') log.addLevel('silent', Infinity) // allow 'error' prefix -log.on('error', function(){}) +log.on('error', function () {}) diff --git a/deps/npm/node_modules/npmlog/node_modules/ansi/.jshintrc b/deps/npm/node_modules/npmlog/node_modules/ansi/.jshintrc deleted file mode 100644 index 248c5426ea63dc..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/ansi/.jshintrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "laxcomma": true, - "asi": true -} diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json index a32bbf52b2bbca..068780fd557c90 100644 --- a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json +++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json @@ -2,7 +2,7 @@ "_args": [ [ "delegates@^1.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/are-we-there-yet" + "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/are-we-there-yet" ] ], "_from": "delegates@>=1.0.0 <2.0.0", @@ -32,7 +32,7 @@ "_shasum": "84c6e159b81904fdca59a0ef44cd870d31250f9a", "_shrinkwrap": null, "_spec": "delegates@^1.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/are-we-there-yet", + "_where": "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/are-we-there-yet", "bugs": { "url": "https://github.com/visionmedia/node-delegates/issues" }, @@ -45,7 +45,7 @@ "directories": {}, "dist": { "shasum": "84c6e159b81904fdca59a0ef44cd870d31250f9a", - "tarball": "http://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" + "tarball": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" }, "gitHead": "c4dc07ef1ed51c2b2a63f3585e5ef949ee577a49", "homepage": "https://github.com/visionmedia/node-delegates#readme", @@ -56,12 +56,12 @@ "license": "MIT", "maintainers": [ { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" + "email": "tj@vision-media.ca", + "name": "tjholowaychuk" }, { - "name": "dominicbarnes", - "email": "dominic@dbarnes.info" + "email": "dominic@dbarnes.info", + "name": "dominicbarnes" } ], "name": "delegates", diff --git a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/package.json b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/package.json index eb2dea38b8b726..4d774accaaf7d7 100644 --- a/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/package.json +++ b/deps/npm/node_modules/npmlog/node_modules/are-we-there-yet/package.json @@ -2,7 +2,7 @@ "_args": [ [ "are-we-there-yet@~1.1.2", - "/Users/rebecca/code/npm/node_modules/npmlog" + "/Users/rebecca/code/npmlog" ] ], "_from": "are-we-there-yet@>=1.1.2 <1.2.0", @@ -32,10 +32,11 @@ "_requiredBy": [ "/npmlog" ], + "_resolved": "http://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz", "_shasum": "80e470e95a084794fe1899262c5667c6e88de1b3", "_shrinkwrap": null, "_spec": "are-we-there-yet@~1.1.2", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog", + "_where": "/Users/rebecca/code/npmlog", "author": { "name": "Rebecca Turner", "url": "http://re-becca.org" diff --git a/deps/npm/node_modules/npmlog/node_modules/console-control-strings/LICENSE b/deps/npm/node_modules/npmlog/node_modules/console-control-strings/LICENSE new file mode 100644 index 00000000000000..e756052969b780 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/console-control-strings/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2014, Rebecca Turner + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/npmlog/node_modules/console-control-strings/README.md b/deps/npm/node_modules/npmlog/node_modules/console-control-strings/README.md new file mode 100644 index 00000000000000..59cbd5639de446 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/console-control-strings/README.md @@ -0,0 +1,144 @@ +# Console Control Strings + +A library of cross-platform tested terminal/console command strings for +doing things like color and cursor positioning. This is a subset of both +ansi and vt100. All control codes included work on both Windows & Unix-like +OSes, except where noted. + +## Usage + +```js +var consoleControl = require('console-control-strings') + +console.log(consoleControl.color('blue','bgRed', 'bold') + 'hi there' + consoleControl.color('reset')) +process.stdout.write(consoleControl.goto(75, 10)) +``` + +## Why Another? + +There are tons of libraries similar to this one. I wanted one that was: + +1. Very clear about compatibility goals. +2. Could emit, for instance, a start color code without an end one. +3. Returned strings w/o writing to streams. +4. Was not weighed down with other unrelated baggage. + +## Functions + +### var code = consoleControl.up(_num = 1_) + +Returns the escape sequence to move _num_ lines up. + +### var code = consoleControl.down(_num = 1_) + +Returns the escape sequence to move _num_ lines down. + +### var code = consoleControl.forward(_num = 1_) + +Returns the escape sequence to move _num_ lines righ. + +### var code = consoleControl.back(_num = 1_) + +Returns the escape sequence to move _num_ lines left. + +### var code = consoleControl.nextLine(_num = 1_) + +Returns the escape sequence to move _num_ lines down and to the beginning of +the line. + +### var code = consoleControl.previousLine(_num = 1_) + +Returns the escape sequence to move _num_ lines up and to the beginning of +the line. + +### var code = consoleControl.eraseData() + +Returns the escape sequence to erase everything from the current cursor +position to the bottom right of the screen. This is line based, so it +erases the remainder of the current line and all following lines. + +### var code = consoleControl.eraseLine() + +Returns the escape sequence to erase to the end of the current line. + +### var code = consoleControl.goto(_x_, _y_) + +Returns the escape sequence to move the cursor to the designated position. +Note that the origin is _1, 1_ not _0, 0_. + +### var code = consoleControl.gotoSOL() + +Returns the escape sequence to move the cursor to the beginning of the +current line. (That is, it returns a carriage return, `\r`.) + +### var code = consoleControl.beep() + +Returns the escape sequence to cause the termianl to beep. (That is, it +returns unicode character `\x0007`, a Control-G.) + +### var code = consoleControl.hideCursor() + +Returns the escape sequence to hide the cursor. + +### var code = consoleControl.showCursor() + +Returns the escape sequence to show the cursor. + +### var code = consoleControl.color(_colors = []_) + +### var code = consoleControl.color(_color1_, _color2_, _…_, _colorn_) + +Returns the escape sequence to set the current terminal display attributes +(mostly colors). Arguments can either be a list of attributes or an array +of attributes. The difference between passing in an array or list of colors +and calling `.color` separately for each one, is that in the former case a +single escape sequence will be produced where as in the latter each change +will have its own distinct escape sequence. Each attribute can be one of: + +* Reset: + * **reset** – Reset all attributes to the terminal default. +* Styles: + * **bold** – Display text as bold. In some terminals this means using a + bold font, in others this means changing the color. In some it means + both. + * **italic** – Display text as italic. This is not available in most Windows terminals. + * **underline** – Underline text. This is not available in most Windows Terminals. + * **inverse** – Invert the foreground and background colors. + * **stopBold** – Do not display text as bold. + * **stopItalic** – Do not display text as italic. + * **stopUnderline** – Do not underline text. + * **stopInverse** – Do not invert foreground and background. +* Colors: + * **white** + * **black** + * **blue** + * **cyan** + * **green** + * **magenta** + * **red** + * **yellow** + * **grey** / **brightBlack** + * **brightRed** + * **brightGreen** + * **brightYellow** + * **brightBlue** + * **brightMagenta** + * **brightCyan** + * **brightWhite** +* Background Colors: + * **bgWhite** + * **bgBlack** + * **bgBlue** + * **bgCyan** + * **bgGreen** + * **bgMagenta** + * **bgRed** + * **bgYellow** + * **bgGrey** / **bgBrightBlack** + * **bgBrightRed** + * **bgBrightGreen** + * **bgBrightYellow** + * **bgBrightBlue** + * **bgBrightMagenta** + * **bgBrightCyan** + * **bgBrightWhite** diff --git a/deps/npm/node_modules/npmlog/node_modules/console-control-strings/index.js b/deps/npm/node_modules/npmlog/node_modules/console-control-strings/index.js new file mode 100644 index 00000000000000..bf890348ec6e35 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/console-control-strings/index.js @@ -0,0 +1,125 @@ +'use strict' + +// These tables borrowed from `ansi` + +var prefix = '\x1b[' + +exports.up = function up (num) { + return prefix + (num || '') + 'A' +} + +exports.down = function down (num) { + return prefix + (num || '') + 'B' +} + +exports.forward = function forward (num) { + return prefix + (num || '') + 'C' +} + +exports.back = function back (num) { + return prefix + (num || '') + 'D' +} + +exports.nextLine = function nextLine (num) { + return prefix + (num || '') + 'E' +} + +exports.previousLine = function previousLine (num) { + return prefix + (num || '') + 'F' +} + +exports.horizontalAbsolute = function horizontalAbsolute (num) { + if (num == null) throw new Error('horizontalAboslute requires a column to position to') + return prefix + num + 'G' +} + +exports.eraseData = function eraseData () { + return prefix + 'J' +} + +exports.eraseLine = function eraseLine () { + return prefix + 'K' +} + +exports.goto = function (x, y) { + return prefix + y + ';' + x + 'H' +} + +exports.gotoSOL = function () { + return '\r' +} + +exports.beep = function () { + return '\x07' +} + +exports.hideCursor = function hideCursor () { + return prefix + '?25l' +} + +exports.showCursor = function showCursor () { + return prefix + '?25h' +} + +var colors = { + reset: 0, +// styles + bold: 1, + italic: 3, + underline: 4, + inverse: 7, +// resets + stopBold: 22, + stopItalic: 23, + stopUnderline: 24, + stopInverse: 27, +// colors + white: 37, + black: 30, + blue: 34, + cyan: 36, + green: 32, + magenta: 35, + red: 31, + yellow: 33, + bgWhite: 47, + bgBlack: 40, + bgBlue: 44, + bgCyan: 46, + bgGreen: 42, + bgMagenta: 45, + bgRed: 41, + bgYellow: 43, + + grey: 90, + brightBlack: 90, + brightRed: 91, + brightGreen: 92, + brightYellow: 93, + brightBlue: 94, + brightMagenta: 95, + brightCyan: 96, + brightWhite: 97, + + bgGrey: 100, + bgBrightBlack: 100, + bgBrightRed: 101, + bgBrightGreen: 102, + bgBrightYellow: 103, + bgBrightBlue: 104, + bgBrightMagenta: 105, + bgBrightCyan: 106, + bgBrightWhite: 107 +} + +exports.color = function color (colorWith) { + if (arguments.length !== 1 || !Array.isArray(colorWith)) { + colorWith = Array.prototype.slice.call(arguments) + } + return prefix + colorWith.map(colorNameToCode).join(';') + 'm' +} + +function colorNameToCode (color) { + if (colors[color] != null) return colors[color] + throw new Error('Unknown color or style name: ' + color) +} diff --git a/deps/npm/node_modules/npmlog/node_modules/console-control-strings/package.json b/deps/npm/node_modules/npmlog/node_modules/console-control-strings/package.json new file mode 100644 index 00000000000000..8f1559bf62eb32 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/console-control-strings/package.json @@ -0,0 +1,95 @@ +{ + "_args": [ + [ + { + "name": "console-control-strings", + "raw": "console-control-strings@~1.1.0", + "rawSpec": "~1.1.0", + "scope": null, + "spec": ">=1.1.0 <1.2.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/npmlog" + ] + ], + "_from": "console-control-strings@>=1.1.0 <1.2.0", + "_id": "console-control-strings@1.1.0", + "_inCache": true, + "_installable": true, + "_location": "/npmlog/console-control-strings", + "_nodeVersion": "4.4.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/console-control-strings-1.1.0.tgz_1466033396831_0.9470485949423164" + }, + "_npmUser": { + "email": "me@re-becca.org", + "name": "iarna" + }, + "_npmVersion": "3.9.2", + "_phantomChildren": {}, + "_requested": { + "name": "console-control-strings", + "raw": "console-control-strings@~1.1.0", + "rawSpec": "~1.1.0", + "scope": null, + "spec": ">=1.1.0 <1.2.0", + "type": "range" + }, + "_requiredBy": [ + "/npmlog", + "/npmlog/gauge" + ], + "_resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "_shasum": "3d7cf4464db6446ea644bf4b39507f9851008e8e", + "_shrinkwrap": null, + "_spec": "console-control-strings@~1.1.0", + "_where": "/Users/rebecca/code/npm/node_modules/npmlog", + "author": { + "email": "me@re-becca.org", + "name": "Rebecca Turner", + "url": "http://re-becca.org/" + }, + "bugs": { + "url": "https://github.com/iarna/console-control-strings/issues" + }, + "dependencies": {}, + "description": "A library of cross-platform tested terminal/console command strings for doing things like color and cursor positioning. This is a subset of both ansi and vt100. All control codes included work on both Windows & Unix-like OSes, except where noted.", + "devDependencies": { + "standard": "^7.1.2", + "tap": "^5.7.2" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "3d7cf4464db6446ea644bf4b39507f9851008e8e", + "tarball": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz" + }, + "files": [ + "LICENSE", + "index.js" + ], + "gitHead": "722439b4998d2964ac3d3f9ec175c008aa9b7b4b", + "homepage": "https://github.com/iarna/console-control-strings#readme", + "keywords": [], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "email": "me@re-becca.org", + "name": "iarna" + } + ], + "name": "console-control-strings", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/iarna/console-control-strings.git" + }, + "scripts": { + "test": "standard && tap test/*.js" + }, + "version": "1.1.0" +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/CHANGELOG.md b/deps/npm/node_modules/npmlog/node_modules/gauge/CHANGELOG.md new file mode 100644 index 00000000000000..efd08fc7c19dd7 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/CHANGELOG.md @@ -0,0 +1,131 @@ +### v2.6.0 + +* Bug fix: Don't run the code associated with `enable`/`disable` if the gauge + is already enabled or disabled respectively. This prevents leaking event + listeners, amongst other weirdness. +* New feature: Template items can have default values that will be used if no + value was otherwise passed in. + +### v2.5.3 + +* Default to `enabled` only if we have a tty. Users can always override + this by passing in the `enabled` option explicitly or by calling calling + `gauge.enable()`. + +### v2.5.2 + +* Externalized `./console-strings.js` into `console-control-strings`. + +### v2.5.1 + +* Update to `signal-exit@3.0.0`, which fixes a compatibility bug with the + node profiler. +* [#39](https://github.com/iarna/gauge/pull/39) Fix tests on 0.10 and add + a missing devDependency. ([@helloyou2012](https://github.com/helloyou2012)) + +### v2.5.0 + +* Add way to programmatically fetch a list of theme names in a themeset + (`Themeset.getThemeNames`). + +### v2.4.0 + +* Add support for setting themesets on existing gauge objects. +* Add post-IO callback to `gauge.hide()` as it is somtetimes necessary when + your terminal is interleaving output from multiple filehandles (ie, stdout + & stderr). + +### v2.3.1 + +* Fix a refactor bug in setTheme where it wasn't accepting the various types + of args it should. + +### v2.3.0 + +#### FEATURES + +* Add setTemplate & setTheme back in. +* Add support for named themes, you can now ask for things like 'colorASCII' + and 'brailleSpinner'. Of course, you can still pass in theme objects. + Additionally you can now pass in an object with `hasUnicode`, `hasColor` and + `platform` keys in order to override our guesses as to those values when + selecting a default theme from the themeset. +* Make the output stream optional (it defaults to `process.stderr` now). +* Add `setWriteTo(stream[, tty])` to change the output stream and, + optionally, tty. + +#### BUG FIXES & REFACTORING + +* Abort the display phase early if we're supposed to be hidden and we are. +* Stop printing a bunch of spaces at the end of lines, since we're already + using an erase-to-end-of-line code anyway. +* The unicode themes were missing the subsection separator. + +### v2.2.1 + +* Fix image in readme + +### v2.2.0 + +* All new themes API– reference themes by name and pass in custom themes and + themesets (themesets get platform support autodetection done on them to + select the best theme). Theme mixins let you add features to all existing + themes. +* Much, much improved test coverage. + +### v2.1.0 + +* Got rid of ░ in the default platform, noUnicode, hasColor theme. Thanks + to @yongtw123 for pointing out this had snuck in. +* Fiddled with the demo output to make it easier to see the spinner spin. Also + added prints before each platforms test output. +* I forgot to include `signal-exit` in our deps. <.< Thank you @KenanY for + finding this. Then I was lazy and made a new commit instead of using his + PR. Again, thank you for your patience @KenenY. +* Drastically speed up travis testing. +* Add a small javascript demo (demo.js) for showing off the various themes + (and testing them on diff platforms). +* Change: The subsection separator from ⁄ and / (different chars) to >. +* Fix crasher: A show or pulse without a label would cause the template renderer + to complain about a missing value. +* New feature: Add the ability to disable the clean-up-on-exit behavior. + Not something I expect to be widely desirable, but important if you have + multiple distinct gauge instances in your app. +* Use our own color support detection. + The `has-color` module proved too magic for my needs, making assumptions + as to which stream we write to and reading command line arguments. + +### v2.0.0 + +This is a major rewrite of the internals. Externally there are fewer +changes: + +* On node>0.8 gauge object now prints updates at a fixed rate. This means + that when you call `show` it may wate up to `updateInterval` ms before it + actually prints an update. You override this behavior with the + `fixedFramerate` option. +* The gauge object now keeps the cursor hidden as long as it's enabled and + shown. +* The constructor's arguments have changed, now it takes a mandatory output + stream and an optional options object. The stream no longer needs to be + an `ansi`ified stream, although it can be if you want (but we won't make + use of its special features). +* Previously the gauge was disabled by default if `process.stdout` wasn't a + tty. Now it always defaults to enabled. If you want the previous + behavior set the `enabled` option to `process.stdout.isTTY`. +* The constructor's options have changed– see the docs for details. +* Themes are entirely different. If you were using a custom theme, or + referring to one directly (eg via `Gauge.unicode` or `Gauge.ascii`) then + you'll need to change your code. You can get the equivalent of the latter + with: + ``` + var themes = require('gauge/themes') + var unicodeTheme = themes(true, true) // returns the color unicode theme for your platform + ``` + The default themes no longer use any ambiguous width characters, so even + if you choose to display those as wide your progress bar should still + display correctly. +* Templates are entirely different and if you were using a custom one, you + should consult the documentation to learn how to recreate it. If you were + using the default, be aware that it has changed and the result looks quite + a bit different. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/README.md index 337dc9d8d45e14..bf87d189f1b5c1 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/README.md +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/README.md @@ -15,138 +15,330 @@ gauge.pulse("this") gauge.hide() ``` -![](example.png) +![](gauge-demo.gif) -### `var gauge = new Gauge([options], [ansiStream])` +### CHANGES FROM 1.x -* **options** – *(optional)* An option object. (See [below] for details.) -* **ansiStream** – *(optional)* A stream that's been blessed by the [ansi] - module to include various commands for controlling the cursor in a terminal. +Gauge 2.x is breaking release, please see the [changelog] for details on +what's changed if you were previously a user of this module. -[ansi]: https://www.npmjs.com/package/ansi -[below]: #theme-objects +[changelog]: CHANGELOG.md + +### THE GAUGE CLASS + +This is the typical interface to the module– it provides a pretty +fire-and-forget interface to displaying your status information. + +``` +var Gauge = require("gauge") + +var gauge = new Gauge([stream], [options]) +``` + +* **stream** – *(optional, default STDERR)* A stream that progress bar + updates are to be written to. Gauge honors backpressure and will pause + most writing if it is indicated. +* **options** – *(optional)* An option object. Constructs a new gauge. Gauges are drawn on a single line, and are not drawn -if the current terminal isn't a tty. +if **stream** isn't a tty and a tty isn't explicitly provided. + +If **stream** is a terminal or if you pass in **tty** to **options** then we +will detect terminal resizes and redraw to fit. We do this by watching for +`resize` events on the tty. (To work around a bug in verisons of Node prior +to 2.5.0, we watch for them on stdout if the tty is stderr.) Resizes to +larger window sizes will be clean, but shrinking the window will always +result in some cruft. -If you resize your terminal in a way that can be detected then the gauge -will be drawn at the new size. As a general rule, growing your terminal will -be clean, but shrinking your terminal will result in cruft as we don't have -enough information to know where what we wrote previously is now located. +**IMPORTANT:** If you prevously were passing in a non-tty stream but you still +want output (for example, a stream wrapped by the `ansi` module) then you +need to pass in the **tty** option below, as `gauge` needs access to +the underlying tty in order to do things like terminal resizes and terminal +width detection. The **options** object can have the following properties, all of which are optional: -* maxUpdateFrequency: defaults to 50 msec, the gauge will not be drawn more - than once in this period of time. This applies to `show` and `pulse` - calls, but if you `hide` and then `show` the gauge it will draw it - regardless of time since last draw. -* theme: defaults to Gauge.unicode` if the terminal supports - unicode according to [has-unicode], otherwise it defaults to `Gauge.ascii`. - Details on the [theme object](#theme-objects) are documented elsewhere. -* template: see [documentation elsewhere](#template-objects) for - defaults and details. +* **updateInterval**: How often gauge updates should be drawn, in miliseconds. +* **fixedFramerate**: Defaults to false on node 0.8, true on everything + else. When this is true a timer is created to trigger once every + `updateInterval` ms, when false, updates are printed as soon as they come + in but updates more often than `updateInterval` are ignored. The reason + 0.8 doesn't have this set to true is that it can't `unref` its timer and + so it would stop your program from exiting– if you want to use this + feature with 0.8 just make sure you call `gauge.disable()` before you + expect your program to exit. +* **themes**: A themeset to use when selecting the theme to use. Defaults + to `gauge/themes`, see the [themes] documentation for details. +* **theme**: Select a theme for use, it can be a: + * Theme object, in which case the **themes** is not used. + * The name of a theme, which will be looked up in the current *themes* + object. + * A configuration object with any of `hasUnicode`, `hasColor` or + `platform` keys, which if wlll be used to override our guesses when making + a default theme selection. + + If no theme is selected then a default is picked using a combination of our + best guesses at your OS, color support and unicode support. +* **template**: Describes what you want your gauge to look like. The + default is what npm uses. Detailed [documentation] is later in this + document. +* **hideCursor**: Defaults to true. If true, then the cursor will be hidden + while the gauge is displayed. +* **tty**: The tty that you're ultimately writing to. Defaults to the same + as **stream**. This is used for detecting the width of the terminal and + resizes. The width used is `tty.columns - 1`. If no tty is available then + a width of `79` is assumed. +* **enabled**: Defaults to true if `tty` is a TTY, false otherwise. If true + the gauge starts enabled. If disabled then all update commands are + ignored and no gauge will be printed until you call `.enable()`. +* **Plumbing**: The class to use to actually generate the gauge for + printing. This defaults to `require('gauge/plumbing')` and ordinarly you + shouldn't need to override this. +* **cleanupOnExit**: Defaults to true. Ordinarily we register an exit + handler to make sure your cursor is turned back on and the progress bar + erased when your process exits, even if you Ctrl-C out or otherwise exit + unexpectedly. You can disable this and it won't register the exit handler. [has-unicode]: https://www.npmjs.com/package/has-unicode +[themes]: #themes +[documentation]: #templates -If **ansiStream** isn't passed in, then one will be constructed from stderr -with `ansi(process.stderr)`. +#### `gauge.show(section | status, [completed])` -### `gauge.show([name, [completed]])` +The first argument is either the section, the name of the current thing +contributing to progress, or an object with keys like **section**, +**subsection** & **completed** (or any others you have types for in a custom +template). If you don't want to update or set any of these you can pass +`null` and it will be ignored. -* **name** – *(optional)* The name of the current thing contributing to progress. Defaults to the last value used, or "". -* **completed** – *(optional)* The portion completed as a value between 0 and 1. Defaults to the last value used, or 0. +The second argument is the percent completed as a value between 0 and 1. +Without it, completion is just not updated. You'll also note that completion +can be passed in as part of a status object as the first argument. If both +it and the completed argument are passed in, the completed argument wins. -If `process.stdout.isTTY` is false then this does nothing. If completed is 0 -and `gauge.pulse` has never been called, then similarly nothing will be printed. +#### `gauge.hide([cb])` -If `maxUpdateFrequency` msec haven't passed since the last call to `show` or -`pulse` then similarly, nothing will be printed. (Actually, the update is -deferred until `maxUpdateFrequency` msec have passed and if nothing else has -happened, the gauge update will happen.) +Removes the gauge from the terminal. Optionally, callback `cb` after IO has +had an opportunity to happen (currently this just means after `setImmediate` +has called back.) -### `gauge.hide()` +It turns out this is important when you're pausing the progress bar on one +filehandle and printing to another– otherwise (with a big enough print) node +can end up printing the "end progress bar" bits to the progress bar filehandle +while other stuff is printing to another filehandle. These getting interleaved +can cause corruption in some terminals. -Removes the gauge from the terminal. +#### `gauge.pulse([subsection])` -### `gauge.pulse([name])` +* **subsection** – *(optional)* The specific thing that triggered this pulse -* **name** – *(optional)* The specific thing that triggered this pulse +Spins the spinner in the gauge to show output. If **subsection** is +included then it will be combined with the last name passed to `gauge.show`. -Spins the spinner in the gauge to show output. If **name** is included then -it will be combined with the last name passed to `gauge.show` using the -subsection property of the theme (typically a right facing arrow). - -### `gauge.disable()` +#### `gauge.disable()` Hides the gauge and ignores further calls to `show` or `pulse`. -### `gauge.enable()` +#### `gauge.enable()` Shows the gauge and resumes updating when `show` or `pulse` is called. -### `gauge.setTheme(theme)` +#### `gauge.setThemeset(themes)` + +Change the themeset to select a theme from. The same as the `themes` option +used in the constructor. The theme will be reselected from this themeset. -Change the active theme, will be displayed with the next show or pulse +#### `gauge.setTheme(theme)` -### `gauge.setTemplate(template)` +Change the active theme, will be displayed with the next show or pulse. This can be: + +* Theme object, in which case the **themes** is not used. +* The name of a theme, which will be looked up in the current *themes* + object. +* A configuration object with any of `hasUnicode`, `hasColor` or + `platform` keys, which if wlll be used to override our guesses when making + a default theme selection. + +If no theme is selected then a default is picked using a combination of our +best guesses at your OS, color support and unicode support. + +#### `gauge.setTemplate(template)` Change the active template, will be displayed with the next show or pulse -### Theme Objects +### Tracking Completion + +If you have more than one thing going on that you want to track completion +of, you may find the related [are-we-there-yet] helpful. It's `change` +event can be wired up to the `show` method to get a more traditional +progress bar interface. + +[are-we-there-yet]: https://www.npmjs.com/package/are-we-there-yet + +### THEMES + +``` +var themes = require('gauge/themes') + +// fetch the default color unicode theme for this platform +var ourTheme = themes({hasUnicode: true, hasColor: true}) + +// fetch the default non-color unicode theme for osx +var ourTheme = themes({hasUnicode: true, hasColor: false, platform: 'darwin'}) + +// create a new theme based on the color ascii theme for this platform +// that brackets the progress bar with arrows +var ourTheme = themes.newTheme(theme(hasUnicode: false, hasColor: true}), { + preProgressbar: '→', + postProgressbar: '←' +}) +``` + +The object returned by `gauge/themes` is an instance of the `ThemeSet` class. + +``` +var ThemeSet = require('gauge/theme-set') +var themes = new ThemeSet() +// or +var themes = require('gauge/themes') +var mythemes = themes.newThemeset() // creates a new themeset based on the default themes +``` + +#### themes(opts) +#### themes.getDefault(opts) + +Theme objects are a function that fetches the default theme based on +platform, unicode and color support. + +Options is an object with the following properties: + +* **hasUnicode** - If true, fetch a unicode theme, if no unicode theme is + available then a non-unicode theme will be used. +* **hasColor** - If true, fetch a color theme, if no color theme is + available a non-color theme will be used. +* **platform** (optional) - Defaults to `process.platform`. If no + platform match is available then `fallback` is used instead. + +If no compatible theme can be found then an error will be thrown with a +`code` of `EMISSINGTHEME`. + +#### themes.addTheme(themeName, themeObj) +#### themes.addTheme(themeName, [parentTheme], newTheme) + +Adds a named theme to the themeset. You can pass in either a theme object, +as returned by `themes.newTheme` or the arguments you'd pass to +`themes.newTheme`. + +#### themes.getThemeNames() -There are two theme objects available as a part of the module, `Gauge.unicode` and `Gauge.ascii`. -Theme objects have the follow properties: +Return a list of all of the names of the themes in this themeset. Suitable +for use in `themes.getTheme(…)`. -| Property | Unicode | ASCII | -| ---------- | ------- | ----- | -| startgroup | ╢ | \| | -| endgroup | ╟ | \| | -| complete | █ | # | -| incomplete | ░ | - | -| spinner | ▀▐▄▌ | -\\\|/ | -| subsection | → | -> | +#### themes.getTheme(name) -*startgroup*, *endgroup* and *subsection* can be as many characters as you want. +Returns the theme object from this theme set named `name`. -*complete* and *incomplete* should be a single character width each. +If `name` does not exist in this themeset an error will be thrown with +a `code` of `EMISSINGTHEME`. -*spinner* is a list of characters to use in turn when displaying an activity -spinner. The Gauge will spin as many characters as you give here. +#### themes.setDefault([opts], themeName) -### Template Objects +`opts` is an object with the following properties. + +* **platform** - Defaults to `'fallback'`. If your theme is platform + specific, specify that here with the platform from `process.platform`, eg, + `win32`, `darwin`, etc. +* **hasUnicode** - Defaults to `false`. If your theme uses unicode you + should set this to true. +* **hasColor** - Defaults to `false`. If your theme uses color you should + set this to true. + +`themeName` is the name of the theme (as given to `addTheme`) to use for +this set of `opts`. + +#### themes.newTheme([parentTheme,] newTheme) + +Create a new theme object based on `parentTheme`. If no `parentTheme` is +provided then a minimal parentTheme that defines functions for rendering the +activity indicator (spinner) and progress bar will be defined. (This +fallback parent is defined in `gauge/base-theme`.) + +newTheme should be a bare object– we'll start by discussing the properties +defined by the default themes: + +* **preProgressbar** - displayed prior to the progress bar, if the progress + bar is displayed. +* **postProgressbar** - displayed after the progress bar, if the progress bar + is displayed. +* **progressBarTheme** - The subtheme passed through to the progress bar + renderer, it's an object with `complete` and `remaining` properties + that are the strings you want repeated for those sections of the progress + bar. +* **activityIndicatorTheme** - The theme for the activity indicator (spinner), + this can either be a string, in which each character is a different step, or + an array of strings. +* **preSubsection** - Displayed as a separator between the `section` and + `subsection` when the latter is printed. + +More generally, themes can have any value that would be a valid value when rendering +templates. The properties in the theme are used when their name matches a type in +the template. Their values can be: + +* **strings & numbers** - They'll be included as is +* **function (values, theme, width)** - Should return what you want in your output. + *values* is an object with values provided via `gauge.show`, + *theme* is the theme specific to this item (see below) or this theme object, + and *width* is the number of characters wide your result should be. + +There are a couple of special prefixes: + +* **pre** - Is shown prior to the property, if its displayed. +* **post** - Is shown after the property, if its displayed. + +And one special suffix: + +* **Theme** - Its value is passed to a function-type item as the theme. + +#### themes.addToAllThemes(theme) + +This *mixes-in* `theme` into all themes currently defined. It also adds it +to the default parent theme for this themeset, so future themes added to +this themeset will get the values from `theme` by default. + +#### themes.newThemeset() + +Copy the current themeset into a new one. This allows you to easily inherit +one themeset from another. + +### TEMPLATES A template is an array of objects and strings that, after being evaluated, will be turned into the gauge line. The default template is: ```javascript [ - {type: "name", separated: true, maxLength: 25, minLength: 25, align: "left"}, - {type: "spinner", separated: true}, - {type: "startgroup"}, - {type: "completionbar"}, - {type: "endgroup"} + {type: 'progressbar', length: 20}, + {type: 'activityIndicator', kerning: 1, length: 1}, + {type: 'section', kerning: 1, default: ''}, + {type: 'subsection', kerning: 1, default: ''} ] ``` The various template elements can either be **plain strings**, in which case they will -be be included verbatum in the output. - -If the template element is an object, it can have the following keys: - -* *type* can be: - * `name` – The most recent name passed to `show`; if this is in response to a - `pulse` then the name passed to `pulse` will be appended along with the - subsection property from the theme. - * `spinner` – If you've ever called `pulse` this will be one of the characters - from the spinner property of the theme. - * `startgroup` – The `startgroup` property from the theme. - * `completionbar` – This progress bar itself - * `endgroup` – The `endgroup` property from the theme. -* *separated* – If true, the element will be separated with spaces from things on - either side (and margins count as space, so it won't be indented), but only - if its included. +be be included verbatum in the output, or objects with the following properties: + +* *type* can be any of the following plus any keys you pass into `gauge.show` plus + any keys you have on a custom theme. + * `section` – What big thing you're working on now. + * `subsection` – What component of that thing is currently working. + * `activityIndicator` – Shows a spinner using the `activityIndicatorTheme` + from your active theme. + * `progressbar` – A progress bar representing your current `completed` + using the `progressbarTheme` from your active theme. +* *kerning* – Number of spaces that must be between this item and other + items, if this item is displayed at all. * *maxLength* – The maximum length for this element. If its value is longer it will be truncated. * *minLength* – The minimum length for this element. If its value is shorter it @@ -155,12 +347,49 @@ If the template element is an object, it can have the following keys: as you'd expect from word processors. * *length* – Provides a single value for both *minLength* and *maxLength*. If both *length* and *minLength or *maxLength* are specifed then the latter take precedence. +* *value* – A literal value to use for this template item. +* *default* – A default value to use for this template item if a value + wasn't otherwise passed in. -### Tracking Completion +### PLUMBING -If you have more than one thing going on that you want to track completion -of, you may find the related [are-we-there-yet] helpful. It's `change` -event can be wired up to the `show` method to get a more traditional -progress bar interface. +This is the super simple, assume nothing, do no magic internals used by gauge to +implement its ordinary interface. -[are-we-there-yet]: https://www.npmjs.com/package/are-we-there-yet +``` +var Plumbing = require('gauge/plumbing') +var gauge = new Plumbing(theme, template, width) +``` + +* **theme**: The theme to use. +* **template**: The template to use. +* **width**: How wide your gauge should be + +#### `gauge.setTheme(theme)` + +Change the active theme. + +#### `gauge.setTemplate(template)` + +Change the active template. + +#### `gauge.setWidth(width)` + +Change the width to render at. + +#### `gauge.hide()` + +Return the string necessary to hide the progress bar + +#### `gauge.hideCursor()` + +Return a string to hide the cursor. + +#### `gauge.showCursor()` + +Return a string to show the cursor. + +#### `gauge.show(status)` + +Using `status` for values, render the provided template with the theme and return +a string that is suitable for printing to update the gauge. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/base-theme.js b/deps/npm/node_modules/npmlog/node_modules/gauge/base-theme.js new file mode 100644 index 00000000000000..0b67638e0211d0 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/base-theme.js @@ -0,0 +1,14 @@ +'use strict' +var spin = require('./spin.js') +var progressBar = require('./progress-bar.js') + +module.exports = { + activityIndicator: function (values, theme, width) { + if (values.spun == null) return + return spin(theme, values.spun) + }, + progressbar: function (values, theme, width) { + if (values.completed == null) return + return progressBar(theme, width, values.completed) + } +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/error.js b/deps/npm/node_modules/npmlog/node_modules/gauge/error.js new file mode 100644 index 00000000000000..d9914ba5335d25 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/error.js @@ -0,0 +1,24 @@ +'use strict' +var util = require('util') + +var User = exports.User = function User (msg) { + var err = new Error(msg) + Error.captureStackTrace(err, User) + err.code = 'EGAUGE' + return err +} + +exports.MissingTemplateValue = function MissingTemplateValue (item, values) { + var err = new User(util.format('Missing template value "%s"', item.type)) + Error.captureStackTrace(err, MissingTemplateValue) + err.template = item + err.values = values + return err +} + +exports.Internal = function Internal (msg) { + var err = new Error(msg) + Error.captureStackTrace(err, Internal) + err.code = 'EGAUGEINTERNAL' + return err +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/has-color.js b/deps/npm/node_modules/npmlog/node_modules/gauge/has-color.js new file mode 100644 index 00000000000000..e283a256f26b74 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/has-color.js @@ -0,0 +1,12 @@ +'use strict' + +module.exports = isWin32() || isColorTerm() + +function isWin32 () { + return process.platform === 'win32' +} + +function isColorTerm () { + var termHasColor = /^screen|^xterm|^vt100|color|ansi|cygwin|linux/i + return !!process.env.COLORTERM || termHasColor.test(process.env.TERM) +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/index.js new file mode 100644 index 00000000000000..7eefb9507bb47e --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/index.js @@ -0,0 +1,226 @@ +'use strict' +var Plumbing = require('./plumbing.js') +var hasUnicode = require('has-unicode') +var hasColor = require('./has-color.js') +var onExit = require('signal-exit') +var defaultThemes = require('./themes') +var setInterval = require('./set-interval.js') +var process = require('./process.js') +var setImmediate = require('./set-immediate') + +module.exports = Gauge + +function callWith (obj, method) { + return function () { + return method.call(obj) + } +} + +function Gauge (arg1, arg2) { + var options, writeTo + if (arg1 && arg1.write) { + writeTo = arg1 + options = arg2 || {} + } else if (arg2 && arg2.write) { + writeTo = arg2 + options = arg1 || {} + } else { + writeTo = process.stderr + options = arg1 || arg2 || {} + } + + this._status = { + spun: 0, + section: '', + subsection: '' + } + this._paused = false // are we paused for back pressure? + this._disabled = true // are all progress bar updates disabled? + this._showing = false // do we WANT the progress bar on screen + this._onScreen = false // IS the progress bar on screen + this._needsRedraw = false // should we print something at next tick? + this._hideCursor = options.hideCursor == null ? true : options.hideCursor + this._fixedFramerate = options.fixedFramerate == null + ? !(/^v0\.8\./.test(process.version)) + : options.fixedFramerate + this._lastUpdateAt = null + this._updateInterval = options.updateInterval == null ? 50 : options.updateInterval + + this._themes = options.themes || defaultThemes + this._theme = options.theme + var theme = this._computeTheme(options.theme) + var template = options.template || [ + {type: 'progressbar', length: 20}, + {type: 'activityIndicator', kerning: 1, length: 1}, + {type: 'section', kerning: 1, default: ''}, + {type: 'subsection', kerning: 1, default: ''} + ] + this.setWriteTo(writeTo, options.tty) + var PlumbingClass = options.Plumbing || Plumbing + this._gauge = new PlumbingClass(theme, template, this.getWidth()) + + this._$$doRedraw = callWith(this, this._doRedraw) + this._$$handleSizeChange = callWith(this, this._handleSizeChange) + + if (options.cleanupOnExit == null || options.cleanupOnExit) { + onExit(callWith(this, this.disable)) + } + + if (options.enabled || (options.enabled == null && this._tty && this._tty.isTTY)) { + this.enable() + } else { + this.disable() + } +} +Gauge.prototype = {} + +Gauge.prototype.setTemplate = function (template) { + this._gauge.setTemplate(template) + if (this._showing) this._requestRedraw() +} + +Gauge.prototype._computeTheme = function (theme) { + if (!theme) theme = {} + if (theme && (Object.keys(theme).length === 0 || theme.hasUnicode != null || theme.hasColor != null)) { + var useUnicode = theme.hasUnicode == null ? hasUnicode() : theme.hasUnicode + var useColor = theme.hasColor == null ? hasColor : theme.hasColor + theme = this._themes.getDefault({hasUnicode: useUnicode, hasColor: useColor, platform: theme.platform}) + } else if (typeof theme === 'string') { + theme = this._themes.getTheme(theme) + } + return theme +} + +Gauge.prototype.setThemeset = function (themes) { + this._themes = themes + this.setTheme(this._theme) +} + +Gauge.prototype.setTheme = function (theme) { + this._gauge.setTheme(this._computeTheme(theme)) + if (this._showing) this._requestRedraw() + this._theme = theme +} + +Gauge.prototype._requestRedraw = function () { + this._needsRedraw = true + if (!this._fixedFramerate) this._doRedraw() +} + +Gauge.prototype.getWidth = function () { + return ((this._tty && this._tty.columns) || 80) - 1 +} + +Gauge.prototype.setWriteTo = function (writeTo, tty) { + var enabled = !this._disabled + if (enabled) this.disable() + this._writeTo = writeTo + this._tty = tty || + (writeTo === process.stderr && process.stdout.isTTY && process.stdout) || + (writeTo.isTTY && writeTo) || + this._tty + if (this._gauge) this._gauge.setWidth(this.getWidth()) + if (enabled) this.enable() +} + +Gauge.prototype.enable = function () { + if (!this._disabled) return + this._disabled = false + if (this._tty) this._enableEvents() + if (this._showing) this.show() +} + +Gauge.prototype.disable = function () { + if (this._disabled) return + if (this._showing) { + this._lastUpdateAt = null + this._showing = false + this._doRedraw() + this._showing = true + } + this._disabled = true + if (this._tty) this._disableEvents() +} + +Gauge.prototype._enableEvents = function () { + this._tty.on('resize', this._$$handleSizeChange) + if (this._fixedFramerate) { + this.redrawTracker = setInterval(this._$$doRedraw, this._updateInterval) + if (this.redrawTracker.unref) this.redrawTracker.unref() + } +} + +Gauge.prototype._disableEvents = function () { + this._tty.removeListener('resize', this._$$handleSizeChange) + if (this._fixedFramerate) clearInterval(this.redrawTracker) +} + +Gauge.prototype.hide = function (cb) { + if (this._disabled) return cb && process.nextTick(cb) + if (!this._showing) return cb && process.nextTick(cb) + this._showing = false + this._doRedraw() + cb && setImmediate(cb) +} + +Gauge.prototype.show = function (section, completed) { + if (this._disabled) return + this._showing = true + if (typeof section === 'string') { + this._status.section = section + } else if (typeof section === 'object') { + var sectionKeys = Object.keys(section) + for (var ii = 0; ii < sectionKeys.length; ++ii) { + var key = sectionKeys[ii] + this._status[key] = section[key] + } + } + if (completed != null) this._status.completed = completed + this._requestRedraw() +} + +Gauge.prototype.pulse = function (subsection) { + if (this._disabled) return + if (!this._showing) return + this._status.subsection = subsection || '' + this._status.spun ++ + this._requestRedraw() +} + +Gauge.prototype._handleSizeChange = function () { + this._gauge.setWidth(this._tty.columns - 1) + this._requestRedraw() +} + +Gauge.prototype._doRedraw = function () { + if (this._disabled || this._paused) return + if (!this._fixedFramerate) { + var now = Date.now() + if (this._lastUpdateAt && now - this._lastUpdateAt < this._updateInterval) return + this._lastUpdateAt = now + } + if (!this._showing && this._onScreen) { + this._onScreen = false + var result = this._gauge.hide() + if (this._hideCursor) { + result += this._gauge.showCursor() + } + return this._writeTo.write(result) + } + if (!this._showing && !this._onScreen) return + if (this._showing && !this._onScreen) { + this._onScreen = true + this._needsRedraw = true + if (this._hideCursor) { + this._writeTo.write(this._gauge.hideCursor()) + } + } + if (!this._needsRedraw) return + if (!this._writeTo.write(this._gauge.show(this._status))) { + this._paused = true + this._writeTo.on('drain', callWith(this, function () { + this._paused = false + this._doRedraw() + })) + } +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/index.js new file mode 100644 index 00000000000000..092d0baef6698e --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/index.js @@ -0,0 +1,32 @@ +'use strict'; +module.exports = (function () { + if (process.argv.indexOf('--no-color') !== -1) { + return false; + } + + if (process.argv.indexOf('--color') !== -1) { + return true; + } + + if (process.stdout && !process.stdout.isTTY) { + return false; + } + + if (process.platform === 'win32') { + return true; + } + + if ('COLORTERM' in process.env) { + return true; + } + + if (process.env.TERM === 'dumb') { + return false; + } + + if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { + return true; + } + + return false; +})(); diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/package.json new file mode 100644 index 00000000000000..2e469520b4255d --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + "has-color@^0.1.7", + "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge" + ] + ], + "_from": "has-color@>=0.1.7 <0.2.0", + "_id": "has-color@0.1.7", + "_inCache": true, + "_installable": true, + "_location": "/npmlog/gauge/has-color", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "1.4.6", + "_phantomChildren": {}, + "_requested": { + "name": "has-color", + "raw": "has-color@^0.1.7", + "rawSpec": "^0.1.7", + "scope": null, + "spec": ">=0.1.7 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/npmlog/gauge" + ], + "_resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz", + "_shasum": "67144a5260c34fc3cca677d041daf52fe7b78b2f", + "_shrinkwrap": null, + "_spec": "has-color@^0.1.7", + "_where": "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/has-color/issues" + }, + "dependencies": {}, + "description": "Detect whether a terminal supports color", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "67144a5260c34fc3cca677d041daf52fe7b78b2f", + "tarball": "http://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/has-color", + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "capability", + "detect" + ], + "license": "MIT", + "maintainers": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + } + ], + "name": "has-color", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/has-color.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.1.7" +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/readme.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/readme.md new file mode 100644 index 00000000000000..37bbd8991a6423 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/has-color/readme.md @@ -0,0 +1,30 @@ +# has-color [![Build Status](https://travis-ci.org/sindresorhus/has-color.svg?branch=master)](https://travis-ci.org/sindresorhus/has-color) + +> Detect whether a terminal supports color. + +Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). + + +## Install + +```bash +$ npm install --save has-color +``` + + +## Usage + +```js +var hasColor = require('has-color'); + +if (hasColor) { + console.log('Terminal supports color.'); +} +``` + +It obeys the `--color` and `--no-color` CLI flags. + + +## License + +[MIT](http://opensource.org/licenses/MIT) © [Sindre Sorhus](http://sindresorhus.com) diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/README.md deleted file mode 100644 index 33b447cd53e779..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.repeat v4.0.0 - -The [lodash](https://lodash.com/) method `_.repeat` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.repeat -``` - -In Node.js: -```js -var repeat = require('lodash.repeat'); -``` - -See the [documentation](https://lodash.com/docs#repeat) or [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash.repeat) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/index.js deleted file mode 100644 index 7a54e85714c367..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/index.js +++ /dev/null @@ -1,215 +0,0 @@ -/** - * lodash 4.0.0 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var toString = require('lodash.tostring'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991, - MAX_INTEGER = 1.7976931348623157e+308, - NAN = 0 / 0; - -/** `Object#toString` result references. */ -var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; - -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeFloor = Math.floor; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Converts `value` to an integer. - * - * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3'); - * // => 3 - */ -function toInteger(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - var remainder = value % 1; - return value === value ? (remainder ? value - remainder : value) : 0; -} - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3); - * // => 3 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3'); - * // => 3 - */ -function toNumber(value) { - if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -/** - * Repeats the given string `n` times. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to repeat. - * @param {number} [n=0] The number of times to repeat the string. - * @returns {string} Returns the repeated string. - * @example - * - * _.repeat('*', 3); - * // => '***' - * - * _.repeat('abc', 2); - * // => 'abcabc' - * - * _.repeat('abc', 0); - * // => '' - */ -function repeat(string, n) { - string = toString(string); - n = toInteger(n); - - var result = ''; - if (!string || n < 1 || n > MAX_SAFE_INTEGER) { - return result; - } - // Leverage the exponentiation by squaring algorithm for a faster repeat. - // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. - do { - if (n % 2) { - result += string; - } - n = nativeFloor(n / 2); - string += string; - } while (n); - - return result; -} - -module.exports = repeat; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/LICENSE deleted file mode 100644 index bcbe13d67a9621..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (MIT) - -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/README.md deleted file mode 100644 index 33b447cd53e779..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.repeat v4.0.0 - -The [lodash](https://lodash.com/) method `_.repeat` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.repeat -``` - -In Node.js: -```js -var repeat = require('lodash.repeat'); -``` - -See the [documentation](https://lodash.com/docs#repeat) or [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash.repeat) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/index.js deleted file mode 100644 index 7a54e85714c367..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.repeat/index.js +++ /dev/null @@ -1,215 +0,0 @@ -/** - * lodash 4.0.0 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var toString = require('lodash.tostring'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991, - MAX_INTEGER = 1.7976931348623157e+308, - NAN = 0 / 0; - -/** `Object#toString` result references. */ -var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; - -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeFloor = Math.floor; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Converts `value` to an integer. - * - * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3'); - * // => 3 - */ -function toInteger(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - var remainder = value % 1; - return value === value ? (remainder ? value - remainder : value) : 0; -} - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3); - * // => 3 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3'); - * // => 3 - */ -function toNumber(value) { - if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -/** - * Repeats the given string `n` times. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to repeat. - * @param {number} [n=0] The number of times to repeat the string. - * @returns {string} Returns the repeated string. - * @example - * - * _.repeat('*', 3); - * // => '***' - * - * _.repeat('abc', 2); - * // => 'abcabc' - * - * _.repeat('abc', 0); - * // => '' - */ -function repeat(string, n) { - string = toString(string); - n = toInteger(n); - - var result = ''; - if (!string || n < 1 || n > MAX_SAFE_INTEGER) { - return result; - } - // Leverage the exponentiation by squaring algorithm for a faster repeat. - // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. - do { - if (n % 2) { - result += string; - } - n = nativeFloor(n / 2); - string += string; - } while (n); - - return result; -} - -module.exports = repeat; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/LICENSE deleted file mode 100644 index bcbe13d67a9621..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/node_modules/lodash.tostring/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (MIT) - -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/LICENSE deleted file mode 100644 index bcbe13d67a9621..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (MIT) - -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/LICENSE deleted file mode 100644 index bcbe13d67a9621..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (MIT) - -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/README.md deleted file mode 100644 index 33b447cd53e779..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.repeat v4.0.0 - -The [lodash](https://lodash.com/) method `_.repeat` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.repeat -``` - -In Node.js: -```js -var repeat = require('lodash.repeat'); -``` - -See the [documentation](https://lodash.com/docs#repeat) or [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash.repeat) for more details. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/index.js deleted file mode 100644 index 7a54e85714c367..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/index.js +++ /dev/null @@ -1,215 +0,0 @@ -/** - * lodash 4.0.0 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var toString = require('lodash.tostring'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991, - MAX_INTEGER = 1.7976931348623157e+308, - NAN = 0 / 0; - -/** `Object#toString` result references. */ -var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; - -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeFloor = Math.floor; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Converts `value` to an integer. - * - * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3'); - * // => 3 - */ -function toInteger(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - var remainder = value % 1; - return value === value ? (remainder ? value - remainder : value) : 0; -} - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3); - * // => 3 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3'); - * // => 3 - */ -function toNumber(value) { - if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -/** - * Repeats the given string `n` times. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to repeat. - * @param {number} [n=0] The number of times to repeat the string. - * @returns {string} Returns the repeated string. - * @example - * - * _.repeat('*', 3); - * // => '***' - * - * _.repeat('abc', 2); - * // => 'abcabc' - * - * _.repeat('abc', 0); - * // => '' - */ -function repeat(string, n) { - string = toString(string); - n = toInteger(n); - - var result = ''; - if (!string || n < 1 || n > MAX_SAFE_INTEGER) { - return result; - } - // Leverage the exponentiation by squaring algorithm for a faster repeat. - // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. - do { - if (n % 2) { - result += string; - } - n = nativeFloor(n / 2); - string += string; - } while (n); - - return result; -} - -module.exports = repeat; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/package.json deleted file mode 100644 index 8bb2966c4a3149..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.repeat/package.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "_args": [ - [ - "lodash.repeat@^4.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad" - ], - [ - "lodash.repeat@^4.0.0", - "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart" - ] - ], - "_from": "lodash.repeat@>=4.0.0 <5.0.0", - "_id": "lodash.repeat@4.0.0", - "_inCache": true, - "_installable": true, - "_location": "/npmlog/gauge/lodash.padstart/lodash.repeat", - "_nodeVersion": "5.5.0", - "_npmOperationalInternal": { - "host": "packages-9-west.internal.npmjs.com", - "tmp": "tmp/lodash.repeat-4.0.0.tgz_1455602646227_0.7481637196615338" - }, - "_npmUser": { - "email": "john.david.dalton@gmail.com", - "name": "jdalton" - }, - "_npmVersion": "2.14.18", - "_phantomChildren": {}, - "_requested": { - "name": "lodash.repeat", - "raw": "lodash.repeat@^4.0.0", - "rawSpec": "^4.0.0", - "scope": null, - "spec": ">=4.0.0 <5.0.0", - "type": "range" - }, - "_requiredBy": [ - "/npmlog/gauge/lodash.padstart" - ], - "_shrinkwrap": null, - "_spec": "lodash.repeat@^4.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart", - "author": { - "email": "john.david.dalton@gmail.com", - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "email": "john.david.dalton@gmail.com", - "name": "John-David Dalton", - "url": "http://allyoucanleet.com/" - }, - { - "email": "blaine@iceddev.com", - "name": "Blaine Bublitz", - "url": "https://github.com/phated" - }, - { - "email": "mathias@qiwi.be", - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - } - ], - "dependencies": { - "lodash.tostring": "^4.0.0" - }, - "description": "The lodash method `_.repeat` exported as a module.", - "devDependencies": {}, - "directories": {}, - "dist": { - "shasum": "aaf570b2ab0bfb0dda6d6e93291d54b30b1f7d22", - "tarball": "http://registry.npmjs.org/lodash.repeat/-/lodash.repeat-4.0.0.tgz" - }, - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "repeat" - ], - "license": "MIT", - "maintainers": [ - { - "email": "john.david.dalton@gmail.com", - "name": "jdalton" - }, - { - "email": "mathias@qiwi.be", - "name": "mathias" - }, - { - "email": "blaine@iceddev.com", - "name": "phated" - } - ], - "name": "lodash.repeat", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.0.0" -} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/LICENSE deleted file mode 100644 index bcbe13d67a9621..00000000000000 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padstart/node_modules/lodash.tostring/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (MIT) - -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/index.js new file mode 100644 index 00000000000000..508504840dc61d --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/index.js @@ -0,0 +1,83 @@ +'use strict'; +/* eslint-disable no-unused-vars */ +var hasOwnProperty = Object.prototype.hasOwnProperty; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; + +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (e) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } +} + +module.exports = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (Object.getOwnPropertySymbols) { + symbols = Object.getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; +}; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/license similarity index 76% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/LICENSE rename to deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/license index bcbe13d67a9621..654d0bfe943437 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.repeat/LICENSE +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/license @@ -1,8 +1,6 @@ The MIT License (MIT) -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors +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 @@ -11,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/package.json new file mode 100644 index 00000000000000..f27b55175b4010 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/package.json @@ -0,0 +1,106 @@ +{ + "_args": [ + [ + "object-assign@^4.0.1", + "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge" + ] + ], + "_from": "object-assign@>=4.0.1 <5.0.0", + "_id": "object-assign@4.1.0", + "_inCache": true, + "_installable": true, + "_location": "/npmlog/gauge/object-assign", + "_nodeVersion": "4.1.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/object-assign-4.1.0.tgz_1462212593641_0.3332549517508596" + }, + "_npmUser": { + "email": "ben@benalpert.com", + "name": "spicyj" + }, + "_npmVersion": "2.14.19", + "_phantomChildren": {}, + "_requested": { + "name": "object-assign", + "raw": "object-assign@^4.0.1", + "rawSpec": "^4.0.1", + "scope": null, + "spec": ">=4.0.1 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/npmlog/gauge" + ], + "_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz", + "_shasum": "7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0", + "_shrinkwrap": null, + "_spec": "object-assign@^4.0.1", + "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/object-assign/issues" + }, + "dependencies": {}, + "description": "ES2015 Object.assign() ponyfill", + "devDependencies": { + "lodash": "^4.8.2", + "matcha": "^0.7.0", + "mocha": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0", + "tarball": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "72fe21c86911758f3342fdf41c2a57860d5829bc", + "homepage": "https://github.com/sindresorhus/object-assign#readme", + "keywords": [ + "object", + "assign", + "extend", + "properties", + "es2015", + "ecmascript", + "harmony", + "ponyfill", + "prollyfill", + "polyfill", + "shim", + "browser" + ], + "license": "MIT", + "maintainers": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + { + "email": "ben@benalpert.com", + "name": "spicyj" + } + ], + "name": "object-assign", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/object-assign.git" + }, + "scripts": { + "bench": "matcha bench.js", + "test": "xo && mocha" + }, + "version": "4.1.0" +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/readme.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/readme.md new file mode 100644 index 00000000000000..13c097734cfd18 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/object-assign/readme.md @@ -0,0 +1,56 @@ +# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign) + +> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) ponyfill + +> Ponyfill: A polyfill that doesn't overwrite the native method + + +## Install + +``` +$ npm install --save object-assign +``` + + +## Usage + +```js +const objectAssign = require('object-assign'); + +objectAssign({foo: 0}, {bar: 1}); +//=> {foo: 0, bar: 1} + +// multiple sources +objectAssign({foo: 0}, {bar: 1}, {baz: 2}); +//=> {foo: 0, bar: 1, baz: 2} + +// overwrites equal keys +objectAssign({foo: 0}, {foo: 1}, {foo: 2}); +//=> {foo: 2} + +// ignores null and undefined sources +objectAssign({foo: 0}, null, {bar: 1}, undefined); +//=> {foo: 0, bar: 1} +``` + + +## API + +### objectAssign(target, source, [source, ...]) + +Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones. + + +## Resources + +- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign) + + +## Related + +- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/CHANGELOG.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/CHANGELOG.md new file mode 100644 index 00000000000000..c12f8340c8d6c6 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/CHANGELOG.md @@ -0,0 +1,17 @@ +# Change Log + +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. + + +# [3.0.0](https://github.com/tapjs/signal-exit/compare/v2.1.2...v3.0.0) (2016-06-13) + + +### Bug Fixes + +* get our test suite running on Windows ([#23](https://github.com/tapjs/signal-exit/issues/23)) ([6f3eda8](https://github.com/tapjs/signal-exit/commit/6f3eda8)) +* hooking SIGPROF was interfering with profilers see [#21](https://github.com/tapjs/signal-exit/issues/21) ([#24](https://github.com/tapjs/signal-exit/issues/24)) ([1248a4c](https://github.com/tapjs/signal-exit/commit/1248a4c)) + + +### BREAKING CHANGES + +* signal-exit no longer wires into SIGPROF diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/LICENSE.txt b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/LICENSE.txt new file mode 100644 index 00000000000000..c7e27478a3eff8 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/LICENSE.txt @@ -0,0 +1,14 @@ +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/README.md new file mode 100644 index 00000000000000..8ebccabecaea4c --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/README.md @@ -0,0 +1,40 @@ +# signal-exit + +[![Build Status](https://travis-ci.org/tapjs/signal-exit.png)](https://travis-ci.org/tapjs/signal-exit) +[![Coverage](https://coveralls.io/repos/tapjs/signal-exit/badge.svg?branch=master)](https://coveralls.io/r/tapjs/signal-exit?branch=master) +[![NPM version](https://img.shields.io/npm/v/signal-exit.svg)](https://www.npmjs.com/package/signal-exit) +[![Windows Tests](https://img.shields.io/appveyor/ci/bcoe/signal-exit/master.svg?label=Windows%20Tests)](https://ci.appveyor.com/project/bcoe/signal-exit) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) + +When you want to fire an event no matter how a process exits: + +* reaching the end of execution. +* explicitly having `process.exit(code)` called. +* having `process.kill(pid, sig)` called. +* receiving a fatal signal from outside the process + +Use `signal-exit`. + +```js +var onExit = require('signal-exit') + +onExit(function (code, signal) { + console.log('process exited!') +}) +``` + +## API + +`var remove = onExit(function (code, signal) {}, options)` + +The return value of the function is a function that will remove the +handler. + +Note that the function *only* fires for signals if the signal would +cause the proces to exit. That is, there are no other listeners, and +it is a fatal signal. + +## Options + +* `alwaysLast`: Run this handler after any other signal or exit + handlers. This causes `process.emit` to be monkeypatched. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/index.js new file mode 100644 index 00000000000000..7dd8d917dc507b --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/index.js @@ -0,0 +1,148 @@ +// Note: since nyc uses this module to output coverage, any lines +// that are in the direct sync flow of nyc's outputCoverage are +// ignored, since we can never get coverage for them. +var assert = require('assert') +var signals = require('./signals.js') + +var EE = require('events') +/* istanbul ignore if */ +if (typeof EE !== 'function') { + EE = EE.EventEmitter +} + +var emitter +if (process.__signal_exit_emitter__) { + emitter = process.__signal_exit_emitter__ +} else { + emitter = process.__signal_exit_emitter__ = new EE() + emitter.count = 0 + emitter.emitted = {} +} + +module.exports = function (cb, opts) { + assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler') + + if (loaded === false) { + load() + } + + var ev = 'exit' + if (opts && opts.alwaysLast) { + ev = 'afterexit' + } + + var remove = function () { + emitter.removeListener(ev, cb) + if (emitter.listeners('exit').length === 0 && + emitter.listeners('afterexit').length === 0) { + unload() + } + } + emitter.on(ev, cb) + + return remove +} + +module.exports.unload = unload +function unload () { + if (!loaded) { + return + } + loaded = false + + signals.forEach(function (sig) { + try { + process.removeListener(sig, sigListeners[sig]) + } catch (er) {} + }) + process.emit = originalProcessEmit + process.reallyExit = originalProcessReallyExit + emitter.count -= 1 +} + +function emit (event, code, signal) { + if (emitter.emitted[event]) { + return + } + emitter.emitted[event] = true + emitter.emit(event, code, signal) +} + +// { : , ... } +var sigListeners = {} +signals.forEach(function (sig) { + sigListeners[sig] = function listener () { + // If there are no other listeners, an exit is coming! + // Simplest way: remove us and then re-send the signal. + // We know that this will kill the process, so we can + // safely emit now. + var listeners = process.listeners(sig) + if (listeners.length === emitter.count) { + unload() + emit('exit', null, sig) + /* istanbul ignore next */ + emit('afterexit', null, sig) + /* istanbul ignore next */ + process.kill(process.pid, sig) + } + } +}) + +module.exports.signals = function () { + return signals +} + +module.exports.load = load + +var loaded = false + +function load () { + if (loaded) { + return + } + loaded = true + + // This is the number of onSignalExit's that are in play. + // It's important so that we can count the correct number of + // listeners on signals, and don't wait for the other one to + // handle it instead of us. + emitter.count += 1 + + signals = signals.filter(function (sig) { + try { + process.on(sig, sigListeners[sig]) + return true + } catch (er) { + return false + } + }) + + process.emit = processEmit + process.reallyExit = processReallyExit +} + +var originalProcessReallyExit = process.reallyExit +function processReallyExit (code) { + process.exitCode = code || 0 + emit('exit', process.exitCode, null) + /* istanbul ignore next */ + emit('afterexit', process.exitCode, null) + /* istanbul ignore next */ + originalProcessReallyExit.call(process, process.exitCode) +} + +var originalProcessEmit = process.emit +function processEmit (ev, arg) { + if (ev === 'exit') { + if (arg !== undefined) { + process.exitCode = arg + } + var ret = originalProcessEmit.apply(this, arguments) + emit('exit', process.exitCode, null) + /* istanbul ignore next */ + emit('afterexit', process.exitCode, null) + return ret + } else { + return originalProcessEmit.apply(this, arguments) + } +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/package.json new file mode 100644 index 00000000000000..ce0807f2de3227 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/package.json @@ -0,0 +1,105 @@ +{ + "_args": [ + [ + { + "name": "signal-exit", + "raw": "signal-exit@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge" + ] + ], + "_from": "signal-exit@>=3.0.0 <4.0.0", + "_id": "signal-exit@3.0.0", + "_inCache": true, + "_installable": true, + "_location": "/npmlog/gauge/signal-exit", + "_nodeVersion": "5.1.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/signal-exit-3.0.0.tgz_1465857346813_0.7961636525578797" + }, + "_npmUser": { + "email": "ben@npmjs.com", + "name": "bcoe" + }, + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "name": "signal-exit", + "raw": "signal-exit@^3.0.0", + "rawSpec": "^3.0.0", + "scope": null, + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/npmlog/gauge" + ], + "_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.0.tgz", + "_shasum": "3c0543b65d7b4fbc60b6cd94593d9bf436739be8", + "_shrinkwrap": null, + "_spec": "signal-exit@^3.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/npmlog/node_modules/gauge", + "author": { + "email": "ben@npmjs.com", + "name": "Ben Coe" + }, + "bugs": { + "url": "https://github.com/tapjs/signal-exit/issues" + }, + "dependencies": {}, + "description": "when you want to fire an event no matter how a process exits.", + "devDependencies": { + "chai": "^3.5.0", + "coveralls": "^2.11.2", + "nyc": "^6.4.4", + "standard": "^7.1.2", + "standard-version": "^2.3.0", + "tap": "^5.7.2" + }, + "directories": {}, + "dist": { + "shasum": "3c0543b65d7b4fbc60b6cd94593d9bf436739be8", + "tarball": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.0.tgz" + }, + "files": [ + "index.js", + "signals.js" + ], + "gitHead": "2bbec4e5d9f9cf1f7529b1c923d1b058e69ccf7f", + "homepage": "https://github.com/tapjs/signal-exit", + "keywords": [ + "signal", + "exit" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "email": "ben@npmjs.com", + "name": "bcoe" + }, + { + "email": "isaacs@npmjs.com", + "name": "isaacs" + } + ], + "name": "signal-exit", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/tapjs/signal-exit.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "pretest": "standard", + "release": "standard-version", + "test": "tap --timeout=240 ./test/*.js --cov" + }, + "version": "3.0.0" +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/signals.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/signals.js new file mode 100644 index 00000000000000..bc6f97ee606954 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/signal-exit/signals.js @@ -0,0 +1,52 @@ +// This is not the set of all possible signals. +// +// It IS, however, the set of all signals that trigger +// an exit on either Linux or BSD systems. Linux is a +// superset of the signal names supported on BSD, and +// the unknown signals just fail to register, so we can +// catch that easily enough. +// +// Don't bother with SIGKILL. It's uncatchable, which +// means that we can't fire any callbacks anyway. +// +// If a user does happen to register a handler on a non- +// fatal signal like SIGWINCH or something, and then +// exit, it'll end up firing `process.emit('exit')`, so +// the handler will be fired anyway. +module.exports = [ + 'SIGABRT', + 'SIGALRM', + 'SIGBUS', + 'SIGFPE', + 'SIGHUP', + 'SIGILL', + 'SIGINT', + 'SIGSEGV', + 'SIGTERM' +] + +if (process.platform !== 'win32') { + module.exports.push( + 'SIGVTALRM', + 'SIGXCPU', + 'SIGXFSZ', + 'SIGUSR2', + 'SIGTRAP', + 'SIGSYS', + 'SIGQUIT', + 'SIGIOT' + // should detect profiler and enable/disable accordingly. + // see #21 + // 'SIGPROF' + ) +} + +if (process.platform === 'linux') { + module.exports.push( + 'SIGIO', + 'SIGPOLL', + 'SIGPWR', + 'SIGSTKFLT', + 'SIGUNUSED' + ) +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/index.js new file mode 100644 index 00000000000000..aa2f839b6dd2ce --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/index.js @@ -0,0 +1,32 @@ +'use strict'; +var stripAnsi = require('strip-ansi'); +var codePointAt = require('code-point-at'); +var isFullwidthCodePoint = require('is-fullwidth-code-point'); + +// https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1345 +module.exports = function (str) { + if (typeof str !== 'string' || str.length === 0) { + return 0; + } + + var width = 0; + + str = stripAnsi(str); + + for (var i = 0; i < str.length; i++) { + var code = codePointAt(str, i); + + // surrogates + if (code >= 0x10000) { + i++; + } + + if (isFullwidthCodePoint(code)) { + width += 2; + } else { + width++; + } + } + + return width; +}; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/license similarity index 76% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/LICENSE rename to deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/license index bcbe13d67a9621..654d0bfe943437 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash.tostring/LICENSE +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/license @@ -1,8 +1,6 @@ The MIT License (MIT) -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors +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 @@ -11,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/index.js new file mode 100644 index 00000000000000..0335117977237f --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/index.js @@ -0,0 +1,33 @@ +'use strict'; +var numberIsNan = require('number-is-nan'); + +module.exports = function (str, pos) { + if (str === null || str === undefined) { + throw TypeError(); + } + + str = String(str); + + var size = str.length; + var i = pos ? Number(pos) : 0; + + if (numberIsNan(i)) { + i = 0; + } + + if (i < 0 || i >= size) { + return undefined; + } + + var first = str.charCodeAt(i); + + if (first >= 0xD800 && first <= 0xDBFF && size > i + 1) { + var second = str.charCodeAt(i + 1); + + if (second >= 0xDC00 && second <= 0xDFFF) { + return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + } + } + + return first; +}; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/license similarity index 76% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/LICENSE rename to deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/license index bcbe13d67a9621..654d0bfe943437 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/LICENSE +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/license @@ -1,8 +1,6 @@ The MIT License (MIT) -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors +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 @@ -11,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/index.js new file mode 100644 index 00000000000000..79be4b9cb8c3bc --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = Number.isNaN || function (x) { + return x !== x; +}; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/license similarity index 76% rename from deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/LICENSE rename to deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/license index bcbe13d67a9621..654d0bfe943437 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padend/LICENSE +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/license @@ -1,8 +1,6 @@ The MIT License (MIT) -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors +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 @@ -11,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/package.json new file mode 100644 index 00000000000000..018bcb37151877 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/package.json @@ -0,0 +1,93 @@ +{ + "_args": [ + [ + "number-is-nan@^1.0.0", + "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at" + ] + ], + "_from": "number-is-nan@>=1.0.0 <2.0.0", + "_id": "number-is-nan@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/npmlog/gauge/string-width/code-point-at/number-is-nan", + "_nodeVersion": "0.12.3", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.10.0", + "_phantomChildren": {}, + "_requested": { + "name": "number-is-nan", + "raw": "number-is-nan@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/npmlog/gauge/string-width/code-point-at" + ], + "_resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz", + "_shasum": "c020f529c5282adfdd233d91d4b181c3d686dc4b", + "_shrinkwrap": null, + "_spec": "number-is-nan@^1.0.0", + "_where": "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/number-is-nan/issues" + }, + "dependencies": {}, + "description": "ES6 Number.isNaN() ponyfill", + "devDependencies": { + "ava": "0.0.4" + }, + "directories": {}, + "dist": { + "shasum": "c020f529c5282adfdd233d91d4b181c3d686dc4b", + "tarball": "http://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "0f394b1bc33185c40304363b209e3f0588dbeeb3", + "homepage": "https://github.com/sindresorhus/number-is-nan#readme", + "keywords": [ + "es6", + "es2015", + "ecmascript", + "harmony", + "ponyfill", + "polyfill", + "shim", + "number", + "is", + "nan", + "not" + ], + "license": "MIT", + "maintainers": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + } + ], + "name": "number-is-nan", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/number-is-nan.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/readme.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/readme.md new file mode 100644 index 00000000000000..93d851a14f1ac5 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/node_modules/number-is-nan/readme.md @@ -0,0 +1,30 @@ +# number-is-nan [![Build Status](https://travis-ci.org/sindresorhus/number-is-nan.svg?branch=master)](https://travis-ci.org/sindresorhus/number-is-nan) + +> ES6 [`Number.isNaN()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) ponyfill + +> Ponyfill: A polyfill that doesn't overwrite the native method + + +## Install + +``` +$ npm install --save number-is-nan +``` + + +## Usage + +```js +var numberIsNan = require('number-is-nan'); + +numberIsNan(NaN); +//=> true + +numberIsNan('unicorn'); +//=> false +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/package.json new file mode 100644 index 00000000000000..4c1430d8e52ade --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + "code-point-at@^1.0.0", + "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge/node_modules/string-width" + ] + ], + "_from": "code-point-at@>=1.0.0 <2.0.0", + "_id": "code-point-at@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/npmlog/gauge/string-width/code-point-at", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.11.2", + "_phantomChildren": {}, + "_requested": { + "name": "code-point-at", + "raw": "code-point-at@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/npmlog/gauge/string-width" + ], + "_resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.0.0.tgz", + "_shasum": "f69b192d3f7d91e382e4b71bddb77878619ab0c6", + "_shrinkwrap": null, + "_spec": "code-point-at@^1.0.0", + "_where": "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge/node_modules/string-width", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/code-point-at/issues" + }, + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "description": "ES2015 String#codePointAt() ponyfill", + "devDependencies": { + "ava": "0.0.4" + }, + "directories": {}, + "dist": { + "shasum": "f69b192d3f7d91e382e4b71bddb77878619ab0c6", + "tarball": "http://registry.npmjs.org/code-point-at/-/code-point-at-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "c2ffa4064718b37c84c73a633abeeed5b486a469", + "homepage": "https://github.com/sindresorhus/code-point-at", + "keywords": [ + "es2015", + "es6", + "ponyfill", + "polyfill", + "shim", + "string", + "str", + "code", + "point", + "at", + "codepoint", + "unicode" + ], + "license": "MIT", + "maintainers": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + } + ], + "name": "code-point-at", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/code-point-at.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/readme.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/readme.md new file mode 100644 index 00000000000000..71e7d0931b8b0c --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at/readme.md @@ -0,0 +1,34 @@ +# code-point-at [![Build Status](https://travis-ci.org/sindresorhus/code-point-at.svg?branch=master)](https://travis-ci.org/sindresorhus/code-point-at) + +> ES2015 [`String#codePointAt()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt) ponyfill + +> Ponyfill: A polyfill that doesn't overwrite the native method + + +## Install + +``` +$ npm install --save code-point-at +``` + + +## Usage + +```js +var codePointAt = require('code-point-at'); + +codePointAt('🐴'); +//=> 128052 + +codePointAt('abc', 2); +//=> 99 +``` + +## API + +### codePointAt(input, [position]) + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js new file mode 100644 index 00000000000000..a7d3e3855f1c24 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js @@ -0,0 +1,46 @@ +'use strict'; +var numberIsNan = require('number-is-nan'); + +module.exports = function (x) { + if (numberIsNan(x)) { + return false; + } + + // https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1369 + + // code points are derived from: + // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt + if (x >= 0x1100 && ( + x <= 0x115f || // Hangul Jamo + 0x2329 === x || // LEFT-POINTING ANGLE BRACKET + 0x232a === x || // RIGHT-POINTING ANGLE BRACKET + // CJK Radicals Supplement .. Enclosed CJK Letters and Months + (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) || + // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A + 0x3250 <= x && x <= 0x4dbf || + // CJK Unified Ideographs .. Yi Radicals + 0x4e00 <= x && x <= 0xa4c6 || + // Hangul Jamo Extended-A + 0xa960 <= x && x <= 0xa97c || + // Hangul Syllables + 0xac00 <= x && x <= 0xd7a3 || + // CJK Compatibility Ideographs + 0xf900 <= x && x <= 0xfaff || + // Vertical Forms + 0xfe10 <= x && x <= 0xfe19 || + // CJK Compatibility Forms .. Small Form Variants + 0xfe30 <= x && x <= 0xfe6b || + // Halfwidth and Fullwidth Forms + 0xff01 <= x && x <= 0xff60 || + 0xffe0 <= x && x <= 0xffe6 || + // Kana Supplement + 0x1b000 <= x && x <= 0x1b001 || + // Enclosed Ideographic Supplement + 0x1f200 <= x && x <= 0x1f251 || + // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane + 0x20000 <= x && x <= 0x3fffd)) { + return true; + } + + return false; +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/license b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/license new file mode 100644 index 00000000000000..654d0bfe943437 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/index.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/index.js new file mode 100644 index 00000000000000..79be4b9cb8c3bc --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = Number.isNaN || function (x) { + return x !== x; +}; diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/license b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/license new file mode 100644 index 00000000000000..654d0bfe943437 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/package.json new file mode 100644 index 00000000000000..287e697c31ad34 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + "number-is-nan@^1.0.0", + "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/code-point-at" + ], + [ + "number-is-nan@^1.0.0", + "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point" + ] + ], + "_from": "number-is-nan@^1.0.0", + "_id": "number-is-nan@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/npmlog/gauge/string-width/is-fullwidth-code-point/number-is-nan", + "_nodeVersion": "0.12.3", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.10.0", + "_phantomChildren": {}, + "_requested": { + "name": "number-is-nan", + "raw": "number-is-nan@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/npmlog/gauge/string-width/is-fullwidth-code-point" + ], + "_resolved": "http://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz", + "_shasum": "c020f529c5282adfdd233d91d4b181c3d686dc4b", + "_shrinkwrap": null, + "_spec": "number-is-nan@^1.0.0", + "_where": "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/number-is-nan/issues" + }, + "dependencies": {}, + "description": "ES6 Number.isNaN() ponyfill", + "devDependencies": { + "ava": "0.0.4" + }, + "directories": {}, + "dist": { + "shasum": "c020f529c5282adfdd233d91d4b181c3d686dc4b", + "tarball": "http://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "0f394b1bc33185c40304363b209e3f0588dbeeb3", + "homepage": "https://github.com/sindresorhus/number-is-nan#readme", + "keywords": [ + "es6", + "es2015", + "ecmascript", + "harmony", + "ponyfill", + "polyfill", + "shim", + "number", + "is", + "nan", + "not" + ], + "license": "MIT", + "maintainers": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + } + ], + "name": "number-is-nan", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/number-is-nan.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/readme.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/readme.md new file mode 100644 index 00000000000000..93d851a14f1ac5 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/readme.md @@ -0,0 +1,30 @@ +# number-is-nan [![Build Status](https://travis-ci.org/sindresorhus/number-is-nan.svg?branch=master)](https://travis-ci.org/sindresorhus/number-is-nan) + +> ES6 [`Number.isNaN()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) ponyfill + +> Ponyfill: A polyfill that doesn't overwrite the native method + + +## Install + +``` +$ npm install --save number-is-nan +``` + + +## Usage + +```js +var numberIsNan = require('number-is-nan'); + +numberIsNan(NaN); +//=> true + +numberIsNan('unicorn'); +//=> false +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/package.json new file mode 100644 index 00000000000000..25fb5000dca8c1 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + "is-fullwidth-code-point@^1.0.0", + "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge/node_modules/string-width" + ] + ], + "_from": "is-fullwidth-code-point@>=1.0.0 <2.0.0", + "_id": "is-fullwidth-code-point@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/npmlog/gauge/string-width/is-fullwidth-code-point", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.11.2", + "_phantomChildren": {}, + "_requested": { + "name": "is-fullwidth-code-point", + "raw": "is-fullwidth-code-point@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/npmlog/gauge/string-width" + ], + "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "_shasum": "ef9e31386f031a7f0d643af82fde50c457ef00cb", + "_shrinkwrap": null, + "_spec": "is-fullwidth-code-point@^1.0.0", + "_where": "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge/node_modules/string-width", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues" + }, + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "description": "Check if the character represented by a given Unicode code point is fullwidth", + "devDependencies": { + "ava": "0.0.4", + "code-point-at": "^1.0.0" + }, + "directories": {}, + "dist": { + "shasum": "ef9e31386f031a7f0d643af82fde50c457ef00cb", + "tarball": "http://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "f2152d357f41f82785436d428e4f8ede143b7548", + "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point", + "keywords": [ + "fullwidth", + "full-width", + "full", + "width", + "unicode", + "character", + "char", + "string", + "str", + "codepoint", + "code", + "point", + "is", + "detect", + "check" + ], + "license": "MIT", + "maintainers": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + } + ], + "name": "is-fullwidth-code-point", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md new file mode 100644 index 00000000000000..4936464b1b4155 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md @@ -0,0 +1,39 @@ +# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point) + +> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) + + +## Install + +``` +$ npm install --save is-fullwidth-code-point +``` + + +## Usage + +```js +var isFullwidthCodePoint = require('is-fullwidth-code-point'); + +isFullwidthCodePoint('谢'.codePointAt()); +//=> true + +isFullwidthCodePoint('a'.codePointAt()); +//=> false +``` + + +## API + +### isFullwidthCodePoint(input) + +#### input + +Type: `number` + +[Code point](https://en.wikipedia.org/wiki/Code_point) of a character. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/package.json new file mode 100644 index 00000000000000..662efc0b1e6e8b --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/package.json @@ -0,0 +1,111 @@ +{ + "_args": [ + [ + "string-width@^1.0.1", + "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge" + ] + ], + "_from": "string-width@>=1.0.1 <2.0.0", + "_id": "string-width@1.0.1", + "_inCache": true, + "_installable": true, + "_location": "/npmlog/gauge/string-width", + "_nodeVersion": "0.12.5", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.11.2", + "_phantomChildren": {}, + "_requested": { + "name": "string-width", + "raw": "string-width@^1.0.1", + "rawSpec": "^1.0.1", + "scope": null, + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/npmlog/gauge", + "/npmlog/gauge/wide-align" + ], + "_resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz", + "_shasum": "c92129b6f1d7f52acf9af424a26e3864a05ceb0a", + "_shrinkwrap": null, + "_spec": "string-width@^1.0.1", + "_where": "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/string-width/issues" + }, + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "description": "Get the visual width of a string - the number of columns required to display it", + "devDependencies": { + "ava": "0.0.4" + }, + "directories": {}, + "dist": { + "shasum": "c92129b6f1d7f52acf9af424a26e3864a05ceb0a", + "tarball": "http://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "f279cfd14835f0a3c8df69ba18e9a3960156e135", + "homepage": "https://github.com/sindresorhus/string-width", + "keywords": [ + "string", + "str", + "character", + "char", + "unicode", + "width", + "visual", + "column", + "columns", + "fullwidth", + "full-width", + "full", + "ansi", + "escape", + "codes", + "cli", + "command-line", + "terminal", + "console", + "cjk", + "chinese", + "japanese", + "korean", + "fixed-width" + ], + "license": "MIT", + "maintainers": [ + { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + } + ], + "name": "string-width", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/string-width.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.1" +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/readme.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/readme.md new file mode 100644 index 00000000000000..a7737a986c5736 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/string-width/readme.md @@ -0,0 +1,41 @@ +# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/string-width) + +> Get the visual width of a string - the number of columns required to display it + +Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. + +Useful to be able to measure the actual width of command-line output. + + +## Install + +``` +$ npm install --save string-width +``` + + +## Usage + +```js +var stringWidth = require('string-width'); + +stringWidth('古'); +//=> 2 + +stringWidth('\u001b[1m古\u001b[22m'); +//=> 2 + +stringWidth('a'); +//=> 1 +``` + + +## Related + +- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module +- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/.npmignore b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/.npmignore new file mode 100644 index 00000000000000..d1a6b0054bc8f3 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/.npmignore @@ -0,0 +1,5 @@ +*~ +/node_modules +.#* +/.nyc_output +/coverage diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/LICENSE b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/LICENSE new file mode 100644 index 00000000000000..2a4982dc40cb69 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2015, Rebecca Turner + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/README.md b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/README.md new file mode 100644 index 00000000000000..4cbb017556118d --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/README.md @@ -0,0 +1,47 @@ +wide-align +---------- + +A wide-character aware text alignment function for use in terminals / on the +console. + +### Usage + +``` +var align = require('wide-align') + +// Note that if you view this on a unicode console, all of the slashes are +// aligned. This is because on a console, all narrow characters are +// an en wide and all wide characters are an em. In browsers, this isn't +// held to and wide characters like "古" can be less than two narrow +// characters even with a fixed width font. + +console.log(align.center('abc', 10)) // ' abc ' +console.log(align.center('古古古', 10)) // ' 古古古 ' +console.log(align.left('abc', 10)) // 'abc ' +console.log(align.left('古古古', 10)) // '古古古 ' +console.log(align.right('abc', 10)) // ' abc' +console.log(align.right('古古古', 10)) // ' 古古古' +``` + +### Functions + +#### `align.center(str, length)` → `str` + +Returns *str* with spaces added to both sides such that that it is *length* +chars long and centered in the spaces. + +#### `align.left(str, length)` → `str` + +Returns *str* with spaces to the right such that it is *length* chars long. + +### `align.right(str, length)` → `str` + +Returns *str* with spaces to the left such that it is *length* chars long. + +### Origins + +These functions were originally taken from +[cliui](https://npmjs.com/package/cliui). Changes include switching to the +MUCH faster pad generation function from +[lodash](https://npmjs.com/package/lodash), making center alignment pad +both sides and adding left alignment. diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/align.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/align.js new file mode 100644 index 00000000000000..9e8359c6c718e3 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/align.js @@ -0,0 +1,65 @@ +'use strict' +var stringWidth = require('string-width') + +exports.center = alignCenter +exports.left = alignLeft +exports.right = alignRight + +// lodash's way of generating pad characters. + +function createPadding (width) { + var result = '' + var string = ' ' + var n = width + do { + if (n % 2) { + result += string; + } + n = Math.floor(n / 2); + string += string; + } while (n); + + return result; +} + +function alignLeft (str, width) { + var trimmed = str.trimRight() + if (trimmed.length === 0 && str.length >= width) return str + var padding = '' + var strWidth = stringWidth(trimmed) + + if (strWidth < width) { + padding = createPadding(width - strWidth) + } + + return trimmed + padding +} + +function alignRight (str, width) { + var trimmed = str.trimLeft() + if (trimmed.length === 0 && str.length >= width) return str + var padding = '' + var strWidth = stringWidth(trimmed) + + if (strWidth < width) { + padding = createPadding(width - strWidth) + } + + return padding + trimmed +} + +function alignCenter (str, width) { + var trimmed = str.trim() + if (trimmed.length === 0 && str.length >= width) return str + var padLeft = '' + var padRight = '' + var strWidth = stringWidth(trimmed) + + if (strWidth < width) { + var padLeftBy = parseInt((width - strWidth) / 2, 10) + padLeft = createPadding(padLeftBy) + padRight = createPadding(width - (strWidth + padLeftBy)) + } + + return padLeft + trimmed + padRight +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/package.json new file mode 100644 index 00000000000000..8d3c8cf0c2ff5e --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/package.json @@ -0,0 +1,85 @@ +{ + "_args": [ + [ + "wide-align@^1.1.0", + "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge" + ] + ], + "_from": "wide-align@>=1.1.0 <2.0.0", + "_id": "wide-align@1.1.0", + "_inCache": true, + "_installable": true, + "_location": "/npmlog/gauge/wide-align", + "_nodeVersion": "4.2.2", + "_npmUser": { + "email": "me@re-becca.org", + "name": "iarna" + }, + "_npmVersion": "3.5.3", + "_phantomChildren": {}, + "_requested": { + "name": "wide-align", + "raw": "wide-align@^1.1.0", + "rawSpec": "^1.1.0", + "scope": null, + "spec": ">=1.1.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/npmlog/gauge" + ], + "_resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.0.tgz", + "_shasum": "40edde802a71fea1f070da3e62dcda2e7add96ad", + "_shrinkwrap": null, + "_spec": "wide-align@^1.1.0", + "_where": "/Users/rebecca/code/npm-with-new-gauge/node_modules/npmlog/node_modules/gauge", + "author": { + "email": "me@re-becca.org", + "name": "Rebecca Turner", + "url": "http://re-becca.org/" + }, + "bugs": { + "url": "https://github.com/iarna/wide-align/issues" + }, + "dependencies": { + "string-width": "^1.0.1" + }, + "description": "A wide-character aware text alignment function for use on the console or with fixed width fonts.", + "devDependencies": { + "tap": "^2.3.2" + }, + "directories": {}, + "dist": { + "shasum": "40edde802a71fea1f070da3e62dcda2e7add96ad", + "tarball": "http://registry.npmjs.org/wide-align/-/wide-align-1.1.0.tgz" + }, + "gitHead": "fe3f7f210650913d5bee702d7e19938f6977bc8a", + "homepage": "https://github.com/iarna/wide-align#readme", + "keywords": [ + "wide", + "double", + "unicode", + "cjkv", + "pad", + "align" + ], + "license": "ISC", + "main": "align.js", + "maintainers": [ + { + "email": "me@re-becca.org", + "name": "iarna" + } + ], + "name": "wide-align", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/iarna/wide-align.git" + }, + "scripts": { + "test": "tap --coverage test/*.js" + }, + "version": "1.1.0" +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/test/align.js b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/test/align.js new file mode 100644 index 00000000000000..64e9f9dbda4697 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/wide-align/test/align.js @@ -0,0 +1,37 @@ +'use strict' +var test = require('tap').test +var align = require('..') + +test('align', function (t) { + t.is(align.center('abc', 10), ' abc ', 'center narrow') + t.is(align.center('古古古', 10), ' 古古古 ', 'center wide') + t.is(align.left('abc', 10), 'abc ', 'left narrow') + t.is(align.left('古古古', 10), '古古古 ', 'left wide') + t.is(align.right('abc', 10), ' abc', 'right narrow') + t.is(align.right('古古古', 10), ' 古古古', 'right wide') + + t.is(align.center('abc', 2), 'abc', 'center narrow overflow') + t.is(align.center('古古古', 4), '古古古', 'center wide overflow') + t.is(align.left('abc', 2), 'abc', 'left narrow overflow') + t.is(align.left('古古古', 4), '古古古', 'left wide overflow') + t.is(align.right('abc', 2), 'abc', 'right narrow overflow') + t.is(align.right('古古古', 4), '古古古', 'right wide overflow') + + t.is(align.left('', 5), ' ', 'left align nothing') + t.is(align.center('', 5), ' ', 'center align nothing') + t.is(align.right('', 5), ' ', 'right align nothing') + + t.is(align.left(' ', 5), ' ', 'left align whitespace') + t.is(align.center(' ', 5), ' ', 'center align whitespace') + t.is(align.right(' ', 5), ' ', 'right align whitespace') + + t.is(align.left(' ', 2), ' ', 'left align whitespace overflow') + t.is(align.center(' ', 2), ' ', 'center align whitespace overflow') + t.is(align.right(' ', 2), ' ', 'right align whitespace overflow') + + t.is(align.left('x ', 10), 'x ', 'left align whitespace mix') + t.is(align.center('x ', 10), ' x ', 'center align whitespace mix') + t.is(align.right('x ', 10), ' x', 'right align whitespace mix') + + t.end() +}) diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/package.json b/deps/npm/node_modules/npmlog/node_modules/gauge/package.json index efbb346bb4f587..846a27e8a44d85 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/package.json +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/package.json @@ -1,40 +1,50 @@ { "_args": [ [ - "gauge@~1.2.5", + { + "name": "gauge", + "raw": "gauge@~2.6.0", + "rawSpec": "~2.6.0", + "scope": null, + "spec": ">=2.6.0 <2.7.0", + "type": "range" + }, "/Users/rebecca/code/npm/node_modules/npmlog" ] ], - "_from": "gauge@>=1.2.5 <1.3.0", - "_id": "gauge@1.2.7", + "_from": "gauge@>=2.6.0 <2.7.0", + "_id": "gauge@2.6.0", "_inCache": true, "_installable": true, "_location": "/npmlog/gauge", - "_nodeVersion": "4.2.2", + "_nodeVersion": "4.4.0", "_npmOperationalInternal": { - "host": "packages-9-west.internal.npmjs.com", - "tmp": "tmp/gauge-1.2.7.tgz_1455835409513_0.6293477965518832" + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/gauge-2.6.0.tgz_1466067371972_0.20705468393862247" }, "_npmUser": { "email": "me@re-becca.org", "name": "iarna" }, - "_npmVersion": "3.7.2", - "_phantomChildren": {}, + "_npmVersion": "3.9.2", + "_phantomChildren": { + "strip-ansi": "3.0.1" + }, "_requested": { "name": "gauge", - "raw": "gauge@~1.2.5", - "rawSpec": "~1.2.5", + "raw": "gauge@~2.6.0", + "rawSpec": "~2.6.0", "scope": null, - "spec": ">=1.2.5 <1.3.0", + "spec": ">=2.6.0 <2.7.0", "type": "range" }, "_requiredBy": [ "/npmlog" ], - "_shasum": "e9cec5483d3d4ee0ef44b60a7d99e4935e136d93", + "_resolved": "https://registry.npmjs.org/gauge/-/gauge-2.6.0.tgz", + "_shasum": "d35301ad18e96902b4751dcbbe40f4218b942a46", "_shrinkwrap": null, - "_spec": "gauge@~1.2.5", + "_spec": "gauge@~2.6.0", "_where": "/Users/rebecca/code/npm/node_modules/npmlog", "author": { "email": "me@re-becca.org", @@ -44,22 +54,51 @@ "url": "https://github.com/iarna/gauge/issues" }, "dependencies": { - "ansi": "^0.3.0", + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-color": "^0.1.7", "has-unicode": "^2.0.0", - "lodash.pad": "^4.1.0", - "lodash.padend": "^4.1.0", - "lodash.padstart": "^4.1.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" }, "description": "A terminal based horizontal guage", "devDependencies": { - "tap": "^5.6.0" + "readable-stream": "^2.0.6", + "require-inject": "^1.4.0", + "standard": "^7.1.2", + "tap": "^5.7.2", + "through2": "^2.0.0" }, "directories": {}, "dist": { - "shasum": "e9cec5483d3d4ee0ef44b60a7d99e4935e136d93", - "tarball": "http://registry.npmjs.org/gauge/-/gauge-1.2.7.tgz" + "shasum": "d35301ad18e96902b4751dcbbe40f4218b942a46", + "tarball": "https://registry.npmjs.org/gauge/-/gauge-2.6.0.tgz" }, - "gitHead": "75a7d0a4ed67489ac992ed3d211bed60376ca7c1", + "files": [ + "base-theme.js", + "CHANGELOG.md", + "error.js", + "has-color.js", + "index.js", + "LICENSE", + "package.json", + "plumbing.js", + "process.js", + "progress-bar.js", + "README.md", + "render-template.js", + "set-immediate.js", + "set-interval.js", + "spin.js", + "template-item.js", + "theme-set.js", + "themes.js", + "wide-truncate.js" + ], + "gitHead": "d51040a71c269432c16cc542143f403a831630e6", "homepage": "https://github.com/iarna/gauge", "keywords": [ "progressbar", @@ -67,7 +106,7 @@ "gauge" ], "license": "ISC", - "main": "progress-bar.js", + "main": "index.js", "maintainers": [ { "email": "me@re-becca.org", @@ -82,7 +121,7 @@ "url": "git+https://github.com/iarna/gauge.git" }, "scripts": { - "test": "tap test/*.js" + "test": "standard && tap test/*.js --coverage" }, - "version": "1.2.7" + "version": "2.6.0" } diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/plumbing.js b/deps/npm/node_modules/npmlog/node_modules/gauge/plumbing.js new file mode 100644 index 00000000000000..589a9c92878ebf --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/plumbing.js @@ -0,0 +1,47 @@ +'use strict' +var consoleControl = require('console-control-strings') +var renderTemplate = require('./render-template.js') +var validate = require('aproba') + +var Plumbing = module.exports = function (theme, template, width) { + if (!width) width = 80 + validate('OAN', [theme, template, width]) + this.showing = false + this.theme = theme + this.width = width + this.template = template +} +Plumbing.prototype = {} + +Plumbing.prototype.setTheme = function (theme) { + validate('O', [theme]) + this.theme = theme +} + +Plumbing.prototype.setTemplate = function (template) { + validate('A', [template]) + this.template = template +} + +Plumbing.prototype.setWidth = function (width) { + validate('N', [width]) + this.width = width +} + +Plumbing.prototype.hide = function () { + return consoleControl.gotoSOL() + consoleControl.eraseLine() +} + +Plumbing.prototype.hideCursor = consoleControl.hideCursor + +Plumbing.prototype.showCursor = consoleControl.showCursor + +Plumbing.prototype.show = function (status) { + var values = Object.create(this.theme) + for (var key in status) { + values[key] = status[key] + } + + return renderTemplate(this.width, this.template, values).trim() + + consoleControl.eraseLine() + consoleControl.gotoSOL() +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/process.js b/deps/npm/node_modules/npmlog/node_modules/gauge/process.js new file mode 100644 index 00000000000000..05e85694d755b6 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/process.js @@ -0,0 +1,3 @@ +'use strict' +// this exists so we can replace it during testing +module.exports = process diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/progress-bar.js b/deps/npm/node_modules/npmlog/node_modules/gauge/progress-bar.js index ddfc4a44be4ded..7f8dd68be24cf0 100644 --- a/deps/npm/node_modules/npmlog/node_modules/gauge/progress-bar.js +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/progress-bar.js @@ -1,225 +1,35 @@ -"use strict" -var hasUnicode = require("has-unicode") -var ansi = require("ansi") -var align = { - center: require("lodash.pad"), - left: require("lodash.padend"), - right: require("lodash.padstart") -} -var defaultStream = process.stderr -function isTTY() { - return process.stderr.isTTY -} -function getWritableTTYColumns() { - // Writing to the final column wraps the line - // We have to use stdout here, because Node's magic SIGWINCH handler only - // updates process.stdout, not process.stderr - return process.stdout.columns - 1 -} - -var ProgressBar = module.exports = function (options, cursor) { - if (! options) options = {} - if (! cursor && options.write) { - cursor = options - options = {} - } - if (! cursor) { - cursor = ansi(defaultStream) - } - this.cursor = cursor - this.showing = false - this.theme = options.theme || (hasUnicode() ? ProgressBar.unicode : ProgressBar.ascii) - this.template = options.template || [ - {type: "name", separated: true, length: 25}, - {type: "spinner", separated: true}, - {type: "startgroup"}, - {type: "completionbar"}, - {type: "endgroup"} +'use strict' +var validate = require('aproba') +var renderTemplate = require('./render-template.js') +var wideTruncate = require('./wide-truncate') +var stringWidth = require('string-width') + +module.exports = function (theme, width, completed) { + validate('ONN', [theme, width, completed]) + if (completed < 0) completed = 0 + if (completed > 1) completed = 1 + if (width <= 0) return '' + var sofar = Math.round(width * completed) + var rest = width - sofar + var template = [ + {type: 'complete', value: repeat(theme.complete, sofar), length: sofar}, + {type: 'remaining', value: repeat(theme.remaining, rest), length: rest} ] - this.updatefreq = options.maxUpdateFrequency == null ? 50 : options.maxUpdateFrequency - this.lastName = "" - this.lastCompleted = 0 - this.spun = 0 - this.last = new Date(0) - - var self = this - this._handleSizeChange = function () { - if (!self.showing) return - self.hide() - self.show() - } -} -ProgressBar.prototype = {} - -ProgressBar.unicode = { - startgroup: "╢", - endgroup: "╟", - complete: "█", - incomplete: "░", - spinner: "▀▐▄▌", - subsection: "→" -} - -ProgressBar.ascii = { - startgroup: "|", - endgroup: "|", - complete: "#", - incomplete: "-", - spinner: "-\\|/", - subsection: "->" -} - -ProgressBar.prototype.setTheme = function(theme) { - this.theme = theme -} - -ProgressBar.prototype.setTemplate = function(template) { - this.template = template -} - -ProgressBar.prototype._enableResizeEvents = function() { - process.stdout.on('resize', this._handleSizeChange) -} - -ProgressBar.prototype._disableResizeEvents = function() { - process.stdout.removeListener('resize', this._handleSizeChange) -} - -ProgressBar.prototype.disable = function() { - this.hide() - this.disabled = true -} - -ProgressBar.prototype.enable = function() { - this.disabled = false - this.show() -} - -ProgressBar.prototype.hide = function() { - if (!isTTY()) return - if (this.disabled) return - this.cursor.show() - if (this.showing) this.cursor.up(1) - this.cursor.horizontalAbsolute(0).eraseLine() - this.showing = false + return renderTemplate(width, template, theme) } -var repeat = function (str, count) { - var out = "" - for (var ii=0; ii remainingSpace) length = remainingSpace + outputLength += length + remainingSpace -= length + } + + function finishSizing (item, length) { + if (item.finished) throw new error.Internal('Tried to finish template item that was already finished') + if (length === Infinity) throw new error.Internal('Length of template item cannot be infinity') + if (length != null) item.length = length + item.minLength = null + item.maxLength = null + --variableCount + item.finished = true + if (item.length == null) item.length = item.getBaseLength() + if (item.length == null) throw new error.Internal('Finished template items must have a length') + consumeSpace(item.getLength()) + } + + output.forEach(function (item) { + if (!item.kerning) return + var prevPadRight = item.first ? 0 : output[item.index - 1].padRight + if (!item.first && prevPadRight < item.kerning) item.padLeft = item.kerning - prevPadRight + if (!item.last) item.padRight = item.kerning + }) + + // Finish any that have a fixed (literal or intuited) length + output.forEach(function (item) { + if (item.getBaseLength() == null) return + finishSizing(item) + }) + + var resized = 0 + var resizing + var hunkSize + do { + resizing = false + hunkSize = Math.round(remainingSpace / variableCount) + output.forEach(function (item) { + if (item.finished) return + if (!item.maxLength) return + if (item.getMaxLength() < hunkSize) { + finishSizing(item, item.maxLength) + resizing = true + } + }) + } while (resizing && resized++ < output.length) + if (resizing) throw new error.Internal('Resize loop iterated too many times while determining maxLength') + + resized = 0 + do { + resizing = false + hunkSize = Math.round(remainingSpace / variableCount) + output.forEach(function (item) { + if (item.finished) return + if (!item.minLength) return + if (item.getMinLength() >= hunkSize) { + finishSizing(item, item.minLength) + resizing = true + } + }) + } while (resizing && resized++ < output.length) + if (resizing) throw new error.Internal('Resize loop iterated too many times while determining minLength') + + hunkSize = Math.round(remainingSpace / variableCount) + output.forEach(function (item) { + if (item.finished) return + finishSizing(item, hunkSize) + }) + + return output +} + +function renderFunction (item, values, length) { + validate('OON', arguments) + if (item.type) { + return item.value(values, values[item.type + 'Theme'] || {}, length) + } else { + return item.value(values, {}, length) + } +} + +function renderValue (item, values) { + var length = item.getBaseLength() + var value = typeof item.value === 'function' ? renderFunction(item, values, length) : item.value + if (value == null || value === '') return '' + var alignWith = align[item.align] || align.left + var leftPadding = item.padLeft ? align.left('', item.padLeft) : '' + var rightPadding = item.padRight ? align.right('', item.padRight) : '' + var truncated = wideTruncate(String(value), length) + var aligned = alignWith(truncated, length) + return leftPadding + aligned + rightPadding +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/set-immediate.js b/deps/npm/node_modules/npmlog/node_modules/gauge/set-immediate.js new file mode 100644 index 00000000000000..6650a485c49933 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/set-immediate.js @@ -0,0 +1,7 @@ +'use strict' +var process = require('./process') +try { + module.exports = setImmediate +} catch (ex) { + module.exports = process.nextTick +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/set-interval.js b/deps/npm/node_modules/npmlog/node_modules/gauge/set-interval.js new file mode 100644 index 00000000000000..576198793c5504 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/set-interval.js @@ -0,0 +1,3 @@ +'use strict' +// this exists so we can replace it during testing +module.exports = setInterval diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/spin.js b/deps/npm/node_modules/npmlog/node_modules/gauge/spin.js new file mode 100644 index 00000000000000..34142ee31acc7c --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/spin.js @@ -0,0 +1,5 @@ +'use strict' + +module.exports = function spin (spinstr, spun) { + return spinstr[spun % spinstr.length] +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/template-item.js b/deps/npm/node_modules/npmlog/node_modules/gauge/template-item.js new file mode 100644 index 00000000000000..4f02fefaa23eca --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/template-item.js @@ -0,0 +1,72 @@ +'use strict' +var stringWidth = require('string-width') + +module.exports = TemplateItem + +function isPercent (num) { + if (typeof num !== 'string') return false + return num.slice(-1) === '%' +} + +function percent (num) { + return Number(num.slice(0, -1)) / 100 +} + +function TemplateItem (values, outputLength) { + this.overallOutputLength = outputLength + this.finished = false + this.type = null + this.value = null + this.length = null + this.maxLength = null + this.minLength = null + this.kerning = null + this.align = 'left' + this.padLeft = 0 + this.padRight = 0 + this.index = null + this.first = null + this.last = null + if (typeof values === 'string') { + this.value = values + } else { + for (var prop in values) this[prop] = values[prop] + } + // Realize percents + if (isPercent(this.length)) { + this.length = Math.round(this.overallOutputLength * percent(this.length)) + } + if (isPercent(this.minLength)) { + this.minLength = Math.round(this.overallOutputLength * percent(this.minLength)) + } + if (isPercent(this.maxLength)) { + this.maxLength = Math.round(this.overallOutputLength * percent(this.maxLength)) + } + return this +} + +TemplateItem.prototype = {} + +TemplateItem.prototype.getBaseLength = function () { + var length = this.length + if (length == null && typeof this.value === 'string' && this.maxLength == null && this.minLength == null) { + length = stringWidth(this.value) + } + return length +} + +TemplateItem.prototype.getLength = function () { + var length = this.getBaseLength() + if (length == null) return null + return length + this.padLeft + this.padRight +} + +TemplateItem.prototype.getMaxLength = function () { + if (this.maxLength == null) return null + return this.maxLength + this.padLeft + this.padRight +} + +TemplateItem.prototype.getMinLength = function () { + if (this.minLength == null) return null + return this.minLength + this.padLeft + this.padRight +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/theme-set.js b/deps/npm/node_modules/npmlog/node_modules/gauge/theme-set.js new file mode 100644 index 00000000000000..c022d61cf13cb0 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/theme-set.js @@ -0,0 +1,114 @@ +'use strict' +var objectAssign = require('object-assign') + +module.exports = function () { + return ThemeSetProto.newThemeSet() +} + +var ThemeSetProto = {} + +ThemeSetProto.baseTheme = require('./base-theme.js') + +ThemeSetProto.newTheme = function (parent, theme) { + if (!theme) { + theme = parent + parent = this.baseTheme + } + return objectAssign({}, parent, theme) +} + +ThemeSetProto.getThemeNames = function () { + return Object.keys(this.themes) +} + +ThemeSetProto.addTheme = function (name, parent, theme) { + this.themes[name] = this.newTheme(parent, theme) +} + +ThemeSetProto.addToAllThemes = function (theme) { + var themes = this.themes + Object.keys(themes).forEach(function (name) { + objectAssign(themes[name], theme) + }) + objectAssign(this.baseTheme, theme) +} + +ThemeSetProto.getTheme = function (name) { + if (!this.themes[name]) throw this.newMissingThemeError(name) + return this.themes[name] +} + +ThemeSetProto.setDefault = function (opts, name) { + if (name == null) { + name = opts + opts = {} + } + var platform = opts.platform == null ? 'fallback' : opts.platform + var hasUnicode = !!opts.hasUnicode + var hasColor = !!opts.hasColor + if (!this.defaults[platform]) this.defaults[platform] = {true: {}, false: {}} + this.defaults[platform][hasUnicode][hasColor] = name +} + +ThemeSetProto.getDefault = function (opts) { + if (!opts) opts = {} + var platformName = opts.platform || process.platform + var platform = this.defaults[platformName] || this.defaults.fallback + var hasUnicode = !!opts.hasUnicode + var hasColor = !!opts.hasColor + if (!platform) throw this.newMissingDefaultThemeError(platformName, hasUnicode, hasColor) + if (!platform[hasUnicode][hasColor]) { + if (hasUnicode && hasColor && platform[!hasUnicode][hasColor]) { + hasUnicode = false + } else if (hasUnicode && hasColor && platform[hasUnicode][!hasColor]) { + hasColor = false + } else if (hasUnicode && hasColor && platform[!hasUnicode][!hasColor]) { + hasUnicode = false + hasColor = false + } else if (hasUnicode && !hasColor && platform[!hasUnicode][hasColor]) { + hasUnicode = false + } else if (!hasUnicode && hasColor && platform[hasUnicode][!hasColor]) { + hasColor = false + } else if (platform === this.defaults.fallback) { + throw this.newMissingDefaultThemeError(platformName, hasUnicode, hasColor) + } + } + if (platform[hasUnicode][hasColor]) { + return this.getTheme(platform[hasUnicode][hasColor]) + } else { + return this.getDefault(objectAssign({}, opts, {platform: 'fallback'})) + } +} + +ThemeSetProto.newMissingThemeError = function newMissingThemeError (name) { + var err = new Error('Could not find a gauge theme named "' + name + '"') + Error.captureStackTrace.call(err, newMissingThemeError) + err.theme = name + err.code = 'EMISSINGTHEME' + return err +} + +ThemeSetProto.newMissingDefaultThemeError = function newMissingDefaultThemeError (platformName, hasUnicode, hasColor) { + var err = new Error( + 'Could not find a gauge theme for your platform/unicode/color use combo:\n' + + ' platform = ' + platformName + '\n' + + ' hasUnicode = ' + hasUnicode + '\n' + + ' hasColor = ' + hasColor) + Error.captureStackTrace.call(err, newMissingDefaultThemeError) + err.platform = platformName + err.hasUnicode = hasUnicode + err.hasColor = hasColor + err.code = 'EMISSINGTHEME' + return err +} + +ThemeSetProto.newThemeSet = function () { + var themeset = function (opts) { + return themeset.getDefault(opts) + } + return objectAssign(themeset, ThemeSetProto, { + themes: objectAssign({}, this.themes), + baseTheme: objectAssign({}, this.baseTheme), + defaults: JSON.parse(JSON.stringify(this.defaults || {})) + }) +} diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/themes.js b/deps/npm/node_modules/npmlog/node_modules/gauge/themes.js new file mode 100644 index 00000000000000..eb5a4f5b5e1034 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/themes.js @@ -0,0 +1,54 @@ +'use strict' +var consoleControl = require('console-control-strings') +var ThemeSet = require('./theme-set.js') + +var themes = module.exports = new ThemeSet() + +themes.addTheme('ASCII', { + preProgressbar: '[', + postProgressbar: ']', + progressbarTheme: { + complete: '#', + remaining: '.' + }, + activityIndicatorTheme: '-\\|/', + preSubsection: '>' +}) + +themes.addTheme('colorASCII', themes.getTheme('ASCII'), { + progressbarTheme: { + preComplete: consoleControl.color('inverse'), + complete: ' ', + postComplete: consoleControl.color('stopInverse'), + preRemaining: consoleControl.color('brightBlack'), + remaining: '.', + postRemaining: consoleControl.color('reset') + } +}) + +themes.addTheme('brailleSpinner', { + preProgressbar: '⸨', + postProgressbar: '⸩', + progressbarTheme: { + complete: '░', + remaining: '⠂' + }, + activityIndicatorTheme: '⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏', + preSubsection: '>' +}) + +themes.addTheme('colorBrailleSpinner', themes.getTheme('brailleSpinner'), { + progressbarTheme: { + preComplete: consoleControl.color('inverse'), + complete: ' ', + postComplete: consoleControl.color('stopInverse'), + preRemaining: consoleControl.color('brightBlack'), + remaining: '░', + postRemaining: consoleControl.color('reset') + } +}) + +themes.setDefault({}, 'ASCII') +themes.setDefault({hasColor: true}, 'colorASCII') +themes.setDefault({platform: 'darwin', hasUnicode: true}, 'brailleSpinner') +themes.setDefault({platform: 'darwin', hasUnicode: true, hasColor: true}, 'colorBrailleSpinner') diff --git a/deps/npm/node_modules/npmlog/node_modules/gauge/wide-truncate.js b/deps/npm/node_modules/npmlog/node_modules/gauge/wide-truncate.js new file mode 100644 index 00000000000000..c531bc491fbb58 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/gauge/wide-truncate.js @@ -0,0 +1,25 @@ +'use strict' +var stringWidth = require('string-width') +var stripAnsi = require('strip-ansi') + +module.exports = wideTruncate + +function wideTruncate (str, target) { + if (stringWidth(str) === 0) return str + if (target <= 0) return '' + if (stringWidth(str) <= target) return str + + // We compute the number of bytes of ansi sequences here and add + // that to our initial truncation to ensure that we don't slice one + // that we want to keep in half. + var noAnsi = stripAnsi(str) + var ansiSize = str.length + noAnsi.length + var truncated = str.slice(0, target + ansiSize) + + // we have to shrink the result to account for our ansi sequence buffer + // (if an ansi sequence was truncated) and double width characters. + while (stringWidth(truncated) > target) { + truncated = truncated.slice(0, -1) + } + return truncated +} diff --git a/deps/npm/node_modules/npmlog/node_modules/set-blocking/CHANGELOG.md b/deps/npm/node_modules/npmlog/node_modules/set-blocking/CHANGELOG.md new file mode 100644 index 00000000000000..03bf591923d782 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/set-blocking/CHANGELOG.md @@ -0,0 +1,26 @@ +# Change Log + +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. + + +# [2.0.0](https://github.com/yargs/set-blocking/compare/v1.0.0...v2.0.0) (2016-05-17) + + +### Features + +* add an isTTY check ([#3](https://github.com/yargs/set-blocking/issues/3)) ([66ce277](https://github.com/yargs/set-blocking/commit/66ce277)) + + +### BREAKING CHANGES + +* stdio/stderr will not be set to blocking if isTTY === false + + + + +# 1.0.0 (2016-05-14) + + +### Features + +* implemented shim for stream._handle.setBlocking ([6bde0c0](https://github.com/yargs/set-blocking/commit/6bde0c0)) diff --git a/deps/npm/node_modules/npmlog/node_modules/set-blocking/LICENSE.txt b/deps/npm/node_modules/npmlog/node_modules/set-blocking/LICENSE.txt new file mode 100644 index 00000000000000..836440bef7cf14 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/set-blocking/LICENSE.txt @@ -0,0 +1,14 @@ +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/npmlog/node_modules/set-blocking/README.md b/deps/npm/node_modules/npmlog/node_modules/set-blocking/README.md new file mode 100644 index 00000000000000..e93b4202b59d65 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/set-blocking/README.md @@ -0,0 +1,31 @@ +# set-blocking + +[![Build Status](https://travis-ci.org/yargs/set-blocking.svg)](https://travis-ci.org/yargs/set-blocking) +[![NPM version](https://img.shields.io/npm/v/set-blocking.svg)](https://www.npmjs.com/package/set-blocking) +[![Coverage Status](https://coveralls.io/repos/yargs/set-blocking/badge.svg?branch=)](https://coveralls.io/r/yargs/set-blocking?branch=master) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) + +set blocking `stdio` and `stderr` ensuring that terminal output does not truncate. + +```js +const setBlocking = require('set-blocking') +setBlocking(true) +console.log(someLargeStringToOutput) +``` + +## Historical Context/Word of Warning + +This was created as a shim to address the bug discussed in [node #6456](https://github.com/nodejs/node/issues/6456). This bug crops up on +newer versions of Node.js (`0.12+`), truncating terminal output. + +You should be mindful of the side-effects caused by using `set-blocking`: + +* if your module sets blocking to `true`, it will effect other modules + consuming your library. In [yargs](https://github.com/yargs/yargs/blob/master/yargs.js#L653) we only call + `setBlocking(true)` once we already know we are about to call `process.exit(code)`. +* this patch will not apply to subprocesses spawned with `isTTY = true`, this is + the [default `spawn()` behavior](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options). + +## License + +ISC diff --git a/deps/npm/node_modules/npmlog/node_modules/set-blocking/index.js b/deps/npm/node_modules/npmlog/node_modules/set-blocking/index.js new file mode 100644 index 00000000000000..6f78774bb63ee6 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/set-blocking/index.js @@ -0,0 +1,7 @@ +module.exports = function (blocking) { + [process.stdout, process.stderr].forEach(function (stream) { + if (stream._handle && stream.isTTY && typeof stream._handle.setBlocking === 'function') { + stream._handle.setBlocking(blocking) + } + }) +} diff --git a/deps/npm/node_modules/npmlog/node_modules/set-blocking/package.json b/deps/npm/node_modules/npmlog/node_modules/set-blocking/package.json new file mode 100644 index 00000000000000..86292b90f5ef79 --- /dev/null +++ b/deps/npm/node_modules/npmlog/node_modules/set-blocking/package.json @@ -0,0 +1,105 @@ +{ + "_args": [ + [ + { + "name": "set-blocking", + "raw": "set-blocking@~2.0.0", + "rawSpec": "~2.0.0", + "scope": null, + "spec": ">=2.0.0 <2.1.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/npmlog" + ] + ], + "_from": "set-blocking@>=2.0.0 <2.1.0", + "_id": "set-blocking@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/npmlog/set-blocking", + "_nodeVersion": "0.12.7", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/set-blocking-2.0.0.tgz_1463525966987_0.5456729622092098" + }, + "_npmUser": { + "email": "ben@npmjs.com", + "name": "bcoe" + }, + "_npmVersion": "2.11.3", + "_phantomChildren": {}, + "_requested": { + "name": "set-blocking", + "raw": "set-blocking@~2.0.0", + "rawSpec": "~2.0.0", + "scope": null, + "spec": ">=2.0.0 <2.1.0", + "type": "range" + }, + "_requiredBy": [ + "/npmlog" + ], + "_resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "_shasum": "045f9782d011ae9a6803ddd382b24392b3d890f7", + "_shrinkwrap": null, + "_spec": "set-blocking@~2.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/npmlog", + "author": { + "email": "ben@npmjs.com", + "name": "Ben Coe" + }, + "bugs": { + "url": "https://github.com/yargs/set-blocking/issues" + }, + "dependencies": {}, + "description": "set blocking stdio and stderr ensuring that terminal output does not truncate", + "devDependencies": { + "chai": "^3.5.0", + "coveralls": "^2.11.9", + "mocha": "^2.4.5", + "nyc": "^6.4.4", + "standard": "^7.0.1", + "standard-version": "^2.2.1" + }, + "directories": {}, + "dist": { + "shasum": "045f9782d011ae9a6803ddd382b24392b3d890f7", + "tarball": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" + }, + "files": [ + "index.js", + "LICENSE.txt" + ], + "gitHead": "7eec10577b5fff264de477ba3b9d07f404946eff", + "homepage": "https://github.com/yargs/set-blocking#readme", + "keywords": [ + "flush", + "terminal", + "blocking", + "shim", + "stdio", + "stderr" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "email": "ben@npmjs.com", + "name": "bcoe" + } + ], + "name": "set-blocking", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/yargs/set-blocking.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "pretest": "standard", + "test": "nyc mocha ./test/*.js", + "version": "standard-version" + }, + "version": "2.0.0" +} diff --git a/deps/npm/node_modules/npmlog/package.json b/deps/npm/node_modules/npmlog/package.json index 153145ab056059..85211951f6951b 100644 --- a/deps/npm/node_modules/npmlog/package.json +++ b/deps/npm/node_modules/npmlog/package.json @@ -1,45 +1,54 @@ { "_args": [ [ - "npmlog@~2.0.2", + { + "name": "npmlog", + "raw": "npmlog@latest", + "rawSpec": "latest", + "scope": null, + "spec": "latest", + "type": "tag" + }, "/Users/rebecca/code/npm" ] ], - "_from": "npmlog@>=2.0.2 <2.1.0", - "_id": "npmlog@2.0.3", + "_from": "npmlog@latest", + "_id": "npmlog@3.1.2", "_inCache": true, "_installable": true, "_location": "/npmlog", - "_nodeVersion": "4.2.2", + "_nodeVersion": "4.4.0", "_npmOperationalInternal": { - "host": "packages-13-west.internal.npmjs.com", - "tmp": "tmp/npmlog-2.0.3.tgz_1458089035965_0.5096880353521556" + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/npmlog-3.1.2.tgz_1466073052641_0.36111341998912394" }, "_npmUser": { "email": "me@re-becca.org", "name": "iarna" }, - "_npmVersion": "3.8.1", + "_npmVersion": "3.9.6", "_phantomChildren": { + "aproba": "1.0.3", "has-unicode": "2.0.0", - "readable-stream": "2.0.6" + "readable-stream": "2.1.3", + "strip-ansi": "3.0.1" }, "_requested": { "name": "npmlog", - "raw": "npmlog@~2.0.2", - "rawSpec": "~2.0.2", + "raw": "npmlog@latest", + "rawSpec": "latest", "scope": null, - "spec": ">=2.0.2 <2.1.0", - "type": "range" + "spec": "latest", + "type": "tag" }, "_requiredBy": [ "/", - "/node-gyp", "/npm-registry-client" ], - "_shasum": "020f99351f0c02e399c674ba256e7c4d3b3dd298", + "_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-3.1.2.tgz", + "_shasum": "2d46fa874337af9498a2f12bb43d8d0be4a36873", "_shrinkwrap": null, - "_spec": "npmlog@~2.0.2", + "_spec": "npmlog@latest", "_where": "/Users/rebecca/code/npm", "author": { "email": "i@izs.me", @@ -50,20 +59,25 @@ "url": "https://github.com/npm/npmlog/issues" }, "dependencies": { - "ansi": "~0.3.1", "are-we-there-yet": "~1.1.2", - "gauge": "~1.2.5" + "console-control-strings": "~1.1.0", + "gauge": "~2.6.0", + "set-blocking": "~2.0.0" }, "description": "logger for npm", "devDependencies": { + "standard": "~7.1.2", "tap": "~5.7.0" }, "directories": {}, "dist": { - "shasum": "020f99351f0c02e399c674ba256e7c4d3b3dd298", - "tarball": "http://registry.npmjs.org/npmlog/-/npmlog-2.0.3.tgz" + "shasum": "2d46fa874337af9498a2f12bb43d8d0be4a36873", + "tarball": "https://registry.npmjs.org/npmlog/-/npmlog-3.1.2.tgz" }, - "gitHead": "9dfe26296118ceb5443e76f347f256c35e7ca999", + "files": [ + "log.js" + ], + "gitHead": "444e237743fa1339cb91bea2d3f16f710be56984", "homepage": "https://github.com/npm/npmlog#readme", "license": "ISC", "main": "log.js", @@ -79,6 +93,10 @@ { "email": "ogd@aoaioxxysz.net", "name": "othiym23" + }, + { + "email": "kat@sykosomatic.org", + "name": "zkat" } ], "name": "npmlog", @@ -89,7 +107,7 @@ "url": "git+https://github.com/npm/npmlog.git" }, "scripts": { - "test": "tap test/*.js" + "test": "standard && tap test/*.js" }, - "version": "2.0.3" + "version": "3.1.2" } diff --git a/deps/npm/node_modules/npmlog/test/basic.js b/deps/npm/node_modules/npmlog/test/basic.js deleted file mode 100644 index 1887d3a2a8cd4e..00000000000000 --- a/deps/npm/node_modules/npmlog/test/basic.js +++ /dev/null @@ -1,235 +0,0 @@ -var tap = require('tap') -var log = require('../') - -var result = [] -var logEvents = [] -var logInfoEvents = [] -var logPrefixEvents = [] - -var util = require('util') - -var resultExpect = -[ '\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[7msill\u001b[0m \u001b[0m\u001b[35msilly prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[34m\u001b[40mverb\u001b[0m \u001b[0m\u001b[35mverbose prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[32minfo\u001b[0m \u001b[0m\u001b[35minfo prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[32m\u001b[40mhttp\u001b[0m \u001b[0m\u001b[35mhttp prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[30m\u001b[43mWARN\u001b[0m \u001b[0m\u001b[35mwarn prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35merror prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[32minfo\u001b[0m \u001b[0m\u001b[35minfo prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[32m\u001b[40mhttp\u001b[0m \u001b[0m\u001b[35mhttp prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[30m\u001b[43mWARN\u001b[0m \u001b[0m\u001b[35mwarn prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35merror prefix\u001b[0m x = {"foo":{"bar":"baz"}}\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35m404\u001b[0m This is a longer\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35m404\u001b[0m message, with some details\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35m404\u001b[0m and maybe a stack.\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u001b[31m\u001b[40mERR!\u001b[0m \u001b[0m\u001b[35m404\u001b[0m \n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u0007noise\u001b[0m\u001b[35m\u001b[0m LOUD NOISES\n', - '\u001b[0m\u001b[37m\u001b[40mnpm\u001b[0m \u001b[0m\u0007noise\u001b[0m \u001b[0m\u001b[35merror\u001b[0m erroring\n', - '\u001b[0m' ] - -var logPrefixEventsExpect = -[ { id: 2, - level: 'info', - prefix: 'info prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 9, - level: 'info', - prefix: 'info prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 16, - level: 'info', - prefix: 'info prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] } ] - -// should be the same. -var logInfoEventsExpect = logPrefixEventsExpect - -var logEventsExpect = -[ { id: 0, - level: 'silly', - prefix: 'silly prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 1, - level: 'verbose', - prefix: 'verbose prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 2, - level: 'info', - prefix: 'info prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 3, - level: 'http', - prefix: 'http prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 4, - level: 'warn', - prefix: 'warn prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 5, - level: 'error', - prefix: 'error prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 6, - level: 'silent', - prefix: 'silent prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 7, - level: 'silly', - prefix: 'silly prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 8, - level: 'verbose', - prefix: 'verbose prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 9, - level: 'info', - prefix: 'info prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 10, - level: 'http', - prefix: 'http prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 11, - level: 'warn', - prefix: 'warn prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 12, - level: 'error', - prefix: 'error prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 13, - level: 'silent', - prefix: 'silent prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 14, - level: 'silly', - prefix: 'silly prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 15, - level: 'verbose', - prefix: 'verbose prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 16, - level: 'info', - prefix: 'info prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 17, - level: 'http', - prefix: 'http prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 18, - level: 'warn', - prefix: 'warn prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 19, - level: 'error', - prefix: 'error prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 20, - level: 'silent', - prefix: 'silent prefix', - message: 'x = {"foo":{"bar":"baz"}}', - messageRaw: [ 'x = %j', { foo: { bar: 'baz' } } ] }, - { id: 21, - level: 'error', - prefix: '404', - message: 'This is a longer\nmessage, with some details\nand maybe a stack.\n', - messageRaw: [ 'This is a longer\nmessage, with some details\nand maybe a stack.\n' ] }, - { id: 22, - level: 'noise', - prefix: false, - message: 'LOUD NOISES', - messageRaw: [ 'LOUD NOISES' ] }, - { id: 23, - level: 'noise', - prefix: 'error', - message: 'erroring', - messageRaw: [ 'erroring' ] } ] - -var Stream = require('stream').Stream -var s = new Stream() -s.write = function (m) { - result.push(m) -} - -s.writable = true -s.isTTY = true -s.end = function () {} - -log.stream = s - -log.heading = 'npm' - - -tap.test('basic', function (t) { - log.on('log', logEvents.push.bind(logEvents)) - log.on('log.info', logInfoEvents.push.bind(logInfoEvents)) - log.on('info prefix', logPrefixEvents.push.bind(logPrefixEvents)) - - console.error('log.level=silly') - log.level = 'silly' - log.silly('silly prefix', 'x = %j', {foo:{bar:'baz'}}) - log.verbose('verbose prefix', 'x = %j', {foo:{bar:'baz'}}) - log.info('info prefix', 'x = %j', {foo:{bar:'baz'}}) - log.http('http prefix', 'x = %j', {foo:{bar:'baz'}}) - log.warn('warn prefix', 'x = %j', {foo:{bar:'baz'}}) - log.error('error prefix', 'x = %j', {foo:{bar:'baz'}}) - log.silent('silent prefix', 'x = %j', {foo:{bar:'baz'}}) - - console.error('log.level=silent') - log.level = 'silent' - log.silly('silly prefix', 'x = %j', {foo:{bar:'baz'}}) - log.verbose('verbose prefix', 'x = %j', {foo:{bar:'baz'}}) - log.info('info prefix', 'x = %j', {foo:{bar:'baz'}}) - log.http('http prefix', 'x = %j', {foo:{bar:'baz'}}) - log.warn('warn prefix', 'x = %j', {foo:{bar:'baz'}}) - log.error('error prefix', 'x = %j', {foo:{bar:'baz'}}) - log.silent('silent prefix', 'x = %j', {foo:{bar:'baz'}}) - - console.error('log.level=info') - log.level = 'info' - log.silly('silly prefix', 'x = %j', {foo:{bar:'baz'}}) - log.verbose('verbose prefix', 'x = %j', {foo:{bar:'baz'}}) - log.info('info prefix', 'x = %j', {foo:{bar:'baz'}}) - log.http('http prefix', 'x = %j', {foo:{bar:'baz'}}) - log.warn('warn prefix', 'x = %j', {foo:{bar:'baz'}}) - log.error('error prefix', 'x = %j', {foo:{bar:'baz'}}) - log.silent('silent prefix', 'x = %j', {foo:{bar:'baz'}}) - log.error('404', 'This is a longer\n'+ - 'message, with some details\n'+ - 'and maybe a stack.\n') - log.addLevel('noise', 10000, {beep: true}) - log.noise(false, 'LOUD NOISES') - log.noise('error', 'erroring') - - t.deepEqual(result.join('').trim(), resultExpect.join('').trim(), 'result') - t.deepEqual(log.record, logEventsExpect, 'record') - t.deepEqual(logEvents, logEventsExpect, 'logEvents') - t.deepEqual(logInfoEvents, logInfoEventsExpect, 'logInfoEvents') - t.deepEqual(logPrefixEvents, logPrefixEventsExpect, 'logPrefixEvents') - - t.end() -}) diff --git a/deps/npm/node_modules/npmlog/test/progress.js b/deps/npm/node_modules/npmlog/test/progress.js deleted file mode 100644 index 68dca2afc73575..00000000000000 --- a/deps/npm/node_modules/npmlog/test/progress.js +++ /dev/null @@ -1,131 +0,0 @@ -'use strict' - -var test = require('tap').test -var Progress = require('are-we-there-yet') -var log = require('../log.js') - -var actions = [] -log.gauge = { - enable: function () { - actions.push(['enable']) - }, - disable: function () { - actions.push(['disable']) - }, - hide: function () { - actions.push(['hide']) - }, - show: function (name, completed) { - actions.push(['show', name, completed]) - }, - pulse: function (name) { - actions.push(['pulse', name]) - } -} - -function didActions(t, msg, output) { - var tests = [] - for (var ii = 0; ii < output.length; ++ ii) { - for (var jj = 0; jj < output[ii].length; ++ jj) { - tests.push({cmd: ii, arg: jj}) - } - } - t.is(actions.length, output.length, msg) - tests.forEach(function (test) { - t.is(actions[test.cmd] ? actions[test.cmd][test.arg] : null, - output[test.cmd][test.arg], - msg + ': ' + output[test.cmd] + (test.arg ? ' arg #'+test.arg : '')) - }) - actions = [] -} - -function resetTracker() { - log.disableProgress() - log.tracker = new Progress.TrackerGroup() - log.enableProgress() - actions = [] -} - -test('enableProgress', function (t) { - t.plan(6) - resetTracker() - log.disableProgress() - actions = [] - log.enableProgress() - didActions(t, 'enableProgress', [ [ 'enable' ], [ 'show', undefined, 0 ] ]) - log.enableProgress() - didActions(t, 'enableProgress again', []) -}) - -test('disableProgress', function (t) { - t.plan(4) - resetTracker() - log.disableProgress() - didActions(t, 'disableProgress', [ [ 'hide' ], [ 'disable' ] ]) - log.disableProgress() - didActions(t, 'disableProgress again', []) -}) - -test('showProgress', function (t) { - t.plan(5) - resetTracker() - log.disableProgress() - actions = [] - log.showProgress('foo') - didActions(t, 'showProgress disabled', []) - log.enableProgress() - actions = [] - log.showProgress('foo') - didActions(t, 'showProgress', [ [ 'show', 'foo', 0 ] ]) -}) - -test('clearProgress', function (t) { - t.plan(3) - resetTracker() - log.clearProgress() - didActions(t, 'clearProgress', [ [ 'hide' ] ]) - log.disableProgress() - actions = [] - log.clearProgress() - didActions(t, 'clearProgress disabled', [ ]) -}) - -test("newItem", function (t) { - t.plan(12) - resetTracker() - actions = [] - var a = log.newItem("test", 10) - didActions(t, "newItem", [ [ 'show', 'test', 0 ] ]) - a.completeWork(5) - didActions(t, "newItem:completeWork", [ [ 'show', 'test', 0.5 ] ]) - a.finish() - didActions(t, "newItem:finish", [ [ 'show', 'test', 1 ] ]) -}) - -// test that log objects proxy through. And test that completion status filters up -test("newGroup", function (t) { - t.plan(23) - resetTracker() - var a = log.newGroup("newGroup") - didActions(t, 'newGroup', [[ 'show', 'newGroup', 0 ]]) - a.warn("test", "this is a test") - didActions(t, "newGroup:warn", [ [ 'pulse', 'test' ], [ 'hide' ], [ 'show', undefined, 0 ] ]) - var b = a.newItem("newGroup2", 10) - didActions(t, "newGroup:newItem", [ [ 'show', 'newGroup2', 0 ] ]) - b.completeWork(5) - didActions(t, "newGroup:completeWork", [ [ 'show', 'newGroup2', 0.5] ]) - a.finish() - didActions(t, "newGroup:finish", [ [ 'show', 'newGroup', 1 ] ]) -}) - -test("newStream", function (t) { - t.plan(13) - resetTracker() - var a = log.newStream("newStream", 10) - didActions(t, "newStream", [ [ 'show', 'newStream', 0 ] ]) - a.write("abcde") - didActions(t, "newStream", [ [ 'show', 'newStream', 0.5 ] ]) - a.write("fghij") - didActions(t, "newStream", [ [ 'show', 'newStream', 1 ] ]) - t.is(log.tracker.completed(), 1, "Overall completion") -}) diff --git a/deps/npm/node_modules/read-package-tree/.travis.yml b/deps/npm/node_modules/read-package-tree/.travis.yml deleted file mode 100644 index e1bcee1acd90c1..00000000000000 --- a/deps/npm/node_modules/read-package-tree/.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/read-package-tree/package.json b/deps/npm/node_modules/read-package-tree/package.json index d1acb0ef0678cf..5a376b39f852c8 100644 --- a/deps/npm/node_modules/read-package-tree/package.json +++ b/deps/npm/node_modules/read-package-tree/package.json @@ -2,51 +2,54 @@ "_args": [ [ { - "name": "read-package-tree", - "raw": "read-package-tree@~5.1.3", - "rawSpec": "~5.1.3", + "raw": "read-package-tree@~5.1.4", "scope": null, - "spec": ">=5.1.3 <5.2.0", + "escapedName": "read-package-tree", + "name": "read-package-tree", + "rawSpec": "~5.1.4", + "spec": ">=5.1.4 <5.2.0", "type": "range" }, "/Users/rebecca/code/npm" ] ], - "_from": "read-package-tree@>=5.1.3 <5.2.0", - "_id": "read-package-tree@5.1.4", + "_from": "read-package-tree@>=5.1.4 <5.2.0", + "_id": "read-package-tree@5.1.5", "_inCache": true, "_installable": true, "_location": "/read-package-tree", "_nodeVersion": "4.4.0", "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/read-package-tree-5.1.4.tgz_1463682709793_0.6651253618765622" + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/read-package-tree-5.1.5.tgz_1466725442057_0.8425232821609825" }, "_npmUser": { - "email": "me@re-becca.org", - "name": "iarna" + "name": "iarna", + "email": "me@re-becca.org" }, - "_npmVersion": "3.9.2", + "_npmVersion": "3.10.2", "_phantomChildren": {}, "_requested": { - "name": "read-package-tree", - "raw": "read-package-tree@~5.1.3", - "rawSpec": "~5.1.3", + "raw": "read-package-tree@~5.1.4", "scope": null, - "spec": ">=5.1.3 <5.2.0", + "escapedName": "read-package-tree", + "name": "read-package-tree", + "rawSpec": "~5.1.4", + "spec": ">=5.1.4 <5.2.0", "type": "range" }, "_requiredBy": [ + "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.1.4.tgz", - "_shasum": "bb6e465f913d4259a9534c87b1d5c508fe8eb078", + "_resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.1.5.tgz", + "_shasum": "ace7e6381c7684f970aaa98fc7c5d2b666addab6", "_shrinkwrap": null, - "_spec": "read-package-tree@~5.1.3", + "_spec": "read-package-tree@~5.1.4", "_where": "/Users/rebecca/code/npm", "author": { - "email": "i@izs.me", "name": "Isaac Z. Schlueter", + "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { @@ -69,21 +72,24 @@ "test": "test" }, "dist": { - "shasum": "bb6e465f913d4259a9534c87b1d5c508fe8eb078", - "tarball": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.1.4.tgz" + "shasum": "ace7e6381c7684f970aaa98fc7c5d2b666addab6", + "tarball": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.1.5.tgz" }, - "gitHead": "eb24d2508da745233af93769596ff1d963f801be", + "files": [ + "rpt.js" + ], + "gitHead": "5fcf957b01d3ce5ad3ffde51a5fd6d8178e23354", "homepage": "https://github.com/npm/read-package-tree", "license": "ISC", "main": "rpt.js", "maintainers": [ { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" }, { - "email": "me@re-becca.org", - "name": "iarna" + "name": "iarna", + "email": "me@re-becca.org" } ], "name": "read-package-tree", @@ -96,5 +102,5 @@ "scripts": { "test": "tap test/*.js" }, - "version": "5.1.4" + "version": "5.1.5" } diff --git a/deps/npm/node_modules/read-package-tree/rpt.js b/deps/npm/node_modules/read-package-tree/rpt.js index 5229897632a3ab..8a6a89b085a9ba 100644 --- a/deps/npm/node_modules/read-package-tree/rpt.js +++ b/deps/npm/node_modules/read-package-tree/rpt.js @@ -98,7 +98,10 @@ function loadNode (logical, physical, cache, cb) { var realpath function thenReadPackageJson (er, real) { - if (er) return cb(er) + 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 diff --git a/deps/npm/node_modules/read-package-tree/test/basic.js b/deps/npm/node_modules/read-package-tree/test/basic.js deleted file mode 100644 index 0dcb538911f3f2..00000000000000 --- a/deps/npm/node_modules/read-package-tree/test/basic.js +++ /dev/null @@ -1,155 +0,0 @@ -var test = require('tap').test -var rpt = require('../rpt.js') -var path = require('path') -var fs = require('fs') -var archy = require('archy') -var fixtures = path.resolve(__dirname, 'fixtures') -var roots = [ 'root', 'other', 'selflink', 'noname' ] -var cwd = path.resolve(__dirname, '..') - -var symlinks = { - 'selflink/node_modules/@scope/z/node_modules/glob': - '../../../foo/node_modules/glob', - 'other/node_modules/glob': - '../../root/node_modules/@scope/x/node_modules/glob', - 'linkedroot': - 'root', - 'deep/root': - '../root', - 'deeproot': - 'deep' -} - -function cleanup () { - Object.keys(symlinks).forEach(function (s) { - var p = path.resolve(cwd, 'test/fixtures', s) - try { - fs.unlinkSync(p) - } catch (er) {} - }) -} - -test('setup symlinks', function (t) { - cleanup() - - Object.keys(symlinks).forEach(function (s) { - var p = path.resolve(cwd, 'test/fixtures', s) - fs.symlinkSync(symlinks [ s ], p, 'dir') - }) - - t.end() -}) - -roots.forEach(function (root) { - var dir = path.resolve(fixtures, root) - var expectedtxt = path.resolve(dir, 'archy.txt') - var expectedre = path.resolve(dir, 'archy.re') - - test(root, function (t) { - rpt(dir, function (er, d) { - if (er && er.code !== 'ENOENT') throw er - - var actual = archy(archyize(d)).trim() - // console . log ('----', dir) - console.log(actual) - // console . log (require ('util') . inspect (d, { - // depth: Infinity - // })) - try { - var expect = fs.readFileSync(expectedtxt, 'utf8').trim() - t.equal(actual, expect, root + ' tree') - } catch (e) { - var expect = new RegExp(fs.readFileSync(expectedre, 'utf8').trim()) - t.like(actual, expect, root + ' tree') - } - t.end() - }) - }) -}) - -test('linkedroot', function (t) { - var dir = path.resolve(fixtures, 'linkedroot') - var out = dir + '-archy.txt' - rpt(dir, function (er, d) { - if (er && er.code !== 'ENOENT') throw er - - var actual = archy(archyize(d)).trim() - console.log(actual) - var expect = fs.readFileSync(out, 'utf8').trim() - t.equal(actual, expect, 'linkedroot tree') - t.end() - }) -}) - -test('deeproot', function (t) { - var dir = path.resolve(fixtures, 'deeproot/root') - var out = path.resolve(fixtures, 'deep') + '-archy.txt' - rpt(dir, function (er, d) { - if (er && er.code !== 'ENOENT') throw er - - var actual = archy(archyize(d)).trim() - console.log(actual) - var expect = fs.readFileSync(out, 'utf8').trim() - t.equal(actual, expect, 'deeproot tree') - t.end() - }) -}) - -test('broken json', function (t) { - rpt(path.resolve(fixtures, 'bad'), function (er, d) { - t.ok(d.error, 'Got an error object') - t.equal(d.error && d.error.code, 'EJSONPARSE') - t.ok(d, 'Got a tree') - t.end() - }) -}) - -test('missing json does not obscure deeper errors', function (t) { - rpt(path.resolve(fixtures, 'empty'), function (er, d) { - var error = d.error - t.ok(error, 'Error reading json of top level') - t.equal(error && error.code, 'ENOENT') - var childError = d.children.length===1 && d.children[0].error - t.ok(childError, 'Error parsing JSON of child node') - t.equal(childError && childError.code, 'EJSONPARSE') - t.end() - }) -}) -test('missing folder', function (t) { - rpt(path.resolve(fixtures, 'does-not-exist'), function (er, d) { - t.ok(er, 'Got an error object') - t.equal(er && er.code, 'ENOENT') - t.ok(!d, 'No tree on top level error') - t.end() - }) -}) - - -function archyize (d, seen) { - seen = seen || {} - var path = d.path - if (d.target) { - path = d.target.path - } - - var label = d.package._id ? d.package._id + ' ' : - d.package.name ? d.package.name + (d.package.version ? '@' + d.package.version : '') + ' ' : - '' - label += path.substr(cwd.length + 1) - - if (d . target) { - return { label: label + ' (symlink)', nodes: [] } - } - - return { - label: label, - nodes: d.children.map(function (kid) { - return archyize(kid, seen) - }) - } -} - -test('cleanup', function (t) { - cleanup() - t.end() -}) diff --git a/deps/npm/node_modules/read-package-tree/test/fixtures/bad/package.json b/deps/npm/node_modules/read-package-tree/test/fixtures/bad/package.json deleted file mode 100644 index 21d815ec3b0c33..00000000000000 --- a/deps/npm/node_modules/read-package-tree/test/fixtures/bad/package.json +++ /dev/null @@ -1,2 +0,0 @@ -{ - "NOPE" diff --git a/deps/npm/node_modules/read-package-tree/test/fixtures/deep-archy.txt b/deps/npm/node_modules/read-package-tree/test/fixtures/deep-archy.txt deleted file mode 100644 index 630eab1a493700..00000000000000 --- a/deps/npm/node_modules/read-package-tree/test/fixtures/deep-archy.txt +++ /dev/null @@ -1,11 +0,0 @@ -root@1.2.3 test/fixtures/deeproot/root -├─┬ @scope/x@1.2.3 test/fixtures/deeproot/root/node_modules/@scope/x -│ └─┬ glob@4.0.5 test/fixtures/deeproot/root/node_modules/@scope/x/node_modules/glob -│ ├── graceful-fs@3.0.2 test/fixtures/deeproot/root/node_modules/@scope/x/node_modules/glob/node_modules/graceful-fs -│ ├── inherits@2.0.1 test/fixtures/deeproot/root/node_modules/@scope/x/node_modules/glob/node_modules/inherits -│ ├─┬ minimatch@1.0.0 test/fixtures/deeproot/root/node_modules/@scope/x/node_modules/glob/node_modules/minimatch -│ │ ├── lru-cache@2.5.0 test/fixtures/deeproot/root/node_modules/@scope/x/node_modules/glob/node_modules/minimatch/node_modules/lru-cache -│ │ └── sigmund@1.0.0 test/fixtures/deeproot/root/node_modules/@scope/x/node_modules/glob/node_modules/minimatch/node_modules/sigmund -│ └── once@1.3.0 test/fixtures/deeproot/root/node_modules/@scope/x/node_modules/glob/node_modules/once -├── @scope/y@1.2.3 test/fixtures/deeproot/root/node_modules/@scope/y -└── foo@1.2.3 test/fixtures/deeproot/root/node_modules/foo \ No newline at end of file diff --git a/deps/npm/node_modules/read-package-tree/test/fixtures/empty/node_modules/foo/package.json b/deps/npm/node_modules/read-package-tree/test/fixtures/empty/node_modules/foo/package.json deleted file mode 100644 index 98232c64fce936..00000000000000 --- a/deps/npm/node_modules/read-package-tree/test/fixtures/empty/node_modules/foo/package.json +++ /dev/null @@ -1 +0,0 @@ -{ diff --git a/deps/npm/node_modules/read-package-tree/test/fixtures/linkedroot-archy.txt b/deps/npm/node_modules/read-package-tree/test/fixtures/linkedroot-archy.txt deleted file mode 100644 index e34a46031304d4..00000000000000 --- a/deps/npm/node_modules/read-package-tree/test/fixtures/linkedroot-archy.txt +++ /dev/null @@ -1,11 +0,0 @@ -root@1.2.3 test/fixtures/linkedroot -├─┬ @scope/x@1.2.3 test/fixtures/linkedroot/node_modules/@scope/x -│ └─┬ glob@4.0.5 test/fixtures/linkedroot/node_modules/@scope/x/node_modules/glob -│ ├── graceful-fs@3.0.2 test/fixtures/linkedroot/node_modules/@scope/x/node_modules/glob/node_modules/graceful-fs -│ ├── inherits@2.0.1 test/fixtures/linkedroot/node_modules/@scope/x/node_modules/glob/node_modules/inherits -│ ├─┬ minimatch@1.0.0 test/fixtures/linkedroot/node_modules/@scope/x/node_modules/glob/node_modules/minimatch -│ │ ├── lru-cache@2.5.0 test/fixtures/linkedroot/node_modules/@scope/x/node_modules/glob/node_modules/minimatch/node_modules/lru-cache -│ │ └── sigmund@1.0.0 test/fixtures/linkedroot/node_modules/@scope/x/node_modules/glob/node_modules/minimatch/node_modules/sigmund -│ └── once@1.3.0 test/fixtures/linkedroot/node_modules/@scope/x/node_modules/glob/node_modules/once -├── @scope/y@1.2.3 test/fixtures/linkedroot/node_modules/@scope/y -└── foo@1.2.3 test/fixtures/linkedroot/node_modules/foo \ No newline at end of file diff --git a/deps/npm/node_modules/read-package-tree/test/fixtures/noname/archy.txt b/deps/npm/node_modules/read-package-tree/test/fixtures/noname/archy.txt deleted file mode 100644 index 03d78dfc69b8b3..00000000000000 --- a/deps/npm/node_modules/read-package-tree/test/fixtures/noname/archy.txt +++ /dev/null @@ -1,2 +0,0 @@ -test/fixtures/noname -└── test/fixtures/noname/node_modules/foo diff --git a/deps/npm/node_modules/read-package-tree/test/fixtures/other/archy.txt b/deps/npm/node_modules/read-package-tree/test/fixtures/other/archy.txt deleted file mode 100644 index 23666226c91820..00000000000000 --- a/deps/npm/node_modules/read-package-tree/test/fixtures/other/archy.txt +++ /dev/null @@ -1,2 +0,0 @@ -test/fixtures/other -└── glob@4.0.5 test/fixtures/other/node_modules/glob (symlink) \ No newline at end of file diff --git a/deps/npm/node_modules/read-package-tree/test/fixtures/root/archy.txt b/deps/npm/node_modules/read-package-tree/test/fixtures/root/archy.txt deleted file mode 100644 index 1aacd3f0b7bc65..00000000000000 --- a/deps/npm/node_modules/read-package-tree/test/fixtures/root/archy.txt +++ /dev/null @@ -1,11 +0,0 @@ -root@1.2.3 test/fixtures/root -├─┬ @scope/x@1.2.3 test/fixtures/root/node_modules/@scope/x -│ └─┬ glob@4.0.5 test/fixtures/root/node_modules/@scope/x/node_modules/glob -│ ├── graceful-fs@3.0.2 test/fixtures/root/node_modules/@scope/x/node_modules/glob/node_modules/graceful-fs -│ ├── inherits@2.0.1 test/fixtures/root/node_modules/@scope/x/node_modules/glob/node_modules/inherits -│ ├─┬ minimatch@1.0.0 test/fixtures/root/node_modules/@scope/x/node_modules/glob/node_modules/minimatch -│ │ ├── lru-cache@2.5.0 test/fixtures/root/node_modules/@scope/x/node_modules/glob/node_modules/minimatch/node_modules/lru-cache -│ │ └── sigmund@1.0.0 test/fixtures/root/node_modules/@scope/x/node_modules/glob/node_modules/minimatch/node_modules/sigmund -│ └── once@1.3.0 test/fixtures/root/node_modules/@scope/x/node_modules/glob/node_modules/once -├── @scope/y@1.2.3 test/fixtures/root/node_modules/@scope/y -└── foo@1.2.3 test/fixtures/root/node_modules/foo \ No newline at end of file diff --git a/deps/npm/node_modules/read-package-tree/test/fixtures/root/package.json b/deps/npm/node_modules/read-package-tree/test/fixtures/root/package.json deleted file mode 100644 index 010347cee63bc5..00000000000000 --- a/deps/npm/node_modules/read-package-tree/test/fixtures/root/package.json +++ /dev/null @@ -1,2 +0,0 @@ -{"name":"root", - "version":"1.2.3"} \ No newline at end of file diff --git a/deps/npm/node_modules/read-package-tree/test/fixtures/selflink/archy.re b/deps/npm/node_modules/read-package-tree/test/fixtures/selflink/archy.re deleted file mode 100644 index 22e18109b1b37a..00000000000000 --- a/deps/npm/node_modules/read-package-tree/test/fixtures/selflink/archy.re +++ /dev/null @@ -1,13 +0,0 @@ -selflink@1[.]2[.]3 test/fixtures/selflink -├── @scope/y@1[.]2[.]3 test/fixtures/selflink/node_modules/@scope/y -├─┬ @scope/z@1[.]2[.]3 test/fixtures/selflink/node_modules/@scope/z -│ └── glob@4[.]0[.]5 test/fixtures/selflink/node_modules/foo/node_modules/glob [(]symlink[)] -└─┬ foo@1[.]2[.]3 test/fixtures/selflink/node_modules/foo - ├─┬ glob@4[.]0[.]5 test/fixtures/selflink/node_modules/foo/node_modules/glob - │ ├── graceful-fs@3[.]0[.]2 test/fixtures/selflink/node_modules/(foo|@scope/z)/node_modules/glob/node_modules/graceful-fs - │ ├── inherits@2[.]0[.]1 test/fixtures/selflink/node_modules/(foo|@scope/z)/node_modules/glob/node_modules/inherits - │ ├─┬ minimatch@1[.]0[.]0 test/fixtures/selflink/node_modules/(foo|@scope/z)/node_modules/glob/node_modules/minimatch - │ │ ├── lru-cache@2[.]5[.]0 test/fixtures/selflink/node_modules/(foo|@scope/z)/node_modules/glob/node_modules/minimatch/node_modules/lru-cache - │ │ └── sigmund@1[.]0[.]0 test/fixtures/selflink/node_modules/(foo|@scope/z)/node_modules/glob/node_modules/minimatch/node_modules/sigmund - │ └── once@1[.]3[.]0 test/fixtures/selflink/node_modules/(foo|@scope/z)/node_modules/glob/node_modules/once - └── selflink@1[.]2[.]3 test/fixtures/selflink [(]symlink[)] diff --git a/deps/npm/node_modules/read-package-tree/test/fixtures/selflink/package.json b/deps/npm/node_modules/read-package-tree/test/fixtures/selflink/package.json deleted file mode 100644 index 5bbf35e55b8407..00000000000000 --- a/deps/npm/node_modules/read-package-tree/test/fixtures/selflink/package.json +++ /dev/null @@ -1,2 +0,0 @@ -{"name":"selflink", - "version":"1.2.3"} diff --git a/deps/npm/node_modules/read-package-tree/test/symlinked-node-modules.js b/deps/npm/node_modules/read-package-tree/test/symlinked-node-modules.js deleted file mode 100644 index 31149240bdba38..00000000000000 --- a/deps/npm/node_modules/read-package-tree/test/symlinked-node-modules.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict' -var path = require('path') -var test = require('tap').test -var rpt = require('../rpt.js') -var Tacks = require('tacks') -var File = Tacks.File -var Symlink = Tacks.Symlink -var Dir = Tacks.Dir - -var workdir = path.join(__dirname, path.basename(__filename, '.js')) -var fixture = new Tacks(Dir({ - bar: Dir({ - 'package.json': File({ - name: 'bar', - version: '1.0.0' - }) - }), - 'linked-node-modules': Dir({ - bar: Symlink('../bar'), - foo: Dir({ - 'package.json': File({ - name: 'foo', - version: '1.0.0' - }) - }) - }), - example: Dir({ - node_modules: Symlink('../linked-node-modules/'), - 'package.json': File({ - name: 'example', - version: '1.0.0', - }) - }) -})) - -function setup () { - cleanup() - fixture.create(workdir) -} - -function cleanup () { - fixture.remove(workdir) -} - -test('setup', function (t) { - setup() - t.done() -}) -test('symlinked-node-modules', function (t) { - rpt(path.join(workdir, 'example'), function (err, tree) { - t.ifError(err) - t.is(tree.children.length, 2) - var childrenShouldBe = { - 'foo': {isLink: false}, - 'bar': {isLink: true} - } - tree.children.forEach(function (child) { - var name = child.package.name - t.is(child.isLink, childrenShouldBe[name].isLink, - 'is' + (childrenShouldBe[name].isLink ? '' : 'Not') + 'Link ' + - path.relative(workdir, child.path) + " + " + - path.relative(workdir, child.realpath)) - }) - t.done() - }) -}) -test('cleanup', function (t) { - cleanup() - t.done() -}) \ No newline at end of file diff --git a/deps/npm/node_modules/readable-stream/.npmignore b/deps/npm/node_modules/readable-stream/.npmignore index 38344f87a62766..265ff739e071cd 100644 --- a/deps/npm/node_modules/readable-stream/.npmignore +++ b/deps/npm/node_modules/readable-stream/.npmignore @@ -2,4 +2,7 @@ build/ test/ examples/ fs.js -zlib.js \ No newline at end of file +zlib.js +.zuul.yml +.nyc_output +coverage diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/base.css b/deps/npm/node_modules/readable-stream/coverage/lcov-report/base.css deleted file mode 100644 index 417c7adc95f1da..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/base.css +++ /dev/null @@ -1,212 +0,0 @@ -body, html { - margin:0; padding: 0; - height: 100%; -} -body { - font-family: Helvetica Neue, Helvetica, Arial; - font-size: 14px; - color:#333; -} -.small { font-size: 12px; } -*, *:after, *:before { - -webkit-box-sizing:border-box; - -moz-box-sizing:border-box; - box-sizing:border-box; - } -h1 { font-size: 20px; margin: 0;} -h2 { font-size: 14px; } -pre { - font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; - margin: 0; - padding: 0; - -moz-tab-size: 2; - -o-tab-size: 2; - tab-size: 2; -} -a { color:#0074D9; text-decoration:none; } -a:hover { text-decoration:underline; } -.strong { font-weight: bold; } -.space-top1 { padding: 10px 0 0 0; } -.pad2y { padding: 20px 0; } -.pad1y { padding: 10px 0; } -.pad2x { padding: 0 20px; } -.pad2 { padding: 20px; } -.pad1 { padding: 10px; } -.space-left2 { padding-left:55px; } -.space-right2 { padding-right:20px; } -.center { text-align:center; } -.clearfix { display:block; } -.clearfix:after { - content:''; - display:block; - height:0; - clear:both; - visibility:hidden; - } -.fl { float: left; } -@media only screen and (max-width:640px) { - .col3 { width:100%; max-width:100%; } - .hide-mobile { display:none!important; } -} - -.quiet { - color: #7f7f7f; - color: rgba(0,0,0,0.5); -} -.quiet a { opacity: 0.7; } - -.fraction { - font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; - font-size: 10px; - color: #555; - background: #E8E8E8; - padding: 4px 5px; - border-radius: 3px; - vertical-align: middle; -} - -div.path a:link, div.path a:visited { color: #333; } -table.coverage { - border-collapse: collapse; - margin: 10px 0 0 0; - padding: 0; -} - -table.coverage td { - margin: 0; - padding: 0; - vertical-align: top; -} -table.coverage td.line-count { - text-align: right; - padding: 0 5px 0 20px; -} -table.coverage td.line-coverage { - text-align: right; - padding-right: 10px; - min-width:20px; -} - -table.coverage td span.cline-any { - display: inline-block; - padding: 0 5px; - width: 100%; -} -.missing-if-branch { - display: inline-block; - margin-right: 5px; - border-radius: 3px; - position: relative; - padding: 0 4px; - background: #333; - color: yellow; -} - -.skip-if-branch { - display: none; - margin-right: 10px; - position: relative; - padding: 0 4px; - background: #ccc; - color: white; -} -.missing-if-branch .typ, .skip-if-branch .typ { - color: inherit !important; -} -.coverage-summary { - border-collapse: collapse; - width: 100%; -} -.coverage-summary tr { border-bottom: 1px solid #bbb; } -.keyline-all { border: 1px solid #ddd; } -.coverage-summary td, .coverage-summary th { padding: 10px; } -.coverage-summary tbody { border: 1px solid #bbb; } -.coverage-summary td { border-right: 1px solid #bbb; } -.coverage-summary td:last-child { border-right: none; } -.coverage-summary th { - text-align: left; - font-weight: normal; - white-space: nowrap; -} -.coverage-summary th.file { border-right: none !important; } -.coverage-summary th.pct { } -.coverage-summary th.pic, -.coverage-summary th.abs, -.coverage-summary td.pct, -.coverage-summary td.abs { text-align: right; } -.coverage-summary td.file { white-space: nowrap; } -.coverage-summary td.pic { min-width: 120px !important; } -.coverage-summary tfoot td { } - -.coverage-summary .sorter { - height: 10px; - width: 7px; - display: inline-block; - margin-left: 0.5em; - background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; -} -.coverage-summary .sorted .sorter { - background-position: 0 -20px; -} -.coverage-summary .sorted-desc .sorter { - background-position: 0 -10px; -} -.status-line { height: 10px; } -/* dark red */ -.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } -.low .chart { border:1px solid #C21F39 } -/* medium red */ -.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } -/* light red */ -.low, .cline-no { background:#FCE1E5 } -/* light green */ -.high, .cline-yes { background:rgb(230,245,208) } -/* medium green */ -.cstat-yes { background:rgb(161,215,106) } -/* dark green */ -.status-line.high, .high .cover-fill { background:rgb(77,146,33) } -.high .chart { border:1px solid rgb(77,146,33) } - - -.medium .chart { border:1px solid #666; } -.medium .cover-fill { background: #666; } - -.cbranch-no { background: yellow !important; color: #111; } - -.cstat-skip { background: #ddd; color: #111; } -.fstat-skip { background: #ddd; color: #111 !important; } -.cbranch-skip { background: #ddd !important; color: #111; } - -span.cline-neutral { background: #eaeaea; } -.medium { background: #eaeaea; } - -.cover-fill, .cover-empty { - display:inline-block; - height: 12px; -} -.chart { - line-height: 0; -} -.cover-empty { - background: white; -} -.cover-full { - border-right: none !important; -} -pre.prettyprint { - border: none !important; - padding: 0 !important; - margin: 0 !important; -} -.com { color: #999 !important; } -.ignore-none { color: #999; font-weight: normal; } - -.wrapper { - min-height: 100%; - height: auto !important; - height: 100%; - margin: 0 auto -48px; -} -.footer, .push { - height: 48px; -} diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/index.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/index.html deleted file mode 100644 index a812194c17fab3..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/index.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - Code coverage report for All files - - - - - - - -
    -
    -

    - / -

    -
    -
    - 90.63% - Statements - 851/939 -
    -
    - 87.94% - Branches - 496/564 -
    -
    - 86.54% - Functions - 90/104 -
    -
    - 92.73% - Lines - 765/825 -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FileStatementsBranchesFunctionsLines
    lib/
    90.63%851/93987.94%496/56486.54%90/10492.73%765/825
    -
    -
    - - - - - - - diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_duplex.js.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_duplex.js.html deleted file mode 100644 index a3f1208b4136a5..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_duplex.js.html +++ /dev/null @@ -1,287 +0,0 @@ - - - - Code coverage report for lib/_stream_duplex.js - - - - - - - -
    -
    -

    - all files / lib/ _stream_duplex.js -

    -
    -
    - 69.23% - Statements - 27/39 -
    -
    - 68.18% - Branches - 15/22 -
    -
    - 40% - Functions - 2/5 -
    -
    - 75.76% - Lines - 25/33 -
    -
    -
    -
    -
    
    -
    -
    1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75  -  -  -  -  -  -  -  -  -49× -  -  -  -  -  -  -  -49× -  -  -49× -  -  -  -49× -49× -  -  -49× -49× -  -49× -  -49× -49× -392× -392× -  -  -49× -25× -  -25× -25× -  -25× -  -25× -  -25× -25× -  -25× -  -  -  -49× -  -  -18× -  -  -  -  -  -  -49× -  -  -  -49× -  -  -  - 
    // 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';
    - 
    -/*<replacement>*/
    - 
    -var objectKeys = Object.keys || function (obj) {
    -  var keys = [];
    -  for (var key in obj) {
    -    keys.push(key);
    -  }return keys;
    -};
    -/*</replacement>*/
    - 
    -module.exports = Duplex;
    - 
    -/*<replacement>*/
    -var processNextTick = require('process-nextick-args');
    -/*</replacement>*/
    - 
    -/*<replacement>*/
    -var util = require('core-util-is');
    -util.inherits = require('inherits');
    -/*</replacement>*/
    - 
    -var Readable = require('./_stream_readable');
    -var Writable = require('./_stream_writable');
    - 
    -util.inherits(Duplex, Readable);
    - 
    -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) {
    -  Iif (!(this instanceof Duplex)) return new Duplex(options);
    - 
    -  Readable.call(this, options);
    -  Writable.call(this, options);
    - 
    -  Iif (options && options.readable === false) this.readable = false;
    - 
    -  Iif (options && options.writable === false) this.writable = false;
    - 
    -  this.allowHalfOpen = true;
    -  Iif (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
    - 
    -  this.once('end', onend);
    -}
    - 
    -// the no-half-open enforcer
    -function onend() {
    -  // if we allow half-open state, or if the writable side ended,
    -  // then we're ok.
    -  Eif (this.allowHalfOpen || this._writableState.ended) return;
    - 
    -  // no more data can be written.
    -  // But allow more writes to happen in this tick.
    -  processNextTick(onEndNT, this);
    -}
    - 
    -function onEndNT(self) {
    -  self.end();
    -}
    - 
    -function forEach(xs, f) {
    -  for (var i = 0, l = xs.length; i < l; i++) {
    -    f(xs[i], i);
    -  }
    -}
    -
    -
    - - - - - - - diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_passthrough.js.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_passthrough.js.html deleted file mode 100644 index 3ca02ae767a09e..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_passthrough.js.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - Code coverage report for lib/_stream_passthrough.js - - - - - - - -
    -
    -

    - all files / lib/ _stream_passthrough.js -

    -
    -
    - 90.91% - Statements - 10/11 -
    -
    - 50% - Branches - 1/2 -
    -
    - 100% - Functions - 2/2 -
    -
    - 100% - Lines - 10/10 -
    -
    -
    -
    -
    
    -
    -
    1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26  -  -  -  -  -  -49× -  -49× -  -  -49× -49× -  -  -49× -  -49× - -  - -  -  -49× -59× - 
    // 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');
    - 
    -/*<replacement>*/
    -var util = require('core-util-is');
    -util.inherits = require('inherits');
    -/*</replacement>*/
    - 
    -util.inherits(PassThrough, Transform);
    - 
    -function PassThrough(options) {
    -  Iif (!(this instanceof PassThrough)) return new PassThrough(options);
    - 
    -  Transform.call(this, options);
    -}
    - 
    -PassThrough.prototype._transform = function (chunk, encoding, cb) {
    -  cb(null, chunk);
    -};
    -
    -
    - - - - - - - diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_readable.js.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_readable.js.html deleted file mode 100644 index fb9f1d0cbe6347..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_readable.js.html +++ /dev/null @@ -1,2741 +0,0 @@ - - - - Code coverage report for lib/_stream_readable.js - - - - - - - -
    -
    -

    - all files / lib/ _stream_readable.js -

    -
    -
    - 89.29% - Statements - 467/523 -
    -
    - 87.22% - Branches - 307/352 -
    -
    - 86.79% - Functions - 46/53 -
    -
    - 90.73% - Lines - 411/453 -
    -
    -
    -
    -
    
    -
    -
    1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155 -156 -157 -158 -159 -160 -161 -162 -163 -164 -165 -166 -167 -168 -169 -170 -171 -172 -173 -174 -175 -176 -177 -178 -179 -180 -181 -182 -183 -184 -185 -186 -187 -188 -189 -190 -191 -192 -193 -194 -195 -196 -197 -198 -199 -200 -201 -202 -203 -204 -205 -206 -207 -208 -209 -210 -211 -212 -213 -214 -215 -216 -217 -218 -219 -220 -221 -222 -223 -224 -225 -226 -227 -228 -229 -230 -231 -232 -233 -234 -235 -236 -237 -238 -239 -240 -241 -242 -243 -244 -245 -246 -247 -248 -249 -250 -251 -252 -253 -254 -255 -256 -257 -258 -259 -260 -261 -262 -263 -264 -265 -266 -267 -268 -269 -270 -271 -272 -273 -274 -275 -276 -277 -278 -279 -280 -281 -282 -283 -284 -285 -286 -287 -288 -289 -290 -291 -292 -293 -294 -295 -296 -297 -298 -299 -300 -301 -302 -303 -304 -305 -306 -307 -308 -309 -310 -311 -312 -313 -314 -315 -316 -317 -318 -319 -320 -321 -322 -323 -324 -325 -326 -327 -328 -329 -330 -331 -332 -333 -334 -335 -336 -337 -338 -339 -340 -341 -342 -343 -344 -345 -346 -347 -348 -349 -350 -351 -352 -353 -354 -355 -356 -357 -358 -359 -360 -361 -362 -363 -364 -365 -366 -367 -368 -369 -370 -371 -372 -373 -374 -375 -376 -377 -378 -379 -380 -381 -382 -383 -384 -385 -386 -387 -388 -389 -390 -391 -392 -393 -394 -395 -396 -397 -398 -399 -400 -401 -402 -403 -404 -405 -406 -407 -408 -409 -410 -411 -412 -413 -414 -415 -416 -417 -418 -419 -420 -421 -422 -423 -424 -425 -426 -427 -428 -429 -430 -431 -432 -433 -434 -435 -436 -437 -438 -439 -440 -441 -442 -443 -444 -445 -446 -447 -448 -449 -450 -451 -452 -453 -454 -455 -456 -457 -458 -459 -460 -461 -462 -463 -464 -465 -466 -467 -468 -469 -470 -471 -472 -473 -474 -475 -476 -477 -478 -479 -480 -481 -482 -483 -484 -485 -486 -487 -488 -489 -490 -491 -492 -493 -494 -495 -496 -497 -498 -499 -500 -501 -502 -503 -504 -505 -506 -507 -508 -509 -510 -511 -512 -513 -514 -515 -516 -517 -518 -519 -520 -521 -522 -523 -524 -525 -526 -527 -528 -529 -530 -531 -532 -533 -534 -535 -536 -537 -538 -539 -540 -541 -542 -543 -544 -545 -546 -547 -548 -549 -550 -551 -552 -553 -554 -555 -556 -557 -558 -559 -560 -561 -562 -563 -564 -565 -566 -567 -568 -569 -570 -571 -572 -573 -574 -575 -576 -577 -578 -579 -580 -581 -582 -583 -584 -585 -586 -587 -588 -589 -590 -591 -592 -593 -594 -595 -596 -597 -598 -599 -600 -601 -602 -603 -604 -605 -606 -607 -608 -609 -610 -611 -612 -613 -614 -615 -616 -617 -618 -619 -620 -621 -622 -623 -624 -625 -626 -627 -628 -629 -630 -631 -632 -633 -634 -635 -636 -637 -638 -639 -640 -641 -642 -643 -644 -645 -646 -647 -648 -649 -650 -651 -652 -653 -654 -655 -656 -657 -658 -659 -660 -661 -662 -663 -664 -665 -666 -667 -668 -669 -670 -671 -672 -673 -674 -675 -676 -677 -678 -679 -680 -681 -682 -683 -684 -685 -686 -687 -688 -689 -690 -691 -692 -693 -694 -695 -696 -697 -698 -699 -700 -701 -702 -703 -704 -705 -706 -707 -708 -709 -710 -711 -712 -713 -714 -715 -716 -717 -718 -719 -720 -721 -722 -723 -724 -725 -726 -727 -728 -729 -730 -731 -732 -733 -734 -735 -736 -737 -738 -739 -740 -741 -742 -743 -744 -745 -746 -747 -748 -749 -750 -751 -752 -753 -754 -755 -756 -757 -758 -759 -760 -761 -762 -763 -764 -765 -766 -767 -768 -769 -770 -771 -772 -773 -774 -775 -776 -777 -778 -779 -780 -781 -782 -783 -784 -785 -786 -787 -788 -789 -790 -791 -792 -793 -794 -795 -796 -797 -798 -799 -800 -801 -802 -803 -804 -805 -806 -807 -808 -809 -810 -811 -812 -813 -814 -815 -816 -817 -818 -819 -820 -821 -822 -823 -824 -825 -826 -827 -828 -829 -830 -831 -832 -833 -834 -835 -836 -837 -838 -839 -840 -841 -842 -843 -844 -845 -846 -847 -848 -849 -850 -851 -852 -853 -854 -855 -856 -857 -858 -859 -860 -861 -862 -863 -864 -865 -866 -867 -868 -869 -870 -871 -872 -873 -874 -875 -876 -877 -878 -879 -880 -881 -882 -883 -884 -885 -886 -887 -888 -889 -890 -891 -892 -893  -  -49× -  -  -49× -  -  -  -49× -  -  -49× -  -  -49× -  -49× -269× -  -  -  -  -49× -49× -49× -49× -  -49× -  -  -  -  -49× -  -49× -  -  -  -49× -49× -  -  -  -49× -49× -49× -49× -  -  -  -  -  -49× -  -49× -  -49× -  -49× -38× -  -  -  -  -  -  -38× -  -  -49× -49× -82× -  -82× -  -  -  -82× -  -82× -  -  -  -82× -82× -82× -  -  -82× -  -82× -82× -82× -82× -82× -82× -82× -82× -  -  -  -  -  -82× -  -  -  -82× -82× -82× -82× -  -  -  -  -82× -  -  -  -82× -  -  -82× -  -  -82× -  -82× -82× -82× -10× -10× -10× -  -  -  -49× -49× -84× -  -84× -  -82× -  -  -82× -  -82× -  -82× -  -  -  -  -  -  -49× -276927× -  -276927× -37× -37× -10× -10× -  -  -  -276927× -  -  -  -49× -41× -41× -  -  -49× - -  -  -49× -276968× -276968× -  -276968× -67× -67× -276901× -276883× - - -276882× - - -  -276881× -276881× -23× -23× -  -  -276881× -  -  -  -276881× -  -276875× -108× -108× -  -  -276767× -276767× -  -276767× -  -  -  -276881× -  -18× - -  -  -276966× -  -  -  -  -  -  -  -  -  -49× -276966× -  -  -  -49× - - - - -  -  -  -49× -49× - -  -  -  - - - - - - - -  - -  -  -49× -554235× -  -553951× -  -553860× -  -421× -  -  -553439× -  -  -  -  -  -2087× -  -  -2087× -1711× -1697× -1697× -  -14× -  -  -  -376× -  -  -  -49× -277657× -277657× -277657× -  -277657× -  -  -  -  -277657× - - - -  -  -277651× -  -  -277651× -279× -279× -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -277372× -277372× -  -  -277372× -277365× -277365× -  -  -  -  -277372× -556× -556× -  -  -277372× -276809× -276809× -276809× -  -276809× -  -276809× -276809× -  -  -  -  -277372× -  -277372× -277372× -  -277372× -276627× -276627× -  -  -277372× -  -  -  -277372× -  -  -277372× -  -277372× -  -277372× -  -  -49× -276968× -276968× -  -  -276968× -  -  -49× -67× -59× -14× -14× - - -  -  -59× -  -  -59× -  -  -  -  -  -49× -276722× -276722× -276722× -1123× -1123× -1123× -  -  -  -49× -1123× -1123× -1123× -  -  -  -  -  -  -  -  -49× -276881× -225× -225× -  -  -  -49× -225× -225× -275597× -275597× -275597× -  -275571× -  -225× -  -  -  -  -  -  -49× -  -  -  -49× -38× -38× -  -38× -  -37× -37× -  - - -  -  -  -  -38× -38× -  -38× -  -38× -38× -  -38× -49× -25× -25× -24× -  -  -  -49× -12× -12× -  -  -  -  -  -  -38× -38× -  -38× -49× -24× -  -24× -24× -24× -24× -24× -24× -24× -24× -  -24× -  -  -  -  -  -  -24× -  -  -38× -49× -395× -395× -395× -  -  -  -  -264× -263× -263× -  -264× -  -  -  -  -  -49× - - - - -  -  -  -38× -  -  -49× -  -  -  -38× -49× - - - -  -38× -  -49× -11× -11× -  -  -  -38× -  -  -38× -12× -12× -  -  -38× -  -  -49× -38× -265× -265× -265× -265× -263× -263× -  -  -  -  -49× -27× -  -  -27× -  -  -24× -  -24× -  -24× -  -  -24× -24× -24× -24× -24× -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -49× -226× -  -  -  -226× -36× -  -  -226× -38× -38× -28× -28× -28× -28× -25× - - -  -  -  -  -226× -  -49× -  -49× -25× -25× -  -  -  -  -49× -57× -57× -56× -56× -56× -  -57× -  -  -49× -56× -42× -42× -  -  -  -49× -42× -38× -38× -  -  -42× -42× -42× -42× -  -  -49× -272× -272× -270× -270× -270× -  -272× -  -  -49× -1428× -1428× -1428× -345× -395× -  -  -  -  -  -  -  -49× - - -  - - - - -  -  -  -  - -  -  - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - -16× -  -  -  -  -  -  -  -  -  - - - -  -  -  -  - -  -  -  -  -  -  -  - -  -  -  -49× -  -  -  -49× -757× -757× -757× -757× -757× -  -  -757× -  -753× -  -280× -280× -  -  -434× -  -  -114× -114× -114× -320× -  -264× -  -  -  -56× -  -56× -56× -186× -186× -  -186× -  -186× -  -186× -  -  -  -  -753× -  -  -49× -316× -  -  -  -316× -  -316× -314× -314× -  -  -  -49× -  -314× -54× -54× -54× -  -  -  -49× - - -  -  -  -49× - - -  -  - 
    'use strict';
    - 
    -module.exports = Readable;
    - 
    -/*<replacement>*/
    -var processNextTick = require('process-nextick-args');
    -/*</replacement>*/
    - 
    -/*<replacement>*/
    -var isArray = require('isarray');
    -/*</replacement>*/
    - 
    -Readable.ReadableState = ReadableState;
    - 
    -/*<replacement>*/
    -var EE = require('events').EventEmitter;
    - 
    -var EElistenerCount = function (emitter, type) {
    -  return emitter.listeners(type).length;
    -};
    -/*</replacement>*/
    - 
    -/*<replacement>*/
    -var Stream;
    -(function () {
    -  try {
    -    Stream = require('st' + 'ream');
    -  } catch (_) {} finally {
    -    Iif (!Stream) Stream = require('events').EventEmitter;
    -  }
    -})();
    -/*</replacement>*/
    - 
    -var Buffer = require('buffer').Buffer;
    -/*<replacement>*/
    -var bufferShim = require('buffer-shims');
    -/*</replacement>*/
    - 
    -/*<replacement>*/
    -var util = require('core-util-is');
    -util.inherits = require('inherits');
    -/*</replacement>*/
    - 
    -/*<replacement>*/
    -var debugUtil = require('util');
    -var debug = void 0;
    -Eif (debugUtil && debugUtil.debuglog) {
    -  debug = debugUtil.debuglog('stream');
    -} else {
    -  debug = function () {};
    -}
    -/*</replacement>*/
    - 
    -var StringDecoder;
    - 
    -util.inherits(Readable, Stream);
    - 
    -var hasPrependListener = typeof EE.prototype.prependListener === 'function';
    - 
    -function prependListener(emitter, event, fn) {
    -  Iif (hasPrependListener) return emitter.prependListener(event, fn);
    - 
    -  // This is a brutally ugly 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 Iif (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
    -}
    - 
    -var Duplex;
    -function ReadableState(options, stream) {
    -  Duplex = Duplex || require('./_stream_duplex');
    - 
    -  options = options || {};
    - 
    -  // 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 (stream instanceof Duplex) 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 defaultHwm = this.objectMode ? 16 : 16 * 1024;
    -  this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
    - 
    -  // cast to ints.
    -  this.highWaterMark = ~ ~this.highWaterMark;
    - 
    -  this.buffer = [];
    -  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 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;
    - 
    -  // 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;
    - 
    -  // 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';
    - 
    -  // when piping, we only care about 'readable' events that happen
    -  // after read()ing all the bytes and not getting any pushback.
    -  this.ranOut = false;
    - 
    -  // 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;
    -  }
    -}
    - 
    -var Duplex;
    -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 && typeof options.read === 'function') this._read = options.read;
    - 
    -  Stream.call(this);
    -}
    - 
    -// 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;
    - 
    -  if (!state.objectMode && typeof chunk === 'string') {
    -    encoding = encoding || state.defaultEncoding;
    -    if (encoding !== state.encoding) {
    -      chunk = bufferShim.from(chunk, encoding);
    -      encoding = '';
    -    }
    -  }
    - 
    -  return readableAddChunk(this, state, chunk, encoding, false);
    -};
    - 
    -// Unshift should *always* be something directly out of read()
    -Readable.prototype.unshift = function (chunk) {
    -  var state = this._readableState;
    -  return readableAddChunk(this, state, chunk, '', true);
    -};
    - 
    -Readable.prototype.isPaused = function () {
    -  return this._readableState.flowing === false;
    -};
    - 
    -function readableAddChunk(stream, state, chunk, encoding, addToFront) {
    -  var er = chunkInvalid(state, chunk);
    -  Iif (er) {
    -    stream.emit('error', er);
    -  } else if (chunk === null) {
    -    state.reading = false;
    -    onEofChunk(stream, state);
    -  } else if (state.objectMode || chunk && chunk.length > 0) {
    -    if (state.ended && !addToFront) {
    -      var e = new Error('stream.push() after EOF');
    -      stream.emit('error', e);
    -    } else if (state.endEmitted && addToFront) {
    -      var _e = new Error('stream.unshift() after end event');
    -      stream.emit('error', _e);
    -    } else {
    -      var skipAdd;
    -      if (state.decoder && !addToFront && !encoding) {
    -        chunk = state.decoder.write(chunk);
    -        skipAdd = !state.objectMode && chunk.length === 0;
    -      }
    - 
    -      if (!addToFront) state.reading = false;
    - 
    -      // Don't add to the buffer if we've decoded to an empty string chunk and
    -      // we're not in object mode
    -      if (!skipAdd) {
    -        // if we want the data now, just emit it.
    -        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);
    -    }
    -  } else if (!addToFront) {
    -    state.reading = false;
    -  }
    - 
    -  return needMoreData(state);
    -}
    - 
    -// 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);
    -}
    - 
    -// 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) {
    -  Iif (n >= MAX_HWM) {
    -    n = MAX_HWM;
    -  } else {
    -    // Get the next highest power of 2
    -    n--;
    -    n |= n >>> 1;
    -    n |= n >>> 2;
    -    n |= n >>> 4;
    -    n |= n >>> 8;
    -    n |= n >>> 16;
    -    n++;
    -  }
    -  return n;
    -}
    - 
    -function howMuchToRead(n, state) {
    -  if (state.length === 0 && state.ended) return 0;
    - 
    -  if (state.objectMode) return n === 0 ? 0 : 1;
    - 
    -  if (n === null || isNaN(n)) {
    -    // only flow one buffer at a time
    -    if (state.flowing && state.buffer.length) return state.buffer[0].length;else return state.length;
    -  }
    - 
    -  if (n <= 0) return 0;
    - 
    -  // If we're asking for more than the target buffer level,
    -  // then raise the water mark.  Bump up to the next highest
    -  // power of 2, to prevent increasing it excessively in tiny
    -  // amounts.
    -  if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
    - 
    -  // don't have that much.  return null, unless we've ended.
    -  if (n > state.length) {
    -    if (!state.ended) {
    -      state.needReadable = true;
    -      return 0;
    -    } else {
    -      return state.length;
    -    }
    -  }
    - 
    -  return n;
    -}
    - 
    -// you can override either this method, or the async _read(n) below.
    -Readable.prototype.read = function (n) {
    -  debug('read', n);
    -  var state = this._readableState;
    -  var nOrig = n;
    - 
    -  if (typeof n !== 'number' || 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);
    -  }
    - 
    -  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 (doRead && !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;
    -  }
    - 
    -  state.length -= n;
    - 
    -  // If we have nothing in the buffer, then we want to know
    -  // as soon as we *do* get something into the buffer.
    -  if (state.length === 0 && !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 && state.length === 0) endReadable(this);
    - 
    -  if (ret !== null) this.emit('data', ret);
    - 
    -  return ret;
    -};
    - 
    -function chunkInvalid(state, chunk) {
    -  var er = null;
    -  Iif (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {
    -    er = new TypeError('Invalid non-string/buffer chunk');
    -  }
    -  return er;
    -}
    - 
    -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) processNextTick(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;
    -    processNextTick(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('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 : cleanup;
    -  if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn);
    - 
    -  dest.on('unpipe', onunpipe);
    -  function onunpipe(readable) {
    -    debug('onunpipe');
    -    if (readable === src) {
    -      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', cleanup);
    -    src.removeListener('data', ondata);
    - 
    -    cleanedUp = true;
    - 
    -    // if the reader is waiting for a drain event from this
    -    // specific writer, then it would cause it to never start
    -    // flowing again.
    -    // 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();
    -  }
    - 
    -  src.on('data', ondata);
    -  function ondata(chunk) {
    -    debug('ondata');
    -    var ret = dest.write(chunk);
    -    if (false === ret) {
    -      // 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++;
    -      }
    -      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;
    - 
    -  // if we're not piping anywhere, then do nothing.
    -  if (state.pipesCount === 0) return this;
    - 
    -  // just one destination.  most common case.
    -  Eif (state.pipesCount === 1) {
    -    // passed in one, but it's not the right one.
    -    Iif (dest && dest !== state.pipes) return this;
    - 
    -    Iif (!dest) dest = state.pipes;
    - 
    -    // got a match.
    -    state.pipes = null;
    -    state.pipesCount = 0;
    -    state.flowing = false;
    -    Eif (dest) dest.emit('unpipe', this);
    -    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);
    -    }return this;
    -  }
    - 
    -  // try to find the right one.
    -  var i = indexOf(state.pipes, dest);
    -  if (i === -1) return this;
    - 
    -  state.pipes.splice(i, 1);
    -  state.pipesCount -= 1;
    -  if (state.pipesCount === 1) state.pipes = state.pipes[0];
    - 
    -  dest.emit('unpipe', this);
    - 
    -  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 listening to data, and it has not explicitly been paused,
    -  // then call resume to start the flow of data on the next tick.
    -  if (ev === 'data' && false !== this._readableState.flowing) {
    -    this.resume();
    -  }
    - 
    -  if (ev === 'readable' && !this._readableState.endEmitted) {
    -    var state = this._readableState;
    -    if (!state.readableListening) {
    -      state.readableListening = true;
    -      state.emittedReadable = false;
    -      state.needReadable = true;
    -      if (!state.reading) {
    -        processNextTick(nReadingNextTick, this);
    -      } else if (state.length) {
    -        emitReadable(this, state);
    -      }
    -    }
    -  }
    - 
    -  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;
    -    processNextTick(resume_, stream, state);
    -  }
    -}
    - 
    -function resume_(stream, state) {
    -  if (!state.reading) {
    -    debug('resume read 0');
    -    stream.read(0);
    -  }
    - 
    -  state.resumeScheduled = false;
    -  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);
    -  if (state.flowing) {
    -    do {
    -      var chunk = stream.read();
    -    } while (null !== chunk && state.flowing);
    -  }
    -}
    - 
    -// 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 state = this._readableState;
    -  var paused = false;
    - 
    -  var self = this;
    -  stream.on('end', function () {
    -    debug('wrapped end');
    -    Iif (state.decoder && !state.ended) {
    -      var chunk = state.decoder.end();
    -      if (chunk && chunk.length) self.push(chunk);
    -    }
    - 
    -    self.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 = self.push(chunk);
    -    if (!ret) {
    -      paused = true;
    -      stream.pause();
    -    }
    -  });
    - 
    -  // proxy all the other methods.
    -  // important when wrapping filters and duplexes.
    -  for (var i in stream) {
    -    Iif (this[i] === undefined && typeof stream[i] === 'function') {
    -      this[i] = function (method) {
    -        return function () {
    -          return stream[method].apply(stream, arguments);
    -        };
    -      }(i);
    -    }
    -  }
    - 
    -  // proxy certain important events.
    -  var events = ['error', 'close', 'destroy', 'pause', 'resume'];
    -  forEach(events, function (ev) {
    -    stream.on(ev, self.emit.bind(self, ev));
    -  });
    - 
    -  // when we try to consume some more bytes, simply unpause the
    -  // underlying stream.
    -  self._read = function (n) {
    -    debug('wrapped _read', n);
    -    if (paused) {
    -      paused = false;
    -      stream.resume();
    -    }
    -  };
    - 
    -  return self;
    -};
    - 
    -// 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.
    -function fromList(n, state) {
    -  var list = state.buffer;
    -  var length = state.length;
    -  var stringMode = !!state.decoder;
    -  var objectMode = !!state.objectMode;
    -  var ret;
    - 
    -  // nothing in the list, definitely empty.
    -  if (list.length === 0) return null;
    - 
    -  Iif (length === 0) ret = null;else if (objectMode) ret = list.shift();else if (!n || n >= length) {
    -    // read it all, truncate the array.
    -    if (stringMode) ret = list.join('');else if (list.length === 1) ret = list[0];else ret = Buffer.concat(list, length);
    -    list.length = 0;
    -  } else {
    -    // read just some of it.
    -    if (n < list[0].length) {
    -      // just take a part of the first list item.
    -      // slice is the same for buffers and strings.
    -      var buf = list[0];
    -      ret = buf.slice(0, n);
    -      list[0] = buf.slice(n);
    -    } else if (n === list[0].length) {
    -      // first list is a perfect match
    -      ret = list.shift();
    -    } else {
    -      // complex case.
    -      // we have enough to cover it, but it spans past the first buffer.
    -      if (stringMode) ret = '';else ret = bufferShim.allocUnsafe(n);
    - 
    -      var c = 0;
    -      for (var i = 0, l = list.length; i < l && c < n; i++) {
    -        var _buf = list[0];
    -        var cpy = Math.min(n - c, _buf.length);
    - 
    -        if (stringMode) ret += _buf.slice(0, cpy);else _buf.copy(ret, c, 0, cpy);
    - 
    -        if (cpy < _buf.length) list[0] = _buf.slice(cpy);else list.shift();
    - 
    -        c += cpy;
    -      }
    -    }
    -  }
    - 
    -  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.
    -  Iif (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
    - 
    -  if (!state.endEmitted) {
    -    state.ended = true;
    -    processNextTick(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 forEach(xs, f) {
    -  for (var i = 0, l = xs.length; i < l; i++) {
    -    f(xs[i], i);
    -  }
    -}
    - 
    -function indexOf(xs, x) {
    -  for (var i = 0, l = xs.length; i < l; i++) {
    -    if (xs[i] === x) return i;
    -  }
    -  return -1;
    -}
    -
    -
    - - - - - - - diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_transform.js.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_transform.js.html deleted file mode 100644 index 3542da4f637927..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_transform.js.html +++ /dev/null @@ -1,602 +0,0 @@ - - - - Code coverage report for lib/_stream_transform.js - - - - - - - -
    -
    -

    - all files / lib/ _stream_transform.js -

    -
    -
    - 92.11% - Statements - 70/76 -
    -
    - 84.21% - Branches - 32/38 -
    -
    - 90.91% - Functions - 10/11 -
    -
    - 98.48% - Lines - 65/66 -
    -
    -
    -
    -
    
    -
    -
    1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155 -156 -157 -158 -159 -160 -161 -162 -163 -164 -165 -166 -167 -168 -169 -170 -171 -172 -173 -174 -175 -176 -177 -178 -179 -180  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -49× -  -49× -  -  -49× -49× -  -  -49× -  -49× -24× -116× -  -  -24× -24× -24× -24× -24× -  -  -49× -116× -116× -  -116× -  -116× -  -116× -116× -  -116× -  -116× -  -116× -116× -116× -113× -  -  -  -49× -24× -  -24× -  -24× -  -  -24× -  -  -24× -  -  -  -  -24× -  -24× -13× -  -13× -  -  -24× -19× - -17× -  -  -  -49× -127× -127× -  -  -  -  -  -  -  -  -  -  -  -  -49× -  -  -  -49× -117× -117× -117× -117× -117× -117× -117× -  -  -  -  -  -  -49× -310× -  -310× -116× -116× -  -  -  -194× -  -  -  -49× -19× -  -  -  -19× -19× -  -19× -  -19× -  -19× - 
    // 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');
    - 
    -/*<replacement>*/
    -var util = require('core-util-is');
    -util.inherits = require('inherits');
    -/*</replacement>*/
    - 
    -util.inherits(Transform, Duplex);
    - 
    -function TransformState(stream) {
    -  this.afterTransform = function (er, data) {
    -    return afterTransform(stream, er, data);
    -  };
    - 
    -  this.needTransform = false;
    -  this.transforming = false;
    -  this.writecb = null;
    -  this.writechunk = null;
    -  this.writeencoding = null;
    -}
    - 
    -function afterTransform(stream, er, data) {
    -  var ts = stream._transformState;
    -  ts.transforming = false;
    - 
    -  var cb = ts.writecb;
    - 
    -  Iif (!cb) return stream.emit('error', new Error('no writecb in Transform class'));
    - 
    -  ts.writechunk = null;
    -  ts.writecb = null;
    - 
    -  if (data !== null && data !== undefined) stream.push(data);
    - 
    -  cb(er);
    - 
    -  var rs = stream._readableState;
    -  rs.reading = false;
    -  if (rs.needReadable || rs.length < rs.highWaterMark) {
    -    stream._read(rs.highWaterMark);
    -  }
    -}
    - 
    -function Transform(options) {
    -  Iif (!(this instanceof Transform)) return new Transform(options);
    - 
    -  Duplex.call(this, options);
    - 
    -  this._transformState = new TransformState(this);
    - 
    -  // when the writable side finishes, then flush out anything remaining.
    -  var stream = this;
    - 
    -  // 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;
    -  }
    - 
    -  this.once('prefinish', function () {
    -    if (typeof this._flush === 'function') this._flush(function (er) {
    -      done(stream, er);
    -    });else done(stream);
    -  });
    -}
    - 
    -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('Not implemented');
    -};
    - 
    -Transform.prototype._write = function (chunk, encoding, cb) {
    -  var ts = this._transformState;
    -  ts.writecb = cb;
    -  ts.writechunk = chunk;
    -  ts.writeencoding = encoding;
    -  Eif (!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;
    -  }
    -};
    - 
    -function done(stream, er) {
    -  Iif (er) return stream.emit('error', er);
    - 
    -  // if there's nothing in the write buffer, then that means
    -  // that nothing more will ever be provided
    -  var ws = stream._writableState;
    -  var ts = stream._transformState;
    - 
    -  Iif (ws.length) throw new Error('Calling transform done when ws.length != 0');
    - 
    -  Iif (ts.transforming) throw new Error('Calling transform done when still transforming');
    - 
    -  return stream.push(null);
    -}
    -
    -
    - - - - - - - diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_writable.js.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_writable.js.html deleted file mode 100644 index 0b200c9e09744b..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_writable.js.html +++ /dev/null @@ -1,1640 +0,0 @@ - - - - Code coverage report for lib/_stream_writable.js - - - - - - - -
    -
    -

    - all files / lib/ _stream_writable.js -

    -
    -
    - 95.52% - Statements - 277/290 -
    -
    - 94% - Branches - 141/150 -
    -
    - 90.91% - Functions - 30/33 -
    -
    - 96.58% - Lines - 254/263 -
    -
    -
    -
    -
    
    -
    -
    1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155 -156 -157 -158 -159 -160 -161 -162 -163 -164 -165 -166 -167 -168 -169 -170 -171 -172 -173 -174 -175 -176 -177 -178 -179 -180 -181 -182 -183 -184 -185 -186 -187 -188 -189 -190 -191 -192 -193 -194 -195 -196 -197 -198 -199 -200 -201 -202 -203 -204 -205 -206 -207 -208 -209 -210 -211 -212 -213 -214 -215 -216 -217 -218 -219 -220 -221 -222 -223 -224 -225 -226 -227 -228 -229 -230 -231 -232 -233 -234 -235 -236 -237 -238 -239 -240 -241 -242 -243 -244 -245 -246 -247 -248 -249 -250 -251 -252 -253 -254 -255 -256 -257 -258 -259 -260 -261 -262 -263 -264 -265 -266 -267 -268 -269 -270 -271 -272 -273 -274 -275 -276 -277 -278 -279 -280 -281 -282 -283 -284 -285 -286 -287 -288 -289 -290 -291 -292 -293 -294 -295 -296 -297 -298 -299 -300 -301 -302 -303 -304 -305 -306 -307 -308 -309 -310 -311 -312 -313 -314 -315 -316 -317 -318 -319 -320 -321 -322 -323 -324 -325 -326 -327 -328 -329 -330 -331 -332 -333 -334 -335 -336 -337 -338 -339 -340 -341 -342 -343 -344 -345 -346 -347 -348 -349 -350 -351 -352 -353 -354 -355 -356 -357 -358 -359 -360 -361 -362 -363 -364 -365 -366 -367 -368 -369 -370 -371 -372 -373 -374 -375 -376 -377 -378 -379 -380 -381 -382 -383 -384 -385 -386 -387 -388 -389 -390 -391 -392 -393 -394 -395 -396 -397 -398 -399 -400 -401 -402 -403 -404 -405 -406 -407 -408 -409 -410 -411 -412 -413 -414 -415 -416 -417 -418 -419 -420 -421 -422 -423 -424 -425 -426 -427 -428 -429 -430 -431 -432 -433 -434 -435 -436 -437 -438 -439 -440 -441 -442 -443 -444 -445 -446 -447 -448 -449 -450 -451 -452 -453 -454 -455 -456 -457 -458 -459 -460 -461 -462 -463 -464 -465 -466 -467 -468 -469 -470 -471 -472 -473 -474 -475 -476 -477 -478 -479 -480 -481 -482 -483 -484 -485 -486 -487 -488 -489 -490 -491 -492 -493 -494 -495 -496 -497 -498 -499 -500 -501 -502 -503 -504 -505 -506 -507 -508 -509 -510 -511 -512 -513 -514 -515 -516 -517 -518 -519 -520 -521 -522 -523 -524 -525 -526  -  -  -  -  -  -49× -  -  -49× -  -  -  -49× -  -  -49× -  -  -49× -49× -  -  -  -49× -  -  -  -  -  -49× -49× -49× -49× -  -49× -  -  -  -  -49× -  -49× -  -  -49× -  -49× -  -49× -2305× -2305× -2305× -2305× -  -  -49× -49× -96× -  -96× -  -  -  -96× -  -96× -  -  -  -  -96× -96× -96× -  -  -96× -  -96× -  -96× -  -96× -  -96× -  -  -  -  -96× -96× -  -  -  -  -96× -  -  -  -  -96× -  -  -96× -  -  -96× -  -  -  -  -  -96× -  -  -  -  -96× -  -  -96× -4574× -  -  -  -96× -  -  -96× -  -96× -96× -  -  -  -96× -  -  -  -96× -  -  -96× -  -  -96× -  -  -  -96× -  -  -49× - - - - - -  - -  -  -49× -49× -49× -  -  -  -  -  -  -  -49× -49× -97× -  -  -  -97× -  -96× -  -  -96× -  -96× -50× -  -50× -  -  -96× -  -  -  -49× - -  -  -49× - -  - - -  -  -  -  -  -  -  -49× -4625× -4625× -  -  -  -4625× - -4623× - -  -4625× - - - -  -4623× -  -  -49× -4626× -4626× -  -4626× -59× -59× -  -  -4626× -  -4626× -  -4626× -4621× -4621× -  -  -4624× -  -  -49× -13× -  -13× -  -  -49× -13× -  -13× -13× -  -13× -  -  -  -49× -  - - - - -  -  -49× -4621× -2273× -  -4621× -  -  -  -  -  -49× -4621× -  -4621× -4621× -  -4621× -  -4621× -  -4621× -  -4621× -2305× -2305× -2305× -2265× -  -40× -  -2305× -  -2316× -  -  -4621× -  -  -49× -4582× -4582× -4582× -4582× -4582× -4582× -  -  -49× -  -  -  -  -  -  -  -49× -4574× -4574× -4574× -4574× -  -  -49× -4574× -4574× -4574× -  -4574× -  -4574× -  -4574× -  -4574× -2254× -  -  -4574× -  -2230× -  -  -2344× -  -  -  -  -49× -4574× -4574× -4574× -4574× -  -  -  -  -  -49× -4557× -27× -27× -  -  -  -  -49× -2263× -2263× -  -2263× -  - - - - -  - - -42× -42× -42× -  -  - -  -  -  - - - -  -  -  - -  -  -  -2254× -2257× -2257× -2257× -2257× -  -2257× -2257× -  -  -  -  -2257× -2252× -  -  -  -2254× -  -  -2263× -2263× -2263× -  -  -49× -  -  -  -49× -  -49× -65× -  -65× -11× -11× -11× -54× - - -  -  -65× -  -  -65× - - -  -  -  -65× -  -  -49× -9209× -  -  -49× -125× -57× -57× -  -  -  -49× -4635× -4635× -125× -57× -57× -57× -  -68× -  -  -4635× -  -  -49× -61× -61× -61× -13× -  -61× -61× -  -  -  -  -49× -105× -  -105× -105× -  -105× - - - -40× -40× -40× -40× -  - - -  -  -  -  - 
    // 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';
    - 
    -module.exports = Writable;
    - 
    -/*<replacement>*/
    -var processNextTick = require('process-nextick-args');
    -/*</replacement>*/
    - 
    -/*<replacement>*/
    -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick;
    -/*</replacement>*/
    - 
    -Writable.WritableState = WritableState;
    - 
    -/*<replacement>*/
    -var util = require('core-util-is');
    -util.inherits = require('inherits');
    -/*</replacement>*/
    - 
    -/*<replacement>*/
    -var internalUtil = {
    -  deprecate: require('util-deprecate')
    -};
    -/*</replacement>*/
    - 
    -/*<replacement>*/
    -var Stream;
    -(function () {
    -  try {
    -    Stream = require('st' + 'ream');
    -  } catch (_) {} finally {
    -    Iif (!Stream) Stream = require('events').EventEmitter;
    -  }
    -})();
    -/*</replacement>*/
    - 
    -var Buffer = require('buffer').Buffer;
    -/*<replacement>*/
    -var bufferShim = require('buffer-shims');
    -/*</replacement>*/
    - 
    -util.inherits(Writable, Stream);
    - 
    -function nop() {}
    - 
    -function WriteReq(chunk, encoding, cb) {
    -  this.chunk = chunk;
    -  this.encoding = encoding;
    -  this.callback = cb;
    -  this.next = null;
    -}
    - 
    -var Duplex;
    -function WritableState(options, stream) {
    -  Duplex = Duplex || require('./_stream_duplex');
    - 
    -  options = options || {};
    - 
    -  // object stream flag to indicate whether or not this stream
    -  // contains buffers or objects.
    -  this.objectMode = !!options.objectMode;
    - 
    -  if (stream instanceof Duplex) 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 defaultHwm = this.objectMode ? 16 : 16 * 1024;
    -  this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
    - 
    -  // cast to ints.
    -  this.highWaterMark = ~ ~this.highWaterMark;
    - 
    -  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;
    - 
    -  // 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 writableStateGetBuffer() {
    -  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.')
    -    });
    -  } catch (_) {}
    -})();
    - 
    -var Duplex;
    -function Writable(options) {
    -  Duplex = Duplex || require('./_stream_duplex');
    - 
    -  // Writable ctor is applied to Duplexes, though they're not
    -  // instanceof Writable, they're instanceof Readable.
    -  if (!(this instanceof Writable) && !(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;
    -  }
    - 
    -  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);
    -  processNextTick(cb, er);
    -}
    - 
    -// If we get something that is not a buffer, string, null, or undefined,
    -// and we're not in objectMode, then that's an error.
    -// Otherwise stream chunks are all considered to be of length=1, and the
    -// watermarks determine how many objects to keep in the buffer, rather than
    -// how many bytes or characters.
    -function validChunk(stream, state, chunk, cb) {
    -  var valid = true;
    -  var er = false;
    -  // Always throw error if a null is written
    -  // if we are not in object mode then throw
    -  // if it is not a buffer, string, or undefined.
    -  if (chunk === null) {
    -    er = new TypeError('May not write null values to stream');
    -  } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
    -    er = new TypeError('Invalid non-string/buffer chunk');
    -  }
    -  if (er) {
    -    stream.emit('error', er);
    -    processNextTick(cb, er);
    -    valid = false;
    -  }
    -  return valid;
    -}
    - 
    -Writable.prototype.write = function (chunk, encoding, cb) {
    -  var state = this._writableState;
    -  var ret = false;
    - 
    -  if (typeof encoding === 'function') {
    -    cb = encoding;
    -    encoding = null;
    -  }
    - 
    -  if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
    - 
    -  if (typeof cb !== 'function') cb = nop;
    - 
    -  if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) {
    -    state.pendingcb++;
    -    ret = writeOrBuffer(this, state, chunk, encoding, cb);
    -  }
    - 
    -  return ret;
    -};
    - 
    -Writable.prototype.cork = function () {
    -  var state = this._writableState;
    - 
    -  state.corked++;
    -};
    - 
    -Writable.prototype.uncork = function () {
    -  var state = this._writableState;
    - 
    -  Eif (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 = bufferShim.from(chunk, encoding);
    -  }
    -  return chunk;
    -}
    - 
    -// 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, chunk, encoding, cb) {
    -  chunk = decodeChunk(state, chunk, encoding);
    - 
    -  if (Buffer.isBuffer(chunk)) encoding = 'buffer';
    -  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 = new WriteReq(chunk, encoding, cb);
    -    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) processNextTick(cb, er);else cb(er);
    - 
    -  stream._writableState.errorEmitted = true;
    -  stream.emit('error', er);
    -}
    - 
    -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);
    - 
    -  Iif (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) {
    -      /*<replacement>*/
    -      asyncWrite(afterWrite, stream, state, finished, cb);
    -      /*</replacement>*/
    -    } 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;
    -    while (entry) {
    -      buffer[count] = entry;
    -      entry = entry.next;
    -      count += 1;
    -    }
    - 
    -    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;
    -    Iif (holder.next) {
    -      state.corkedRequestsFree = holder.next;
    -      holder.next = null;
    -    } else {
    -      state.corkedRequestsFree = new CorkedRequest(state);
    -    }
    -  } 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;
    -      // 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.bufferedRequestCount = 0;
    -  state.bufferedRequest = entry;
    -  state.bufferProcessing = false;
    -}
    - 
    -Writable.prototype._write = function (chunk, encoding, cb) {
    -  cb(new Error('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 prefinish(stream, state) {
    -  if (!state.prefinished) {
    -    state.prefinished = true;
    -    stream.emit('prefinish');
    -  }
    -}
    - 
    -function finishMaybe(stream, state) {
    -  var need = needFinish(state);
    -  if (need) {
    -    if (state.pendingcb === 0) {
    -      prefinish(stream, state);
    -      state.finished = true;
    -      stream.emit('finish');
    -    } else {
    -      prefinish(stream, state);
    -    }
    -  }
    -  return need;
    -}
    - 
    -function endWritable(stream, state, cb) {
    -  state.ending = true;
    -  finishMaybe(stream, state);
    -  if (cb) {
    -    if (state.finished) processNextTick(cb);else stream.once('finish', cb);
    -  }
    -  state.ended = true;
    -  stream.writable = false;
    -}
    - 
    -// 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 (err) {
    -    var entry = _this.entry;
    -    _this.entry = null;
    -    while (entry) {
    -      var cb = entry.callback;
    -      state.pendingcb--;
    -      cb(err);
    -      entry = entry.next;
    -    }
    -    Eif (state.corkedRequestsFree) {
    -      state.corkedRequestsFree.next = _this;
    -    } else {
    -      state.corkedRequestsFree = _this;
    -    }
    -  };
    -}
    -
    -
    - - - - - - - diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/index.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/index.html deleted file mode 100644 index 5240d877ea3b9e..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/index.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - Code coverage report for lib/ - - - - - - - -
    -
    -

    - all files lib/ -

    -
    -
    - 90.63% - Statements - 851/939 -
    -
    - 87.94% - Branches - 496/564 -
    -
    - 86.54% - Functions - 90/104 -
    -
    - 92.73% - Lines - 765/825 -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FileStatementsBranchesFunctionsLines
    _stream_duplex.js
    69.23%27/3968.18%15/2240%2/575.76%25/33
    _stream_passthrough.js
    90.91%10/1150%1/2100%2/2100%10/10
    _stream_readable.js
    89.29%467/52387.22%307/35286.79%46/5390.73%411/453
    _stream_transform.js
    92.11%70/7684.21%32/3890.91%10/1198.48%65/66
    _stream_writable.js
    95.52%277/29094%141/15090.91%30/3396.58%254/263
    -
    -
    - - - - - - - diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/prettify.css b/deps/npm/node_modules/readable-stream/coverage/lcov-report/prettify.css deleted file mode 100644 index b317a7cda31a44..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/prettify.css +++ /dev/null @@ -1 +0,0 @@ -.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/prettify.js b/deps/npm/node_modules/readable-stream/coverage/lcov-report/prettify.js deleted file mode 100644 index ef51e03866898f..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/prettify.js +++ /dev/null @@ -1 +0,0 @@ -window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/sort-arrow-sprite.png b/deps/npm/node_modules/readable-stream/coverage/lcov-report/sort-arrow-sprite.png deleted file mode 100644 index 03f704a609c6fd..00000000000000 Binary files a/deps/npm/node_modules/readable-stream/coverage/lcov-report/sort-arrow-sprite.png and /dev/null differ diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/sorter.js b/deps/npm/node_modules/readable-stream/coverage/lcov-report/sorter.js deleted file mode 100644 index 6c5034e403c709..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov-report/sorter.js +++ /dev/null @@ -1,158 +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'); } - // 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) { - // add the click event handler on the th so users - // dont have to click on those tiny arrows - el = getNthColumn(i).querySelector('.sorter').parentElement; - if (el.addEventListener) { - el.addEventListener('click', ithSorter(i)); - } else { - el.attachEvent('onclick', ithSorter(i)); - } - } - } - } - // adds sorting functionality to the UI - return function () { - if (!getTable()) { - return; - } - cols = loadColumns(); - loadData(cols); - addSortIndicators(); - enableUI(); - }; -})(); - -window.addEventListener('load', addSorting); diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov.info b/deps/npm/node_modules/readable-stream/coverage/lcov.info deleted file mode 100644 index d0012ea3cb9dac..00000000000000 --- a/deps/npm/node_modules/readable-stream/coverage/lcov.info +++ /dev/null @@ -1,1642 +0,0 @@ -TN: -SF:/Users/cmetcalf/projects/readable-stream/lib/_stream_readable.js -FN:18,(anonymous_1) -FN:25,(anonymous_2) -FN:50,(anonymous_3) -FN:60,prependListener -FN:72,ReadableState -FN:139,Readable -FN:158,(anonymous_7) -FN:173,(anonymous_8) -FN:178,(anonymous_9) -FN:182,readableAddChunk -FN:237,needMoreData -FN:242,(anonymous_12) -FN:251,computeNewHighWaterMark -FN:267,howMuchToRead -FN:299,(anonymous_15) -FN:399,chunkInvalid -FN:407,onEofChunk -FN:425,emitReadable -FN:435,emitReadable_ -FN:447,maybeReadMore -FN:454,maybeReadMore_ -FN:470,(anonymous_22) -FN:474,(anonymous_23) -FN:498,onunpipe -FN:505,onend -FN:518,cleanup -FN:541,ondata -FN:559,onerror -FN:570,onclose -FN:575,onfinish -FN:582,unpipe -FN:599,pipeOnDrain -FN:600,(anonymous_33) -FN:611,(anonymous_34) -FN:662,(anonymous_35) -FN:689,nReadingNextTick -FN:696,(anonymous_37) -FN:706,resume -FN:713,resume_ -FN:725,(anonymous_40) -FN:735,flow -FN:748,(anonymous_42) -FN:753,(anonymous_43) -FN:763,(anonymous_44) -FN:781,(anonymous_45) -FN:782,(anonymous_46) -FN:791,(anonymous_47) -FN:797,(anonymous_48) -FN:813,fromList -FN:860,endReadable -FN:873,endReadableNT -FN:882,forEach -FN:888,indexOf -FNF:53 -FNH:46 -FNDA:269,(anonymous_1) -FNDA:49,(anonymous_2) -FNDA:0,(anonymous_3) -FNDA:38,prependListener -FNDA:82,ReadableState -FNDA:84,Readable -FNDA:276927,(anonymous_7) -FNDA:41,(anonymous_8) -FNDA:4,(anonymous_9) -FNDA:276968,readableAddChunk -FNDA:276966,needMoreData -FNDA:5,(anonymous_12) -FNDA:4,computeNewHighWaterMark -FNDA:554235,howMuchToRead -FNDA:277657,(anonymous_15) -FNDA:276968,chunkInvalid -FNDA:67,onEofChunk -FNDA:276722,emitReadable -FNDA:1123,emitReadable_ -FNDA:276881,maybeReadMore -FNDA:225,maybeReadMore_ -FNDA:0,(anonymous_22) -FNDA:38,(anonymous_23) -FNDA:25,onunpipe -FNDA:12,onend -FNDA:24,cleanup -FNDA:395,ondata -FNDA:5,onerror -FNDA:0,onclose -FNDA:6,onfinish -FNDA:11,unpipe -FNDA:38,pipeOnDrain -FNDA:265,(anonymous_33) -FNDA:27,(anonymous_34) -FNDA:226,(anonymous_35) -FNDA:25,nReadingNextTick -FNDA:57,(anonymous_37) -FNDA:56,resume -FNDA:42,resume_ -FNDA:272,(anonymous_40) -FNDA:1428,flow -FNDA:1,(anonymous_42) -FNDA:1,(anonymous_43) -FNDA:0,(anonymous_44) -FNDA:0,(anonymous_45) -FNDA:0,(anonymous_46) -FNDA:5,(anonymous_47) -FNDA:0,(anonymous_48) -FNDA:757,fromList -FNDA:316,endReadable -FNDA:314,endReadableNT -FNDA:1,forEach -FNDA:2,indexOf -DA:3,49 -DA:6,49 -DA:10,49 -DA:13,49 -DA:16,49 -DA:18,49 -DA:19,269 -DA:24,49 -DA:25,49 -DA:26,49 -DA:27,49 -DA:29,49 -DA:34,49 -DA:36,49 -DA:40,49 -DA:41,49 -DA:45,49 -DA:46,49 -DA:47,49 -DA:48,49 -DA:50,0 -DA:54,49 -DA:56,49 -DA:58,49 -DA:60,49 -DA:61,38 -DA:68,38 -DA:71,49 -DA:72,49 -DA:73,82 -DA:75,82 -DA:79,82 -DA:81,82 -DA:85,82 -DA:86,82 -DA:87,82 -DA:90,82 -DA:92,82 -DA:93,82 -DA:94,82 -DA:95,82 -DA:96,82 -DA:97,82 -DA:98,82 -DA:99,82 -DA:105,82 -DA:109,82 -DA:110,82 -DA:111,82 -DA:112,82 -DA:117,82 -DA:121,82 -DA:124,82 -DA:127,82 -DA:129,82 -DA:130,82 -DA:131,82 -DA:132,10 -DA:133,10 -DA:134,10 -DA:138,49 -DA:139,49 -DA:140,84 -DA:142,84 -DA:144,82 -DA:147,82 -DA:149,82 -DA:151,82 -DA:158,49 -DA:159,276927 -DA:161,276927 -DA:162,37 -DA:163,37 -DA:164,10 -DA:165,10 -DA:169,276927 -DA:173,49 -DA:174,41 -DA:175,41 -DA:178,49 -DA:179,4 -DA:182,49 -DA:183,276968 -DA:184,276968 -DA:185,0 -DA:186,276968 -DA:187,67 -DA:188,67 -DA:189,276901 -DA:190,276883 -DA:191,1 -DA:192,1 -DA:193,276882 -DA:194,1 -DA:195,1 -DA:197,276881 -DA:198,276881 -DA:199,23 -DA:200,23 -DA:203,276881 -DA:207,276881 -DA:209,276875 -DA:210,108 -DA:211,108 -DA:214,276767 -DA:215,276767 -DA:217,276767 -DA:221,276881 -DA:223,18 -DA:224,9 -DA:227,276966 -DA:237,49 -DA:238,276966 -DA:242,49 -DA:243,5 -DA:244,5 -DA:245,5 -DA:246,5 -DA:250,49 -DA:251,49 -DA:252,4 -DA:253,0 -DA:256,4 -DA:257,4 -DA:258,4 -DA:259,4 -DA:260,4 -DA:261,4 -DA:262,4 -DA:264,4 -DA:267,49 -DA:268,554235 -DA:270,553951 -DA:272,553860 -DA:274,421 -DA:277,553439 -DA:283,2087 -DA:286,2087 -DA:287,1711 -DA:288,1697 -DA:289,1697 -DA:291,14 -DA:295,376 -DA:299,49 -DA:300,277657 -DA:301,277657 -DA:302,277657 -DA:304,277657 -DA:309,277657 -DA:310,6 -DA:311,6 -DA:312,6 -DA:315,277651 -DA:318,277651 -DA:319,279 -DA:320,279 -DA:346,277372 -DA:347,277372 -DA:350,277372 -DA:351,277365 -DA:352,277365 -DA:357,277372 -DA:358,556 -DA:359,556 -DA:362,277372 -DA:363,276809 -DA:364,276809 -DA:365,276809 -DA:367,276809 -DA:369,276809 -DA:370,276809 -DA:375,277372 -DA:377,277372 -DA:378,277372 -DA:380,277372 -DA:381,276627 -DA:382,276627 -DA:385,277372 -DA:389,277372 -DA:392,277372 -DA:394,277372 -DA:396,277372 -DA:399,49 -DA:400,276968 -DA:401,276968 -DA:402,0 -DA:404,276968 -DA:407,49 -DA:408,67 -DA:409,59 -DA:410,14 -DA:411,14 -DA:412,4 -DA:413,4 -DA:416,59 -DA:419,59 -DA:425,49 -DA:426,276722 -DA:427,276722 -DA:428,276722 -DA:429,1123 -DA:430,1123 -DA:431,1123 -DA:435,49 -DA:436,1123 -DA:437,1123 -DA:438,1123 -DA:447,49 -DA:448,276881 -DA:449,225 -DA:450,225 -DA:454,49 -DA:455,225 -DA:456,225 -DA:457,275597 -DA:458,275597 -DA:459,275597 -DA:461,275571 -DA:463,225 -DA:470,49 -DA:471,0 -DA:474,49 -DA:475,38 -DA:476,38 -DA:478,38 -DA:480,37 -DA:481,37 -DA:483,1 -DA:484,1 -DA:486,0 -DA:487,0 -DA:489,38 -DA:490,38 -DA:492,38 -DA:494,38 -DA:495,38 -DA:497,38 -DA:498,49 -DA:499,25 -DA:500,25 -DA:501,24 -DA:505,49 -DA:506,12 -DA:507,12 -DA:514,38 -DA:515,38 -DA:517,38 -DA:518,49 -DA:519,24 -DA:521,24 -DA:522,24 -DA:523,24 -DA:524,24 -DA:525,24 -DA:526,24 -DA:527,24 -DA:528,24 -DA:530,24 -DA:537,24 -DA:540,38 -DA:541,49 -DA:542,395 -DA:543,395 -DA:544,395 -DA:549,264 -DA:550,263 -DA:551,263 -DA:553,264 -DA:559,49 -DA:560,5 -DA:561,5 -DA:562,5 -DA:563,5 -DA:567,38 -DA:570,49 -DA:571,0 -DA:572,0 -DA:574,38 -DA:575,49 -DA:576,6 -DA:577,6 -DA:578,6 -DA:580,38 -DA:582,49 -DA:583,11 -DA:584,11 -DA:588,38 -DA:591,38 -DA:592,12 -DA:593,12 -DA:596,38 -DA:599,49 -DA:600,38 -DA:601,265 -DA:602,265 -DA:603,265 -DA:604,265 -DA:605,263 -DA:606,263 -DA:611,49 -DA:612,27 -DA:615,27 -DA:618,24 -DA:620,24 -DA:622,24 -DA:625,24 -DA:626,24 -DA:627,24 -DA:628,24 -DA:629,24 -DA:634,0 -DA:636,0 -DA:637,0 -DA:638,0 -DA:639,0 -DA:640,0 -DA:642,0 -DA:643,0 -DA:644,0 -DA:648,0 -DA:649,0 -DA:651,0 -DA:652,0 -DA:653,0 -DA:655,0 -DA:657,0 -DA:662,49 -DA:663,226 -DA:667,226 -DA:668,36 -DA:671,226 -DA:672,38 -DA:673,38 -DA:674,28 -DA:675,28 -DA:676,28 -DA:677,28 -DA:678,25 -DA:679,3 -DA:680,1 -DA:685,226 -DA:687,49 -DA:689,49 -DA:690,25 -DA:691,25 -DA:696,49 -DA:697,57 -DA:698,57 -DA:699,56 -DA:700,56 -DA:701,56 -DA:703,57 -DA:706,49 -DA:707,56 -DA:708,42 -DA:709,42 -DA:713,49 -DA:714,42 -DA:715,38 -DA:716,38 -DA:719,42 -DA:720,42 -DA:721,42 -DA:722,42 -DA:725,49 -DA:726,272 -DA:727,272 -DA:728,270 -DA:729,270 -DA:730,270 -DA:732,272 -DA:735,49 -DA:736,1428 -DA:737,1428 -DA:738,1428 -DA:739,345 -DA:740,395 -DA:748,49 -DA:749,1 -DA:750,1 -DA:752,1 -DA:753,1 -DA:754,1 -DA:755,1 -DA:756,0 -DA:757,0 -DA:760,1 -DA:763,1 -DA:764,0 -DA:765,0 -DA:768,0 -DA:770,0 -DA:771,0 -DA:772,0 -DA:773,0 -DA:779,1 -DA:780,16 -DA:781,0 -DA:782,0 -DA:783,0 -DA:790,1 -DA:791,1 -DA:792,5 -DA:797,1 -DA:798,0 -DA:799,0 -DA:800,0 -DA:801,0 -DA:805,1 -DA:809,49 -DA:813,49 -DA:814,757 -DA:815,757 -DA:816,757 -DA:817,757 -DA:818,757 -DA:821,757 -DA:823,753 -DA:825,280 -DA:826,280 -DA:829,434 -DA:832,114 -DA:833,114 -DA:834,114 -DA:835,320 -DA:837,264 -DA:841,56 -DA:843,56 -DA:844,56 -DA:845,186 -DA:846,186 -DA:848,186 -DA:850,186 -DA:852,186 -DA:857,753 -DA:860,49 -DA:861,316 -DA:865,316 -DA:867,316 -DA:868,314 -DA:869,314 -DA:873,49 -DA:875,314 -DA:876,54 -DA:877,54 -DA:878,54 -DA:882,49 -DA:883,1 -DA:884,5 -DA:888,49 -DA:889,2 -DA:890,3 -DA:892,0 -LF:453 -LH:411 -BRDA:29,1,0,0 -BRDA:29,1,1,49 -BRDA:47,2,0,49 -BRDA:47,2,1,0 -BRDA:47,3,0,49 -BRDA:47,3,1,49 -BRDA:61,4,0,0 -BRDA:61,4,1,38 -BRDA:68,5,0,33 -BRDA:68,5,1,5 -BRDA:68,6,0,38 -BRDA:68,6,1,38 -BRDA:68,7,0,0 -BRDA:68,7,1,5 -BRDA:73,8,0,82 -BRDA:73,8,1,0 -BRDA:75,9,0,82 -BRDA:75,9,1,40 -BRDA:81,10,0,25 -BRDA:81,10,1,57 -BRDA:81,11,0,25 -BRDA:81,11,1,17 -BRDA:86,12,0,19 -BRDA:86,12,1,63 -BRDA:87,13,0,15 -BRDA:87,13,1,67 -BRDA:87,14,0,82 -BRDA:87,14,1,67 -BRDA:117,15,0,82 -BRDA:117,15,1,82 -BRDA:131,16,0,10 -BRDA:131,16,1,72 -BRDA:132,17,0,6 -BRDA:132,17,1,4 -BRDA:140,18,0,84 -BRDA:140,18,1,39 -BRDA:142,19,0,2 -BRDA:142,19,1,82 -BRDA:149,20,0,1 -BRDA:149,20,1,81 -BRDA:149,21,0,82 -BRDA:149,21,1,42 -BRDA:161,22,0,37 -BRDA:161,22,1,276890 -BRDA:161,23,0,276927 -BRDA:161,23,1,276819 -BRDA:162,24,0,37 -BRDA:162,24,1,37 -BRDA:163,25,0,10 -BRDA:163,25,1,27 -BRDA:184,26,0,0 -BRDA:184,26,1,276968 -BRDA:186,27,0,67 -BRDA:186,27,1,276901 -BRDA:189,28,0,276883 -BRDA:189,28,1,18 -BRDA:189,29,0,276901 -BRDA:189,29,1,276810 -BRDA:189,29,2,276810 -BRDA:190,30,0,1 -BRDA:190,30,1,276882 -BRDA:190,31,0,276883 -BRDA:190,31,1,3 -BRDA:193,32,0,1 -BRDA:193,32,1,276881 -BRDA:193,33,0,276882 -BRDA:193,33,1,1 -BRDA:198,34,0,23 -BRDA:198,34,1,276858 -BRDA:198,35,0,276881 -BRDA:198,35,1,50 -BRDA:198,35,2,50 -BRDA:200,36,0,23 -BRDA:200,36,1,23 -BRDA:203,37,0,276850 -BRDA:203,37,1,31 -BRDA:207,38,0,276875 -BRDA:207,38,1,6 -BRDA:209,39,0,108 -BRDA:209,39,1,276767 -BRDA:209,40,0,276875 -BRDA:209,40,1,152 -BRDA:209,40,2,143 -BRDA:214,41,0,51 -BRDA:214,41,1,276716 -BRDA:215,42,0,31 -BRDA:215,42,1,276736 -BRDA:217,43,0,276660 -BRDA:217,43,1,107 -BRDA:223,44,0,9 -BRDA:223,44,1,9 -BRDA:238,45,0,276966 -BRDA:238,45,1,276896 -BRDA:238,45,2,276704 -BRDA:238,45,3,64 -BRDA:243,46,0,1 -BRDA:243,46,1,4 -BRDA:252,47,0,0 -BRDA:252,47,1,4 -BRDA:268,48,0,284 -BRDA:268,48,1,553951 -BRDA:268,49,0,554235 -BRDA:268,49,1,715 -BRDA:270,50,0,91 -BRDA:270,50,1,553860 -BRDA:270,51,0,46 -BRDA:270,51,1,45 -BRDA:272,52,0,421 -BRDA:272,52,1,553439 -BRDA:272,53,0,553860 -BRDA:272,53,1,553860 -BRDA:274,54,0,304 -BRDA:274,54,1,117 -BRDA:274,55,0,421 -BRDA:274,55,1,353 -BRDA:277,56,0,551352 -BRDA:277,56,1,2087 -BRDA:283,57,0,4 -BRDA:283,57,1,2083 -BRDA:286,58,0,1711 -BRDA:286,58,1,376 -BRDA:287,59,0,1697 -BRDA:287,59,1,14 -BRDA:304,60,0,1859 -BRDA:304,60,1,275798 -BRDA:304,61,0,277657 -BRDA:304,61,1,277162 -BRDA:309,62,0,6 -BRDA:309,62,1,277651 -BRDA:309,63,0,277657 -BRDA:309,63,1,275798 -BRDA:309,63,2,275735 -BRDA:309,63,3,275734 -BRDA:311,64,0,4 -BRDA:311,64,1,2 -BRDA:311,65,0,6 -BRDA:311,65,1,4 -BRDA:318,66,0,279 -BRDA:318,66,1,277372 -BRDA:318,67,0,277651 -BRDA:318,67,1,277088 -BRDA:319,68,0,277 -BRDA:319,68,1,2 -BRDA:350,69,0,277365 -BRDA:350,69,1,7 -BRDA:350,70,0,277372 -BRDA:350,70,1,276947 -BRDA:357,71,0,556 -BRDA:357,71,1,276816 -BRDA:357,72,0,277372 -BRDA:357,72,1,277056 -BRDA:362,73,0,276809 -BRDA:362,73,1,563 -BRDA:367,74,0,349 -BRDA:367,74,1,276460 -BRDA:375,75,0,276584 -BRDA:375,75,1,788 -BRDA:375,76,0,277372 -BRDA:375,76,1,276809 -BRDA:378,77,0,749 -BRDA:378,77,1,276623 -BRDA:380,78,0,276627 -BRDA:380,78,1,745 -BRDA:389,79,0,454 -BRDA:389,79,1,276918 -BRDA:389,80,0,277372 -BRDA:389,80,1,492 -BRDA:392,81,0,35 -BRDA:392,81,1,277337 -BRDA:392,82,0,277372 -BRDA:392,82,1,1242 -BRDA:392,82,2,307 -BRDA:394,83,0,745 -BRDA:394,83,1,276627 -BRDA:401,84,0,0 -BRDA:401,84,1,276968 -BRDA:401,85,0,276968 -BRDA:401,85,1,185 -BRDA:401,85,2,131 -BRDA:401,85,3,64 -BRDA:401,85,4,64 -BRDA:408,86,0,8 -BRDA:408,86,1,59 -BRDA:409,87,0,14 -BRDA:409,87,1,45 -BRDA:411,88,0,4 -BRDA:411,88,1,10 -BRDA:411,89,0,14 -BRDA:411,89,1,4 -BRDA:413,90,0,0 -BRDA:413,90,1,4 -BRDA:428,91,0,1123 -BRDA:428,91,1,275599 -BRDA:431,92,0,1003 -BRDA:431,92,1,120 -BRDA:448,93,0,225 -BRDA:448,93,1,276656 -BRDA:456,94,0,275796 -BRDA:456,94,1,275697 -BRDA:456,94,2,275647 -BRDA:456,94,3,275626 -BRDA:459,95,0,26 -BRDA:459,95,1,275571 -BRDA:478,96,0,37 -BRDA:478,96,1,1 -BRDA:478,96,2,0 -BRDA:492,97,0,38 -BRDA:492,97,1,1 -BRDA:492,97,2,37 -BRDA:492,97,3,36 -BRDA:494,98,0,36 -BRDA:494,98,1,2 -BRDA:495,99,0,1 -BRDA:495,99,1,37 -BRDA:500,100,0,24 -BRDA:500,100,1,1 -BRDA:537,101,0,1 -BRDA:537,101,1,23 -BRDA:537,102,0,24 -BRDA:537,102,1,1 -BRDA:537,102,2,1 -BRDA:544,103,0,264 -BRDA:544,103,1,131 -BRDA:549,104,0,263 -BRDA:549,104,1,1 -BRDA:549,105,0,264 -BRDA:549,105,1,262 -BRDA:549,105,2,3 -BRDA:549,105,3,2 -BRDA:549,105,4,263 -BRDA:563,106,0,2 -BRDA:563,106,1,3 -BRDA:591,107,0,12 -BRDA:591,107,1,26 -BRDA:603,108,0,261 -BRDA:603,108,1,4 -BRDA:604,109,0,263 -BRDA:604,109,1,2 -BRDA:604,110,0,265 -BRDA:604,110,1,264 -BRDA:615,111,0,3 -BRDA:615,111,1,24 -BRDA:618,112,0,24 -BRDA:618,112,1,0 -BRDA:620,113,0,0 -BRDA:620,113,1,24 -BRDA:620,114,0,24 -BRDA:620,114,1,24 -BRDA:622,115,0,0 -BRDA:622,115,1,24 -BRDA:628,116,0,24 -BRDA:628,116,1,0 -BRDA:634,117,0,0 -BRDA:634,117,1,0 -BRDA:649,118,0,0 -BRDA:649,118,1,0 -BRDA:653,119,0,0 -BRDA:653,119,1,0 -BRDA:667,120,0,36 -BRDA:667,120,1,190 -BRDA:667,121,0,226 -BRDA:667,121,1,48 -BRDA:671,122,0,38 -BRDA:671,122,1,188 -BRDA:671,123,0,226 -BRDA:671,123,1,38 -BRDA:673,124,0,28 -BRDA:673,124,1,10 -BRDA:677,125,0,25 -BRDA:677,125,1,3 -BRDA:679,126,0,1 -BRDA:679,126,1,2 -BRDA:698,127,0,56 -BRDA:698,127,1,1 -BRDA:707,128,0,42 -BRDA:707,128,1,14 -BRDA:714,129,0,38 -BRDA:714,129,1,4 -BRDA:722,130,0,12 -BRDA:722,130,1,30 -BRDA:722,131,0,42 -BRDA:722,131,1,27 -BRDA:727,132,0,270 -BRDA:727,132,1,2 -BRDA:738,133,0,345 -BRDA:738,133,1,1083 -BRDA:741,134,0,395 -BRDA:741,134,1,310 -BRDA:755,135,0,0 -BRDA:755,135,1,1 -BRDA:755,136,0,1 -BRDA:755,136,1,0 -BRDA:757,137,0,0 -BRDA:757,137,1,0 -BRDA:757,138,0,0 -BRDA:757,138,1,0 -BRDA:765,139,0,0 -BRDA:765,139,1,0 -BRDA:768,140,0,0 -BRDA:768,140,1,0 -BRDA:768,141,0,0 -BRDA:768,141,1,0 -BRDA:768,141,2,0 -BRDA:768,142,0,0 -BRDA:768,142,1,0 -BRDA:768,143,0,0 -BRDA:768,143,1,0 -BRDA:768,143,2,0 -BRDA:771,144,0,0 -BRDA:771,144,1,0 -BRDA:780,145,0,0 -BRDA:780,145,1,16 -BRDA:780,146,0,16 -BRDA:780,146,1,1 -BRDA:799,147,0,0 -BRDA:799,147,1,0 -BRDA:821,148,0,4 -BRDA:821,148,1,753 -BRDA:823,149,0,0 -BRDA:823,149,1,753 -BRDA:823,150,0,39 -BRDA:823,150,1,714 -BRDA:823,151,0,280 -BRDA:823,151,1,434 -BRDA:823,152,0,714 -BRDA:823,152,1,714 -BRDA:825,153,0,21 -BRDA:825,153,1,259 -BRDA:825,154,0,66 -BRDA:825,154,1,193 -BRDA:829,155,0,114 -BRDA:829,155,1,320 -BRDA:835,156,0,264 -BRDA:835,156,1,56 -BRDA:841,157,0,1 -BRDA:841,157,1,55 -BRDA:844,158,0,242 -BRDA:844,158,1,219 -BRDA:848,159,0,2 -BRDA:848,159,1,184 -BRDA:850,160,0,39 -BRDA:850,160,1,147 -BRDA:865,161,0,0 -BRDA:865,161,1,316 -BRDA:867,162,0,314 -BRDA:867,162,1,2 -BRDA:875,163,0,54 -BRDA:875,163,1,260 -BRDA:875,164,0,314 -BRDA:875,164,1,54 -BRDA:890,165,0,2 -BRDA:890,165,1,1 -BRF:352 -BRH:307 -end_of_record -TN: -SF:/Users/cmetcalf/projects/readable-stream/lib/_stream_writable.js -FN:32,(anonymous_1) -FN:48,nop -FN:50,WriteReq -FN:58,WritableState -FN:121,(anonymous_5) -FN:153,writableStateGetBuffer -FN:163,(anonymous_7) -FN:166,(anonymous_8) -FN:174,Writable -FN:196,(anonymous_10) -FN:200,writeAfterEnd -FN:212,validChunk -FN:231,(anonymous_13) -FN:252,(anonymous_14) -FN:258,(anonymous_15) -FN:268,setDefaultEncoding -FN:276,decodeChunk -FN:286,writeOrBuffer -FN:314,doWrite -FN:323,onwriteError -FN:331,onwriteStateUpdate -FN:338,onwrite -FN:363,afterWrite -FN:373,onwriteDrain -FN:381,clearBuffer -FN:438,(anonymous_26) -FN:444,(anonymous_27) -FN:468,needFinish -FN:472,prefinish -FN:479,finishMaybe -FN:493,endWritable -FN:505,CorkedRequest -FN:511,(anonymous_33) -FNF:33 -FNH:30 -FNDA:49,(anonymous_1) -FNDA:2512,nop -FNDA:2305,WriteReq -FNDA:96,WritableState -FNDA:4574,(anonymous_5) -FNDA:1,writableStateGetBuffer -FNDA:49,(anonymous_7) -FNDA:0,(anonymous_8) -FNDA:97,Writable -FNDA:1,(anonymous_10) -FNDA:1,writeAfterEnd -FNDA:4625,validChunk -FNDA:4626,(anonymous_13) -FNDA:13,(anonymous_14) -FNDA:13,(anonymous_15) -FNDA:3,setDefaultEncoding -FNDA:4621,decodeChunk -FNDA:4621,writeOrBuffer -FNDA:4582,doWrite -FNDA:0,onwriteError -FNDA:4574,onwriteStateUpdate -FNDA:4574,onwrite -FNDA:4574,afterWrite -FNDA:4557,onwriteDrain -FNDA:2263,clearBuffer -FNDA:0,(anonymous_26) -FNDA:65,(anonymous_27) -FNDA:9209,needFinish -FNDA:125,prefinish -FNDA:4635,finishMaybe -FNDA:61,endWritable -FNDA:105,CorkedRequest -FNDA:8,(anonymous_33) -DA:7,49 -DA:10,49 -DA:14,49 -DA:17,49 -DA:20,49 -DA:21,49 -DA:25,49 -DA:31,49 -DA:32,49 -DA:33,49 -DA:34,49 -DA:36,49 -DA:41,49 -DA:43,49 -DA:46,49 -DA:48,49 -DA:50,49 -DA:51,2305 -DA:52,2305 -DA:53,2305 -DA:54,2305 -DA:57,49 -DA:58,49 -DA:59,96 -DA:61,96 -DA:65,96 -DA:67,96 -DA:72,96 -DA:73,96 -DA:74,96 -DA:77,96 -DA:79,96 -DA:81,96 -DA:83,96 -DA:85,96 -DA:90,96 -DA:91,96 -DA:96,96 -DA:101,96 -DA:104,96 -DA:107,96 -DA:113,96 -DA:118,96 -DA:121,96 -DA:122,4574 -DA:126,96 -DA:129,96 -DA:131,96 -DA:132,96 -DA:136,96 -DA:140,96 -DA:143,96 -DA:146,96 -DA:150,96 -DA:153,49 -DA:154,1 -DA:155,1 -DA:156,1 -DA:157,5 -DA:158,5 -DA:160,1 -DA:163,49 -DA:164,49 -DA:165,49 -DA:167,0 -DA:173,49 -DA:174,49 -DA:175,97 -DA:179,97 -DA:181,96 -DA:184,96 -DA:186,96 -DA:187,50 -DA:189,50 -DA:192,96 -DA:196,49 -DA:197,1 -DA:200,49 -DA:201,1 -DA:203,1 -DA:204,1 -DA:212,49 -DA:213,4625 -DA:214,4625 -DA:218,4625 -DA:219,2 -DA:220,4623 -DA:221,2 -DA:223,4625 -DA:224,4 -DA:225,2 -DA:226,2 -DA:228,4623 -DA:231,49 -DA:232,4626 -DA:233,4626 -DA:235,4626 -DA:236,59 -DA:237,59 -DA:240,4626 -DA:242,4626 -DA:244,4626 -DA:245,4621 -DA:246,4621 -DA:249,4624 -DA:252,49 -DA:253,13 -DA:255,13 -DA:258,49 -DA:259,13 -DA:261,13 -DA:262,13 -DA:264,13 -DA:268,49 -DA:270,3 -DA:271,3 -DA:272,2 -DA:273,2 -DA:276,49 -DA:277,4621 -DA:278,2273 -DA:280,4621 -DA:286,49 -DA:287,4621 -DA:289,4621 -DA:290,4621 -DA:292,4621 -DA:294,4621 -DA:296,4621 -DA:298,4621 -DA:299,2305 -DA:300,2305 -DA:301,2305 -DA:302,2265 -DA:304,40 -DA:306,2305 -DA:308,2316 -DA:311,4621 -DA:314,49 -DA:315,4582 -DA:316,4582 -DA:317,4582 -DA:318,4582 -DA:319,4582 -DA:320,4582 -DA:323,49 -DA:324,0 -DA:325,0 -DA:327,0 -DA:328,0 -DA:331,49 -DA:332,4574 -DA:333,4574 -DA:334,4574 -DA:335,4574 -DA:338,49 -DA:339,4574 -DA:340,4574 -DA:341,4574 -DA:343,4574 -DA:345,4574 -DA:347,4574 -DA:349,4574 -DA:350,2254 -DA:353,4574 -DA:355,2230 -DA:358,2344 -DA:363,49 -DA:364,4574 -DA:365,4574 -DA:366,4574 -DA:367,4574 -DA:373,49 -DA:374,4557 -DA:375,27 -DA:376,27 -DA:381,49 -DA:382,2263 -DA:383,2263 -DA:385,2263 -DA:387,9 -DA:388,9 -DA:389,9 -DA:390,9 -DA:392,9 -DA:393,9 -DA:394,42 -DA:395,42 -DA:396,42 -DA:399,9 -DA:403,9 -DA:404,9 -DA:405,9 -DA:406,0 -DA:407,0 -DA:409,9 -DA:413,2254 -DA:414,2257 -DA:415,2257 -DA:416,2257 -DA:417,2257 -DA:419,2257 -DA:420,2257 -DA:425,2257 -DA:426,2252 -DA:430,2254 -DA:433,2263 -DA:434,2263 -DA:435,2263 -DA:438,49 -DA:439,0 -DA:442,49 -DA:444,49 -DA:445,65 -DA:447,65 -DA:448,11 -DA:449,11 -DA:450,11 -DA:451,54 -DA:452,1 -DA:453,1 -DA:456,65 -DA:459,65 -DA:460,5 -DA:461,5 -DA:465,65 -DA:468,49 -DA:469,9209 -DA:472,49 -DA:473,125 -DA:474,57 -DA:475,57 -DA:479,49 -DA:480,4635 -DA:481,4635 -DA:482,125 -DA:483,57 -DA:484,57 -DA:485,57 -DA:487,68 -DA:490,4635 -DA:493,49 -DA:494,61 -DA:495,61 -DA:496,61 -DA:497,13 -DA:499,61 -DA:500,61 -DA:505,49 -DA:506,105 -DA:508,105 -DA:509,105 -DA:511,105 -DA:512,8 -DA:513,8 -DA:514,8 -DA:515,40 -DA:516,40 -DA:517,40 -DA:518,40 -DA:520,8 -DA:521,8 -DA:523,0 -LF:263 -LH:254 -BRDA:14,1,0,0 -BRDA:14,1,1,49 -BRDA:14,2,0,49 -BRDA:14,2,1,49 -BRDA:36,3,0,0 -BRDA:36,3,1,49 -BRDA:59,4,0,96 -BRDA:59,4,1,0 -BRDA:61,5,0,96 -BRDA:61,5,1,46 -BRDA:67,6,0,25 -BRDA:67,6,1,71 -BRDA:67,7,0,25 -BRDA:67,7,1,17 -BRDA:73,8,0,23 -BRDA:73,8,1,73 -BRDA:74,9,0,8 -BRDA:74,9,1,88 -BRDA:74,10,0,96 -BRDA:74,10,1,88 -BRDA:96,11,0,96 -BRDA:96,11,1,96 -BRDA:175,12,0,97 -BRDA:175,12,1,28 -BRDA:179,13,0,1 -BRDA:179,13,1,96 -BRDA:179,14,0,97 -BRDA:179,14,1,26 -BRDA:186,15,0,50 -BRDA:186,15,1,46 -BRDA:187,16,0,1 -BRDA:187,16,1,49 -BRDA:189,17,0,1 -BRDA:189,17,1,49 -BRDA:218,18,0,2 -BRDA:218,18,1,4623 -BRDA:220,19,0,2 -BRDA:220,19,1,4621 -BRDA:220,20,0,4623 -BRDA:220,20,1,2425 -BRDA:220,20,2,61 -BRDA:220,20,3,61 -BRDA:223,21,0,4 -BRDA:223,21,1,4621 -BRDA:235,22,0,59 -BRDA:235,22,1,4567 -BRDA:240,23,0,2198 -BRDA:240,23,1,2428 -BRDA:240,24,0,2301 -BRDA:240,24,1,127 -BRDA:242,25,0,2527 -BRDA:242,25,1,2099 -BRDA:244,26,0,1 -BRDA:244,26,1,4625 -BRDA:244,27,0,4621 -BRDA:244,27,1,2 -BRDA:261,28,0,13 -BRDA:261,28,1,0 -BRDA:264,29,0,9 -BRDA:264,29,1,4 -BRDA:264,30,0,13 -BRDA:264,30,1,13 -BRDA:264,30,2,9 -BRDA:264,30,3,9 -BRDA:264,30,4,9 -BRDA:270,31,0,2 -BRDA:270,31,1,1 -BRDA:271,32,0,1 -BRDA:271,32,1,2 -BRDA:277,33,0,2273 -BRDA:277,33,1,2348 -BRDA:277,34,0,4621 -BRDA:277,34,1,4547 -BRDA:277,34,2,4467 -BRDA:289,35,0,4471 -BRDA:289,35,1,150 -BRDA:290,36,0,74 -BRDA:290,36,1,4547 -BRDA:296,37,0,177 -BRDA:296,37,1,4444 -BRDA:298,38,0,2305 -BRDA:298,38,1,2316 -BRDA:298,39,0,4621 -BRDA:298,39,1,2358 -BRDA:301,40,0,2265 -BRDA:301,40,1,40 -BRDA:319,41,0,9 -BRDA:319,41,1,4573 -BRDA:325,42,0,0 -BRDA:325,42,1,0 -BRDA:345,43,0,0 -BRDA:345,43,1,4574 -BRDA:349,44,0,2254 -BRDA:349,44,1,2320 -BRDA:349,45,0,4574 -BRDA:349,45,1,4557 -BRDA:349,45,2,4557 -BRDA:349,45,3,4544 -BRDA:353,46,0,2230 -BRDA:353,46,1,2344 -BRDA:364,47,0,4557 -BRDA:364,47,1,17 -BRDA:374,48,0,27 -BRDA:374,48,1,4530 -BRDA:374,49,0,4557 -BRDA:374,49,1,2302 -BRDA:385,50,0,9 -BRDA:385,50,1,2254 -BRDA:385,51,0,2263 -BRDA:385,51,1,9 -BRDA:385,51,2,9 -BRDA:405,52,0,0 -BRDA:405,52,1,9 -BRDA:417,53,0,4 -BRDA:417,53,1,2253 -BRDA:425,54,0,2252 -BRDA:425,54,1,5 -BRDA:430,55,0,29 -BRDA:430,55,1,2225 -BRDA:447,56,0,11 -BRDA:447,56,1,54 -BRDA:451,57,0,1 -BRDA:451,57,1,53 -BRDA:456,58,0,10 -BRDA:456,58,1,55 -BRDA:456,59,0,65 -BRDA:456,59,1,54 -BRDA:459,60,0,5 -BRDA:459,60,1,60 -BRDA:465,61,0,61 -BRDA:465,61,1,4 -BRDA:465,62,0,65 -BRDA:465,62,1,61 -BRDA:469,63,0,9209 -BRDA:469,63,1,420 -BRDA:469,63,2,149 -BRDA:469,63,3,146 -BRDA:469,63,4,145 -BRDA:473,64,0,57 -BRDA:473,64,1,68 -BRDA:481,65,0,125 -BRDA:481,65,1,4510 -BRDA:482,66,0,57 -BRDA:482,66,1,68 -BRDA:496,67,0,13 -BRDA:496,67,1,48 -BRDA:497,68,0,1 -BRDA:497,68,1,12 -BRDA:520,69,0,8 -BRDA:520,69,1,0 -BRF:150 -BRH:141 -end_of_record -TN: -SF:/Users/cmetcalf/projects/readable-stream/lib/_stream_duplex.js -FN:10,(anonymous_1) -FN:40,Duplex -FN:57,onend -FN:67,onEndNT -FN:71,forEach -FNF:5 -FNH:2 -FNDA:0,(anonymous_1) -FNDA:25,Duplex -FNDA:18,onend -FNDA:0,onEndNT -FNDA:0,forEach -DA:10,49 -DA:11,0 -DA:12,0 -DA:13,0 -DA:14,0 -DA:18,49 -DA:21,49 -DA:25,49 -DA:26,49 -DA:29,49 -DA:30,49 -DA:32,49 -DA:34,49 -DA:35,49 -DA:36,392 -DA:37,392 -DA:40,49 -DA:41,25 -DA:43,25 -DA:44,25 -DA:46,25 -DA:48,25 -DA:50,25 -DA:51,25 -DA:53,25 -DA:57,49 -DA:60,18 -DA:64,0 -DA:67,49 -DA:68,0 -DA:71,49 -DA:72,0 -DA:73,0 -LF:33 -LH:25 -BRDA:10,1,0,49 -BRDA:10,1,1,0 -BRDA:37,2,0,343 -BRDA:37,2,1,49 -BRDA:41,3,0,0 -BRDA:41,3,1,25 -BRDA:46,4,0,0 -BRDA:46,4,1,25 -BRDA:46,5,0,25 -BRDA:46,5,1,13 -BRDA:48,6,0,0 -BRDA:48,6,1,25 -BRDA:48,7,0,25 -BRDA:48,7,1,13 -BRDA:51,8,0,0 -BRDA:51,8,1,25 -BRDA:51,9,0,25 -BRDA:51,9,1,13 -BRDA:60,10,0,18 -BRDA:60,10,1,0 -BRDA:60,11,0,18 -BRDA:60,11,1,0 -BRF:22 -BRH:15 -end_of_record -TN: -SF:/Users/cmetcalf/projects/readable-stream/lib/_stream_transform.js -FN:56,TransformState -FN:57,(anonymous_2) -FN:68,afterTransform -FN:90,Transform -FN:114,(anonymous_5) -FN:115,(anonymous_6) -FN:121,(anonymous_7) -FN:136,(anonymous_8) -FN:140,(anonymous_9) -FN:154,(anonymous_10) -FN:167,done -FNF:11 -FNH:10 -FNDA:24,TransformState -FNDA:116,(anonymous_2) -FNDA:116,afterTransform -FNDA:24,Transform -FNDA:19,(anonymous_5) -FNDA:2,(anonymous_6) -FNDA:127,(anonymous_7) -FNDA:0,(anonymous_8) -FNDA:117,(anonymous_9) -FNDA:310,(anonymous_10) -FNDA:19,done -DA:45,49 -DA:47,49 -DA:50,49 -DA:51,49 -DA:54,49 -DA:56,49 -DA:57,24 -DA:58,116 -DA:61,24 -DA:62,24 -DA:63,24 -DA:64,24 -DA:65,24 -DA:68,49 -DA:69,116 -DA:70,116 -DA:72,116 -DA:74,116 -DA:76,116 -DA:77,116 -DA:79,116 -DA:81,116 -DA:83,116 -DA:84,116 -DA:85,116 -DA:86,113 -DA:90,49 -DA:91,24 -DA:93,24 -DA:95,24 -DA:98,24 -DA:101,24 -DA:106,24 -DA:108,24 -DA:109,13 -DA:111,13 -DA:114,24 -DA:115,19 -DA:116,2 -DA:117,17 -DA:121,49 -DA:122,127 -DA:123,127 -DA:136,49 -DA:137,0 -DA:140,49 -DA:141,117 -DA:142,117 -DA:143,117 -DA:144,117 -DA:145,117 -DA:146,117 -DA:147,117 -DA:154,49 -DA:155,310 -DA:157,310 -DA:158,116 -DA:159,116 -DA:163,194 -DA:167,49 -DA:168,19 -DA:172,19 -DA:173,19 -DA:175,19 -DA:177,19 -DA:179,19 -LF:66 -LH:65 -BRDA:74,1,0,0 -BRDA:74,1,1,116 -BRDA:79,2,0,61 -BRDA:79,2,1,55 -BRDA:79,3,0,116 -BRDA:79,3,1,116 -BRDA:85,4,0,113 -BRDA:85,4,1,3 -BRDA:85,5,0,116 -BRDA:85,5,1,55 -BRDA:91,6,0,0 -BRDA:91,6,1,24 -BRDA:108,7,0,13 -BRDA:108,7,1,11 -BRDA:109,8,0,1 -BRDA:109,8,1,12 -BRDA:111,9,0,1 -BRDA:111,9,1,12 -BRDA:115,10,0,2 -BRDA:115,10,1,17 -BRDA:145,11,0,117 -BRDA:145,11,1,0 -BRDA:147,12,0,116 -BRDA:147,12,1,1 -BRDA:147,13,0,117 -BRDA:147,13,1,33 -BRDA:147,13,2,11 -BRDA:157,14,0,116 -BRDA:157,14,1,194 -BRDA:157,15,0,310 -BRDA:157,15,1,152 -BRDA:157,15,2,152 -BRDA:168,16,0,0 -BRDA:168,16,1,19 -BRDA:175,17,0,0 -BRDA:175,17,1,19 -BRDA:177,18,0,0 -BRDA:177,18,1,19 -BRF:38 -BRH:32 -end_of_record -TN: -SF:/Users/cmetcalf/projects/readable-stream/lib/_stream_passthrough.js -FN:18,PassThrough -FN:24,(anonymous_2) -FNF:2 -FNH:2 -FNDA:8,PassThrough -FNDA:59,(anonymous_2) -DA:7,49 -DA:9,49 -DA:12,49 -DA:13,49 -DA:16,49 -DA:18,49 -DA:19,8 -DA:21,8 -DA:24,49 -DA:25,59 -LF:10 -LH:10 -BRDA:19,1,0,0 -BRDA:19,1,1,8 -BRF:2 -BRH:1 -end_of_record diff --git a/deps/npm/node_modules/readable-stream/package.json b/deps/npm/node_modules/readable-stream/package.json index ef5ff11b1d33f2..1932ad2ac7a3f8 100644 --- a/deps/npm/node_modules/readable-stream/package.json +++ b/deps/npm/node_modules/readable-stream/package.json @@ -2,53 +2,57 @@ "_args": [ [ { - "name": "readable-stream", - "raw": "readable-stream@2.1.3", - "rawSpec": "2.1.3", + "raw": "readable-stream@latest", "scope": null, - "spec": "2.1.3", - "type": "version" + "escapedName": "readable-stream", + "name": "readable-stream", + "rawSpec": "latest", + "spec": "latest", + "type": "tag" }, - "/Users/zkat/Documents/code/npm" + "/Users/rebecca/code/npm" ] ], - "_from": "readable-stream@2.1.3", - "_id": "readable-stream@2.1.3", + "_from": "readable-stream@latest", + "_id": "readable-stream@2.1.4", "_inCache": true, "_installable": true, "_location": "/readable-stream", "_nodeVersion": "5.11.0", "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/readable-stream-2.1.3.tgz_1463587875388_0.811288726516068" + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/readable-stream-2.1.4.tgz_1463679605032_0.6917394688352942" }, "_npmUser": { - "email": "calvin.metcalf@gmail.com", - "name": "cwmma" + "name": "cwmma", + "email": "calvin.metcalf@gmail.com" }, "_npmVersion": "3.8.6", "_phantomChildren": {}, "_requested": { - "name": "readable-stream", - "raw": "readable-stream@2.1.3", - "rawSpec": "2.1.3", + "raw": "readable-stream@latest", "scope": null, - "spec": "2.1.3", - "type": "version" + "escapedName": "readable-stream", + "name": "readable-stream", + "rawSpec": "latest", + "spec": "latest", + "type": "tag" }, "_requiredBy": [ + "#USER", "/", "/fs-write-stream-atomic", + "/node-gyp/npmlog/are-we-there-yet", "/npmlog/are-we-there-yet", "/sha", "/tap", "/tap/tap-parser" ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.3.tgz", - "_shasum": "9db8ec4025b4c71e69aec60b453b590c8afeb0df", + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz", + "_shasum": "70b9791c6fcb8480db44bd155a0f6bb58f172468", "_shrinkwrap": null, - "_spec": "readable-stream@2.1.3", - "_where": "/Users/zkat/Documents/code/npm", + "_spec": "readable-stream@latest", + "_where": "/Users/rebecca/code/npm", "browser": { "util": false }, @@ -70,14 +74,15 @@ "nyc": "^6.4.0", "tap": "~0.7.1", "tape": "~4.5.1", - "zuul": "~3.9.0" + "zuul": "~3.9.0", + "zuul-ngrok": "^4.0.0" }, "directories": {}, "dist": { - "shasum": "9db8ec4025b4c71e69aec60b453b590c8afeb0df", - "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.3.tgz" + "shasum": "70b9791c6fcb8480db44bd155a0f6bb58f172468", + "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.4.tgz" }, - "gitHead": "abcff84645534aaedaed4192c4ce788af9112bc2", + "gitHead": "7752832fba237929388dea6c96911a0a6379abfc", "homepage": "https://github.com/nodejs/readable-stream#readme", "keywords": [ "readable", @@ -88,20 +93,20 @@ "main": "readable.js", "maintainers": [ { - "email": "isaacs@npmjs.com", - "name": "isaacs" + "name": "isaacs", + "email": "isaacs@npmjs.com" }, { - "email": "nathan@tootallnate.net", - "name": "tootallnate" + "name": "tootallnate", + "email": "nathan@tootallnate.net" }, { - "email": "rod@vagg.org", - "name": "rvagg" + "name": "rvagg", + "email": "rod@vagg.org" }, { - "email": "calvin.metcalf@gmail.com", - "name": "cwmma" + "name": "cwmma", + "email": "calvin.metcalf@gmail.com" } ], "name": "readable-stream", @@ -122,7 +127,7 @@ "local": "zuul --local -- test/browser.js", "report": "nyc report --reporter=lcov", "test": "tap test/parallel/*.js test/ours/*.js", - "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml" + "write-zuul": "printf \"ui: tape\ntunnel: ngrok\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml" }, - "version": "2.1.3" + "version": "2.1.4" } diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/stream.markdown b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/stream.markdown index 0bc3819e63b025..8b21d52654b341 100644 --- a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/stream.markdown +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/stream.markdown @@ -1407,7 +1407,7 @@ var duplex = new stream.Duplex({ // sets this._write under the hood // An optional error can be passed as the first argument - next() + next(); } }); @@ -1425,7 +1425,7 @@ var duplex = new stream.Duplex({ // sets this._writev under the hood // An optional error can be passed as the first argument - next() + next(); } }); ``` @@ -1476,7 +1476,7 @@ var writable = new stream.Writable({ // sets this._write under the hood // An optional error can be passed as the first argument - next() + next(); } }); @@ -1487,7 +1487,7 @@ var writable = new stream.Writable({ // sets this._writev under the hood // An optional error can be passed as the first argument - next() + next(); } }); ``` diff --git a/deps/npm/node_modules/which/CHANGELOG.md b/deps/npm/node_modules/which/CHANGELOG.md index 83095804241a02..56106119e9a645 100644 --- a/deps/npm/node_modules/which/CHANGELOG.md +++ b/deps/npm/node_modules/which/CHANGELOG.md @@ -1,6 +1,10 @@ # Changes +## v1.2.10 + +* Use env.PATH only, not env.Path + ## v1.2.9 * fix for paths starting with ../ diff --git a/deps/npm/node_modules/which/package.json b/deps/npm/node_modules/which/package.json index 9f1f7a9fcd30ab..27071d747a9d0d 100644 --- a/deps/npm/node_modules/which/package.json +++ b/deps/npm/node_modules/which/package.json @@ -2,56 +2,56 @@ "_args": [ [ { - "name": "which", - "raw": "which@1.2.9", - "rawSpec": "1.2.9", + "raw": "which@latest", "scope": null, - "spec": "1.2.9", - "type": "version" + "escapedName": "which", + "name": "which", + "rawSpec": "latest", + "spec": "latest", + "type": "tag" }, - "/Users/zkat/Documents/code/npm" + "/Users/rebecca/code/npm" ] ], - "_from": "which@1.2.9", - "_id": "which@1.2.9", + "_from": "which@latest", + "_id": "which@1.2.10", "_inCache": true, "_installable": true, "_location": "/which", "_nodeVersion": "4.4.4", "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/which-1.2.9.tgz_1463603459182_0.9633393425028771" + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/which-1.2.10.tgz_1465116744337_0.4818702598568052" }, "_npmUser": { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" }, "_npmVersion": "3.9.1", "_phantomChildren": {}, "_requested": { - "name": "which", - "raw": "which@1.2.9", - "rawSpec": "1.2.9", + "raw": "which@latest", "scope": null, - "spec": "1.2.9", - "type": "version" + "escapedName": "which", + "name": "which", + "rawSpec": "latest", + "spec": "latest", + "type": "tag" }, "_requiredBy": [ + "#USER", "/", "/node-gyp", - "/tap/foreground-child", - "/tap/foreground-child/cross-spawn-async", - "/tap/nyc/istanbul", - "/tap/nyc/spawn-wrap" + "/tap/foreground-child/cross-spawn" ], - "_resolved": "https://registry.npmjs.org/which/-/which-1.2.9.tgz", - "_shasum": "0b3a0e5c073bc10ca7b9ec13534eeef8a71ab61f", + "_resolved": "https://registry.npmjs.org/which/-/which-1.2.10.tgz", + "_shasum": "91cd9bd0751322411b659b40f054b21de957ab2d", "_shrinkwrap": null, - "_spec": "which@1.2.9", - "_where": "/Users/zkat/Documents/code/npm", + "_spec": "which@latest", + "_where": "/Users/rebecca/code/npm", "author": { - "email": "i@izs.me", "name": "Isaac Z. Schlueter", + "email": "i@izs.me", "url": "http://blog.izs.me" }, "bin": { @@ -71,21 +71,21 @@ }, "directories": {}, "dist": { - "shasum": "0b3a0e5c073bc10ca7b9ec13534eeef8a71ab61f", - "tarball": "https://registry.npmjs.org/which/-/which-1.2.9.tgz" + "shasum": "91cd9bd0751322411b659b40f054b21de957ab2d", + "tarball": "https://registry.npmjs.org/which/-/which-1.2.10.tgz" }, "files": [ "which.js", "bin/which" ], - "gitHead": "34aac93a4c4ee9e3c7a49fe09778ca942e636cce", + "gitHead": "3f590834623ee940d922e12b1c8b9cbf24bd5012", "homepage": "https://github.com/isaacs/node-which#readme", "license": "ISC", "main": "which.js", "maintainers": [ { - "email": "i@izs.me", - "name": "isaacs" + "name": "isaacs", + "email": "i@izs.me" } ], "name": "which", @@ -100,5 +100,5 @@ "postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}", "test": "tap test/*.js --cov" }, - "version": "1.2.9" + "version": "1.2.10" } diff --git a/deps/npm/node_modules/which/which.js b/deps/npm/node_modules/which/which.js index b61da894ffc1fd..5a9b15ca60403f 100644 --- a/deps/npm/node_modules/which/which.js +++ b/deps/npm/node_modules/which/which.js @@ -19,7 +19,7 @@ function getNotFoundError (cmd) { function getPathInfo (cmd, opt) { var colon = opt.colon || COLON - var pathEnv = opt.path || process.env.Path || process.env.PATH || '' + var pathEnv = opt.path || process.env.PATH || '' var pathExt = [''] pathEnv = pathEnv.split(colon) diff --git a/deps/npm/node_modules/wrappy/package.json b/deps/npm/node_modules/wrappy/package.json index a617a72bb24187..10c34634a16b4d 100644 --- a/deps/npm/node_modules/wrappy/package.json +++ b/deps/npm/node_modules/wrappy/package.json @@ -1,36 +1,101 @@ { - "name": "wrappy", - "version": "1.0.1", - "description": "Callback wrapping utility", - "main": "wrappy.js", - "directories": { - "test": "test" + "_args": [ + [ + { + "raw": "wrappy@latest", + "scope": null, + "escapedName": "wrappy", + "name": "wrappy", + "rawSpec": "latest", + "spec": "latest", + "type": "tag" + }, + "/Users/rebecca/code/npm" + ] + ], + "_from": "wrappy@latest", + "_id": "wrappy@1.0.2", + "_inCache": true, + "_installable": true, + "_location": "/wrappy", + "_nodeVersion": "5.10.1", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/wrappy-1.0.2.tgz_1463527848281_0.037129373755306005" }, - "dependencies": {}, - "devDependencies": { - "tap": "^0.4.12" + "_npmUser": { + "name": "zkat", + "email": "kat@sykosomatic.org" }, - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/npm/wrappy.git" + "_npmVersion": "3.9.1", + "_phantomChildren": {}, + "_requested": { + "raw": "wrappy@latest", + "scope": null, + "escapedName": "wrappy", + "name": "wrappy", + "rawSpec": "latest", + "spec": "latest", + "type": "tag" }, + "_requiredBy": [ + "#USER", + "/", + "/dezalgo", + "/inflight", + "/once" + ], + "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "_shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", + "_shrinkwrap": null, + "_spec": "wrappy@latest", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, - "license": "ISC", "bugs": { "url": "https://github.com/npm/wrappy/issues" }, + "dependencies": {}, + "description": "Callback wrapping utility", + "devDependencies": { + "tap": "^2.3.1" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", + "tarball": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + }, + "files": [ + "wrappy.js" + ], + "gitHead": "71d91b6dc5bdeac37e218c2cf03f9ab55b60d214", "homepage": "https://github.com/npm/wrappy", - "readme": "# wrappy\n\nCallback wrapping utility\n\n## USAGE\n\n```javascript\nvar wrappy = require(\"wrappy\")\n\n// var wrapper = wrappy(wrapperFunction)\n\n// make sure a cb is called only once\n// See also: http://npm.im/once for this specific use case\nvar once = wrappy(function (cb) {\n var called = false\n return function () {\n if (called) return\n called = true\n return cb.apply(this, arguments)\n }\n})\n\nfunction printBoo () {\n console.log('boo')\n}\n// has some rando property\nprintBoo.iAmBooPrinter = true\n\nvar onlyPrintOnce = once(printBoo)\n\nonlyPrintOnce() // prints 'boo'\nonlyPrintOnce() // does nothing\n\n// random property is retained!\nassert.equal(onlyPrintOnce.iAmBooPrinter, true)\n```\n", - "readmeFilename": "README.md", - "_id": "wrappy@1.0.1", - "_shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", - "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz", - "_from": "wrappy@>=1.0.1 <1.1.0" + "license": "ISC", + "main": "wrappy.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "name": "wrappy", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/wrappy.git" + }, + "scripts": { + "test": "tap --coverage test/*.js" + }, + "version": "1.0.2" } diff --git a/deps/npm/node_modules/wrappy/test/basic.js b/deps/npm/node_modules/wrappy/test/basic.js deleted file mode 100644 index 5ed0fcdfd9c52e..00000000000000 --- a/deps/npm/node_modules/wrappy/test/basic.js +++ /dev/null @@ -1,51 +0,0 @@ -var test = require('tap').test -var wrappy = require('../wrappy.js') - -test('basic', function (t) { - function onceifier (cb) { - var called = false - return function () { - if (called) return - called = true - return cb.apply(this, arguments) - } - } - onceifier.iAmOnce = {} - var once = wrappy(onceifier) - t.equal(once.iAmOnce, onceifier.iAmOnce) - - var called = 0 - function boo () { - t.equal(called, 0) - called++ - } - // has some rando property - boo.iAmBoo = true - - var onlyPrintOnce = once(boo) - - onlyPrintOnce() // prints 'boo' - onlyPrintOnce() // does nothing - t.equal(called, 1) - - // random property is retained! - t.equal(onlyPrintOnce.iAmBoo, true) - - var logs = [] - var logwrap = wrappy(function (msg, cb) { - logs.push(msg + ' wrapping cb') - return function () { - logs.push(msg + ' before cb') - var ret = cb.apply(this, arguments) - logs.push(msg + ' after cb') - } - }) - - var c = logwrap('foo', function () { - t.same(logs, [ 'foo wrapping cb', 'foo before cb' ]) - }) - c() - t.same(logs, [ 'foo wrapping cb', 'foo before cb', 'foo after cb' ]) - - t.end() -}) diff --git a/deps/npm/package.json b/deps/npm/package.json index 2001ea150cdc70..0a34e4355e8608 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "3.9.5", + "version": "3.10.3", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ @@ -30,11 +30,12 @@ "main": "./lib/npm.js", "bin": "./bin/npm-cli.js", "dependencies": { - "abbrev": "~1.0.7", + "abbrev": "~1.0.9", "ansicolors": "~0.3.2", "ansistyles": "~0.1.3", - "aproba": "~1.0.3", + "aproba": "~1.0.4", "archy": "~1.0.0", + "asap": "~2.0.4", "chownr": "~1.0.1", "cmd-shim": "~2.0.2", "columnify": "~1.5.4", @@ -43,11 +44,11 @@ "editor": "~1.0.0", "fs-vacuum": "~1.2.9", "fs-write-stream-atomic": "~1.0.8", - "fstream": "~1.0.8", + "fstream": "~1.0.10", "fstream-npm": "~1.1.0", - "glob": "~7.0.3", + "glob": "~7.0.4", "graceful-fs": "~4.1.4", - "has-unicode": "~2.0.0", + "has-unicode": "~2.0.1", "hosted-git-info": "~2.1.5", "iferr": "~0.1.5", "inflight": "~1.0.5", @@ -57,8 +58,6 @@ "lockfile": "~1.0.1", "lodash._baseuniq": "~4.6.0", "lodash.clonedeep": "~4.3.2", - "lodash.isarray": "~4.0.0", - "lodash.keys": "~4.0.7", "lodash.union": "~4.4.0", "lodash.uniq": "~4.3.0", "lodash.without": "~4.2.0", @@ -69,10 +68,10 @@ "normalize-package-data": "~2.3.5", "npm-cache-filename": "~1.0.2", "npm-install-checks": "~3.0.0", - "npm-package-arg": "~4.1.1", - "npm-registry-client": "~7.1.0", - "npm-user-validate": "~0.1.2", - "npmlog": "~2.0.3", + "npm-package-arg": "~4.2.0", + "npm-registry-client": "~7.1.2", + "npm-user-validate": "~0.1.4", + "npmlog": "~3.1.2", "once": "~1.3.3", "opener": "~1.4.1", "osenv": "~0.1.3", @@ -81,8 +80,8 @@ "read-cmd-shim": "~1.0.1", "read-installed": "~4.0.3", "read-package-json": "~2.0.4", - "read-package-tree": "~5.1.4", - "readable-stream": "~2.1.3", + "read-package-tree": "~5.1.5", + "readable-stream": "~2.1.4", "realize-package-specifier": "~3.0.3", "request": "~2.72.0", "retry": "~0.9.0", @@ -99,8 +98,8 @@ "unique-filename": "~1.1.0", "unpipe": "~1.0.0", "validate-npm-package-name": "~2.2.2", - "which": "~1.2.9", - "wrappy": "~1.0.1", + "which": "~1.2.10", + "wrappy": "~1.0.2", "write-file-atomic": "~1.1.4" }, "bundleDependencies": [ @@ -110,6 +109,7 @@ "ansistyles", "aproba", "archy", + "asap", "chownr", "cmd-shim", "columnify", @@ -139,8 +139,6 @@ "lodash._createcache", "lodash._getnative", "lodash.clonedeep", - "lodash.isarray", - "lodash.keys", "lodash.restparam", "lodash.union", "lodash.uniq", @@ -194,11 +192,11 @@ "marked-man": "~0.1.5", "npm-registry-couchapp": "~2.6.12", "npm-registry-mock": "~1.0.1", - "require-inject": "~1.3.1", + "require-inject": "~1.4.0", "sprintf-js": "~1.0.3", "standard": "~6.0.8", "tacks": "~1.2.1", - "tap": "~5.7.1" + "tap": "~5.7.2" }, "scripts": { "dumpconf": "env | grep npm | sort | uniq", diff --git a/deps/npm/test/tap/bundled-transitive-deps.js b/deps/npm/test/tap/bundled-transitive-deps.js new file mode 100644 index 00000000000000..4aefe5b9cce82d --- /dev/null +++ b/deps/npm/test/tap/bundled-transitive-deps.js @@ -0,0 +1,83 @@ +'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 npm = require('../../lib/npm.js') +var tar = require('../../lib/utils/tar.js') + +var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var packed = path.join(testdir, 'packed') + +var fixture = new Tacks( + Dir({ + 'package.json': File({ + name: 'bundled-transitive-deps', + version: '1.0.0', + dependencies: { + 'a': '1.0.0' + }, + bundleDependencies: [ + 'a' + ] + }), + node_modules: Dir({ + 'a': Dir({ + 'package.json': File({ + name: 'a', + version: '1.0.0', + dependencies: { + 'b': '1.0.0' + } + }) + }), + 'b': Dir({ + 'package.json': File({ + name: 'b', + version: '1.0.0' + }) + }) + }) + }) +) + +function setup () { + cleanup() + fixture.create(testdir) +} + +function cleanup () { + fixture.remove(testdir) +} + +test('setup', function (t) { + setup() + npm.load({}, t.end) +}) + +test('bundled-transitive-deps', function (t) { + common.npm(['pack'], {cwd: testdir}, thenCheckPack) + function thenCheckPack (err, code, stdout, stderr) { + if (err) throw err + var tarball = stdout.trim() + t.comment(stderr.trim()) + t.is(code, 0, 'pack successful') + tar.unpack(path.join(testdir, tarball), packed, thenCheckContents) + } + function thenCheckContents (err) { + t.ifError(err, 'unpack successful') + var transitivePackedDep = path.join(packed, 'node_modules', 'b') + t.doesNotThrow(transitivePackedDep + ' exists', function () { + fs.statSync(transitivePackedDep) + }) + t.end() + } +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) diff --git a/deps/npm/test/tap/check-install-self.js b/deps/npm/test/tap/check-install-self.js index 821d8eb4d4994c..2cde1606a91e05 100644 --- a/deps/npm/test/tap/check-install-self.js +++ b/deps/npm/test/tap/check-install-self.js @@ -22,19 +22,22 @@ test('setup', function (t) { t.end() }) -var INSTALL_OPTS = ['--loglevel', 'silent'] var EXEC_OPTS = {cwd: installIn} test('install self', function (t) { - common.npm(['install', installFrom].concat(INSTALL_OPTS), EXEC_OPTS, function (err, code) { - t.ifError(err, 'npm ran without issue') + common.npm(['install', installFrom], EXEC_OPTS, function (err, code, stdout, stderr) { + if (err) throw err + t.comment(stdout.trim()) + t.comment(stderr.trim()) t.is(code, 1, 'npm install refused to install a package in itself') t.end() }) }) test('force install self', function (t) { - common.npm(['install', '--force', installFrom].concat(INSTALL_OPTS), EXEC_OPTS, function (err, code) { - t.ifError(err, 'npm ran without issue') + common.npm(['install', '--force', installFrom], EXEC_OPTS, function (err, code, stdout, stderr) { + if (err) throw err + t.comment(stdout.trim()) + t.comment(stderr.trim()) t.is(code, 0, 'npm install happily installed a package in itself with --force') t.end() }) diff --git a/deps/npm/test/tap/ignore-scripts.js b/deps/npm/test/tap/ignore-scripts.js index 8c0d350198a29a..785921d7eb2d67 100644 --- a/deps/npm/test/tap/ignore-scripts.js +++ b/deps/npm/test/tap/ignore-scripts.js @@ -40,7 +40,10 @@ var json = { postrestart: 'exit 123', preversion: 'exit 123', version: 'exit 123', - postversion: 'exit 123' + postversion: 'exit 123', + preshrinkwrap: 'exit 123', + shrinkwrap: 'exit 123', + postshrinkwrap: 'exit 123' } } @@ -73,7 +76,8 @@ var scripts = [ 'prestop', 'stop', 'poststop', 'prestart', 'start', 'poststart', 'prerestart', 'restart', 'postrestart', - 'preversion', 'version', 'postversion' + 'preversion', 'version', 'postversion', + 'preshrinkwrap', 'shrinkwrap', 'postshrinkwrap' ] scripts.forEach(function (script) { diff --git a/deps/npm/test/tap/install-actions.js b/deps/npm/test/tap/install-actions.js index c71b0044e1d603..ad75cacb5edd3d 100644 --- a/deps/npm/test/tap/install-actions.js +++ b/deps/npm/test/tap/install-actions.js @@ -20,7 +20,7 @@ test('setup', function (t) { test('->optdep:a->dep:b', function (t) { var moduleA = { name: 'a', - path: '/', + path: '/a', package: { scripts: { postinstall: 'false' @@ -28,11 +28,12 @@ test('->optdep:a->dep:b', function (t) { dependencies: { b: '*' } - } + }, + isTop: true } var moduleB = { name: 'b', - path: '/', + path: '/b', package: {}, requires: [], requiredBy: [moduleA] @@ -47,13 +48,16 @@ test('->optdep:a->dep:b', function (t) { } }, children: [moduleA, moduleB], - requires: [moduleA] + requires: [moduleA], + isTop: true } moduleA.requiredBy = [tree] + moduleA.parent = tree + moduleB.parent = tree t.plan(3) actions.postinstall('/', '/', moduleA, mockLog, function (er) { - t.ok(er && er.code === 'ELIFECYCLE', 'Lifecycle failed') + t.is(er && er.code, 'ELIFECYCLE', 'Lifecycle failed') t.ok(moduleA.failed, 'moduleA (optional dep) is marked failed') t.ok(moduleB.failed, 'moduleB (direct dep of moduleA) is marked as failed') t.end() @@ -71,14 +75,16 @@ test('->dep:b,->optdep:a->dep:b', function (t) { dependencies: { b: '*' } - } + }, + isTop: false } var moduleB = { name: 'b', path: '/', package: {}, requires: [], - requiredBy: [moduleA] + requiredBy: [moduleA], + isTop: false } moduleA.requires = [moduleB] @@ -93,10 +99,13 @@ test('->dep:b,->optdep:a->dep:b', function (t) { } }, children: [moduleA, moduleB], - requires: [moduleA, moduleB] + requires: [moduleA, moduleB], + isTop: true } moduleA.requiredBy = [tree] moduleB.requiredBy.push(tree) + moduleA.parent = tree + moduleB.parent = tree t.plan(3) actions.postinstall('/', '/', moduleA, mockLog, function (er) { diff --git a/deps/npm/test/tap/install-order.js b/deps/npm/test/tap/install-order.js index c1c4e9dca61f9f..80b3f6f45ebf77 100644 --- a/deps/npm/test/tap/install-order.js +++ b/deps/npm/test/tap/install-order.js @@ -1,15 +1,42 @@ 'use strict' var test = require('tap').test var sortActions = require('../../lib/install/diff-trees.js').sortActions - +var top = { + location: '/', + package: {}, + requiredBy: [], + requires: [a, b], + isTop: true +} var a = { - package: {_location: '/a', _requiredBy: []} + location: '/a', + package: {}, + requiredBy: [], + requires: [c], + isTop: false, + userRequired: false, + existing: false, + parent: top } var b = { - package: {_location: '/b', _requiredBy: []} + location: '/b', + package: {}, + requiredBy: [], + requires: [c], + isTop: false, + userRequired: false, + existing: false, + parent: top } var c = { - package: {_location: '/c', _requiredBy: ['/a', '/b']} + location: '/c', + package: {}, + requiredBy: [a, b], + requires: [], + isTop: false, + userRequired: false, + existing: false, + parent: top } test('install-order when installing deps', function (t) { diff --git a/deps/npm/test/tap/outdated-bad-read-tree.js b/deps/npm/test/tap/outdated-bad-read-tree.js new file mode 100644 index 00000000000000..eb4bac36ef0836 --- /dev/null +++ b/deps/npm/test/tap/outdated-bad-read-tree.js @@ -0,0 +1,21 @@ +'use strict' +var test = require('tap').test +var requireInject = require('require-inject') +var npm = require('../../lib/npm.js') + +test('setup', function (t) { + npm.load({progress: false}, t.end) +}) + +test('outdated', function (t) { + var rptError = new Error('read-package-tree') + var outdated = requireInject('../../lib/outdated.js', { + 'read-package-tree': function (dir, cb) { + cb(rptError) + } + }) + outdated([], function (err) { + t.is(err, rptError) + t.end() + }) +}) diff --git a/deps/npm/test/tap/progress-config.js b/deps/npm/test/tap/progress-config.js index 634c9e8596c17f..94d9b15f1b3896 100644 --- a/deps/npm/test/tap/progress-config.js +++ b/deps/npm/test/tap/progress-config.js @@ -13,19 +13,22 @@ var requireInject = require('require-inject') // Make sure existing environment vars don't muck up the test process.env = {} - -function hasOnlyAscii (s) { - return /^[\000-\177]*$/.test(s) -} +// Pretend that stderr is a tty regardless, so we can get consistent +// results. +process.stderr.isTTY = true test('setup', function (t) { fs.writeFileSync(configName, '') t.done() }) +function getFreshNpm () { + return requireInject.withEmptyCache('../../lib/npm.js', {npmlog: log}) +} + test('disabled', function (t) { t.plan(1) - var npm = requireInject('../../lib/npm.js', {}) + var npm = getFreshNpm() npm.load({userconfig: configName, progress: false}, function () { t.is(log.progressEnabled, false, 'should be disabled') }) @@ -33,7 +36,7 @@ test('disabled', function (t) { test('enabled', function (t) { t.plan(1) - var npm = requireInject('../../lib/npm.js', {}) + var npm = getFreshNpm() npm.load({userconfig: configName, progress: true}, function () { t.is(log.progressEnabled, true, 'should be enabled') }) @@ -41,7 +44,7 @@ test('enabled', function (t) { test('default', function (t) { t.plan(1) - var npm = requireInject('../../lib/npm.js', {}) + var npm = getFreshNpm() npm.load({userconfig: configName}, function () { t.is(log.progressEnabled, true, 'should be enabled') }) @@ -49,41 +52,37 @@ test('default', function (t) { test('default-travis', function (t) { t.plan(1) - global.process.env.TRAVIS = 'true' - var npm = requireInject('../../lib/npm.js', {}) + process.env.TRAVIS = 'true' + var npm = getFreshNpm() npm.load({userconfig: configName}, function () { t.is(log.progressEnabled, false, 'should be disabled') - delete global.process.env.TRAVIS + delete process.env.TRAVIS }) }) test('default-ci', function (t) { t.plan(1) - global.process.env.CI = 'true' - var npm = requireInject('../../lib/npm.js', {}) + process.env.CI = 'true' + var npm = getFreshNpm() npm.load({userconfig: configName}, function () { t.is(log.progressEnabled, false, 'should be disabled') - delete global.process.env.CI + delete process.env.CI }) }) test('unicode-true', function (t) { - t.plan(6) - var npm = requireInject('../../lib/npm.js', {}) + var npm = getFreshNpm() npm.load({userconfig: configName, unicode: true}, function () { - Object.keys(log.gauge.theme).forEach(function (key) { - t.notOk(hasOnlyAscii(log.gauge.theme[key]), 'only unicode') - }) + t.is(log.gauge._theme.hasUnicode, true, 'unicode will be selected') + t.done() }) }) test('unicode-false', function (t) { - t.plan(6) - var npm = requireInject('../../lib/npm.js', {}) + var npm = getFreshNpm() npm.load({userconfig: configName, unicode: false}, function () { - Object.keys(log.gauge.theme).forEach(function (key) { - t.ok(hasOnlyAscii(log.gauge.theme[key]), 'only ASCII') - }) + t.is(log.gauge._theme.hasUnicode, false, 'unicode will NOT be selected') + t.done() }) }) diff --git a/deps/npm/test/tap/shared-linked.js b/deps/npm/test/tap/shared-linked.js new file mode 100644 index 00000000000000..63c2538da1f7a4 --- /dev/null +++ b/deps/npm/test/tap/shared-linked.js @@ -0,0 +1,152 @@ +'use strict' +var path = require('path') +var test = require('tap').test +var Tacks = require('tacks') +var File = Tacks.File +var Symlink = Tacks.Symlink +var Dir = Tacks.Dir +var common = require('../common-tap.js') +var mr = require('npm-registry-mock') +var extend = Object.assign || require('util')._extend + +var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var bugdir = path.join(testdir, 'modules', 'bug') + +// This is an absolutely minimal version of the optimist included with +// npm-registry-mock. +var optimist = Dir({ + 'package.json': File({ + dependencies: { + minimist: '~0.0.1', + wordwrap: '~0.0.2' + }, + name: 'optimist', + version: '0.6.0' + }), + node_modules: Dir({ + minimist: Dir({ + 'package.json': File({ + _shasum: 'd7aa327bcecf518f9106ac6b8f003fa3bcea8566', + name: 'minimist', + version: '0.0.5' + }) + }), + wordwrap: Dir({ + 'package.json': File({ + _shasum: 'b79669bb42ecb409f83d583cad52ca17eaa1643f', + name: 'wordwrap', + version: '0.0.2' + }) + }) + }) +}) + +var fixture = new Tacks( + Dir({ + cache: Dir({}), + global: Dir({ + lib: Dir({ + node_modules: Dir({ + linked1: Symlink('../../../modules/linked1/'), + linked2: Symlink('../../../modules/linked2/') + }) + }) + }), + modules: Dir({ + bug: Dir({ + node_modules: Dir({ + linked1: Symlink('../../../global/lib/node_modules/linked1'), + linked2: Symlink('../../../global/lib/node_modules/linked2') + }), + 'package.json': File({ + name: 'bug', + version: '10800.0.0', + devDependencies: { + optimist: '0.6.0', + linked1: '^1.0.0', + linked2: '^1.0.0' + } + }) + }), + linked1: Dir({ + 'package.json': File({ + name: 'linked1', + version: '1.0.0', + devDependencies: { + optimist: '0.6.0' + } + }), + node_modules: Dir({ + optimist: optimist + }) + }), + linked2: Dir({ + 'package.json': File({ + name: 'linked2', + version: '1.0.0', + devDependencies: { + optimist: '0.6.0', + linked1: '^1.0.0' + } + }), + node_modules: Dir({ + linked1: Symlink('../../../global/lib/node_modules/linked1'), + optimist: optimist + }) + }) + }) + }) +) + +function setup () { + cleanup() + fixture.create(testdir) +} + +function cleanup () { + fixture.remove(testdir) +} + +var server +test('setup', function (t) { + setup() + mr({port: common.port}, function (er, s) { + t.ifError(er) + server = s + t.end() + }) +}) + +test('shared-linked', function (t) { + var options = { + cwd: bugdir, + env: extend(extend({}, process.env), { + npm_config_prefix: path.join(testdir, 'global') + }) + } + var config = [ + '--cache', path.join(testdir, 'cache'), + '--registry', common.registry, + '--unicode', 'false' + ] + + common.npm(config.concat(['install', '--dry-run']), options, function (err, code, stdout, stderr) { + if (err) throw err + t.is(code, 0) + var got = stdout.trim().replace(/\s+\n/g, '\n') + var expected = + 'bug@10800.0.0 ' + bugdir + '\n' + + '`-- optimist@0.6.0\n' + + ' +-- minimist@0.0.5\n' + + ' `-- wordwrap@0.0.2' + t.is(got, expected, 'just an optimist install please') + server.done() + t.end() + }) +}) + +test('cleanup', function (t) { + if (server) server.close() + cleanup() + t.end() +}) diff --git a/deps/npm/test/tap/shrinkwrap-lifecycle.js b/deps/npm/test/tap/shrinkwrap-lifecycle.js new file mode 100644 index 00000000000000..0e84259667c488 --- /dev/null +++ b/deps/npm/test/tap/shrinkwrap-lifecycle.js @@ -0,0 +1,55 @@ +var fs = require('graceful-fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var common = require('../common-tap.js') +var pkg = path.resolve(__dirname, 'shrinkwrap-lifecycle') + +test('npm shrinkwrap execution order', function (t) { + setup() + fs.writeFileSync(path.resolve(pkg, 'package.json'), JSON.stringify({ + author: 'Simen Bekkhus', + name: 'shrinkwrap-lifecycle', + shrinkwrap: '0.0.0', + description: 'Test for npm shrinkwrap execution order', + scripts: { + preshrinkwrap: 'echo this happens first', + shrinkwrap: 'echo this happens second', + postshrinkwrap: 'echo this happens third' + } + }), 'utf8') + common.npm(['shrinkwrap'], [], function (err, code, stdout) { + if (err) throw err + + var indexOfFirst = stdout.indexOf('echo this happens first') + var indexOfSecond = stdout.indexOf('echo this happens second') + var indexOfThird = stdout.indexOf('wrote npm-shrinkwrap.json') + var indexOfFourth = stdout.indexOf('echo this happens third') + + t.ok(indexOfFirst >= 0) + t.ok(indexOfSecond >= 0) + t.ok(indexOfThird >= 0) + t.ok(indexOfFourth >= 0) + + t.ok(indexOfFirst < indexOfSecond) + t.ok(indexOfSecond < indexOfThird) + t.ok(indexOfThird < indexOfFourth) + + t.end() + }) +}) + +test('cleanup', function (t) { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) + t.end() +}) + +function setup () { + mkdirp.sync(pkg) + process.chdir(pkg) +} diff --git a/deps/npm/test/tap/unit-deps-childDependencySpecifier.js b/deps/npm/test/tap/unit-deps-childDependencySpecifier.js new file mode 100644 index 00000000000000..600b719fb2bade --- /dev/null +++ b/deps/npm/test/tap/unit-deps-childDependencySpecifier.js @@ -0,0 +1,56 @@ +'use strict' +var test = require('tap').test +var requireInject = require('require-inject') +var asap = require('asap') + +// we're just mocking to avoid having to call `npm.load` +var deps = requireInject('../../lib/install/deps.js', { + '../../lib/npm.js': { + config: { + get: function () { return 'mock' } + } + } +}) + +var childDependencySpecifier = deps._childDependencySpecifier + +test('childDependencySpecifier', function (t) { + var tree = { + resolved: {}, + package: { + name: 'bar', + _requested: '' + } + } + + childDependencySpecifier(tree, 'foo', '^1.0.0', function () { + t.deepEqual(tree.resolved, { + foo: { + '^1.0.0': { + raw: 'foo@^1.0.0', + escapedName: 'foo', + scope: null, + name: 'foo', + rawSpec: '^1.0.0', + spec: '>=1.0.0 <2.0.0', + type: 'range' + } + } + }, 'should populate resolved') + + var order = [] + + childDependencySpecifier(tree, 'foo', '^1.0.0', function () { + order.push(1) + childDependencySpecifier(tree, 'foo', '^1.0.0', function () { + order.push(3) + t.deepEqual(order, [1, 2, 3], 'should yield nested callbacks') + t.end() + }) + }) + + asap(function () { + order.push(2) + }) + }) +}) diff --git a/deps/npm/test/tap/unit-deps-removeObsoleteDep.js b/deps/npm/test/tap/unit-deps-removeObsoleteDep.js index 2e34fd730f2b6f..8bba0d0da1bac6 100644 --- a/deps/npm/test/tap/unit-deps-removeObsoleteDep.js +++ b/deps/npm/test/tap/unit-deps-removeObsoleteDep.js @@ -11,7 +11,7 @@ var deps = requireInject('../../lib/install/deps.js', { } }) -var removeObsoleteDep = deps._removeObsoleteDep +var removeObsoleteDep = deps.removeObsoleteDep test('removeObsoleteDep', function (t) { var child1 = {requiredBy: []} diff --git a/deps/npm/test/tap/unit-deps-replaceModule.js b/deps/npm/test/tap/unit-deps-replaceModule.js index d38aa9985d7fed..d5f0fdbf89f268 100644 --- a/deps/npm/test/tap/unit-deps-replaceModule.js +++ b/deps/npm/test/tap/unit-deps-replaceModule.js @@ -6,45 +6,60 @@ test('setup', function (t) { npm.load({}, t.done) }) -test('replaceModule', function (t) { - var replaceModule = require('../../lib/install/deps')._replaceModule +test('replaceModuleByName', function (t) { + var replaceModuleByName = require('../../lib/install/deps')._replaceModuleByName var mods = [] for (var ii = 0; ii < 10; ++ii) { - mods.push({package: {name: ii}}) + mods.push({package: {name: ii}, path: '/path/to/' + ii}) } var test = {} test.A = mods.slice(0, 4) - replaceModule(test, 'A', mods[2]) + replaceModuleByName(test, 'A', mods[2]) t.isDeeply(test.A, mods.slice(0, 4), 'replacing an existing module leaves the order alone') - replaceModule(test, 'A', mods[7]) + replaceModuleByName(test, 'A', mods[7]) t.isDeeply(test.A, mods.slice(0, 4).concat(mods[7]), 'replacing a new module appends') test.B = mods.slice(0, 4) var replacement = {package: {name: 1}, isReplacement: true} - replaceModule(test, 'B', replacement) + replaceModuleByName(test, 'B', replacement) t.isDeeply(test.B, [mods[0], replacement, mods[2], mods[3]], 'replacing existing module swaps out for the new version') - replaceModule(test, 'C', mods[7]) + replaceModuleByName(test, 'C', mods[7]) t.isDeeply(test.C, [mods[7]], 'replacing when the key does not exist yet, causes its creation') + + test.D = mods.slice(0, 4) + var duplicateByPath = {package: {name: 'dup'}, path: test.D[0].path} + replaceModuleByName(test, 'D', duplicateByPath) + t.isDeeply(test.D, mods.slice(0, 4).concat(duplicateByPath), 'replacing with a duplicate path but diff names appends') t.end() }) -test('replaceModuleName', function (t) { - var replaceModuleName = require('../../lib/install/deps')._replaceModuleName +test('replaceModuleByPath', function (t) { + var replaceModuleByPath = require('../../lib/install/deps')._replaceModuleByPath var mods = [] for (var ii = 0; ii < 10; ++ii) { - mods.push('pkg' + ii) + mods.push({package: {name: ii}, path: '/path/to/' + ii}) } var test = {} test.A = mods.slice(0, 4) - replaceModuleName(test, 'A', mods[2]) + replaceModuleByPath(test, 'A', mods[2]) t.isDeeply(test.A, mods.slice(0, 4), 'replacing an existing module leaves the order alone') - replaceModuleName(test, 'A', mods[7]) + replaceModuleByPath(test, 'A', mods[7]) t.isDeeply(test.A, mods.slice(0, 4).concat(mods[7]), 'replacing a new module appends') - replaceModuleName(test, 'C', mods[7]) + test.B = mods.slice(0, 4) + var replacement = {package: {name: 1}, isReplacement: true, path: '/path/to/1'} + replaceModuleByPath(test, 'B', replacement) + t.isDeeply(test.B, [mods[0], replacement, mods[2], mods[3]], 'replacing existing module swaps out for the new version') + + replaceModuleByPath(test, 'C', mods[7]) t.isDeeply(test.C, [mods[7]], 'replacing when the key does not exist yet, causes its creation') + + test.D = mods.slice(0, 4) + var duplicateByPath = {package: {name: 'dup'}, path: test.D[0].path} + replaceModuleByPath(test, 'D', duplicateByPath) + t.isDeeply(test.D, [duplicateByPath].concat(mods.slice(1, 4)), 'replacing with a duplicate path but diff names replaces') t.end() }) diff --git a/deps/openssl/masm_compile.gypi b/deps/openssl/masm_compile.gypi deleted file mode 100644 index c18e484f73c3b1..00000000000000 --- a/deps/openssl/masm_compile.gypi +++ /dev/null @@ -1,44 +0,0 @@ -{ - 'conditions': [ - ['target_arch=="ia32"', { - 'rules': [ - { - 'rule_name': 'Assemble', - 'extension': 'asm', - 'inputs': [], - 'outputs': [ - '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj', - ], - 'action': [ - 'ml.exe', - '/Zi', - '/safeseh', - '/Fo', '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj', - '/c', '<(RULE_INPUT_PATH)', - ], - 'process_outputs_as_sources': 0, - 'message': 'Assembling <(RULE_INPUT_PATH) to <(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj.', - } - ], - }, 'target_arch=="x64"', { - 'rules': [ - { - 'rule_name': 'Assemble', - 'extension': 'asm', - 'inputs': [], - 'outputs': [ - '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj', - ], - 'action': [ - 'ml64.exe', - '/Zi', - '/Fo', '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj', - '/c', '<(RULE_INPUT_PATH)', - ], - 'process_outputs_as_sources': 0, - 'message': 'Assembling <(RULE_INPUT_PATH) to <(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj.', - } - ], - }], - ], -} diff --git a/deps/openssl/openssl.gyp b/deps/openssl/openssl.gyp index db57033d54e20e..b25efe60d5e8e6 100644 --- a/deps/openssl/openssl.gyp +++ b/deps/openssl/openssl.gyp @@ -121,7 +121,12 @@ }], # end of conditions of openssl_no_asm ['OS=="win"', { 'defines' : ['<@(openssl_defines_all_win)'], - 'includes': ['masm_compile.gypi',], + 'msvs_settings': { + 'MASM': { + # Use /safeseh, see commit: 01fa5ee + 'UseSafeExceptionHandlers': 'true', + }, + }, }, { 'defines' : ['<@(openssl_defines_all_non_win)'] }] diff --git a/deps/v8/.ycm_extra_conf.py b/deps/v8/.ycm_extra_conf.py index e065a0896bdb82..a451d9f31c34b0 100644 --- a/deps/v8/.ycm_extra_conf.py +++ b/deps/v8/.ycm_extra_conf.py @@ -42,7 +42,7 @@ # Flags from YCM's default config. flags = [ '-DUSE_CLANG_COMPLETER', -'-std=gnu++0x', +'-std=gnu++11', '-x', 'c++', ] diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index ceffb49a99be45..60b6c51db5eb1a 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -71,6 +71,7 @@ Jianghua Yang Joel Stanley Johan Bergström Jonathan Liu +Julien Brianceau JunHo Seo Kang-Hao (Kenny) Lu Karl Skomski @@ -87,6 +88,7 @@ Michael Smith Mike Gilbert Mike Pennisi Milton Chiang +Myeong-bo Shim Nicolas Antonius Ernst Leopold Maria Kaiser Paolo Giarrusso Patrick Gansterer diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index 5f3baf23c9cff6..28aca24afc81c4 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -21,6 +21,12 @@ declare_args() { # Enable the snapshot feature, for fast context creation. # http://v8project.blogspot.com/2015/09/custom-startup-snapshots.html v8_use_snapshot = true + + # Similar to vfp but on MIPS. + v8_can_use_fpu_instructions = true + + # Similar to the ARM hard float ABI but on MIPS. + v8_use_mips_abi_hardfloat = true } # TODO(jochen): These will need to be user-settable to support standalone V8 @@ -28,7 +34,7 @@ declare_args() { v8_deprecation_warnings = false v8_enable_disassembler = false v8_enable_gdbjit = false -v8_enable_handle_zapping = is_debug +v8_enable_handle_zapping = false v8_enable_i18n_support = true v8_enable_verify_heap = false v8_interpreted_regexp = false @@ -77,6 +83,11 @@ config("internal_config_base") { include_dirs = [ "." ] } +# This config should be applied to code using the libplatform. +config("libplatform_config") { + include_dirs = [ "include" ] +} + # This config should only be applied to code using V8 and not any V8 code # itself. config("external_config") { @@ -137,48 +148,93 @@ config("toolchain") { defines = [] cflags = [] - # TODO(jochen): Add support for arm subarchs, mips, mipsel, mips64el. - if (v8_target_arch == "arm") { defines += [ "V8_TARGET_ARCH_ARM" ] - if (current_cpu == "arm") { - if (arm_version == 7) { - defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ] - } - if (arm_fpu == "vfpv3-d16") { - defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ] - } else if (arm_fpu == "vfpv3") { - defines += [ - "CAN_USE_VFP3_INSTRUCTIONS", - "CAN_USE_VFP32DREGS", - ] - } else if (arm_fpu == "neon") { - defines += [ - "CAN_USE_VFP3_INSTRUCTIONS", - "CAN_USE_VFP32DREGS", - "CAN_USE_NEON", - ] - } - } else { - # These defines ares used for the ARM simulator. + if (arm_version == 7) { + defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ] + } + if (arm_fpu == "vfpv3-d16") { + defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ] + } else if (arm_fpu == "vfpv3") { + defines += [ + "CAN_USE_VFP3_INSTRUCTIONS", + "CAN_USE_VFP32DREGS", + ] + } else if (arm_fpu == "neon") { defines += [ - "CAN_USE_ARMV7_INSTRUCTIONS", "CAN_USE_VFP3_INSTRUCTIONS", "CAN_USE_VFP32DREGS", - "USE_EABI_HARDFLOAT=0", + "CAN_USE_NEON", ] } - # TODO(jochen): Add support for arm_test_noprobe. + + if (current_cpu != "arm") { + # These defines ares used for the ARM simulator. + if (arm_float_abi == "hard") { + defines += [ "USE_EABI_HARDFLOAT=1" ] + } else if (arm_float_abi == "softfp") { + defines += [ "USE_EABI_HARDFLOAT=0" ] + } + } } if (v8_target_arch == "arm64") { defines += [ "V8_TARGET_ARCH_ARM64" ] } + # TODO(jochen): Add support for mips. if (v8_target_arch == "mipsel") { defines += [ "V8_TARGET_ARCH_MIPS" ] + if (v8_can_use_fpu_instructions) { + defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] + } + if (v8_use_mips_abi_hardfloat) { + defines += [ + "__mips_hard_float=1", + "CAN_USE_FPU_INSTRUCTIONS", + ] + } else { + defines += [ "__mips_soft_float=1" ] + } + if (mips_arch_variant == "r6") { + defines += [ + "_MIPS_ARCH_MIPS32R6", + "FPU_MODE_FP64", + ] + } else if (mips_arch_variant == "r2") { + defines += [ "_MIPS_ARCH_MIPS32R2" ] + if (mips_fpu_mode == "fp64") { + defines += [ "FPU_MODE_FP64" ] + } else if (mips_fpu_mode == "fpxx") { + defines += [ "FPU_MODE_FPXX" ] + } else if (mips_fpu_mode == "fp32") { + defines += [ "FPU_MODE_FP32" ] + } + } else if (mips_arch_variant == "r1") { + defines += [ "FPU_MODE_FP32" ] + } + # TODO(jochen): Add support for mips_arch_variant rx and loongson. } + # TODO(jochen): Add support for mips64. if (v8_target_arch == "mips64el") { defines += [ "V8_TARGET_ARCH_MIPS64" ] + if (v8_can_use_fpu_instructions) { + defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] + } + # TODO(jochen): Add support for big endian host byteorder. + defines += [ "V8_TARGET_ARCH_MIPS64_LE" ] + if (v8_use_mips_abi_hardfloat) { + defines += [ + "__mips_hard_float=1", + "CAN_USE_FPU_INSTRUCTIONS", + ] + } else { + defines += [ "__mips_soft_float=1" ] + } + if (mips_arch_variant == "r6") { + defines += [ "_MIPS_ARCH_MIPS64R6" ] + } else if (mips_arch_variant == "r2") { + defines += [ "_MIPS_ARCH_MIPS64R2" ] + } } if (v8_target_arch == "s390") { defines += [ "V8_TARGET_ARCH_S390" ] @@ -227,8 +283,11 @@ action("js2c") { # The script depends on this other script, this rule causes a rebuild if it # changes. - inputs = [ "tools/jsmin.py" ] + inputs = [ + "tools/jsmin.py", + ] + # NOSORT sources = [ "src/js/macros.py", "src/messages.h", @@ -257,6 +316,7 @@ action("js2c") { "src/js/string-iterator.js", "src/js/templates.js", "src/js/spread.js", + "src/js/proxy.js", "src/debug/mirrors.js", "src/debug/debug.js", "src/debug/liveedit.js", @@ -291,21 +351,24 @@ action("js2c_experimental") { # The script depends on this other script, this rule causes a rebuild if it # changes. - inputs = [ "tools/jsmin.py" ] + inputs = [ + "tools/jsmin.py", + ] + # NOSORT sources = [ "src/js/macros.py", "src/messages.h", - "src/js/proxy.js", "src/js/generator.js", "src/js/harmony-atomics.js", - "src/js/harmony-regexp.js", + "src/js/harmony-regexp-exec.js", "src/js/harmony-object-observe.js", "src/js/harmony-sharedarraybuffer.js", "src/js/harmony-simd.js", "src/js/harmony-species.js", "src/js/harmony-unicode-regexps.js", - "src/js/promise-extra.js" + "src/js/harmony-string-padding.js", + "src/js/promise-extra.js", ] outputs = [ @@ -334,7 +397,9 @@ action("js2c_extras") { # The script depends on this other script, this rule causes a rebuild if it # changes. - inputs = [ "tools/jsmin.py" ] + inputs = [ + "tools/jsmin.py", + ] sources = v8_extra_library_files @@ -343,8 +408,7 @@ action("js2c_extras") { ] args = [ - rebase_path("$target_gen_dir/extras-libraries.cc", - root_build_dir), + rebase_path("$target_gen_dir/extras-libraries.cc", root_build_dir), "EXTRAS", ] + rebase_path(sources, root_build_dir) @@ -364,7 +428,9 @@ action("js2c_experimental_extras") { # The script depends on this other script, this rule causes a rebuild if it # changes. - inputs = [ "tools/jsmin.py" ] + inputs = [ + "tools/jsmin.py", + ] sources = v8_experimental_extra_library_files @@ -382,7 +448,8 @@ action("js2c_experimental_extras") { outputs += [ "$target_gen_dir/libraries_experimental_extras.bin" ] args += [ "--startup_blob", - rebase_path("$target_gen_dir/libraries_experimental_extras.bin", root_build_dir), + rebase_path("$target_gen_dir/libraries_experimental_extras.bin", + root_build_dir), ] } } @@ -392,6 +459,7 @@ action("d8_js2c") { script = "tools/js2c.py" + # NOSORT inputs = [ "src/d8.js", "src/js/macros.py", @@ -425,10 +493,11 @@ if (v8_use_external_startup_data) { deps = [ ":js2c", ":js2c_experimental", - ":js2c_extras", ":js2c_experimental_extras", + ":js2c_extras", ] + # NOSORT sources = [ "$target_gen_dir/libraries.bin", "$target_gen_dir/libraries_experimental.bin", @@ -456,6 +525,7 @@ action("postmortem-metadata") { script = "tools/gen-postmortem-metadata.py" + # NOSORT sources = [ "src/objects.h", "src/objects-inl.h", @@ -486,9 +556,6 @@ action("run_mksnapshot") { "./" + rebase_path(get_label_info(":mksnapshot($snapshot_toolchain)", "root_out_dir") + "/mksnapshot", root_build_dir), - "--log-snapshot-positions", - "--logfile", - rebase_path("$target_gen_dir/snapshot.log", root_build_dir), "--startup_src", rebase_path("$target_gen_dir/snapshot.cc", root_build_dir), ] @@ -519,16 +586,16 @@ source_set("v8_nosnapshot") { deps = [ ":js2c", ":js2c_experimental", - ":js2c_extras", ":js2c_experimental_extras", + ":js2c_extras", ":v8_base", ] sources = [ - "$target_gen_dir/libraries.cc", + "$target_gen_dir/experimental-extras-libraries.cc", "$target_gen_dir/experimental-libraries.cc", "$target_gen_dir/extras-libraries.cc", - "$target_gen_dir/experimental-extras-libraries.cc", + "$target_gen_dir/libraries.cc", "src/snapshot/snapshot-empty.cc", ] @@ -552,8 +619,8 @@ source_set("v8_snapshot") { deps = [ ":js2c", ":js2c_experimental", - ":js2c_extras", ":js2c_experimental_extras", + ":js2c_extras", ":v8_base", ] public_deps = [ @@ -563,10 +630,10 @@ source_set("v8_snapshot") { ] sources = [ - "$target_gen_dir/libraries.cc", + "$target_gen_dir/experimental-extras-libraries.cc", "$target_gen_dir/experimental-libraries.cc", "$target_gen_dir/extras-libraries.cc", - "$target_gen_dir/experimental-extras-libraries.cc", + "$target_gen_dir/libraries.cc", "$target_gen_dir/snapshot.cc", ] @@ -586,8 +653,8 @@ if (v8_use_external_startup_data) { deps = [ ":js2c", ":js2c_experimental", - ":js2c_extras", ":js2c_experimental_extras", + ":js2c_extras", ":v8_base", ] public_deps = [ @@ -629,22 +696,24 @@ source_set("v8_base") { "src/accessors.h", "src/address-map.cc", "src/address-map.h", - "src/allocation.cc", - "src/allocation.h", "src/allocation-site-scopes.cc", "src/allocation-site-scopes.h", - "src/api.cc", - "src/api.h", + "src/allocation.cc", + "src/allocation.h", + "src/api-arguments.cc", + "src/api-arguments.h", "src/api-experimental.cc", "src/api-experimental.h", "src/api-natives.cc", "src/api-natives.h", + "src/api.cc", + "src/api.h", "src/arguments.cc", "src/arguments.h", "src/assembler.cc", "src/assembler.h", - "src/assert-scope.h", "src/assert-scope.cc", + "src/assert-scope.h", "src/ast/ast-expression-rewriter.cc", "src/ast/ast-expression-rewriter.h", "src/ast/ast-expression-visitor.cc", @@ -684,27 +753,30 @@ source_set("v8_base") { "src/bootstrapper.h", "src/builtins.cc", "src/builtins.h", - "src/cancelable-task.cc", - "src/cancelable-task.h", "src/cached-powers.cc", "src/cached-powers.h", - "src/char-predicates.cc", + "src/cancelable-task.cc", + "src/cancelable-task.h", "src/char-predicates-inl.h", + "src/char-predicates.cc", "src/char-predicates.h", "src/checks.h", "src/code-factory.cc", "src/code-factory.h", + "src/code-stubs-hydrogen.cc", "src/code-stubs.cc", "src/code-stubs.h", - "src/code-stubs-hydrogen.cc", "src/codegen.cc", "src/codegen.h", + "src/collector.h", "src/compilation-cache.cc", "src/compilation-cache.h", "src/compilation-dependencies.cc", "src/compilation-dependencies.h", "src/compilation-statistics.cc", "src/compilation-statistics.h", + "src/compiler.cc", + "src/compiler.h", "src/compiler/access-builder.cc", "src/compiler/access-builder.h", "src/compiler/access-info.cc", @@ -723,9 +795,9 @@ source_set("v8_base") { "src/compiler/bytecode-branch-analysis.h", "src/compiler/bytecode-graph-builder.cc", "src/compiler/bytecode-graph-builder.h", + "src/compiler/c-linkage.cc", "src/compiler/change-lowering.cc", "src/compiler/change-lowering.h", - "src/compiler/c-linkage.cc", "src/compiler/coalesced-live-ranges.cc", "src/compiler/coalesced-live-ranges.h", "src/compiler/code-generator-impl.h", @@ -748,18 +820,16 @@ source_set("v8_base") { "src/compiler/dead-code-elimination.cc", "src/compiler/dead-code-elimination.h", "src/compiler/diamond.h", - "src/compiler/escape-analysis.cc", - "src/compiler/escape-analysis.h", "src/compiler/escape-analysis-reducer.cc", "src/compiler/escape-analysis-reducer.h", - "src/compiler/fast-accessor-assembler.cc", - "src/compiler/fast-accessor-assembler.h", - "src/compiler/frame.cc", - "src/compiler/frame.h", + "src/compiler/escape-analysis.cc", + "src/compiler/escape-analysis.h", "src/compiler/frame-elider.cc", "src/compiler/frame-elider.h", "src/compiler/frame-states.cc", "src/compiler/frame-states.h", + "src/compiler/frame.cc", + "src/compiler/frame.h", "src/compiler/gap-resolver.cc", "src/compiler/gap-resolver.h", "src/compiler/graph-reducer.cc", @@ -800,10 +870,10 @@ source_set("v8_base") { "src/compiler/js-global-object-specialization.h", "src/compiler/js-graph.cc", "src/compiler/js-graph.h", - "src/compiler/js-inlining.cc", - "src/compiler/js-inlining.h", "src/compiler/js-inlining-heuristic.cc", "src/compiler/js-inlining-heuristic.h", + "src/compiler/js-inlining.cc", + "src/compiler/js-inlining.h", "src/compiler/js-intrinsic-lowering.cc", "src/compiler/js-intrinsic-lowering.h", "src/compiler/js-native-context-specialization.cc", @@ -822,9 +892,9 @@ source_set("v8_base") { "src/compiler/liveness-analyzer.h", "src/compiler/load-elimination.cc", "src/compiler/load-elimination.h", - "src/compiler/loop-peeling.cc", "src/compiler/loop-analysis.cc", "src/compiler/loop-analysis.h", + "src/compiler/loop-peeling.cc", "src/compiler/machine-operator-reducer.cc", "src/compiler/machine-operator-reducer.h", "src/compiler/machine-operator.cc", @@ -850,16 +920,16 @@ source_set("v8_base") { "src/compiler/operator.h", "src/compiler/osr.cc", "src/compiler/osr.h", - "src/compiler/pipeline.cc", - "src/compiler/pipeline.h", "src/compiler/pipeline-statistics.cc", "src/compiler/pipeline-statistics.h", + "src/compiler/pipeline.cc", + "src/compiler/pipeline.h", "src/compiler/raw-machine-assembler.cc", "src/compiler/raw-machine-assembler.h", - "src/compiler/register-allocator.cc", - "src/compiler/register-allocator.h", "src/compiler/register-allocator-verifier.cc", "src/compiler/register-allocator-verifier.h", + "src/compiler/register-allocator.cc", + "src/compiler/register-allocator.h", "src/compiler/representation-change.cc", "src/compiler/representation-change.h", "src/compiler/schedule.cc", @@ -895,8 +965,6 @@ source_set("v8_base") { "src/compiler/wasm-linkage.cc", "src/compiler/zone-pool.cc", "src/compiler/zone-pool.h", - "src/compiler.cc", - "src/compiler.h", "src/context-measure.cc", "src/context-measure.h", "src/contexts-inl.h", @@ -907,11 +975,11 @@ source_set("v8_base") { "src/conversions.h", "src/counters.cc", "src/counters.h", + "src/crankshaft/compilation-phase.cc", + "src/crankshaft/compilation-phase.h", "src/crankshaft/hydrogen-alias-analysis.h", "src/crankshaft/hydrogen-bce.cc", "src/crankshaft/hydrogen-bce.h", - "src/crankshaft/hydrogen-bch.cc", - "src/crankshaft/hydrogen-bch.h", "src/crankshaft/hydrogen-canonicalize.cc", "src/crankshaft/hydrogen-canonicalize.h", "src/crankshaft/hydrogen-check-elimination.cc", @@ -1011,12 +1079,16 @@ source_set("v8_base") { "src/extensions/statistics-extension.h", "src/extensions/trigger-failure-extension.cc", "src/extensions/trigger-failure-extension.h", + "src/external-reference-table.cc", + "src/external-reference-table.h", "src/factory.cc", "src/factory.h", + "src/fast-accessor-assembler.cc", + "src/fast-accessor-assembler.h", "src/fast-dtoa.cc", "src/fast-dtoa.h", - "src/field-index.h", "src/field-index-inl.h", + "src/field-index.h", "src/field-type.cc", "src/field-type.h", "src/fixed-dtoa.cc", @@ -1064,47 +1136,43 @@ source_set("v8_base") { "src/heap/objects-visiting-inl.h", "src/heap/objects-visiting.cc", "src/heap/objects-visiting.h", + "src/heap/page-parallel-job.h", "src/heap/remembered-set.cc", "src/heap/remembered-set.h", - "src/heap/scavenge-job.h", "src/heap/scavenge-job.cc", + "src/heap/scavenge-job.h", "src/heap/scavenger-inl.h", "src/heap/scavenger.cc", "src/heap/scavenger.h", "src/heap/slot-set.h", - "src/heap/slots-buffer.cc", - "src/heap/slots-buffer.h", "src/heap/spaces-inl.h", "src/heap/spaces.cc", "src/heap/spaces.h", - "src/heap/store-buffer-inl.h", "src/heap/store-buffer.cc", "src/heap/store-buffer.h", "src/i18n.cc", "src/i18n.h", - "src/icu_util.cc", - "src/icu_util.h", "src/ic/access-compiler.cc", "src/ic/access-compiler.h", "src/ic/call-optimization.cc", "src/ic/call-optimization.h", "src/ic/handler-compiler.cc", "src/ic/handler-compiler.h", + "src/ic/ic-compiler.cc", + "src/ic/ic-compiler.h", "src/ic/ic-inl.h", "src/ic/ic-state.cc", "src/ic/ic-state.h", "src/ic/ic.cc", "src/ic/ic.h", - "src/ic/ic-compiler.cc", - "src/ic/ic-compiler.h", "src/ic/stub-cache.cc", "src/ic/stub-cache.h", + "src/icu_util.cc", + "src/icu_util.h", "src/identity-map.cc", "src/identity-map.h", "src/interface-descriptors.cc", "src/interface-descriptors.h", - "src/interpreter/bytecodes.cc", - "src/interpreter/bytecodes.h", "src/interpreter/bytecode-array-builder.cc", "src/interpreter/bytecode-array-builder.h", "src/interpreter/bytecode-array-iterator.cc", @@ -1114,18 +1182,20 @@ source_set("v8_base") { "src/interpreter/bytecode-register-allocator.cc", "src/interpreter/bytecode-register-allocator.h", "src/interpreter/bytecode-traits.h", + "src/interpreter/bytecodes.cc", + "src/interpreter/bytecodes.h", "src/interpreter/constant-array-builder.cc", "src/interpreter/constant-array-builder.h", "src/interpreter/control-flow-builders.cc", "src/interpreter/control-flow-builders.h", "src/interpreter/handler-table-builder.cc", "src/interpreter/handler-table-builder.h", - "src/interpreter/interpreter.cc", - "src/interpreter/interpreter.h", "src/interpreter/interpreter-assembler.cc", "src/interpreter/interpreter-assembler.h", - "src/interpreter/register-translator.cc", - "src/interpreter/register-translator.h", + "src/interpreter/interpreter-intrinsics.cc", + "src/interpreter/interpreter-intrinsics.h", + "src/interpreter/interpreter.cc", + "src/interpreter/interpreter.h", "src/interpreter/source-position-table.cc", "src/interpreter/source-position-table.h", "src/isolate-inl.h", @@ -1133,8 +1203,8 @@ source_set("v8_base") { "src/isolate.h", "src/json-parser.h", "src/json-stringifier.h", - "src/key-accumulator.h", - "src/key-accumulator.cc", + "src/keys.cc", + "src/keys.h", "src/layout-descriptor-inl.h", "src/layout-descriptor.cc", "src/layout-descriptor.h", @@ -1147,9 +1217,9 @@ source_set("v8_base") { "src/log.h", "src/lookup.cc", "src/lookup.h", - "src/macro-assembler.h", "src/machine-type.cc", "src/machine-type.h", + "src/macro-assembler.h", "src/messages.cc", "src/messages.h", "src/msan.h", @@ -1188,6 +1258,8 @@ source_set("v8_base") { "src/parsing/token.h", "src/pending-compilation-error-handler.cc", "src/pending-compilation-error-handler.h", + "src/perf-jit.cc", + "src/perf-jit.h", "src/profiler/allocation-tracker.cc", "src/profiler/allocation-tracker.h", "src/profiler/circular-queue-inl.h", @@ -1279,19 +1351,29 @@ source_set("v8_base") { "src/signature.h", "src/simulator.h", "src/small-pointer-list.h", - "src/snapshot/natives.h", + "src/snapshot/code-serializer.cc", + "src/snapshot/code-serializer.h", + "src/snapshot/deserializer.cc", + "src/snapshot/deserializer.h", "src/snapshot/natives-common.cc", - "src/snapshot/serialize.cc", - "src/snapshot/serialize.h", + "src/snapshot/natives.h", + "src/snapshot/partial-serializer.cc", + "src/snapshot/partial-serializer.h", + "src/snapshot/serializer-common.cc", + "src/snapshot/serializer-common.h", + "src/snapshot/serializer.cc", + "src/snapshot/serializer.h", "src/snapshot/snapshot-common.cc", "src/snapshot/snapshot-source-sink.cc", "src/snapshot/snapshot-source-sink.h", + "src/snapshot/snapshot.h", + "src/snapshot/startup-serializer.cc", + "src/snapshot/startup-serializer.h", "src/source-position.h", - "src/splay-tree.h", "src/splay-tree-inl.h", - "src/snapshot/snapshot.h", - "src/startup-data-util.h", + "src/splay-tree.h", "src/startup-data-util.cc", + "src/startup-data-util.h", "src/string-builder.cc", "src/string-builder.h", "src/string-search.h", @@ -1299,6 +1381,8 @@ source_set("v8_base") { "src/string-stream.h", "src/strtod.cc", "src/strtod.h", + "src/third_party/fdlibm/fdlibm.cc", + "src/third_party/fdlibm/fdlibm.h", "src/tracing/trace-event.cc", "src/tracing/trace-event.h", "src/transitions-inl.h", @@ -1317,13 +1401,13 @@ source_set("v8_base") { "src/typing-asm.h", "src/typing-reset.cc", "src/typing-reset.h", - "src/unicode-inl.h", - "src/unicode.cc", - "src/unicode.h", "src/unicode-cache-inl.h", "src/unicode-cache.h", "src/unicode-decoder.cc", "src/unicode-decoder.h", + "src/unicode-inl.h", + "src/unicode.cc", + "src/unicode.h", "src/utils-inl.h", "src/utils.cc", "src/utils.h", @@ -1345,6 +1429,7 @@ source_set("v8_base") { "src/wasm/encoder.h", "src/wasm/module-decoder.cc", "src/wasm/module-decoder.h", + "src/wasm/wasm-external-refs.h", "src/wasm/wasm-js.cc", "src/wasm/wasm-js.h", "src/wasm/wasm-macro-gen.h", @@ -1354,26 +1439,24 @@ source_set("v8_base") { "src/wasm/wasm-opcodes.h", "src/wasm/wasm-result.cc", "src/wasm/wasm-result.h", - "src/zone.cc", - "src/zone.h", "src/zone-allocator.h", "src/zone-containers.h", - "src/third_party/fdlibm/fdlibm.cc", - "src/third_party/fdlibm/fdlibm.h", + "src/zone.cc", + "src/zone.h", ] if (v8_target_arch == "x86") { sources += [ + "src/compiler/ia32/code-generator-ia32.cc", + "src/compiler/ia32/instruction-codes-ia32.h", + "src/compiler/ia32/instruction-scheduler-ia32.cc", + "src/compiler/ia32/instruction-selector-ia32.cc", "src/crankshaft/ia32/lithium-codegen-ia32.cc", "src/crankshaft/ia32/lithium-codegen-ia32.h", "src/crankshaft/ia32/lithium-gap-resolver-ia32.cc", "src/crankshaft/ia32/lithium-gap-resolver-ia32.h", "src/crankshaft/ia32/lithium-ia32.cc", "src/crankshaft/ia32/lithium-ia32.h", - "src/compiler/ia32/code-generator-ia32.cc", - "src/compiler/ia32/instruction-codes-ia32.h", - "src/compiler/ia32/instruction-scheduler-ia32.cc", - "src/compiler/ia32/instruction-selector-ia32.cc", "src/debug/ia32/debug-ia32.cc", "src/full-codegen/ia32/full-codegen-ia32.cc", "src/ia32/assembler-ia32-inl.h", @@ -1394,8 +1477,8 @@ source_set("v8_base") { "src/ia32/macro-assembler-ia32.h", "src/ic/ia32/access-compiler-ia32.cc", "src/ic/ia32/handler-compiler-ia32.cc", - "src/ic/ia32/ic-ia32.cc", "src/ic/ia32/ic-compiler-ia32.cc", + "src/ic/ia32/ic-ia32.cc", "src/ic/ia32/stub-cache-ia32.cc", "src/regexp/ia32/regexp-macro-assembler-ia32.cc", "src/regexp/ia32/regexp-macro-assembler-ia32.h", @@ -1416,8 +1499,8 @@ source_set("v8_base") { "src/full-codegen/x64/full-codegen-x64.cc", "src/ic/x64/access-compiler-x64.cc", "src/ic/x64/handler-compiler-x64.cc", - "src/ic/x64/ic-x64.cc", "src/ic/x64/ic-compiler-x64.cc", + "src/ic/x64/ic-x64.cc", "src/ic/x64/stub-cache-x64.cc", "src/regexp/x64/regexp-macro-assembler-x64.cc", "src/regexp/x64/regexp-macro-assembler-x64.h", @@ -1448,8 +1531,8 @@ source_set("v8_base") { "src/arm/code-stubs-arm.h", "src/arm/codegen-arm.cc", "src/arm/codegen-arm.h", - "src/arm/constants-arm.h", "src/arm/constants-arm.cc", + "src/arm/constants-arm.h", "src/arm/cpu-arm.cc", "src/arm/deoptimizer-arm.cc", "src/arm/disasm-arm.cc", @@ -1483,19 +1566,19 @@ source_set("v8_base") { ] } else if (v8_target_arch == "arm64") { sources += [ + "src/arm64/assembler-arm64-inl.h", "src/arm64/assembler-arm64.cc", "src/arm64/assembler-arm64.h", - "src/arm64/assembler-arm64-inl.h", "src/arm64/builtins-arm64.cc", - "src/arm64/codegen-arm64.cc", - "src/arm64/codegen-arm64.h", "src/arm64/code-stubs-arm64.cc", "src/arm64/code-stubs-arm64.h", + "src/arm64/codegen-arm64.cc", + "src/arm64/codegen-arm64.h", "src/arm64/constants-arm64.h", "src/arm64/cpu-arm64.cc", + "src/arm64/decoder-arm64-inl.h", "src/arm64/decoder-arm64.cc", "src/arm64/decoder-arm64.h", - "src/arm64/decoder-arm64-inl.h", "src/arm64/deoptimizer-arm64.cc", "src/arm64/disasm-arm64.cc", "src/arm64/disasm-arm64.h", @@ -1507,9 +1590,9 @@ source_set("v8_base") { "src/arm64/instrument-arm64.h", "src/arm64/interface-descriptors-arm64.cc", "src/arm64/interface-descriptors-arm64.h", + "src/arm64/macro-assembler-arm64-inl.h", "src/arm64/macro-assembler-arm64.cc", "src/arm64/macro-assembler-arm64.h", - "src/arm64/macro-assembler-arm64-inl.h", "src/arm64/simulator-arm64.cc", "src/arm64/simulator-arm64.h", "src/arm64/utils-arm64.cc", @@ -1518,9 +1601,9 @@ source_set("v8_base") { "src/compiler/arm64/instruction-codes-arm64.h", "src/compiler/arm64/instruction-scheduler-arm64.cc", "src/compiler/arm64/instruction-selector-arm64.cc", + "src/crankshaft/arm64/delayed-masm-arm64-inl.h", "src/crankshaft/arm64/delayed-masm-arm64.cc", "src/crankshaft/arm64/delayed-masm-arm64.h", - "src/crankshaft/arm64/delayed-masm-arm64-inl.h", "src/crankshaft/arm64/lithium-arm64.cc", "src/crankshaft/arm64/lithium-arm64.h", "src/crankshaft/arm64/lithium-codegen-arm64.cc", @@ -1553,17 +1636,17 @@ source_set("v8_base") { "src/full-codegen/mips/full-codegen-mips.cc", "src/ic/mips/access-compiler-mips.cc", "src/ic/mips/handler-compiler-mips.cc", - "src/ic/mips/ic-mips.cc", "src/ic/mips/ic-compiler-mips.cc", + "src/ic/mips/ic-mips.cc", "src/ic/mips/stub-cache-mips.cc", + "src/mips/assembler-mips-inl.h", "src/mips/assembler-mips.cc", "src/mips/assembler-mips.h", - "src/mips/assembler-mips-inl.h", "src/mips/builtins-mips.cc", - "src/mips/codegen-mips.cc", - "src/mips/codegen-mips.h", "src/mips/code-stubs-mips.cc", "src/mips/code-stubs-mips.h", + "src/mips/codegen-mips.cc", + "src/mips/codegen-mips.h", "src/mips/constants-mips.cc", "src/mips/constants-mips.h", "src/mips/cpu-mips.cc", @@ -1595,17 +1678,17 @@ source_set("v8_base") { "src/full-codegen/mips64/full-codegen-mips64.cc", "src/ic/mips64/access-compiler-mips64.cc", "src/ic/mips64/handler-compiler-mips64.cc", - "src/ic/mips64/ic-mips64.cc", "src/ic/mips64/ic-compiler-mips64.cc", + "src/ic/mips64/ic-mips64.cc", "src/ic/mips64/stub-cache-mips64.cc", + "src/mips64/assembler-mips64-inl.h", "src/mips64/assembler-mips64.cc", "src/mips64/assembler-mips64.h", - "src/mips64/assembler-mips64-inl.h", "src/mips64/builtins-mips64.cc", - "src/mips64/codegen-mips64.cc", - "src/mips64/codegen-mips64.h", "src/mips64/code-stubs-mips64.cc", "src/mips64/code-stubs-mips64.h", + "src/mips64/codegen-mips64.cc", + "src/mips64/codegen-mips64.h", "src/mips64/constants-mips64.cc", "src/mips64/constants-mips64.h", "src/mips64/cpu-mips64.cc", @@ -1621,6 +1704,48 @@ source_set("v8_base") { "src/regexp/mips64/regexp-macro-assembler-mips64.cc", "src/regexp/mips64/regexp-macro-assembler-mips64.h", ] + } else if (v8_target_arch == "s390" || v8_target_arch == "s390x") { + sources += [ + "src/compiler/s390/code-generator-s390.cc", + "src/compiler/s390/instruction-codes-s390.h", + "src/compiler/s390/instruction-scheduler-s390.cc", + "src/compiler/s390/instruction-selector-s390.cc", + "src/crankshaft/s390/lithium-codegen-s390.cc", + "src/crankshaft/s390/lithium-codegen-s390.h", + "src/crankshaft/s390/lithium-gap-resolver-s390.cc", + "src/crankshaft/s390/lithium-gap-resolver-s390.h", + "src/crankshaft/s390/lithium-s390.cc", + "src/crankshaft/s390/lithium-s390.h", + "src/debug/s390/debug-s390.cc", + "src/full-codegen/s390/full-codegen-s390.cc", + "src/ic/s390/access-compiler-s390.cc", + "src/ic/s390/handler-compiler-s390.cc", + "src/ic/s390/ic-compiler-s390.cc", + "src/ic/s390/ic-s390.cc", + "src/ic/s390/stub-cache-s390.cc", + "src/regexp/s390/regexp-macro-assembler-s390.cc", + "src/regexp/s390/regexp-macro-assembler-s390.h", + "src/s390/assembler-s390-inl.h", + "src/s390/assembler-s390.cc", + "src/s390/assembler-s390.h", + "src/s390/builtins-s390.cc", + "src/s390/code-stubs-s390.cc", + "src/s390/code-stubs-s390.h", + "src/s390/codegen-s390.cc", + "src/s390/codegen-s390.h", + "src/s390/constants-s390.cc", + "src/s390/constants-s390.h", + "src/s390/cpu-s390.cc", + "src/s390/deoptimizer-s390.cc", + "src/s390/disasm-s390.cc", + "src/s390/frames-s390.cc", + "src/s390/frames-s390.h", + "src/s390/interface-descriptors-s390.cc", + "src/s390/macro-assembler-s390.cc", + "src/s390/macro-assembler-s390.h", + "src/s390/simulator-s390.cc", + "src/s390/simulator-s390.h", + ] } configs -= [ "//build/config/compiler:chromium_code" ] @@ -1671,14 +1796,16 @@ source_set("v8_libbase") { visibility = [ ":*" ] # Only targets in this file can depend on this. sources = [ + "src/base/accounting-allocator.cc", + "src/base/accounting-allocator.h", "src/base/adapters.h", "src/base/atomicops.h", "src/base/atomicops_internals_arm64_gcc.h", "src/base/atomicops_internals_arm_gcc.h", "src/base/atomicops_internals_atomicword_compat.h", "src/base/atomicops_internals_mac.h", - "src/base/atomicops_internals_mips_gcc.h", "src/base/atomicops_internals_mips64_gcc.h", + "src/base/atomicops_internals_mips_gcc.h", "src/base/atomicops_internals_portable.h", "src/base/atomicops_internals_s390_gcc.h", "src/base/atomicops_internals_tsan.h", @@ -1702,16 +1829,16 @@ source_set("v8_libbase") { "src/base/macros.h", "src/base/once.cc", "src/base/once.h", - "src/base/platform/elapsed-timer.h", - "src/base/platform/time.cc", - "src/base/platform/time.h", "src/base/platform/condition-variable.cc", "src/base/platform/condition-variable.h", + "src/base/platform/elapsed-timer.h", "src/base/platform/mutex.cc", "src/base/platform/mutex.h", "src/base/platform/platform.h", "src/base/platform/semaphore.cc", "src/base/platform/semaphore.h", + "src/base/platform/time.cc", + "src/base/platform/time.h", "src/base/safe_conversions.h", "src/base/safe_conversions_impl.h", "src/base/safe_math.h", @@ -1745,10 +1872,16 @@ source_set("v8_libbase") { if (is_linux) { sources += [ "src/base/platform/platform-linux.cc" ] - libs = [ "dl", "rt" ] + libs = [ + "dl", + "rt", + ] } else if (is_android) { if (current_toolchain == host_toolchain) { - libs = [ "dl", "rt" ] + libs = [ + "dl", + "rt", + ] if (host_os == "mac") { sources += [ "src/base/platform/platform-macos.cc" ] } else { @@ -1818,6 +1951,7 @@ source_set("fuzzer_support") { configs += [ "//build/config/compiler:no_chromium_code" ] configs += [ ":internal_config_base", + ":libplatform_config", ":features", ":toolchain", ] @@ -1844,6 +1978,7 @@ if (current_toolchain == snapshot_toolchain) { configs += [ "//build/config/compiler:no_chromium_code" ] configs += [ ":internal_config", + ":libplatform_config", ":features", ":toolchain", ] @@ -1933,9 +2068,7 @@ if ((current_toolchain == host_toolchain && v8_toolset_for_d8 == "host") || } if (!is_component_build) { - sources += [ - "$target_gen_dir/d8-js.cc", - ] + sources += [ "$target_gen_dir/d8-js.cc" ] } if (v8_enable_i18n_support) { deps += [ "//third_party/icu" ] @@ -1956,6 +2089,7 @@ source_set("json_fuzzer") { configs += [ "//build/config/compiler:no_chromium_code" ] configs += [ ":internal_config", + ":libplatform_config", ":features", ":toolchain", ] @@ -1974,6 +2108,7 @@ source_set("parser_fuzzer") { configs += [ "//build/config/compiler:no_chromium_code" ] configs += [ ":internal_config", + ":libplatform_config", ":features", ":toolchain", ] @@ -1992,6 +2127,45 @@ source_set("regexp_fuzzer") { configs += [ "//build/config/compiler:no_chromium_code" ] configs += [ ":internal_config", + ":libplatform_config", + ":features", + ":toolchain", + ] +} + +source_set("wasm_fuzzer") { + sources = [ + "test/fuzzer/wasm.cc", + ] + + deps = [ + ":fuzzer_support", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ + ":internal_config", + ":libplatform_config", + ":features", + ":toolchain", + ] +} + +source_set("wasm_asmjs_fuzzer") { + sources = [ + "test/fuzzer/wasm-asmjs.cc", + ] + + deps = [ + ":fuzzer_support", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ + ":internal_config", + ":libplatform_config", ":features", ":toolchain", ] diff --git a/deps/v8/CODE_OF_CONDUCT.md b/deps/v8/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000000..15fc2259ada6b7 --- /dev/null +++ b/deps/v8/CODE_OF_CONDUCT.md @@ -0,0 +1,8 @@ +# V8 Code of Conduct + +As part of the Chromium team, the V8 team is committed to preserving and +fostering a diverse, welcoming community. To this end, the [Chromium Code of +Conduct](https://chromium.googlesource.com/chromium/src/+/master/CODE_OF_CONDUCT.md) +applies to our repos and organizations, mailing lists, blog content, and any +other Chromium-supported communication group, as well as any private +communication initiated in the context of these spaces. diff --git a/deps/v8/ChangeLog b/deps/v8/ChangeLog index 9e21ba1cd76881..dc97b8042244cc 100644 --- a/deps/v8/ChangeLog +++ b/deps/v8/ChangeLog @@ -1,3 +1,1764 @@ +2016-04-06: Version 5.1.281 + + Performance and stability improvements on all platforms. + + +2016-04-05: Version 5.1.280 + + Performance and stability improvements on all platforms. + + +2016-04-05: Version 5.1.279 + + Ship --harmony-regexp-exec (issue 4602). + + Performance and stability improvements on all platforms. + + +2016-04-05: Version 5.1.278 + + [V8] Removed debugger V8::PromiseEvent (Chromium issue 526811). + + [asm.js] Fix typing bug for non-literals in heap access (Chromium issue + 599825). + + Ensure CreateDataProperty works correctly on TypedArrays (Chromium issue + 596394). + + Performance and stability improvements on all platforms. + + +2016-04-05: Version 5.1.277 + + Performance and stability improvements on all platforms. + + +2016-04-05: Version 5.1.276 + + Performance and stability improvements on all platforms. + + +2016-04-05: Version 5.1.275 + + Performance and stability improvements on all platforms. + + +2016-04-05: Version 5.1.274 + + Performance and stability improvements on all platforms. + + +2016-04-05: Version 5.1.273 + + Performance and stability improvements on all platforms. + + +2016-04-05: Version 5.1.272 + + Performance and stability improvements on all platforms. + + +2016-04-05: Version 5.1.271 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.270 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.269 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.268 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.267 + + [api] Restrict Template::Set to take templates or primitive values. + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.266 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.265 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.264 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.263 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.262 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.261 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.260 + + Performance and stability improvements on all platforms. + + +2016-04-04: Version 5.1.259 + + Further ES2015 RegExp spec compliance fixes (issue 4602). + + Performance and stability improvements on all platforms. + + +2016-04-03: Version 5.1.258 + + Performance and stability improvements on all platforms. + + +2016-04-02: Version 5.1.257 + + Performance and stability improvements on all platforms. + + +2016-04-02: Version 5.1.256 + + Performance and stability improvements on all platforms. + + +2016-04-02: Version 5.1.255 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.254 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.253 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.252 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.251 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.250 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.249 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.248 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.247 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.246 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.245 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.244 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.243 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.242 + + Performance and stability improvements on all platforms. + + +2016-04-01: Version 5.1.241 + + [GN] Define USE_EABI_HARDFLOAT=1 when arm_float_abi=="hard" (Chromium + issue 592660). + + Ship --harmony-regexp-exec (issue 4602). + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.240 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.239 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.238 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.237 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.236 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.235 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.234 + + [arm/Linux] Don't rely on KUSER_HELPERS feature (Chromium issue 599051). + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.233 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.232 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.231 + + Turn scavenge_reclaim_unmodified_objects on by default (Chromium issue + 4880). + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.230 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.229 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.228 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.227 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.226 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.225 + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.224 + + Raise minimum Mac OS version to 10.7 (issue 4847). + + Performance and stability improvements on all platforms. + + +2016-03-31: Version 5.1.223 + + Performance and stability improvements on all platforms. + + +2016-03-30: Version 5.1.222 + + Performance and stability improvements on all platforms. + + +2016-03-30: Version 5.1.221 + + Performance and stability improvements on all platforms. + + +2016-03-30: Version 5.1.220 + + Stage --harmony-regexp-exec (issue 4602). + + Add fast paths for native RegExps in ES2015 subclass-aware code (issue + 4602). + + [V8] Add FunctionMirror.prototype.contextDebugId method (Chromium issue + 595206). + + Performance and stability improvements on all platforms. + + +2016-03-30: Version 5.1.219 + + Remove RegExp.prototype.source getter compat workaround (issue 4827, + Chromium issue 581577). + + Check for proper types from error handling code (Chromium issue 596718). + + Add ES2015 RegExp full subclassing semantics behind a flag (issue 4602). + + Performance and stability improvements on all platforms. + + +2016-03-24: Version 5.1.218 + + Performance and stability improvements on all platforms. + + +2016-03-24: Version 5.1.217 + + [esnext] implement String padding proposal. + + Performance and stability improvements on all platforms. + + +2016-03-24: Version 5.1.216 + + Performance and stability improvements on all platforms. + + +2016-03-24: Version 5.1.215 + + Performance and stability improvements on all platforms. + + +2016-03-24: Version 5.1.214 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.213 + + Implement ES2015 labelled function declaration restrictions (Chromium + issue 595309). + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.212 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.211 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.210 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.209 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.208 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.207 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.206 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.205 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.204 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.203 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.202 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.201 + + Performance and stability improvements on all platforms. + + +2016-03-23: Version 5.1.200 + + Performance and stability improvements on all platforms. + + +2016-03-22: Version 5.1.199 + + Performance and stability improvements on all platforms. + + +2016-03-22: Version 5.1.198 + + Performance and stability improvements on all platforms. + + +2016-03-22: Version 5.1.197 + + Performance and stability improvements on all platforms. + + +2016-03-22: Version 5.1.196 + + Performance and stability improvements on all platforms. + + +2016-03-22: Version 5.1.195 + + Performance and stability improvements on all platforms. + + +2016-03-22: Version 5.1.194 + + Fix match default behavior on strings for ES2015 semantics (issue 4602). + + Performance and stability improvements on all platforms. + + +2016-03-22: Version 5.1.193 + + Performance and stability improvements on all platforms. + + +2016-03-22: Version 5.1.192 + + Performance and stability improvements on all platforms. + + +2016-03-22: Version 5.1.191 + + [Interpreter] TurboFan implementation of intrinsics (issue 4822). + + Performance and stability improvements on all platforms. + + +2016-03-22: Version 5.1.190 + + Performance and stability improvements on all platforms. + + +2016-03-21: Version 5.1.189 + + Performance and stability improvements on all platforms. + + +2016-03-21: Version 5.1.188 + + Performance and stability improvements on all platforms. + + +2016-03-21: Version 5.1.187 + + Performance and stability improvements on all platforms. + + +2016-03-21: Version 5.1.186 + + Performance and stability improvements on all platforms. + + +2016-03-21: Version 5.1.185 + + Performance and stability improvements on all platforms. + + +2016-03-21: Version 5.1.184 + + Performance and stability improvements on all platforms. + + +2016-03-21: Version 5.1.183 + + Performance and stability improvements on all platforms. + + +2016-03-21: Version 5.1.182 + + Performance and stability improvements on all platforms. + + +2016-03-21: Version 5.1.181 + + Temporarily undeprecate ForceSet (Chromium issue 595601). + + Performance and stability improvements on all platforms. + + +2016-03-21: Version 5.1.180 + + Performance and stability improvements on all platforms. + + +2016-03-20: Version 5.1.179 + + Performance and stability improvements on all platforms. + + +2016-03-20: Version 5.1.178 + + Performance and stability improvements on all platforms. + + +2016-03-20: Version 5.1.177 + + Performance and stability improvements on all platforms. + + +2016-03-19: Version 5.1.176 + + Performance and stability improvements on all platforms. + + +2016-03-18: Version 5.1.175 + + Performance and stability improvements on all platforms. + + +2016-03-18: Version 5.1.174 + + Performance and stability improvements on all platforms. + + +2016-03-18: Version 5.1.173 + + Parser: Make skipping HTML comments optional (Chromium issue 573887). + + [es7] implement exponentiation operator proposal (issue 3915). + + Performance and stability improvements on all platforms. + + +2016-03-18: Version 5.1.172 + + Performance and stability improvements on all platforms. + + +2016-03-18: Version 5.1.171 + + Performance and stability improvements on all platforms. + + +2016-03-18: Version 5.1.170 + + Performance and stability improvements on all platforms. + + +2016-03-18: Version 5.1.169 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.168 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.167 + + Throw the right exceptions from setting elements in + Array.prototype.concat (Chromium issue 595319). + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.166 + + Throw exceptions from CreateDataProperty when should_throw (Chromium + issue 595319). + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.165 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.164 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.163 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.162 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.161 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.160 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.159 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.158 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.157 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.156 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.155 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.154 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.153 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.152 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.151 + + Move FastAccessorAssembler from RawMachineAssembler to CodeStubAssembler + (Chromium issue 508898). + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.150 + + [serializer] Add API to warm up startup snapshot with an additional + script (issue 4836). + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.149 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.148 + + Performance and stability improvements on all platforms. + + +2016-03-17: Version 5.1.147 + + Performance and stability improvements on all platforms. + + +2016-03-16: Version 5.1.146 + + Ship ES2015 restrictions on function declaration locations (issue 4824). + + Performance and stability improvements on all platforms. + + +2016-03-16: Version 5.1.145 + + Performance and stability improvements on all platforms. + + +2016-03-16: Version 5.1.144 + + Performance and stability improvements on all platforms. + + +2016-03-16: Version 5.1.143 + + Performance and stability improvements on all platforms. + + +2016-03-16: Version 5.1.142 + + Performance and stability improvements on all platforms. + + +2016-03-16: Version 5.1.141 + + Performance and stability improvements on all platforms. + + +2016-03-16: Version 5.1.140 + + Put RegExp js code in strict mode (issue 4504). + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.139 + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.138 + + [builtins] Fix Array.prototype.concat bug (Chromium issue 594574). + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.137 + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.136 + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.135 + + Ship Array.prototype.values (issue 4247). + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.134 + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.133 + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.132 + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.131 + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.130 + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.129 + + Performance and stability improvements on all platforms. + + +2016-03-15: Version 5.1.128 + + Performance and stability improvements on all platforms. + + +2016-03-14: Version 5.1.127 + + Performance and stability improvements on all platforms. + + +2016-03-14: Version 5.1.126 + + Remove --harmony-modules flag and let embedder decide when modules are + used (issue 1569, Chromium issue 594639). + + Performance and stability improvements on all platforms. + + +2016-03-14: Version 5.1.125 + + Make test262 test runner check for which exception is thrown (issue + 4803). + + Performance and stability improvements on all platforms. + + +2016-03-14: Version 5.1.124 + + Performance and stability improvements on all platforms. + + +2016-03-14: Version 5.1.123 + + Performance and stability improvements on all platforms. + + +2016-03-14: Version 5.1.122 + + Performance and stability improvements on all platforms. + + +2016-03-14: Version 5.1.121 + + Performance and stability improvements on all platforms. + + +2016-03-14: Version 5.1.120 + + Performance and stability improvements on all platforms. + + +2016-03-14: Version 5.1.119 + + Performance and stability improvements on all platforms. + + +2016-03-13: Version 5.1.118 + + Performance and stability improvements on all platforms. + + +2016-03-11: Version 5.1.117 + + Performance and stability improvements on all platforms. + + +2016-03-11: Version 5.1.116 + + Performance and stability improvements on all platforms. + + +2016-03-11: Version 5.1.115 + + Performance and stability improvements on all platforms. + + +2016-03-11: Version 5.1.114 + + [arm64] Fix i/d cache line size confusion typo (Chromium issue 593867). + + Performance and stability improvements on all platforms. + + +2016-03-11: Version 5.1.113 + + Fix expression positions for for-loops (issue 4690). + + Performance and stability improvements on all platforms. + + +2016-03-11: Version 5.1.112 + + Performance and stability improvements on all platforms. + + +2016-03-11: Version 5.1.111 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.110 + + Minor library function fixes for TypedArray spec compliance (issue + 4785). + + Check that Promise subclasses have callable resolve/reject (issue 4633). + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.109 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.108 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.107 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.106 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.105 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.104 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.103 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.102 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.101 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.100 + + [strong] Remove all remainders of strong mode (issue 3956). + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.99 + + Marks the label associated with the runtime call in + CodeStubAssembler::Allocate as deferred (Chromium issue 593359). + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.98 + + Implement iterator finalization in array destructuring (issue 3566). + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.97 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.96 + + Performance and stability improvements on all platforms. + + +2016-03-10: Version 5.1.95 + + String.prototype[Symbol.iterator] does RequireObjectCoercible(this) + (issue 4348). + + Stage restrictive declarations flag (issue 4824). + + Expose Array.prototype.values behind a flag and stage it (issue 4247). + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.94 + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.93 + + Ensure appropriate bounds checking for Array subclass concat (Chromium + issue 592340). + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.92 + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.91 + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.90 + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.89 + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.88 + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.87 + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.86 + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.85 + + Performance and stability improvements on all platforms. + + +2016-03-09: Version 5.1.84 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.83 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.82 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.81 + + Optimize new TypedArray(typedArray) constructor (Chromium issue 592007). + + Ensure the @@species protector is updated for accessors (issue 4093). + + Add UseCounters for various RegExp compatibility issues (Chromium issue + 581577). + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.80 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.79 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.78 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.77 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.76 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.75 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.74 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.73 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.72 + + Performance and stability improvements on all platforms. + + +2016-03-08: Version 5.1.71 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.70 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.69 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.68 + + [key-accumulator] Starting to reimplement the key-accumulator (issue + 4758, Chromium issue 545503). + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.67 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.66 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.65 + + [key-accumulator] Starting to reimplement the key-accumulator (issue + 4758, Chromium issue 545503). + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.64 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.63 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.62 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.61 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.60 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.59 + + Use v8::kGCCallbackFlagCollectAllAvailableGarbage in + Heap::CollectAllAvailableGarbage (Chromium issue 591463). + + [key-accumulator] Starting to reimplement the key-accumulator (issue + 4758, Chromium issue 545503). + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.58 + + [regexp] Fix off-by-one in CharacterRange::Negate (Chromium issue + 592343). + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.57 + + Performance and stability improvements on all platforms. + + +2016-03-07: Version 5.1.56 + + Use v8::kGCCallbackFlagCollectAllAvailableGarbage in + Heap::CollectAllAvailableGarbage (Chromium issue 591463). + + Performance and stability improvements on all platforms. + + +2016-03-06: Version 5.1.55 + + Performance and stability improvements on all platforms. + + +2016-03-06: Version 5.1.54 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.53 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.52 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.51 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.50 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.49 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.48 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.47 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.46 + + Introduce v8::MicrotasksScope (Chromium issue 585949). + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.45 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.44 + + Use a different GCCallbackFlag for GCs triggered by + CollectAllAvailableGarbage (Chromium issue 591463). + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.43 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.42 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.41 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.40 + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.39 + + Ship ES2015 Function.name reform (issue 3699, Chromium issue 588803). + + Introduce v8::MicrotasksScope (Chromium issue 585949). + + Performance and stability improvements on all platforms. + + +2016-03-04: Version 5.1.38 + + Performance and stability improvements on all platforms. + + +2016-03-03: Version 5.1.37 + + Restrict FunctionDeclarations in Statement position (issue 4647). + + Performance and stability improvements on all platforms. + + +2016-03-03: Version 5.1.36 + + Performance and stability improvements on all platforms. + + +2016-03-03: Version 5.1.35 + + Performance and stability improvements on all platforms. + + +2016-03-03: Version 5.1.34 + + Performance and stability improvements on all platforms. + + +2016-03-03: Version 5.1.33 + + Performance and stability improvements on all platforms. + + +2016-03-03: Version 5.1.32 + + Performance and stability improvements on all platforms. + + +2016-03-03: Version 5.1.31 + + Performance and stability improvements on all platforms. + + +2016-03-03: Version 5.1.30 + + Implement TypedArray(typedarray) constructor (issue 4726). + + Performance and stability improvements on all platforms. + + +2016-03-02: Version 5.1.29 + + Performance and stability improvements on all platforms. + + +2016-03-02: Version 5.1.28 + + [turbofan] Adds an Allocate macro to the CodeStubAssembler (Chromium + issue 588692). + + Performance and stability improvements on all platforms. + + +2016-03-02: Version 5.1.27 + + Performance and stability improvements on all platforms. + + +2016-03-02: Version 5.1.26 + + Performance and stability improvements on all platforms. + + +2016-03-02: Version 5.1.25 + + Performance and stability improvements on all platforms. + + +2016-03-02: Version 5.1.24 + + Devtools: expose scopes source location to debugger (Chromium issue + 327092). + + CodeStubAssembler can generate code for builtins (issue 4614). + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.23 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.22 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.21 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.20 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.19 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.18 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.17 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.16 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.15 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.14 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.13 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.12 + + Performance and stability improvements on all platforms. + + +2016-03-01: Version 5.1.11 + + Make %TypedArray%.from spec-compliant (issue 4782). + + Performance and stability improvements on all platforms. + + +2016-02-29: Version 5.1.10 + + Performance and stability improvements on all platforms. + + +2016-02-29: Version 5.1.9 + + Performance and stability improvements on all platforms. + + +2016-02-28: Version 5.1.8 + + Performance and stability improvements on all platforms. + + +2016-02-28: Version 5.1.7 + + Performance and stability improvements on all platforms. + + +2016-02-28: Version 5.1.6 + + Performance and stability improvements on all platforms. + + +2016-02-28: Version 5.1.5 + + Performance and stability improvements on all platforms. + + +2016-02-28: Version 5.1.4 + + Performance and stability improvements on all platforms. + + +2016-02-28: Version 5.1.3 + + Performance and stability improvements on all platforms. + + +2016-02-28: Version 5.1.2 + + Performance and stability improvements on all platforms. + + +2016-02-27: Version 5.1.1 + + Fix strict mode function error message (issue 2198). + + Reland of Make Intl install properties more like how other builtins do + (patchset #1 id:1 of https://codereview.chromium.org/1733293003/ ) + (issue 4778). + + [turbofan] Bailout if LoadBuffer typing assumption doesn't hold + (Chromium issue 589792). + + Performance and stability improvements on all platforms. + + +2016-02-26: Version 5.0.104 + + Performance and stability improvements on all platforms. + + +2016-02-26: Version 5.0.103 + + Make Intl install properties more like how other builtins do (issue + 4778). + + Performance and stability improvements on all platforms. + + +2016-02-26: Version 5.0.102 + + Make TypedArray.from and TypedArray.of writable and configurable (issue + 4315). + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.101 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.100 + + Ship ES2015 iterator finalization (issue 3566). + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.99 + + Introduce MicrotasksCompletedCallback (Chromium issue 585949). + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.98 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.97 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.96 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.95 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.94 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.93 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.92 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.91 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.90 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.89 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.88 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.87 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.86 + + Performance and stability improvements on all platforms. + + +2016-02-25: Version 5.0.85 + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.84 + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.83 + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.82 + + Ensure IteratorClose is called for errors in non-declaring assignments + (issue 4776). + + Fix priority of exceptions being thrown from for-of loops (issue 4775). + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.81 + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.80 + + Encode interpreter::SourcePositionTable as variable-length ints (issue + 4690). + + Stage ES2015 iterator finalization (issue 3566). + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.79 + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.78 + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.77 + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.76 + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.75 + + Performance and stability improvements on all platforms. + + +2016-02-24: Version 5.0.74 + + Performance and stability improvements on all platforms. + + +2016-02-23: Version 5.0.73 + + Intl: Use private symbols to memoize bound functions (issue 3785). + + Ensure Array.prototype.indexOf returns +0 rather than -0. + + Ship ES2015 Symbol.species (issue 4093). + + Performance and stability improvements on all platforms. + + +2016-02-23: Version 5.0.72 + + Performance and stability improvements on all platforms. + + 2016-02-23: Version 5.0.71 Performance and stability improvements on all platforms. diff --git a/deps/v8/DEPS b/deps/v8/DEPS index 5f26e91ecfa565..0559523283f74e 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -8,15 +8,15 @@ vars = { deps = { "v8/build/gyp": - Var("git_url") + "/external/gyp.git" + "@" + "ed163ce233f76a950dce1751ac851dbe4b1c00cc", + Var("git_url") + "/external/gyp.git" + "@" + "4ec6c4e3a94bd04a6da2858163d40b2429b8aad1", "v8/third_party/icu": - Var("git_url") + "/chromium/deps/icu.git" + "@" + "e466f6ac8f60bb9697af4a91c6911c6fc4aec95f", + Var("git_url") + "/chromium/deps/icu.git" + "@" + "c291cde264469b20ca969ce8832088acb21e0c48", "v8/buildtools": - Var("git_url") + "/chromium/buildtools.git" + "@" + "97b5c485707335dd2952c05bf11412ada3f4fb6f", + Var("git_url") + "/chromium/buildtools.git" + "@" + "80b5126f91be4eb359248d28696746ef09d5be67", "v8/base/trace_event/common": - Var("git_url") + "/chromium/src/base/trace_event/common.git" + "@" + "4b09207e447ae5bd34643b4c6321bee7b76d35f9", + Var("git_url") + "/chromium/src/base/trace_event/common.git" + "@" + "c8c8665c2deaf1cc749d9f8e153256d4f67bf1b8", "v8/tools/swarming_client": - Var('git_url') + '/external/swarming.client.git' + '@' + "0b908f18767c8304dc089454bc1c91755d21f1f5", + Var('git_url') + '/external/swarming.client.git' + '@' + "df6e95e7669883c8fe9ef956c69a544154701a49", "v8/testing/gtest": Var("git_url") + "/external/github.com/google/googletest.git" + "@" + "6f8a66431cb592dad629028a50b3dd418a408c87", "v8/testing/gmock": @@ -27,15 +27,15 @@ deps = { Var("git_url") + "/v8/deps/third_party/mozilla-tests.git" + "@" + "f6c578a10ea707b1a8ab0b88943fe5115ce2b9be", "v8/test/simdjs/data": Var("git_url") + "/external/github.com/tc39/ecmascript_simd.git" + "@" + "c8ef63c728283debc25891123eb00482fee4b8cd", "v8/test/test262/data": - Var("git_url") + "/external/github.com/tc39/test262.git" + "@" + "738a24b109f3fa71be44d5c3701d73141d494510", + Var("git_url") + "/external/github.com/tc39/test262.git" + "@" + "57d3e2216fa86ad63b6c0a54914ba9dcbff96003", "v8/tools/clang": - Var("git_url") + "/chromium/src/tools/clang.git" + "@" + "a8adb78c8eda9bddb2aa9c51f3fee60296de1ad4", + Var("git_url") + "/chromium/src/tools/clang.git" + "@" + "faee82e064e04e5cbf60cc7327e7a81d2a4557ad", } deps_os = { "android": { "v8/third_party/android_tools": - Var("git_url") + "/android_tools.git" + "@" + "f4c36ad89b2696b37d9cd7ca7d984b691888b188", + Var("git_url") + "/android_tools.git" + "@" + "adfd31794011488cd0fc716b53558b2d8a67af8b", }, "win": { "v8/third_party/cygwin": diff --git a/deps/v8/Makefile b/deps/v8/Makefile index 4fb6ee0162275f..a0c08a6d9634c7 100644 --- a/deps/v8/Makefile +++ b/deps/v8/Makefile @@ -162,6 +162,9 @@ endif ifdef embedscript GYPFLAGS += -Dembed_script=$(embedscript) endif +ifdef warmupscript + GYPFLAGS += -Dwarmup_script=$(warmupscript) +endif ifeq ($(goma), on) GYPFLAGS += -Duse_goma=1 endif @@ -219,6 +222,10 @@ endif ifeq ($(arm_test_noprobe), on) GYPFLAGS += -Darm_test_noprobe=on endif +# Do not omit the frame pointer, needed for profiling with perf +ifeq ($(no_omit_framepointer), on) + GYPFLAGS += -Drelease_extra_cflags=-fno-omit-frame-pointer +endif # ----------------- available targets: -------------------- # - "grokdump": rebuilds heap constants lists used by grokdump diff --git a/deps/v8/OWNERS b/deps/v8/OWNERS index 2c5caeb125accb..3f2caecd498284 100644 --- a/deps/v8/OWNERS +++ b/deps/v8/OWNERS @@ -1,5 +1,7 @@ adamk@chromium.org +ahaas@chromium.org bmeurer@chromium.org +cbruni@chromium.org danno@chromium.org epertoso@chromium.org hablich@chromium.org @@ -10,10 +12,13 @@ jkummerow@chromium.org jochen@chromium.org littledan@chromium.org machenbach@chromium.org -mlippautz@chromium.org marja@chromium.org +mlippautz@chromium.org mstarzinger@chromium.org mvstanton@chromium.org +mythria@chromium.org +neis@chromium.org +oth@chromium.org rmcilroy@chromium.org rossberg@chromium.org titzer@chromium.org diff --git a/deps/v8/base/trace_event/common/trace_event_common.h b/deps/v8/base/trace_event/common/trace_event_common.h index 8d13fc2e8cb8a5..7a1533ed822e88 100644 --- a/deps/v8/base/trace_event/common/trace_event_common.h +++ b/deps/v8/base/trace_event/common/trace_event_common.h @@ -156,7 +156,7 @@ // }; // // TRACE_EVENT1("foo", "bar", "data", -// scoped_refptr(new MyData())); +// std::unique_ptr(new MyData())); // // The trace framework will take ownership if the passed pointer and it will // be free'd when the trace buffer is flushed. @@ -926,6 +926,20 @@ name, id, TRACE_EVENT_FLAG_COPY, arg1_name, \ arg1_val, arg2_name, arg2_val) +// Special trace event macro to trace task execution with the location where it +// was posted from. +#define TRACE_TASK_EXECUTION(run_function, task) \ + TRACE_EVENT2("toplevel", run_function, "src_file", \ + (task).posted_from.file_name(), "src_func", \ + (task).posted_from.function_name()); \ + TRACE_EVENT_API_SCOPED_TASK_EXECUTION_EVENT INTERNAL_TRACE_EVENT_UID( \ + task_event)((task).posted_from.file_name()); + +// TRACE_EVENT_METADATA* events are information related to other +// injected events, not events in their own right. +#define TRACE_EVENT_METADATA1(category_group, name, arg1_name, arg1_val) \ + INTERNAL_TRACE_EVENT_METADATA_ADD(category_group, name, arg1_name, arg1_val) + // Records a clock sync event. #define TRACE_EVENT_CLOCK_SYNC_RECEIVER(sync_id) \ INTERNAL_TRACE_EVENT_ADD( \ diff --git a/deps/v8/build/coverage_wrapper.py b/deps/v8/build/coverage_wrapper.py new file mode 100755 index 00000000000000..5b365d8e63d911 --- /dev/null +++ b/deps/v8/build/coverage_wrapper.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python +# Copyright 2016 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. + +# CC/CXX wrapper script that excludes certain file patterns from coverage +# instrumentation. + +import re +import subprocess +import sys + +exclusions = [ + 'buildtools', + 'src/third_party', + 'third_party', + 'test', + 'testing', +] + +def remove_if_exists(string_list, item): + if item in string_list: + string_list.remove(item) + +args = sys.argv[1:] +text = ' '.join(sys.argv[2:]) +for exclusion in exclusions: + if re.search(r'\-o obj/%s[^ ]*\.o' % exclusion, text): + remove_if_exists(args, '-fprofile-arcs') + remove_if_exists(args, '-ftest-coverage') + remove_if_exists(args, '-fsanitize-coverage=func') + remove_if_exists(args, '-fsanitize-coverage=bb') + remove_if_exists(args, '-fsanitize-coverage=edge') + break + +sys.exit(subprocess.check_call(args)) diff --git a/deps/v8/build/get_landmines.py b/deps/v8/build/get_landmines.py index ea0ae0d415235d..2bbf7a61bfe290 100755 --- a/deps/v8/build/get_landmines.py +++ b/deps/v8/build/get_landmines.py @@ -26,6 +26,7 @@ def main(): print 'Cleanup after windows ninja switch attempt.' print 'Switching to pinned msvs toolchain.' print 'Clobbering to hopefully resolve problem with mksnapshot' + print 'Clobber after ICU roll.' return 0 diff --git a/deps/v8/build/isolate.gypi b/deps/v8/build/isolate.gypi index 546870a755a81a..4cfbbfddd100d7 100644 --- a/deps/v8/build/isolate.gypi +++ b/deps/v8/build/isolate.gypi @@ -76,6 +76,8 @@ '--config-variable', 'icu_use_data_file_flag=0', '--config-variable', 'msan=<(msan)', '--config-variable', 'tsan=<(tsan)', + '--config-variable', 'coverage=<(coverage)', + '--config-variable', 'sanitizer_coverage=<(sanitizer_coverage)', '--config-variable', 'component=<(component)', '--config-variable', 'target_arch=<(target_arch)', '--config-variable', 'use_custom_libcxx=<(use_custom_libcxx)', diff --git a/deps/v8/build/standalone.gypi b/deps/v8/build/standalone.gypi index 5269b95f64dbd9..6c88409dbee892 100644 --- a/deps/v8/build/standalone.gypi +++ b/deps/v8/build/standalone.gypi @@ -44,7 +44,7 @@ 'v8_deprecation_warnings': 1, 'v8_imminent_deprecation_warnings': 1, 'msvs_multi_core_compile%': '1', - 'mac_deployment_target%': '10.5', + 'mac_deployment_target%': '10.7', 'release_extra_cflags%': '', 'variables': { 'variables': { @@ -68,7 +68,9 @@ 'target_arch%': '<(host_arch)', 'base_dir%': ' GetInternalProperties(Isolate* isolate, Local value); + + /** + * Defines if the ES2015 tail call elimination feature is enabled or not. + * The change of this flag triggers deoptimization of all functions that + * contain calls at tail position. + */ + static bool IsTailCallEliminationEnabled(Isolate* isolate); + static void SetTailCallEliminationEnabled(Isolate* isolate, bool enabled); }; diff --git a/deps/v8/include/v8-experimental.h b/deps/v8/include/v8-experimental.h index 3874e91101f347..294ba647f03df9 100644 --- a/deps/v8/include/v8-experimental.h +++ b/deps/v8/include/v8-experimental.h @@ -10,7 +10,7 @@ #ifndef V8_INCLUDE_V8_EXPERIMENTAL_H_ #define V8_INCLUDE_V8_EXPERIMENTAL_H_ -#include "include/v8.h" +#include "v8.h" // NOLINT(build/include) namespace v8 { namespace experimental { diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index c24f07202b0847..b7513a6829bc18 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -9,9 +9,9 @@ // NOTE these macros are used by some of the tool scripts and the build // system so their names cannot be changed without changing the scripts. #define V8_MAJOR_VERSION 5 -#define V8_MINOR_VERSION 0 -#define V8_BUILD_NUMBER 71 -#define V8_PATCH_LEVEL 52 +#define V8_MINOR_VERSION 1 +#define V8_BUILD_NUMBER 281 +#define V8_PATCH_LEVEL 75 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index 9ccbc6eb1863bd..8b7b7c2cc48c3b 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -18,6 +18,8 @@ #include #include #include +#include +#include #include "v8-version.h" // NOLINT(build/include) #include "v8config.h" // NOLINT(build/include) @@ -328,6 +330,8 @@ class Local { template friend class PersistentValueMapBase; template friend class PersistentValueVector; + template + friend class ReturnValue; explicit V8_INLINE Local(T* that) : val_(that) {} V8_INLINE static Local New(Isolate* isolate, T* that); @@ -593,6 +597,13 @@ template class PersistentBase { // TODO(dcarney): remove this. V8_INLINE void ClearWeak() { ClearWeak(); } + /** + * Allows the embedder to tell the v8 garbage collector that a certain object + * is alive. Only allowed when the embedder is asked to trace its heap by + * EmbedderHeapTracer. + */ + V8_INLINE void RegisterExternalReference(Isolate* isolate); + /** * Marks the reference to this object independent. Garbage collector is free * to ignore any object groups containing this object. Weak callback for an @@ -2628,6 +2639,10 @@ enum AccessControl { PROHIBITS_OVERWRITING = 1 << 2 }; +/** + * Integrity level for objects. + */ +enum class IntegrityLevel { kFrozen, kSealed }; /** * A JavaScript object (ECMA-262, 4.3.3) @@ -2819,6 +2834,11 @@ class V8_EXPORT Object : public Value { */ Local GetConstructorName(); + /** + * Sets the integrity level of the object. + */ + Maybe SetIntegrityLevel(Local context, IntegrityLevel level); + /** Gets the number of internal fields for this Object. */ int InternalFieldCount(); @@ -3118,12 +3138,17 @@ class ReturnValue { V8_INLINE void SetUndefined(); V8_INLINE void SetEmptyString(); // Convenience getter for Isolate - V8_INLINE Isolate* GetIsolate(); + V8_INLINE Isolate* GetIsolate() const; // Pointer setter: Uncompilable to prevent inadvertent misuse. template V8_INLINE void Set(S* whatever); + // Getter. Creates a new Local<> so it comes with a certain performance + // hit. If the ReturnValue was not yet set, this will return the undefined + // value. + V8_INLINE Local Get() const; + private: template friend class ReturnValue; template friend class FunctionCallbackInfo; @@ -3216,6 +3241,7 @@ class PropertyCallbackInfo { typedef void (*FunctionCallback)(const FunctionCallbackInfo& info); +enum class ConstructorBehavior { kThrow, kAllow }; /** * A JavaScript function object (ECMA-262, 15.3). @@ -3230,6 +3256,11 @@ class V8_EXPORT Function : public Object { FunctionCallback callback, Local data = Local(), int length = 0); + static MaybeLocal New(Local context, + FunctionCallback callback, + Local data, + int length, + ConstructorBehavior behavior); static V8_DEPRECATE_SOON( "Use maybe version", Local New(Isolate* isolate, FunctionCallback callback, @@ -4453,6 +4484,9 @@ class V8_EXPORT FunctionTemplate : public Template { Isolate* isolate, FunctionCallback callback = 0, Local data = Local(), Local signature = Local(), int length = 0); + static Local New( + Isolate* isolate, FunctionCallback callback, Local data, + Local signature, int length, ConstructorBehavior behavior); /** * Creates a function template with a fast handler. If a fast handler is set, @@ -4886,7 +4920,6 @@ V8_INLINE Local Null(Isolate* isolate); V8_INLINE Local True(Isolate* isolate); V8_INLINE Local False(Isolate* isolate); - /** * A set of constraints that specifies the limits of the runtime's memory use. * You must set the heap size before initializing the VM - the size cannot be @@ -4895,6 +4928,9 @@ V8_INLINE Local False(Isolate* isolate); * If you are using threads then you should hold the V8::Locker lock while * setting the stack limit and you must set a non-default stack limit separately * for each thread. + * + * The arguments for set_max_semi_space_size, set_max_old_space_size, + * set_max_executable_size, set_code_range_size specify limits in MB. */ class V8_EXPORT ResourceConstraints { public: @@ -4913,17 +4949,23 @@ class V8_EXPORT ResourceConstraints { uint64_t virtual_memory_limit); int max_semi_space_size() const { return max_semi_space_size_; } - void set_max_semi_space_size(int value) { max_semi_space_size_ = value; } + void set_max_semi_space_size(int limit_in_mb) { + max_semi_space_size_ = limit_in_mb; + } int max_old_space_size() const { return max_old_space_size_; } - void set_max_old_space_size(int value) { max_old_space_size_ = value; } + void set_max_old_space_size(int limit_in_mb) { + max_old_space_size_ = limit_in_mb; + } int max_executable_size() const { return max_executable_size_; } - void set_max_executable_size(int value) { max_executable_size_ = value; } + void set_max_executable_size(int limit_in_mb) { + max_executable_size_ = limit_in_mb; + } uint32_t* stack_limit() const { return stack_limit_; } // Sets an address beyond which the VM's stack may not grow. void set_stack_limit(uint32_t* value) { stack_limit_ = value; } size_t code_range_size() const { return code_range_size_; } - void set_code_range_size(size_t value) { - code_range_size_ = value; + void set_code_range_size(size_t limit_in_mb) { + code_range_size_ = limit_in_mb; } private: @@ -5047,9 +5089,57 @@ class PromiseRejectMessage { typedef void (*PromiseRejectCallback)(PromiseRejectMessage message); -// --- Microtask Callback --- +// --- Microtasks Callbacks --- +typedef void (*MicrotasksCompletedCallback)(Isolate*); typedef void (*MicrotaskCallback)(void* data); + +/** + * Policy for running microtasks: + * - explicit: microtasks are invoked with Isolate::RunMicrotasks() method; + * - scoped: microtasks invocation is controlled by MicrotasksScope objects; + * - auto: microtasks are invoked when the script call depth decrements + * to zero. + */ +enum class MicrotasksPolicy { kExplicit, kScoped, kAuto }; + + +/** + * This scope is used to control microtasks when kScopeMicrotasksInvocation + * is used on Isolate. In this mode every non-primitive call to V8 should be + * done inside some MicrotasksScope. + * Microtasks are executed when topmost MicrotasksScope marked as kRunMicrotasks + * exits. + * kDoNotRunMicrotasks should be used to annotate calls not intended to trigger + * microtasks. + */ +class V8_EXPORT MicrotasksScope { + public: + enum Type { kRunMicrotasks, kDoNotRunMicrotasks }; + + MicrotasksScope(Isolate* isolate, Type type); + ~MicrotasksScope(); + + /** + * Runs microtasks if no kRunMicrotasks scope is currently active. + */ + static void PerformCheckpoint(Isolate* isolate); + + /** + * Returns current depth of nested kRunMicrotasks scopes. + */ + static int GetCurrentDepth(Isolate* isolate); + + private: + internal::Isolate* const isolate_; + bool run_; + + // Prevent copying. + MicrotasksScope(const MicrotasksScope&); + MicrotasksScope& operator=(const MicrotasksScope&); +}; + + // --- Failed Access Check Callback --- typedef void (*FailedAccessCheckCallback)(Local target, AccessType type, @@ -5294,6 +5384,52 @@ class V8_EXPORT PersistentHandleVisitor { // NOLINT uint16_t class_id) {} }; +/** + * Memory pressure level for the MemoryPressureNotification. + * kNone hints V8 that there is no memory pressure. + * kModerate hints V8 to speed up incremental garbage collection at the cost of + * of higher latency due to garbage collection pauses. + * kCritical hints V8 to free memory as soon as possible. Garbage collection + * pauses at this level will be large. + */ +enum class MemoryPressureLevel { kNone, kModerate, kCritical }; + +/** + * Interface for tracing through the embedder heap. During the v8 garbage + * collection, v8 collects hidden fields of all potential wrappers, and at the + * end of its marking phase iterates the collection and asks the embedder to + * trace through its heap and call PersistentBase::RegisterExternalReference on + * each js object reachable from any of the given wrappers. + * + * Before the first call to the TraceWrappableFrom function v8 will call + * TraceRoots. When the v8 garbage collection is finished, v8 will call + * ClearTracingMarks. + */ +class EmbedderHeapTracer { + public: + /** + * V8 will call this method at the beginning of the gc cycle. + */ + virtual void TraceRoots(Isolate* isolate) = 0; + + /** + * V8 will call this method with internal fields of a potential wrappers. + * Embedder is expected to trace its heap (synchronously) and call + * PersistentBase::RegisterExternalReference() on all wrappers reachable from + * any of the given wrappers. + */ + virtual void TraceWrappableFrom( + Isolate* isolate, + const std::vector >& internal_fields) = 0; + /** + * V8 will call this method at the end of the gc cycle. Allocation is *not* + * allowed in the ClearTracingMarks. + */ + virtual void ClearTracingMarks(Isolate* isolate) = 0; + + protected: + virtual ~EmbedderHeapTracer() = default; +}; /** * Isolate represents an isolated instance of the V8 engine. V8 isolates have @@ -5489,6 +5625,9 @@ class V8_EXPORT Isolate { kArrayPrototypeConstructorModified = 26, kArrayInstanceProtoModified = 27, kArrayInstanceConstructorModified = 28, + kLegacyFunctionDeclaration = 29, + kRegExpPrototypeSourceGetter = 30, + kRegExpPrototypeOldFlagGetter = 31, // If you add new values here, you'll also need to update V8Initializer.cpp // in Chromium. @@ -5531,6 +5670,14 @@ class V8_EXPORT Isolate { void SetAbortOnUncaughtExceptionCallback( AbortOnUncaughtExceptionCallback callback); + /** + * Optional notification that the system is running low on memory. + * V8 uses these notifications to guide heuristics. + * It is allowed to call this function from another thread while + * the isolate is executing long running JavaScript code. + */ + void MemoryPressureNotification(MemoryPressureLevel level); + /** * Methods below this point require holding a lock (using Locker) in * a multi-threaded environment. @@ -5752,6 +5899,11 @@ class V8_EXPORT Isolate { */ void RemoveGCPrologueCallback(GCCallback callback); + /** + * Sets the embedder heap tracer for the isolate. + */ + void SetEmbedderHeapTracer(EmbedderHeapTracer* tracer); + /** * Enables the host application to receive a notification after a * garbage collection. Allocations are allowed in the callback function, @@ -5888,17 +6040,39 @@ class V8_EXPORT Isolate { */ void EnqueueMicrotask(MicrotaskCallback microtask, void* data = NULL); - /** - * Experimental: Controls whether the Microtask Work Queue is automatically - * run when the script call depth decrements to zero. + /** + * Experimental: Controls how Microtasks are invoked. See MicrotasksPolicy + * for details. + */ + void SetMicrotasksPolicy(MicrotasksPolicy policy); + V8_DEPRECATE_SOON("Use SetMicrotasksPolicy", + void SetAutorunMicrotasks(bool autorun)); + + /** + * Experimental: Returns the policy controlling how Microtasks are invoked. + */ + MicrotasksPolicy GetMicrotasksPolicy() const; + V8_DEPRECATE_SOON("Use GetMicrotasksPolicy", + bool WillAutorunMicrotasks() const); + + /** + * Experimental: adds a callback to notify the host application after + * microtasks were run. The callback is triggered by explicit RunMicrotasks + * call or automatic microtasks execution (see SetAutorunMicrotasks). + * + * Callback will trigger even if microtasks were attempted to run, + * but the microtasks queue was empty and no single microtask was actually + * executed. + * + * Executing scriptsinside the callback will not re-trigger microtasks and + * the callback. */ - void SetAutorunMicrotasks(bool autorun); + void AddMicrotasksCompletedCallback(MicrotasksCompletedCallback callback); /** - * Experimental: Returns whether the Microtask Work Queue is automatically - * run when the script call depth decrements to zero. + * Removes callback that was installed by AddMicrotasksCompletedCallback. */ - bool WillAutorunMicrotasks() const; + void RemoveMicrotasksCompletedCallback(MicrotasksCompletedCallback callback); /** * Sets a callback for counting the number of times a feature of V8 is used. @@ -6195,11 +6369,23 @@ class V8_EXPORT V8 { static void SetSnapshotDataBlob(StartupData* startup_blob); /** - * Create a new isolate and context for the purpose of capturing a snapshot + * Bootstrap an isolate and a context from scratch to create a startup + * snapshot. Include the side-effects of running the optional script. + * Returns { NULL, 0 } on failure. + * The caller acquires ownership of the data array in the return value. + */ + static StartupData CreateSnapshotDataBlob(const char* embedded_source = NULL); + + /** + * Bootstrap an isolate and a context from the cold startup blob, run the + * warm-up script to trigger code compilation. The side effects are then + * discarded. The resulting startup snapshot will include compiled code. * Returns { NULL, 0 } on failure. - * The caller owns the data array in the return value. + * The caller acquires ownership of the data array in the return value. + * The argument startup blob is untouched. */ - static StartupData CreateSnapshotDataBlob(const char* custom_source = NULL); + static StartupData WarmUpSnapshotDataBlob(StartupData cold_startup_blob, + const char* warmup_source); /** * Adds a message listener. @@ -6475,6 +6661,8 @@ class V8_EXPORT V8 { static internal::Object** CopyPersistent(internal::Object** handle); static void DisposeGlobal(internal::Object** global_handle); typedef WeakCallbackData::Callback WeakCallback; + static void RegisterExternallyReferencedObject(internal::Object** object, + internal::Isolate* isolate); static void MakeWeak(internal::Object** global_handle, void* data, WeakCallback weak_callback); static void MakeWeak(internal::Object** global_handle, void* data, @@ -7173,6 +7361,7 @@ class Internals { static const int kTrueValueRootIndex = 8; static const int kFalseValueRootIndex = 9; static const int kEmptyStringRootIndex = 10; + static const int kTheHoleValueRootIndex = 11; // The external allocation limit should be below 256 MB on all architectures // to avoid that resource-constrained embedders run low on memory. @@ -7492,6 +7681,13 @@ P* PersistentBase::ClearWeak() { V8::ClearWeak(reinterpret_cast(this->val_))); } +template +void PersistentBase::RegisterExternalReference(Isolate* isolate) { + if (IsEmpty()) return; + V8::RegisterExternallyReferencedObject( + reinterpret_cast(this->val_), + reinterpret_cast(isolate)); +} template void PersistentBase::MarkIndependent() { @@ -7641,14 +7837,22 @@ void ReturnValue::SetEmptyString() { *value_ = *I::GetRoot(GetIsolate(), I::kEmptyStringRootIndex); } -template -Isolate* ReturnValue::GetIsolate() { +template +Isolate* ReturnValue::GetIsolate() const { // Isolate is always the pointer below the default value on the stack. return *reinterpret_cast(&value_[-2]); } -template -template +template +Local ReturnValue::Get() const { + typedef internal::Internals I; + if (*value_ == *I::GetRoot(GetIsolate(), I::kTheHoleValueRootIndex)) + return Local(*Undefined(GetIsolate())); + return Local::New(GetIsolate(), reinterpret_cast(value_)); +} + +template +template void ReturnValue::Set(S* whatever) { // Uncompilable to prevent inadvertent misuse. TYPE_CHECK(S*, Primitive); diff --git a/deps/v8/include/v8config.h b/deps/v8/include/v8config.h index d2be68561c0cc3..ce3a9d2f4f6620 100644 --- a/deps/v8/include/v8config.h +++ b/deps/v8/include/v8config.h @@ -266,13 +266,7 @@ # define V8_HAS_BUILTIN_FRAME_ADDRESS (V8_GNUC_PREREQ(2, 96, 0)) # define V8_HAS_BUILTIN_POPCOUNT (V8_GNUC_PREREQ(3, 4, 0)) -// g++ requires -std=c++0x or -std=gnu++0x to support C++11 functionality -// without warnings (functionality used by the macros below). These modes -// are detectable by checking whether __GXX_EXPERIMENTAL_CXX0X__ is defined or, -// more standardly, by checking whether __cplusplus has a C++11 or greater -// value. Current versions of g++ do not correctly set __cplusplus, so we check -// both for forward compatibility. -# if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L +# if __cplusplus >= 201103L # define V8_HAS_CXX11_ALIGNAS (V8_GNUC_PREREQ(4, 8, 0)) # define V8_HAS_CXX11_ALIGNOF (V8_GNUC_PREREQ(4, 8, 0)) # endif diff --git a/deps/v8/infra/config/cq.cfg b/deps/v8/infra/config/cq.cfg index fbf090bb595acc..5f85111f200ac4 100644 --- a/deps/v8/infra/config/cq.cfg +++ b/deps/v8/infra/config/cq.cfg @@ -65,13 +65,14 @@ verifiers { name: "v8_win_rel_ng_triggered" triggered_by: "v8_win_rel_ng" } - } - buckets { - name: "tryserver.v8" builders { name: "v8_linux_blink_rel" experiment_percentage: 20 } + builders { + name: "v8_linux64_sanitizer_coverage_rel" + experiment_percentage: 100 + } } } diff --git a/deps/v8/src/DEPS b/deps/v8/src/DEPS index b0b703b7cc409f..1bb616ef33dd2d 100644 --- a/deps/v8/src/DEPS +++ b/deps/v8/src/DEPS @@ -21,7 +21,4 @@ specific_include_rules = { "d8\.cc": [ "+include/libplatform/libplatform.h", ], - "api-experimental\.cc": [ - "+src/compiler/fast-accessor-assembler.h", - ], } diff --git a/deps/v8/src/accessors.cc b/deps/v8/src/accessors.cc index 766509e2a5a408..374c0a21f84b25 100644 --- a/deps/v8/src/accessors.cc +++ b/deps/v8/src/accessors.cc @@ -32,6 +32,7 @@ Handle Accessors::MakeAccessor( info->set_all_can_read(false); info->set_all_can_write(false); info->set_is_special_data_property(true); + info->set_is_sloppy(false); name = factory->InternalizeName(name); info->set_name(*name); Handle get = v8::FromCData(isolate, getter); @@ -817,7 +818,7 @@ void Accessors::FunctionLengthGetter( } else { // If the function isn't compiled yet, the length is not computed // correctly yet. Compile it now and return the right length. - if (Compiler::Compile(function, KEEP_EXCEPTION)) { + if (Compiler::Compile(function, Compiler::KEEP_EXCEPTION)) { length = function->shared()->length(); } if (isolate->has_pending_exception()) { diff --git a/deps/v8/src/api-arguments.cc b/deps/v8/src/api-arguments.cc new file mode 100644 index 00000000000000..c4b698c5a2146f --- /dev/null +++ b/deps/v8/src/api-arguments.cc @@ -0,0 +1,31 @@ +// Copyright 2016 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. + +#include "src/api-arguments.h" + +namespace v8 { +namespace internal { + +Handle FunctionCallbackArguments::Call(FunctionCallback f) { + Isolate* isolate = this->isolate(); + VMState state(isolate); + ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); + FunctionCallbackInfo info(begin(), argv_, argc_, + is_construct_call_); + f(info); + return GetReturnValue(isolate); +} + +Handle PropertyCallbackArguments::Call( + IndexedPropertyEnumeratorCallback f) { + Isolate* isolate = this->isolate(); + VMState state(isolate); + ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); + PropertyCallbackInfo info(begin()); + f(info); + return GetReturnValue(isolate); +} + +} // namespace internal +} // namespace v8 diff --git a/deps/v8/src/api-arguments.h b/deps/v8/src/api-arguments.h new file mode 100644 index 00000000000000..3bfe34dc894c18 --- /dev/null +++ b/deps/v8/src/api-arguments.h @@ -0,0 +1,254 @@ +// Copyright 2016 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. + +#ifndef V8_API_ARGUMENTS_H_ +#define V8_API_ARGUMENTS_H_ + +#include "src/api.h" +#include "src/isolate.h" +#include "src/tracing/trace-event.h" +#include "src/vm-state-inl.h" + +namespace v8 { +namespace internal { + +// Custom arguments replicate a small segment of stack that can be +// accessed through an Arguments object the same way the actual stack +// can. +template +class CustomArgumentsBase : public Relocatable { + public: + virtual inline void IterateInstance(ObjectVisitor* v) { + v->VisitPointers(values_, values_ + kArrayLength); + } + + protected: + inline Object** begin() { return values_; } + explicit inline CustomArgumentsBase(Isolate* isolate) + : Relocatable(isolate) {} + Object* values_[kArrayLength]; +}; + +template +class CustomArguments : public CustomArgumentsBase { + public: + static const int kReturnValueOffset = T::kReturnValueIndex; + + typedef CustomArgumentsBase Super; + ~CustomArguments() { + this->begin()[kReturnValueOffset] = + reinterpret_cast(kHandleZapValue); + } + + protected: + explicit inline CustomArguments(Isolate* isolate) : Super(isolate) {} + + template + Handle GetReturnValue(Isolate* isolate); + + inline Isolate* isolate() { + return reinterpret_cast(this->begin()[T::kIsolateIndex]); + } +}; + +template +template +Handle CustomArguments::GetReturnValue(Isolate* isolate) { + // Check the ReturnValue. + Object** handle = &this->begin()[kReturnValueOffset]; + // Nothing was set, return empty handle as per previous behaviour. + if ((*handle)->IsTheHole()) return Handle(); + Handle result = Handle::cast(Handle(handle)); + result->VerifyApiCallResultType(); + return result; +} + +class PropertyCallbackArguments + : public CustomArguments > { + public: + typedef PropertyCallbackInfo T; + typedef CustomArguments Super; + static const int kArgsLength = T::kArgsLength; + static const int kThisIndex = T::kThisIndex; + static const int kHolderIndex = T::kHolderIndex; + static const int kDataIndex = T::kDataIndex; + static const int kReturnValueDefaultValueIndex = + T::kReturnValueDefaultValueIndex; + static const int kIsolateIndex = T::kIsolateIndex; + static const int kShouldThrowOnErrorIndex = T::kShouldThrowOnErrorIndex; + + PropertyCallbackArguments(Isolate* isolate, Object* data, Object* self, + JSObject* holder, Object::ShouldThrow should_throw) + : Super(isolate) { + Object** values = this->begin(); + values[T::kThisIndex] = self; + values[T::kHolderIndex] = holder; + values[T::kDataIndex] = data; + values[T::kIsolateIndex] = reinterpret_cast(isolate); + values[T::kShouldThrowOnErrorIndex] = + Smi::FromInt(should_throw == Object::THROW_ON_ERROR ? 1 : 0); + + // Here the hole is set as default value. + // It cannot escape into js as it's remove in Call below. + values[T::kReturnValueDefaultValueIndex] = + isolate->heap()->the_hole_value(); + values[T::kReturnValueIndex] = isolate->heap()->the_hole_value(); + DCHECK(values[T::kHolderIndex]->IsHeapObject()); + DCHECK(values[T::kIsolateIndex]->IsSmi()); + } + +/* + * The following Call functions wrap the calling of all callbacks to handle + * calling either the old or the new style callbacks depending on which one + * has been registered. + * For old callbacks which return an empty handle, the ReturnValue is checked + * and used if it's been set to anything inside the callback. + * New style callbacks always use the return value. + */ + Handle Call(IndexedPropertyEnumeratorCallback f); + +#define FOR_EACH_CALLBACK_TABLE_MAPPING_1_NAME(F) \ + F(AccessorNameGetterCallback, "get", v8::Value, Object) \ + F(GenericNamedPropertyQueryCallback, "has", v8::Integer, Object) \ + F(GenericNamedPropertyDeleterCallback, "delete", v8::Boolean, Object) + +#define WRITE_CALL_1_NAME(Function, type, ApiReturn, InternalReturn) \ + Handle Call(Function f, Handle name) { \ + Isolate* isolate = this->isolate(); \ + VMState state(isolate); \ + ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \ + PropertyCallbackInfo info(begin()); \ + LOG(isolate, \ + ApiNamedPropertyAccess("interceptor-named-" type, holder(), *name)); \ + f(v8::Utils::ToLocal(name), info); \ + return GetReturnValue(isolate); \ + } + + FOR_EACH_CALLBACK_TABLE_MAPPING_1_NAME(WRITE_CALL_1_NAME) + +#undef FOR_EACH_CALLBACK_TABLE_MAPPING_1_NAME +#undef WRITE_CALL_1_NAME + +#define FOR_EACH_CALLBACK_TABLE_MAPPING_1_INDEX(F) \ + F(IndexedPropertyGetterCallback, "get", v8::Value, Object) \ + F(IndexedPropertyQueryCallback, "has", v8::Integer, Object) \ + F(IndexedPropertyDeleterCallback, "delete", v8::Boolean, Object) + +#define WRITE_CALL_1_INDEX(Function, type, ApiReturn, InternalReturn) \ + Handle Call(Function f, uint32_t index) { \ + Isolate* isolate = this->isolate(); \ + VMState state(isolate); \ + ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); \ + PropertyCallbackInfo info(begin()); \ + LOG(isolate, ApiIndexedPropertyAccess("interceptor-indexed-" type, \ + holder(), index)); \ + f(index, info); \ + return GetReturnValue(isolate); \ + } + + FOR_EACH_CALLBACK_TABLE_MAPPING_1_INDEX(WRITE_CALL_1_INDEX) + +#undef FOR_EACH_CALLBACK_TABLE_MAPPING_1_INDEX +#undef WRITE_CALL_1_INDEX + + Handle Call(GenericNamedPropertySetterCallback f, Handle name, + Handle value) { + Isolate* isolate = this->isolate(); + VMState state(isolate); + ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); + PropertyCallbackInfo info(begin()); + LOG(isolate, + ApiNamedPropertyAccess("interceptor-named-set", holder(), *name)); + f(v8::Utils::ToLocal(name), v8::Utils::ToLocal(value), info); + return GetReturnValue(isolate); + } + + Handle Call(IndexedPropertySetterCallback f, uint32_t index, + Handle value) { + Isolate* isolate = this->isolate(); + VMState state(isolate); + ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); + PropertyCallbackInfo info(begin()); + LOG(isolate, + ApiIndexedPropertyAccess("interceptor-indexed-set", holder(), index)); + f(index, v8::Utils::ToLocal(value), info); + return GetReturnValue(isolate); + } + + void Call(AccessorNameSetterCallback f, Handle name, + Handle value) { + Isolate* isolate = this->isolate(); + VMState state(isolate); + ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); + PropertyCallbackInfo info(begin()); + LOG(isolate, + ApiNamedPropertyAccess("interceptor-named-set", holder(), *name)); + f(v8::Utils::ToLocal(name), v8::Utils::ToLocal(value), info); + } + + private: + inline JSObject* holder() { + return JSObject::cast(this->begin()[T::kHolderIndex]); + } +}; + +class FunctionCallbackArguments + : public CustomArguments > { + public: + typedef FunctionCallbackInfo T; + typedef CustomArguments Super; + static const int kArgsLength = T::kArgsLength; + static const int kHolderIndex = T::kHolderIndex; + static const int kDataIndex = T::kDataIndex; + static const int kReturnValueDefaultValueIndex = + T::kReturnValueDefaultValueIndex; + static const int kIsolateIndex = T::kIsolateIndex; + static const int kCalleeIndex = T::kCalleeIndex; + static const int kContextSaveIndex = T::kContextSaveIndex; + + FunctionCallbackArguments(internal::Isolate* isolate, internal::Object* data, + internal::HeapObject* callee, + internal::Object* holder, internal::Object** argv, + int argc, bool is_construct_call) + : Super(isolate), + argv_(argv), + argc_(argc), + is_construct_call_(is_construct_call) { + Object** values = begin(); + values[T::kDataIndex] = data; + values[T::kCalleeIndex] = callee; + values[T::kHolderIndex] = holder; + values[T::kContextSaveIndex] = isolate->heap()->the_hole_value(); + values[T::kIsolateIndex] = reinterpret_cast(isolate); + // Here the hole is set as default value. + // It cannot escape into js as it's remove in Call below. + values[T::kReturnValueDefaultValueIndex] = + isolate->heap()->the_hole_value(); + values[T::kReturnValueIndex] = isolate->heap()->the_hole_value(); + DCHECK(values[T::kCalleeIndex]->IsJSFunction() || + values[T::kCalleeIndex]->IsFunctionTemplateInfo()); + DCHECK(values[T::kHolderIndex]->IsHeapObject()); + DCHECK(values[T::kIsolateIndex]->IsSmi()); + } + + /* + * The following Call function wraps the calling of all callbacks to handle + * calling either the old or the new style callbacks depending on which one + * has been registered. + * For old callbacks which return an empty handle, the ReturnValue is checked + * and used if it's been set to anything inside the callback. + * New style callbacks always use the return value. + */ + Handle Call(FunctionCallback f); + + private: + internal::Object** argv_; + int argc_; + bool is_construct_call_; +}; + +} // namespace internal +} // namespace v8 + +#endif // V8_API_ARGUMENTS_H_ diff --git a/deps/v8/src/api-experimental.cc b/deps/v8/src/api-experimental.cc index 98d62e33a2f035..39284342702273 100644 --- a/deps/v8/src/api-experimental.cc +++ b/deps/v8/src/api-experimental.cc @@ -11,20 +11,17 @@ #include "include/v8.h" #include "include/v8-experimental.h" #include "src/api.h" -#include "src/compiler/fast-accessor-assembler.h" +#include "src/fast-accessor-assembler.h" namespace { - -v8::internal::compiler::FastAccessorAssembler* FromApi( +v8::internal::FastAccessorAssembler* FromApi( v8::experimental::FastAccessorBuilder* builder) { - return reinterpret_cast( - builder); + return reinterpret_cast(builder); } - v8::experimental::FastAccessorBuilder* FromInternal( - v8::internal::compiler::FastAccessorAssembler* fast_accessor_assembler) { + v8::internal::FastAccessorAssembler* fast_accessor_assembler) { return reinterpret_cast( fast_accessor_assembler); } @@ -57,8 +54,8 @@ namespace experimental { FastAccessorBuilder* FastAccessorBuilder::New(Isolate* isolate) { i::Isolate* i_isolate = reinterpret_cast(isolate); - internal::compiler::FastAccessorAssembler* faa = - new internal::compiler::FastAccessorAssembler(i_isolate); + internal::FastAccessorAssembler* faa = + new internal::FastAccessorAssembler(i_isolate); return FromInternal(faa); } diff --git a/deps/v8/src/api-natives.cc b/deps/v8/src/api-natives.cc index 3be2df0bb686a5..adf4b6af576431 100644 --- a/deps/v8/src/api-natives.cc +++ b/deps/v8/src/api-natives.cc @@ -266,28 +266,45 @@ MaybeHandle ConfigureInstance(Isolate* isolate, Handle obj, return obj; } -void CacheTemplateInstantiation(Isolate* isolate, Handle serial_number, +void CacheTemplateInstantiation(Isolate* isolate, uint32_t serial_number, Handle object) { auto cache = isolate->template_instantiations_cache(); - auto new_cache = ObjectHashTable::Put(cache, serial_number, object); + auto new_cache = + UnseededNumberDictionary::AtNumberPut(cache, serial_number, object); isolate->native_context()->set_template_instantiations_cache(*new_cache); } -void UncacheTemplateInstantiation(Isolate* isolate, Handle serial_number) { +void UncacheTemplateInstantiation(Isolate* isolate, uint32_t serial_number) { auto cache = isolate->template_instantiations_cache(); - bool was_present = false; - auto new_cache = ObjectHashTable::Remove(cache, serial_number, &was_present); - DCHECK(was_present); + int entry = cache->FindEntry(serial_number); + DCHECK(entry != UnseededNumberDictionary::kNotFound); + Handle result = + UnseededNumberDictionary::DeleteProperty(cache, entry); + USE(result); + DCHECK(result->IsTrue()); + auto new_cache = UnseededNumberDictionary::Shrink(cache, entry); isolate->native_context()->set_template_instantiations_cache(*new_cache); } MaybeHandle InstantiateObject(Isolate* isolate, Handle info, bool is_hidden_prototype) { - // Enter a new scope. Recursion could otherwise create a lot of handles. - HandleScope scope(isolate); // Fast path. Handle result; + uint32_t serial_number = + static_cast(Smi::cast(info->serial_number())->value()); + if (serial_number) { + // Probe cache. + auto cache = isolate->template_instantiations_cache(); + int entry = cache->FindEntry(serial_number); + if (entry != UnseededNumberDictionary::kNotFound) { + Object* boilerplate = cache->ValueAt(entry); + result = handle(JSObject::cast(boilerplate), isolate); + return isolate->factory()->CopyJSObject(result); + } + } + // Enter a new scope. Recursion could otherwise create a lot of handles. + HandleScope scope(isolate); auto constructor = handle(info->constructor(), isolate); Handle cons; if (constructor->IsUndefined()) { @@ -297,18 +314,6 @@ MaybeHandle InstantiateObject(Isolate* isolate, ASSIGN_RETURN_ON_EXCEPTION( isolate, cons, InstantiateFunction(isolate, cons_templ), JSFunction); } - auto serial_number = handle(Smi::cast(info->serial_number()), isolate); - if (serial_number->value()) { - // Probe cache. - auto cache = isolate->template_instantiations_cache(); - Object* boilerplate = cache->Lookup(serial_number); - if (boilerplate->IsJSObject()) { - result = handle(JSObject::cast(boilerplate), isolate); - ASSIGN_RETURN_ON_EXCEPTION( - isolate, result, JSObject::DeepCopyApiBoilerplate(result), JSObject); - return scope.CloseAndEscape(result); - } - } auto object = isolate->factory()->NewJSObject(cons); ASSIGN_RETURN_ON_EXCEPTION( isolate, result, @@ -317,10 +322,9 @@ MaybeHandle InstantiateObject(Isolate* isolate, // TODO(dcarney): is this necessary? JSObject::MigrateSlowToFast(result, 0, "ApiNatives::InstantiateObject"); - if (serial_number->value()) { + if (serial_number) { CacheTemplateInstantiation(isolate, serial_number, result); - ASSIGN_RETURN_ON_EXCEPTION( - isolate, result, JSObject::DeepCopyApiBoilerplate(result), JSObject); + result = isolate->factory()->CopyJSObject(result); } return scope.CloseAndEscape(result); } @@ -329,12 +333,14 @@ MaybeHandle InstantiateObject(Isolate* isolate, MaybeHandle InstantiateFunction(Isolate* isolate, Handle data, Handle name) { - auto serial_number = handle(Smi::cast(data->serial_number()), isolate); - if (serial_number->value()) { + uint32_t serial_number = + static_cast(Smi::cast(data->serial_number())->value()); + if (serial_number) { // Probe cache. auto cache = isolate->template_instantiations_cache(); - Object* element = cache->Lookup(serial_number); - if (element->IsJSFunction()) { + int entry = cache->FindEntry(serial_number); + if (entry != UnseededNumberDictionary::kNotFound) { + Object* element = cache->ValueAt(entry); return handle(JSFunction::cast(element), isolate); } } @@ -378,7 +384,7 @@ MaybeHandle InstantiateFunction(Isolate* isolate, if (!name.is_null() && name->IsString()) { function->shared()->set_name(*name); } - if (serial_number->value()) { + if (serial_number) { // Cache the function. CacheTemplateInstantiation(isolate, serial_number, function); } @@ -386,7 +392,7 @@ MaybeHandle InstantiateFunction(Isolate* isolate, ConfigureInstance(isolate, function, data, data->hidden_prototype()); if (result.is_null()) { // Uncache on error. - if (serial_number->value()) { + if (serial_number) { UncacheTemplateInstantiation(isolate, serial_number); } return MaybeHandle(); @@ -536,7 +542,13 @@ Handle ApiNatives::CreateApiFunction( InstanceType type; switch (instance_type) { case JavaScriptObjectType: - type = JS_OBJECT_TYPE; + if (!obj->needs_access_check() && + obj->named_property_handler()->IsUndefined() && + obj->indexed_property_handler()->IsUndefined()) { + type = JS_OBJECT_TYPE; + } else { + type = JS_SPECIAL_API_OBJECT_TYPE; + } instance_size += JSObject::kHeaderSize; break; case GlobalObjectType: @@ -564,7 +576,7 @@ Handle ApiNatives::CreateApiFunction( result->shared()->set_instance_class_name(*class_name); result->shared()->set_name(*class_name); } - result->shared()->set_function_data(*obj); + result->shared()->set_api_func_data(*obj); result->shared()->set_construct_stub(*construct_stub); result->shared()->DontAdaptArguments(); diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc index 9b6ae720528404..bf351548430a21 100644 --- a/deps/v8/src/api.cc +++ b/deps/v8/src/api.cc @@ -156,6 +156,18 @@ class InternalEscapableScope : public v8::EscapableHandleScope { }; +#ifdef DEBUG +void CheckMicrotasksScopesConsistency(i::Isolate* isolate) { + auto handle_scope_implementer = isolate->handle_scope_implementer(); + if (handle_scope_implementer->microtasks_policy() == + v8::MicrotasksPolicy::kScoped) { + DCHECK(handle_scope_implementer->GetMicrotasksScopeDepth() || + !handle_scope_implementer->DebugMicrotasksScopeDepthIsZero()); + } +} +#endif + + class CallDepthScope { public: explicit CallDepthScope(i::Isolate* isolate, Local context, @@ -175,6 +187,9 @@ class CallDepthScope { if (!context_.IsEmpty()) context_->Exit(); if (!escaped_) isolate_->handle_scope_implementer()->DecrementCallDepth(); if (do_callback_) isolate_->FireCallCompletedCallback(); +#ifdef DEBUG + if (do_callback_) CheckMicrotasksScopesConsistency(isolate_); +#endif } void Escape() { @@ -328,12 +343,23 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) { i::V8::SetSnapshotBlob(snapshot_blob); } +namespace { + +class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { + public: + virtual void* Allocate(size_t length) { + void* data = AllocateUninitialized(length); + return data == NULL ? data : memset(data, 0, length); + } + virtual void* AllocateUninitialized(size_t length) { return malloc(length); } + virtual void Free(void* data, size_t) { free(data); } +}; bool RunExtraCode(Isolate* isolate, Local context, - const char* utf8_source) { - // Run custom script if provided. + const char* utf8_source, const char* name) { base::ElapsedTimer timer; timer.Start(); + Context::Scope context_scope(context); TryCatch try_catch(isolate); Local source_string; if (!String::NewFromUtf8(isolate, utf8_source, NewStringType::kNormal) @@ -341,7 +367,7 @@ bool RunExtraCode(Isolate* isolate, Local context, return false; } Local resource_name = - String::NewFromUtf8(isolate, "", NewStringType::kNormal) + String::NewFromUtf8(isolate, name, NewStringType::kNormal) .ToLocalChecked(); ScriptOrigin origin(resource_name); ScriptCompiler::Source source(source_string, origin); @@ -349,7 +375,7 @@ bool RunExtraCode(Isolate* isolate, Local context, if (!ScriptCompiler::Compile(context, &source).ToLocal(&script)) return false; if (script->Run(context).IsEmpty()) return false; if (i::FLAG_profile_deserialization) { - i::PrintF("Executing custom snapshot script took %0.3f ms\n", + i::PrintF("Executing custom snapshot script %s took %0.3f ms\n", name, timer.Elapsed().InMillisecondsF()); } timer.Stop(); @@ -357,92 +383,152 @@ bool RunExtraCode(Isolate* isolate, Local context, return true; } +StartupData SerializeIsolateAndContext( + Isolate* isolate, Persistent* context, + i::Snapshot::Metadata metadata, + i::StartupSerializer::FunctionCodeHandling function_code_handling) { + if (context->IsEmpty()) return {NULL, 0}; -namespace { + i::Isolate* internal_isolate = reinterpret_cast(isolate); -class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { - public: - virtual void* Allocate(size_t length) { - void* data = AllocateUninitialized(length); - return data == NULL ? data : memset(data, 0, length); + // If we don't do this then we end up with a stray root pointing at the + // context even after we have disposed of the context. + internal_isolate->heap()->CollectAllAvailableGarbage("mksnapshot"); + + // GC may have cleared weak cells, so compact any WeakFixedArrays + // found on the heap. + i::HeapIterator iterator(internal_isolate->heap(), + i::HeapIterator::kFilterUnreachable); + for (i::HeapObject* o = iterator.next(); o != NULL; o = iterator.next()) { + if (o->IsPrototypeInfo()) { + i::Object* prototype_users = i::PrototypeInfo::cast(o)->prototype_users(); + if (prototype_users->IsWeakFixedArray()) { + i::WeakFixedArray* array = i::WeakFixedArray::cast(prototype_users); + array->Compact(); + } + } else if (o->IsScript()) { + i::Object* shared_list = i::Script::cast(o)->shared_function_infos(); + if (shared_list->IsWeakFixedArray()) { + i::WeakFixedArray* array = i::WeakFixedArray::cast(shared_list); + array->Compact(); + } + } } - virtual void* AllocateUninitialized(size_t length) { return malloc(length); } - virtual void Free(void* data, size_t) { free(data); } -}; + + i::Object* raw_context = *v8::Utils::OpenPersistent(*context); + context->Reset(); + + i::SnapshotByteSink snapshot_sink; + i::StartupSerializer ser(internal_isolate, &snapshot_sink, + function_code_handling); + ser.SerializeStrongReferences(); + + i::SnapshotByteSink context_sink; + i::PartialSerializer context_ser(internal_isolate, &ser, &context_sink); + context_ser.Serialize(&raw_context); + ser.SerializeWeakReferencesAndDeferred(); + + return i::Snapshot::CreateSnapshotBlob(ser, context_ser, metadata); +} } // namespace +StartupData V8::CreateSnapshotDataBlob(const char* embedded_source) { + // Create a new isolate and a new context from scratch, optionally run + // a script to embed, and serialize to create a snapshot blob. + StartupData result = {NULL, 0}; + + base::ElapsedTimer timer; + timer.Start(); -StartupData V8::CreateSnapshotDataBlob(const char* custom_source) { - i::Isolate* internal_isolate = new i::Isolate(true); ArrayBufferAllocator allocator; + i::Isolate* internal_isolate = new i::Isolate(true); internal_isolate->set_array_buffer_allocator(&allocator); Isolate* isolate = reinterpret_cast(internal_isolate); - StartupData result = {NULL, 0}; + { - base::ElapsedTimer timer; - timer.Start(); Isolate::Scope isolate_scope(isolate); internal_isolate->Init(NULL); Persistent context; - i::Snapshot::Metadata metadata; { HandleScope handle_scope(isolate); Local new_context = Context::New(isolate); context.Reset(isolate, new_context); - if (custom_source != NULL) { - metadata.set_embeds_script(true); - Context::Scope context_scope(new_context); - if (!RunExtraCode(isolate, new_context, custom_source)) context.Reset(); + if (embedded_source != NULL && + !RunExtraCode(isolate, new_context, embedded_source, "")) { + context.Reset(); } } - if (!context.IsEmpty()) { - // If we don't do this then we end up with a stray root pointing at the - // context even after we have disposed of the context. - internal_isolate->heap()->CollectAllAvailableGarbage("mksnapshot"); - - // GC may have cleared weak cells, so compact any WeakFixedArrays - // found on the heap. - i::HeapIterator iterator(internal_isolate->heap(), - i::HeapIterator::kFilterUnreachable); - for (i::HeapObject* o = iterator.next(); o != NULL; o = iterator.next()) { - if (o->IsPrototypeInfo()) { - i::Object* prototype_users = - i::PrototypeInfo::cast(o)->prototype_users(); - if (prototype_users->IsWeakFixedArray()) { - i::WeakFixedArray* array = i::WeakFixedArray::cast(prototype_users); - array->Compact(); - } - } else if (o->IsScript()) { - i::Object* shared_list = i::Script::cast(o)->shared_function_infos(); - if (shared_list->IsWeakFixedArray()) { - i::WeakFixedArray* array = i::WeakFixedArray::cast(shared_list); - array->Compact(); - } - } - } - i::Object* raw_context = *v8::Utils::OpenPersistent(context); - context.Reset(); + i::Snapshot::Metadata metadata; + metadata.set_embeds_script(embedded_source != NULL); + + result = SerializeIsolateAndContext( + isolate, &context, metadata, i::StartupSerializer::CLEAR_FUNCTION_CODE); + DCHECK(context.IsEmpty()); + } + isolate->Dispose(); + + if (i::FLAG_profile_deserialization) { + i::PrintF("Creating snapshot took %0.3f ms\n", + timer.Elapsed().InMillisecondsF()); + } + timer.Stop(); + return result; +} + +StartupData V8::WarmUpSnapshotDataBlob(StartupData cold_snapshot_blob, + const char* warmup_source) { + CHECK(cold_snapshot_blob.raw_size > 0 && cold_snapshot_blob.data != NULL); + CHECK(warmup_source != NULL); + // Use following steps to create a warmed up snapshot blob from a cold one: + // - Create a new isolate from the cold snapshot. + // - Create a new context to run the warmup script. This will trigger + // compilation of executed functions. + // - Create a new context. This context will be unpolluted. + // - Serialize the isolate and the second context into a new snapshot blob. + StartupData result = {NULL, 0}; - i::SnapshotByteSink snapshot_sink; - i::StartupSerializer ser(internal_isolate, &snapshot_sink); - ser.SerializeStrongReferences(); + base::ElapsedTimer timer; + timer.Start(); - i::SnapshotByteSink context_sink; - i::PartialSerializer context_ser(internal_isolate, &ser, &context_sink); - context_ser.Serialize(&raw_context); - ser.SerializeWeakReferencesAndDeferred(); + ArrayBufferAllocator allocator; + i::Isolate* internal_isolate = new i::Isolate(true); + internal_isolate->set_array_buffer_allocator(&allocator); + internal_isolate->set_snapshot_blob(&cold_snapshot_blob); + Isolate* isolate = reinterpret_cast(internal_isolate); - result = i::Snapshot::CreateSnapshotBlob(ser, context_ser, metadata); + { + Isolate::Scope isolate_scope(isolate); + i::Snapshot::Initialize(internal_isolate); + Persistent context; + bool success; + { + HandleScope handle_scope(isolate); + Local new_context = Context::New(isolate); + success = RunExtraCode(isolate, new_context, warmup_source, ""); } - if (i::FLAG_profile_deserialization) { - i::PrintF("Creating snapshot took %0.3f ms\n", - timer.Elapsed().InMillisecondsF()); + if (success) { + HandleScope handle_scope(isolate); + isolate->ContextDisposedNotification(false); + Local new_context = Context::New(isolate); + context.Reset(isolate, new_context); } - timer.Stop(); + + i::Snapshot::Metadata metadata; + metadata.set_embeds_script(i::Snapshot::EmbedsScript(internal_isolate)); + + result = SerializeIsolateAndContext( + isolate, &context, metadata, i::StartupSerializer::KEEP_FUNCTION_CODE); + DCHECK(context.IsEmpty()); } isolate->Dispose(); + + if (i::FLAG_profile_deserialization) { + i::PrintF("Warming up snapshot took %0.3f ms\n", + timer.Elapsed().InMillisecondsF()); + } + timer.Stop(); return result; } @@ -593,6 +679,10 @@ i::Object** V8::CopyPersistent(i::Object** obj) { return result.location(); } +void V8::RegisterExternallyReferencedObject(i::Object** object, + i::Isolate* isolate) { + isolate->heap()->RegisterExternallyReferencedObject(object); +} void V8::MakeWeak(i::Object** object, void* parameter, WeakCallback weak_callback) { @@ -940,6 +1030,12 @@ void Template::Set(v8::Local name, v8::Local value, ENTER_V8(isolate); i::HandleScope scope(isolate); auto value_obj = Utils::OpenHandle(*value); + if (value_obj->IsObjectTemplateInfo()) { + templ->set_serial_number(i::Smi::FromInt(0)); + if (templ->IsFunctionTemplateInfo()) { + i::Handle::cast(templ)->set_do_not_cache(true); + } + } if (i::FLAG_warn_template_set && value_obj->IsJSReceiver() && !value_obj->IsTemplateInfo()) { @@ -952,7 +1048,7 @@ void Template::Set(v8::Local name, v8::Local value, } // TODO(dcarney): split api to allow values of v8::Value or v8::TemplateInfo. i::ApiNatives::AddDataProperty(isolate, templ, Utils::OpenHandle(*name), - Utils::OpenHandle(*value), + value_obj, static_cast(attribute)); } @@ -1057,14 +1153,26 @@ Local FunctionTemplate::New(Isolate* isolate, v8::Local data, v8::Local signature, int length) { + return New( + isolate, callback, data, signature, length, ConstructorBehavior::kAllow); +} + +Local FunctionTemplate::New(Isolate* isolate, + FunctionCallback callback, + v8::Local data, + v8::Local signature, + int length, + ConstructorBehavior behavior) { i::Isolate* i_isolate = reinterpret_cast(isolate); // Changes to the environment cannot be captured in the snapshot. Expect no // function templates when the isolate is created for serialization. DCHECK(!i_isolate->serializer_enabled()); LOG_API(i_isolate, "FunctionTemplate::New"); ENTER_V8(i_isolate); - return FunctionTemplateNew(i_isolate, callback, nullptr, data, signature, - length, false); + auto tmpl = FunctionTemplateNew(i_isolate, callback, nullptr, data, signature, + length, false); + if (behavior == ConstructorBehavior::kThrow) tmpl->RemovePrototype(); + return tmpl; } @@ -1772,7 +1880,7 @@ MaybeLocal ScriptCompiler::CompileUnboundInternal( if (!source->source_map_url.IsEmpty()) { source_map_url = Utils::OpenHandle(*(source->source_map_url)); } - result = i::Compiler::CompileScript( + result = i::Compiler::GetSharedFunctionInfoForScript( str, name_obj, line_offset, column_offset, source->resource_options, source_map_url, isolate->native_context(), NULL, &script_data, options, i::NOT_NATIVES_CODE, is_module); @@ -1841,7 +1949,6 @@ Local - - - -``` +If not using `xregexp-all.js`, first include the Unicode Base script and then one or more of the addons for Unicode blocks, categories, properties, or scripts. Then you can do this: @@ -118,14 +120,7 @@ XRegExp uses Unicode 8.0.0. ### XRegExp.build -In browsers, first include the script: - -```html - - -``` - -You can then build regular expressions using named subpatterns, for readability and pattern reuse: +Build regular expressions using named subpatterns, for readability and pattern reuse: ```js var time = XRegExp.build('(?x)^ {{hours}} ({{minutes}}) $', { @@ -146,14 +141,7 @@ See also: *[Creating Grammatical Regexes Using XRegExp.build](http://blog.steven ### XRegExp.matchRecursive -In browsers, first include the script: - -```html - - -``` - -You can then match recursive constructs using XRegExp pattern strings as left and right delimiters: +Match recursive constructs using XRegExp pattern strings as left and right delimiters: ```js var str = '(t((e))s)t()(ing)'; @@ -196,13 +184,7 @@ XRegExp.matchRecursive(str, '<', '>', 'gy'); ## Installation and usage -In browsers: - -```html - -``` - -Or, to bundle XRegExp with all of its addons: +In browsers (bundle XRegExp with all of its addons): ```html @@ -232,12 +214,8 @@ require({paths: {xregexp: 'xregexp-all'}}, ['xregexp'], function(XRegExp) { XRegExp copyright 2007-2016 by [Steven Levithan](http://stevenlevithan.com/). -Tools: Unicode range generators by [Mathias Bynens](http://mathiasbynens.be/), and adapted from his [unicode-data](https://github.com/mathiasbynens/unicode-data) project. - -Tests: Uses [Jasmine](http://jasmine.github.io/) for unit tests, and [Benchmark.js](http://benchmarkjs.com) for performance tests. - -Prior art: `XRegExp.build` inspired by [Lea Verou](http://lea.verou.me/)'s [RegExp.create](http://lea.verou.me/2011/03/create-complex-regexps-more-easily/). `XRegExp.union` inspired by [Ruby](http://www.ruby-lang.org/). XRegExp's syntax extensions and flags come from [Perl](http://www.perl.org/), [.NET](http://www.microsoft.com/net), etc. +Unicode range generators by [Mathias Bynens](http://mathiasbynens.be/), and adapted from his [unicode-data](https://github.com/mathiasbynens/unicode-data) project. Uses [Jasmine](http://jasmine.github.io/) for unit tests, and [Benchmark.js](http://benchmarkjs.com) for performance tests. `XRegExp.build` inspired by [RegExp.create](http://lea.verou.me/2011/03/create-complex-regexps-more-easily/) by [Lea Verou](http://lea.verou.me/). `XRegExp.union` inspired by [Ruby](http://www.ruby-lang.org/). XRegExp's syntax extensions and flags come from [Perl](http://www.perl.org/), [.NET](http://www.microsoft.com/net), etc. -All code, including addons, tools, and tests, is released under the terms of the [MIT](http://mit-license.org/) license. +All code, including addons, tools, and tests, is released under the terms of the [MIT License](http://mit-license.org/). Fork me to show support, fix, and extend. diff --git a/tools/eslint/node_modules/xregexp/package.json b/tools/eslint/node_modules/xregexp/package.json index 76cb517195c525..8fe0d7f5027066 100644 --- a/tools/eslint/node_modules/xregexp/package.json +++ b/tools/eslint/node_modules/xregexp/package.json @@ -6,14 +6,14 @@ ] ], "_from": "xregexp@>=3.0.0 <4.0.0", - "_id": "xregexp@3.1.0", + "_id": "xregexp@3.1.1", "_inCache": true, "_installable": true, "_location": "/xregexp", "_nodeVersion": "3.3.1", "_npmOperationalInternal": { - "host": "packages-9-west.internal.npmjs.com", - "tmp": "tmp/xregexp-3.1.0.tgz_1456271836601_0.7557942552957684" + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/xregexp-3.1.1.tgz_1463265906533_0.49629145418293774" }, "_npmUser": { "email": "steves_list@hotmail.com", @@ -32,8 +32,8 @@ "_requiredBy": [ "/table" ], - "_resolved": "https://registry.npmjs.org/xregexp/-/xregexp-3.1.0.tgz", - "_shasum": "14d8461e0bdd38224bfee5039a0898fc42fcd336", + "_resolved": "https://registry.npmjs.org/xregexp/-/xregexp-3.1.1.tgz", + "_shasum": "8ee18d75ef5c7cb3f9967f8d29414a6ca5b1a184", "_shrinkwrap": null, "_spec": "xregexp@^3.0.0", "_where": "/Users/trott/io.js/tools/node_modules/table", @@ -51,17 +51,19 @@ }, "directories": {}, "dist": { - "shasum": "14d8461e0bdd38224bfee5039a0898fc42fcd336", - "tarball": "https://registry.npmjs.org/xregexp/-/xregexp-3.1.0.tgz" + "shasum": "8ee18d75ef5c7cb3f9967f8d29414a6ca5b1a184", + "tarball": "https://registry.npmjs.org/xregexp/-/xregexp-3.1.1.tgz" }, "files": [ "src" ], - "gitHead": "bbd5b1c2f759bdf278192be5df70af16342ffa4d", + "gitHead": "37413619ea9f03638bfa92e038e4b4c15645d446", "homepage": "http://xregexp.com/", "keywords": [ "regex", - "regexp" + "regexp", + "regular expression", + "unicode" ], "license": "MIT", "main": "./src/index.js", @@ -81,5 +83,5 @@ "scripts": { "build": "browserify src/index.js --standalone XRegExp > xregexp-all.js" }, - "version": "3.1.0" + "version": "3.1.1" } diff --git a/tools/eslint/node_modules/xregexp/src/addons/build.js b/tools/eslint/node_modules/xregexp/src/addons/build.js index 221cb26fa940cf..843d4a9c962612 100644 --- a/tools/eslint/node_modules/xregexp/src/addons/build.js +++ b/tools/eslint/node_modules/xregexp/src/addons/build.js @@ -1,5 +1,5 @@ /*! - * XRegExp.build 3.1.0 + * XRegExp.build 3.1.1 * * Steven Levithan (c) 2012-2016 MIT License * Inspired by Lea Verou's RegExp.create @@ -8,17 +8,16 @@ module.exports = function(XRegExp) { 'use strict'; - var REGEX_DATA = 'xregexp', - subParts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g, - parts = XRegExp.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/, subParts], 'g'); + var REGEX_DATA = 'xregexp'; + var subParts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g; + var parts = XRegExp.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/, subParts], 'g'); -/** - * Strips a leading `^` and trailing unescaped `$`, if both are present. - * - * @private - * @param {String} pattern Pattern to process. - * @returns {String} Pattern with edge anchors removed. - */ + /** + * Strips a leading `^` and trailing unescaped `$`, if both are present. + * + * @param {String} pattern Pattern to process. + * @returns {String} Pattern with edge anchors removed. + */ function deanchor(pattern) { // Allow any number of empty noncapturing groups before/after anchors, because regexes // built/generated by XRegExp sometimes include them @@ -37,13 +36,12 @@ module.exports = function(XRegExp) { return pattern; } -/** - * Converts the provided value to an XRegExp. Native RegExp flags are not preserved. - * - * @private - * @param {String|RegExp} value Value to convert. - * @returns {RegExp} XRegExp object with XRegExp syntax applied. - */ + /** + * Converts the provided value to an XRegExp. Native RegExp flags are not preserved. + * + * @param {String|RegExp} value Value to convert. + * @returns {RegExp} XRegExp object with XRegExp syntax applied. + */ function asXRegExp(value) { return XRegExp.isRegExp(value) ? (value[REGEX_DATA] && value[REGEX_DATA].captureNames ? @@ -56,31 +54,30 @@ module.exports = function(XRegExp) { XRegExp(value); } -/** - * Builds regexes using named subpatterns, for readability and pattern reuse. Backreferences in the - * outer pattern and provided subpatterns are automatically renumbered to work correctly. Native - * flags used by provided subpatterns are ignored in favor of the `flags` argument. - * - * @memberOf XRegExp - * @param {String} pattern XRegExp pattern using `{{name}}` for embedded subpatterns. Allows - * `({{name}})` as shorthand for `(?{{name}})`. Patterns cannot be embedded within - * character classes. - * @param {Object} subs Lookup object for named subpatterns. Values can be strings or regexes. A - * leading `^` and trailing unescaped `$` are stripped from subpatterns, if both are present. - * @param {String} [flags] Any combination of XRegExp flags. - * @returns {RegExp} Regex with interpolated subpatterns. - * @example - * - * var time = XRegExp.build('(?x)^ {{hours}} ({{minutes}}) $', { - * hours: XRegExp.build('{{h12}} : | {{h24}}', { - * h12: /1[0-2]|0?[1-9]/, - * h24: /2[0-3]|[01][0-9]/ - * }, 'x'), - * minutes: /^[0-5][0-9]$/ - * }); - * time.test('10:59'); // -> true - * XRegExp.exec('10:59', time).minutes; // -> '59' - */ + /** + * Builds regexes using named subpatterns, for readability and pattern reuse. Backreferences in + * the outer pattern and provided subpatterns are automatically renumbered to work correctly. + * Native flags used by provided subpatterns are ignored in favor of the `flags` argument. + * + * @param {String} pattern XRegExp pattern using `{{name}}` for embedded subpatterns. Allows + * `({{name}})` as shorthand for `(?{{name}})`. Patterns cannot be embedded within + * character classes. + * @param {Object} subs Lookup object for named subpatterns. Values can be strings or regexes. A + * leading `^` and trailing unescaped `$` are stripped from subpatterns, if both are present. + * @param {String} [flags] Any combination of XRegExp flags. + * @returns {RegExp} Regex with interpolated subpatterns. + * @example + * + * var time = XRegExp.build('(?x)^ {{hours}} ({{minutes}}) $', { + * hours: XRegExp.build('{{h12}} : | {{h24}}', { + * h12: /1[0-2]|0?[1-9]/, + * h24: /2[0-3]|[01][0-9]/ + * }, 'x'), + * minutes: /^[0-5][0-9]$/ + * }); + * time.test('10:59'); // -> true + * XRegExp.exec('10:59', time).minutes; // -> '59' + */ XRegExp.build = function(pattern, subs, flags) { var inlineFlags = /^\(\?([\w$]+)\)/.exec(pattern), data = {}, diff --git a/tools/eslint/node_modules/xregexp/src/addons/matchrecursive.js b/tools/eslint/node_modules/xregexp/src/addons/matchrecursive.js index 1de3bdc5579cea..6a51b56b732614 100644 --- a/tools/eslint/node_modules/xregexp/src/addons/matchrecursive.js +++ b/tools/eslint/node_modules/xregexp/src/addons/matchrecursive.js @@ -1,5 +1,5 @@ /*! - * XRegExp.matchRecursive 3.1.0 + * XRegExp.matchRecursive 3.1.1 * * Steven Levithan (c) 2009-2016 MIT License */ @@ -7,11 +7,9 @@ module.exports = function(XRegExp) { 'use strict'; -/** - * Returns a match detail object composed of the provided values. - * - * @private - */ + /** + * Returns a match detail object composed of the provided values. + */ function row(name, value, start, end) { return { name: name, @@ -21,56 +19,55 @@ module.exports = function(XRegExp) { }; } -/** - * Returns an array of match strings between outermost left and right delimiters, or an array of - * objects with detailed match parts and position data. An error is thrown if delimiters are - * unbalanced within the data. - * - * @memberOf XRegExp - * @param {String} str String to search. - * @param {String} left Left delimiter as an XRegExp pattern. - * @param {String} right Right delimiter as an XRegExp pattern. - * @param {String} [flags] Any native or XRegExp flags, used for the left and right delimiters. - * @param {Object} [options] Lets you specify `valueNames` and `escapeChar` options. - * @returns {Array} Array of matches, or an empty array. - * @example - * - * // Basic usage - * var str = '(t((e))s)t()(ing)'; - * XRegExp.matchRecursive(str, '\\(', '\\)', 'g'); - * // -> ['t((e))s', '', 'ing'] - * - * // Extended information mode with valueNames - * str = 'Here is
    an
    example'; - * XRegExp.matchRecursive(str, '', '', 'gi', { - * valueNames: ['between', 'left', 'match', 'right'] - * }); - * // -> [ - * // {name: 'between', value: 'Here is ', start: 0, end: 8}, - * // {name: 'left', value: '
    ', start: 8, end: 13}, - * // {name: 'match', value: '
    an
    ', start: 13, end: 27}, - * // {name: 'right', value: '
    ', start: 27, end: 33}, - * // {name: 'between', value: ' example', start: 33, end: 41} - * // ] - * - * // Omitting unneeded parts with null valueNames, and using escapeChar - * str = '...{1}.\\{{function(x,y){return {y:x}}}'; - * XRegExp.matchRecursive(str, '{', '}', 'g', { - * valueNames: ['literal', null, 'value', null], - * escapeChar: '\\' - * }); - * // -> [ - * // {name: 'literal', value: '...', start: 0, end: 3}, - * // {name: 'value', value: '1', start: 4, end: 5}, - * // {name: 'literal', value: '.\\{', start: 6, end: 9}, - * // {name: 'value', value: 'function(x,y){return {y:x}}', start: 10, end: 37} - * // ] - * - * // Sticky mode via flag y - * str = '<1><<<2>>><3>4<5>'; - * XRegExp.matchRecursive(str, '<', '>', 'gy'); - * // -> ['1', '<<2>>', '3'] - */ + /** + * Returns an array of match strings between outermost left and right delimiters, or an array of + * objects with detailed match parts and position data. An error is thrown if delimiters are + * unbalanced within the data. + * + * @param {String} str String to search. + * @param {String} left Left delimiter as an XRegExp pattern. + * @param {String} right Right delimiter as an XRegExp pattern. + * @param {String} [flags] Any native or XRegExp flags, used for the left and right delimiters. + * @param {Object} [options] Lets you specify `valueNames` and `escapeChar` options. + * @returns {Array} Array of matches, or an empty array. + * @example + * + * // Basic usage + * var str = '(t((e))s)t()(ing)'; + * XRegExp.matchRecursive(str, '\\(', '\\)', 'g'); + * // -> ['t((e))s', '', 'ing'] + * + * // Extended information mode with valueNames + * str = 'Here is
    an
    example'; + * XRegExp.matchRecursive(str, '', '', 'gi', { + * valueNames: ['between', 'left', 'match', 'right'] + * }); + * // -> [ + * // {name: 'between', value: 'Here is ', start: 0, end: 8}, + * // {name: 'left', value: '
    ', start: 8, end: 13}, + * // {name: 'match', value: '
    an
    ', start: 13, end: 27}, + * // {name: 'right', value: '
    ', start: 27, end: 33}, + * // {name: 'between', value: ' example', start: 33, end: 41} + * // ] + * + * // Omitting unneeded parts with null valueNames, and using escapeChar + * str = '...{1}.\\{{function(x,y){return {y:x}}}'; + * XRegExp.matchRecursive(str, '{', '}', 'g', { + * valueNames: ['literal', null, 'value', null], + * escapeChar: '\\' + * }); + * // -> [ + * // {name: 'literal', value: '...', start: 0, end: 3}, + * // {name: 'value', value: '1', start: 4, end: 5}, + * // {name: 'literal', value: '.\\{', start: 6, end: 9}, + * // {name: 'value', value: 'function(x,y){return {y:x}}', start: 10, end: 37} + * // ] + * + * // Sticky mode via flag y + * str = '<1><<<2>>><3>4<5>'; + * XRegExp.matchRecursive(str, '<', '>', 'gy'); + * // -> ['1', '<<2>>', '3'] + */ XRegExp.matchRecursive = function(str, left, right, flags, options) { flags = flags || ''; options = options || {}; diff --git a/tools/eslint/node_modules/xregexp/src/addons/unicode-base.js b/tools/eslint/node_modules/xregexp/src/addons/unicode-base.js index 2a323041b60e3e..011a384405e149 100644 --- a/tools/eslint/node_modules/xregexp/src/addons/unicode-base.js +++ b/tools/eslint/node_modules/xregexp/src/addons/unicode-base.js @@ -1,56 +1,44 @@ /*! - * XRegExp Unicode Base 3.1.0 + * XRegExp Unicode Base 3.1.1 * * Steven Levithan (c) 2008-2016 MIT License */ -/** - * Adds base support for Unicode matching: - * - Adds syntax `\p{..}` for matching Unicode tokens. Tokens can be inverted using `\P{..}` or - * `\p{^..}`. Token names ignore case, spaces, hyphens, and underscores. You can omit the braces - * for token names that are a single letter (e.g. `\pL` or `PL`). - * - Adds flag A (astral), which enables 21-bit Unicode support. - * - Adds the `XRegExp.addUnicodeData` method used by other addons to provide character data. - * - * Unicode Base relies on externally provided Unicode character data. Official addons are available - * to provide data for Unicode categories, scripts, blocks, and properties. - * - * @requires XRegExp - */ module.exports = function(XRegExp) { 'use strict'; -// Storage for Unicode data + /** + * Adds base support for Unicode matching: + * - Adds syntax `\p{..}` for matching Unicode tokens. Tokens can be inverted using `\P{..}` or + * `\p{^..}`. Token names ignore case, spaces, hyphens, and underscores. You can omit the + * braces for token names that are a single letter (e.g. `\pL` or `PL`). + * - Adds flag A (astral), which enables 21-bit Unicode support. + * - Adds the `XRegExp.addUnicodeData` method used by other addons to provide character data. + * + * Unicode Base relies on externally provided Unicode character data. Official addons are + * available to provide data for Unicode categories, scripts, blocks, and properties. + * + * @requires XRegExp + */ + + // ==--------------------------== + // Private stuff + // ==--------------------------== + + // Storage for Unicode data var unicode = {}; -/* ============================== - * Private functions - * ============================== */ + // Reuse utils + var dec = XRegExp._dec; + var hex = XRegExp._hex; + var pad4 = XRegExp._pad4; -// Generates a token lookup name: lowercase, with hyphens, spaces, and underscores removed + // Generates a token lookup name: lowercase, with hyphens, spaces, and underscores removed function normalize(name) { return name.replace(/[- _]+/g, '').toLowerCase(); } -// Adds leading zeros if shorter than four characters - function pad4(str) { - while (str.length < 4) { - str = '0' + str; - } - return str; - } - -// Converts a hexadecimal number to decimal - function dec(hex) { - return parseInt(hex, 16); - } - -// Converts a decimal number to hexadecimal - function hex(dec) { - return parseInt(dec, 10).toString(16); - } - -// Gets the decimal code of a literal code unit, \xHH, \uHHHH, or a backslash-escaped literal + // Gets the decimal code of a literal code unit, \xHH, \uHHHH, or a backslash-escaped literal function charCode(chr) { var esc = /^\\[xu](.+)/.exec(chr); return esc ? @@ -58,21 +46,24 @@ module.exports = function(XRegExp) { chr.charCodeAt(chr.charAt(0) === '\\' ? 1 : 0); } -// Inverts a list of ordered BMP characters and ranges + // Inverts a list of ordered BMP characters and ranges function invertBmp(range) { - var output = '', - lastEnd = -1, - start; - XRegExp.forEach(range, /(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/, function(m) { - start = charCode(m[1]); - if (start > (lastEnd + 1)) { - output += '\\u' + pad4(hex(lastEnd + 1)); - if (start > (lastEnd + 2)) { - output += '-\\u' + pad4(hex(start - 1)); + var output = ''; + var lastEnd = -1; + XRegExp.forEach( + range, + /(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/, + function(m) { + var start = charCode(m[1]); + if (start > (lastEnd + 1)) { + output += '\\u' + pad4(hex(lastEnd + 1)); + if (start > (lastEnd + 2)) { + output += '-\\u' + pad4(hex(start - 1)); + } } + lastEnd = charCode(m[2] || m[1]); } - lastEnd = charCode(m[2] || m[1]); - }); + ); if (lastEnd < 0xFFFF) { output += '\\u' + pad4(hex(lastEnd + 1)); if (lastEnd < 0xFFFE) { @@ -82,7 +73,7 @@ module.exports = function(XRegExp) { return output; } -// Generates an inverted BMP range on first use + // Generates an inverted BMP range on first use function cacheInvertedBmp(slug) { var prop = 'b!'; return unicode[slug][prop] || ( @@ -90,7 +81,7 @@ module.exports = function(XRegExp) { ); } -// Combines and optionally negates BMP and astral data + // Combines and optionally negates BMP and astral data function buildAstral(slug, isNegated) { var item = unicode[slug], combined = ''; @@ -109,7 +100,7 @@ module.exports = function(XRegExp) { '(?:' + combined + ')'; } -// Builds a complete astral pattern on first use + // Builds a complete astral pattern on first use function cacheAstral(slug, isNegated) { var prop = isNegated ? 'a!' : 'a='; return unicode[slug][prop] || ( @@ -117,13 +108,13 @@ module.exports = function(XRegExp) { ); } -/* ============================== - * Core functionality - * ============================== */ + // ==--------------------------== + // Core functionality + // ==--------------------------== -/* - * Add Unicode token syntax: \p{..}, \P{..}, \p{^..}. Also add astral mode (flag A). - */ + /* + * Add Unicode token syntax: \p{..}, \P{..}, \p{^..}. Also add astral mode (flag A). + */ XRegExp.addToken( // Use `*` instead of `+` to avoid capturing `^` as the token name in `\p{^}` /\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/, @@ -181,33 +172,33 @@ module.exports = function(XRegExp) { } ); -/** - * Adds to the list of Unicode tokens that XRegExp regexes can match via `\p` or `\P`. - * - * @memberOf XRegExp - * @param {Array} data Objects with named character ranges. Each object may have properties `name`, - * `alias`, `isBmpLast`, `inverseOf`, `bmp`, and `astral`. All but `name` are optional, although - * one of `bmp` or `astral` is required (unless `inverseOf` is set). If `astral` is absent, the - * `bmp` data is used for BMP and astral modes. If `bmp` is absent, the name errors in BMP mode - * but works in astral mode. If both `bmp` and `astral` are provided, the `bmp` data only is used - * in BMP mode, and the combination of `bmp` and `astral` data is used in astral mode. - * `isBmpLast` is needed when a token matches orphan high surrogates *and* uses surrogate pairs - * to match astral code points. The `bmp` and `astral` data should be a combination of literal - * characters and `\xHH` or `\uHHHH` escape sequences, with hyphens to create ranges. Any regex - * metacharacters in the data should be escaped, apart from range-creating hyphens. The `astral` - * data can additionally use character classes and alternation, and should use surrogate pairs to - * represent astral code points. `inverseOf` can be used to avoid duplicating character data if a - * Unicode token is defined as the exact inverse of another token. - * @example - * - * // Basic use - * XRegExp.addUnicodeData([{ - * name: 'XDigit', - * alias: 'Hexadecimal', - * bmp: '0-9A-Fa-f' - * }]); - * XRegExp('\\p{XDigit}:\\p{Hexadecimal}+').test('0:3D'); // -> true - */ + /** + * Adds to the list of Unicode tokens that XRegExp regexes can match via `\p` or `\P`. + * + * @param {Array} data Objects with named character ranges. Each object may have properties + * `name`, `alias`, `isBmpLast`, `inverseOf`, `bmp`, and `astral`. All but `name` are + * optional, although one of `bmp` or `astral` is required (unless `inverseOf` is set). If + * `astral` is absent, the `bmp` data is used for BMP and astral modes. If `bmp` is absent, + * the name errors in BMP mode but works in astral mode. If both `bmp` and `astral` are + * provided, the `bmp` data only is used in BMP mode, and the combination of `bmp` and + * `astral` data is used in astral mode. `isBmpLast` is needed when a token matches orphan + * high surrogates *and* uses surrogate pairs to match astral code points. The `bmp` and + * `astral` data should be a combination of literal characters and `\xHH` or `\uHHHH` escape + * sequences, with hyphens to create ranges. Any regex metacharacters in the data should be + * escaped, apart from range-creating hyphens. The `astral` data can additionally use + * character classes and alternation, and should use surrogate pairs to represent astral code + * points. `inverseOf` can be used to avoid duplicating character data if a Unicode token is + * defined as the exact inverse of another token. + * @example + * + * // Basic use + * XRegExp.addUnicodeData([{ + * name: 'XDigit', + * alias: 'Hexadecimal', + * bmp: '0-9A-Fa-f' + * }]); + * XRegExp('\\p{XDigit}:\\p{Hexadecimal}+').test('0:3D'); // -> true + */ XRegExp.addUnicodeData = function(data) { var ERR_NO_NAME = 'Unicode token requires name', ERR_NO_DATA = 'Unicode token has no character data ', diff --git a/tools/eslint/node_modules/xregexp/src/addons/unicode-blocks.js b/tools/eslint/node_modules/xregexp/src/addons/unicode-blocks.js index 918dc9d5c45742..97cc71fbb1a6d8 100644 --- a/tools/eslint/node_modules/xregexp/src/addons/unicode-blocks.js +++ b/tools/eslint/node_modules/xregexp/src/addons/unicode-blocks.js @@ -1,21 +1,23 @@ /*! - * XRegExp Unicode Blocks 3.1.0 + * XRegExp Unicode Blocks 3.1.1 * * Steven Levithan (c) 2010-2016 MIT License * Unicode data by Mathias Bynens */ -/** - * Adds support for all Unicode blocks. Block names use the prefix 'In'. E.g., `\p{InBasicLatin}`. - * Token names are case insensitive, and any spaces, hyphens, and underscores are ignored. - * - * Uses Unicode 8.0.0. - * - * @requires XRegExp, Unicode Base - */ module.exports = function(XRegExp) { 'use strict'; + /** + * Adds support for all Unicode blocks. Block names use the prefix 'In'. E.g., + * `\p{InBasicLatin}`. Token names are case insensitive, and any spaces, hyphens, and + * underscores are ignored. + * + * Uses Unicode 8.0.0. + * + * @requires XRegExp, Unicode Base + */ + if (!XRegExp.addUnicodeData) { throw new ReferenceError('Unicode Base must be loaded before Unicode Blocks'); } diff --git a/tools/eslint/node_modules/xregexp/src/addons/unicode-categories.js b/tools/eslint/node_modules/xregexp/src/addons/unicode-categories.js index 6da732f505abcc..4e201cb95c5050 100644 --- a/tools/eslint/node_modules/xregexp/src/addons/unicode-categories.js +++ b/tools/eslint/node_modules/xregexp/src/addons/unicode-categories.js @@ -1,22 +1,23 @@ /*! - * XRegExp Unicode Categories 3.1.0 + * XRegExp Unicode Categories 3.1.1 * * Steven Levithan (c) 2010-2016 MIT License * Unicode data by Mathias Bynens */ -/** - * Adds support for Unicode's general categories. E.g., `\p{Lu}` or `\p{Uppercase Letter}`. See - * category descriptions in UAX #44 . Token names - * are case insensitive, and any spaces, hyphens, and underscores are ignored. - * - * Uses Unicode 8.0.0. - * - * @requires XRegExp, Unicode Base - */ module.exports = function(XRegExp) { 'use strict'; + /** + * Adds support for Unicode's general categories. E.g., `\p{Lu}` or `\p{Uppercase Letter}`. See + * category descriptions in UAX #44 . Token + * names are case insensitive, and any spaces, hyphens, and underscores are ignored. + * + * Uses Unicode 8.0.0. + * + * @requires XRegExp, Unicode Base + */ + if (!XRegExp.addUnicodeData) { throw new ReferenceError('Unicode Base must be loaded before Unicode Categories'); } diff --git a/tools/eslint/node_modules/xregexp/src/addons/unicode-properties.js b/tools/eslint/node_modules/xregexp/src/addons/unicode-properties.js index 92a041b4f85839..725a77050ea781 100644 --- a/tools/eslint/node_modules/xregexp/src/addons/unicode-properties.js +++ b/tools/eslint/node_modules/xregexp/src/addons/unicode-properties.js @@ -1,51 +1,52 @@ /*! - * XRegExp Unicode Properties 3.1.0 + * XRegExp Unicode Properties 3.1.1 * * Steven Levithan (c) 2012-2016 MIT License * Unicode data by Mathias Bynens */ -/** - * Adds properties to meet the UTS #18 Level 1 RL1.2 requirements for Unicode regex support. See - * . Following are definitions of these properties from UAX - * #44 : - * - * - Alphabetic - * Characters with the Alphabetic property. Generated from: Lowercase + Uppercase + Lt + Lm + Lo + - * Nl + Other_Alphabetic. - * - * - Default_Ignorable_Code_Point - * For programmatic determination of default ignorable code points. New characters that should be - * ignored in rendering (unless explicitly supported) will be assigned in these ranges, permitting - * programs to correctly handle the default rendering of such characters when not otherwise - * supported. - * - * - Lowercase - * Characters with the Lowercase property. Generated from: Ll + Other_Lowercase. - * - * - Noncharacter_Code_Point - * Code points permanently reserved for internal use. - * - * - Uppercase - * Characters with the Uppercase property. Generated from: Lu + Other_Uppercase. - * - * - White_Space - * Spaces, separator characters and other control characters which should be treated by - * programming languages as "white space" for the purpose of parsing elements. - * - * The properties ASCII, Any, and Assigned are also included but are not defined in UAX #44. UTS #18 - * RL1.2 additionally requires support for Unicode scripts and general categories. These are - * included in XRegExp's Unicode Categories and Unicode Scripts addons. - * - * Token names are case insensitive, and any spaces, hyphens, and underscores are ignored. - * - * Uses Unicode 8.0.0. - * - * @requires XRegExp, Unicode Base - */ module.exports = function(XRegExp) { 'use strict'; + /** + * Adds properties to meet the UTS #18 Level 1 RL1.2 requirements for Unicode regex support. See + * . Following are definitions of these properties from + * UAX #44 : + * + * - Alphabetic + * Characters with the Alphabetic property. Generated from: Lowercase + Uppercase + Lt + Lm + + * Lo + Nl + Other_Alphabetic. + * + * - Default_Ignorable_Code_Point + * For programmatic determination of default ignorable code points. New characters that should + * be ignored in rendering (unless explicitly supported) will be assigned in these ranges, + * permitting programs to correctly handle the default rendering of such characters when not + * otherwise supported. + * + * - Lowercase + * Characters with the Lowercase property. Generated from: Ll + Other_Lowercase. + * + * - Noncharacter_Code_Point + * Code points permanently reserved for internal use. + * + * - Uppercase + * Characters with the Uppercase property. Generated from: Lu + Other_Uppercase. + * + * - White_Space + * Spaces, separator characters and other control characters which should be treated by + * programming languages as "white space" for the purpose of parsing elements. + * + * The properties ASCII, Any, and Assigned are also included but are not defined in UAX #44. UTS + * #18 RL1.2 additionally requires support for Unicode scripts and general categories. These are + * included in XRegExp's Unicode Categories and Unicode Scripts addons. + * + * Token names are case insensitive, and any spaces, hyphens, and underscores are ignored. + * + * Uses Unicode 8.0.0. + * + * @requires XRegExp, Unicode Base + */ + if (!XRegExp.addUnicodeData) { throw new ReferenceError('Unicode Base must be loaded before Unicode Properties'); } diff --git a/tools/eslint/node_modules/xregexp/src/addons/unicode-scripts.js b/tools/eslint/node_modules/xregexp/src/addons/unicode-scripts.js index bb28ec36a09b31..06983d6a821baf 100644 --- a/tools/eslint/node_modules/xregexp/src/addons/unicode-scripts.js +++ b/tools/eslint/node_modules/xregexp/src/addons/unicode-scripts.js @@ -1,21 +1,22 @@ /*! - * XRegExp Unicode Scripts 3.1.0 + * XRegExp Unicode Scripts 3.1.1 * * Steven Levithan (c) 2010-2016 MIT License * Unicode data by Mathias Bynens */ -/** - * Adds support for all Unicode scripts. E.g., `\p{Latin}`. Token names are case insensitive, and - * any spaces, hyphens, and underscores are ignored. - * - * Uses Unicode 8.0.0. - * - * @requires XRegExp, Unicode Base - */ module.exports = function(XRegExp) { 'use strict'; + /** + * Adds support for all Unicode scripts. E.g., `\p{Latin}`. Token names are case insensitive, + * and any spaces, hyphens, and underscores are ignored. + * + * Uses Unicode 8.0.0. + * + * @requires XRegExp, Unicode Base + */ + if (!XRegExp.addUnicodeData) { throw new ReferenceError('Unicode Base must be loaded before Unicode Scripts'); } diff --git a/tools/eslint/node_modules/xregexp/src/xregexp.js b/tools/eslint/node_modules/xregexp/src/xregexp.js index 91c60b640660f6..4cedd851778466 100644 --- a/tools/eslint/node_modules/xregexp/src/xregexp.js +++ b/tools/eslint/node_modules/xregexp/src/xregexp.js @@ -1,9 +1,11 @@ /*! - * XRegExp 3.1.0 + * XRegExp 3.1.1 * * Steven Levithan (c) 2007-2016 MIT License */ +'use strict'; + /** * XRegExp provides augmented, extensible regular expressions. You get additional regex syntax and * flags, beyond what browsers support natively. XRegExp is also a regex utility belt with tools to @@ -11,85 +13,87 @@ * cross-browser inconsistencies. */ - 'use strict'; - -/* ============================== - * Private stuff - * ============================== */ - - // Property name used for extended regex instance data - var REGEX_DATA = 'xregexp'; - // Optional features that can be installed and uninstalled - var features = { - astral: false, - natives: false - }; - // Native methods to use and restore ('native' is an ES3 reserved keyword) - var nativ = { - exec: RegExp.prototype.exec, - test: RegExp.prototype.test, - match: String.prototype.match, - replace: String.prototype.replace, - split: String.prototype.split - }; - // Storage for fixed/extended native methods - var fixed = {}; - // Storage for regexes cached by `XRegExp.cache` - var regexCache = {}; - // Storage for pattern details cached by the `XRegExp` constructor - var patternCache = {}; - // Storage for regex syntax tokens added internally or by `XRegExp.addToken` - var tokens = []; - // Token scopes - var defaultScope = 'default'; - var classScope = 'class'; - // Regexes that match native regex syntax, including octals - var nativeTokens = { - // Any native multicharacter token in default scope, or any single character - 'default': /\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/, - // Any native multicharacter token in character class scope, or any single character - 'class': /\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/ - }; - // Any backreference or dollar-prefixed character in replacement strings - var replacementToken = /\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g; - // Check for correct `exec` handling of nonparticipating capturing groups - var correctExecNpcg = nativ.exec.call(/()??/, '')[1] === undefined; - // Check for ES6 `flags` prop support - var hasFlagsProp = /x/.flags !== undefined; - // Shortcut to `Object.prototype.toString` - var toString = {}.toString; - - function hasNativeFlag(flag) { - // Can't check based on the presense of properties/getters since - // browsers might support such properties even when don't support the - // corresponding flag in regex construction (tested in Chrome 48, where - // `'unicode' in /x/` is true but trying to construct a regex with flag - // `u` throws an error). - var isSupported = true; - try { - new RegExp('', flag); - } catch (exception) { - isSupported = false; - } - return isSupported; +// ==--------------------------== +// Private stuff +// ==--------------------------== + +// Property name used for extended regex instance data +var REGEX_DATA = 'xregexp'; +// Optional features that can be installed and uninstalled +var features = { + astral: false, + natives: false +}; +// Native methods to use and restore ('native' is an ES3 reserved keyword) +var nativ = { + exec: RegExp.prototype.exec, + test: RegExp.prototype.test, + match: String.prototype.match, + replace: String.prototype.replace, + split: String.prototype.split +}; +// Storage for fixed/extended native methods +var fixed = {}; +// Storage for regexes cached by `XRegExp.cache` +var regexCache = {}; +// Storage for pattern details cached by the `XRegExp` constructor +var patternCache = {}; +// Storage for regex syntax tokens added internally or by `XRegExp.addToken` +var tokens = []; +// Token scopes +var defaultScope = 'default'; +var classScope = 'class'; +// Regexes that match native regex syntax, including octals +var nativeTokens = { + // Any native multicharacter token in default scope, or any single character + 'default': /\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/, + // Any native multicharacter token in character class scope, or any single character + 'class': /\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/ +}; +// Any backreference or dollar-prefixed character in replacement strings +var replacementToken = /\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g; +// Check for correct `exec` handling of nonparticipating capturing groups +var correctExecNpcg = nativ.exec.call(/()??/, '')[1] === undefined; +// Check for ES6 `flags` prop support +var hasFlagsProp = /x/.flags !== undefined; +// Shortcut to `Object.prototype.toString` +var toString = {}.toString; + +function hasNativeFlag(flag) { + // Can't check based on the presense of properties/getters since browsers might support such + // properties even when they don't support the corresponding flag in regex construction (tested + // in Chrome 48, where `'unicode' in /x/` is true but trying to construct a regex with flag `u` + // throws an error) + var isSupported = true; + try { + // Can't use regex literals for testing even in a `try` because regex literals with + // unsupported flags cause a compilation error in IE + new RegExp('', flag); + } catch (exception) { + isSupported = false; } - // Check for ES6 `u` flag support - var hasNativeU = hasNativeFlag('u'); - // Check for ES6 `y` flag support - var hasNativeY = hasNativeFlag('y'); - // Tracker for known flags, including addon flags - var registeredFlags = { - g: true, - i: true, - m: true, - u: hasNativeU, - y: hasNativeY - }; + if (isSupported && flag === 'y') { + // Work around Safari 9.1.1 bug + return new RegExp('aa|.', 'y').test('b'); + } + return isSupported; +} +// Check for ES6 `u` flag support +var hasNativeU = hasNativeFlag('u'); +// Check for ES6 `y` flag support +var hasNativeY = hasNativeFlag('y'); +// Tracker for known flags, including addon flags +var registeredFlags = { + g: true, + i: true, + m: true, + u: hasNativeU, + y: hasNativeY +}; /** * Attaches extended data and `XRegExp.prototype` properties to a regex object. * - * @private * @param {RegExp} regex Regex to augment. * @param {Array} captureNames Array with capture names, or `null`. * @param {String} xSource XRegExp pattern used to generate `regex`, or `null` if N/A. @@ -99,53 +103,51 @@ * skipping some operations like attaching `XRegExp.prototype` properties. * @returns {RegExp} Augmented regex. */ - function augment(regex, captureNames, xSource, xFlags, isInternalOnly) { - var p; +function augment(regex, captureNames, xSource, xFlags, isInternalOnly) { + var p; - regex[REGEX_DATA] = { - captureNames: captureNames - }; + regex[REGEX_DATA] = { + captureNames: captureNames + }; - if (isInternalOnly) { - return regex; - } + if (isInternalOnly) { + return regex; + } - // Can't auto-inherit these since the XRegExp constructor returns a nonprimitive value - if (regex.__proto__) { - regex.__proto__ = XRegExp.prototype; - } else { - for (p in XRegExp.prototype) { - // An `XRegExp.prototype.hasOwnProperty(p)` check wouldn't be worth it here, since - // this is performance sensitive, and enumerable `Object.prototype` or - // `RegExp.prototype` extensions exist on `regex.prototype` anyway - regex[p] = XRegExp.prototype[p]; - } + // Can't auto-inherit these since the XRegExp constructor returns a nonprimitive value + if (regex.__proto__) { + regex.__proto__ = XRegExp.prototype; + } else { + for (p in XRegExp.prototype) { + // An `XRegExp.prototype.hasOwnProperty(p)` check wouldn't be worth it here, since this + // is performance sensitive, and enumerable `Object.prototype` or `RegExp.prototype` + // extensions exist on `regex.prototype` anyway + regex[p] = XRegExp.prototype[p]; } + } - regex[REGEX_DATA].source = xSource; - // Emulate the ES6 `flags` prop by ensuring flags are in alphabetical order - regex[REGEX_DATA].flags = xFlags ? xFlags.split('').sort().join('') : xFlags; + regex[REGEX_DATA].source = xSource; + // Emulate the ES6 `flags` prop by ensuring flags are in alphabetical order + regex[REGEX_DATA].flags = xFlags ? xFlags.split('').sort().join('') : xFlags; - return regex; - } + return regex; +} /** * Removes any duplicate characters from the provided string. * - * @private * @param {String} str String to remove duplicate characters from. * @returns {String} String with any duplicate characters removed. */ - function clipDuplicates(str) { - return nativ.replace.call(str, /([\s\S])(?=[\s\S]*\1)/g, ''); - } +function clipDuplicates(str) { + return nativ.replace.call(str, /([\s\S])(?=[\s\S]*\1)/g, ''); +} /** * Copies a regex object while preserving extended data and augmenting with `XRegExp.prototype` * properties. The copy has a fresh `lastIndex` property (set to zero). Allows adding and removing * flags g and y while copying the regex. * - * @private * @param {RegExp} regex Regex to copy. * @param {Object} [options] Options object with optional properties: *
  • `addG` {Boolean} Add flag g while copying the regex. @@ -157,256 +159,243 @@ * skipping some operations like attaching `XRegExp.prototype` properties. * @returns {RegExp} Copy of the provided regex, possibly with modified flags. */ - function copyRegex(regex, options) { - if (!XRegExp.isRegExp(regex)) { - throw new TypeError('Type RegExp expected'); - } +function copyRegex(regex, options) { + if (!XRegExp.isRegExp(regex)) { + throw new TypeError('Type RegExp expected'); + } - var xData = regex[REGEX_DATA] || {}, - flags = getNativeFlags(regex), - flagsToAdd = '', - flagsToRemove = '', - xregexpSource = null, - xregexpFlags = null; + var xData = regex[REGEX_DATA] || {}, + flags = getNativeFlags(regex), + flagsToAdd = '', + flagsToRemove = '', + xregexpSource = null, + xregexpFlags = null; - options = options || {}; + options = options || {}; - if (options.removeG) {flagsToRemove += 'g';} - if (options.removeY) {flagsToRemove += 'y';} - if (flagsToRemove) { - flags = nativ.replace.call(flags, new RegExp('[' + flagsToRemove + ']+', 'g'), ''); - } + if (options.removeG) {flagsToRemove += 'g';} + if (options.removeY) {flagsToRemove += 'y';} + if (flagsToRemove) { + flags = nativ.replace.call(flags, new RegExp('[' + flagsToRemove + ']+', 'g'), ''); + } - if (options.addG) {flagsToAdd += 'g';} - if (options.addY) {flagsToAdd += 'y';} - if (flagsToAdd) { - flags = clipDuplicates(flags + flagsToAdd); - } + if (options.addG) {flagsToAdd += 'g';} + if (options.addY) {flagsToAdd += 'y';} + if (flagsToAdd) { + flags = clipDuplicates(flags + flagsToAdd); + } - if (!options.isInternalOnly) { - if (xData.source !== undefined) { - xregexpSource = xData.source; - } - // null or undefined; don't want to add to `flags` if the previous value was null, since - // that indicates we're not tracking original precompilation flags - if (xData.flags != null) { - // Flags are only added for non-internal regexes by `XRegExp.globalize`. Flags are - // never removed for non-internal regexes, so don't need to handle it - xregexpFlags = flagsToAdd ? clipDuplicates(xData.flags + flagsToAdd) : xData.flags; - } + if (!options.isInternalOnly) { + if (xData.source !== undefined) { + xregexpSource = xData.source; + } + // null or undefined; don't want to add to `flags` if the previous value was null, since + // that indicates we're not tracking original precompilation flags + if (xData.flags != null) { + // Flags are only added for non-internal regexes by `XRegExp.globalize`. Flags are never + // removed for non-internal regexes, so don't need to handle it + xregexpFlags = flagsToAdd ? clipDuplicates(xData.flags + flagsToAdd) : xData.flags; } + } - // Augment with `XRegExp.prototype` properties, but use the native `RegExp` constructor to - // avoid searching for special tokens. That would be wrong for regexes constructed by - // `RegExp`, and unnecessary for regexes constructed by `XRegExp` because the regex has - // already undergone the translation to native regex syntax - regex = augment( - new RegExp(regex.source, flags), - hasNamedCapture(regex) ? xData.captureNames.slice(0) : null, - xregexpSource, - xregexpFlags, - options.isInternalOnly - ); + // Augment with `XRegExp.prototype` properties, but use the native `RegExp` constructor to avoid + // searching for special tokens. That would be wrong for regexes constructed by `RegExp`, and + // unnecessary for regexes constructed by `XRegExp` because the regex has already undergone the + // translation to native regex syntax + regex = augment( + new RegExp(regex.source, flags), + hasNamedCapture(regex) ? xData.captureNames.slice(0) : null, + xregexpSource, + xregexpFlags, + options.isInternalOnly + ); - return regex; - } + return regex; +} /** * Converts hexadecimal to decimal. * - * @private * @param {String} hex * @returns {Number} */ - function dec(hex) { - return parseInt(hex, 16); - } +function dec(hex) { + return parseInt(hex, 16); +} /** * Returns native `RegExp` flags used by a regex object. * - * @private * @param {RegExp} regex Regex to check. * @returns {String} Native flags in use. */ - function getNativeFlags(regex) { - return hasFlagsProp ? - regex.flags : - // Explicitly using `RegExp.prototype.toString` (rather than e.g. `String` or - // concatenation with an empty string) allows this to continue working predictably when - // `XRegExp.proptotype.toString` is overriden - nativ.exec.call(/\/([a-z]*)$/i, RegExp.prototype.toString.call(regex))[1]; - } +function getNativeFlags(regex) { + return hasFlagsProp ? + regex.flags : + // Explicitly using `RegExp.prototype.toString` (rather than e.g. `String` or concatenation + // with an empty string) allows this to continue working predictably when + // `XRegExp.proptotype.toString` is overriden + nativ.exec.call(/\/([a-z]*)$/i, RegExp.prototype.toString.call(regex))[1]; +} /** * Determines whether a regex has extended instance data used to track capture names. * - * @private * @param {RegExp} regex Regex to check. * @returns {Boolean} Whether the regex uses named capture. */ - function hasNamedCapture(regex) { - return !!(regex[REGEX_DATA] && regex[REGEX_DATA].captureNames); - } +function hasNamedCapture(regex) { + return !!(regex[REGEX_DATA] && regex[REGEX_DATA].captureNames); +} /** * Converts decimal to hexadecimal. * - * @private * @param {Number|String} dec * @returns {String} */ - function hex(dec) { - return parseInt(dec, 10).toString(16); - } +function hex(dec) { + return parseInt(dec, 10).toString(16); +} /** * Returns the first index at which a given value can be found in an array. * - * @private * @param {Array} array Array to search. * @param {*} value Value to locate in the array. * @returns {Number} Zero-based index at which the item is found, or -1. */ - function indexOf(array, value) { - var len = array.length, i; +function indexOf(array, value) { + var len = array.length, i; - for (i = 0; i < len; ++i) { - if (array[i] === value) { - return i; - } + for (i = 0; i < len; ++i) { + if (array[i] === value) { + return i; } - - return -1; } + return -1; +} + /** * Determines whether a value is of the specified type, by resolving its internal [[Class]]. * - * @private * @param {*} value Object to check. * @param {String} type Type to check for, in TitleCase. * @returns {Boolean} Whether the object matches the type. */ - function isType(value, type) { - return toString.call(value) === '[object ' + type + ']'; - } +function isType(value, type) { + return toString.call(value) === '[object ' + type + ']'; +} /** * Checks whether the next nonignorable token after the specified position is a quantifier. * - * @private * @param {String} pattern Pattern to search within. * @param {Number} pos Index in `pattern` to search at. * @param {String} flags Flags used by the pattern. * @returns {Boolean} Whether the next token is a quantifier. */ - function isQuantifierNext(pattern, pos, flags) { - return nativ.test.call( - flags.indexOf('x') > -1 ? - // Ignore any leading whitespace, line comments, and inline comments - /^(?:\s+|#.*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/ : - // Ignore any leading inline comments - /^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/, - pattern.slice(pos) - ); - } +function isQuantifierNext(pattern, pos, flags) { + return nativ.test.call( + flags.indexOf('x') > -1 ? + // Ignore any leading whitespace, line comments, and inline comments + /^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/ : + // Ignore any leading inline comments + /^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/, + pattern.slice(pos) + ); +} /** - * Pads the provided string with as many leading zeros as needed to get to length 4. Used to produce - * fixed-length hexadecimal values. + * Adds leading zeros if shorter than four characters. Used for fixed-length hexadecimal values. * - * @private * @param {String} str * @returns {String} */ - function pad4(str) { - while (str.length < 4) { - str = '0' + str; - } - return str; +function pad4(str) { + while (str.length < 4) { + str = '0' + str; } + return str; +} /** * Checks for flag-related errors, and strips/applies flags in a leading mode modifier. Offloads * the flag preparation logic from the `XRegExp` constructor. * - * @private * @param {String} pattern Regex pattern, possibly with a leading mode modifier. * @param {String} flags Any combination of flags. * @returns {Object} Object with properties `pattern` and `flags`. */ - function prepareFlags(pattern, flags) { - var i; - - // Recent browsers throw on duplicate flags, so copy this behavior for nonnative flags - if (clipDuplicates(flags) !== flags) { - throw new SyntaxError('Invalid duplicate regex flag ' + flags); - } +function prepareFlags(pattern, flags) { + var i; - // Strip and apply a leading mode modifier with any combination of flags except g or y - pattern = nativ.replace.call(pattern, /^\(\?([\w$]+)\)/, function($0, $1) { - if (nativ.test.call(/[gy]/, $1)) { - throw new SyntaxError('Cannot use flag g or y in mode modifier ' + $0); - } - // Allow duplicate flags within the mode modifier - flags = clipDuplicates(flags + $1); - return ''; - }); + // Recent browsers throw on duplicate flags, so copy this behavior for nonnative flags + if (clipDuplicates(flags) !== flags) { + throw new SyntaxError('Invalid duplicate regex flag ' + flags); + } - // Throw on unknown native or nonnative flags - for (i = 0; i < flags.length; ++i) { - if (!registeredFlags[flags.charAt(i)]) { - throw new SyntaxError('Unknown regex flag ' + flags.charAt(i)); - } + // Strip and apply a leading mode modifier with any combination of flags except g or y + pattern = nativ.replace.call(pattern, /^\(\?([\w$]+)\)/, function($0, $1) { + if (nativ.test.call(/[gy]/, $1)) { + throw new SyntaxError('Cannot use flag g or y in mode modifier ' + $0); + } + // Allow duplicate flags within the mode modifier + flags = clipDuplicates(flags + $1); + return ''; + }); + + // Throw on unknown native or nonnative flags + for (i = 0; i < flags.length; ++i) { + if (!registeredFlags[flags.charAt(i)]) { + throw new SyntaxError('Unknown regex flag ' + flags.charAt(i)); } - - return { - pattern: pattern, - flags: flags - }; } + return { + pattern: pattern, + flags: flags + }; +} + /** * Prepares an options object from the given value. * - * @private * @param {String|Object} value Value to convert to an options object. * @returns {Object} Options object. */ - function prepareOptions(value) { - var options = {}; +function prepareOptions(value) { + var options = {}; - if (isType(value, 'String')) { - XRegExp.forEach(value, /[^\s,]+/, function(match) { - options[match] = true; - }); - - return options; - } + if (isType(value, 'String')) { + XRegExp.forEach(value, /[^\s,]+/, function(match) { + options[match] = true; + }); - return value; + return options; } + return value; +} + /** * Registers a flag so it doesn't throw an 'unknown flag' error. * - * @private * @param {String} flag Single-character flag to register. */ - function registerFlag(flag) { - if (!/^[\w$]$/.test(flag)) { - throw new Error('Flag must be a single character A-Za-z0-9_$'); - } - - registeredFlags[flag] = true; +function registerFlag(flag) { + if (!/^[\w$]$/.test(flag)) { + throw new Error('Flag must be a single character A-Za-z0-9_$'); } + registeredFlags[flag] = true; +} + /** * Runs built-in and custom regex syntax tokens in reverse insertion order at the specified * position, until a match is found. * - * @private * @param {String} pattern Original pattern from which an XRegExp object is being built. * @param {String} flags Flags being used to construct the regex. * @param {Number} pos Position to search for tokens within `pattern`. @@ -414,87 +403,84 @@ * @param {Object} context Context object to use for token handler functions. * @returns {Object} Object with properties `matchLength`, `output`, and `reparse`; or `null`. */ - function runTokens(pattern, flags, pos, scope, context) { - var i = tokens.length, - leadChar = pattern.charAt(pos), - result = null, - match, - t; - - // Run in reverse insertion order - while (i--) { - t = tokens[i]; - if ( - (t.leadChar && t.leadChar !== leadChar) || - (t.scope !== scope && t.scope !== 'all') || - (t.flag && flags.indexOf(t.flag) === -1) - ) { - continue; - } - - match = XRegExp.exec(pattern, t.regex, pos, 'sticky'); - if (match) { - result = { - matchLength: match[0].length, - output: t.handler.call(context, match, scope, flags), - reparse: t.reparse - }; - // Finished with token tests - break; - } +function runTokens(pattern, flags, pos, scope, context) { + var i = tokens.length, + leadChar = pattern.charAt(pos), + result = null, + match, + t; + + // Run in reverse insertion order + while (i--) { + t = tokens[i]; + if ( + (t.leadChar && t.leadChar !== leadChar) || + (t.scope !== scope && t.scope !== 'all') || + (t.flag && flags.indexOf(t.flag) === -1) + ) { + continue; } - return result; + match = XRegExp.exec(pattern, t.regex, pos, 'sticky'); + if (match) { + result = { + matchLength: match[0].length, + output: t.handler.call(context, match, scope, flags), + reparse: t.reparse + }; + // Finished with token tests + break; + } } + return result; +} + /** * Enables or disables implicit astral mode opt-in. When enabled, flag A is automatically added to * all new regexes created by XRegExp. This causes an error to be thrown when creating regexes if * the Unicode Base addon is not available, since flag A is registered by that addon. * - * @private * @param {Boolean} on `true` to enable; `false` to disable. */ - function setAstral(on) { - features.astral = on; - } +function setAstral(on) { + features.astral = on; +} /** * Enables or disables native method overrides. * - * @private * @param {Boolean} on `true` to enable; `false` to disable. */ - function setNatives(on) { - RegExp.prototype.exec = (on ? fixed : nativ).exec; - RegExp.prototype.test = (on ? fixed : nativ).test; - String.prototype.match = (on ? fixed : nativ).match; - String.prototype.replace = (on ? fixed : nativ).replace; - String.prototype.split = (on ? fixed : nativ).split; - - features.natives = on; - } +function setNatives(on) { + RegExp.prototype.exec = (on ? fixed : nativ).exec; + RegExp.prototype.test = (on ? fixed : nativ).test; + String.prototype.match = (on ? fixed : nativ).match; + String.prototype.replace = (on ? fixed : nativ).replace; + String.prototype.split = (on ? fixed : nativ).split; + + features.natives = on; +} /** * Returns the object, or throws an error if it is `null` or `undefined`. This is used to follow * the ES5 abstract operation `ToObject`. * - * @private * @param {*} value Object to check and return. * @returns {*} The provided object. */ - function toObject(value) { - // null or undefined - if (value == null) { - throw new TypeError('Cannot convert null or undefined to object'); - } - - return value; +function toObject(value) { + // null or undefined + if (value == null) { + throw new TypeError('Cannot convert null or undefined to object'); } -/* ============================== - * Constructor - * ============================== */ + return value; +} + +// ==--------------------------== +// Constructor +// ==--------------------------== /** * Creates an extended regular expression object for matching text with a pattern. Differs from a @@ -530,124 +516,124 @@ * // have fresh `lastIndex` properties (set to zero). * XRegExp(/regex/); */ - function XRegExp(pattern, flags) { - var context = { - hasNamedCapture: false, - captureNames: [] - }, - scope = defaultScope, - output = '', - pos = 0, - result, - token, - generated, - appliedPattern, - appliedFlags; - - if (XRegExp.isRegExp(pattern)) { - if (flags !== undefined) { - throw new TypeError('Cannot supply flags when copying a RegExp'); - } - return copyRegex(pattern); +function XRegExp(pattern, flags) { + if (XRegExp.isRegExp(pattern)) { + if (flags !== undefined) { + throw new TypeError('Cannot supply flags when copying a RegExp'); } + return copyRegex(pattern); + } - // Copy the argument behavior of `RegExp` - pattern = pattern === undefined ? '' : String(pattern); - flags = flags === undefined ? '' : String(flags); + // Copy the argument behavior of `RegExp` + pattern = pattern === undefined ? '' : String(pattern); + flags = flags === undefined ? '' : String(flags); - if (XRegExp.isInstalled('astral') && flags.indexOf('A') === -1) { - // This causes an error to be thrown if the Unicode Base addon is not available - flags += 'A'; - } + if (XRegExp.isInstalled('astral') && flags.indexOf('A') === -1) { + // This causes an error to be thrown if the Unicode Base addon is not available + flags += 'A'; + } - if (!patternCache[pattern]) { - patternCache[pattern] = {}; - } + if (!patternCache[pattern]) { + patternCache[pattern] = {}; + } - if (!patternCache[pattern][flags]) { - // Check for flag-related errors, and strip/apply flags in a leading mode modifier - result = prepareFlags(pattern, flags); - appliedPattern = result.pattern; - appliedFlags = result.flags; - - // Use XRegExp's tokens to translate the pattern to a native regex pattern. - // `appliedPattern.length` may change on each iteration if tokens use `reparse` - while (pos < appliedPattern.length) { - do { - // Check for custom tokens at the current position - result = runTokens(appliedPattern, appliedFlags, pos, scope, context); - // If the matched token used the `reparse` option, splice its output into the - // pattern before running tokens again at the same position - if (result && result.reparse) { - appliedPattern = appliedPattern.slice(0, pos) + - result.output + - appliedPattern.slice(pos + result.matchLength); - } - } while (result && result.reparse); - - if (result) { - output += result.output; - pos += (result.matchLength || 1); - } else { - // Get the native token at the current position - token = XRegExp.exec(appliedPattern, nativeTokens[scope], pos, 'sticky')[0]; - output += token; - pos += token.length; - if (token === '[' && scope === defaultScope) { - scope = classScope; - } else if (token === ']' && scope === classScope) { - scope = defaultScope; - } + if (!patternCache[pattern][flags]) { + var context = { + hasNamedCapture: false, + captureNames: [] + }; + var scope = defaultScope; + var output = ''; + var pos = 0; + var result; + + // Check for flag-related errors, and strip/apply flags in a leading mode modifier + var applied = prepareFlags(pattern, flags); + var appliedPattern = applied.pattern; + var appliedFlags = applied.flags; + + // Use XRegExp's tokens to translate the pattern to a native regex pattern. + // `appliedPattern.length` may change on each iteration if tokens use `reparse` + while (pos < appliedPattern.length) { + do { + // Check for custom tokens at the current position + result = runTokens(appliedPattern, appliedFlags, pos, scope, context); + // If the matched token used the `reparse` option, splice its output into the + // pattern before running tokens again at the same position + if (result && result.reparse) { + appliedPattern = appliedPattern.slice(0, pos) + + result.output + + appliedPattern.slice(pos + result.matchLength); } - } + } while (result && result.reparse); - patternCache[pattern][flags] = { - pattern: output, - // Strip all but native flags - flags: nativ.replace.call(appliedFlags, /[^gimuy]+/g, ''), - // `context.captureNames` has an item for each capturing group, even if unnamed - captures: context.hasNamedCapture ? context.captureNames : null - }; + if (result) { + output += result.output; + pos += (result.matchLength || 1); + } else { + // Get the native token at the current position + var token = XRegExp.exec(appliedPattern, nativeTokens[scope], pos, 'sticky')[0]; + output += token; + pos += token.length; + if (token === '[' && scope === defaultScope) { + scope = classScope; + } else if (token === ']' && scope === classScope) { + scope = defaultScope; + } + } } - generated = patternCache[pattern][flags]; - return augment( - new RegExp(generated.pattern, generated.flags), - generated.captures, - pattern, - flags - ); - }; + patternCache[pattern][flags] = { + // Use basic cleanup to collapse repeated empty groups like `(?:)(?:)` to `(?:)`. Empty + // groups are sometimes inserted during regex transpilation in order to keep tokens + // separated. However, more than one empty group in a row is never needed. + pattern: nativ.replace.call(output, /(?:\(\?:\))+/g, '(?:)'), + // Strip all but native flags + flags: nativ.replace.call(appliedFlags, /[^gimuy]+/g, ''), + // `context.captureNames` has an item for each capturing group, even if unnamed + captures: context.hasNamedCapture ? context.captureNames : null + }; + } + + var generated = patternCache[pattern][flags]; + return augment( + new RegExp(generated.pattern, generated.flags), + generated.captures, + pattern, + flags + ); +} // Add `RegExp.prototype` to the prototype chain - XRegExp.prototype = new RegExp(); +XRegExp.prototype = new RegExp(); -/* ============================== - * Public properties - * ============================== */ +// ==--------------------------== +// Public properties +// ==--------------------------== /** * The XRegExp version number as a string containing three dot-separated parts. For example, * '2.0.0-beta-3'. * * @static - * @memberOf XRegExp * @type String */ - XRegExp.version = '3.1.0'; +XRegExp.version = '3.1.1'; -/* ============================== - * Public methods - * ============================== */ +// ==--------------------------== +// Public methods +// ==--------------------------== -// Intentionally undocumented - XRegExp._hasNativeFlag = hasNativeFlag; +// Intentionally undocumented; used in tests and addons +XRegExp._hasNativeFlag = hasNativeFlag; +XRegExp._dec = dec; +XRegExp._hex = hex; +XRegExp._pad4 = pad4; /** * Extends XRegExp syntax and allows custom flags. This is used internally and can be used to * create XRegExp addons. If more than one token can match the same string, the last added wins. * - * @memberOf XRegExp * @param {RegExp} regex Regex object that matches the new token. * @param {Function} handler Function that returns a new pattern string (using native regex syntax) * to replace the matched token within all future XRegExp regexes. Has access to persistent @@ -692,45 +678,44 @@ * XRegExp('a+', 'U').exec('aaa')[0]; // -> 'a' * XRegExp('a+?', 'U').exec('aaa')[0]; // -> 'aaa' */ - XRegExp.addToken = function(regex, handler, options) { - options = options || {}; - var optionalFlags = options.optionalFlags, i; +XRegExp.addToken = function(regex, handler, options) { + options = options || {}; + var optionalFlags = options.optionalFlags, i; - if (options.flag) { - registerFlag(options.flag); - } + if (options.flag) { + registerFlag(options.flag); + } - if (optionalFlags) { - optionalFlags = nativ.split.call(optionalFlags, ''); - for (i = 0; i < optionalFlags.length; ++i) { - registerFlag(optionalFlags[i]); - } + if (optionalFlags) { + optionalFlags = nativ.split.call(optionalFlags, ''); + for (i = 0; i < optionalFlags.length; ++i) { + registerFlag(optionalFlags[i]); } + } - // Add to the private list of syntax tokens - tokens.push({ - regex: copyRegex(regex, { - addG: true, - addY: hasNativeY, - isInternalOnly: true - }), - handler: handler, - scope: options.scope || defaultScope, - flag: options.flag, - reparse: options.reparse, - leadChar: options.leadChar - }); - - // Reset the pattern cache used by the `XRegExp` constructor, since the same pattern and - // flags might now produce different results - XRegExp.cache.flush('patterns'); - }; + // Add to the private list of syntax tokens + tokens.push({ + regex: copyRegex(regex, { + addG: true, + addY: hasNativeY, + isInternalOnly: true + }), + handler: handler, + scope: options.scope || defaultScope, + flag: options.flag, + reparse: options.reparse, + leadChar: options.leadChar + }); + + // Reset the pattern cache used by the `XRegExp` constructor, since the same pattern and flags + // might now produce different results + XRegExp.cache.flush('patterns'); +}; /** * Caches and returns the result of calling `XRegExp(pattern, flags)`. On any subsequent call with * the same pattern and flag combination, the cached copy of the regex is returned. * - * @memberOf XRegExp * @param {String} pattern Regex pattern string. * @param {String} [flags] Any combination of XRegExp flags. * @returns {RegExp} Cached XRegExp object. @@ -740,31 +725,30 @@ * // The regex is compiled once only * } */ - XRegExp.cache = function(pattern, flags) { - if (!regexCache[pattern]) { - regexCache[pattern] = {}; - } - return regexCache[pattern][flags] || ( - regexCache[pattern][flags] = XRegExp(pattern, flags) - ); - }; - -// Intentionally undocumented - XRegExp.cache.flush = function(cacheName) { - if (cacheName === 'patterns') { - // Flush the pattern cache used by the `XRegExp` constructor - patternCache = {}; - } else { - // Flush the regex cache populated by `XRegExp.cache` - regexCache = {}; - } - }; +XRegExp.cache = function(pattern, flags) { + if (!regexCache[pattern]) { + regexCache[pattern] = {}; + } + return regexCache[pattern][flags] || ( + regexCache[pattern][flags] = XRegExp(pattern, flags) + ); +}; + +// Intentionally undocumented; used in tests +XRegExp.cache.flush = function(cacheName) { + if (cacheName === 'patterns') { + // Flush the pattern cache used by the `XRegExp` constructor + patternCache = {}; + } else { + // Flush the regex cache populated by `XRegExp.cache` + regexCache = {}; + } +}; /** * Escapes any regular expression metacharacters, for use when matching literal strings. The result * can safely be used at any point within a regex that uses any flags. * - * @memberOf XRegExp * @param {String} str String to escape. * @returns {String} String with regex metacharacters escaped. * @example @@ -772,9 +756,9 @@ * XRegExp.escape('Escaped? <.>'); * // -> 'Escaped\?\ <\.>' */ - XRegExp.escape = function(str) { - return nativ.replace.call(toObject(str), /[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); - }; +XRegExp.escape = function(str) { + return nativ.replace.call(toObject(str), /[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +}; /** * Executes a regex search in a specified string. Returns a match array or `null`. If the provided @@ -784,7 +768,6 @@ * used, but is updated for compatibility. Also fixes browser bugs compared to the native * `RegExp.prototype.exec` and can be used reliably cross-browser. * - * @memberOf XRegExp * @param {String} str String to search. * @param {RegExp} regex Regex to search with. * @param {Number} [pos=0] Zero-based index at which to start the search. @@ -805,51 +788,50 @@ * } * // result -> ['2', '3', '4'] */ - XRegExp.exec = function(str, regex, pos, sticky) { - var cacheKey = 'g', - addY = false, - match, - r2; - - addY = hasNativeY && !!(sticky || (regex.sticky && sticky !== false)); - if (addY) { - cacheKey += 'y'; - } +XRegExp.exec = function(str, regex, pos, sticky) { + var cacheKey = 'g', + addY = false, + match, + r2; + + addY = hasNativeY && !!(sticky || (regex.sticky && sticky !== false)); + if (addY) { + cacheKey += 'y'; + } - regex[REGEX_DATA] = regex[REGEX_DATA] || {}; + regex[REGEX_DATA] = regex[REGEX_DATA] || {}; - // Shares cached copies with `XRegExp.match`/`replace` - r2 = regex[REGEX_DATA][cacheKey] || ( - regex[REGEX_DATA][cacheKey] = copyRegex(regex, { - addG: true, - addY: addY, - removeY: sticky === false, - isInternalOnly: true - }) - ); + // Shares cached copies with `XRegExp.match`/`replace` + r2 = regex[REGEX_DATA][cacheKey] || ( + regex[REGEX_DATA][cacheKey] = copyRegex(regex, { + addG: true, + addY: addY, + removeY: sticky === false, + isInternalOnly: true + }) + ); - r2.lastIndex = pos = pos || 0; + r2.lastIndex = pos = pos || 0; - // Fixed `exec` required for `lastIndex` fix, named backreferences, etc. - match = fixed.exec.call(r2, str); + // Fixed `exec` required for `lastIndex` fix, named backreferences, etc. + match = fixed.exec.call(r2, str); - if (sticky && match && match.index !== pos) { - match = null; - } + if (sticky && match && match.index !== pos) { + match = null; + } - if (regex.global) { - regex.lastIndex = match ? r2.lastIndex : 0; - } + if (regex.global) { + regex.lastIndex = match ? r2.lastIndex : 0; + } - return match; - }; + return match; +}; /** * Executes a provided function once per regex match. Searches always start at the beginning of the * string and continue until the end, regardless of the state of the regex's `global` property and * initial `lastIndex`. * - * @memberOf XRegExp * @param {String} str String to search. * @param {RegExp} regex Regex to search with. * @param {Function} callback Function to execute for each match. Invoked with four arguments: @@ -866,30 +848,29 @@ * }); * // evens -> [2, 4] */ - XRegExp.forEach = function(str, regex, callback) { - var pos = 0, - i = -1, - match; - - while ((match = XRegExp.exec(str, regex, pos))) { - // Because `regex` is provided to `callback`, the function could use the deprecated/ - // nonstandard `RegExp.prototype.compile` to mutate the regex. However, since - // `XRegExp.exec` doesn't use `lastIndex` to set the search position, this can't lead - // to an infinite loop, at least. Actually, because of the way `XRegExp.exec` caches - // globalized versions of regexes, mutating the regex will not have any effect on the - // iteration or matched strings, which is a nice side effect that brings extra safety - callback(match, ++i, str, regex); - - pos = match.index + (match[0].length || 1); - } - }; +XRegExp.forEach = function(str, regex, callback) { + var pos = 0, + i = -1, + match; + + while ((match = XRegExp.exec(str, regex, pos))) { + // Because `regex` is provided to `callback`, the function could use the deprecated/ + // nonstandard `RegExp.prototype.compile` to mutate the regex. However, since `XRegExp.exec` + // doesn't use `lastIndex` to set the search position, this can't lead to an infinite loop, + // at least. Actually, because of the way `XRegExp.exec` caches globalized versions of + // regexes, mutating the regex will not have any effect on the iteration or matched strings, + // which is a nice side effect that brings extra safety. + callback(match, ++i, str, regex); + + pos = match.index + (match[0].length || 1); + } +}; /** * Copies a regex object and adds flag `g`. The copy maintains extended data, is augmented with * `XRegExp.prototype` properties, and has a fresh `lastIndex` property (set to zero). Native * regexes are not recompiled using XRegExp syntax. * - * @memberOf XRegExp * @param {RegExp} regex Regex to globalize. * @returns {RegExp} Copy of the provided regex with flag `g` added. * @example @@ -897,15 +878,14 @@ * var globalCopy = XRegExp.globalize(/regex/); * globalCopy.global; // -> true */ - XRegExp.globalize = function(regex) { - return copyRegex(regex, {addG: true}); - }; +XRegExp.globalize = function(regex) { + return copyRegex(regex, {addG: true}); +}; /** * Installs optional features according to the specified options. Can be undone using * `XRegExp.uninstall`. * - * @memberOf XRegExp * @param {Object|String} options Options object or string. * @example * @@ -921,22 +901,21 @@ * // With an options string * XRegExp.install('astral natives'); */ - XRegExp.install = function(options) { - options = prepareOptions(options); +XRegExp.install = function(options) { + options = prepareOptions(options); - if (!features.astral && options.astral) { - setAstral(true); - } + if (!features.astral && options.astral) { + setAstral(true); + } - if (!features.natives && options.natives) { - setNatives(true); - } - }; + if (!features.natives && options.natives) { + setNatives(true); + } +}; /** * Checks whether an individual optional feature is installed. * - * @memberOf XRegExp * @param {String} feature Name of the feature to check. One of: *
  • `astral` *
  • `natives` @@ -945,15 +924,14 @@ * * XRegExp.isInstalled('astral'); */ - XRegExp.isInstalled = function(feature) { - return !!(features[feature]); - }; +XRegExp.isInstalled = function(feature) { + return !!(features[feature]); +}; /** * Returns `true` if an object is a regex; `false` if it isn't. This works correctly for regexes * created in another frame, when `instanceof` and `constructor` checks would fail. * - * @memberOf XRegExp * @param {*} value Object to check. * @returns {Boolean} Whether the object is a `RegExp` object. * @example @@ -963,10 +941,10 @@ * XRegExp.isRegExp(RegExp('^', 'm')); // -> true * XRegExp.isRegExp(XRegExp('(?s).')); // -> true */ - XRegExp.isRegExp = function(value) { - return toString.call(value) === '[object RegExp]'; - //return isType(value, 'RegExp'); - }; +XRegExp.isRegExp = function(value) { + return toString.call(value) === '[object RegExp]'; + //return isType(value, 'RegExp'); +}; /** * Returns the first matched string, or in global mode, an array containing all matched strings. @@ -975,7 +953,6 @@ * and an empty array instead of `null` when no matches are found in match-all mode). It also lets * you override flag g and ignore `lastIndex`, and fixes browser bugs. * - * @memberOf XRegExp * @param {String} str String to search. * @param {RegExp} regex Regex to search with. * @param {String} [scope='one'] Use 'one' to return the first match as a string. Use 'all' to @@ -995,35 +972,35 @@ * XRegExp.match('abc', /\w/, 'all'); // -> ['a', 'b', 'c'] * XRegExp.match('abc', /x/, 'all'); // -> [] */ - XRegExp.match = function(str, regex, scope) { - var global = (regex.global && scope !== 'one') || scope === 'all', - cacheKey = ((global ? 'g' : '') + (regex.sticky ? 'y' : '')) || 'noGY', - result, - r2; +XRegExp.match = function(str, regex, scope) { + var global = (regex.global && scope !== 'one') || scope === 'all', + cacheKey = ((global ? 'g' : '') + (regex.sticky ? 'y' : '')) || 'noGY', + result, + r2; + + regex[REGEX_DATA] = regex[REGEX_DATA] || {}; + + // Shares cached copies with `XRegExp.exec`/`replace` + r2 = regex[REGEX_DATA][cacheKey] || ( + regex[REGEX_DATA][cacheKey] = copyRegex(regex, { + addG: !!global, + removeG: scope === 'one', + isInternalOnly: true + }) + ); - regex[REGEX_DATA] = regex[REGEX_DATA] || {}; + result = nativ.match.call(toObject(str), r2); - // Shares cached copies with `XRegExp.exec`/`replace` - r2 = regex[REGEX_DATA][cacheKey] || ( - regex[REGEX_DATA][cacheKey] = copyRegex(regex, { - addG: !!global, - removeG: scope === 'one', - isInternalOnly: true - }) + if (regex.global) { + regex.lastIndex = ( + (scope === 'one' && result) ? + // Can't use `r2.lastIndex` since `r2` is nonglobal in this case + (result.index + result[0].length) : 0 ); + } - result = nativ.match.call(toObject(str), r2); - - if (regex.global) { - regex.lastIndex = ( - (scope === 'one' && result) ? - // Can't use `r2.lastIndex` since `r2` is nonglobal in this case - (result.index + result[0].length) : 0 - ); - } - - return global ? (result || []) : (result && result[0]); - }; + return global ? (result || []) : (result && result[0]); +}; /** * Retrieves the matches from searching a string using a chain of regexes that successively search @@ -1031,7 +1008,6 @@ * `regex` and `backref` properties. When a backreference is specified, the named or numbered * backreference is passed forward to the next regex or returned. * - * @memberOf XRegExp * @param {String} str String to search. * @param {Array} chain Regexes that each search for matches within preceding results. * @returns {Array} Matches by the last regex in the chain, or an empty array. @@ -1053,38 +1029,37 @@ * ]); * // -> ['xregexp.com', 'www.google.com'] */ - XRegExp.matchChain = function(str, chain) { - return (function recurseChain(values, level) { - var item = chain[level].regex ? chain[level] : {regex: chain[level]}, - matches = [], - addMatch = function(match) { - if (item.backref) { - /* Safari 4.0.5 (but not 5.0.5+) inappropriately uses sparse arrays to hold - * the `undefined`s for backreferences to nonparticipating capturing - * groups. In such cases, a `hasOwnProperty` or `in` check on its own would - * inappropriately throw the exception, so also check if the backreference - * is a number that is within the bounds of the array. - */ - if (!(match.hasOwnProperty(item.backref) || +item.backref < match.length)) { - throw new ReferenceError('Backreference to undefined group: ' + item.backref); - } - - matches.push(match[item.backref] || ''); - } else { - matches.push(match[0]); - } - }, - i; +XRegExp.matchChain = function(str, chain) { + return (function recurseChain(values, level) { + var item = chain[level].regex ? chain[level] : {regex: chain[level]}; + var matches = []; + + function addMatch(match) { + if (item.backref) { + // Safari 4.0.5 (but not 5.0.5+) inappropriately uses sparse arrays to hold the + // `undefined`s for backreferences to nonparticipating capturing groups. In such + // cases, a `hasOwnProperty` or `in` check on its own would inappropriately throw + // the exception, so also check if the backreference is a number that is within the + // bounds of the array. + if (!(match.hasOwnProperty(item.backref) || +item.backref < match.length)) { + throw new ReferenceError('Backreference to undefined group: ' + item.backref); + } - for (i = 0; i < values.length; ++i) { - XRegExp.forEach(values[i], item.regex, addMatch); + matches.push(match[item.backref] || ''); + } else { + matches.push(match[0]); } + } - return ((level === chain.length - 1) || !matches.length) ? - matches : - recurseChain(matches, level + 1); - }([str], 0)); - }; + for (var i = 0; i < values.length; ++i) { + XRegExp.forEach(values[i], item.regex, addMatch); + } + + return ((level === chain.length - 1) || !matches.length) ? + matches : + recurseChain(matches, level + 1); + }([str], 0)); +}; /** * Returns a new string with one or all matches of a pattern replaced. The pattern can be a string @@ -1094,7 +1069,6 @@ * functions can use named backreferences via `arguments[0].name`. Also fixes browser bugs compared * to the native `String.prototype.replace` and can be used reliably cross-browser. * - * @memberOf XRegExp * @param {String} str String to search. * @param {RegExp|String} search Search pattern to be replaced. * @param {String|Function} replacement Replacement string or a function invoked to create it. @@ -1133,39 +1107,39 @@ * XRegExp.replace('RegExp builds RegExps', 'RegExp', 'XRegExp', 'all'); * // -> 'XRegExp builds XRegExps' */ - XRegExp.replace = function(str, search, replacement, scope) { - var isRegex = XRegExp.isRegExp(search), - global = (search.global && scope !== 'one') || scope === 'all', - cacheKey = ((global ? 'g' : '') + (search.sticky ? 'y' : '')) || 'noGY', - s2 = search, - result; - - if (isRegex) { - search[REGEX_DATA] = search[REGEX_DATA] || {}; - - // Shares cached copies with `XRegExp.exec`/`match`. Since a copy is used, `search`'s - // `lastIndex` isn't updated *during* replacement iterations - s2 = search[REGEX_DATA][cacheKey] || ( - search[REGEX_DATA][cacheKey] = copyRegex(search, { - addG: !!global, - removeG: scope === 'one', - isInternalOnly: true - }) - ); - } else if (global) { - s2 = new RegExp(XRegExp.escape(String(search)), 'g'); - } +XRegExp.replace = function(str, search, replacement, scope) { + var isRegex = XRegExp.isRegExp(search), + global = (search.global && scope !== 'one') || scope === 'all', + cacheKey = ((global ? 'g' : '') + (search.sticky ? 'y' : '')) || 'noGY', + s2 = search, + result; + + if (isRegex) { + search[REGEX_DATA] = search[REGEX_DATA] || {}; + + // Shares cached copies with `XRegExp.exec`/`match`. Since a copy is used, `search`'s + // `lastIndex` isn't updated *during* replacement iterations + s2 = search[REGEX_DATA][cacheKey] || ( + search[REGEX_DATA][cacheKey] = copyRegex(search, { + addG: !!global, + removeG: scope === 'one', + isInternalOnly: true + }) + ); + } else if (global) { + s2 = new RegExp(XRegExp.escape(String(search)), 'g'); + } - // Fixed `replace` required for named backreferences, etc. - result = fixed.replace.call(toObject(str), s2, replacement); + // Fixed `replace` required for named backreferences, etc. + result = fixed.replace.call(toObject(str), s2, replacement); - if (isRegex && search.global) { - // Fixes IE, Safari bug (last tested IE 9, Safari 5.1) - search.lastIndex = 0; - } + if (isRegex && search.global) { + // Fixes IE, Safari bug (last tested IE 9, Safari 5.1) + search.lastIndex = 0; + } - return result; - }; + return result; +}; /** * Performs batch processing of string replacements. Used like `XRegExp.replace`, but accepts an @@ -1174,7 +1148,6 @@ * replacement string or function, and an optional scope of 'one' or 'all'. Uses the XRegExp * replacement text syntax, which supports named backreference properties via `${name}`. * - * @memberOf XRegExp * @param {String} str String to search. * @param {Array} replacements Array of replacement detail arrays. * @returns {String} New string with all replacements. @@ -1191,16 +1164,16 @@ * }] * ]); */ - XRegExp.replaceEach = function(str, replacements) { - var i, r; +XRegExp.replaceEach = function(str, replacements) { + var i, r; - for (i = 0; i < replacements.length; ++i) { - r = replacements[i]; - str = XRegExp.replace(str, r[0], r[1], r[2]); - } + for (i = 0; i < replacements.length; ++i) { + r = replacements[i]; + str = XRegExp.replace(str, r[0], r[1], r[2]); + } - return str; - }; + return str; +}; /** * Splits a string into an array of strings using a regex or string separator. Matches of the @@ -1209,7 +1182,6 @@ * Fixes browser bugs compared to the native `String.prototype.split` and can be used reliably * cross-browser. * - * @memberOf XRegExp * @param {String} str String to split. * @param {RegExp|String} separator Regex or string to use for separating the string. * @param {Number} [limit] Maximum number of items to include in the result array. @@ -1228,9 +1200,9 @@ * XRegExp.split('..word1..', /([a-z]+)(\d+)/i); * // -> ['..', 'word', '1', '..'] */ - XRegExp.split = function(str, separator, limit) { - return fixed.split.call(toObject(str), separator, limit); - }; +XRegExp.split = function(str, separator, limit) { + return fixed.split.call(toObject(str), separator, limit); +}; /** * Executes a regex search in a specified string. Returns `true` or `false`. Optional `pos` and @@ -1239,7 +1211,6 @@ * updated for compatibility. Also fixes browser bugs compared to the native * `RegExp.prototype.test` and can be used reliably cross-browser. * - * @memberOf XRegExp * @param {String} str String to search. * @param {RegExp} regex Regex to search with. * @param {Number} [pos=0] Zero-based index at which to start the search. @@ -1255,16 +1226,15 @@ * XRegExp.test('abc', /c/, 0, 'sticky'); // -> false * XRegExp.test('abc', /c/, 2, 'sticky'); // -> true */ - XRegExp.test = function(str, regex, pos, sticky) { - // Do this the easy way :-) - return !!XRegExp.exec(str, regex, pos, sticky); - }; +XRegExp.test = function(str, regex, pos, sticky) { + // Do this the easy way :-) + return !!XRegExp.exec(str, regex, pos, sticky); +}; /** * Uninstalls optional features according to the specified options. All optional features start out * uninstalled, so this is used to undo the actions of `XRegExp.install`. * - * @memberOf XRegExp * @param {Object|String} options Options object or string. * @example * @@ -1280,17 +1250,17 @@ * // With an options string * XRegExp.uninstall('astral natives'); */ - XRegExp.uninstall = function(options) { - options = prepareOptions(options); +XRegExp.uninstall = function(options) { + options = prepareOptions(options); - if (features.astral && options.astral) { - setAstral(false); - } + if (features.astral && options.astral) { + setAstral(false); + } - if (features.natives && options.natives) { - setNatives(false); - } - }; + if (features.natives && options.natives) { + setNatives(false); + } +}; /** * Returns an XRegExp object that is the union of the given patterns. Patterns can be provided as @@ -1299,7 +1269,6 @@ * the larger combined pattern. Native flags used by provided regexes are ignored in favor of the * `flags` argument. * - * @memberOf XRegExp * @param {Array} patterns Regexes and strings to combine. * @param {String} [flags] Any combination of XRegExp flags. * @returns {RegExp} Union of the provided regexes and strings. @@ -1308,161 +1277,158 @@ * XRegExp.union(['a+b*c', /(dogs)\1/, /(cats)\1/], 'i'); * // -> /a\+b\*c|(dogs)\1|(cats)\2/i */ - XRegExp.union = function(patterns, flags) { - var parts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g, - output = [], - numCaptures = 0, - numPriorCaptures, - captureNames, - pattern, - rewrite = function(match, paren, backref) { - var name = captureNames[numCaptures - numPriorCaptures]; - - // Capturing group - if (paren) { - ++numCaptures; - // If the current capture has a name, preserve the name - if (name) { - return '(?<' + name + '>'; - } - // Backreference - } else if (backref) { - // Rewrite the backreference - return '\\' + (+backref + numPriorCaptures); - } +XRegExp.union = function(patterns, flags) { + var numCaptures = 0; + var numPriorCaptures; + var captureNames; + + function rewrite(match, paren, backref) { + var name = captureNames[numCaptures - numPriorCaptures]; + + // Capturing group + if (paren) { + ++numCaptures; + // If the current capture has a name, preserve the name + if (name) { + return '(?<' + name + '>'; + } + // Backreference + } else if (backref) { + // Rewrite the backreference + return '\\' + (+backref + numPriorCaptures); + } - return match; - }, - i; + return match; + } - if (!(isType(patterns, 'Array') && patterns.length)) { - throw new TypeError('Must provide a nonempty array of patterns to merge'); - } + if (!(isType(patterns, 'Array') && patterns.length)) { + throw new TypeError('Must provide a nonempty array of patterns to merge'); + } - for (i = 0; i < patterns.length; ++i) { - pattern = patterns[i]; + var parts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g; + var output = []; + var pattern; + for (var i = 0; i < patterns.length; ++i) { + pattern = patterns[i]; - if (XRegExp.isRegExp(pattern)) { - numPriorCaptures = numCaptures; - captureNames = (pattern[REGEX_DATA] && pattern[REGEX_DATA].captureNames) || []; + if (XRegExp.isRegExp(pattern)) { + numPriorCaptures = numCaptures; + captureNames = (pattern[REGEX_DATA] && pattern[REGEX_DATA].captureNames) || []; - // Rewrite backreferences. Passing to XRegExp dies on octals and ensures patterns - // are independently valid; helps keep this simple. Named captures are put back - output.push(nativ.replace.call(XRegExp(pattern.source).source, parts, rewrite)); - } else { - output.push(XRegExp.escape(pattern)); - } + // Rewrite backreferences. Passing to XRegExp dies on octals and ensures patterns are + // independently valid; helps keep this simple. Named captures are put back + output.push(nativ.replace.call(XRegExp(pattern.source).source, parts, rewrite)); + } else { + output.push(XRegExp.escape(pattern)); } + } - return XRegExp(output.join('|'), flags); - }; + return XRegExp(output.join('|'), flags); +}; -/* ============================== - * Fixed/extended native methods - * ============================== */ +// ==--------------------------== +// Fixed/extended native methods +// ==--------------------------== /** * Adds named capture support (with backreferences returned as `result.name`), and fixes browser * bugs in the native `RegExp.prototype.exec`. Calling `XRegExp.install('natives')` uses this to * override the native method. Use via `XRegExp.exec` without overriding natives. * - * @private * @param {String} str String to search. * @returns {Array} Match array with named backreference properties, or `null`. */ - fixed.exec = function(str) { - var origLastIndex = this.lastIndex, - match = nativ.exec.apply(this, arguments), - name, - r2, - i; - - if (match) { - // Fix browsers whose `exec` methods don't return `undefined` for nonparticipating - // capturing groups. This fixes IE 5.5-8, but not IE 9's quirks mode or emulation of - // older IEs. IE 9 in standards mode follows the spec - if (!correctExecNpcg && match.length > 1 && indexOf(match, '') > -1) { - r2 = copyRegex(this, { - removeG: true, - isInternalOnly: true - }); - // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed - // matching due to characters outside the match - nativ.replace.call(String(str).slice(match.index), r2, function() { - var len = arguments.length, i; - // Skip index 0 and the last 2 - for (i = 1; i < len - 2; ++i) { - if (arguments[i] === undefined) { - match[i] = undefined; - } - } - }); - } - - // Attach named capture properties - if (this[REGEX_DATA] && this[REGEX_DATA].captureNames) { - // Skip index 0 - for (i = 1; i < match.length; ++i) { - name = this[REGEX_DATA].captureNames[i - 1]; - if (name) { - match[name] = match[i]; +fixed.exec = function(str) { + var origLastIndex = this.lastIndex, + match = nativ.exec.apply(this, arguments), + name, + r2, + i; + + if (match) { + // Fix browsers whose `exec` methods don't return `undefined` for nonparticipating capturing + // groups. This fixes IE 5.5-8, but not IE 9's quirks mode or emulation of older IEs. IE 9 + // in standards mode follows the spec. + if (!correctExecNpcg && match.length > 1 && indexOf(match, '') > -1) { + r2 = copyRegex(this, { + removeG: true, + isInternalOnly: true + }); + // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed + // matching due to characters outside the match + nativ.replace.call(String(str).slice(match.index), r2, function() { + var len = arguments.length, i; + // Skip index 0 and the last 2 + for (i = 1; i < len - 2; ++i) { + if (arguments[i] === undefined) { + match[i] = undefined; } } - } + }); + } - // Fix browsers that increment `lastIndex` after zero-length matches - if (this.global && !match[0].length && (this.lastIndex > match.index)) { - this.lastIndex = match.index; + // Attach named capture properties + if (this[REGEX_DATA] && this[REGEX_DATA].captureNames) { + // Skip index 0 + for (i = 1; i < match.length; ++i) { + name = this[REGEX_DATA].captureNames[i - 1]; + if (name) { + match[name] = match[i]; + } } } - if (!this.global) { - // Fixes IE, Opera bug (last tested IE 9, Opera 11.6) - this.lastIndex = origLastIndex; + // Fix browsers that increment `lastIndex` after zero-length matches + if (this.global && !match[0].length && (this.lastIndex > match.index)) { + this.lastIndex = match.index; } + } - return match; - }; + if (!this.global) { + // Fixes IE, Opera bug (last tested IE 9, Opera 11.6) + this.lastIndex = origLastIndex; + } + + return match; +}; /** * Fixes browser bugs in the native `RegExp.prototype.test`. Calling `XRegExp.install('natives')` * uses this to override the native method. * - * @private * @param {String} str String to search. * @returns {Boolean} Whether the regex matched the provided value. */ - fixed.test = function(str) { - // Do this the easy way :-) - return !!fixed.exec.call(this, str); - }; +fixed.test = function(str) { + // Do this the easy way :-) + return !!fixed.exec.call(this, str); +}; /** * Adds named capture support (with backreferences returned as `result.name`), and fixes browser * bugs in the native `String.prototype.match`. Calling `XRegExp.install('natives')` uses this to * override the native method. * - * @private * @param {RegExp|*} regex Regex to search with. If not a regex object, it is passed to `RegExp`. * @returns {Array} If `regex` uses flag g, an array of match strings or `null`. Without flag g, * the result of calling `regex.exec(this)`. */ - fixed.match = function(regex) { - var result; +fixed.match = function(regex) { + var result; - if (!XRegExp.isRegExp(regex)) { - // Use the native `RegExp` rather than `XRegExp` - regex = new RegExp(regex); - } else if (regex.global) { - result = nativ.match.apply(this, arguments); - // Fixes IE bug - regex.lastIndex = 0; + if (!XRegExp.isRegExp(regex)) { + // Use the native `RegExp` rather than `XRegExp` + regex = new RegExp(regex); + } else if (regex.global) { + result = nativ.match.apply(this, arguments); + // Fixes IE bug + regex.lastIndex = 0; - return result; - } + return result; + } - return fixed.exec.call(regex, toObject(this)); - }; + return fixed.exec.call(regex, toObject(this)); +}; /** * Adds support for `${n}` tokens for named and numbered backreferences in replacement text, and @@ -1473,212 +1439,210 @@ * that this doesn't support SpiderMonkey's proprietary third (`flags`) argument. Use via * `XRegExp.replace` without overriding natives. * - * @private * @param {RegExp|String} search Search pattern to be replaced. * @param {String|Function} replacement Replacement string or a function invoked to create it. * @returns {String} New string with one or all matches replaced. */ - fixed.replace = function(search, replacement) { - var isRegex = XRegExp.isRegExp(search), - origLastIndex, - captureNames, - result; - - if (isRegex) { - if (search[REGEX_DATA]) { - captureNames = search[REGEX_DATA].captureNames; - } - // Only needed if `search` is nonglobal - origLastIndex = search.lastIndex; - } else { - search += ''; // Type-convert +fixed.replace = function(search, replacement) { + var isRegex = XRegExp.isRegExp(search), + origLastIndex, + captureNames, + result; + + if (isRegex) { + if (search[REGEX_DATA]) { + captureNames = search[REGEX_DATA].captureNames; } + // Only needed if `search` is nonglobal + origLastIndex = search.lastIndex; + } else { + search += ''; // Type-convert + } - // Don't use `typeof`; some older browsers return 'function' for regex objects - if (isType(replacement, 'Function')) { - // Stringifying `this` fixes a bug in IE < 9 where the last argument in replacement - // functions isn't type-converted to a string - result = nativ.replace.call(String(this), search, function() { - var args = arguments, i; - if (captureNames) { - // Change the `arguments[0]` string primitive to a `String` object that can - // store properties. This really does need to use `String` as a constructor - args[0] = new String(args[0]); - // Store named backreferences on the first argument - for (i = 0; i < captureNames.length; ++i) { - if (captureNames[i]) { - args[0][captureNames[i]] = args[i + 1]; - } + // Don't use `typeof`; some older browsers return 'function' for regex objects + if (isType(replacement, 'Function')) { + // Stringifying `this` fixes a bug in IE < 9 where the last argument in replacement + // functions isn't type-converted to a string + result = nativ.replace.call(String(this), search, function() { + var args = arguments, i; + if (captureNames) { + // Change the `arguments[0]` string primitive to a `String` object that can store + // properties. This really does need to use `String` as a constructor + args[0] = new String(args[0]); + // Store named backreferences on the first argument + for (i = 0; i < captureNames.length; ++i) { + if (captureNames[i]) { + args[0][captureNames[i]] = args[i + 1]; } } - // Update `lastIndex` before calling `replacement`. Fixes IE, Chrome, Firefox, - // Safari bug (last tested IE 9, Chrome 17, Firefox 11, Safari 5.1) - if (isRegex && search.global) { - search.lastIndex = args[args.length - 2] + args[0].length; - } - // ES6 specs the context for replacement functions as `undefined` - return replacement.apply(undefined, args); - }); - } else { - // Ensure that the last value of `args` will be a string when given nonstring `this`, - // while still throwing on null or undefined context - result = nativ.replace.call(this == null ? this : String(this), search, function() { - // Keep this function's `arguments` available through closure - var args = arguments; - return nativ.replace.call(String(replacement), replacementToken, function($0, $1, $2) { - var n; - // Named or numbered backreference with curly braces - if ($1) { - // XRegExp behavior for `${n}`: - // 1. Backreference to numbered capture, if `n` is an integer. Use `0` for - // for the entire match. Any number of leading zeros may be used. - // 2. Backreference to named capture `n`, if it exists and is not an - // integer overridden by numbered capture. In practice, this does not - // overlap with numbered capture since XRegExp does not allow named - // capture to use a bare integer as the name. - // 3. If the name or number does not refer to an existing capturing group, - // it's an error. - n = +$1; // Type-convert; drop leading zeros - if (n <= args.length - 3) { - return args[n] || ''; - } - // Groups with the same name is an error, else would need `lastIndexOf` - n = captureNames ? indexOf(captureNames, $1) : -1; - if (n < 0) { - throw new SyntaxError('Backreference to undefined group ' + $0); - } - return args[n + 1] || ''; - } - // Else, special variable or numbered backreference without curly braces - if ($2 === '$') { // $$ - return '$'; - } - if ($2 === '&' || +$2 === 0) { // $&, $0 (not followed by 1-9), $00 - return args[0]; - } - if ($2 === '`') { // $` (left context) - return args[args.length - 1].slice(0, args[args.length - 2]); + } + // Update `lastIndex` before calling `replacement`. Fixes IE, Chrome, Firefox, Safari + // bug (last tested IE 9, Chrome 17, Firefox 11, Safari 5.1) + if (isRegex && search.global) { + search.lastIndex = args[args.length - 2] + args[0].length; + } + // ES6 specs the context for replacement functions as `undefined` + return replacement.apply(undefined, args); + }); + } else { + // Ensure that the last value of `args` will be a string when given nonstring `this`, + // while still throwing on null or undefined context + result = nativ.replace.call(this == null ? this : String(this), search, function() { + // Keep this function's `arguments` available through closure + var args = arguments; + return nativ.replace.call(String(replacement), replacementToken, function($0, $1, $2) { + var n; + // Named or numbered backreference with curly braces + if ($1) { + // XRegExp behavior for `${n}`: + // 1. Backreference to numbered capture, if `n` is an integer. Use `0` for the + // entire match. Any number of leading zeros may be used. + // 2. Backreference to named capture `n`, if it exists and is not an integer + // overridden by numbered capture. In practice, this does not overlap with + // numbered capture since XRegExp does not allow named capture to use a bare + // integer as the name. + // 3. If the name or number does not refer to an existing capturing group, it's + // an error. + n = +$1; // Type-convert; drop leading zeros + if (n <= args.length - 3) { + return args[n] || ''; } - if ($2 === "'") { // $' (right context) - return args[args.length - 1].slice(args[args.length - 2] + args[0].length); + // Groups with the same name is an error, else would need `lastIndexOf` + n = captureNames ? indexOf(captureNames, $1) : -1; + if (n < 0) { + throw new SyntaxError('Backreference to undefined group ' + $0); } - // Else, numbered backreference without curly braces - $2 = +$2; // Type-convert; drop leading zero - // XRegExp behavior for `$n` and `$nn`: - // - Backrefs end after 1 or 2 digits. Use `${..}` for more digits. - // - `$1` is an error if no capturing groups. - // - `$10` is an error if less than 10 capturing groups. Use `${1}0` instead. - // - `$01` is `$1` if at least one capturing group, else it's an error. - // - `$0` (not followed by 1-9) and `$00` are the entire match. - // Native behavior, for comparison: - // - Backrefs end after 1 or 2 digits. Cannot reference capturing group 100+. - // - `$1` is a literal `$1` if no capturing groups. - // - `$10` is `$1` followed by a literal `0` if less than 10 capturing groups. - // - `$01` is `$1` if at least one capturing group, else it's a literal `$01`. - // - `$0` is a literal `$0`. - if (!isNaN($2)) { - if ($2 > args.length - 3) { - throw new SyntaxError('Backreference to undefined group ' + $0); - } - return args[$2] || ''; + return args[n + 1] || ''; + } + // Else, special variable or numbered backreference without curly braces + if ($2 === '$') { // $$ + return '$'; + } + if ($2 === '&' || +$2 === 0) { // $&, $0 (not followed by 1-9), $00 + return args[0]; + } + if ($2 === '`') { // $` (left context) + return args[args.length - 1].slice(0, args[args.length - 2]); + } + if ($2 === "'") { // $' (right context) + return args[args.length - 1].slice(args[args.length - 2] + args[0].length); + } + // Else, numbered backreference without curly braces + $2 = +$2; // Type-convert; drop leading zero + // XRegExp behavior for `$n` and `$nn`: + // - Backrefs end after 1 or 2 digits. Use `${..}` for more digits. + // - `$1` is an error if no capturing groups. + // - `$10` is an error if less than 10 capturing groups. Use `${1}0` instead. + // - `$01` is `$1` if at least one capturing group, else it's an error. + // - `$0` (not followed by 1-9) and `$00` are the entire match. + // Native behavior, for comparison: + // - Backrefs end after 1 or 2 digits. Cannot reference capturing group 100+. + // - `$1` is a literal `$1` if no capturing groups. + // - `$10` is `$1` followed by a literal `0` if less than 10 capturing groups. + // - `$01` is `$1` if at least one capturing group, else it's a literal `$01`. + // - `$0` is a literal `$0`. + if (!isNaN($2)) { + if ($2 > args.length - 3) { + throw new SyntaxError('Backreference to undefined group ' + $0); } - // `$` followed by an unsupported char is an error, unlike native JS - throw new SyntaxError('Invalid token ' + $0); - }); + return args[$2] || ''; + } + // `$` followed by an unsupported char is an error, unlike native JS + throw new SyntaxError('Invalid token ' + $0); }); - } + }); + } - if (isRegex) { - if (search.global) { - // Fixes IE, Safari bug (last tested IE 9, Safari 5.1) - search.lastIndex = 0; - } else { - // Fixes IE, Opera bug (last tested IE 9, Opera 11.6) - search.lastIndex = origLastIndex; - } + if (isRegex) { + if (search.global) { + // Fixes IE, Safari bug (last tested IE 9, Safari 5.1) + search.lastIndex = 0; + } else { + // Fixes IE, Opera bug (last tested IE 9, Opera 11.6) + search.lastIndex = origLastIndex; } + } - return result; - }; + return result; +}; /** * Fixes browser bugs in the native `String.prototype.split`. Calling `XRegExp.install('natives')` * uses this to override the native method. Use via `XRegExp.split` without overriding natives. * - * @private * @param {RegExp|String} separator Regex or string to use for separating the string. * @param {Number} [limit] Maximum number of items to include in the result array. * @returns {Array} Array of substrings. */ - fixed.split = function(separator, limit) { - if (!XRegExp.isRegExp(separator)) { - // Browsers handle nonregex split correctly, so use the faster native method - return nativ.split.apply(this, arguments); - } +fixed.split = function(separator, limit) { + if (!XRegExp.isRegExp(separator)) { + // Browsers handle nonregex split correctly, so use the faster native method + return nativ.split.apply(this, arguments); + } - var str = String(this), - output = [], - origLastIndex = separator.lastIndex, - lastLastIndex = 0, - lastLength; - - // Values for `limit`, per the spec: - // If undefined: pow(2,32) - 1 - // If 0, Infinity, or NaN: 0 - // If positive number: limit = floor(limit); if (limit >= pow(2,32)) limit -= pow(2,32); - // If negative number: pow(2,32) - floor(abs(limit)) - // If other: Type-convert, then use the above rules - // This line fails in very strange ways for some values of `limit` in Opera 10.5-10.63, - // unless Opera Dragonfly is open (go figure). It works in at least Opera 9.5-10.1 and 11+ - limit = (limit === undefined ? -1 : limit) >>> 0; - - XRegExp.forEach(str, separator, function(match) { - // This condition is not the same as `if (match[0].length)` - if ((match.index + match[0].length) > lastLastIndex) { - output.push(str.slice(lastLastIndex, match.index)); - if (match.length > 1 && match.index < str.length) { - Array.prototype.push.apply(output, match.slice(1)); - } - lastLength = match[0].length; - lastLastIndex = match.index + lastLength; + var str = String(this), + output = [], + origLastIndex = separator.lastIndex, + lastLastIndex = 0, + lastLength; + + // Values for `limit`, per the spec: + // If undefined: pow(2,32) - 1 + // If 0, Infinity, or NaN: 0 + // If positive number: limit = floor(limit); if (limit >= pow(2,32)) limit -= pow(2,32); + // If negative number: pow(2,32) - floor(abs(limit)) + // If other: Type-convert, then use the above rules + // This line fails in very strange ways for some values of `limit` in Opera 10.5-10.63, unless + // Opera Dragonfly is open (go figure). It works in at least Opera 9.5-10.1 and 11+ + limit = (limit === undefined ? -1 : limit) >>> 0; + + XRegExp.forEach(str, separator, function(match) { + // This condition is not the same as `if (match[0].length)` + if ((match.index + match[0].length) > lastLastIndex) { + output.push(str.slice(lastLastIndex, match.index)); + if (match.length > 1 && match.index < str.length) { + Array.prototype.push.apply(output, match.slice(1)); } - }); + lastLength = match[0].length; + lastLastIndex = match.index + lastLength; + } + }); - if (lastLastIndex === str.length) { - if (!nativ.test.call(separator, '') || lastLength) { - output.push(''); - } - } else { - output.push(str.slice(lastLastIndex)); + if (lastLastIndex === str.length) { + if (!nativ.test.call(separator, '') || lastLength) { + output.push(''); } + } else { + output.push(str.slice(lastLastIndex)); + } - separator.lastIndex = origLastIndex; - return output.length > limit ? output.slice(0, limit) : output; - }; + separator.lastIndex = origLastIndex; + return output.length > limit ? output.slice(0, limit) : output; +}; -/* ============================== - * Built-in syntax/flag tokens - * ============================== */ +// ==--------------------------== +// Built-in syntax/flag tokens +// ==--------------------------== /* * Letter escapes that natively match literal characters: `\a`, `\A`, etc. These should be * SyntaxErrors but are allowed in web reality. XRegExp makes them errors for cross-browser * consistency and to reserve their syntax, but lets them be superseded by addons. */ - XRegExp.addToken( - /\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/, - function(match, scope) { - // \B is allowed in default scope only - if (match[1] === 'B' && scope === defaultScope) { - return match[0]; - } - throw new SyntaxError('Invalid escape ' + match[0]); - }, - { - scope: 'all', - leadChar: '\\' +XRegExp.addToken( + /\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/, + function(match, scope) { + // \B is allowed in default scope only + if (match[1] === 'B' && scope === defaultScope) { + return match[0]; } - ); + throw new SyntaxError('Invalid escape ' + match[0]); + }, + { + scope: 'all', + leadChar: '\\' + } +); /* * Unicode code point escape with curly braces: `\u{N..}`. `N..` is any one or more digit @@ -1688,134 +1652,137 @@ * if you follow a `\u{N..}` token that references a code point above U+FFFF with a quantifier, or * if you use the same in a character class. */ - XRegExp.addToken( - /\\u{([\dA-Fa-f]+)}/, - function(match, scope, flags) { - var code = dec(match[1]); - if (code > 0x10FFFF) { - throw new SyntaxError('Invalid Unicode code point ' + match[0]); - } - if (code <= 0xFFFF) { - // Converting to \uNNNN avoids needing to escape the literal character and keep it - // separate from preceding tokens - return '\\u' + pad4(hex(code)); - } - // If `code` is between 0xFFFF and 0x10FFFF, require and defer to native handling - if (hasNativeU && flags.indexOf('u') > -1) { - return match[0]; - } - throw new SyntaxError('Cannot use Unicode code point above \\u{FFFF} without flag u'); - }, - { - scope: 'all', - leadChar: '\\' +XRegExp.addToken( + /\\u{([\dA-Fa-f]+)}/, + function(match, scope, flags) { + var code = dec(match[1]); + if (code > 0x10FFFF) { + throw new SyntaxError('Invalid Unicode code point ' + match[0]); } - ); + if (code <= 0xFFFF) { + // Converting to \uNNNN avoids needing to escape the literal character and keep it + // separate from preceding tokens + return '\\u' + pad4(hex(code)); + } + // If `code` is between 0xFFFF and 0x10FFFF, require and defer to native handling + if (hasNativeU && flags.indexOf('u') > -1) { + return match[0]; + } + throw new SyntaxError('Cannot use Unicode code point above \\u{FFFF} without flag u'); + }, + { + scope: 'all', + leadChar: '\\' + } +); /* * Empty character class: `[]` or `[^]`. This fixes a critical cross-browser syntax inconsistency. * Unless this is standardized (per the ES spec), regex syntax can't be accurately parsed because * character class endings can't be determined. */ - XRegExp.addToken( - /\[(\^?)]/, - function(match) { - // For cross-browser compatibility with ES3, convert [] to \b\B and [^] to [\s\S]. - // (?!) should work like \b\B, but is unreliable in some versions of Firefox - return match[1] ? '[\\s\\S]' : '\\b\\B'; - }, - {leadChar: '['} - ); +XRegExp.addToken( + /\[(\^?)]/, + function(match) { + // For cross-browser compatibility with ES3, convert [] to \b\B and [^] to [\s\S]. + // (?!) should work like \b\B, but is unreliable in some versions of Firefox + return match[1] ? '[\\s\\S]' : '\\b\\B'; + }, + {leadChar: '['} +); /* * Comment pattern: `(?# )`. Inline comments are an alternative to the line comments allowed in * free-spacing mode (flag x). */ - XRegExp.addToken( - /\(\?#[^)]*\)/, - function(match, scope, flags) { - // Keep tokens separated unless the following token is a quantifier - return isQuantifierNext(match.input, match.index + match[0].length, flags) ? - '' : '(?:)'; - }, - {leadChar: '('} - ); +XRegExp.addToken( + /\(\?#[^)]*\)/, + function(match, scope, flags) { + // Keep tokens separated unless the following token is a quantifier. This avoids e.g. + // inadvertedly changing `\1(?#)1` to `\11`. + return isQuantifierNext(match.input, match.index + match[0].length, flags) ? + '' : '(?:)'; + }, + {leadChar: '('} +); /* * Whitespace and line comments, in free-spacing mode (aka extended mode, flag x) only. */ - XRegExp.addToken( - /\s+|#.*/, - function(match, scope, flags) { - // Keep tokens separated unless the following token is a quantifier - return isQuantifierNext(match.input, match.index + match[0].length, flags) ? - '' : '(?:)'; - }, - {flag: 'x'} - ); +XRegExp.addToken( + /\s+|#[^\n]*\n?/, + function(match, scope, flags) { + // Keep tokens separated unless the following token is a quantifier. This avoids e.g. + // inadvertedly changing `\1 1` to `\11`. + return isQuantifierNext(match.input, match.index + match[0].length, flags) ? + '' : '(?:)'; + }, + {flag: 'x'} +); /* * Dot, in dotall mode (aka singleline mode, flag s) only. */ - XRegExp.addToken( - /\./, - function() { - return '[\\s\\S]'; - }, - { - flag: 's', - leadChar: '.' - } - ); +XRegExp.addToken( + /\./, + function() { + return '[\\s\\S]'; + }, + { + flag: 's', + leadChar: '.' + } +); /* * Named backreference: `\k`. Backreference names can use the characters A-Z, a-z, 0-9, _, * and $ only. Also allows numbered backreferences as `\k`. */ - XRegExp.addToken( - /\\k<([\w$]+)>/, - function(match) { - // Groups with the same name is an error, else would need `lastIndexOf` - var index = isNaN(match[1]) ? (indexOf(this.captureNames, match[1]) + 1) : +match[1], - endIndex = match.index + match[0].length; - if (!index || index > this.captureNames.length) { - throw new SyntaxError('Backreference to undefined group ' + match[0]); - } - // Keep backreferences separate from subsequent literal numbers - return '\\' + index + ( - endIndex === match.input.length || isNaN(match.input.charAt(endIndex)) ? - '' : '(?:)' - ); - }, - {leadChar: '\\'} - ); +XRegExp.addToken( + /\\k<([\w$]+)>/, + function(match) { + // Groups with the same name is an error, else would need `lastIndexOf` + var index = isNaN(match[1]) ? (indexOf(this.captureNames, match[1]) + 1) : +match[1], + endIndex = match.index + match[0].length; + if (!index || index > this.captureNames.length) { + throw new SyntaxError('Backreference to undefined group ' + match[0]); + } + // Keep backreferences separate from subsequent literal numbers. This avoids e.g. + // inadvertedly changing `(?)\k1` to `()\11`. + return '\\' + index + ( + endIndex === match.input.length || isNaN(match.input.charAt(endIndex)) ? + '' : '(?:)' + ); + }, + {leadChar: '\\'} +); /* * Numbered backreference or octal, plus any following digits: `\0`, `\11`, etc. Octals except `\0` * not followed by 0-9 and backreferences to unopened capture groups throw an error. Other matches * are returned unaltered. IE < 9 doesn't support backreferences above `\99` in regex syntax. */ - XRegExp.addToken( - /\\(\d+)/, - function(match, scope) { - if ( - !( - scope === defaultScope && - /^[1-9]/.test(match[1]) && - +match[1] <= this.captureNames.length - ) && - match[1] !== '0' - ) { - throw new SyntaxError('Cannot use octal escape or backreference to undefined group ' + - match[0]); - } - return match[0]; - }, - { - scope: 'all', - leadChar: '\\' +XRegExp.addToken( + /\\(\d+)/, + function(match, scope) { + if ( + !( + scope === defaultScope && + /^[1-9]/.test(match[1]) && + +match[1] <= this.captureNames.length + ) && + match[1] !== '0' + ) { + throw new SyntaxError('Cannot use octal escape or backreference to undefined group ' + + match[0]); } - ); + return match[0]; + }, + { + scope: 'all', + leadChar: '\\' + } +); /* * Named capturing group; match the opening delimiter only: `(?`. Capture names can use the @@ -1824,48 +1791,44 @@ * supported the Python-style syntax. Otherwise, XRegExp might treat numbered backreferences to * Python-style named capture as octals. */ - XRegExp.addToken( - /\(\?P?<([\w$]+)>/, - function(match) { - // Disallow bare integers as names because named backreferences are added to match - // arrays and therefore numeric properties may lead to incorrect lookups - if (!isNaN(match[1])) { - throw new SyntaxError('Cannot use integer as capture name ' + match[0]); - } - if (match[1] === 'length' || match[1] === '__proto__') { - throw new SyntaxError('Cannot use reserved word as capture name ' + match[0]); - } - if (indexOf(this.captureNames, match[1]) > -1) { - throw new SyntaxError('Cannot use same name for multiple groups ' + match[0]); - } - this.captureNames.push(match[1]); - this.hasNamedCapture = true; - return '('; - }, - {leadChar: '('} - ); +XRegExp.addToken( + /\(\?P?<([\w$]+)>/, + function(match) { + // Disallow bare integers as names because named backreferences are added to match arrays + // and therefore numeric properties may lead to incorrect lookups + if (!isNaN(match[1])) { + throw new SyntaxError('Cannot use integer as capture name ' + match[0]); + } + if (match[1] === 'length' || match[1] === '__proto__') { + throw new SyntaxError('Cannot use reserved word as capture name ' + match[0]); + } + if (indexOf(this.captureNames, match[1]) > -1) { + throw new SyntaxError('Cannot use same name for multiple groups ' + match[0]); + } + this.captureNames.push(match[1]); + this.hasNamedCapture = true; + return '('; + }, + {leadChar: '('} +); /* * Capturing group; match the opening parenthesis only. Required for support of named capturing * groups. Also adds explicit capture mode (flag n). */ - XRegExp.addToken( - /\((?!\?)/, - function(match, scope, flags) { - if (flags.indexOf('n') > -1) { - return '(?:'; - } - this.captureNames.push(null); - return '('; - }, - { - optionalFlags: 'n', - leadChar: '(' +XRegExp.addToken( + /\((?!\?)/, + function(match, scope, flags) { + if (flags.indexOf('n') > -1) { + return '(?:'; } - ); - -/* ============================== - * Expose XRegExp - * ============================== */ + this.captureNames.push(null); + return '('; + }, + { + optionalFlags: 'n', + leadChar: '(' + } +); - module.exports = XRegExp; +module.exports = XRegExp; diff --git a/tools/eslint/package.json b/tools/eslint/package.json index c5787d4cfc1c8b..77a386a9b843fd 100644 --- a/tools/eslint/package.json +++ b/tools/eslint/package.json @@ -1,19 +1,19 @@ { "_args": [ [ - "eslint@latest", + "eslint", "/Users/trott/io.js/tools" ] ], "_from": "eslint@latest", - "_id": "eslint@2.9.0", + "_id": "eslint@3.0.1", "_inCache": true, "_installable": true, "_location": "/eslint", "_nodeVersion": "4.4.2", "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/eslint-2.9.0.tgz_1461949357357_0.922593503491953" + "tmp": "tmp/eslint-3.0.1.tgz_1467741316725_0.5076132179237902" }, "_npmUser": { "email": "nicholas@nczconsulting.com", @@ -23,8 +23,8 @@ "_phantomChildren": {}, "_requested": { "name": "eslint", - "raw": "eslint@latest", - "rawSpec": "latest", + "raw": "eslint", + "rawSpec": "", "scope": null, "spec": "latest", "type": "tag" @@ -32,10 +32,10 @@ "_requiredBy": [ "#USER" ], - "_resolved": "https://registry.npmjs.org/eslint/-/eslint-2.9.0.tgz", - "_shasum": "5b3fdb7497bb042e2747e3d1fe95f404dca39a60", + "_resolved": "https://registry.npmjs.org/eslint/-/eslint-3.0.1.tgz", + "_shasum": "ff12eafdc04ea71d173a099d4658a136e7157934", "_shrinkwrap": null, - "_spec": "eslint@latest", + "_spec": "eslint", "_where": "/Users/trott/io.js/tools", "author": { "email": "nicholas+npm@nczconsulting.com", @@ -51,10 +51,10 @@ "chalk": "^1.1.3", "concat-stream": "^1.4.6", "debug": "^2.1.1", - "doctrine": "^1.2.1", + "doctrine": "^1.2.2", "es6-map": "^0.1.3", "escope": "^3.6.0", - "espree": "3.1.4", + "espree": "^3.1.6", "estraverse": "^4.2.0", "esutils": "^2.0.2", "file-entry-cache": "^1.1.1", @@ -67,15 +67,16 @@ "is-resolvable": "^1.0.0", "js-yaml": "^3.5.1", "json-stable-stringify": "^1.0.0", + "levn": "^0.3.0", "lodash": "^4.0.0", "mkdirp": "^0.5.0", "optionator": "^0.8.1", - "path-is-absolute": "^1.0.0", "path-is-inside": "^1.0.1", "pluralize": "^1.2.1", "progress": "^1.1.8", "require-uncached": "^1.0.2", "shelljs": "^0.6.0", + "strip-bom": "^3.0.0", "strip-json-comments": "~1.0.1", "table": "^3.7.8", "text-table": "~0.2.0", @@ -97,15 +98,19 @@ "gh-got": "^2.2.0", "istanbul": "^0.4.0", "jsdoc": "^3.3.0-beta1", + "karma": "^0.13.22", + "karma-mocha": "^1.0.1", + "karma-mocha-reporter": "^2.0.3", + "karma-phantomjs-launcher": "^1.0.0", "leche": "^2.1.1", "linefix": "^0.1.1", "load-perf": "^0.2.0", "markdownlint": "^0.1.0", "mocha": "^2.4.5", - "mocha-phantomjs": "4.0.1", + "mock-fs": "^3.9.0", "npm-license": "^0.3.2", - "phantomjs-polyfill": "0.0.1", - "proxyquire": "^1.0.0", + "phantomjs-prebuilt": "^2.1.7", + "proxyquire": ">=1.0.0 <1.7.5", "semver": "^5.0.3", "shelljs-nodecli": "~0.1.0", "sinon": "^1.17.2", @@ -114,11 +119,11 @@ }, "directories": {}, "dist": { - "shasum": "5b3fdb7497bb042e2747e3d1fe95f404dca39a60", - "tarball": "https://registry.npmjs.org/eslint/-/eslint-2.9.0.tgz" + "shasum": "ff12eafdc04ea71d173a099d4658a136e7157934", + "tarball": "https://registry.npmjs.org/eslint/-/eslint-3.0.1.tgz" }, "engines": { - "node": ">=0.10" + "node": ">=4" }, "files": [ "LICENSE", @@ -128,7 +133,7 @@ "lib", "messages" ], - "gitHead": "d8887638a9eaeeda6ea09f7d625d1bc57ea7f436", + "gitHead": "0fd4b6db5ff273a8475fe9ddc25486a10bf40f83", "homepage": "http://eslint.org", "keywords": [ "ast", @@ -170,5 +175,5 @@ "release": "node Makefile.js release", "test": "node Makefile.js test" }, - "version": "2.9.0" + "version": "3.0.1" } diff --git a/tools/getmoduleversion.py b/tools/getmoduleversion.py new file mode 100644 index 00000000000000..fb86ba1fa923dd --- /dev/null +++ b/tools/getmoduleversion.py @@ -0,0 +1,24 @@ +from __future__ import print_function +import os +import re + +def get_version(): + node_version_h = os.path.join( + os.path.dirname(__file__), + '..', + 'src', + 'node_version.h') + + f = open(node_version_h) + + regex = '^#define NODE_MODULE_VERSION [0-9]+' + + for line in f: + if re.match(regex, line): + major = line.split()[2] + return major + + raise Exception('Could not find pattern matching %s' % regex) + +if __name__ == '__main__': + print(get_version()) diff --git a/tools/getnodeversion.py b/tools/getnodeversion.py index 766e4f60dc07ad..f2032cccefe936 100644 --- a/tools/getnodeversion.py +++ b/tools/getnodeversion.py @@ -1,16 +1,20 @@ -import os,re +import os +import re -node_version_h = os.path.join(os.path.dirname(__file__), '..', 'src', +node_version_h = os.path.join( + os.path.dirname(__file__), + '..', + 'src', 'node_version.h') f = open(node_version_h) for line in f: - if re.match('#define NODE_MAJOR_VERSION', line): + if re.match('^#define NODE_MAJOR_VERSION', line): major = line.split()[2] - if re.match('#define NODE_MINOR_VERSION', line): + if re.match('^#define NODE_MINOR_VERSION', line): minor = line.split()[2] - if re.match('#define NODE_PATCH_VERSION', line): + if re.match('^#define NODE_PATCH_VERSION', line): patch = line.split()[2] print '%(major)s.%(minor)s.%(patch)s'% locals() diff --git a/tools/icu/icu-generic.gyp b/tools/icu/icu-generic.gyp index a61b294141fc21..9d466ac39227c3 100644 --- a/tools/icu/icu-generic.gyp +++ b/tools/icu/icu-generic.gyp @@ -37,8 +37,7 @@ 'defines': [ # ICU cannot swap the initial data without this. # http://bugs.icu-project.org/trac/ticket/11046 - 'UCONFIG_NO_LEGACY_CONVERSION=1', - 'UCONFIG_NO_IDNA=1', + 'UCONFIG_NO_LEGACY_CONVERSION=1' ], }], ], @@ -428,9 +427,6 @@ #'<(icu_path)/source/common/ubidi_props_data.h', # and the callers '<(icu_path)/source/common/ushape.cpp', - '<(icu_path)/source/common/usprep.cpp', - '<(icu_path)/source/common/uts46.cpp', - '<(icu_path)/source/common/uidna.cpp', ]}], [ 'icu_ver_major == 57', { 'sources!': [ # work around http://bugs.icu-project.org/trac/ticket/12451 @@ -447,9 +443,6 @@ #'<(icu_path)/source/common/ubidi_props_data.h', # and the callers '<(icu_path)/source/common/ushape.cpp', - '<(icu_path)/source/common/usprep.cpp', - '<(icu_path)/source/common/uts46.cpp', - '<(icu_path)/source/common/uidna.cpp', ]}], [ 'OS == "solaris"', { 'defines': [ '_XOPEN_SOURCE_EXTENDED=0', diff --git a/tools/icu/icu_small.json b/tools/icu/icu_small.json index e434794e91c16b..de26e2cbb14b16 100644 --- a/tools/icu/icu_small.json +++ b/tools/icu/icu_small.json @@ -24,7 +24,7 @@ "region": "none", "zone": "locales", "converters": "none", - "stringprep": "none", + "stringprep": "locales", "translit": "none", "brkfiles": "none", "brkdict": "none", @@ -34,7 +34,6 @@ "remove": [ "cnvalias.icu", "postalCodeData.res", - "uts46.nrm", "genderList.res", "brkitr/root.res", "unames.icu" diff --git a/tools/icu/iculslocs.cc b/tools/icu/iculslocs.cc index 66becace0a4a27..2471e3f8583011 100644 --- a/tools/icu/iculslocs.cc +++ b/tools/icu/iculslocs.cc @@ -105,13 +105,13 @@ void usage() { PROG); } -#define ASSERT_SUCCESS(what) \ - if (U_FAILURE(status)) { \ +#define ASSERT_SUCCESS(status, what) \ + if (U_FAILURE(*status)) { \ u_printf("%s:%d: %s: ERROR: %s %s\n", \ __FILE__, \ __LINE__, \ PROG, \ - u_errorName(status), \ + u_errorName(*status), \ what); \ return 1; \ } @@ -177,9 +177,9 @@ int localeExists(const char* loc, UBool* exists) { } } -void printIndent(const LocalUFILEPointer& bf, int indent) { +void printIndent(const LocalUFILEPointer* bf, int indent) { for (int i = 0; i < indent + 1; i++) { - u_fprintf(bf.getAlias(), " "); + u_fprintf(bf->getAlias(), " "); } } @@ -189,15 +189,14 @@ void printIndent(const LocalUFILEPointer& bf, int indent) { * @return 0 for OK, 1 for err */ int dumpAllButInstalledLocales(int lev, - LocalUResourceBundlePointer& bund, - LocalUFILEPointer& bf, - UErrorCode& status) { - ures_resetIterator(bund.getAlias()); - const UBool isTable = (UBool)(ures_getType(bund.getAlias()) == URES_TABLE); + LocalUResourceBundlePointer* bund, + LocalUFILEPointer* bf, + UErrorCode* status) { + ures_resetIterator(bund->getAlias()); LocalUResourceBundlePointer t; - while (U_SUCCESS(status) && ures_hasNext(bund.getAlias())) { - t.adoptInstead(ures_getNextResource(bund.getAlias(), t.orphan(), &status)); - ASSERT_SUCCESS("while processing table"); + while (U_SUCCESS(*status) && ures_hasNext(bund->getAlias())) { + t.adoptInstead(ures_getNextResource(bund->getAlias(), t.orphan(), status)); + ASSERT_SUCCESS(status, "while processing table"); const char* key = ures_getKey(t.getAlias()); if (VERBOSE > 1) { u_printf("dump@%d: got key %s\n", lev, key); @@ -208,22 +207,22 @@ int dumpAllButInstalledLocales(int lev, } } else { printIndent(bf, lev); - u_fprintf(bf.getAlias(), "%s", key); + u_fprintf(bf->getAlias(), "%s", key); switch (ures_getType(t.getAlias())) { case URES_STRING: { int32_t len = 0; - const UChar* s = ures_getString(t.getAlias(), &len, &status); - ASSERT_SUCCESS("getting string"); - u_fprintf(bf.getAlias(), ":string {\""); - u_file_write(s, len, bf.getAlias()); - u_fprintf(bf.getAlias(), "\"}"); + const UChar* s = ures_getString(t.getAlias(), &len, status); + ASSERT_SUCCESS(status, "getting string"); + u_fprintf(bf->getAlias(), ":string {\""); + u_file_write(s, len, bf->getAlias()); + u_fprintf(bf->getAlias(), "\"}"); } break; default: { u_printf("ERROR: unhandled type in dumpAllButInstalledLocales().\n"); return 1; } break; } - u_fprintf(bf.getAlias(), "\n"); + u_fprintf(bf->getAlias(), "\n"); } } return 0; @@ -250,7 +249,7 @@ int list(const char* toBundle) { // first, calculate the bundle name. calculatePackageName(&status); - ASSERT_SUCCESS("calculating package name"); + ASSERT_SUCCESS(&status, "calculating package name"); if (VERBOSE) { u_printf("\"locale\": %s\n", locale); @@ -258,10 +257,10 @@ int list(const char* toBundle) { LocalUResourceBundlePointer bund( ures_openDirect(packageName.data(), locale, &status)); - ASSERT_SUCCESS("while opening the bundle"); + ASSERT_SUCCESS(&status, "while opening the bundle"); LocalUResourceBundlePointer installedLocales( ures_getByKey(bund.getAlias(), INSTALLEDLOCALES, NULL, &status)); - ASSERT_SUCCESS("while fetching installed locales"); + ASSERT_SUCCESS(&status, "while fetching installed locales"); int32_t count = ures_getSize(installedLocales.getAlias()); if (VERBOSE) { @@ -280,11 +279,12 @@ int list(const char* toBundle) { "%s:table(nofallback) {\n" " // First, everything besides InstalledLocales:\n", locale); - if (dumpAllButInstalledLocales(0, bund, bf, status)) { + if (dumpAllButInstalledLocales(0, &bund, &bf, &status)) { u_printf("Error dumping prolog for %s\n", toBundle); return 1; } - ASSERT_SUCCESS("while writing prolog"); // in case an error was missed + // in case an error was missed + ASSERT_SUCCESS(&status, "while writing prolog"); u_fprintf(bf.getAlias(), " %s:table { // %d locales in input %s.res\n", @@ -300,7 +300,7 @@ int list(const char* toBundle) { for (int32_t i = 0; i < count; i++) { subkey.adoptInstead(ures_getByIndex( installedLocales.getAlias(), i, subkey.orphan(), &status)); - ASSERT_SUCCESS("while fetching an installed locale's name"); + ASSERT_SUCCESS(&status, "while fetching an installed locale's name"); const char* key = ures_getKey(subkey.getAlias()); if (VERBOSE > 1) { diff --git a/tools/icu/shrink-icu-src.py b/tools/icu/shrink-icu-src.py index 1760b4ff47aebc..d0c82d87468dc0 100644 --- a/tools/icu/shrink-icu-src.py +++ b/tools/icu/shrink-icu-src.py @@ -1,13 +1,9 @@ #!/usr/bin/env python import optparse import os -import pprint import re -import shlex -import subprocess import sys import shutil -import string parser = optparse.OptionParser() @@ -37,7 +33,7 @@ shutil.rmtree(options.icusmall) if not os.path.isdir(options.icusrc): - print 'Missing source ICU dir --icusrc=%' % (options.icusrc) + print 'Missing source ICU dir --icusrc=%s' % (options.icusrc) sys.exit(1) diff --git a/tools/install.py b/tools/install.py index f3fa4fe898157b..a3986c5033904d 100755 --- a/tools/install.py +++ b/tools/install.py @@ -6,6 +6,7 @@ import re import shutil import sys +from getmoduleversion import get_version # set at init time node_prefix = '/usr/local' # PREFIX variable from Makefile @@ -107,9 +108,22 @@ def subdir_files(path, dest, action): def files(action): is_windows = sys.platform == 'win32' + output_file = 'node' + output_prefix = 'out/Release/' - exeext = '.exe' if is_windows else '' - action(['out/Release/node' + exeext], 'bin/node' + exeext) + if 'false' == variables.get('node_shared'): + if is_windows: + output_file += '.exe' + else: + if is_windows: + output_file += '.dll' + else: + # GYP will output to lib.target, this is hardcoded in its source, + # see the _InstallableTargetInstallPath function. + output_prefix += 'lib.target/' + output_file = 'lib' + output_file + '.so.' + get_version() + + action([output_prefix + output_file], 'bin/' + output_file) if 'true' == variables.get('node_use_dtrace'): action(['out/Release/node.d'], 'lib/dtrace/node.d') diff --git a/tools/license-builder.sh b/tools/license-builder.sh index 3d587227b41ae4..eb3980e7d027cd 100755 --- a/tools/license-builder.sh +++ b/tools/license-builder.sh @@ -22,7 +22,7 @@ $(echo -e "$3" | sed -e 's/^/ /' -e 's/^ $//' -e 's/ *$//' | sed -e '/./,$ } -if ! [ -d "${rootdir}/deps/icu/" ]; then +if ! [ -d "${rootdir}/deps/icu/" ] && ! [ -d "${rootdir}/deps/icu-small/" ]; then echo "ICU not installed, run configure to download it, e.g. ./configure --with-intl=small-icu --download=icu" exit 1 fi @@ -42,6 +42,16 @@ elif [ -f "${rootdir}/deps/icu/license.html" ]; then addlicense "ICU" "deps/icu" \ "$(sed -e '1,/ICU License - ICU 1\.8\.1 and later/d' -e :a \ -e 's/<[^>]*>//g;s/ / /g;s/ +$//;/]*>//g;s/ / /g;s/ +$//;/]*>//g;s/ / /g;s/ +$//;/ 0) rtf += '\\li' + (level * 240); @@ -290,18 +287,19 @@ function RtfGenerator() { function rtfEscape(string) { return string .replace(/[\\\{\}]/g, function(m) { - return '\\' + m; + return '\\' + m; }) .replace(/\t/g, function() { return '\\tab '; }) + // eslint-disable-next-line no-control-regex .replace(/[\x00-\x1f\x7f-\xff]/g, function(m) { return '\\\'' + toHex(m.charCodeAt(0), 2); }) .replace(/\ufeff/g, '') .replace(/[\u0100-\uffff]/g, function(m) { return '\\u' + toHex(m.charCodeAt(0), 4) + '?'; - }); + }); } function emitHeader() { @@ -317,12 +315,12 @@ function RtfGenerator() { inherits(RtfGenerator, Stream); -var stdin = process.stdin, - stdout = process.stdout, - line_splitter = new LineSplitter(), - paragraph_parser = new ParagraphParser(), - unwrapper = new Unwrapper(), - rtf_generator = new RtfGenerator(); +const stdin = process.stdin; +const stdout = process.stdout; +const line_splitter = new LineSplitter(); +const paragraph_parser = new ParagraphParser(); +const unwrapper = new Unwrapper(); +const rtf_generator = new RtfGenerator(); stdin.setEncoding('utf-8'); stdin.resume(); diff --git a/tools/mk-ca-bundle.pl b/tools/mk-ca-bundle.pl index 5ea3b937e31c03..30301fff9a305c 100755 --- a/tools/mk-ca-bundle.pl +++ b/tools/mk-ca-bundle.pl @@ -203,6 +203,7 @@ (%) my $start_of_cert = 0; open(TXT,"$txt") or die "Couldn't open $txt: $!\n"; +print CRT "#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS\n"; while () { if (/\*\*\*\*\* BEGIN LICENSE BLOCK \*\*\*\*\*/) { print CRT; @@ -310,6 +311,7 @@ (%) } } } +print CRT "#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS\n"; close(TXT) or die "Couldn't close $txt: $!\n"; close(CRT) or die "Couldn't close $crt.~: $!\n"; unless( $stdout ) { diff --git a/tools/mkssldef.py b/tools/mkssldef.py new file mode 100755 index 00000000000000..8cbdbabd976ba9 --- /dev/null +++ b/tools/mkssldef.py @@ -0,0 +1,44 @@ +#!/usr/bin/env python + +from __future__ import print_function +import re +import sys + +categories = [] +defines = [] +excludes = [] + +if __name__ == '__main__': + out = sys.stdout + filenames = sys.argv[1:] + + while filenames and filenames[0].startswith('-'): + option = filenames.pop(0) + if option == '-o': out = open(filenames.pop(0), 'w') + elif option.startswith('-C'): categories += option[2:].split(',') + elif option.startswith('-D'): defines += option[2:].split(',') + elif option.startswith('-X'): excludes += option[2:].split(',') + + excludes = map(re.compile, excludes) + exported = [] + + for filename in filenames: + for line in open(filename).readlines(): + name, _, meta, _ = re.split('\s+', line) + if any(map(lambda p: p.match(name), excludes)): continue + meta = meta.split(':') + assert meta[0] in ('EXIST', 'NOEXIST') + assert meta[2] in ('FUNCTION', 'VARIABLE') + if meta[0] != 'EXIST': continue + if meta[2] != 'FUNCTION': continue + def satisfy(expr, rules): + def test(expr): + if expr.startswith('!'): return not expr[1:] in rules + return expr == '' or expr in rules + return all(map(test, expr.split(','))) + if not satisfy(meta[1], defines): continue + if not satisfy(meta[3], categories): continue + exported.append(name) + + print('EXPORTS', file=out) + for name in sorted(exported): print(' ', name, file=out) diff --git a/tools/msvs/msi/i18n/it-it.wxl b/tools/msvs/msi/i18n/it-it.wxl new file mode 100644 index 00000000000000..54a251ea2530b4 --- /dev/null +++ b/tools/msvs/msi/i18n/it-it.wxl @@ -0,0 +1,38 @@ + + + + 1040 + + Installazione di [ProductName] sul tuo computer. + Scegliere una cartella di destinazione o premere Avanti per installare nella cartella predefinita. + + Una versione successiva di [ProductName] è già installata. Il setup terminerà ora. + + + Node.js runtime + Installa [ProductName] runtime (node.exe). + + Performance counters + Installa il supporto per i performance counters specifici di [ProductName]. + + Event tracing (ETW) + Installa il supporto per gli eventi "event tracing" (ETW) generati da [ProductName]. + + npm package manager + Installa npm, il package manager raccomandato per [ProductName]. + + Collegamenti alla documentazione online + Aggiunge i collegamenti al menu start alla documentazione online per [ProductName] [FullVersion] e per il sito web di [ProductName]. + + Aggiunta al PATH + Aggiunge [ProductName], npm, e i moduli installati globalmente da npm alla variable di ambiente PATH. + + Node.js e npm + Aggiunge [ProductName] e npm (se installato) alla variabile di ambiente PATH. + + Moduli npm + Aggiunge i moduli installati globalmente da npm alla variabile di ambiente PATH. Questa opzione avrà effetto solo per l'utente corrente, gli altri utenti dovranno aggiornare la loro variabile PATH manualmente. + + + Node.js è stato installato correttamente. + diff --git a/tools/msvs/msi/i18n/zh-cn.wxl b/tools/msvs/msi/i18n/zh-cn.wxl new file mode 100644 index 00000000000000..605eea70927c14 --- /dev/null +++ b/tools/msvs/msi/i18n/zh-cn.wxl @@ -0,0 +1,38 @@ + + + + 2052 + + 本安装向导将在您的计算机上安装 [ProductName]。 + 请选择一个自定义的安装位置,或单击下一步开始安装。 + + 已安装 [ProductName] 的一个更高版本。安装程序将立即退出。 + + + Node.js 运行时 + 安装核心 [ProductName] 运行时(node.exe)。 + + 性能计数器 + 为 [ProductName] 安装特定的性能计数器支持。 + + 事件追踪(ETW) + 为 [ProductName] 生成的事件安装事件追踪(ETW)的支持。 + + npm 包管理器 + 安装 npm, [ProductName] 的推荐包管理器。 + + 在线文档的快捷方式 + 在开始菜单内添加 [ProductName] [FullVersion] 的在线文档链接和 [ProductName] 的网站链接。 + + 添加到 PATH 环境变量中 + 把 [ProductName], npm 和以全局方式安装的 npm 模块添加到 PATH 环境变量中。 + + Node.js 和 npm + 把 [ProductName] 和 npm(如果安装了)添加到 PATH 环境变量中。 + + npm 模块 + 把以全局方式安装的 npm 模块添加到 PATH 环境变量中。此选项仅适用于当前用户;其他用户需要手动更新他们的 PATH 环境变量。 + + + Node.js 已成功安装。 + diff --git a/tools/msvs/msi/nodemsi.wixproj b/tools/msvs/msi/nodemsi.wixproj index 70ffec50bcc8e4..d21a3cf2327432 100644 --- a/tools/msvs/msi/nodemsi.wixproj +++ b/tools/msvs/msi/nodemsi.wixproj @@ -56,6 +56,7 @@ + @@ -78,7 +79,9 @@ diff --git a/tools/specialize_node_d.py b/tools/specialize_node_d.py index 0ee505ae9113e2..bb5ef5a57ce916 100755 --- a/tools/specialize_node_d.py +++ b/tools/specialize_node_d.py @@ -7,9 +7,7 @@ # import re -import subprocess import sys -import errno if len(sys.argv) != 5: print "usage: specialize_node_d.py outfile src/node.d flavor arch" diff --git a/tools/test.py b/tools/test.py index 3efafd95481023..c6b67e2e1e522f 100755 --- a/tools/test.py +++ b/tools/test.py @@ -32,7 +32,6 @@ import logging import optparse import os -import platform import re import signal import subprocess @@ -697,15 +696,6 @@ def Execute(args, context, timeout=None, env={}, faketty=False): return CommandOutput(exit_code, timed_out, output, errors) -def ExecuteNoCapture(args, context, timeout=None): - (process, exit_code, timed_out) = RunProcess( - context, - timeout, - args = args, - ) - return CommandOutput(exit_code, False, "", "") - - def CarCdr(path): if len(path) == 0: return (None, [ ]) @@ -879,14 +869,6 @@ def RunTestCases(cases_to_run, progress, tasks, flaky_tests_mode): return progress.Run(tasks) -def BuildRequirements(context, requirements, mode, scons_flags): - command_line = (['scons', '-Y', context.workspace, 'mode=' + ",".join(mode)] - + requirements - + scons_flags) - output = ExecuteNoCapture(command_line, context) - return output.exit_code == 0 - - # ------------------------------------------- # --- T e s t C o n f i g u r a t i o n --- # ------------------------------------------- @@ -1324,15 +1306,9 @@ def BuildOptions(): default=False, action="store_true") result.add_option('--logfile', dest='logfile', help='write test output to file. NOTE: this only applies the tap progress indicator') - result.add_option("-S", dest="scons_flags", help="Flag to pass through to scons", - default=[], action="append") result.add_option("-p", "--progress", help="The style of progress indicator (verbose, dots, color, mono, tap)", choices=PROGRESS_INDICATORS.keys(), default="mono") - result.add_option("--no-build", help="Don't build requirements", - default=True, action="store_true") - result.add_option("--build-only", help="Only build requirements, don't run the tests", - default=False, action="store_true") result.add_option("--report", help="Print a summary of the tests to be run", default=False, action="store_true") result.add_option("-s", "--suite", help="A test suite", @@ -1549,21 +1525,6 @@ def Main(): options.suppress_dialogs, options.store_unexpected_output, options.repeat) - # First build the required targets - if not options.no_build: - reqs = [ ] - for path in paths: - reqs += root.GetBuildRequirements(path, context) - reqs = list(set(reqs)) - if len(reqs) > 0: - if options.j != 1: - options.scons_flags += ['-j', str(options.j)] - if not BuildRequirements(context, reqs, options.mode, options.scons_flags): - return 1 - - # Just return if we are only building the targets for running the tests. - if options.build_only: - return 0 # Get status for tests sections = [ ] diff --git a/vcbuild.bat b/vcbuild.bat index ee5b4c8a17df08..f95cfca8b390a9 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -348,12 +348,12 @@ if defined jslint_ci goto jslint-ci if not defined jslint goto exit if not exist tools\eslint\bin\eslint.js goto no-lint echo running jslint -%config%\node tools\jslint.js -J benchmark lib src test tools\doc tools\eslint-rules tools\jslint.js +%config%\node tools\jslint.js -J benchmark lib src test tools goto exit :jslint-ci echo running jslint-ci -%config%\node tools\jslint.js -J -f tap -o test-eslint.tap benchmark lib src test tools\doc tools\eslint-rules tools\jslint.js +%config%\node tools\jslint.js -J -f tap -o test-eslint.tap benchmark lib src test tools goto exit :no-lint