From 0fcf249078fe58310e35b814f34872a47affe6ab Mon Sep 17 00:00:00 2001 From: Matt Loring Date: Wed, 19 Oct 2016 13:42:26 -0700 Subject: [PATCH 001/145] deps: cherry-pick bb4974d from v8 upstream Original commit message: [heap] Properly propagate allocated space during new space evacuaton in MC New space evaucation in MC supports, similar to scavenges, fall back allocation in old space. For new space evacuation we support sticky and non-sticky modes for fallback. The sticky mode essentially removes the capability to allocate in new space while the non-sticky mode only falls back for a single allocation. We use the non-sticky mode for allocations that are too large for a LAB but should still go in new space. When such an allocation fails in new space, we allocate in old space in non-sticky mode as we would still like to reuse the remainder memory in new space. However, in such a case we fail to properly report the space allocated in resulting in a missed recorded slot. BUG=chromium:641270 R=ulan@chromium.org Review-Url: https://codereview.chromium.org/2280943002 Cr-Commit-Position: refs/heads/master@{#38940} PR-URL: https://github.com/nodejs/node/pull/9192 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell --- deps/v8/include/v8-version.h | 2 +- deps/v8/src/heap/mark-compact.cc | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 6540e787d28346..353e3392ad7373 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 5 #define V8_MINOR_VERSION 1 #define V8_BUILD_NUMBER 281 -#define V8_PATCH_LEVEL 84 +#define V8_PATCH_LEVEL 85 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/src/heap/mark-compact.cc b/deps/v8/src/heap/mark-compact.cc index 78ee33f530d9ff..9abcd1a4b334a6 100644 --- a/deps/v8/src/heap/mark-compact.cc +++ b/deps/v8/src/heap/mark-compact.cc @@ -1674,6 +1674,7 @@ class MarkCompactCollector::EvacuateNewSpaceVisitor final const int size = old_object->Size(); AllocationAlignment alignment = old_object->RequiredAlignment(); AllocationResult allocation; + AllocationSpace space_allocated_in = space_to_allocate_; if (space_to_allocate_ == NEW_SPACE) { if (size > kMaxLabObjectSize) { allocation = @@ -1684,11 +1685,12 @@ class MarkCompactCollector::EvacuateNewSpaceVisitor final } if (allocation.IsRetry() || (space_to_allocate_ == OLD_SPACE)) { allocation = AllocateInOldSpace(size, alignment); + space_allocated_in = OLD_SPACE; } bool ok = allocation.To(target_object); DCHECK(ok); USE(ok); - return space_to_allocate_; + return space_allocated_in; } inline bool NewLocalAllocationBuffer() { From 8b85d471124ee1702bcf5692756a782e08e26d2c Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Mon, 24 Oct 2016 12:03:53 -0400 Subject: [PATCH 002/145] tools: use long format for gpg fingerprint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Git has been using my Long format fingerprint in the tagging messages, this has been causing the release script to fail on my keys. It would also be wise to be using the long format on keys based on some attacks that hack been found in the wild around short keys. PR-URL: https://github.com/nodejs/node/pull/9258 Reviewed-By: Johan Bergström Reviewed-By: James M Snell Reviewed-By: Rod Vagg --- tools/release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/release.sh b/tools/release.sh index 23b05b4fe8e1ef..9a3b881bd54e7d 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -50,7 +50,7 @@ elif [ $keycount -ne 1 ]; then done fi -gpgfing=$(gpg --fingerprint $gpgkey | grep 'Key fingerprint =' | awk -F' = ' '{print $2}' | tr -d ' ') +gpgfing=$(gpg --keyid-format 0xLONG --fingerprint $gpgkey | grep 'Key fingerprint =' | awk -F' = ' '{print $2}' | tr -d ' ') if ! test "$(grep $gpgfing README.md)"; then echo 'Error: this GPG key fingerprint is not listed in ./README.md' From 7dc875c08aa574b30b2bff0e315f40b60acb5b43 Mon Sep 17 00:00:00 2001 From: Jaideep Bajwa Date: Tue, 1 Nov 2016 02:53:37 -0400 Subject: [PATCH 003/145] v8: update make-v8.sh to use git google build tool gclient doesn't support svn anymore. Updating v8 build script to use git instead. PR-URL: https://github.com/nodejs/node/pull/9393 Reviewed By: Sakthipriyan Vairamani Reviewed-By: Ben Noordhuis Reviewed-By: Michael Dawson --- Makefile | 2 +- tools/make-v8.sh | 49 ++++++++++++++++++++++++++++-------------------- 2 files changed, 30 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 0773088c5ded87..a447d06e1cd55d 100644 --- a/Makefile +++ b/Makefile @@ -113,7 +113,7 @@ cctest: all @out/$(BUILDTYPE)/$@ v8: - tools/make-v8.sh v8 + tools/make-v8.sh $(MAKE) -C deps/v8 $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS) test: all diff --git a/tools/make-v8.sh b/tools/make-v8.sh index f6efb66a565d54..786171facf52cd 100755 --- a/tools/make-v8.sh +++ b/tools/make-v8.sh @@ -1,38 +1,47 @@ #!/bin/bash - -git_origin=$(git config --get remote.origin.url | sed 's/.\+[\/:]\([^\/]\+\/[^\/]\+\)$/\1/') -git_branch=$(git rev-parse --abbrev-ref HEAD) -v8ver=${1:-v8} #default v8 -svn_prefix=https://github.com -svn_path="$svn_prefix/$git_origin/branches/$git_branch/deps/$v8ver" -#svn_path="$git_origin/branches/$git_branch/deps/$v8ver" -gclient_string="solutions = [{'name': 'v8', 'url': '$svn_path', 'managed': False}]" +# Get V8 branch from v8/include/v8-version.h +MAJOR=$(grep V8_MAJOR_VERSION deps/v8/include/v8-version.h | cut -d ' ' -f 3) +MINOR=$(grep V8_MINOR_VERSION deps/v8/include/v8-version.h | cut -d ' ' -f 3) +BRANCH=$MAJOR.$MINOR # clean up if someone presses ctrl-c trap cleanup INT function cleanup() { trap - INT - rm .gclient || true rm .gclient_entries || true rm -rf _bad_scm/ || true - - #if v8ver isn't v8, move the v8 folders - #back to what they were - if [ "$v8ver" != "v8" ]; then - mv v8 $v8ver - mv .v8old v8 - fi + find v8 -name ".git" | xargs rm -rf || true + echo "git cleanup" + git reset --hard HEAD + git clean -fdq + # unstash local changes + git stash pop exit 0 } cd deps -echo $gclient_string > .gclient -if [ "$v8ver" != "v8" ]; then - mv v8 .v8old - mv $v8ver v8 +# stash local changes +git stash +rm -rf v8 + +echo "Fetching V8 from chromium.googlesource.com" +fetch v8 +if [ "$?" -ne 0 ]; then + echo "V8 fetch failed" + exit 1 fi +echo "V8 fetched" + +cd v8 + +echo "Checking out branch:$BRANCH" +git checkout remotes/branch-heads/$BRANCH + +echo "Sync dependencies" gclient sync + +cd .. cleanup From a643d3caedac67b4494d2e99e38419620bf7c5d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Wed, 12 Oct 2016 11:34:28 -0300 Subject: [PATCH 004/145] test: output tap13 instead of almost-tap Produce a tap13-compatible output which makes it simpler to parse. Output is still readable by the jenkins tap plugin. PR-URL: https://github.com/nodejs/node/pull/9262 Reviewed-By: Gibson Fahnestock Reviewed-By: Ben Noordhuis Reviewed-By: Myles Borins --- tools/test.py | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/tools/test.py b/tools/test.py index b543010990c364..05cd9243449d27 100755 --- a/tools/test.py +++ b/tools/test.py @@ -255,11 +255,15 @@ def HasRun(self, output): class TapProgressIndicator(SimpleProgressIndicator): - def _printDiagnostic(self, messages): - for l in messages.splitlines(): - logger.info('# ' + l) + def _printDiagnostic(self, traceback, severity): + logger.info(' severity: %s', severity) + logger.info(' stack: |-') + + for l in traceback.splitlines(): + logger.info(' ' + l) def Starting(self): + logger.info('TAP version 13') logger.info('1..%i' % len(self.cases)) self._done = 0 @@ -268,6 +272,8 @@ def AboutToRun(self, case): def HasRun(self, output): self._done += 1 + self.traceback = '' + self.severity = 'ok' # Print test name as (for example) "parallel/test-assert". Tests that are # scraped from the addons documentation are all named test.js, making it @@ -280,19 +286,23 @@ def HasRun(self, output): if output.UnexpectedOutput(): status_line = 'not ok %i %s' % (self._done, command) + self.severity = 'fail' + self.traceback = output.output.stdout + output.output.stderr + if FLAKY in output.test.outcomes and self.flaky_tests_mode == DONTCARE: status_line = status_line + ' # TODO : Fix flaky test' + self.severity = 'flaky' + logger.info(status_line) - self._printDiagnostic("\n".join(output.diagnostic)) if output.HasCrashed(): - self._printDiagnostic(PrintCrashed(output.output.exit_code)) + self.severity = 'crashed' + exit_code = output.output.exit_code + self.traceback = "oh no!\nexit code: " + PrintCrashed(exit_code) if output.HasTimedOut(): - self._printDiagnostic('TIMEOUT') + self.severity = 'fail' - self._printDiagnostic(output.output.stderr) - self._printDiagnostic(output.output.stdout) else: skip = skip_regex.search(output.output.stdout) if skip: @@ -303,7 +313,11 @@ def HasRun(self, output): if FLAKY in output.test.outcomes: status_line = status_line + ' # TODO : Fix flaky test' logger.info(status_line) - self._printDiagnostic("\n".join(output.diagnostic)) + + if output.diagnostic: + self.severity = 'ok' + self.traceback = output.diagnostic + duration = output.test.duration @@ -314,7 +328,12 @@ def HasRun(self, output): # duration_ms is measured in seconds and is read as such by TAP parsers. # It should read as "duration including ms" rather than "duration in ms" logger.info(' ---') - logger.info(' duration_ms: %d.%d' % (total_seconds, duration.microseconds / 1000)) + logger.info(' duration_ms: %d.%d' % + (total_seconds, duration.microseconds / 1000)) + if self.severity is not 'ok' or self.traceback is not '': + if output.HasTimedOut(): + self.traceback = 'timeout' + self._printDiagnostic(self.traceback, self.severity) logger.info(' ...') def Done(self): From 575fc4eca0b0e97e8629a378b00c85c37c8e4e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Tue, 25 Oct 2016 12:23:48 -0300 Subject: [PATCH 005/145] gtest: output tap comments as yamlish This makes yaml-ish parsers happy. Note: gtest still seems to output the expected/result slightly different making the full traceback less informational. PR-URL: https://github.com/nodejs/node/pull/9262 Reviewed-By: Gibson Fahnestock Reviewed-By: Ben Noordhuis Reviewed-By: Myles Borins --- deps/gtest/src/gtest.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/deps/gtest/src/gtest.cc b/deps/gtest/src/gtest.cc index 970c0976cb5acf..37f22d417e2303 100644 --- a/deps/gtest/src/gtest.cc +++ b/deps/gtest/src/gtest.cc @@ -3596,13 +3596,15 @@ void TapUnitTestResultPrinter::OutputTapTestInfo(int* count, *stream << " ---\n"; *stream << " duration_ms: " << FormatTimeInMillisAsSeconds(result.elapsed_time()) << "\n"; - *stream << " ...\n"; - for (int i = 0; i < result.total_part_count(); ++i) { - const TestPartResult& part = result.GetTestPartResult(i); - OutputTapComment(stream, part.message()); + if (result.total_part_count() > 0) { + *stream << " stack: |-\n"; + for (int i = 0; i < result.total_part_count(); ++i) { + const TestPartResult& part = result.GetTestPartResult(i); + OutputTapComment(stream, part.message()); + } } - + *stream << " ...\n"; *count += 1; } @@ -3610,11 +3612,11 @@ void TapUnitTestResultPrinter::OutputTapComment(::std::ostream* stream, const char* comment) { const char* start = comment; while (const char* end = strchr(start, '\n')) { - *stream << "# " << std::string(start, end) << "\n"; + *stream << " " << std::string(start, end) << "\n"; start = end + 1; } if (*start) - *stream << "# " << start << "\n"; + *stream << " " << start << "\n"; } // Formats the given time in milliseconds as seconds. From 4141c77a25fdc1f1564167f82e1e638582eb4401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bergstr=C3=B6m?= Date: Tue, 25 Oct 2016 13:26:46 -0300 Subject: [PATCH 006/145] gitignore: ignore all tap files We now have multiple tap producers; just ignore all files with the `.tap` extension. PR-URL: https://github.com/nodejs/node/pull/9262 Reviewed-By: Gibson Fahnestock Reviewed-By: Ben Noordhuis Reviewed-By: Myles Borins --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 509a5a66593eaa..b6790e116cd6b5 100644 --- a/.gitignore +++ b/.gitignore @@ -88,7 +88,7 @@ deps/npm/node_modules/.bin/ # test artifacts tools/faketime icu_config.gypi -test.tap +*.tap # Xcode workspaces and project folders *.xcodeproj From e2bb2a2550a82c9c83909b2de51ec8119602ec14 Mon Sep 17 00:00:00 2001 From: Evan Lucas Date: Wed, 28 Sep 2016 05:59:08 -0500 Subject: [PATCH 007/145] tools: fix release script on macOS 10.12 Previously, we were relying on the output of gpg from git tag -v to verify that the key selected by the releaser is the key that was used to sign the tag. This output can change depending on the version of git being used. Now, we just check that the output of git tag -v contains the key selected. Fixes: https://github.com/nodejs/node/issues/8822 PR-URL: https://github.com/nodejs/node/pull/8824 Reviewed-By: James M Snell Reviewed-By: Rod Vagg --- tools/release.sh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tools/release.sh b/tools/release.sh index 9a3b881bd54e7d..1151b6dd68d510 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -69,15 +69,8 @@ function sign { local version=$1 - gpgtagkey=$(git tag -v $version 2>&1 | grep 'key ID' | awk '{print $NF}') - - if [ "X${gpgtagkey}" == "X" ]; then - echo "Could not find signed tag for \"${version}\"" - exit 1 - fi - - if [ "${gpgtagkey}" != "${gpgkey}" ]; then - echo "GPG key for \"${version}\" tag is not yours, cannot sign" + if ! git tag -v $version 2>&1 | grep "${gpgkey}" | grep key > /dev/null; then + echo "Could not find signed tag for \"${version}\" or GPG key is not yours" exit 1 fi From 638ef094554de49688ecf40c5a5a5e64ffdf868a Mon Sep 17 00:00:00 2001 From: anu0012 Date: Tue, 18 Oct 2016 07:33:10 +0530 Subject: [PATCH 008/145] doc: fix typo in http.md PR-URL: https://github.com/nodejs/node/pull/9144 Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Brian White --- doc/api/http.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/http.md b/doc/api/http.md index d4c15f6c4ee01a..b3e3b3f96ff927 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -290,7 +290,7 @@ Emitted each time a server responds to a request with a `CONNECT` method. If thi event isn't being listened for, clients receiving a `CONNECT` method will have their connections closed. -A client server pair that show you how to listen for the `'connect'` event. +A client and server pair that shows you how to listen for the `'connect'` event: ```js const http = require('http'); From ec90f73e64f51df27082d40ce53e3b939c037a68 Mon Sep 17 00:00:00 2001 From: Emanuele DelBono Date: Thu, 27 Oct 2016 21:22:43 +0200 Subject: [PATCH 009/145] doc: reference signal(7) for the list of signals Fixes: https://github.com/nodejs/node/issues/9309 PR-URL: https://github.com/nodejs/node/pull/9323 Reviewed-By: Colin Ihrig Reviewed-By: Sam Roberts Reviewed-By: Brian White --- doc/api/process.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/process.md b/doc/api/process.md index cda3bb95438086..8fa8b34ac4868b 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -374,7 +374,7 @@ The `*-deprecation` command line flags only affect warnings that use the name Signal events will be emitted when the Node.js process receives a signal. Please -refer to sigaction(2) for a listing of standard POSIX signal names such as +refer to signal(7) for a listing of standard POSIX signal names such as `SIGINT`, `SIGHUP`, etc. The name of each event will be the uppercase common name for the signal (e.g. From 2ea5db92de7d92563f97830b4a10ce3d867a13d5 Mon Sep 17 00:00:00 2001 From: "Sakthipriyan Vairamani (thefourtheye)" Date: Wed, 2 Nov 2016 22:28:02 +0530 Subject: [PATCH 010/145] doc: do not link in the headings If there is a link in the headings, when the ToC is generated, that is not properly linked and the square brackets are left as they are. Even if we fix this, different parts of the heading will link to different sections or even different pages. For example, ### What makes [`Buffer.allocUnsafe()`] and [`Buffer.allocUnsafeSlow()`] "unsafe"? will point to three different sections. `allocUnsafe` and `allocUnsafeSlow` will link to their corresponding sections and all other words actually link to the heading in the document. This could be visually confusing. PR-URL: https://github.com/nodejs/node/pull/9416 Fixes: https://github.com/nodejs/node/issues/9331 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Minwoo Jung Reviewed-By: Roman Reiss Reviewed-By: Brian White --- doc/api/buffer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index ac2c1e1b6752f0..42390b6d31ba00 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -124,7 +124,7 @@ $ node --zero-fill-buffers ``` -### What makes [`Buffer.allocUnsafe()`] and [`Buffer.allocUnsafeSlow()`] "unsafe"? +### What makes `Buffer.allocUnsafe()` and `Buffer.allocUnsafeSlow()` "unsafe"? When calling [`Buffer.allocUnsafe()`] and [`Buffer.allocUnsafeSlow()`], the segment of allocated memory is *uninitialized* (it is not zeroed-out). While From d3128996e068be0a519cbc4dd60cf996b1ce72b8 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Sat, 10 Sep 2016 16:03:30 -0700 Subject: [PATCH 011/145] doc: revise http documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/8486 Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen Reviewed-By: Ilkka Myller Reviewed-By: James M Snell --- doc/api/http.md | 315 +++++++++++++++++++++++++-------------- tools/doc/type-parser.js | 7 +- 2 files changed, 206 insertions(+), 116 deletions(-) diff --git a/doc/api/http.md b/doc/api/http.md index b3e3b3f96ff927..608760f66534d1 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -52,7 +52,7 @@ The HTTP Agent is used for pooling sockets used in HTTP client requests. The HTTP Agent also defaults client requests to using -Connection:keep-alive. If no pending HTTP requests are waiting on a +`Connection: keep-alive`. If no pending HTTP requests are waiting on a socket to become free the socket is closed. This means that Node.js's pool has the benefit of keep-alive when under load but still does not require developers to manually close the HTTP clients using @@ -128,6 +128,11 @@ http.request(options, onResponseCallback); added: v0.11.4 --> +* `options` {Object} Options containing connection details. Check + [`net.createConnection()`][] for the format of the options +* `callback` {Function} Callback function that receives the created socket +* Returns: {net.Socket} + Produces a socket/stream to be used for HTTP requests. By default, this function is the same as [`net.createConnection()`][]. However, @@ -156,6 +161,8 @@ terminates them. added: v0.11.4 --> +* {Object} + An object which contains arrays of sockets currently awaiting use by the Agent when HTTP KeepAlive is used. Do not modify. @@ -164,24 +171,26 @@ the Agent when HTTP KeepAlive is used. Do not modify. added: v0.11.4 --> +* `options` {Object} A set of options providing information for name generation + * `host` {String} A domain name or IP address of the server to issue the request to + * `port` {Number} Port of remote server + * `localAddress` {String} Local interface to bind for network connections + when issuing the request +* Returns: {String} + Get a unique name for a set of request options, to determine whether a connection can be reused. In the http agent, this returns `host:port:localAddress`. In the https agent, the name includes the CA, cert, ciphers, and other HTTPS/TLS-specific options that determine socket reusability. -Options: - -- `host`: A domain name or IP address of the server to issue the request to. -- `port`: Port of remote server. -- `localAddress`: Local interface to bind for network connections when issuing - the request. - ### agent.maxFreeSockets +* {Number} + By default set to 256. For Agents supporting HTTP KeepAlive, this sets the maximum number of sockets that will be left open in the free state. @@ -191,6 +200,8 @@ state. added: v0.3.6 --> +* {Number} + By default set to Infinity. Determines how many concurrent sockets the agent can have open per origin. Origin is either a 'host:port' or 'host:port:localAddress' combination. @@ -200,6 +211,8 @@ can have open per origin. Origin is either a 'host:port' or added: v0.5.9 --> +* {Object} + An object which contains queues of requests that have not yet been assigned to sockets. Do not modify. @@ -208,6 +221,8 @@ sockets. Do not modify. added: v0.3.6 --> +* {Object} + An object which contains arrays of sockets currently in use by the Agent. Do not modify. @@ -250,8 +265,6 @@ The request implements the [Writable Stream][] interface. This is an added: v1.4.1 --> -`function () { }` - Emitted when the request has been aborted by the client. This event is only emitted on the first call to `abort()`. @@ -260,31 +273,17 @@ emitted on the first call to `abort()`. added: v0.3.8 --> -`function () { }` - Emitted when the request has been aborted by the server and the network socket has closed. -### Event: 'checkExpectation' - - -`function (request, response) { }` - -Emitted each time a request with an http Expect header is received, where the -value is not 100-continue. If this event isn't listened for, the server will -automatically respond with a 417 Expectation Failed as appropriate. - -Note that when this event is emitted and handled, the `request` event will -not be emitted. - ### Event: 'connect' -`function (response, socket, head) { }` +* `response` {http.IncomingMessage} +* `socket` {net.Socket} +* `head` {Buffer} Emitted each time a server responds to a request with a `CONNECT` method. If this event isn't being listened for, clients receiving a `CONNECT` method will have @@ -352,8 +351,6 @@ proxy.listen(1337, '127.0.0.1', () => { added: v0.3.2 --> -`function () { }` - Emitted when the server sends a '100 Continue' HTTP response, usually because the request contained 'Expect: 100-continue'. This is an instruction that the client should send the request body. @@ -363,17 +360,17 @@ the client should send the request body. added: v0.1.0 --> -`function (response) { }` +* `response` {http.IncomingMessage} Emitted when a response is received to this request. This event is emitted only -once. The `response` argument will be an instance of [`http.IncomingMessage`][]. +once. ### Event: 'socket' -`function (socket) { }` +* `socket` {net.Socket} Emitted after a socket is assigned to this request. @@ -382,7 +379,9 @@ Emitted after a socket is assigned to this request. added: v0.1.94 --> -`function (response, socket, head) { }` +* `response` {http.IncomingMessage} +* `socket` {net.Socket} +* `head` {Buffer} Emitted each time a server responds to a request with an upgrade. If this event isn't being listened for, clients receiving an upgrade header will have @@ -444,6 +443,10 @@ in the response to be dropped and the socket to be destroyed. added: v0.1.90 --> +* `data` {String | Buffer} +* `encoding` {String} +* `callback` {Function} + Finishes sending the request. If any parts of the body are unsent, it will flush them to the stream. If the request is chunked, this will send the terminating `'0\r\n\r\n'`. @@ -474,6 +477,8 @@ the optimization and kickstart the request. added: v0.5.9 --> +* `noDelay` {Boolean} + Once a socket is assigned to this request and is connected [`socket.setNoDelay()`][] will be called. @@ -482,6 +487,9 @@ Once a socket is assigned to this request and is connected added: v0.5.9 --> +* `enable` {Boolean} +* `initialDelay` {Number} + Once a socket is assigned to this request and is connected [`socket.setKeepAlive()`][] will be called. @@ -490,12 +498,12 @@ Once a socket is assigned to this request and is connected added: v0.5.9 --> -Once a socket is assigned to this request and is connected -[`socket.setTimeout()`][] will be called. - * `timeout` {Number} Milliseconds before a request is considered to be timed out. * `callback` {Function} Optional function to be called when a timeout occurs. Same as binding to the `timeout` event. +Once a socket is assigned to this request and is connected +[`socket.setTimeout()`][] will be called. + Returns `request`. ### request.write(chunk[, encoding][, callback]) @@ -503,14 +511,16 @@ Returns `request`. added: v0.1.29 --> +* `chunk` {String | Buffer} +* `encoding` {String} +* `callback` {Function} + Sends a chunk of the body. By calling this method many times, the user can stream a request body to a server--in that case it is suggested to use the `['Transfer-Encoding', 'chunked']` header line when creating the request. -The `chunk` argument should be a [`Buffer`][] or a string. - The `encoding` argument is optional and only applies when `chunk` is a string. Defaults to `'utf8'`. @@ -531,18 +541,34 @@ This class inherits from [`net.Server`][] and has the following additional even added: v0.3.0 --> -`function (request, response) { }` +* `request` {http.IncomingMessage} +* `response` {http.ServerResponse} -Emitted each time a request with an http Expect: 100-continue is received. +Emitted each time a request with an HTTP `Expect: 100-continue` is received. If this event isn't listened for, the server will automatically respond -with a 100 Continue as appropriate. +with a `100 Continue` as appropriate. Handling this event involves calling [`response.writeContinue()`][] if the client should continue to send the request body, or generating an appropriate HTTP response (e.g., 400 Bad Request) if the client should not continue to send the request body. -Note that when this event is emitted and handled, the `'request'` event will +Note that when this event is emitted and handled, the [`'request'`][] event will +not be emitted. + +### Event: 'checkExpectation' + + +* `request` {http.ClientRequest} +* `response` {http.ServerResponse} + +Emitted each time a request with an HTTP `Expect` header is received, where the +value is not `100-continue`. If this event isn't listened for, the server will +automatically respond with a `417 Expectation Failed` as appropriate. + +Note that when this event is emitted and handled, the [`'request'`][] event will not be emitted. ### Event: 'clientError' @@ -550,7 +576,8 @@ not be emitted. added: v0.1.94 --> -`function (exception, socket) { }` +* `exception` {Error} +* `socket` {net.Socket} If a client connection emits an `'error'` event, it will be forwarded here. Listener of this event is responsible for closing/destroying the underlying @@ -583,8 +610,6 @@ ensure the response is a properly formatted HTTP response message. added: v0.1.4 --> -`function () { }` - Emitted when the server closes. ### Event: 'connect' @@ -592,18 +617,15 @@ Emitted when the server closes. added: v0.7.0 --> -`function (request, socket, head) { }` +* `request` {http.IncomingMessage} Arguments for the HTTP request, as it is in + the [`'request'`][] event +* `socket` {net.Socket} Network socket between the server and client +* `head` {Buffer} The first packet of the tunneling stream (may be empty) -Emitted each time a client requests a http `CONNECT` method. If this event isn't +Emitted each time a client requests an HTTP `CONNECT` method. If this event isn't listened for, then clients requesting a `CONNECT` method will have their connections closed. -* `request` is the arguments for the http request, as it is in the request - event. -* `socket` is the network socket between the server and client. -* `head` is an instance of Buffer, the first packet of the tunneling stream, - this may be empty. - After this event is emitted, the request's socket will not have a `'data'` event listener, meaning you will need to bind to it in order to handle data sent to the server on that socket. @@ -613,7 +635,7 @@ sent to the server on that socket. added: v0.1.0 --> -`function (socket) { }` +* `socket` {net.Socket} When a new TCP stream is established. `socket` is an object of type [`net.Socket`][]. Usually users will not want to access this event. In @@ -626,30 +648,26 @@ accessed at `request.connection`. added: v0.1.0 --> -`function (request, response) { }` +* `request` {http.IncomingMessage} +* `response` {http.ServerResponse} Emitted each time there is a request. Note that there may be multiple requests per connection (in the case of keep-alive connections). - `request` is an instance of [`http.IncomingMessage`][] and `response` is -an instance of [`http.ServerResponse`][]. ### Event: 'upgrade' -`function (request, socket, head) { }` +* `request` {http.IncomingMessage} Arguments for the HTTP request, as it is in + the [`'request'`][] event +* `socket` {net.Socket} Network socket between the server and client +* `head` {Buffer} The first packet of the upgraded stream (may be empty) -Emitted each time a client requests a http upgrade. If this event isn't +Emitted each time a client requests an HTTP upgrade. If this event isn't listened for, then clients requesting an upgrade will have their connections closed. -* `request` is the arguments for the http request, as it is in the request - event. -* `socket` is the network socket between the server and client. -* `head` is an instance of Buffer, the first packet of the upgraded stream, - this may be empty. - After this event is emitted, the request's socket will not have a `'data'` event listener, meaning you will need to bind to it in order to handle data sent to the server on that socket. @@ -659,6 +677,8 @@ sent to the server on that socket. added: v0.1.90 --> +* `callback` {Function} + Stops the server from accepting new connections. See [`net.Server.close()`][]. ### server.listen(handle[, callback]) @@ -691,6 +711,9 @@ subsequent call will *re-open* the server using the provided options. added: v0.1.90 --> +* `path` {String} +* `callback` {Function} + Start a UNIX socket server listening for connections on the given `path`. This function is asynchronous. `callback` will be added as a listener for the @@ -704,6 +727,11 @@ subsequent call will *re-open* the server using the provided options. added: v0.1.90 --> +* `port` {Number} +* `hostname` {String} +* `backlog` {Number} +* `callback` {Function} + Begin accepting connections on the specified `port` and `hostname`. If the `hostname` is omitted, the server will accept connections on any IPv6 address (`::`) when IPv6 is available, or any IPv4 address (`0.0.0.0`) otherwise. @@ -713,7 +741,7 @@ after the `'listening'` event has been emitted. To listen to a unix socket, supply a filename instead of port and hostname. -Backlog is the maximum length of the queue of pending connections. +`backlog` is the maximum length of the queue of pending connections. The actual length will be determined by your OS through sysctl settings such as `tcp_max_syn_backlog` and `somaxconn` on linux. The default value of this parameter is 511 (not 512). @@ -729,6 +757,8 @@ subsequent call will *re-open* the server using the provided options. added: v5.7.0 --> +* {Boolean} + A Boolean indicating whether or not the server is listening for connections. @@ -737,6 +767,8 @@ connections. added: v0.7.0 --> +* {Number} + Limits maximum incoming headers count, equal to 1000 by default. If set to 0 - no limit will be applied. @@ -784,8 +816,8 @@ connections. added: v0.1.17 --> -This object is created internally by a HTTP server--not by the user. It is -passed as the second parameter to the `'request'` event. +This object is created internally by an HTTP server--not by the user. It is +passed as the second parameter to the [`'request'`][] event. The response implements, but does not inherit from, the [Writable Stream][] interface. This is an [`EventEmitter`][] with the following events: @@ -795,8 +827,6 @@ interface. This is an [`EventEmitter`][] with the following events: added: v0.6.7 --> -`function () { }` - Indicates that the underlying connection was terminated before [`response.end()`][] was called or able to flush. @@ -805,8 +835,6 @@ Indicates that the underlying connection was terminated before added: v0.3.6 --> -`function () { }` - Emitted when the response has been sent. More specifically, this event is emitted when the last segment of the response headers and body have been handed off to the operating system for transmission over the network. It @@ -819,6 +847,8 @@ After this event, no more events will be emitted on the response object. added: v0.3.0 --> +* `headers` {Object} + This method adds HTTP trailing headers (a header but at the end of the message) to the response. @@ -845,6 +875,10 @@ will result in a [`TypeError`][] being thrown. added: v0.1.90 --> +* `data` {String | Buffer} +* `encoding` {String} +* `callback` {Function} + This method signals to the server that all of the response headers and body have been sent; that server should consider this message complete. The method, `response.end()`, MUST be called on each response. @@ -860,6 +894,8 @@ is finished. added: v0.0.2 --> +* {Boolean} + Boolean value that indicates whether the response has completed. Starts as `false`. After [`response.end()`][] executes, the value will be `true`. @@ -868,6 +904,9 @@ as `false`. After [`response.end()`][] executes, the value will be `true`. added: v0.4.0 --> +* `name` {String} +* Returns: {String} + Reads out a header that's already been queued but not sent to the client. Note that the name is case insensitive. This can only be called before headers get implicitly flushed. @@ -883,6 +922,8 @@ var contentType = response.getHeader('content-type'); added: v0.9.3 --> +* {Boolean} + Boolean (read-only). True if headers were sent, false otherwise. ### response.removeHeader(name) @@ -890,6 +931,8 @@ Boolean (read-only). True if headers were sent, false otherwise. added: v0.4.0 --> +* `name` {String} + Removes a header that's queued for implicit sending. Example: @@ -903,6 +946,8 @@ response.removeHeader('Content-Encoding'); added: v0.7.5 --> +* {Boolean} + When true, the Date header will be automatically generated and sent in the response if it is not already present in the headers. Defaults to true. @@ -914,6 +959,9 @@ in responses. added: v0.4.0 --> +* `name` {String} +* `value` {String} + Sets a single header value for implicit headers. If this header already exists in the to-be-sent headers, its value will be replaced. Use an array of strings here if you need to send multiple headers with the same name. @@ -972,6 +1020,8 @@ Returns `response`. added: v0.4.0 --> +* {Number} + When using implicit headers (not calling [`response.writeHead()`][] explicitly), this property controls the status code that will be sent to the client when the headers get flushed. @@ -990,6 +1040,8 @@ status code which was sent out. added: v0.11.8 --> +* {String} + When using implicit headers (not calling [`response.writeHead()`][] explicitly), this property controls the status message that will be sent to the client when the headers get flushed. If this is left as `undefined` then the standard message for the status @@ -1009,6 +1061,11 @@ status message which was sent out. added: v0.1.29 --> +* `chunk` {String | Buffer} +* `encoding` {String} +* `callback` {Function} +* Returns: {Boolean} + If this method is called and [`response.writeHead()`][] has not been called, it will switch to implicit header mode and flush the implicit headers. @@ -1046,6 +1103,10 @@ the request body should be sent. See the [`'checkContinue'`][] event on `Server` added: v0.1.30 --> +* `statusCode` {Number} +* `statusMessage` {String} +* `headers` {Object} + Sends a response header to the request. The status code is a 3-digit HTTP status code, like `404`. The last argument, `headers`, are the response headers. Optionally one can give a human-readable `statusMessage` as the second @@ -1096,7 +1157,7 @@ added: v0.1.17 --> An `IncomingMessage` object is created by [`http.Server`][] or -[`http.ClientRequest`][] and passed as the first argument to the `'request'` +[`http.ClientRequest`][] and passed as the first argument to the [`'request'`][] and [`'response'`][] event respectively. It may be used to access response status, headers and data. @@ -1108,8 +1169,6 @@ following additional events, methods, and properties. added: v0.3.8 --> -`function () { }` - Emitted when the request has been aborted by the client and the network socket has closed. @@ -1118,8 +1177,6 @@ socket has closed. added: v0.4.2 --> -`function () { }` - Indicates that the underlying connection was closed. Just like `'end'`, this event occurs only once per response. @@ -1139,6 +1196,8 @@ to any listeners on the event. added: v0.1.5 --> +* {Object} + The request/response headers object. Key-value pairs of header names and values. Header names are lower-cased. @@ -1168,6 +1227,8 @@ header name: added: v0.1.1 --> +* {String} + In case of server request, the HTTP version sent by the client. In the case of client response, the HTTP version of the connected-to server. Probably either `'1.1'` or `'1.0'`. @@ -1180,6 +1241,8 @@ Also `message.httpVersionMajor` is the first integer and added: v0.1.1 --> +* {String} + **Only valid for request obtained from [`http.Server`][].** The request method as a string. Read only. Example: @@ -1190,6 +1253,8 @@ The request method as a string. Read only. Example: added: v0.11.6 --> +* {Array} + The raw request/response headers list exactly as they were received. Note that the keys and values are in the same list. It is *not* a @@ -1217,6 +1282,8 @@ console.log(request.rawHeaders); added: v0.11.6 --> +* {Array} + The raw request/response trailer keys and values exactly as they were received. Only populated at the `'end'` event. @@ -1237,6 +1304,8 @@ Returns `message`. added: v0.1.1 --> +* {Number} + **Only valid for response obtained from [`http.ClientRequest`][].** The 3-digit HTTP response status code. E.G. `404`. @@ -1246,6 +1315,8 @@ The 3-digit HTTP response status code. E.G. `404`. added: v0.11.10 --> +* {String} + **Only valid for response obtained from [`http.ClientRequest`][].** The HTTP response status message (reason phrase). E.G. `OK` or `Internal Server Error`. @@ -1255,6 +1326,8 @@ The HTTP response status message (reason phrase). E.G. `OK` or `Internal Server added: v0.3.0 --> +* {net.Socket} + The [`net.Socket`][] object associated with the connection. With HTTPS support, use [`request.socket.getPeerCertificate()`][] to obtain the @@ -1265,6 +1338,8 @@ client's authentication details. added: v0.3.0 --> +* {Object} + The request/response trailers object. Only populated at the `'end'` event. ### message.url @@ -1272,6 +1347,8 @@ The request/response trailers object. Only populated at the `'end'` event. added: v0.1.90 --> +* {String} + **Only valid for request obtained from [`http.Server`][].** Request URL string. This contains only the URL that is @@ -1354,16 +1431,22 @@ connected to. added: v0.1.13 --> +* Returns: {http.Server} + Returns a new instance of [`http.Server`][]. The `requestListener` is a function which is automatically -added to the `'request'` event. +added to the [`'request'`][] event. ## http.get(options[, callback]) +* `options` {Object} +* `callback` {Function} +* Returns: {http.ClientRequest} + Since most requests are GET requests without bodies, Node.js provides this convenience method. The only difference between this method and [`http.request()`][] is that it sets the method to GET and calls `req.end()` automatically. @@ -1385,7 +1468,9 @@ http.get('http://www.google.com/index.html', (res) => { added: v0.5.9 --> -Global instance of Agent which is used as the default for all http client +* {http.Agent} + +Global instance of Agent which is used as the default for all HTTP client requests. ## http.request(options[, callback]) @@ -1393,46 +1478,47 @@ requests. added: v0.3.6 --> +* `options` {Object} + * `protocol` {String} Protocol to use. Defaults to `'http:'`. + * `host` {String} A domain name or IP address of the server to issue the request to. + Defaults to `'localhost'`. + * `hostname` {String} Alias for `host`. To support [`url.parse()`][] `hostname` is + preferred over `host`. + * `family` {Number} IP address family to use when resolving `host` and `hostname`. + Valid values are `4` or `6`. When unspecified, both IP v4 and v6 will be + used. + * `port` {Number} Port of remote server. Defaults to 80. + * `localAddress` {String} Local interface to bind for network connections. + * `socketPath` {String} Unix Domain Socket (use one of host:port or socketPath). + * `method` {String} A string specifying the HTTP request method. Defaults to `'GET'`. + * `path` {String} Request path. Defaults to `'/'`. Should include query string if any. + E.G. `'/index.html?page=12'`. An exception is thrown when the request path + contains illegal characters. Currently, only spaces are rejected but that + may change in the future. + * `headers` {Object} An object containing request headers. + * `auth` {String} Basic authentication i.e. `'user:password'` to compute an + Authorization header. + * `agent` {String} Controls [`Agent`][] behavior. When an Agent is used request will + default to `Connection: keep-alive`. Possible values: + * `undefined` (default): use [`http.globalAgent`][] for this host and port. + * `Agent` object: explicitly use the passed in `Agent`. + * `false`: opts out of connection pooling with an Agent, defaults request to + `Connection: close`. + * `createConnection` {Function} A function that produces a socket/stream to use for the + request when the `agent` option is not used. This can be used to avoid + creating a custom Agent class just to override the default `createConnection` + function. See [`agent.createConnection()`][] for more details. + * `timeout` {Integer}: A number specifying the socket timeout in milliseconds. + This will set the timeout before the socket is connected. +* `callback` {Function} +* Returns: {http.ClientRequest} + Node.js maintains several connections per server to make HTTP requests. This function allows one to transparently issue requests. `options` can be an object or a string. If `options` is a string, it is automatically parsed with [`url.parse()`][]. -Options: - -- `protocol`: Protocol to use. Defaults to `'http:'`. -- `host`: A domain name or IP address of the server to issue the request to. - Defaults to `'localhost'`. -- `hostname`: Alias for `host`. To support [`url.parse()`][] `hostname` is - preferred over `host`. -- `family`: IP address family to use when resolving `host` and `hostname`. - Valid values are `4` or `6`. When unspecified, both IP v4 and v6 will be - used. -- `port`: Port of remote server. Defaults to 80. -- `localAddress`: Local interface to bind for network connections. -- `socketPath`: Unix Domain Socket (use one of host:port or socketPath). -- `method`: A string specifying the HTTP request method. Defaults to `'GET'`. -- `path`: Request path. Defaults to `'/'`. Should include query string if any. - E.G. `'/index.html?page=12'`. An exception is thrown when the request path - contains illegal characters. Currently, only spaces are rejected but that - may change in the future. -- `headers`: An object containing request headers. -- `auth`: Basic authentication i.e. `'user:password'` to compute an - Authorization header. -- `agent`: Controls [`Agent`][] behavior. When an Agent is used request will - default to `Connection: keep-alive`. Possible values: - - `undefined` (default): use [`http.globalAgent`][] for this host and port. - - `Agent` object: explicitly use the passed in `Agent`. - - `false`: opts out of connection pooling with an Agent, defaults request to - `Connection: close`. -- `createConnection`: A function that produces a socket/stream to use for the - request when the `agent` option is not used. This can be used to avoid - creating a custom Agent class just to override the default `createConnection` - function. See [`agent.createConnection()`][] for more details. -- `timeout`: A number specifying the socket timeout in milliseconds. - This will set the timeout before the socket is connected. - The optional `callback` parameter will be added as a one time listener for the [`'response'`][] event. @@ -1505,10 +1591,10 @@ There are a few special headers that should be noted. [`'checkContinue'`]: #http_event_checkcontinue [`'listening'`]: net.html#net_event_listening +[`'request'`]: #http_event_request [`'response'`]: #http_event_response [`Agent`]: #http_class_http_agent [`agent.createConnection()`]: #http_agent_createconnection_options_callback -[`Buffer`]: buffer.html#buffer_buffer [`destroy()`]: #http_agent_destroy [`EventEmitter`]: events.html#events_class_eventemitter [`http.Agent`]: #http_class_http_agent @@ -1517,7 +1603,6 @@ There are a few special headers that should be noted. [`http.IncomingMessage`]: #http_class_http_incomingmessage [`http.request()`]: #http_http_request_options_callback [`http.Server`]: #http_class_http_server -[`http.ServerResponse`]: #http_class_http_serverresponse [`message.headers`]: #http_message_headers [`net.createConnection()`]: net.html#net_net_createconnection_options_connectlistener [`net.Server`]: net.html#net_class_net_server diff --git a/tools/doc/type-parser.js b/tools/doc/type-parser.js index d8141dc4fd5edf..38451b0e16b358 100644 --- a/tools/doc/type-parser.js +++ b/tools/doc/type-parser.js @@ -31,7 +31,12 @@ const typeMap = { 'net.Socket': 'net.html#net_class_net_socket', 'tls.TLSSocket': 'tls.html#tls_class_tls_tlssocket', 'EventEmitter': 'events.html#events_class_eventemitter', - 'Timer': 'timers.html#timers_timers' + 'Timer': 'timers.html#timers_timers', + 'http.Agent': 'http.html#http_class_http_agent', + 'http.ClientRequest': 'http.html#http_class_http_clientrequest', + 'http.IncomingMessage': 'http.html#http_class_http_incomingmessage', + 'http.Server': 'http.html#http_class_http_server', + 'http.ServerResponse': 'http.html#http_class_http_serverresponse', }; module.exports = { From 0e37a6a2ce0ef453cd7af5d643390297a3137d6d Mon Sep 17 00:00:00 2001 From: Miguel Angel Asencio Hurtado Date: Tue, 11 Oct 2016 10:19:16 +0200 Subject: [PATCH 012/145] src: fix typo rval to value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rval never existed, it was added as that in 077f9d7293468ad5446b330999fe47bc40e47571 Fixes: https://github.com/nodejs/node/issues/9001 PR-URL: https://github.com/nodejs/node/pull/9023 Reviewed-By: James M Snell Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Colin Ihrig Reviewed-By: Michaël Zasso Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen Reviewed-By: Franziska Hinkelmann --- src/node.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node.cc b/src/node.cc index bb3a1982d01a78..bc33847e6d8674 100644 --- a/src/node.cc +++ b/src/node.cc @@ -2763,7 +2763,7 @@ static void EnvSetter(Local property, SetEnvironmentVariableW(key_ptr, reinterpret_cast(*val)); } #endif - // Whether it worked or not, always return rval. + // Whether it worked or not, always return value. info.GetReturnValue().Set(value); } From 70eadea8e1b326550c2dee8ca5d1216fe39ec670 Mon Sep 17 00:00:00 2001 From: Evan Lucas Date: Tue, 16 Aug 2016 07:55:36 -0500 Subject: [PATCH 013/145] doc: fix broken links in changelogs Some commit links in the changelogs were pointing to incorrect/missing shas. PR-URL: https://github.com/nodejs/node/pull/8122 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- doc/changelogs/CHANGELOG_ARCHIVE.md | 32 ++++++++++---------- doc/changelogs/CHANGELOG_IOJS.md | 8 ++--- doc/changelogs/CHANGELOG_V4.md | 2 +- doc/changelogs/CHANGELOG_V5.md | 46 ++++++++++++++--------------- 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/doc/changelogs/CHANGELOG_ARCHIVE.md b/doc/changelogs/CHANGELOG_ARCHIVE.md index 8936902f4997d1..76a5ccfea88afb 100644 --- a/doc/changelogs/CHANGELOG_ARCHIVE.md +++ b/doc/changelogs/CHANGELOG_ARCHIVE.md @@ -1041,7 +1041,7 @@ https://github.com/nodejs/node/commit/fdf91afb494a7a2fff2913d817f589c191a2c88f ## 2012.10.25, Version 0.8.14 (Stable) -https://github.com/nodejs/node/commit/b00527fcf05c3d9f https://github.com/nodejs/node/commit/b5d5d790f9472906a59fe218 +https://github.com/nodejs/node/commit/b00527fcf05c3d9f * events: Don't clobber pre-existing _events obj in EE ctor (isaacs) @@ -1339,7 +1339,7 @@ https://github.com/nodejs/node/commit/a72120190a8ffdbcd3d6ad2a2e6ceecd2087111e ## 2012.06.15, Version 0.7.11 (unstable) -https://github.com/nodejs/node/commit/5cfe0b86d5be266ef51bbba369c39e412ee51944 +https://github.com/nodejs/node/commit/1f93aa5d5d207e8bd739d365dbf9ad6dbcc69571 * V8: Upgrade to v3.11.10 * npm: Upgrade to 1.1.26 @@ -1362,7 +1362,7 @@ https://github.com/nodejs/node/commit/5cfe0b86d5be266ef51bbba369c39e412ee51944 ## 2012.06.11, Version 0.7.10 (unstable) -https://github.com/nodejs/node/commit/12a32a48a30182621b3f8e9b9695d1946b53c131 +https://github.com/nodejs/node/commit/8d9766a9dfb1eea901219d2a865ce9300fe4d68e * Roll V8 back to 3.9.24.31 * build: x64 target should always pass -m64 (Robert Mustacchi) @@ -1542,7 +1542,7 @@ https://github.com/nodejs/node/commit/99059aad8d654acda4abcfaa68df182b50f2ec90 ## 2012.02.01, Version 0.7.2 (unstable) -https://github.com/nodejs/node/commit/ec79acb3a6166e30f0bf271fbbfda1fb575b3321 +https://github.com/nodejs/node/commit/a3efcd2006614c3835c9395b91ab89c1f260806c * Update V8 to 3.8.9 * Support for sharing streams across Isolates (Igor Zinkovsky) @@ -3460,7 +3460,7 @@ https://github.com/nodejs/node/commit/eca2de73ed786b935507fd1c6faccd8df9938fd3 ## 2009.10.09, Version 0.1.14 -https://github.com/nodejs/node/commit/b12c809bb84d1265b6a4d970a5b54ee8a4890513 +https://github.com/nodejs/node/commit/d79b6e9f7ffad4c6aabbe5bd89108e2005366469 * Feature: Improved addon builds with node-waf * Feature: node.SignalHandler (Brandon Beacher) @@ -3483,7 +3483,7 @@ https://github.com/nodejs/node/commit/b12c809bb84d1265b6a4d970a5b54ee8a4890513 ## 2009.09.30, Version 0.1.13 -https://github.com/nodejs/node/commit/58493bb05b3da3dc8051fabc0bdea9e575c1a107 +https://github.com/nodejs/node/commit/9c9d67eb6ce1162c8da05ff59624f6c3ade19bf7 * Feature: Multipart stream parser (Felix Geisendörfer) * API: Move node.puts(), node.exec() and others to /utils.js @@ -3563,15 +3563,15 @@ https://github.com/nodejs/node/commit/12bb0d46ce761e3d00a27170e63b40408c15b558 ## 2009.09.05, Version 0.1.9 -https://github.com/nodejs/node/commit/d029764bb32058389ecb31ed54a5d24d2915ad4c +https://github.com/nodejs/node/commit/ba6c5e38d54de30adfce69a21bafc81c35b07a03 * Bugfix: Compile on Snow Leopard. * Bugfix: Malformed URIs raising exceptions. - + ## 2009.09.04, Version 0.1.8 -https://github.com/nodejs/node/commit/e6d712a937b61567e81b15085edba863be16ba96 +https://github.com/nodejs/node/commit/734e86b9e568de5f694ae290a2b5c9395b70937c * Feature: External modules * Feature: setTimeout() for node.tcp.Connection @@ -3590,7 +3590,7 @@ https://github.com/nodejs/node/commit/e6d712a937b61567e81b15085edba863be16ba96 ## 2009.08.27, Version 0.1.7 -https://github.com/nodejs/node/commit/f7acef9acf8ba8433d697ad5ed99d2e857387e4b +https://github.com/nodejs/node/commit/31db4f1ed837f3835937f60d31368bdb31998386 * Feature: global 'process' object. Emits "exit". * Feature: promise.wait() @@ -3622,7 +3622,7 @@ https://github.com/nodejs/node/commit/9c97b1db3099d61cd292aa59ec2227a619f3a7ab ## 2009.08.21, Version 0.1.5 -https://github.com/nodejs/node/commit/b0fd3e281cb5f7cd8d3a26bd2b89e1b59998e5ed +https://github.com/nodejs/node/commit/a73998d6f491227e595524dc70589369fb458224 * Bugfix: Buggy connections could crash node.js. Now check connection before sending data every time (Kevin van Zonneveld) @@ -3659,7 +3659,7 @@ https://github.com/nodejs/node/commit/0f888ed6de153f68c17005211d7e0f960a5e34f3 ## 2009.08.06, Version 0.1.3 -https://github.com/nodejs/node/commit/695f0296e35b30cf8322fd1bd934810403cca9f3 +https://github.com/nodejs/node/commit/7464d423103b96c400d6875d390c19b637532ebf * Upgrade v8 to 1.3.2 * Bugfix: node.http.ServerRequest.setBodyEncoding('ascii') not @@ -3677,7 +3677,7 @@ https://github.com/nodejs/node/commit/695f0296e35b30cf8322fd1bd934810403cca9f3 ## 2009.08.01, Version 0.1.2 -https://github.com/nodejs/node/commit/025a34244d1cea94d6d40ad7bf92671cb909a96c +https://github.com/nodejs/node/commit/e10fbab00fd8325a7d05d1f854292143b8361e1f * Add DNS API * node.tcp.Server's backlog option is now an argument to listen() @@ -3725,7 +3725,7 @@ https://github.com/nodejs/node/commit/77d407df2826b20e9177c26c0d2bb4481e497937 ## 2009.06.30, Version 0.1.0 -https://github.com/nodejs/node/commit/0fe44d52fe75f151bceb59534394658aae6ac328 +https://github.com/nodejs/node/commit/813b53938b40484f63e7324c030e33711f26a149 * Update documentation, use asciidoc. * EventEmitter and Promise interfaces. (Breaks previous API.) @@ -3757,7 +3757,7 @@ https://github.com/nodejs/node/commit/fbe0be19ebfb422d8fa20ea5204c1713e9214d5f ## 2009.06.18, Version 0.0.5 -https://github.com/nodejs/node/commit/3a2b41de74b6c343b8464a68eff04c4bfd9aebea +https://github.com/nodejs/node/commit/ec5f3dbae11ed121d24744861a8fce55636ecd66 * Support for IPv6 * Remove namespace node.constants @@ -3786,7 +3786,7 @@ https://github.com/nodejs/node/commit/916b9ca715b229b0703f0ed6c2fc065410fb189c ## 2009.06.11, Version 0.0.3 -https://github.com/nodejs/node/commit/6e0dfe50006ae4f5dac987f055e0c9338662f40a +https://github.com/nodejs/node/commit/4cfc982c776475eb65fb1080e6b575a86505a347 * Many bug fixes including the problem with http.Client on macintosh diff --git a/doc/changelogs/CHANGELOG_IOJS.md b/doc/changelogs/CHANGELOG_IOJS.md index bef00e45a296ab..a06e0adb5d9716 100644 --- a/doc/changelogs/CHANGELOG_IOJS.md +++ b/doc/changelogs/CHANGELOG_IOJS.md @@ -663,8 +663,8 @@ See https://github.com/nodejs/node/labels/confirmed-bug for complete and current ### Commits -* [[`52b1230628`](https://github.com/nodejs/node/commit/52b1230628)] - **deps**: update deps/openssl/conf/arch/*/opensslconf.h (Shigeki Ohtsu) [#2141](https://github.com/nodejs/node/pull/2141) -* [[`20ff1e2ecb`](https://github.com/nodejs/node/commit/20ff1e2ecb)] - **deps**: upgrade openssl sources to 1.0.2d (Shigeki Ohtsu) [#2141](https://github.com/nodejs/node/pull/2141) +* [[`c70e68fa32`](https://github.com/nodejs/node/commit/c70e68fa32)] - **deps**: update deps/openssl/conf/arch/*/opensslconf.h (Shigeki Ohtsu) [#2141](https://github.com/nodejs/node/pull/2141) +* [[`ca93f7f2e6`](https://github.com/nodejs/node/commit/ca93f7f2e6)] - **deps**: upgrade openssl sources to 1.0.2d (Shigeki Ohtsu) [#2141](https://github.com/nodejs/node/pull/2141) @@ -1359,7 +1359,7 @@ See https://github.com/nodejs/node/labels/confirmed-bug for complete and current * [[`2e2fce0502`](https://github.com/nodejs/node/commit/2e2fce0502)] - **repl**: fix persistent history and env variable name (Roman Reiss) [#1593](https://github.com/nodejs/node/pull/1593) * [[`ea5195ccaf`](https://github.com/nodejs/node/commit/ea5195ccaf)] - **repl**: do not save history for non-terminal repl (Fedor Indutny) [#1575](https://github.com/nodejs/node/pull/1575) * [[`0450ce7db2`](https://github.com/nodejs/node/commit/0450ce7db2)] - **repl**: add mode detection, cli persistent history (Chris Dickinson) [#1513](https://github.com/nodejs/node/pull/1513) -* [[`af9fe3bbc7`](https://github.com/nodejs/node/commit/af9fe3bbc7)] - **(SEMVER-MAJOR)** **src**: bump NODE_MODULE_VERSION due to V8 API (Rod Vagg) [#1532](https://github.com/nodejs/node/pull/1532) +* [[`c1b9913e1f`](https://github.com/nodejs/node/commit/c1b9913e1f)] - **(SEMVER-MAJOR)** **src**: bump NODE_MODULE_VERSION due to V8 API (Rod Vagg) [#1532](https://github.com/nodejs/node/pull/1532) * [[`279f6116aa`](https://github.com/nodejs/node/commit/279f6116aa)] - **src**: fix -Wmissing-field-initializers warning (Ben Noordhuis) [#1606](https://github.com/nodejs/node/pull/1606) * [[`73062521a4`](https://github.com/nodejs/node/commit/73062521a4)] - **src**: deprecate smalloc public functions (Ben Noordhuis) [#1565](https://github.com/nodejs/node/pull/1565) * [[`ccb199af17`](https://github.com/nodejs/node/commit/ccb199af17)] - **src**: fix deprecation warnings (Ben Noordhuis) [#1565](https://github.com/nodejs/node/pull/1565) @@ -1443,7 +1443,7 @@ will be removed at a later point. (Roman Reiss) [#1363](https://github.com/nodej ### Commits * [[`53ed89d927`](https://github.com/nodejs/node/commit/53ed89d927)] - ***Revert*** "**build**: use %PYTHON% instead of python" (Rod Vagg) [#1475](https://github.com/nodejs/node/pull/1475) -* [[`2b744b0ab7`](https://github.com/nodejs/node/commit/2b744b0ab7)] - **src**: revert NODE_MODULE_VERSION to 43 (Chris Dickinson) [#1460](https://github.com/nodejs/node/pull/1460) +* [[`f23b96352b`](https://github.com/nodejs/node/commit/f23b96352b)] - **src**: revert NODE_MODULE_VERSION to 43 (Chris Dickinson) [#1460](https://github.com/nodejs/node/pull/1460) * [[`431673ebd1`](https://github.com/nodejs/node/commit/431673ebd1)] - **buffer**: fast-case for empty string in byteLength (Jackson Tian) [#1441](https://github.com/nodejs/node/pull/1441) * [[`1b22bad35f`](https://github.com/nodejs/node/commit/1b22bad35f)] - **build**: fix logic for shared library flags (Jeremiah Senkpiel) [#1454](https://github.com/nodejs/node/pull/1454) * [[`91943a99d5`](https://github.com/nodejs/node/commit/91943a99d5)] - **build**: use %PYTHON% instead of python (Rod Vagg) [#1444](https://github.com/nodejs/node/pull/1444) diff --git a/doc/changelogs/CHANGELOG_V4.md b/doc/changelogs/CHANGELOG_V4.md index 4290d3be4eb2cc..f1a88a4115db2e 100644 --- a/doc/changelogs/CHANGELOG_V4.md +++ b/doc/changelogs/CHANGELOG_V4.md @@ -1216,7 +1216,7 @@ Maintenance update. * [[`1e1173fc5c`](https://github.com/nodejs/node/commit/1e1173fc5c)] - **configure**: respect CC_host in host arch detection (João Reis) [#4117](https://github.com/nodejs/node/pull/4117) * [[`2e9b886fbf`](https://github.com/nodejs/node/commit/2e9b886fbf)] - **crypto**: DSA parameter validation in FIPS mode (Stefan Budeanu) [#3756](https://github.com/nodejs/node/pull/3756) * [[`00b77d9e84`](https://github.com/nodejs/node/commit/00b77d9e84)] - **crypto**: Improve error checking and reporting (Stefan Budeanu) [#3753](https://github.com/nodejs/node/pull/3753) -* [[`3dd90ddc73`](https://github.com/nodejs/node/commit/3dd90ddc73)] - **deps**: upgrade to npm 2.14.12 (Kat Marchán) [#4110](https://github.com/nodejs/node/pull/4110) +* [[`810f76e440`](https://github.com/nodejs/node/commit/810f76e440)] - **deps**: upgrade to npm 2.14.12 (Kat Marchán) [#4110](https://github.com/nodejs/node/pull/4110) * [[`51ae8d10b3`](https://github.com/nodejs/node/commit/51ae8d10b3)] - **deps**: Updated node LICENSE file with new npm license (Kat Marchán) [#4110](https://github.com/nodejs/node/pull/4110) * [[`9e1edead22`](https://github.com/nodejs/node/commit/9e1edead22)] - **deps**: backport 819b40a from V8 upstream (Michaël Zasso) [#3938](https://github.com/nodejs/node/pull/3938) * [[`a2ce3843cc`](https://github.com/nodejs/node/commit/a2ce3843cc)] - **deps**: upgrade npm to 2.14.9 (Forrest L Norvell) [#3686](https://github.com/nodejs/node/pull/3686) diff --git a/doc/changelogs/CHANGELOG_V5.md b/doc/changelogs/CHANGELOG_V5.md index 59a9e7949f409b..9c2834d4ab5133 100644 --- a/doc/changelogs/CHANGELOG_V5.md +++ b/doc/changelogs/CHANGELOG_V5.md @@ -266,7 +266,7 @@ around June 2016. Users of v5 should upgrade to [Node.js v6](CHANGELOG_V6.md). * [[`5ee5fa292f`](https://github.com/nodejs/node/commit/5ee5fa292f)] - **build**: add missing `openssl_fips%` to common.gypi (Fedor Indutny) [#5919](https://github.com/nodejs/node/pull/5919) * [[`5681ffecf7`](https://github.com/nodejs/node/commit/5681ffecf7)] - **build**: enable compilation for linuxOne (Michael Dawson) [#5941](https://github.com/nodejs/node/pull/5941) * [[`660ec9f889`](https://github.com/nodejs/node/commit/660ec9f889)] - **child_process**: refactor self=this in socket_list (Benjamin Gruenbaum) [#5860](https://github.com/nodejs/node/pull/5860) -* [[`e1a012f277`](https://github.com/nodejs/node/commit/e1a012f277)] - **deps**: upgrade npm to 3.8.3 (Forrest L Norvell) +* [[`0928584444`](https://github.com/nodejs/node/commit/0928584444)] - **deps**: upgrade npm to 3.8.3 (Forrest L Norvell) * [[`ec1813199d`](https://github.com/nodejs/node/commit/ec1813199d)] - **deps**: backport 8d00c2c from v8 upstream (Ben Noordhuis) [#5577](https://github.com/nodejs/node/pull/5577) * [[`2a5c6d7006`](https://github.com/nodejs/node/commit/2a5c6d7006)] - **dns**: Refactor forEach to map (Benjamin Gruenbaum) [#5803](https://github.com/nodejs/node/pull/5803) * [[`6a6112a2f3`](https://github.com/nodejs/node/commit/6a6112a2f3)] - **dns**: Use object without protoype for map (Benjamin Gruenbaum) [#5843](https://github.com/nodejs/node/pull/5843) @@ -278,25 +278,25 @@ around June 2016. Users of v5 should upgrade to [Node.js v6](CHANGELOG_V6.md). * [[`8e790b7a0c`](https://github.com/nodejs/node/commit/8e790b7a0c)] - **doc**: add instructions to only sign a release (Jeremiah Senkpiel) [#5876](https://github.com/nodejs/node/pull/5876) * [[`f1f9aff855`](https://github.com/nodejs/node/commit/f1f9aff855)] - **doc**: fix doc for Buffer.readInt32LE() (ghaiklor) [#5890](https://github.com/nodejs/node/pull/5890) * [[`731f7b8055`](https://github.com/nodejs/node/commit/731f7b8055)] - **etw**: fix descriptors of events 9 and 23 (João Reis) [#5742](https://github.com/nodejs/node/pull/5742) -* [[`aac9ead379`](https://github.com/nodejs/node/commit/aac9ead379)] - **etw,build**: always generate .rc and .h files (João Reis) [#5657](https://github.com/nodejs/node/pull/5657) +* [[`ccd81889fa`](https://github.com/nodejs/node/commit/ccd81889fa)] - **etw,build**: always generate .rc and .h files (João Reis) [#5657](https://github.com/nodejs/node/pull/5657) * [[`80155d398c`](https://github.com/nodejs/node/commit/80155d398c)] - **(SEMVER-MINOR)** **fs**: add the fs.mkdtemp() function. (Florian MARGAINE) [#5333](https://github.com/nodejs/node/pull/5333) -* [[`ae15d68ad1`](https://github.com/nodejs/node/commit/ae15d68ad1)] - **governance**: remove target size for CTC (Rich Trott) [#5879](https://github.com/nodejs/node/pull/5879) +* [[`bb28770aa1`](https://github.com/nodejs/node/commit/bb28770aa1)] - **governance**: remove target size for CTC (Rich Trott) [#5879](https://github.com/nodejs/node/pull/5879) * [[`63c601bc15`](https://github.com/nodejs/node/commit/63c601bc15)] - **http**: speed up checkIsHttpToken (Jackson Tian) [#4790](https://github.com/nodejs/node/pull/4790) -* [[`40847b0b8b`](https://github.com/nodejs/node/commit/40847b0b8b)] - **lib**: rename /node.js to /bootstrap_node.js (Jeremiah Senkpiel) [#5103](https://github.com/nodejs/node/pull/5103) -* [[`e644eb3d69`](https://github.com/nodejs/node/commit/e644eb3d69)] - **lib**: refactor code with startsWith/endsWith (Jackson Tian) [#5753](https://github.com/nodejs/node/pull/5753) -* [[`a757e0583c`](https://github.com/nodejs/node/commit/a757e0583c)] - **lib,src**: move src/node.js to lib/internal/node.js (Jeremiah Senkpiel) [#5103](https://github.com/nodejs/node/pull/5103) -* [[`e3c7b46326`](https://github.com/nodejs/node/commit/e3c7b46326)] - **lib,src**: refactor src/node.js into internal files (Jeremiah Senkpiel) [#5103](https://github.com/nodejs/node/pull/5103) +* [[`ec6af31eba`](https://github.com/nodejs/node/commit/ec6af31eba)] - **lib**: rename /node.js to /bootstrap_node.js (Jeremiah Senkpiel) [#5103](https://github.com/nodejs/node/pull/5103) +* [[`91466b855f`](https://github.com/nodejs/node/commit/91466b855f)] - **lib**: refactor code with startsWith/endsWith (Jackson Tian) [#5753](https://github.com/nodejs/node/pull/5753) +* [[`4bf2acaa1e`](https://github.com/nodejs/node/commit/4bf2acaa1e)] - **lib,src**: move src/node.js to lib/internal/node.js (Jeremiah Senkpiel) [#5103](https://github.com/nodejs/node/pull/5103) +* [[`015cef25eb`](https://github.com/nodejs/node/commit/015cef25eb)] - **lib,src**: refactor src/node.js into internal files (Jeremiah Senkpiel) [#5103](https://github.com/nodejs/node/pull/5103) * [[`b07bc5d996`](https://github.com/nodejs/node/commit/b07bc5d996)] - **(SEMVER-MINOR)** **net**: emit host in lookup event (HUANG Wei) [#5598](https://github.com/nodejs/node/pull/5598) -* [[`2fa959be15`](https://github.com/nodejs/node/commit/2fa959be15)] - **(SEMVER-MINOR)** **node**: --no-browser-globals configure flag (Fedor Indutny) [#5853](https://github.com/nodejs/node/pull/5853) +* [[`8363ede855`](https://github.com/nodejs/node/commit/8363ede855)] - **(SEMVER-MINOR)** **node**: --no-browser-globals configure flag (Fedor Indutny) [#5853](https://github.com/nodejs/node/pull/5853) * [[`a2ad21645f`](https://github.com/nodejs/node/commit/a2ad21645f)] - **querystring**: don't stringify bad surrogate pair (Brian White) [#5858](https://github.com/nodejs/node/pull/5858) * [[`427173204e`](https://github.com/nodejs/node/commit/427173204e)] - **(SEMVER-MINOR)** **repl**: support standalone blocks (Prince J Wesley) [#5581](https://github.com/nodejs/node/pull/5581) -* [[`d044898495`](https://github.com/nodejs/node/commit/d044898495)] - **src**: Add missing `using v8::MaybeLocal` (Anna Henningsen) [#5974](https://github.com/nodejs/node/pull/5974) +* [[`bfd723f3ba`](https://github.com/nodejs/node/commit/bfd723f3ba)] - **src**: Add missing `using v8::MaybeLocal` (Anna Henningsen) [#5974](https://github.com/nodejs/node/pull/5974) * [[`0d0c57ff5e`](https://github.com/nodejs/node/commit/0d0c57ff5e)] - **(SEMVER-MINOR)** **src**: override v8 thread defaults using cli options (Tom Gallacher) [#4344](https://github.com/nodejs/node/pull/4344) * [[`f9d0166291`](https://github.com/nodejs/node/commit/f9d0166291)] - **src**: reword command and add ternary (Trevor Norris) [#5756](https://github.com/nodejs/node/pull/5756) * [[`f1488bb24c`](https://github.com/nodejs/node/commit/f1488bb24c)] - **src,http_parser**: remove KickNextTick call (Trevor Norris) [#5756](https://github.com/nodejs/node/pull/5756) -* [[`8e8768ecbb`](https://github.com/nodejs/node/commit/8e8768ecbb)] - **test**: add known_issues test for GH-2148 (Rich Trott) [#5920](https://github.com/nodejs/node/pull/5920) -* [[`bf94b5a1b9`](https://github.com/nodejs/node/commit/bf94b5a1b9)] - **test**: mitigate flaky test-https-agent (Rich Trott) [#5939](https://github.com/nodejs/node/pull/5939) -* [[`2192528326`](https://github.com/nodejs/node/commit/2192528326)] - **test**: fix flaky test-repl (Brian White) [#5914](https://github.com/nodejs/node/pull/5914) +* [[`c5c7ae8e14`](https://github.com/nodejs/node/commit/c5c7ae8e14)] - **test**: add known_issues test for GH-2148 (Rich Trott) [#5920](https://github.com/nodejs/node/pull/5920) +* [[`6113f6af45`](https://github.com/nodejs/node/commit/6113f6af45)] - **test**: mitigate flaky test-https-agent (Rich Trott) [#5939](https://github.com/nodejs/node/pull/5939) +* [[`0acca7654f`](https://github.com/nodejs/node/commit/0acca7654f)] - **test**: fix flaky test-repl (Brian White) [#5914](https://github.com/nodejs/node/pull/5914) * [[`aebe6245b7`](https://github.com/nodejs/node/commit/aebe6245b7)] - **test**: add test for piping large input from stdin (Anna Henningsen) [#5949](https://github.com/nodejs/node/pull/5949) * [[`a19de97d2f`](https://github.com/nodejs/node/commit/a19de97d2f)] - **test**: remove the use of curl in the test suite (Santiago Gimeno) [#5750](https://github.com/nodejs/node/pull/5750) * [[`6928a17aa3`](https://github.com/nodejs/node/commit/6928a17aa3)] - **test**: exclude new fs watch test for AIX (Michael Dawson) [#5937](https://github.com/nodejs/node/pull/5937) @@ -748,7 +748,7 @@ This is an important security release. All Node.js users should consult the secu * [[`0d4b538175`](https://github.com/nodejs/node/commit/0d4b538175)] - **crypto**: use SSL_CTX_clear_extra_chain_certs. (Adam Langley) [#4919](https://github.com/nodejs/node/pull/4919) * [[`abb0f6cd53`](https://github.com/nodejs/node/commit/abb0f6cd53)] - **crypto**: fix build when OCSP-stapling not provided (Adam Langley) [#4914](https://github.com/nodejs/node/pull/4914) * [[`755619c554`](https://github.com/nodejs/node/commit/755619c554)] - **crypto**: use a const SSL_CIPHER (Adam Langley) [#4913](https://github.com/nodejs/node/pull/4913) -* [[`d5d2f86f89`](https://github.com/nodejs/node/commit/d5d2f86f89)] - **(SEMVER-MINOR)** **deps**: update http-parser to version 2.6.1 (James M Snell) +* [[`4f4c8ab3b4`](https://github.com/nodejs/node/commit/4f4c8ab3b4)] - **(SEMVER-MINOR)** **deps**: update http-parser to version 2.6.1 (James M Snell) * [[`f0bd176d6d`](https://github.com/nodejs/node/commit/f0bd176d6d)] - **deps**: reapply c-ares floating patch (Ben Noordhuis) [#5090](https://github.com/nodejs/node/pull/5090) * [[`f1a0827417`](https://github.com/nodejs/node/commit/f1a0827417)] - **deps**: sync with upstream bagder/c-ares@2bae2d5 (Fedor Indutny) [#5090](https://github.com/nodejs/node/pull/5090) * [[`cbf36de8f1`](https://github.com/nodejs/node/commit/cbf36de8f1)] - **deps**: upgrade npm to 3.6.0 (Rebecca Turner) [#4958](https://github.com/nodejs/node/pull/4958) @@ -805,7 +805,7 @@ This is an important security release. All Node.js users should consult the secu * [[`66c74548de`](https://github.com/nodejs/node/commit/66c74548de)] - **doc**: fenced all code blocks, typo fixes (Robert Jefe Lindstaedt) [#4733](https://github.com/nodejs/node/pull/4733) * [[`54e8845b5e`](https://github.com/nodejs/node/commit/54e8845b5e)] - **fs**: refactor redeclared variables (Rich Trott) [#4959](https://github.com/nodejs/node/pull/4959) * [[`fa940cf9bc`](https://github.com/nodejs/node/commit/fa940cf9bc)] - **fs**: remove unused branches (Benjamin Gruenbaum) [#4795](https://github.com/nodejs/node/pull/4795) -* [[`a3b84a4c93`](https://github.com/nodejs/node/commit/a3b84a4c93)] - **(SEMVER-MINOR)** **http**: strictly forbid invalid characters from headers (James M Snell) +* [[`7bef1b7907`](https://github.com/nodejs/node/commit/7bef1b7907)] - **(SEMVER-MINOR)** **http**: strictly forbid invalid characters from headers (James M Snell) * [[`9b03af254a`](https://github.com/nodejs/node/commit/9b03af254a)] - **http**: remove reference to onParserExecute (Tom Atkinson) [#4773](https://github.com/nodejs/node/pull/4773) * [[`101de9de3f`](https://github.com/nodejs/node/commit/101de9de3f)] - **https**: evict cached sessions on error (Fedor Indutny) [#4982](https://github.com/nodejs/node/pull/4982) * [[`b2c8b7f6d3`](https://github.com/nodejs/node/commit/b2c8b7f6d3)] - **internal/child_process**: call postSend on error (Fedor Indutny) [#4752](https://github.com/nodejs/node/pull/4752) @@ -819,8 +819,8 @@ This is an important security release. All Node.js users should consult the secu * [[`85743c0e92`](https://github.com/nodejs/node/commit/85743c0e92)] - **querystring**: check that maxKeys is finite (Myles Borins) [#5066](https://github.com/nodejs/node/pull/5066) * [[`5a10fe932c`](https://github.com/nodejs/node/commit/5a10fe932c)] - **querystring**: use String.prototype.split's limit (Manuel Valls) [#2288](https://github.com/nodejs/node/pull/2288) * [[`2844cc03dc`](https://github.com/nodejs/node/commit/2844cc03dc)] - **repl**: remove variable redeclaration (Rich Trott) [#4977](https://github.com/nodejs/node/pull/4977) -* [[`ac6627a0fe`](https://github.com/nodejs/node/commit/ac6627a0fe)] - **src**: avoid compiler warning in node_revert.cc (James M Snell) -* [[`459c5844c8`](https://github.com/nodejs/node/commit/459c5844c8)] - **(SEMVER-MINOR)** **src**: add --security-revert command line flag (James M Snell) +* [[`b5b5bb1e3c`](https://github.com/nodejs/node/commit/b5b5bb1e3c)] - **src**: avoid compiler warning in node_revert.cc (James M Snell) +* [[`d387591bbb`](https://github.com/nodejs/node/commit/d387591bbb)] - **(SEMVER-MINOR)** **src**: add --security-revert command line flag (James M Snell) * [[`95615196de`](https://github.com/nodejs/node/commit/95615196de)] - **src**: clean up usage of `__proto__` (Jackson Tian) [#5069](https://github.com/nodejs/node/pull/5069) * [[`e93b024214`](https://github.com/nodejs/node/commit/e93b024214)] - **src**: remove no longer relevant comments (Chris911) [#4843](https://github.com/nodejs/node/pull/4843) * [[`a2c257a3ef`](https://github.com/nodejs/node/commit/a2c257a3ef)] - **src**: fix negative values in process.hrtime() (Ben Noordhuis) [#4757](https://github.com/nodejs/node/pull/4757) @@ -917,7 +917,7 @@ This is an important security release. All Node.js users should consult the secu * [[`ebd9addcd1`](https://github.com/nodejs/node/commit/ebd9addcd1)] - **crypto**: clear error stack in ECDH::Initialize (Fedor Indutny) [#4689](https://github.com/nodejs/node/pull/4689) * [[`66b9c0d8bd`](https://github.com/nodejs/node/commit/66b9c0d8bd)] - **debugger**: remove variable redeclarations (Rich Trott) [#4633](https://github.com/nodejs/node/pull/4633) * [[`88b2889679`](https://github.com/nodejs/node/commit/88b2889679)] - **dgram**: prevent disabled optimization of bind() (Brian White) [#4613](https://github.com/nodejs/node/pull/4613) -* [[`d56e3f8b67`](https://github.com/nodejs/node/commit/d56e3f8b67)] - **doc**: restore ICU third-party software licenses (Richard Lau) [#4762](https://github.com/nodejs/node/pull/4762) +* [[`8a11b8c0ef`](https://github.com/nodejs/node/commit/8a11b8c0ef)] - **doc**: restore ICU third-party software licenses (Richard Lau) [#4762](https://github.com/nodejs/node/pull/4762) * [[`212a44df03`](https://github.com/nodejs/node/commit/212a44df03)] - **doc**: clarify protocol default in http.request() (cjihrig) [#4714](https://github.com/nodejs/node/pull/4714) * [[`3297036345`](https://github.com/nodejs/node/commit/3297036345)] - **doc**: update branch-diff arguments in release doc (Rod Vagg) [#4691](https://github.com/nodejs/node/pull/4691) * [[`666c089e68`](https://github.com/nodejs/node/commit/666c089e68)] - **doc**: fix named anchors in addons.markdown and http.markdown (Michael Theriot) [#4708](https://github.com/nodejs/node/pull/4708) @@ -944,14 +944,14 @@ This is an important security release. All Node.js users should consult the secu * [[`4bc1a47761`](https://github.com/nodejs/node/commit/4bc1a47761)] - **querystring**: improve parse() performance (Brian White) [#4675](https://github.com/nodejs/node/pull/4675) * [[`ad63d350d4`](https://github.com/nodejs/node/commit/ad63d350d4)] - **readline**: Remove XXX and output debuglog (Kohei TAKATA) [#4690](https://github.com/nodejs/node/pull/4690) * [[`da550aa063`](https://github.com/nodejs/node/commit/da550aa063)] - **repl**: make sure historyPath is trimmed (Evan Lucas) [#4539](https://github.com/nodejs/node/pull/4539) -* [[`1a6e7d1b52`](https://github.com/nodejs/node/commit/1a6e7d1b52)] - **src**: fix negative values in process.hrtime() (Ben Noordhuis) [#4757](https://github.com/nodejs/node/pull/4757) +* [[`a2c257a3ef`](https://github.com/nodejs/node/commit/a2c257a3ef)] - **src**: fix negative values in process.hrtime() (Ben Noordhuis) [#4757](https://github.com/nodejs/node/pull/4757) * [[`8bad51977a`](https://github.com/nodejs/node/commit/8bad51977a)] - **src**: return UV_EAI_NODATA on empty lookup (cjihrig) [#4715](https://github.com/nodejs/node/pull/4715) * [[`761cf2bf6a`](https://github.com/nodejs/node/commit/761cf2bf6a)] - **src**: don't check failure with ERR_peek_error() (Ben Noordhuis) [#4731](https://github.com/nodejs/node/pull/4731) -* [[`953f4a3999`](https://github.com/nodejs/node/commit/953f4a3999)] - **stream**: prevent object map change in ReadableState (Evan Lucas) [#4761](https://github.com/nodejs/node/pull/4761) +* [[`426ff820f5`](https://github.com/nodejs/node/commit/426ff820f5)] - **stream**: prevent object map change in ReadableState (Evan Lucas) [#4761](https://github.com/nodejs/node/pull/4761) * [[`e65f1f7954`](https://github.com/nodejs/node/commit/e65f1f7954)] - **test**: fix tls-multi-key race condition (Santiago Gimeno) [#3966](https://github.com/nodejs/node/pull/3966) * [[`3727ae0d7d`](https://github.com/nodejs/node/commit/3727ae0d7d)] - **test**: use addon.md block headings as test dir names (Rod Vagg) [#4412](https://github.com/nodejs/node/pull/4412) -* [[`47960a07c0`](https://github.com/nodejs/node/commit/47960a07c0)] - **test**: make test-cluster-disconnect-leak reliable (Rich Trott) [#4736](https://github.com/nodejs/node/pull/4736) -* [[`9926b5a25f`](https://github.com/nodejs/node/commit/9926b5a25f)] - **test**: fix issues for space-in-parens ESLint rule (Roman Reiss) [#4753](https://github.com/nodejs/node/pull/4753) +* [[`a347cd793f`](https://github.com/nodejs/node/commit/a347cd793f)] - **test**: make test-cluster-disconnect-leak reliable (Rich Trott) [#4736](https://github.com/nodejs/node/pull/4736) +* [[`a39b28bb5a`](https://github.com/nodejs/node/commit/a39b28bb5a)] - **test**: fix issues for space-in-parens ESLint rule (Roman Reiss) [#4753](https://github.com/nodejs/node/pull/4753) * [[`d1aabd6264`](https://github.com/nodejs/node/commit/d1aabd6264)] - **test**: fix style issues after eslint update (Michaël Zasso) [nodejs/io.js#2286](https://github.com/nodejs/io.js/pull/2286) * [[`e98bcfa2cb`](https://github.com/nodejs/node/commit/e98bcfa2cb)] - **test**: remove 1 second delay from test (Rich Trott) [#4616](https://github.com/nodejs/node/pull/4616) * [[`6cfd0b5a32`](https://github.com/nodejs/node/commit/6cfd0b5a32)] - **test**: fix flaky test-net-socket-local-address (cjihrig) [#4650](https://github.com/nodejs/node/pull/4650) @@ -959,13 +959,13 @@ This is an important security release. All Node.js users should consult the secu * [[`9164c00bdb`](https://github.com/nodejs/node/commit/9164c00bdb)] - **test**: move resource intensive tests to sequential (Rich Trott) [#4615](https://github.com/nodejs/node/pull/4615) * [[`d8ba2c0de4`](https://github.com/nodejs/node/commit/d8ba2c0de4)] - **test**: fix `http-upgrade-client` flakiness (Santiago Gimeno) [#4602](https://github.com/nodejs/node/pull/4602) * [[`6018fa1f57`](https://github.com/nodejs/node/commit/6018fa1f57)] - **test**: fix `http-upgrade-agent` flakiness (Santiago Gimeno) [#4520](https://github.com/nodejs/node/pull/4520) -* [[`c33f6a87d0`](https://github.com/nodejs/node/commit/c33f6a87d0)] - **tools**: enable space-in-parens ESLint rule (Roman Reiss) [#4753](https://github.com/nodejs/node/pull/4753) +* [[`8f4f5b3ca5`](https://github.com/nodejs/node/commit/8f4f5b3ca5)] - **tools**: enable space-in-parens ESLint rule (Roman Reiss) [#4753](https://github.com/nodejs/node/pull/4753) * [[`162e16afdb`](https://github.com/nodejs/node/commit/162e16afdb)] - **tools**: enable no-extra-semi rule in eslint (Michaël Zasso) [#2205](https://github.com/nodejs/node/pull/2205) * [[`031b87d42d`](https://github.com/nodejs/node/commit/031b87d42d)] - **tools**: add license-builder.sh to construct LICENSE (Rod Vagg) [#4194](https://github.com/nodejs/node/pull/4194) * [[`ec8e0ae697`](https://github.com/nodejs/node/commit/ec8e0ae697)] - **tools**: fix style issue after eslint update (Michaël Zasso) [nodejs/io.js#2286](https://github.com/nodejs/io.js/pull/2286) * [[`4d5ee7a512`](https://github.com/nodejs/node/commit/4d5ee7a512)] - **tools**: update eslint config (Michaël Zasso) [nodejs/io.js#2286](https://github.com/nodejs/io.js/pull/2286) * [[`2d441493a4`](https://github.com/nodejs/node/commit/2d441493a4)] - **tools**: update eslint to v1.10.3 (Michaël Zasso) [nodejs/io.js#2286](https://github.com/nodejs/io.js/pull/2286) -* [[`aba3cc834e`](https://github.com/nodejs/node/commit/aba3cc834e)] - **tools**: fix license-builder.sh for ICU (Richard Lau) [#4762](https://github.com/nodejs/node/pull/4762) +* [[`fe23f4241f`](https://github.com/nodejs/node/commit/fe23f4241f)] - **tools**: fix license-builder.sh for ICU (Richard Lau) [#4762](https://github.com/nodejs/node/pull/4762) * [[`5f57005ec9`](https://github.com/nodejs/node/commit/5f57005ec9)] - **(SEMVER-MINOR)** **v8,src**: expose statistics about heap spaces (Ben Ripkens) [#4463](https://github.com/nodejs/node/pull/4463) From cc6b2f49cf0f663b2b1312fb42a467047b2c71a0 Mon Sep 17 00:00:00 2001 From: larissayvette Date: Mon, 10 Oct 2016 18:07:43 +0100 Subject: [PATCH 014/145] test: fixes that do not affect performance PR-URL: https://github.com/nodejs/node/pull/9011 Reviewed-By: Gibson Fahnestock Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Rich Trott --- test/parallel/test-debugger-pid.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-debugger-pid.js b/test/parallel/test-debugger-pid.js index b36978414eb0f3..1da34811076b95 100644 --- a/test/parallel/test-debugger-pid.js +++ b/test/parallel/test-debugger-pid.js @@ -29,8 +29,8 @@ interfacer.on('line', function(line) { switch (++lineCount) { case 1: line = line.replace(/^(debug> *)+/, ''); - var msg = 'There was an internal error in Node\'s debugger. ' + - 'Please report this bug.'; + const msg = 'There was an internal error in Node\'s debugger. ' + + 'Please report this bug.'; expected = `(node:${pid}) ${msg}`; break; @@ -50,5 +50,5 @@ interfacer.on('line', function(line) { }); interfacer.on('exit', function(code, signal) { - assert.ok(code == 1, 'Got unexpected code: ' + code); + assert.strictEqual(code, 1, `Got unexpected code: ${code}`); }); From 847b15c1779d2a2b2f2a1cd941a5d7f0171fc4b8 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 5 Oct 2016 20:55:56 -0700 Subject: [PATCH 015/145] governance: expand use of CTC issue tracker As the CTC grows and has representation from more time zones, we need to embrace asynchronous decision making and rely less on the actual meeting. This change is a proposal for that which, ironically, probably has to be approved at a meeting. PR-URL: https://github.com/nodejs/node/pull/8945 Reviewed-By: Anna Henningsen Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig Reviewed-By: Evan Lucas Reviewed-By: James M Snell Reviewed-By: Michael Dawson Reviewed-By: Julien Gilli Reviewed-By: Rod Vagg Reviewed-By: Shigeki Ohtsu --- GOVERNANCE.md | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/GOVERNANCE.md b/GOVERNANCE.md index d3ba8355e0fca8..a61d9848b10ae9 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -23,14 +23,11 @@ The [nodejs/node](https://github.com/nodejs/node) GitHub repository is maintained by the CTC and additional Collaborators who are added by the CTC on an ongoing basis. -Individuals making significant and valuable contributions are made -Collaborators and given commit-access to the project. These -individuals are identified by the CTC and their addition as -Collaborators is discussed during the weekly CTC meeting. +Individuals identified by the CTC as making significant and valuable +contributions are made Collaborators and given commit access to the project. _Note:_ If you make a significant contribution and are not considered -for commit-access, log an issue or contact a CTC member directly and it -will be brought up in the next CTC meeting. +for commit access, log an issue or contact a CTC member directly. Modifications of the contents of the nodejs/node repository are made on a collaborative basis. Anybody with a GitHub account may propose a @@ -44,11 +41,9 @@ participate and there is disagreement around a particular 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 -modifications, or modifications that have not found consensus to the -CTC for discussion by assigning the ***ctc-agenda*** tag to a pull -request or issue. The CTC should serve as the final arbiter where -required. +Collaborators may opt to elevate significant or controversial modifications to +the CTC by assigning the ***ctc-agenda*** tag to a pull request or issue. The +CTC should serve as the final arbiter where required. For the current list of Collaborators, see the project [README.md](./README.md#current-project-team-members). @@ -127,7 +122,7 @@ group of Collaborators. Any community member or contributor can ask that something be added to the next meeting's agenda by logging a GitHub issue. Any Collaborator, -CTC member or the moderator can add the item to the agenda by adding +CTC member, or the moderator can add the item to the agenda by adding the ***ctc-agenda*** tag to the issue. Prior to each CTC meeting, the moderator will share the agenda with @@ -141,6 +136,20 @@ participate in a non-voting capacity. The moderator is responsible for summarizing the discussion of each agenda item and sending it as a pull request after the meeting. +Due to the challenges of scheduling a global meeting with participants in +several timezones, the CTC will seek to resolve as many agenda items as possible +outside of meetings using +[the CTC issue tracker](https://github.com/nodejs/CTC/issues). The process in +the issue tracker is: + +* A CTC member opens an issue explaining the proposal/issue and @-mentions + @nodejs/ctc. +* After 72 hours, if there are two or more `LGTM`s from other CTC members and no + explicit opposition from other CTC members, then the proposal is approved. +* If there are any CTC members objecting, then a conversation ensues until + either the proposal is dropped or the objecting members are persuaded. If + there is an extended impasse, a motion for a vote may be made. + ## Consensus Seeking Process The CTC follows a From 9cc900124431c3c7afdd91c9539bfeaf92dc151e Mon Sep 17 00:00:00 2001 From: Jenna Vuong Date: Sun, 9 Oct 2016 22:28:42 -0700 Subject: [PATCH 016/145] test: refactor test-file-* * var to const * add check that expected error is ENOENT * indexOf() to includes() PR-URL: https://github.com/nodejs/node/pull/8999 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott Reviewed-By: Franziska Hinkelmann --- test/parallel/test-file-read-noexist.js | 12 ++++++------ test/parallel/test-file-write-stream2.js | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/test/parallel/test-file-read-noexist.js b/test/parallel/test-file-read-noexist.js index 0b5ef4c59f1595..423c62dfd54c0f 100644 --- a/test/parallel/test-file-read-noexist.js +++ b/test/parallel/test-file-read-noexist.js @@ -1,11 +1,11 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); -var path = require('path'); -var fs = require('fs'); - -var filename = path.join(common.fixturesDir, 'does_not_exist.txt'); +const common = require('../common'); +const assert = require('assert'); +const path = require('path'); +const fs = require('fs'); +const filename = path.join(common.fixturesDir, 'does_not_exist.txt'); fs.readFile(filename, 'latin1', common.mustCall(function(err, content) { assert.ok(err); + assert.strictEqual(err.code, 'ENOENT'); })); diff --git a/test/parallel/test-file-write-stream2.js b/test/parallel/test-file-write-stream2.js index 69fdb7051ff11c..77e8119d25b8a7 100644 --- a/test/parallel/test-file-write-stream2.js +++ b/test/parallel/test-file-write-stream2.js @@ -1,12 +1,12 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); +const common = require('../common'); +const assert = require('assert'); -var path = require('path'); -var fs = require('fs'); +const path = require('path'); +const fs = require('fs'); -var filepath = path.join(common.tmpDir, 'write.txt'); +const filepath = path.join(common.tmpDir, 'write.txt'); var file; const EXPECTED = '012345678910'; @@ -76,12 +76,12 @@ file.on('close', function() { file.on('error', function(err) { cb_occurred += 'error '; - assert.ok(err.message.indexOf('write after end') >= 0); + assert.ok(err.message.includes('write after end')); }); for (var i = 0; i < 11; i++) { - var ret = file.write(i + ''); + const ret = file.write(i + ''); console.error('%d %j', i, ret); // return false when i hits 10 From 9cfa91b585dde251686665b9091f069b1b552f12 Mon Sep 17 00:00:00 2001 From: Adam Langley Date: Sun, 9 Oct 2016 11:46:48 -0700 Subject: [PATCH 017/145] crypto: use SSL_get_SSL_CTX. SSL_get_SSL_CTX returns the SSL_CTX for an SSL. Previously the code accessed |ssl->ctx| directly, but that's no longer possible with OpenSSL 1.1.0. SSL_get_SSL_CTX exists all the way back to (at least) OpenSSL 0.9.8 and so this change should be fully compatible. PR-URL: https://github.com/nodejs/node/pull/8995 Reviewed-By: Ben Noordhuis Reviewed-By: Fedor Indutny Reviewed-By: Shigeki Ohtsu --- src/node_crypto.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 005a24744924b7..d0027ce4d42286 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -1095,7 +1095,7 @@ int SecureContext::TicketKeyCallback(SSL* ssl, static const int kTicketPartSize = 16; SecureContext* sc = static_cast( - SSL_CTX_get_app_data(ssl->ctx)); + SSL_CTX_get_app_data(SSL_get_SSL_CTX(ssl))); Environment* env = sc->env(); HandleScope handle_scope(env->isolate()); @@ -1632,7 +1632,7 @@ void SSLWrap::GetPeerCertificate( // Last certificate should be self-signed while (X509_check_issued(cert, cert) != X509_V_OK) { X509* ca; - if (SSL_CTX_get_issuer(w->ssl_->ctx, cert, &ca) <= 0) + if (SSL_CTX_get_issuer(SSL_get_SSL_CTX(w->ssl_), cert, &ca) <= 0) break; Local ca_info = X509ToObject(env, ca); @@ -2238,7 +2238,8 @@ void SSLWrap::SetALPNProtocols( env->alpn_buffer_private_symbol(), args[0]).FromJust()); // Server should select ALPN protocol from list of advertised by client - SSL_CTX_set_alpn_select_cb(w->ssl_->ctx, SelectALPNCallback, nullptr); + SSL_CTX_set_alpn_select_cb(SSL_get_SSL_CTX(w->ssl_), SelectALPNCallback, + nullptr); } #endif // TLSEXT_TYPE_application_layer_protocol_negotiation } From c0f8198d645faa80a1f10c263a8916ec3cf92ee5 Mon Sep 17 00:00:00 2001 From: Nikolai Vavilov Date: Fri, 14 Oct 2016 01:41:53 +0300 Subject: [PATCH 018/145] doc: fix typo PR-URL: https://github.com/nodejs/node/pull/9089 Reviewed-By: Colin Ihrig --- doc/api/fs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index 5cb4b9f422e9fb..cac42e97fab44d 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -129,7 +129,7 @@ See more details in [`fs.watch()`][]. The `filename` argument may not be provided depending on operating system support. If `filename` is provided, it will be provided as a `Buffer` if -`fs.watch()` is called with it's `encoding` option set to `'buffer'`, otherwise +`fs.watch()` is called with its `encoding` option set to `'buffer'`, otherwise `filename` will be a string. ```js From ae3f31b2673c2e65abb0c6559d6c8ee5cabf87a1 Mon Sep 17 00:00:00 2001 From: Eugene Ostroukhov Date: Fri, 30 Sep 2016 14:24:02 -0700 Subject: [PATCH 019/145] test: fix issues reported by Coverity Wrapped the timer into class to ensure it is cleaned up properly. PR-URL: https://github.com/nodejs/node/pull/8870 Reviewed-By: Ali Ijaz Sheikh Reviewed-By: Ben Noordhuis --- test/cctest/test_inspector_socket.cc | 56 ++++++++++++++-------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/test/cctest/test_inspector_socket.cc b/test/cctest/test_inspector_socket.cc index c603e3ee214c8f..697fa2bacca85a 100644 --- a/test/cctest/test_inspector_socket.cc +++ b/test/cctest/test_inspector_socket.cc @@ -10,13 +10,11 @@ static const int MAX_LOOP_ITERATIONS = 10000; #define SPIN_WHILE(condition) \ { \ - bool timed_out = false; \ - uv_timer_t* timer = start_timer(&timed_out); \ - while (((condition)) && !timed_out) { \ + Timeout timeout(&loop); \ + while ((condition) && !timeout.timed_out) { \ uv_run(&loop, UV_RUN_NOWAIT); \ } \ ASSERT_FALSE((condition)); \ - cleanup_timer(timer); \ } static bool connected = false; @@ -46,32 +44,36 @@ static const char HANDSHAKE_REQ[] = "GET /ws/path HTTP/1.1\r\n" "Sec-WebSocket-Key: aaa==\r\n" "Sec-WebSocket-Version: 13\r\n\r\n"; -static void dispose_handle(uv_handle_t* handle) { - *static_cast(handle->data) = true; -} - -static void set_timeout_flag(uv_timer_t* timer) { - *(static_cast(timer->data)) = true; -} +class Timeout { +public: + explicit Timeout(uv_loop_t* loop) : timed_out(false), done_(false) { + uv_timer_init(loop, &timer_); + uv_timer_start(&timer_, Timeout::set_flag, 5000, 0); + } -static uv_timer_t* start_timer(bool* flag) { - uv_timer_t* timer = new uv_timer_t(); - uv_timer_init(&loop, timer); - timer->data = flag; - uv_timer_start(timer, set_timeout_flag, 5000, 0); - return timer; -} + ~Timeout() { + uv_timer_stop(&timer_); + uv_close(reinterpret_cast(&timer_), mark_done); + while (!done_) { + uv_run(&loop, UV_RUN_NOWAIT); + } + } + bool timed_out; +private: + static void set_flag(uv_timer_t* timer) { + Timeout* t = node::ContainerOf(&Timeout::timer_, timer); + t->timed_out = true; + } -static void cleanup_timer(uv_timer_t* timer) { - bool done = false; - timer->data = &done; - uv_timer_stop(timer); - uv_close(reinterpret_cast(timer), dispose_handle); - while (!done) { - uv_run(&loop, UV_RUN_NOWAIT); + static void mark_done(uv_handle_t* timer) { + Timeout* t = node::ContainerOf(&Timeout::timer_, + reinterpret_cast(timer)); + t->done_ = true; } - delete timer; -} + + bool done_; + uv_timer_t timer_; +}; static void stop_if_stop_path(enum inspector_handshake_event state, const std::string& path, bool* cont) { From 3af679ee369835d81efd5eb4223e96c282ecdcfb Mon Sep 17 00:00:00 2001 From: jessicaquynh Date: Tue, 11 Oct 2016 21:37:29 -0400 Subject: [PATCH 020/145] doc: explain why GitHub merge button is not used Adds documentation and explicit reasons on why the GitHub web interface button is not used. This was explained in the referenced issue by @TheAlphaNerd. Fixes: https://github.com/nodejs/node/issues/8893 PR-URL: https://github.com/nodejs/node/pull/9044 Reviewed-By: Myles Borins Reviewed-By: Stephen Belanger Reviewed-By: Luigi Pinca --- doc/onboarding.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/onboarding.md b/doc/onboarding.md index e9d6a4bd244b9e..e22c876893fb20 100644 --- a/doc/onboarding.md +++ b/doc/onboarding.md @@ -164,8 +164,15 @@ onboarding session. ## Landing PRs: Details -* Please never use GitHub's green "Merge Pull Request" button. +* Please never use GitHub's green ["Merge Pull Request"](https://help.github.com/articles/merging-a-pull-request/#merging-a-pull-request-using-the-github-web-interface) button. * If you do, please force-push removing the merge. + * Reasons for not using the web interface button: + * The merge method will add an unnecessary merge commit. + * The rebase & merge method adds metadata to the commit title. + * The rebase method changes the author. + * The squash & merge method has been known to add metadata to the commit title. + * If more than one author has contributed to the PR, only the latest author will be considered during the squashing. + Update your `master` branch (or whichever branch you are landing on, almost always `master`) From 0a2a39cb951a5fdcc119796f36a8997d919fbc12 Mon Sep 17 00:00:00 2001 From: jessicaquynh Date: Tue, 11 Oct 2016 21:38:06 -0400 Subject: [PATCH 021/145] doc: explains why Reviewed-By is added in PRs Adds verbose reasons to the documentation on why the Reviewed-By metadata on a pull request is important. This was loosely mentioned as an issue in the referenced issue below, and answered by @addaleax. Ref: https://github.com/nodejs/node/issues/8893 PR-URL: https://github.com/nodejs/node/pull/9044 Reviewed-By: Myles Borins Reviewed-By: Stephen Belanger Reviewed-By: Luigi Pinca --- COLLABORATOR_GUIDE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/COLLABORATOR_GUIDE.md b/COLLABORATOR_GUIDE.md index 2bab2e203145f0..5d0bfbfbb4339c 100644 --- a/COLLABORATOR_GUIDE.md +++ b/COLLABORATOR_GUIDE.md @@ -101,6 +101,8 @@ information regarding the change process: - A `Reviewed-By: Name ` line for yourself and any other Collaborators who have reviewed the change. + - Useful for @mentions / contact list if something goes wrong in the PR. + - Protects against the assumption that GitHub will be around forever. - A `PR-URL:` line that references the *full* GitHub URL of the original pull request being merged so it's easy to trace a commit back to the conversation that led up to that change. From 97748c6d027fc67a914fc7a80c541c9483a3fb25 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 10 Oct 2016 23:23:18 -0700 Subject: [PATCH 022/145] test: move module out of fixture directory tick-processor-base.js is a module used by three other tests. It is not a test fixture so move it out of the fixture directory. (One downside to having it in the fixture directory is that fixture code is not currently linted.) It is possible that the code in tick-processor-base.js should be integrated into common.js. This can potentially happen subsequently (and might make a reasonable good first contribution for a new contributor). PR-URL: https://github.com/nodejs/node/pull/9022 Reviewed-By: Santiago Gimeno Reviewed-By: Gibson Fahnestock Reviewed-By: Luigi Pinca Reviewed-By: Sakthipriyan Vairamani Reviewed-By: James M Snell --- test/parallel/test-tick-processor-builtin.js | 3 +-- test/parallel/test-tick-processor-cpp-core.js | 3 +-- test/parallel/test-tick-processor-unknown.js | 3 +-- test/{fixtures => parallel}/tick-processor-base.js | 4 ++-- 4 files changed, 5 insertions(+), 8 deletions(-) rename test/{fixtures => parallel}/tick-processor-base.js (92%) diff --git a/test/parallel/test-tick-processor-builtin.js b/test/parallel/test-tick-processor-builtin.js index 8e6a5313deafaa..afe08bdb0b672b 100644 --- a/test/parallel/test-tick-processor-builtin.js +++ b/test/parallel/test-tick-processor-builtin.js @@ -1,6 +1,5 @@ 'use strict'; const common = require('../common'); -const path = require('path'); if (common.isWindows || common.isSunOS || @@ -16,7 +15,7 @@ if (!common.enoughTestCpu) { return; } -const base = require(path.join(common.fixturesDir, 'tick-processor-base.js')); +const base = require('./tick-processor-base.js'); base.runTest({ pattern: /Builtin_DateNow/, diff --git a/test/parallel/test-tick-processor-cpp-core.js b/test/parallel/test-tick-processor-cpp-core.js index 6223808da0c4d9..2bc595e7ff732a 100644 --- a/test/parallel/test-tick-processor-cpp-core.js +++ b/test/parallel/test-tick-processor-cpp-core.js @@ -1,6 +1,5 @@ 'use strict'; const common = require('../common'); -const path = require('path'); if (common.isWindows || common.isSunOS || @@ -16,7 +15,7 @@ if (!common.enoughTestCpu) { return; } -const base = require(path.join(common.fixturesDir, 'tick-processor-base.js')); +const base = require('./tick-processor-base.js'); base.runTest({ pattern: /RunInDebugContext/, diff --git a/test/parallel/test-tick-processor-unknown.js b/test/parallel/test-tick-processor-unknown.js index d1d1f4e63258f4..c886f648be4dc5 100644 --- a/test/parallel/test-tick-processor-unknown.js +++ b/test/parallel/test-tick-processor-unknown.js @@ -1,6 +1,5 @@ 'use strict'; const common = require('../common'); -const path = require('path'); // TODO(mhdawson) Currently the test-tick-processor functionality in V8 // depends on addresses being smaller than a full 64 bits. Aix supports @@ -17,7 +16,7 @@ if (!common.enoughTestCpu) { return; } -const base = require(path.join(common.fixturesDir, 'tick-processor-base.js')); +const base = require('./tick-processor-base.js'); // Unknown checked for to prevent flakiness, if pattern is not found, // then a large number of unknown ticks should be present diff --git a/test/fixtures/tick-processor-base.js b/test/parallel/tick-processor-base.js similarity index 92% rename from test/fixtures/tick-processor-base.js rename to test/parallel/tick-processor-base.js index ca67a0f7e967b4..aff37ba109e141 100644 --- a/test/fixtures/tick-processor-base.js +++ b/test/parallel/tick-processor-base.js @@ -20,7 +20,7 @@ function runTest(test) { }); let ticks = ''; - proc.stdout.on('data', chunk => ticks += chunk); + proc.stdout.on('data', (chunk) => ticks += chunk); // Try to match after timeout setTimeout(() => { @@ -41,7 +41,7 @@ function match(pattern, parent, ticks) { }); let out = ''; - proc.stdout.on('data', chunk => out += chunk); + proc.stdout.on('data', (chunk) => out += chunk); proc.stdout.once('end', () => { proc.once('exit', () => { fs.unlinkSync(LOG_FILE); From 0d21f951b2fd6fbc2a02add1e62cb9a7cf625274 Mon Sep 17 00:00:00 2001 From: Ilya Frolov Date: Fri, 2 Sep 2016 23:27:01 +0300 Subject: [PATCH 023/145] doc: highlight deprecated API in ToC Highlight deprecated API methods/properties in "Table of Contents" for increasing understandability. Adapted code to eslint standards. PR-URL: https://github.com/nodejs/node/pull/7189 Fixes: https://github.com/nodejs/nodejs.org/issues/772 Reviewed-By: Jeremiah Senkpiel Reviewed-By: Roman Reiss Reviewed-By: Sakthipriyan Vairamani --- doc/api_assets/style.css | 15 +++++++++++++++ tools/doc/html.js | 26 ++++++++++++++++++++++---- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/doc/api_assets/style.css b/doc/api_assets/style.css index a9dec759fa85df..5db5473e0bd5b7 100644 --- a/doc/api_assets/style.css +++ b/doc/api_assets/style.css @@ -330,6 +330,21 @@ hr { margin-top: .666em; } +#toc .stability_0::after { + background-color: #d50027; + color: #fff; +} + +#toc .stability_0::after { + content: "deprecated"; + font-size: .8em; + position: relative; + top: -.18em; + left: .5em; + padding: 0 .3em .2em; + border-radius: 3px; +} + #apicontent li { margin-bottom: .5em; } diff --git a/tools/doc/html.js b/tools/doc/html.js index 30bc3b5caae303..3b60116b1ba422 100644 --- a/tools/doc/html.js +++ b/tools/doc/html.js @@ -9,6 +9,8 @@ const typeParser = require('./type-parser.js'); module.exports = toHTML; +const STABILITY_TEXT_REG_EXP = /(.*:)\s*(\d)([\s\S]*)/; + // customized heading without id attribute var renderer = new marked.Renderer(); renderer.heading = function(text, level) { @@ -153,8 +155,11 @@ function parseLists(input) { var savedState = []; var depth = 0; var output = []; + let headingIndex = -1; + let heading = null; + output.links = input.links; - input.forEach(function(tok) { + input.forEach(function(tok, index) { if (tok.type === 'blockquote_start') { savedState.push(state); state = 'MAYBE_STABILITY_BQ'; @@ -167,6 +172,17 @@ function parseLists(input) { if ((tok.type === 'paragraph' && state === 'MAYBE_STABILITY_BQ') || tok.type === 'code') { if (tok.text.match(/Stability:.*/g)) { + const stabilityMatch = tok.text.match(STABILITY_TEXT_REG_EXP); + const stability = Number(stabilityMatch[2]); + const isStabilityIndex = + index - 2 === headingIndex || // general + index - 3 === headingIndex; // with api_metadata block + + if (heading && isStabilityIndex) { + heading.stability = stability; + headingIndex = -1; + heading = null; + } tok.text = parseAPIHeader(tok.text); output.push({ type: 'html', text: tok.text }); return; @@ -178,6 +194,8 @@ function parseLists(input) { if (state === null || (state === 'AFTERHEADING' && tok.type === 'heading')) { if (tok.type === 'heading') { + headingIndex = index; + heading = tok; state = 'AFTERHEADING'; } output.push(tok); @@ -280,7 +298,7 @@ function linkJsTypeDocs(text) { function parseAPIHeader(text) { text = text.replace( - /(.*:)\s(\d)([\s\S]*)/, + STABILITY_TEXT_REG_EXP, '
$1 $2$3
' ); return text; @@ -324,8 +342,8 @@ function buildToc(lexed, filename, cb) { const realFilename = path.basename(realFilenames[0], '.md'); const id = getId(realFilename + '_' + tok.text.trim()); toc.push(new Array((depth - 1) * 2 + 1).join(' ') + - '* ' + - tok.text + ''); + '* ' + + '' + tok.text + ''); tok.text += '#'; }); From 9de8cfecd91818638e400d1a72f4c227ac8e5540 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 12 Oct 2016 07:16:51 +0200 Subject: [PATCH 024/145] build: fix config.gypi target The config.gypi target has a recipe that uses the control function error to report if the config.gypi file is missing or if it is stale (the configure file was updated which is a prerequisite of this rule). GNU make has two phases, immediate and deferred. During the first phase it will expand any variables or functions as the makefile is parsed. The recipe in this case is a shell if statement, which is a deferred construct. But the control function $(error) is an immediate construct which will cause the makefile processing to stop during the first phase of the Make process. If I understand this correctly the only possible outcome of this rule is the "Stale config.gypi, please re-run ./configure" message which will be done in the first phase and then exit. The shell condition will not be considered. So it will never report that the config.gypi is missing. bnoordhuis suggested that we simply change this into a single error message: "Missing or stale config.gypi, please run configure" PR-URL: https://github.com/nodejs/node/pull/9053 Reviewed-By: Ben Noordhuis Reviewed-By: Gibson Fahnestock --- Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile b/Makefile index a447d06e1cd55d..4d84d30224f804 100644 --- a/Makefile +++ b/Makefile @@ -75,11 +75,7 @@ out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/z $(PYTHON) tools/gyp_node.py -f make config.gypi: configure - if [ -f $@ ]; then - $(error Stale $@, please re-run ./configure) - else - $(error No $@, please run ./configure first) - fi + $(error Missing or stale $@, please run ./$<) install: all $(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)' From cbfde3cd0ae702450c0209e8748cf49737adea8e Mon Sep 17 00:00:00 2001 From: Tanuja-Sawant Date: Sun, 9 Oct 2016 15:06:38 +0530 Subject: [PATCH 025/145] child_process: update outdated comment PR-URL: https://github.com/nodejs/node/pull/8988/ Reviewed-By: James M Snell --- lib/child_process.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/child_process.js b/lib/child_process.js index 6e499697eed00f..5a0fd6e21ed5e4 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -45,8 +45,8 @@ exports.fork = function(modulePath /*, args, options*/) { args = execArgv.concat([modulePath], args); if (!Array.isArray(options.stdio)) { - // Leave stdin open for the IPC channel. stdout and stderr should be the - // same as the parent's if silent isn't set. + // Use a separate fd=3 for the IPC channel. Inherit stdin, stdout, + // and stderr from the parent if silent isn't set. options.stdio = options.silent ? ['pipe', 'pipe', 'pipe', 'ipc'] : [0, 1, 2, 'ipc']; } else if (options.stdio.indexOf('ipc') === -1) { From 0f1a22d28aae1f8d2cbb9968896c02c3b34073af Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Wed, 12 Oct 2016 20:39:37 +0000 Subject: [PATCH 026/145] net: fix ambiguity in EOF handling `end` MUST always be emitted **before** `close`. However, if a handle will invoke `uv_close_cb` immediately, or in the same JS tick - `close` may be emitted first. PR-URL: https://github.com/nodejs/node/pull/9066 Reviewed-By: Matteo Collina Reviewed-By: Rich Trott Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Ilkka Myller --- lib/net.js | 8 +++++--- test/parallel/test-net-end-close.js | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 test/parallel/test-net-end-close.js diff --git a/lib/net.js b/lib/net.js index 5caf7747194bc5..bc531158057c26 100644 --- a/lib/net.js +++ b/lib/net.js @@ -571,14 +571,16 @@ function onread(nread, buffer) { debug('EOF'); + // push a null to signal the end of data. + // Do it before `maybeDestroy` for correct order of events: + // `end` -> `close` + self.push(null); + if (self._readableState.length === 0) { self.readable = false; maybeDestroy(self); } - // push a null to signal the end of data. - self.push(null); - // internal end event so that we know that the actual socket // is no longer readable, and we can start the shutdown // procedure. No need to wait for all the data to be consumed. diff --git a/test/parallel/test-net-end-close.js b/test/parallel/test-net-end-close.js new file mode 100644 index 00000000000000..d9f33fd7d8d1cf --- /dev/null +++ b/test/parallel/test-net-end-close.js @@ -0,0 +1,26 @@ +'use strict'; +require('../common'); +const assert = require('assert'); +const net = require('net'); + +const uv = process.binding('uv'); + +const s = new net.Socket({ + handle: { + readStart: function() { + process.nextTick(() => this.onread(uv.UV_EOF, null)); + }, + close: (cb) => process.nextTick(cb) + }, + writable: false +}); +s.resume(); + +const events = []; + +s.on('end', () => events.push('end')); +s.on('close', () => events.push('close')); + +process.on('exit', () => { + assert.deepStrictEqual(events, [ 'end', 'close' ]); +}); From 87285ed984535a152a63e4ca6c047dbf8cae25af Mon Sep 17 00:00:00 2001 From: jessicaquynh Date: Wed, 12 Oct 2016 01:14:45 -0400 Subject: [PATCH 027/145] tools: avoid let in for loops This adds a new ESLint tool to check for let declarations within the for, forIn, forOf expressions. Fixes: https://github.com/nodejs/node/issues/9045 Ref: https://github.com/nodejs/node/pull/8873 PR-URL: https://github.com/nodejs/node/pull/9049 Reviewed-By: Rich Trott Reviewed-By: Myles Borins Reviewed-By: Teddy Katz Reviewed-By: Prince John Wesley Reviewed-By: James M Snell --- lib/.eslintrc | 1 + .../eslint-rules/no-let-in-for-declaration.js | 46 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 tools/eslint-rules/no-let-in-for-declaration.js diff --git a/lib/.eslintrc b/lib/.eslintrc index 8fb98b7c180458..d8e34f85b5759d 100644 --- a/lib/.eslintrc +++ b/lib/.eslintrc @@ -2,3 +2,4 @@ rules: # Custom rules in tools/eslint-rules require-buffer: 2 buffer-constructor: 2 + no-let-in-for-declaration: 2 diff --git a/tools/eslint-rules/no-let-in-for-declaration.js b/tools/eslint-rules/no-let-in-for-declaration.js new file mode 100644 index 00000000000000..8b1a6783e0773d --- /dev/null +++ b/tools/eslint-rules/no-let-in-for-declaration.js @@ -0,0 +1,46 @@ +/** + * @fileoverview Prohibit the use of `let` as the loop variable + * in the initialization of for, and the left-hand + * iterator in forIn and forOf loops. + * + * @author Jessica Quynh Tran + */ + +'use strict'; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + create(context) { + + const msg = 'Use of `let` as the loop variable in a for-loop is ' + + 'not recommended. Please use `var` instead.'; + + /** + * Report function to test if the for-loop is declared using `let`. + */ + function testForLoop(node) { + if (node.init && node.init.kind === 'let') { + context.report(node.init, msg); + } + } + + /** + * Report function to test if the for-in or for-of loop + * is declared using `let`. + */ + function testForInOfLoop(node) { + if (node.left && node.left.kind === 'let') { + context.report(node.left, msg); + } + } + + return { + 'ForStatement': testForLoop, + 'ForInStatement': testForInOfLoop, + 'ForOfStatement': testForInOfLoop + }; + } +}; From b2a2a5783630b524b109300e70db7288ada3ec64 Mon Sep 17 00:00:00 2001 From: John Vilk Date: Mon, 10 Oct 2016 12:28:49 -0400 Subject: [PATCH 028/145] doc: specify that errno is a number, not a string The documentation erroneously described the errno property as an alias for the code property, but that is not the case in the implementation. errno is the error code of the error as a number, and code is the error code of the error as a string. PR-URL: https://github.com/nodejs/node/pull/9007 Reviewed-By: Luigi Pinca Reviewed-By: Gibson Fahnestock --- doc/api/errors.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/api/errors.md b/doc/api/errors.md index 5ede6e6e38ea45..28f1858a1ded57 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -449,13 +449,15 @@ added properties. ### Class: System Error #### error.code -#### error.errno Returns a string representing the error code, which is always `E` followed by a sequence of capital letters, and may be referenced in `man 2 intro`. -The properties `error.code` and `error.errno` are aliases of one another and -return the same value. +#### error.errno + +Returns a number corresponding to the **negated** error code, which may be +referenced in `man 2 intro`. For example, an `ENOENT` error has an `errno` of +`-2` because the error code for `ENOENT` is `2`. #### error.syscall From def6874b5faaaedb824a8b509b5d7e24f082fb30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Thu, 13 Oct 2016 13:36:26 +0100 Subject: [PATCH 029/145] test: use npm sandbox in test-npm-install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit npm should run in a sandbox to avoid unwanted interactions. Without this change, npm would read the userconfig file $HOME/.npmrc which may contain configs that break this test. Fixes: https://github.com/nodejs/node/issues/9074 PR-URL: https://github.com/nodejs/node/pull/9079 Reviewed-By: Jeremiah Senkpiel Reviewed-By: Johan Bergström Reviewed-By: Santiago Gimeno Reviewed-By: Myles Borins Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig --- test/parallel/test-npm-install.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-npm-install.js b/test/parallel/test-npm-install.js index c716e48aefedab..8a900cf7f7c759 100644 --- a/test/parallel/test-npm-install.js +++ b/test/parallel/test-npm-install.js @@ -7,6 +7,10 @@ const assert = require('assert'); const fs = require('fs'); common.refreshTmpDir(); +const npmSandbox = path.join(common.tmpDir, 'npm-sandbox'); +fs.mkdirSync(npmSandbox); +const installDir = path.join(common.tmpDir, 'install-dir'); +fs.mkdirSync(installDir); const npmPath = path.join( common.testDir, @@ -28,15 +32,18 @@ const pkgContent = JSON.stringify({ } }); -const pkgPath = path.join(common.tmpDir, 'package.json'); +const pkgPath = path.join(installDir, 'package.json'); fs.writeFileSync(pkgPath, pkgContent); const env = Object.create(process.env); env['PATH'] = path.dirname(process.execPath); +env['NPM_CONFIG_PREFIX'] = path.join(npmSandbox, 'npm-prefix'); +env['NPM_CONFIG_TMP'] = path.join(npmSandbox, 'npm-tmp'); +env['HOME'] = path.join(npmSandbox, 'home'); const proc = spawn(process.execPath, args, { - cwd: common.tmpDir, + cwd: installDir, env: env }); @@ -44,7 +51,7 @@ function handleExit(code, signalCode) { assert.equal(code, 0, 'npm install should run without an error'); assert.ok(signalCode === null, 'signalCode should be null'); assert.doesNotThrow(function() { - fs.accessSync(common.tmpDir + '/node_modules/package-name'); + fs.accessSync(installDir + '/node_modules/package-name'); }); } From 4d4d02ace4cd4791e41a40e7e1fa6a0f2dc5f923 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 11 Oct 2016 20:01:32 +0200 Subject: [PATCH 030/145] crypto: fix faulty logic in iv size check Fix a regression introduced in commit 2996b5c ("crypto: Allow GCM ciphers to have a longer IV length") from April 2016 where a misplaced parenthesis in a 'is ECB cipher?' check made it possible to use empty IVs with non-ECB ciphers. Also fix some exit bugs in test/parallel/test-crypto-authenticated.js that were introduced in commit 4a40832 ("test: cleanup IIFE tests") where removing the IFFEs made the test exit prematurely instead of just skipping subtests. PR-URL: https://github.com/nodejs/node/pull/9032 Refs: https://github.com/nodejs/node/pull/6376 Refs: https://github.com/nodejs/node/issues/9024 Reviewed-By: Anna Henningsen Reviewed-By: Fedor Indutny Reviewed-By: Shigeki Ohtsu --- src/node_crypto.cc | 20 ++++----- test/parallel/test-crypto-authenticated.js | 42 ++++++++----------- .../test-crypto-cipheriv-decipheriv.js | 36 +++++++++++++++- 3 files changed, 60 insertions(+), 38 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index d0027ce4d42286..532efdd41a5579 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -3259,11 +3259,10 @@ void CipherBase::InitIv(const char* cipher_type, return env()->ThrowError("Unknown cipher"); } - /* OpenSSL versions up to 0.9.8l failed to return the correct - iv_length (0) for ECB ciphers */ - if (EVP_CIPHER_iv_length(cipher_) != iv_len && - !(EVP_CIPHER_mode(cipher_) == EVP_CIPH_ECB_MODE && iv_len == 0) && - !(EVP_CIPHER_mode(cipher_) == EVP_CIPH_GCM_MODE) && iv_len > 0) { + const int expected_iv_len = EVP_CIPHER_iv_length(cipher_); + const bool is_gcm_mode = (EVP_CIPH_GCM_MODE == EVP_CIPHER_mode(cipher_)); + + if (is_gcm_mode == false && iv_len != expected_iv_len) { return env()->ThrowError("Invalid IV length"); } @@ -3271,13 +3270,10 @@ void CipherBase::InitIv(const char* cipher_type, const bool encrypt = (kind_ == kCipher); EVP_CipherInit_ex(&ctx_, cipher_, nullptr, nullptr, nullptr, encrypt); - /* Set IV length. Only required if GCM cipher and IV is not default iv. */ - if (EVP_CIPHER_mode(cipher_) == EVP_CIPH_GCM_MODE && - iv_len != EVP_CIPHER_iv_length(cipher_)) { - if (!EVP_CIPHER_CTX_ctrl(&ctx_, EVP_CTRL_GCM_SET_IVLEN, iv_len, nullptr)) { - EVP_CIPHER_CTX_cleanup(&ctx_); - return env()->ThrowError("Invalid IV length"); - } + if (is_gcm_mode && + !EVP_CIPHER_CTX_ctrl(&ctx_, EVP_CTRL_GCM_SET_IVLEN, iv_len, nullptr)) { + EVP_CIPHER_CTX_cleanup(&ctx_); + return env()->ThrowError("Invalid IV length"); } if (!EVP_CIPHER_CTX_set_key_length(&ctx_, key_len)) { diff --git a/test/parallel/test-crypto-authenticated.js b/test/parallel/test-crypto-authenticated.js index 0e1c1298bfcda2..8eab91e549dfa7 100644 --- a/test/parallel/test-crypto-authenticated.js +++ b/test/parallel/test-crypto-authenticated.js @@ -307,10 +307,10 @@ const TEST_CASES = [ tag: 'a44a8266ee1c8eb0c8b5d4cf5ae9f19a', tampered: false }, ]; -var ciphers = crypto.getCiphers(); +const ciphers = crypto.getCiphers(); -for (var i in TEST_CASES) { - var test = TEST_CASES[i]; +for (const i in TEST_CASES) { + const test = TEST_CASES[i]; if (ciphers.indexOf(test.algo) === -1) { common.skip('unsupported ' + test.algo + ' test'); @@ -359,8 +359,7 @@ for (var i in TEST_CASES) { } } - { - if (!test.password) return; + if (test.password) { if (common.hasFipsCrypto) { assert.throws(() => { crypto.createCipher(test.algo, test.password); }, /not supported in FIPS mode/); @@ -379,8 +378,7 @@ for (var i in TEST_CASES) { } } - { - if (!test.password) return; + if (test.password) { if (common.hasFipsCrypto) { assert.throws(() => { crypto.createDecipher(test.algo, test.password); }, /not supported in FIPS mode/); @@ -400,24 +398,6 @@ for (var i in TEST_CASES) { } } - // after normal operation, test some incorrect ways of calling the API: - // it's most certainly enough to run these tests with one algorithm only. - - if (i > 0) { - continue; - } - - { - // non-authenticating mode: - const encrypt = crypto.createCipheriv('aes-128-cbc', - 'ipxp9a6i1Mb4USb4', '6fKjEjR3Vl30EUYC'); - encrypt.update('blah', 'ascii'); - encrypt.final(); - assert.throws(() => { encrypt.getAuthTag(); }, / state/); - assert.throws(() => { encrypt.setAAD(Buffer.from('123', 'ascii')); }, - / state/); - } - { // trying to get tag before inputting all data: const encrypt = crypto.createCipheriv(test.algo, @@ -452,3 +432,15 @@ for (var i in TEST_CASES) { }, /Invalid IV length/); } } + +// Non-authenticating mode: +{ + const encrypt = + crypto.createCipheriv('aes-128-cbc', + 'ipxp9a6i1Mb4USb4', + '6fKjEjR3Vl30EUYC'); + encrypt.update('blah', 'ascii'); + encrypt.final(); + assert.throws(() => encrypt.getAuthTag(), / state/); + assert.throws(() => encrypt.setAAD(Buffer.from('123', 'ascii')), / state/); +} diff --git a/test/parallel/test-crypto-cipheriv-decipheriv.js b/test/parallel/test-crypto-cipheriv-decipheriv.js index 9c2091a836d79f..a3a14738c43e73 100644 --- a/test/parallel/test-crypto-cipheriv-decipheriv.js +++ b/test/parallel/test-crypto-cipheriv-decipheriv.js @@ -61,5 +61,39 @@ testCipher1('0123456789abcd0123456789', '12345678'); testCipher1('0123456789abcd0123456789', Buffer.from('12345678')); testCipher1(Buffer.from('0123456789abcd0123456789'), '12345678'); testCipher1(Buffer.from('0123456789abcd0123456789'), Buffer.from('12345678')); - testCipher2(Buffer.from('0123456789abcd0123456789'), Buffer.from('12345678')); + +// Zero-sized IV should be accepted in ECB mode. +crypto.createCipheriv('aes-128-ecb', Buffer.alloc(16), Buffer.alloc(0)); + +// But non-empty IVs should be rejected. +for (let n = 1; n < 256; n += 1) { + assert.throws( + () => crypto.createCipheriv('aes-128-ecb', Buffer.alloc(16), + Buffer.alloc(n)), + /Invalid IV length/); +} + +// Correctly sized IV should be accepted in CBC mode. +crypto.createCipheriv('aes-128-cbc', Buffer.alloc(16), Buffer.alloc(16)); + +// But all other IV lengths should be rejected. +for (let n = 0; n < 256; n += 1) { + if (n === 16) continue; + assert.throws( + () => crypto.createCipheriv('aes-128-cbc', Buffer.alloc(16), + Buffer.alloc(n)), + /Invalid IV length/); +} + +// Zero-sized IV should be rejected in GCM mode. +assert.throws( + () => crypto.createCipheriv('aes-128-gcm', Buffer.alloc(16), + Buffer.alloc(0)), + /Invalid IV length/); + +// But all other IV lengths should be accepted. +for (let n = 1; n < 256; n += 1) { + if (common.hasFipsCrypto && n < 12) continue; + crypto.createCipheriv('aes-128-gcm', Buffer.alloc(16), Buffer.alloc(n)); +} From de2f050ac3b35d7123e6f435521c5deb1e143b48 Mon Sep 17 00:00:00 2001 From: scott stern Date: Tue, 11 Oct 2016 16:20:51 -0700 Subject: [PATCH 031/145] doc: update reference to list hash algorithms in crypto.md PR-URL: https://github.com/nodejs/node/pull/9043 Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Rich Trott --- doc/api/crypto.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 8b99eed1e27e0b..033d3abb99c73d 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -1241,18 +1241,18 @@ input.on('readable', () => { added: v0.1.92 --> -Creates and returns a `Sign` object that uses the given `algorithm`. On -recent OpenSSL releases, `openssl list-public-key-algorithms` will -display the available signing algorithms. One example is `'RSA-SHA256'`. +Creates and returns a `Sign` object that uses the given `algorithm`. +Use [`crypto.getHashes()`][] to obtain an array of names of the available +signing algorithms. ### crypto.createVerify(algorithm) -Creates and returns a `Verify` object that uses the given algorithm. On -recent OpenSSL releases, `openssl list-public-key-algorithms` will -display the available signing algorithms. One example is `'RSA-SHA256'`. +Creates and returns a `Verify` object that uses the given algorithm. +Use [`crypto.getHashes()`][] to obtain an array of names of the available +signing algorithms. ### crypto.getCiphers() -Returns an array with the names of the supported hash algorithms. +Returns an array of the names of the supported hash algorithms, +such as `RSA-SHA256`. Example: From 2c5b27a247b5277955b7e5d1d883511f16dd5d99 Mon Sep 17 00:00:00 2001 From: marzelin Date: Wed, 12 Oct 2016 21:57:04 +0200 Subject: [PATCH 032/145] doc: improved example for http.get PR-URL: https://github.com/nodejs/node/pull/9065 Reviewed-By: James M Snell Reviewed-By: Luigi Pinca --- doc/api/http.md | 45 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/doc/api/http.md b/doc/api/http.md index 608760f66534d1..ecdde9b5d0f82e 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -1448,16 +1448,47 @@ added: v0.3.6 * Returns: {http.ClientRequest} Since most requests are GET requests without bodies, Node.js provides this -convenience method. The only difference between this method and [`http.request()`][] -is that it sets the method to GET and calls `req.end()` automatically. +convenience method. The only difference between this method and +[`http.request()`][] is that it sets the method to GET and calls `req.end()` +automatically. Note that response data must be consumed in the callback +for reasons stated in [`http.ClientRequest`][] section. -Example: +The `callback` is invoked with a single argument that is an instance of +[`http.IncomingMessage`][] + +JSON Fetching Example: ```js -http.get('http://www.google.com/index.html', (res) => { - console.log(`Got response: ${res.statusCode}`); - // consume response body - res.resume(); +http.get('http://nodejs.org/dist/index.json', (res) => { + const statusCode = res.statusCode; + const contentType = res.headers['content-type']; + + let error; + if (statusCode !== 200) { + error = new Error(`Request Failed.\n` + + `Status Code: ${statusCode}`); + } else if (!/^application\/json/.test(contentType)) { + error = new Error(`Invalid content-type.\n` + + `Expected application/json but received ${contentType}`); + } + if (error) { + console.log(error.message); + // consume response data to free up memory + res.resume(); + return; + } + + res.setEncoding('utf8'); + let rawData = ''; + res.on('data', (chunk) => rawData += chunk); + res.on('end', () => { + try { + let parsedData = JSON.parse(rawData); + console.log(parsedData); + } catch (e) { + console.log(e.message); + } + }); }).on('error', (e) => { console.log(`Got error: ${e.message}`); }); From e5777b344c14851ca9d82ee6820c67013199a740 Mon Sep 17 00:00:00 2001 From: Benji Marinacci Date: Fri, 14 Oct 2016 12:27:14 -0700 Subject: [PATCH 033/145] doc: edit Stream api grammar Sections: - Introduction - Orginization of this Document - Object Mode - Buffering - API for Stream Implementers PR-URL: https://github.com/nodejs/node/pull/9100 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen --- doc/api/stream.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 61520c8cedc433..ee378c9f66425b 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -19,14 +19,14 @@ The `stream` module can be accessed using: const stream = require('stream'); ``` -While it is important for all Node.js users to understand how streams works, +While it is important for all Node.js users to understand how streams work, the `stream` module itself is most useful for developers that are creating new types of stream instances. Developer's who are primarily *consuming* stream objects will rarely (if ever) have need to use the `stream` module directly. -## Organization of this document +## Organization of this Document -This document is divided into two primary sections and third section for +This document is divided into two primary sections with a third section for additional notes. The first section explains the elements of the stream API that are required to *use* streams within an application. The second section explains the elements of the API that are required to *implement* new types of streams. @@ -48,7 +48,7 @@ There are four fundamental stream types within Node.js: All streams created by Node.js APIs operate exclusively on strings and `Buffer` objects. It is possible, however, for stream implementations to work with other -types of JavaScript values (with the exception of `null` which serves a special +types of JavaScript values (with the exception of `null`, which serves a special purpose within streams). Such streams are considered to operate in "object mode". @@ -87,7 +87,7 @@ total size of the internal write buffer is below the threshold set by the size of the internal buffer reaches or exceeds the `highWaterMark`, `false` will be returned. -A key goal of the `stream` API, and in particular the [`stream.pipe()`] method, +A key goal of the `stream` API, particularly the [`stream.pipe()`] method, is to limit the buffering of data to acceptable levels such that sources and destinations of differing speeds will not overwhelm the available memory. @@ -98,8 +98,8 @@ appropriate and efficient flow of data. For example, [`net.Socket`][] instances are [Duplex][] streams whose Readable side allows consumption of data received *from* the socket and whose Writable side allows writing data *to* the socket. Because data may be written to the socket at a faster or slower rate than data -is received, it is important each side operate (and buffer) independently of -the other. +is received, it is important for each side to operate (and buffer) independently +of the other. ## API for Stream Consumers @@ -1061,7 +1061,7 @@ Examples of Transform streams include: The `stream` module API has been designed to make it possible to easily -implement streams using JavaScript's prototypical inheritance model. +implement streams using JavaScript's prototypal inheritance model. First, a stream developer would declare a new JavaScript class that extends one of the four basic stream classes (`stream.Writable`, `stream.Readable`, From fd006e5c46183bc51571e67a0b52a82421e476d7 Mon Sep 17 00:00:00 2001 From: Indrek Ardel Date: Fri, 14 Oct 2016 14:08:32 +0300 Subject: [PATCH 034/145] doc: further improve child_process doc types PR-URL: https://github.com/nodejs/node/pull/9095 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen --- doc/api/child_process.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/child_process.md b/doc/api/child_process.md index ae3d18fd080886..5497201fcfa227 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -1046,7 +1046,7 @@ this occurs. added: v0.1.90 --> -* {Stream.Readable} +* {stream.Readable} A `Readable Stream` that represents the child process's `stderr`. @@ -1061,7 +1061,7 @@ the same value. added: v0.1.90 --> -* {Stream.Writable} +* {stream.Writable} A `Writable Stream` that represents the child process's `stdin`. @@ -1119,7 +1119,7 @@ assert.equal(child.stdio[2], child.stderr); added: v0.1.90 --> -* {Stream.Readable} +* {stream.Readable} A `Readable Stream` that represents the child process's `stdout`. From bdd91e0d8e5afc1578421fd7a735d1283b5b1c92 Mon Sep 17 00:00:00 2001 From: Parambir Singh Date: Mon, 17 Oct 2016 11:20:56 +1100 Subject: [PATCH 035/145] doc: fix typo in zlib.md Change 'methods with throw an error' to 'methods will throw an error'. PR-URL: https://github.com/nodejs/node/pull/9123 Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: Teddy Katz Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Brian White --- doc/api/zlib.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/zlib.md b/doc/api/zlib.md index 71d5de1899ddfd..1c0029242671bb 100644 --- a/doc/api/zlib.md +++ b/doc/api/zlib.md @@ -113,7 +113,7 @@ http.createServer((request, response) => { }).listen(1337); ``` -By default, the `zlib` methods with throw an error when decompressing +By default, the `zlib` methods will throw an error when decompressing truncated data. However, if it is known that the data is incomplete, or the desire is to inspect only the beginning of a compressed file, it is possible to suppress the default error handling by changing the flushing From 127ed73f3c74d7901d39eab3f3a6ce38c92c9f3e Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 16 Oct 2016 20:40:39 -0700 Subject: [PATCH 036/145] test: remove unused common.libDir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/9124 Reviewed-By: James M Snell Reviewed-By: Michaël Zasso Reviewed-By: Luigi Pinca Reviewed-By: Brian White --- test/README.md | 5 ----- test/common.js | 11 +++++------ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/test/README.md b/test/README.md index c939f722e27493..0971adac3452ed 100644 --- a/test/README.md +++ b/test/README.md @@ -271,11 +271,6 @@ Platform check for Windows 32-bit on Windows 64-bit. Checks whether any globals are not on the `knownGlobals` list. -### libDir -* return [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) - -Path to the 'lib' directory. - ### localhostIPv4 * return [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) diff --git a/test/common.js b/test/common.js index 0bd435f0e23b6b..d1d9c7876faa5c 100644 --- a/test/common.js +++ b/test/common.js @@ -1,10 +1,10 @@ /* eslint-disable required-modules */ 'use strict'; -var path = require('path'); -var fs = require('fs'); -var assert = require('assert'); -var os = require('os'); -var child_process = require('child_process'); +const path = require('path'); +const fs = require('fs'); +const assert = require('assert'); +const os = require('os'); +const child_process = require('child_process'); const stream = require('stream'); const util = require('util'); const Timer = process.binding('timer_wrap').Timer; @@ -14,7 +14,6 @@ const testRoot = process.env.NODE_TEST_DIR ? exports.testDir = __dirname; exports.fixturesDir = path.join(exports.testDir, 'fixtures'); -exports.libDir = path.join(exports.testDir, '../lib'); exports.tmpDirName = 'tmp'; // PORT should match the definition in test/testpy/__init__.py. exports.PORT = +process.env.NODE_COMMON_PORT || 12346; From 39a53a0f29d918752d9c49c3343ae1c9100edf0a Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 15 Oct 2016 12:16:42 -0700 Subject: [PATCH 037/145] test: remove unneeded escaping in template strings The no-useless-escape rule in ESLint did not previously flag certain unnecessary escaping in template strings. These will be flagged in ESLint 3.8.0. PR-URL: https://github.com/nodejs/node/pull/9112 Reviewed-By: Teddy Katz Reviewed-By: James M Snell Reviewed-By: Roman Reiss --- test/parallel/test-debug-port-numbers.js | 2 +- test/parallel/test-debugger-pid.js | 2 +- test/parallel/test-tick-processor-cpp-core.js | 2 +- test/parallel/test-vm-cached-data.js | 2 +- test/sequential/test-child-process-execsync.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-debug-port-numbers.js b/test/parallel/test-debug-port-numbers.js index 683287340c6f8d..37ff108278fde8 100644 --- a/test/parallel/test-debug-port-numbers.js +++ b/test/parallel/test-debug-port-numbers.js @@ -53,7 +53,7 @@ function kill(child) { process.on('exit', function() { for (const child of children) { const port = child.test.port; - const one = RegExp(`Debugger listening on (\\[::\\]|0\.0\.0\.0):${port}`); + const one = RegExp(`Debugger listening on (\\[::\\]|0.0.0.0):${port}`); const two = RegExp(`connecting to 127.0.0.1:${port}`); assert(one.test(child.test.stdout)); assert(two.test(child.test.stdout)); diff --git a/test/parallel/test-debugger-pid.js b/test/parallel/test-debugger-pid.js index 1da34811076b95..2b81da700f50a0 100644 --- a/test/parallel/test-debugger-pid.js +++ b/test/parallel/test-debugger-pid.js @@ -43,7 +43,7 @@ interfacer.on('line', function(line) { } } else { line = line.replace(/^(debug> *)+/, ''); - expected = `(node:${pid}) Target process: 655555 doesn\'t exist.`; + expected = `(node:${pid}) Target process: 655555 doesn't exist.`; } assert.strictEqual(expected, line); diff --git a/test/parallel/test-tick-processor-cpp-core.js b/test/parallel/test-tick-processor-cpp-core.js index 2bc595e7ff732a..72eb25e91c394a 100644 --- a/test/parallel/test-tick-processor-cpp-core.js +++ b/test/parallel/test-tick-processor-cpp-core.js @@ -20,7 +20,7 @@ const base = require('./tick-processor-base.js'); base.runTest({ pattern: /RunInDebugContext/, code: `function f() { - require(\'vm\').runInDebugContext(\'Debug\'); + require('vm').runInDebugContext('Debug'); setImmediate(function() { f(); }); }; f();` diff --git a/test/parallel/test-vm-cached-data.js b/test/parallel/test-vm-cached-data.js index d80c1306cb971e..aa2dd26ad5a8b7 100644 --- a/test/parallel/test-vm-cached-data.js +++ b/test/parallel/test-vm-cached-data.js @@ -6,7 +6,7 @@ const spawnSync = require('child_process').spawnSync; const Buffer = require('buffer').Buffer; function getSource(tag) { - return `(function ${tag}() { return \'${tag}\'; })`; + return `(function ${tag}() { return '${tag}'; })`; } function produce(source, count) { diff --git a/test/sequential/test-child-process-execsync.js b/test/sequential/test-child-process-execsync.js index e16fa32a400ffb..01d7f868845ae0 100644 --- a/test/sequential/test-child-process-execsync.js +++ b/test/sequential/test-child-process-execsync.js @@ -48,7 +48,7 @@ var msgBuf = Buffer.from(msg + '\n'); // console.log ends every line with just '\n', even on Windows. -cmd = `"${process.execPath}" -e "console.log(\'${msg}\');"`; +cmd = `"${process.execPath}" -e "console.log('${msg}');"`; ret = execSync(cmd); From e9d5cd79bb74f10072708bb48169e94c43bcea4e Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 15 Oct 2016 11:30:25 -0700 Subject: [PATCH 038/145] tools: update ESLint to v3.8.0 Update ESLint to v3.8.0. * Installed with `npm install --production` to avoid installing unnecessary dev files * Used `dmn -f clean` to further eliminate unneeded files PR-URL: https://github.com/nodejs/node/pull/9112 Reviewed-By: Teddy Katz Reviewed-By: James M Snell Reviewed-By: Roman Reiss --- tools/eslint/CHANGELOG.md | 3412 ------- tools/eslint/README.md | 1 + tools/eslint/bin/eslint.js | 26 +- tools/eslint/conf/eslint.json | 1 + tools/eslint/lib/ast-utils.js | 23 + tools/eslint/lib/cli-engine.js | 51 +- tools/eslint/lib/cli.js | 37 +- .../code-path-analysis/code-path-analyzer.js | 12 +- .../lib/code-path-analysis/code-path-state.js | 2 +- .../lib/code-path-analysis/code-path.js | 2 +- .../lib/code-path-analysis/debug-helpers.js | 34 +- .../lib/code-path-analysis/fork-context.js | 4 +- tools/eslint/lib/config.js | 10 +- tools/eslint/lib/config/autoconfig.js | 2 +- tools/eslint/lib/config/config-file.js | 58 +- tools/eslint/lib/config/config-initializer.js | 18 +- tools/eslint/lib/config/config-ops.js | 2 +- tools/eslint/lib/config/environments.js | 2 +- tools/eslint/lib/config/plugins.js | 6 +- tools/eslint/lib/eslint.js | 38 +- tools/eslint/lib/formatters/checkstyle.js | 15 +- tools/eslint/lib/formatters/compact.js | 14 +- tools/eslint/lib/formatters/html.js | 6 +- tools/eslint/lib/formatters/jslint-xml.js | 13 +- tools/eslint/lib/formatters/junit.js | 16 +- tools/eslint/lib/formatters/stylish.js | 10 +- tools/eslint/lib/formatters/table.js | 6 +- tools/eslint/lib/formatters/tap.js | 8 +- tools/eslint/lib/formatters/unix.js | 13 +- tools/eslint/lib/formatters/visualstudio.js | 12 +- tools/eslint/lib/ignored-paths.js | 8 +- tools/eslint/lib/internal-rules/.eslintrc.yml | 3 + .../internal-consistent-docs-description.js | 131 + tools/eslint/lib/options.js | 4 +- tools/eslint/lib/rules.js | 2 +- tools/eslint/lib/rules/.eslintrc.yml | 1 + .../eslint/lib/rules/array-callback-return.js | 4 +- tools/eslint/lib/rules/arrow-parens.js | 2 +- .../lib/rules/class-methods-use-this.js | 28 +- tools/eslint/lib/rules/comma-dangle.js | 244 +- tools/eslint/lib/rules/curly.js | 97 +- tools/eslint/lib/rules/dot-location.js | 22 +- tools/eslint/lib/rules/eol-last.js | 66 +- tools/eslint/lib/rules/func-call-spacing.js | 2 +- tools/eslint/lib/rules/func-name-matching.js | 149 + tools/eslint/lib/rules/id-length.js | 4 +- tools/eslint/lib/rules/indent.js | 216 +- tools/eslint/lib/rules/init-declarations.js | 2 +- tools/eslint/lib/rules/keyword-spacing.js | 44 +- .../eslint/lib/rules/line-comment-position.js | 2 +- .../lib/rules/lines-around-directive.js | 9 +- tools/eslint/lib/rules/max-len.js | 7 +- tools/eslint/lib/rules/max-params.js | 2 +- .../lib/rules/max-statements-per-line.js | 20 +- tools/eslint/lib/rules/max-statements.js | 2 +- tools/eslint/lib/rules/new-cap.js | 2 +- tools/eslint/lib/rules/newline-after-var.js | 2 +- tools/eslint/lib/rules/no-extra-bind.js | 13 +- tools/eslint/lib/rules/no-extra-parens.js | 17 +- .../eslint/lib/rules/no-implicit-coercion.js | 35 +- tools/eslint/lib/rules/no-implicit-globals.js | 2 +- .../eslint/lib/rules/no-inner-declarations.js | 2 +- tools/eslint/lib/rules/no-lonely-if.js | 46 +- tools/eslint/lib/rules/no-mixed-requires.js | 2 +- .../lib/rules/no-multiple-empty-lines.js | 180 +- tools/eslint/lib/rules/no-redeclare.js | 2 +- tools/eslint/lib/rules/no-regex-spaces.js | 30 +- .../lib/rules/no-restricted-properties.js | 149 +- tools/eslint/lib/rules/no-shadow.js | 2 +- tools/eslint/lib/rules/no-spaced-func.js | 2 +- tools/eslint/lib/rules/no-undef-init.js | 33 +- .../eslint/lib/rules/no-unused-expressions.js | 2 +- tools/eslint/lib/rules/no-unused-vars.js | 38 +- .../lib/rules/no-useless-computed-key.js | 23 +- tools/eslint/lib/rules/no-useless-escape.js | 53 +- .../rules/no-whitespace-before-property.js | 6 + tools/eslint/lib/rules/object-shorthand.js | 37 +- .../lib/rules/one-var-declaration-per-line.js | 9 +- .../eslint/lib/rules/prefer-arrow-callback.js | 5 +- .../lib/rules/prefer-numeric-literals.js | 21 +- tools/eslint/lib/rules/prefer-spread.js | 23 +- tools/eslint/lib/rules/prefer-template.js | 130 +- tools/eslint/lib/rules/quote-props.js | 106 +- tools/eslint/lib/rules/quotes.js | 24 +- tools/eslint/lib/rules/semi.js | 2 +- tools/eslint/lib/rules/sort-keys.js | 4 +- .../lib/rules/space-before-function-paren.js | 40 +- tools/eslint/lib/rules/space-infix-ops.js | 2 +- tools/eslint/lib/rules/space-unary-ops.js | 14 +- tools/eslint/lib/rules/strict.js | 57 +- tools/eslint/lib/rules/valid-jsdoc.js | 6 +- tools/eslint/lib/rules/valid-typeof.js | 21 +- tools/eslint/lib/rules/wrap-iife.js | 111 +- tools/eslint/lib/rules/yoda.js | 67 +- tools/eslint/lib/testers/rule-tester.js | 68 +- tools/eslint/lib/timing.js | 2 +- tools/eslint/lib/util/glob-util.js | 4 +- tools/eslint/lib/util/module-resolver.js | 2 +- tools/eslint/lib/util/node-event-generator.js | 2 +- tools/eslint/lib/util/npm-util.js | 2 +- tools/eslint/lib/util/source-code-util.js | 4 +- tools/eslint/lib/util/xml-escape.js | 4 +- .../acorn-jsx/node_modules/.bin/acorn | 1 + .../node_modules/acorn/.tern-project | 6 + .../acorn-jsx/node_modules/acorn/AUTHORS | 59 + .../node_modules/acorn}/LICENSE | 4 +- .../acorn-jsx/node_modules/acorn/README.md | 407 + .../acorn-jsx/node_modules/acorn/bin/acorn | 65 + .../acorn/bin/generate-identifier-regex.js | 55 + .../node_modules/acorn/bin/update_authors.sh | 6 + .../acorn-jsx/node_modules/acorn/dist/.keep | 0 .../node_modules/acorn/dist/acorn.es.js | 3112 +++++++ .../node_modules/acorn/dist/acorn.js | 3142 +++++++ .../node_modules/acorn/dist/acorn_loose.es.js | 1261 +++ .../node_modules/acorn/dist/acorn_loose.js | 1273 +++ .../node_modules/acorn/dist/walk.es.js | 342 + .../acorn-jsx/node_modules/acorn/dist/walk.js | 360 + .../acorn-jsx/node_modules/acorn/package.json | 278 + .../node_modules/acorn/rollup/config.bin.js | 15 + .../node_modules/acorn/rollup/config.loose.js | 20 + .../node_modules/acorn/rollup/config.main.js | 11 + .../node_modules/acorn/rollup/config.walk.js | 11 + .../node_modules/acorn/src/bin/acorn.js | 58 + .../node_modules/acorn/src/expression.js | 701 ++ .../node_modules/acorn/src/identifier.js | 82 + .../acorn-jsx/node_modules/acorn/src/index.js | 67 + .../node_modules/acorn/src/location.js | 26 + .../node_modules/acorn/src/locutil.js | 42 + .../acorn/src/loose/expression.js | 514 ++ .../node_modules/acorn/src/loose/index.js | 50 + .../node_modules/acorn/src/loose/parseutil.js | 1 + .../node_modules/acorn/src/loose/state.js | 160 + .../node_modules/acorn/src/loose/statement.js | 425 + .../node_modules/acorn/src/loose/tokenize.js | 108 + .../acorn-jsx/node_modules/acorn/src/lval.js | 216 + .../acorn-jsx/node_modules/acorn/src/node.js | 50 + .../node_modules/acorn/src/options.js | 120 + .../node_modules/acorn/src/parseutil.js | 109 + .../acorn-jsx/node_modules/acorn/src/state.js | 104 + .../node_modules/acorn/src/statement.js | 654 ++ .../node_modules/acorn/src/tokencontext.js | 110 + .../node_modules/acorn/src/tokenize.js | 696 ++ .../node_modules/acorn/src/tokentype.js | 147 + .../acorn-jsx/node_modules/acorn/src/util.js | 9 + .../node_modules/acorn/src/walk/index.js | 342 + .../node_modules/acorn/src/whitespace.js | 13 + .../node_modules/acorn-jsx/package.json | 1 - tools/eslint/node_modules/acorn/AUTHORS | 3 +- tools/eslint/node_modules/acorn/README.md | 13 +- tools/eslint/node_modules/acorn/bin/acorn | 14 +- .../node_modules/acorn/bin/update_authors.sh | 2 +- .../node_modules/acorn/dist/acorn.es.js | 394 +- tools/eslint/node_modules/acorn/dist/acorn.js | 393 +- .../node_modules/acorn/dist/acorn_loose.es.js | 110 +- .../node_modules/acorn/dist/acorn_loose.js | 458 +- .../eslint/node_modules/acorn/dist/walk.es.js | 2 +- tools/eslint/node_modules/acorn/dist/walk.js | 2 +- tools/eslint/node_modules/acorn/package.json | 41 +- .../node_modules/acorn/rollup/config.loose.js | 16 +- .../node_modules/acorn/src/bin/acorn.js | 14 +- .../node_modules/acorn/src/expression.js | 177 +- .../node_modules/acorn/src/identifier.js | 1 - tools/eslint/node_modules/acorn/src/index.js | 12 +- .../acorn/src/loose/expression.js | 70 +- .../node_modules/acorn/src/loose/index.js | 8 +- .../node_modules/acorn/src/loose/state.js | 3 +- .../node_modules/acorn/src/loose/statement.js | 35 +- .../node_modules/acorn/src/loose/tokenize.js | 2 +- tools/eslint/node_modules/acorn/src/lval.js | 9 +- .../eslint/node_modules/acorn/src/options.js | 17 +- .../node_modules/acorn/src/parseutil.js | 12 +- tools/eslint/node_modules/acorn/src/state.js | 16 +- .../node_modules/acorn/src/statement.js | 136 +- .../eslint/node_modules/acorn/src/tokenize.js | 5 +- .../node_modules/acorn/src/walk/index.js | 2 +- .../node_modules/acorn/src/whitespace.js | 2 +- .../node_modules/ajv-keywords/.eslintrc.yml | 32 + .../eslint/node_modules/ajv-keywords/LICENSE | 21 + .../node_modules/ajv-keywords/README.md | 173 + .../eslint/node_modules/ajv-keywords/index.js | 33 + .../ajv-keywords/keywords/index.js | 9 + .../ajv-keywords/keywords/instanceof.js | 55 + .../ajv-keywords/keywords/propertyNames.js | 48 + .../ajv-keywords/keywords/range.js | 40 + .../ajv-keywords/keywords/regexp.js | 33 + .../ajv-keywords/keywords/typeof.js | 33 + .../node_modules/ajv-keywords/package.json | 103 + .../eslint/node_modules/ajv/.tonic_example.js | 20 + tools/eslint/node_modules/ajv/LICENSE | 21 + tools/eslint/node_modules/ajv/README.md | 1160 +++ .../node_modules/ajv/dist/ajv.bundle.js | 7919 +++++++++++++++++ tools/eslint/node_modules/ajv/dist/ajv.min.js | 6 + .../node_modules/ajv/dist/ajv.min.js.map | 1 + .../node_modules/ajv/dist/nodent.min.js | 8 + .../node_modules/ajv/dist/regenerator.min.js | 12 + tools/eslint/node_modules/ajv/lib/ajv.d.ts | 262 + tools/eslint/node_modules/ajv/lib/ajv.js | 416 + tools/eslint/node_modules/ajv/lib/async.js | 214 + tools/eslint/node_modules/ajv/lib/cache.js | 26 + .../node_modules/ajv/lib/compile/_rules.js | 28 + .../node_modules/ajv/lib/compile/equal.js | 34 + .../node_modules/ajv/lib/compile/formats.js | 164 + .../node_modules/ajv/lib/compile/index.js | 381 + .../node_modules/ajv/lib/compile/resolve.js | 267 + .../node_modules/ajv/lib/compile/rules.js | 40 + .../ajv/lib/compile/schema_obj.js | 9 + .../ajv/lib/compile/ucs2length.js | 20 + .../node_modules/ajv/lib/compile/util.js | 257 + .../ajv/lib/compile/validation_error.js | 14 + .../node_modules/ajv/lib/dot/_limit.jst | 49 + .../node_modules/ajv/lib/dot/_limitItems.jst | 10 + .../node_modules/ajv/lib/dot/_limitLength.jst | 10 + .../ajv/lib/dot/_limitProperties.jst | 10 + .../eslint/node_modules/ajv/lib/dot/allOf.jst | 26 + .../eslint/node_modules/ajv/lib/dot/anyOf.jst | 48 + .../node_modules/ajv/lib/dot/coerce.def | 67 + .../node_modules/ajv/lib/dot/custom.jst | 182 + .../node_modules/ajv/lib/dot/defaults.def | 32 + .../node_modules/ajv/lib/dot/definitions.def | 179 + .../node_modules/ajv/lib/dot/dependencies.jst | 69 + .../eslint/node_modules/ajv/lib/dot/enum.jst | 26 + .../node_modules/ajv/lib/dot/errors.def | 185 + .../node_modules/ajv/lib/dot/format.jst | 74 + .../eslint/node_modules/ajv/lib/dot/items.jst | 100 + .../node_modules/ajv/lib/dot/missing.def | 34 + .../node_modules/ajv/lib/dot/multipleOf.jst | 20 + tools/eslint/node_modules/ajv/lib/dot/not.jst | 43 + .../eslint/node_modules/ajv/lib/dot/oneOf.jst | 44 + .../node_modules/ajv/lib/dot/pattern.jst | 14 + .../node_modules/ajv/lib/dot/properties.jst | 319 + tools/eslint/node_modules/ajv/lib/dot/ref.jst | 86 + .../node_modules/ajv/lib/dot/required.jst | 95 + .../node_modules/ajv/lib/dot/uniqueItems.jst | 38 + .../ajv/lib/dot/v5/_formatLimit.jst | 116 + .../node_modules/ajv/lib/dot/v5/constant.jst | 10 + .../ajv/lib/dot/v5/patternRequired.jst | 28 + .../node_modules/ajv/lib/dot/v5/switch.jst | 73 + .../node_modules/ajv/lib/dot/validate.jst | 210 + .../node_modules/ajv/lib/dotjs/README.md | 3 + .../ajv/lib/dotjs/_formatLimit.js | 176 + .../node_modules/ajv/lib/dotjs/_limit.js | 124 + .../node_modules/ajv/lib/dotjs/_limitItems.js | 76 + .../ajv/lib/dotjs/_limitLength.js | 81 + .../ajv/lib/dotjs/_limitProperties.js | 76 + .../node_modules/ajv/lib/dotjs/allOf.js | 36 + .../node_modules/ajv/lib/dotjs/anyOf.js | 65 + .../node_modules/ajv/lib/dotjs/constant.js | 53 + .../node_modules/ajv/lib/dotjs/custom.js | 210 + .../ajv/lib/dotjs/dependencies.js | 147 + .../eslint/node_modules/ajv/lib/dotjs/enum.js | 65 + .../node_modules/ajv/lib/dotjs/format.js | 117 + .../node_modules/ajv/lib/dotjs/items.js | 143 + .../node_modules/ajv/lib/dotjs/multipleOf.js | 77 + .../eslint/node_modules/ajv/lib/dotjs/not.js | 83 + .../node_modules/ajv/lib/dotjs/oneOf.js | 76 + .../node_modules/ajv/lib/dotjs/pattern.js | 75 + .../ajv/lib/dotjs/patternRequired.js | 52 + .../node_modules/ajv/lib/dotjs/properties.js | 445 + .../eslint/node_modules/ajv/lib/dotjs/ref.js | 122 + .../node_modules/ajv/lib/dotjs/required.js | 249 + .../node_modules/ajv/lib/dotjs/switch.js | 128 + .../node_modules/ajv/lib/dotjs/uniqueItems.js | 72 + .../node_modules/ajv/lib/dotjs/validate.js | 377 + tools/eslint/node_modules/ajv/lib/keyword.js | 82 + .../ajv/lib/refs/json-schema-draft-04.json | 150 + .../ajv/lib/refs/json-schema-v5.json | 328 + tools/eslint/node_modules/ajv/lib/v5.js | 52 + tools/eslint/node_modules/ajv/package.json | 164 + .../node_modules/ansi-escapes/package.json | 1 - .../node_modules/ansi-regex/package.json | 1 - .../node_modules/ansi-styles/package.json | 1 - .../argparse/lib/action_container.js | 4 +- .../argparse/lib/argument_parser.js | 82 +- .../argparse/lib/help/added_formatters.js | 4 +- .../argparse/lib/help/formatter.js | 56 +- .../eslint/node_modules/argparse/package.json | 31 +- .../node_modules/array-union/package.json | 1 - .../node_modules/array-uniq/package.json | 1 - tools/eslint/node_modules/arrify/package.json | 1 - .../node_modules/balanced-match/package.json | 1 - tools/eslint/node_modules/bluebird/README.md | 51 - .../eslint/node_modules/bluebird/changelog.md | 1 - .../bluebird/js/browser/bluebird.core.js | 3756 -------- .../bluebird/js/browser/bluebird.core.min.js | 31 - .../bluebird/js/browser/bluebird.js | 5598 ------------ .../bluebird/js/browser/bluebird.min.js | 31 - .../eslint/node_modules/bluebird/package.json | 137 - .../node_modules/brace-expansion/package.json | 1 - .../node_modules/caller-path/package.json | 1 - .../node_modules/callsites/package.json | 1 - tools/eslint/node_modules/chalk/package.json | 1 - .../node_modules/circular-json/package.json | 1 - .../node_modules/cli-cursor/package.json | 1 - .../node_modules/cli-width/package.json | 1 - tools/eslint/node_modules/co/LICENSE | 22 + tools/eslint/node_modules/co/Readme.md | 212 + tools/eslint/node_modules/co/index.js | 237 + tools/eslint/node_modules/co/package.json | 106 + .../node_modules/code-point-at/package.json | 30 +- .../node_modules/code-point-at/readme.md | 4 +- .../node_modules/concat-map/package.json | 1 - .../node_modules/concat-stream/package.json | 1 - .../node_modules/core-util-is/package.json | 1 - tools/eslint/node_modules/d/package.json | 1 - tools/eslint/node_modules/debug/package.json | 1 - .../eslint/node_modules/deep-is/package.json | 1 - tools/eslint/node_modules/del/package.json | 1 - .../node_modules/doctrine/lib/doctrine.js | 17 +- .../eslint/node_modules/doctrine/lib/typed.js | 15 +- .../eslint/node_modules/doctrine/package.json | 19 +- .../eslint/node_modules/es5-ext/package.json | 1 - .../node_modules/es6-iterator/package.json | 1 - .../eslint/node_modules/es6-map/package.json | 1 - .../eslint/node_modules/es6-set/package.json | 1 - .../node_modules/es6-symbol/package.json | 1 - .../node_modules/es6-weak-map/package.json | 1 - .../escape-string-regexp/package.json | 1 - tools/eslint/node_modules/escope/package.json | 1 - tools/eslint/node_modules/espree/README.md | 11 +- tools/eslint/node_modules/espree/espree.js | 28 +- .../espree/lib/token-translator.js | 8 +- tools/eslint/node_modules/espree/package.json | 40 +- .../eslint/node_modules/esprima/package.json | 1 - .../node_modules/estraverse/package.json | 1 - .../node_modules/esrecurse/package.json | 1 - .../node_modules/estraverse/package.json | 1 - .../eslint/node_modules/esutils/package.json | 1 - .../node_modules/event-emitter/package.json | 1 - .../node_modules/exit-hook/package.json | 1 - .../node_modules/fast-levenshtein/README.md | 36 +- .../fast-levenshtein/levenshtein.js | 167 +- .../fast-levenshtein/package.json | 37 +- .../eslint/node_modules/figures/package.json | 1 - .../file-entry-cache/package.json | 1 - .../node_modules/flat-cache/package.json | 1 - .../node_modules/fs.realpath/package.json | 1 - .../generate-function/package.json | 1 - .../generate-object-property/package.json | 1 - tools/eslint/node_modules/glob/README.md | 3 + tools/eslint/node_modules/glob/common.js | 7 +- tools/eslint/node_modules/glob/glob.js | 33 +- tools/eslint/node_modules/glob/package.json | 21 +- tools/eslint/node_modules/glob/sync.js | 40 +- .../eslint/node_modules/globals/globals.json | 9 +- .../eslint/node_modules/globals/package.json | 23 +- tools/eslint/node_modules/globby/package.json | 1 - .../node_modules/graceful-fs/graceful-fs.js | 37 +- .../node_modules/graceful-fs/package.json | 19 +- .../node_modules/graceful-fs/polyfills.js | 35 + .../eslint/node_modules/has-ansi/package.json | 1 - tools/eslint/node_modules/ignore/README.md | 14 +- tools/eslint/node_modules/ignore/ignore.js | 8 + tools/eslint/node_modules/ignore/package.json | 19 +- .../node_modules/imurmurhash/package.json | 1 - .../eslint/node_modules/inflight/inflight.js | 34 +- .../eslint/node_modules/inflight/package.json | 31 +- .../eslint/node_modules/inherits/package.json | 1 - .../eslint/node_modules/inquirer/package.json | 1 - .../is-fullwidth-code-point/package.json | 1 - .../node_modules/is-my-json-valid/index.js | 10 + .../is-my-json-valid/package.json | 33 +- .../node_modules/is-path-cwd/package.json | 1 - .../node_modules/is-path-in-cwd/package.json | 3 +- .../node_modules/is-path-inside/package.json | 1 - .../node_modules/is-property/package.json | 1 - .../node_modules/is-resolvable/package.json | 1 - .../eslint/node_modules/isarray/package.json | 1 - .../eslint/node_modules/js-yaml/package.json | 1 - .../json-stable-stringify/package.json | 2 +- .../eslint/node_modules/jsonify/package.json | 1 - .../LICENSE => jsonpointer/LICENSE.md} | 4 +- .../eslint/node_modules/jsonpointer/README.md | 27 +- .../node_modules/jsonpointer/benchmark.js | 56 + .../node_modules/jsonpointer/jsonpointer.js | 129 +- .../node_modules/jsonpointer/package.json | 55 +- tools/eslint/node_modules/levn/package.json | 1 - tools/eslint/node_modules/lodash/README.md | 23 +- tools/eslint/node_modules/lodash/_Stack.js | 3 +- .../node_modules/lodash/_arrayLikeKeys.js | 30 +- .../node_modules/lodash/_arraySample.js | 15 + .../node_modules/lodash/_arraySampleSize.js | 17 + .../node_modules/lodash/_arrayShuffle.js | 15 + .../node_modules/lodash/_assignMergeValue.js | 7 +- .../node_modules/lodash/_assignValue.js | 5 +- .../node_modules/lodash/_baseAssignValue.js | 25 + .../eslint/node_modules/lodash/_baseClone.js | 8 +- .../eslint/node_modules/lodash/_baseCreate.js | 20 +- .../eslint/node_modules/lodash/_baseDelay.js | 2 +- .../node_modules/lodash/_baseIndexOf.js | 18 +- .../node_modules/lodash/_baseIsArguments.js | 27 + .../node_modules/lodash/_baseIsEqualDeep.js | 13 +- .../node_modules/lodash/_baseIsNative.js | 3 +- .../eslint/node_modules/lodash/_baseMerge.js | 17 +- .../node_modules/lodash/_baseMergeDeep.js | 29 +- .../eslint/node_modules/lodash/_basePickBy.js | 4 +- tools/eslint/node_modules/lodash/_baseRest.js | 26 +- .../eslint/node_modules/lodash/_baseSample.js | 15 + .../node_modules/lodash/_baseSampleSize.js | 18 + .../node_modules/lodash/_baseSetData.js | 2 +- .../node_modules/lodash/_baseSetToString.js | 22 + .../node_modules/lodash/_baseShuffle.js | 15 + .../node_modules/lodash/_baseToString.js | 6 + tools/eslint/node_modules/lodash/_cacheHas.js | 2 +- tools/eslint/node_modules/lodash/_castRest.js | 14 + .../node_modules/lodash/_cloneBuffer.js | 19 +- .../eslint/node_modules/lodash/_copyObject.js | 13 +- .../node_modules/lodash/_countHolders.js | 2 +- .../eslint/node_modules/lodash/_createFlow.js | 9 +- .../eslint/node_modules/lodash/_createOver.js | 10 +- .../eslint/node_modules/lodash/_createWrap.js | 2 +- .../node_modules/lodash/_deburrLetter.js | 2 +- .../node_modules/lodash/_defineProperty.js | 10 +- .../node_modules/lodash/_equalArrays.js | 7 +- .../node_modules/lodash/_escapeHtmlChar.js | 3 +- tools/eslint/node_modules/lodash/_flatRest.js | 16 + tools/eslint/node_modules/lodash/_getTag.js | 3 +- tools/eslint/node_modules/lodash/_hasPath.js | 10 +- .../eslint/node_modules/lodash/_hashClear.js | 1 + .../eslint/node_modules/lodash/_hashDelete.js | 4 +- tools/eslint/node_modules/lodash/_hashSet.js | 1 + .../node_modules/lodash/_insertWrapDetails.js | 8 +- .../node_modules/lodash/_isHostObject.js | 20 - .../node_modules/lodash/_listCacheClear.js | 1 + .../node_modules/lodash/_listCacheDelete.js | 1 + .../node_modules/lodash/_listCacheSet.js | 1 + .../node_modules/lodash/_mapCacheClear.js | 1 + .../node_modules/lodash/_mapCacheDelete.js | 4 +- .../node_modules/lodash/_mapCacheSet.js | 6 +- .../node_modules/lodash/_memoizeCapped.js | 26 + tools/eslint/node_modules/lodash/_overRest.js | 36 + tools/eslint/node_modules/lodash/_setData.js | 26 +- .../node_modules/lodash/_setToString.js | 14 + .../node_modules/lodash/_setWrapToString.js | 16 +- tools/eslint/node_modules/lodash/_shortOut.js | 37 + .../node_modules/lodash/_shuffleSelf.js | 28 + .../eslint/node_modules/lodash/_stackClear.js | 1 + .../node_modules/lodash/_stackDelete.js | 6 +- tools/eslint/node_modules/lodash/_stackSet.js | 12 +- .../node_modules/lodash/_strictIndexOf.js | 23 + .../node_modules/lodash/_strictLastIndexOf.js | 21 + .../node_modules/lodash/_stringToPath.js | 4 +- .../node_modules/lodash/_unescapeHtmlChar.js | 3 +- .../node_modules/lodash/_unicodeSize.js | 2 +- tools/eslint/node_modules/lodash/after.js | 2 +- tools/eslint/node_modules/lodash/assign.js | 8 +- tools/eslint/node_modules/lodash/at.js | 7 +- tools/eslint/node_modules/lodash/before.js | 2 +- tools/eslint/node_modules/lodash/bindAll.js | 10 +- tools/eslint/node_modules/lodash/concat.js | 11 +- tools/eslint/node_modules/lodash/cond.js | 2 +- tools/eslint/node_modules/lodash/core.js | 239 +- tools/eslint/node_modules/lodash/core.min.js | 47 +- tools/eslint/node_modules/lodash/countBy.js | 9 +- tools/eslint/node_modules/lodash/debounce.js | 2 +- tools/eslint/node_modules/lodash/defer.js | 2 +- .../eslint/node_modules/lodash/difference.js | 4 +- .../node_modules/lodash/differenceBy.js | 5 +- .../node_modules/lodash/differenceWith.js | 6 +- tools/eslint/node_modules/lodash/escape.js | 12 +- tools/eslint/node_modules/lodash/forEach.js | 2 +- .../node_modules/lodash/fp/_convertBrowser.js | 2 +- .../eslint/node_modules/lodash/fp/_mapping.js | 11 +- .../node_modules/lodash/fp/rangeStep.js | 5 + .../node_modules/lodash/fp/rangeStepRight.js | 5 + tools/eslint/node_modules/lodash/groupBy.js | 5 +- .../node_modules/lodash/intersection.js | 4 +- .../node_modules/lodash/intersectionBy.js | 5 +- .../node_modules/lodash/intersectionWith.js | 6 +- .../eslint/node_modules/lodash/isArguments.js | 22 +- tools/eslint/node_modules/lodash/isElement.js | 2 +- tools/eslint/node_modules/lodash/isEmpty.js | 19 +- .../eslint/node_modules/lodash/isFunction.js | 7 +- tools/eslint/node_modules/lodash/isNative.js | 5 +- tools/eslint/node_modules/lodash/isObject.js | 2 +- .../node_modules/lodash/isObjectLike.js | 2 +- .../node_modules/lodash/isPlainObject.js | 4 +- tools/eslint/node_modules/lodash/keyBy.js | 5 +- .../eslint/node_modules/lodash/lastIndexOf.js | 19 +- tools/eslint/node_modules/lodash/lodash.js | 923 +- .../eslint/node_modules/lodash/lodash.min.js | 250 +- tools/eslint/node_modules/lodash/mapKeys.js | 5 +- tools/eslint/node_modules/lodash/mapValues.js | 5 +- tools/eslint/node_modules/lodash/memoize.js | 6 +- tools/eslint/node_modules/lodash/mergeWith.js | 2 +- tools/eslint/node_modules/lodash/negate.js | 2 +- tools/eslint/node_modules/lodash/omit.js | 7 +- tools/eslint/node_modules/lodash/overArgs.js | 3 +- tools/eslint/node_modules/lodash/package.json | 15 +- tools/eslint/node_modules/lodash/parseInt.js | 10 +- tools/eslint/node_modules/lodash/pick.js | 7 +- tools/eslint/node_modules/lodash/pullAt.js | 7 +- tools/eslint/node_modules/lodash/rearg.js | 9 +- tools/eslint/node_modules/lodash/rest.js | 2 +- tools/eslint/node_modules/lodash/sample.js | 12 +- .../eslint/node_modules/lodash/sampleSize.js | 24 +- tools/eslint/node_modules/lodash/shuffle.js | 10 +- tools/eslint/node_modules/lodash/sortBy.js | 7 +- tools/eslint/node_modules/lodash/spread.js | 2 +- tools/eslint/node_modules/lodash/template.js | 3 +- tools/eslint/node_modules/lodash/throttle.js | 2 +- tools/eslint/node_modules/lodash/toString.js | 4 +- tools/eslint/node_modules/lodash/transform.js | 24 +- tools/eslint/node_modules/lodash/unescape.js | 4 +- tools/eslint/node_modules/lodash/uniq.js | 5 +- tools/eslint/node_modules/lodash/uniqBy.js | 4 +- tools/eslint/node_modules/lodash/uniqWith.js | 5 +- tools/eslint/node_modules/lodash/wrapperAt.js | 6 +- tools/eslint/node_modules/lodash/xorBy.js | 5 +- tools/eslint/node_modules/lodash/xorWith.js | 5 +- .../node_modules/minimatch/package.json | 1 - .../eslint/node_modules/minimist/package.json | 1 - tools/eslint/node_modules/mkdirp/package.json | 1 - tools/eslint/node_modules/ms/package.json | 1 - .../node_modules/mute-stream/package.json | 1 - .../node_modules/natural-compare/package.json | 1 - .../node_modules/number-is-nan/package.json | 31 +- .../node_modules/number-is-nan/readme.md | 4 +- .../node_modules/object-assign/package.json | 1 - tools/eslint/node_modules/once/package.json | 1 - .../eslint/node_modules/onetime/package.json | 1 - .../eslint/node_modules/optionator/README.md | 2 +- .../node_modules/optionator/lib/coerce.js | 367 - .../node_modules/optionator/lib/help.js | 2 +- .../node_modules/optionator/lib/index.js | 20 +- .../node_modules/optionator/lib/parse-type.js | 143 - .../node_modules/optionator/lib/util.js | 4 +- .../node_modules/optionator/package.json | 45 +- .../node_modules/os-homedir/package.json | 36 +- .../eslint/node_modules/os-homedir/readme.md | 10 +- .../node_modules/path-is-absolute/index.js | 10 +- .../path-is-absolute/package.json | 31 +- .../node_modules/path-is-absolute/readme.md | 30 +- .../node_modules/path-is-inside/LICENSE.txt | 30 +- .../node_modules/path-is-inside/README.md | 35 - .../node_modules/path-is-inside/package.json | 38 +- tools/eslint/node_modules/pify/package.json | 1 - .../node_modules/pinkie-promise/package.json | 1 - tools/eslint/node_modules/pinkie/package.json | 1 - .../node_modules/pluralize/package.json | 1 - .../node_modules/prelude-ls/package.json | 3 +- .../process-nextick-args/package.json | 1 - .../eslint/node_modules/progress/package.json | 1 - .../node_modules/readable-stream/package.json | 1 - .../node_modules/readline2/package.json | 1 - .../require-uncached/package.json | 1 - .../node_modules/resolve-from/package.json | 1 - .../node_modules/restore-cursor/package.json | 1 - tools/eslint/node_modules/rimraf/package.json | 1 - .../node_modules/run-async/package.json | 1 - .../eslint/node_modules/rx-lite/package.json | 1 - .../eslint/node_modules/shelljs/package.json | 1 - .../node_modules/slice-ansi/package.json | 1 - .../node_modules/sprintf-js/package.json | 1 - .../node_modules/string-width/package.json | 1 - .../node_modules/string_decoder/package.json | 1 - .../node_modules/strip-ansi/package.json | 4 +- .../node_modules/strip-bom/package.json | 1 - .../strip-json-comments/package.json | 1 - .../node_modules/supports-color/package.json | 1 - .../node_modules/table/dist/alignString.js | 115 +- .../table/dist/alignString.js.map | 2 +- .../node_modules/table/dist/alignTableData.js | 44 +- .../table/dist/alignTableData.js.map | 2 +- .../table/dist/calculateCellHeight.js | 46 +- .../table/dist/calculateCellHeight.js.map | 2 +- .../table/dist/calculateCellWidthIndex.js | 20 +- .../table/dist/calculateCellWidthIndex.js.map | 2 +- .../dist/calculateMaximumColumnWidthIndex.js | 46 +- .../calculateMaximumColumnWidthIndex.js.map | 2 +- .../table/dist/calculateRowHeightIndex.js | 67 +- .../table/dist/calculateRowHeightIndex.js.map | 2 +- .../node_modules/table/dist/createStream.js | 170 +- .../table/dist/createStream.js.map | 2 +- .../node_modules/table/dist/drawBorder.js | 80 +- .../node_modules/table/dist/drawBorder.js.map | 2 +- .../eslint/node_modules/table/dist/drawRow.js | 9 +- .../node_modules/table/dist/drawRow.js.map | 2 +- .../node_modules/table/dist/drawTable.js | 59 +- .../node_modules/table/dist/drawTable.js.map | 2 +- .../table/dist/getBorderCharacters.js | 197 +- .../table/dist/getBorderCharacters.js.map | 2 +- tools/eslint/node_modules/table/dist/index.js | 3 +- .../node_modules/table/dist/index.js.map | 2 +- .../node_modules/table/dist/makeConfig.js | 106 +- .../node_modules/table/dist/makeConfig.js.map | 2 +- .../table/dist/makeStreamConfig.js | 99 +- .../table/dist/makeStreamConfig.js.map | 2 +- .../table/dist/mapDataUsingRowHeightIndex.js | 83 +- .../dist/mapDataUsingRowHeightIndex.js.map | 2 +- .../node_modules/table/dist/padTableData.js | 30 +- .../table/dist/padTableData.js.map | 2 +- .../table/dist/schemas/config.json | 4 +- .../table/dist/schemas/streamConfig.json | 2 + .../table/dist/stringifyTableData.js | 20 +- .../table/dist/stringifyTableData.js.map | 2 +- tools/eslint/node_modules/table/dist/table.js | 21 +- .../node_modules/table/dist/table.js.map | 2 +- .../table/dist/truncateTableData.js | 30 +- .../table/dist/truncateTableData.js.map | 2 +- .../node_modules/table/dist/validateConfig.js | 71 +- .../table/dist/validateConfig.js.map | 2 +- .../table/dist/validateStreamConfig.js | 2 +- .../table/dist/validateStreamConfig.js.map | 2 +- .../table/dist/validateTableData.js | 64 +- .../table/dist/validateTableData.js.map | 2 +- .../node_modules/table/dist/wrapString.js | 29 +- .../node_modules/table/dist/wrapString.js.map | 2 +- .../node_modules/table/dist/wrapWord.js | 53 +- .../node_modules/table/dist/wrapWord.js.map | 2 +- tools/eslint/node_modules/table/package.json | 52 +- .../node_modules/text-table/package.json | 1 - .../eslint/node_modules/through/package.json | 1 - tools/eslint/node_modules/tryit/package.json | 1 - tools/eslint/node_modules/tv4/LICENSE.txt | 8 - tools/eslint/node_modules/tv4/README.md | 468 - tools/eslint/node_modules/tv4/lang/de.js | 47 - tools/eslint/node_modules/tv4/lang/fr.js | 55 - tools/eslint/node_modules/tv4/lang/nb.js | 56 - tools/eslint/node_modules/tv4/lang/pl-PL.js | 55 - tools/eslint/node_modules/tv4/lang/pt-PT.js | 55 - tools/eslint/node_modules/tv4/lang/sv-SE.js | 55 - tools/eslint/node_modules/tv4/lang/zh-CN.js | 55 - tools/eslint/node_modules/tv4/package.json | 123 - .../node_modules/tv4/tv4.async-jquery.js | 34 - tools/eslint/node_modules/tv4/tv4.js | 1677 ---- .../node_modules/type-check/package.json | 1 - .../node_modules/typedarray/package.json | 1 - .../node_modules/user-home/package.json | 1 - .../node_modules/util-deprecate/package.json | 1 - .../eslint/node_modules/wordwrap/package.json | 1 - tools/eslint/node_modules/wrappy/package.json | 1 - tools/eslint/node_modules/write/package.json | 1 - tools/eslint/node_modules/xregexp/README.md | 221 - .../eslint/node_modules/xregexp/package.json | 96 - .../node_modules/xregexp/src/addons/build.js | 186 - .../xregexp/src/addons/matchrecursive.js | 188 - .../xregexp/src/addons/unicode-base.js | 227 - .../xregexp/src/addons/unicode-blocks.js | 1076 --- .../xregexp/src/addons/unicode-categories.js | 236 - .../xregexp/src/addons/unicode-properties.js | 106 - .../xregexp/src/addons/unicode-scripts.js | 560 -- .../eslint/node_modules/xregexp/src/index.js | 11 - .../node_modules/xregexp/src/xregexp.js | 1834 ---- tools/eslint/node_modules/xtend/package.json | 1 - tools/eslint/package.json | 23 +- 645 files changed, 40455 insertions(+), 25113 deletions(-) delete mode 100644 tools/eslint/CHANGELOG.md create mode 100644 tools/eslint/lib/internal-rules/.eslintrc.yml create mode 100644 tools/eslint/lib/internal-rules/internal-consistent-docs-description.js create mode 100644 tools/eslint/lib/rules/func-name-matching.js create mode 120000 tools/eslint/node_modules/acorn-jsx/node_modules/.bin/acorn create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/.tern-project create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/AUTHORS rename tools/eslint/node_modules/{xregexp => acorn-jsx/node_modules/acorn}/LICENSE (92%) create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/README.md create mode 100755 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/acorn create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/generate-identifier-regex.js create mode 100755 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/update_authors.sh create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/.keep create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.es.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn_loose.es.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn_loose.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/walk.es.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/walk.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/package.json create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.bin.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.loose.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.main.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/rollup/config.walk.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/bin/acorn.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/expression.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/identifier.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/index.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/location.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/locutil.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/expression.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/index.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/parseutil.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/state.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/statement.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/loose/tokenize.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/lval.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/node.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/options.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/parseutil.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/state.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/statement.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokencontext.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokenize.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/tokentype.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/util.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/walk/index.js create mode 100644 tools/eslint/node_modules/acorn-jsx/node_modules/acorn/src/whitespace.js create mode 100644 tools/eslint/node_modules/ajv-keywords/.eslintrc.yml create mode 100644 tools/eslint/node_modules/ajv-keywords/LICENSE create mode 100644 tools/eslint/node_modules/ajv-keywords/README.md create mode 100644 tools/eslint/node_modules/ajv-keywords/index.js create mode 100644 tools/eslint/node_modules/ajv-keywords/keywords/index.js create mode 100644 tools/eslint/node_modules/ajv-keywords/keywords/instanceof.js create mode 100644 tools/eslint/node_modules/ajv-keywords/keywords/propertyNames.js create mode 100644 tools/eslint/node_modules/ajv-keywords/keywords/range.js create mode 100644 tools/eslint/node_modules/ajv-keywords/keywords/regexp.js create mode 100644 tools/eslint/node_modules/ajv-keywords/keywords/typeof.js create mode 100644 tools/eslint/node_modules/ajv-keywords/package.json create mode 100644 tools/eslint/node_modules/ajv/.tonic_example.js create mode 100644 tools/eslint/node_modules/ajv/LICENSE create mode 100644 tools/eslint/node_modules/ajv/README.md create mode 100644 tools/eslint/node_modules/ajv/dist/ajv.bundle.js create mode 100644 tools/eslint/node_modules/ajv/dist/ajv.min.js create mode 100644 tools/eslint/node_modules/ajv/dist/ajv.min.js.map create mode 100644 tools/eslint/node_modules/ajv/dist/nodent.min.js create mode 100644 tools/eslint/node_modules/ajv/dist/regenerator.min.js create mode 100644 tools/eslint/node_modules/ajv/lib/ajv.d.ts create mode 100644 tools/eslint/node_modules/ajv/lib/ajv.js create mode 100644 tools/eslint/node_modules/ajv/lib/async.js create mode 100644 tools/eslint/node_modules/ajv/lib/cache.js create mode 100644 tools/eslint/node_modules/ajv/lib/compile/_rules.js create mode 100644 tools/eslint/node_modules/ajv/lib/compile/equal.js create mode 100644 tools/eslint/node_modules/ajv/lib/compile/formats.js create mode 100644 tools/eslint/node_modules/ajv/lib/compile/index.js create mode 100644 tools/eslint/node_modules/ajv/lib/compile/resolve.js create mode 100644 tools/eslint/node_modules/ajv/lib/compile/rules.js create mode 100644 tools/eslint/node_modules/ajv/lib/compile/schema_obj.js create mode 100644 tools/eslint/node_modules/ajv/lib/compile/ucs2length.js create mode 100644 tools/eslint/node_modules/ajv/lib/compile/util.js create mode 100644 tools/eslint/node_modules/ajv/lib/compile/validation_error.js create mode 100644 tools/eslint/node_modules/ajv/lib/dot/_limit.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/_limitItems.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/_limitLength.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/_limitProperties.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/allOf.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/anyOf.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/coerce.def create mode 100644 tools/eslint/node_modules/ajv/lib/dot/custom.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/defaults.def create mode 100644 tools/eslint/node_modules/ajv/lib/dot/definitions.def create mode 100644 tools/eslint/node_modules/ajv/lib/dot/dependencies.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/enum.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/errors.def create mode 100644 tools/eslint/node_modules/ajv/lib/dot/format.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/items.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/missing.def create mode 100644 tools/eslint/node_modules/ajv/lib/dot/multipleOf.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/not.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/oneOf.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/pattern.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/properties.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/ref.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/required.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/uniqueItems.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/v5/_formatLimit.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/v5/constant.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/v5/patternRequired.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/v5/switch.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dot/validate.jst create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/README.md create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/_formatLimit.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/_limit.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/_limitItems.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/_limitLength.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/_limitProperties.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/allOf.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/anyOf.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/constant.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/custom.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/dependencies.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/enum.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/format.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/items.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/multipleOf.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/not.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/oneOf.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/pattern.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/patternRequired.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/properties.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/ref.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/required.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/switch.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/uniqueItems.js create mode 100644 tools/eslint/node_modules/ajv/lib/dotjs/validate.js create mode 100644 tools/eslint/node_modules/ajv/lib/keyword.js create mode 100644 tools/eslint/node_modules/ajv/lib/refs/json-schema-draft-04.json create mode 100644 tools/eslint/node_modules/ajv/lib/refs/json-schema-v5.json create mode 100644 tools/eslint/node_modules/ajv/lib/v5.js create mode 100644 tools/eslint/node_modules/ajv/package.json delete mode 100644 tools/eslint/node_modules/bluebird/README.md delete mode 100644 tools/eslint/node_modules/bluebird/changelog.md delete mode 100644 tools/eslint/node_modules/bluebird/js/browser/bluebird.core.js delete mode 100644 tools/eslint/node_modules/bluebird/js/browser/bluebird.core.min.js delete mode 100644 tools/eslint/node_modules/bluebird/js/browser/bluebird.js delete mode 100644 tools/eslint/node_modules/bluebird/js/browser/bluebird.min.js delete mode 100644 tools/eslint/node_modules/bluebird/package.json create mode 100644 tools/eslint/node_modules/co/LICENSE create mode 100644 tools/eslint/node_modules/co/Readme.md create mode 100644 tools/eslint/node_modules/co/index.js create mode 100644 tools/eslint/node_modules/co/package.json rename tools/eslint/node_modules/{bluebird/LICENSE => jsonpointer/LICENSE.md} (84%) create mode 100644 tools/eslint/node_modules/jsonpointer/benchmark.js create mode 100644 tools/eslint/node_modules/lodash/_arraySample.js create mode 100644 tools/eslint/node_modules/lodash/_arraySampleSize.js create mode 100644 tools/eslint/node_modules/lodash/_arrayShuffle.js create mode 100644 tools/eslint/node_modules/lodash/_baseAssignValue.js create mode 100644 tools/eslint/node_modules/lodash/_baseIsArguments.js create mode 100644 tools/eslint/node_modules/lodash/_baseSample.js create mode 100644 tools/eslint/node_modules/lodash/_baseSampleSize.js create mode 100644 tools/eslint/node_modules/lodash/_baseSetToString.js create mode 100644 tools/eslint/node_modules/lodash/_baseShuffle.js create mode 100644 tools/eslint/node_modules/lodash/_castRest.js create mode 100644 tools/eslint/node_modules/lodash/_flatRest.js delete mode 100644 tools/eslint/node_modules/lodash/_isHostObject.js create mode 100644 tools/eslint/node_modules/lodash/_memoizeCapped.js create mode 100644 tools/eslint/node_modules/lodash/_overRest.js create mode 100644 tools/eslint/node_modules/lodash/_setToString.js create mode 100644 tools/eslint/node_modules/lodash/_shortOut.js create mode 100644 tools/eslint/node_modules/lodash/_shuffleSelf.js create mode 100644 tools/eslint/node_modules/lodash/_strictIndexOf.js create mode 100644 tools/eslint/node_modules/lodash/_strictLastIndexOf.js create mode 100644 tools/eslint/node_modules/lodash/fp/rangeStep.js create mode 100644 tools/eslint/node_modules/lodash/fp/rangeStepRight.js delete mode 100644 tools/eslint/node_modules/optionator/lib/coerce.js delete mode 100644 tools/eslint/node_modules/optionator/lib/parse-type.js delete mode 100644 tools/eslint/node_modules/path-is-inside/README.md delete mode 100644 tools/eslint/node_modules/tv4/LICENSE.txt delete mode 100644 tools/eslint/node_modules/tv4/README.md delete mode 100644 tools/eslint/node_modules/tv4/lang/de.js delete mode 100644 tools/eslint/node_modules/tv4/lang/fr.js delete mode 100644 tools/eslint/node_modules/tv4/lang/nb.js delete mode 100755 tools/eslint/node_modules/tv4/lang/pl-PL.js delete mode 100644 tools/eslint/node_modules/tv4/lang/pt-PT.js delete mode 100644 tools/eslint/node_modules/tv4/lang/sv-SE.js delete mode 100644 tools/eslint/node_modules/tv4/lang/zh-CN.js delete mode 100644 tools/eslint/node_modules/tv4/package.json delete mode 100644 tools/eslint/node_modules/tv4/tv4.async-jquery.js delete mode 100644 tools/eslint/node_modules/tv4/tv4.js delete mode 100644 tools/eslint/node_modules/xregexp/README.md delete mode 100644 tools/eslint/node_modules/xregexp/package.json delete mode 100644 tools/eslint/node_modules/xregexp/src/addons/build.js delete mode 100644 tools/eslint/node_modules/xregexp/src/addons/matchrecursive.js delete mode 100644 tools/eslint/node_modules/xregexp/src/addons/unicode-base.js delete mode 100644 tools/eslint/node_modules/xregexp/src/addons/unicode-blocks.js delete mode 100644 tools/eslint/node_modules/xregexp/src/addons/unicode-categories.js delete mode 100644 tools/eslint/node_modules/xregexp/src/addons/unicode-properties.js delete mode 100644 tools/eslint/node_modules/xregexp/src/addons/unicode-scripts.js delete mode 100644 tools/eslint/node_modules/xregexp/src/index.js delete mode 100644 tools/eslint/node_modules/xregexp/src/xregexp.js diff --git a/tools/eslint/CHANGELOG.md b/tools/eslint/CHANGELOG.md deleted file mode 100644 index 30c87e65c9a976..00000000000000 --- a/tools/eslint/CHANGELOG.md +++ /dev/null @@ -1,3412 +0,0 @@ -v3.5.0 - September 9, 2016 - -* 08fa538 Update: fix false negative of `arrow-spacing` (fixes #7079) (#7080) (Toru Nagashima) -* cec65e3 Update: add fixer for no-floating-decimal (fixes #7070) (#7081) (not-an-aardvark) -* 2a3f699 Fix: Column number for no-multiple-empty-lines (fixes #7086) (#7088) (Ian VanSchooten) -* 6947299 Docs: Add info about closing accepted issues to docs (fixes #6979) (#7089) (Kai Cataldo) -* d30157a Docs: Add link to awesome-eslint in integrations page (#7090) (Vitor Balocco) -* 457be1b Docs: Update so issues are not required (fixes #7015) (#7072) (Nicholas C. Zakas) -* d9513b7 Fix: Allow linting of .hidden files/folders (fixes #4828) (#6844) (Ian VanSchooten) -* 6d97c18 New: `max-len`: `ignoreStrings`+`ignoreTemplateLiterals` (fixes #5805) (#7049) (Jordan Harband) -* 538d258 Update: make no-implicit-coercion support autofixing. (fixes #7056) (#7061) (Eli White) -* 883316d Update: add fixer for prefer-arrow-callback (fixes #7002) (#7004) (not-an-aardvark) -* 7502eed Update: auto-fix for `comma-style` (fixes #6941) (#6957) (Gyandeep Singh) -* 645dda5 Update: add fixer for dot-notation (fixes #7014) (#7054) (not-an-aardvark) -* 2657846 Fix: `no-console` ignores user-defined console (fixes #7010) (#7058) (Toru Nagashima) -* 656bb6e Update: add fixer for newline-before-return (fixes #5958) (#7050) (Vitor Balocco) -* 1f995c3 Fix: no-implicit-coercion string concat false positive (fixes #7057) (#7060) (Kai Cataldo) -* 6718749 Docs: Clarify that `es6` env also sets `ecmaVersion` to 6 (#7067) (Jérémie Astori) -* e118728 Update: add fixer for wrap-regex (fixes #7013) (#7048) (not-an-aardvark) -* f4fcd1e Update: add more `indent` options for functions (fixes #6052) (#7043) (not-an-aardvark) -* 657eee5 Update: add fixer for new-parens (fixes #6994) (#7047) (not-an-aardvark) -* ff19aa9 Update: improve `max-statements-per-line` message (fixes #6287) (#7044) (Jordan Harband) -* 3960617 New: `prefer-numeric-literals` rule (fixes #6068) (#7029) (Annie Zhang) -* fa760f9 Chore: no-regex-spaces uses internal rule message format (fixes #7052) (#7053) (Kevin Partington) -* 22c7e09 Update: no-magic-numbers false negative on reassigned vars (fixes #4616) (#7028) (not-an-aardvark) -* be29599 Update: Throw error if whitespace found in plugin name (fixes #6854) (#6960) (Jesse Ostrander) -* 4063a79 Fix: Rule message placeholders can be inside braces (fixes #6988) (#7041) (Kevin Partington) -* 52e8d9c Docs: Clean up sort-vars (#7045) (Matthew Dunsdon) -* 4126f12 Chore: Rule messages use internal rule message format (fixes #6977) (#6989) (Kevin Partington) -* 46cb690 New: `no-restricted-properties` rule (fixes #3218) (#7017) (Eli White) -* 00b3042 Update: Pass file path to parse function (fixes #5344) (#7024) (Annie Zhang) -* 3f13325 Docs: Add kaicataldo and JamesHenry to our teams (#7039) (alberto) -* 8e77f16 Update: `new-parens` false negative (fixes #6997) (#6999) (Toru Nagashima) -* 326f457 Docs: Add missing 'to' in no-restricted-modules (#7022) (Oskar Risberg) -* 8277357 New: `line-comment-position` rule (fixes #6077) (#6953) (alberto) -* c1f0d76 New: `lines-around-directive` rule (fixes #6069) (#6998) (Kai Cataldo) -* 61f1de0 Docs: Fix typo in no-debugger (#7019) (Denis Ciccale) -* 256c4a2 Fix: Allow separate mode option for multiline and align (fixes #6691) (#6991) (Annie Zhang) -* a989a7c Docs: Declaring dependency on eslint in shared config (fixes #6617) (#6985) (alberto) -* 6869c60 Docs: Fix minor typo in no-extra-parens doc (#6992) (Jérémie Astori) -* 28f1619 Docs: Update the example of SwitchCase (#6981) (fish) - -v3.4.0 - August 26, 2016 - -* c210510 Update: add fixer for no-extra-parens (fixes #6944) (#6950) (not-an-aardvark) -* ca3d448 Fix: `prefer-const` false negative about `eslintUsed` (fixes #5837) (#6971) (Toru Nagashima) -* 1153955 Docs: Draft of JSCS migration guide (refs #5859) (#6942) (Nicholas C. Zakas) -* 3e522be Fix: false negative of `indent` with `else if` statements (fixes #6956) (#6965) (not-an-aardvark) -* 2dfb290 Docs: Distinguish examples in rules under Stylistic Issues part 7 (#6760) (Kenneth Williams) -* 3c710c9 Fix: rename "AirBnB" => "Airbnb" init choice (fixes #6969) (Harrison Shoff) -* 7660b39 Fix: `object-curly-spacing` for type annotations (fixes #6940) (#6945) (Toru Nagashima) -* 21ab784 New: do not remove non visited files from cache. (fixes #6780) (#6921) (Roy Riojas) -* 3a1763c Fix: enable `@scope/plugin/ruleId`-style specifier (refs #6362) (#6939) (Toru Nagashima) -* d6fd064 Update: Add never option to multiline-ternary (fixes #6751) (#6905) (Kai Cataldo) -* 0d268f1 New: `symbol-description` rule (fixes #6778) (#6825) (Jarek Rencz) -* a063d4e Fix: no-cond-assign within a function expression (fixes #6908) (#6909) (Patrick McElhaney) -* 16db93a Build: Tag docs, publish release notes (fixes #6892) (#6934) (Nicholas C. Zakas) -* 0cf1d55 Chore: Fix object-shorthand errors (fixes #6958) (#6959) (Kai Cataldo) -* 8851ddd Fix: Improve pref of globbing by inheriting glob.GlobSync (fixes #6710) (#6783) (Kael Zhang) -* cf2242c Update: `requireStringLiterals` option for `valid-typeof` (fixes #6698) (#6923) (not-an-aardvark) -* 8561389 Fix: `no-trailing-spaces` wrong fixing (fixes #6933) (#6937) (Toru Nagashima) -* 6a92be5 Docs: Update semantic versioning policy (#6935) (alberto) -* a5189a6 New: `class-methods-use-this` rule (fixes #5139) (#6881) (Gyandeep Singh) -* 1563808 Update: add support for ecmaVersion 20xx (fixes #6750) (#6907) (Kai Cataldo) -* d8b770c Docs: Change rule descriptions for consistent casing (#6915) (Brandon Mills) -* c676322 Chore: Use object-shorthand batch 3 (refs #6407) (#6914) (Kai Cataldo) - -v3.3.1 - August 15, 2016 - -* a2f06be Build: optimize rule page title for small browser tabs (fixes #6888) (#6904) (Vitor Balocco) -* 02a00d6 Docs: clarify rule details for no-template-curly-in-string (#6900) (not-an-aardvark) -* b9b3446 Fix: sort-keys ignores destructuring patterns (fixes #6896) (#6899) (Kai Cataldo) -* 3fe3a4f Docs: Update options in `object-shorthand` (#6898) (Grant Snodgrass) -* cd09c96 Chore: Use object-shorthand batch 2 (refs #6407) (#6897) (Kai Cataldo) -* 2841008 Chore: Use object-shorthand batch 1 (refs #6407) (#6893) (Kai Cataldo) - -v3.3.0 - August 12, 2016 - -* 683ac56 Build: Add CI release scripts (fixes #6884) (#6885) (Nicholas C. Zakas) -* ebf8441 Update: `prefer-rest-params` relax for member accesses (fixes #5990) (#6871) (Toru Nagashima) -* df01c4f Update: Add regex support for exceptions (fixes #5187) (#6883) (Annie Zhang) -* 055742c Fix: `no-dupe-keys` type errors (fixes #6886) (#6889) (Toru Nagashima) -* e456fd3 New: `sort-keys` rule (fixes #6076) (#6800) (Toru Nagashima) -* 3e879fc Update: Rule "eqeqeq" to have more specific null handling (fixes #6543) (#6849) (Simon Sturmer) -* e8cb7f9 Chore: use eslint-plugin-node (refs #6407) (#6862) (Toru Nagashima) -* e37bbd8 Docs: Remove duplicate statement (#6878) (Richard Käll) -* 11395ca Fix: `no-dupe-keys` false negative (fixes #6801) (#6863) (Toru Nagashima) -* 1ecd2a3 Update: improve error message in `no-control-regex` (#6839) (Jordan Harband) -* d610d6c Update: make `max-lines` report the actual number of lines (fixes #6766) (#6764) (Jarek Rencz) -* b256c50 Chore: Fix glob for core js files for lint (fixes #6870) (#6872) (Gyandeep Singh) -* f8ab8f1 New: func-call-spacing rule (fixes #6080) (#6749) (Brandon Mills) -* be68f0b New: no-template-curly-in-string rule (fixes #6186) (#6767) (Jeroen Engels) -* 80789ab Chore: don't throw if rule is in old format (fixes #6848) (#6850) (Vitor Balocco) -* d47c505 Fix: `newline-after-var` false positive (fixes #6834) (#6847) (Toru Nagashima) -* bf0afcb Update: validate void operator in no-constant-condition (fixes #5726) (#6837) (Vitor Balocco) -* 5ef839e New: Add consistent and ..-as-needed to object-shorthand (fixes #5438) (#5439) (Martijn de Haan) -* 7e1bf01 Fix: update peerDependencies of airbnb option for `--init` (fixes #6843) (#6846) (Vitor Balocco) -* 8581f4f Fix: `no-invalid-this` false positive (fixes #6824) (#6827) (Toru Nagashima) -* 90f78f4 Update: add `props` option to `no-self-assign` rule (fixes #6718) (#6721) (Toru Nagashima) -* 30d71d6 Update: 'requireForBlockBody' modifier for 'arrow-parens' (fixes #6557) (#6558) (Nicolas Froidure) -* cdded07 Chore: use native `Object.assign` (refs #6407) (#6832) (Gyandeep Singh) -* 579ec49 Chore: Add link to rule change guidelines in "needs info" template (fixes #6829) (#6831) (Kevin Partington) -* 117e7aa Docs: Remove incorrect "constructor" statement from `no-new-symbol` docs (#6830) (Jarek Rencz) -* aef18b4 New: `no-unsafe-negation` rule (fixes #2716) (#6789) (Toru Nagashima) -* d94e945 Docs: Update Getting Started w/ Readme installation instructions (#6823) (Kai Cataldo) -* dfbc112 Upgrade: proxyquire to 1.7.10 (fixes #6821) (#6822) (alberto) -* 4c5e911 Chore: enable `prefer-const` and apply it to our codebase (refs #6407) (#6805) (Toru Nagashima) -* e524d16 Update: camelcase rule fix for import declarations (fixes #6755) (#6784) (Lorenzo Zottar) -* 8f3509d Update: make `eslint:all` excluding deprecated rules (fixes #6734) (#6756) (Toru Nagashima) -* 2b17459 New: `no-global-assign` rule (fixes #6586) (#6746) (alberto) - -v3.2.2 - August 1, 2016 - -* 510ce4b Upgrade: file-entry-cache@^1.3.1 (fixes #6816, refs #6780) (#6819) (alberto) -* 46b14cd Fix: ignore MemberExpression in VariableDeclarators (fixes #6795) (#6815) (Nicholas C. Zakas) - -v3.2.1 - August 1, 2016 - -* 584577a Build: Pin file-entry-cache to avoid licence issue (refs #6816) (#6818) (alberto) -* 38d0d23 Docs: clarify minor releases and suggest using `~ to version (#6804) (Henry Zhu) -* 4ca809e Fix: Normalizes messages so all end with a period (fixes #6762) (#6807) (Patrick McElhaney) -* c7488ac Fix: Make MemberExpression option opt-in (fixes #6797) (#6798) (Rich Trott) -* 715e8fa Docs: Update issue closing policy (fixes #6765) (#6808) (Nicholas C. Zakas) -* 288f7bf Build: Fix site generation (fixes #6791) (#6793) (Nicholas C. Zakas) -* 261a9f3 Docs: Update JSCS status in README (#6802) (alberto) -* 5ae0887 Docs: Update no-void.md (#6799) (Daniel Hritzkiv) - -v3.2.0 - July 29, 2016 - -* 2438ee2 Upgrade: Update markdownlint dependency to 0.2.0 (fixes #6781) (#6782) (David Anson) -* 4fc0018 Chore: dogfooding `no-var` rule and remove `var`s (refs #6407) (#6757) (Toru Nagashima) -* b22eb5c New: `no-tabs` rule (fixes #6079) (#6772) (Gyandeep Singh) -* ddea63a Chore: Updated no-control-regex tests to cover all cases (fixes #6438) (#6752) (Efe Gürkan YALAMAN) -* 1025772 Docs: Add plugin example to disabling with comments guide (fixes #6742) (#6747) (Brandon Mills) -* 628aae4 Docs: fix inconsistent spacing inside block comment (#6768) (Brian Jacobel) -* 2983c32 Docs: Add options to func-names config comments (#6748) (Brandon Mills) -* 2f94443 Docs: fix wrong path (#6763) (molee1905) -* 6f3faa4 Revert "Build: Remove support for Node v5 (fixes #6743)" (#6758) (Nicholas C. Zakas) -* 99dfd1c Docs: fix grammar issue in rule-changes page (#6761) (Vitor Balocco) -* e825458 Fix: Rule no-unused-vars had missing period (fixes #6738) (#6739) (Brian Mock) -* 71ae64c Docs: Clarify cache file deletion (fixes #4943) (#6712) (Nicholas C. Zakas) -* 26c85dd Update: merge warnings of consecutive unreachable nodes (fixes #6583) (#6729) (Toru Nagashima) -* 106e40b Fix: Correct grammar in object-curly-newline reports (fixes #6725) (#6728) (Vitor Balocco) -* e00754c Chore: Dogfooding ES6 rules (refs #6407) (#6735) (alberto) -* 181b26a Build: Remove support for Node v5 (fixes #6743) (#6744) (alberto) -* 5320a6c Update: `no-use-before-define` false negative on for-in/of (fixes #6699) (#6719) (Toru Nagashima) -* a2090cb Fix: space-infix-ops doesn't fail for type annotations(fixes #5211) (#6723) (Nicholas C. Zakas) -* 9c36ecf Docs: Add @vitorbal and @platinumazure to development team (Ilya Volodin) -* e09d1b8 Docs: describe all RuleTester options (fixes #4810, fixes #6709) (#6711) (Nicholas C. Zakas) -* a157f47 Chore: Update CLIEngine option desc (fixes #5179) (#6713) (Nicholas C. Zakas) -* a0727f9 Chore: fix `.gitignore` for vscode (refs #6383) (#6720) (Toru Nagashima) -* 75d2d43 Docs: Clarify Closure type hint expectation (fixes #5231) (#6714) (Nicholas C. Zakas) -* 95ea25a Update: Check indentation of multi-line chained properties (refs #1801) (#5940) (Rich Trott) -* e7b1e1c Docs: Edit issue/PR waiting period docs (fixes #6009) (#6715) (Nicholas C. Zakas) -* 053aa0c Update: Added 'allowSuper' option to `no-underscore-dangle` (fixes #6355) (#6662) (peteward44) -* 8929045 Build: Automatically generate rule index (refs #2860) (#6658) (Ilya Volodin) -* f916ae5 Docs: Fix multiline-ternary typos (#6704) (Cédric Malard) -* c64b0c2 Chore: First ES6 refactoring (refs #6407) (#6570) (Nicholas C. Zakas) - -v3.1.1 - July 18, 2016 - -* 565e584 Fix: `eslint:all` causes regression in 3.1.0 (fixes #6687) (#6696) (alberto) -* cb90359 Fix: Allow named recursive functions (fixes #6616) (#6667) (alberto) -* 3f206dd Fix: `balanced` false positive in `spaced-comment` (fixes #6689) (#6692) (Grant Snodgrass) -* 57f1676 Docs: Add missing brackets from code examples (#6700) (Plusb Preco) -* 124f066 Chore: Remove fixable key from multiline-ternary metadata (fixes #6683) (#6688) (Kai Cataldo) -* 9f96086 Fix: Escape control characters in XML. (fixes #6673) (#6672) (George Chung) - -v3.1.0 - July 15, 2016 - -* e8f8c6c Fix: incorrect exitCode when eslint is called with --stdin (fixes #6677) (#6682) (Steven Humphrey) -* 38639bf Update: make `no-var` fixable (fixes #6639) (#6644) (Toru Nagashima) -* dfc20e9 Fix: `no-unused-vars` false positive in loop (fixes #6646) (#6649) (Toru Nagashima) -* 2ba75d5 Update: relax outerIIFEBody definition (fixes #6613) (#6653) (Stephen E. Baker) -* 421e4bf Chore: combine multiple RegEx replaces with one (fixes #6669) (#6661) (Sakthipriyan Vairamani) -* 089ee2c Docs: fix typos,wrong path,backticks (#6663) (molee1905) -* ef827d2 Docs: Add another pre-commit hook to integrations (#6666) (David Alan Hjelle) -* a343b3c Docs: Fix option typo in no-underscore-dangle (Fixes #6674) (#6675) (Luke Page) -* 5985eb2 Chore: add internal rule that validates meta property (fixes #6383) (#6608) (Vitor Balocco) -* 4adb15f Update: Add `balanced` option to `spaced-comment` (fixes #4133) (#6575) (Annie Zhang) -* 1b13c25 Docs: fix incorrect example being mark as correct (#6660) (David Björklund) -* a8b4e40 Fix: Install required eslint plugin for "standard" guide (fixes #6656) (#6657) (Feross Aboukhadijeh) -* 720686b New: `endLine` and `endColumn` of the lint result. (refs #3307) (#6640) (Toru Nagashima) -* 54faa46 Docs: Small tweaks to CLI documentation (fixes #6627) (#6642) (Kevin Partington) -* e108850 Docs: Added examples and structure to `padded-blocks` (fixes #6628) (#6643) (alberto) -* 350e1c0 Docs: Typo (#6650) (Peter Rood) -* b837c92 Docs: Correct a term in max-len.md (fixes #6637) (#6641) (Vse Mozhet Byt) -* baeb313 Fix: Warning behavior for executeOnText (fixes #6611) (#6632) (Nicholas C. Zakas) -* e6004be Chore: Enable preferType in valid-jsdoc (refs #5188) (#6634) (Nicholas C. Zakas) -* ca323cf Fix: Use default assertion messages (fixes #6532) (#6615) (Dmitrii Abramov) -* 2bdf22c Fix: Do not throw exception if baseConfig is provided (fixes #6605) (#6625) (Kevin Partington) -* e42cacb Upgrade: mock-fs to 3.10, fixes for Node 6.3 (fixes #6621) (#6624) (Tim Schaub) -* 8a263ae New: multiline-ternary rule (fixes #6066) (#6590) (Kai Cataldo) -* e951303 Update: Adding new `key-spacing` option (fixes #5613) (#5907) (Kyle Mendes) -* 10c3e91 Docs: Remove reference from 3.0.0 migration guide (refs #6605) (#6618) (Kevin Partington) -* 5010694 Docs: Removed non-existing resource (#6609) (Moritz Kröger) -* 6d40d85 Docs: Note that PR requires ACCEPTED issue (refs #6568) (#6604) (Patrick McElhaney) - -v3.0.1 - July 5, 2016 - -* 27700cf Fix: `no-unused-vars` false positive around callback (fixes #6576) (#6579) (Toru Nagashima) -* 124d8a3 Docs: Pull request template (#6568) (Nicholas C. Zakas) -* e9a2ed9 Docs: Fix rules\id-length exceptions typos (fixes #6397) (#6593) (GramParallelo) -* a2cfa1b Fix: Make outerIIFEBody work correctly (fixes #6585) (#6596) (Nicholas C. Zakas) -* 9c451a2 Docs: Use string severity in example (#6601) (Kenneth Williams) -* 8308c0b Chore: remove path-is-absolute in favor of the built-in (fixes #6598) (#6600) (shinnn) -* 7a63717 Docs: Add missing pull request step (fixes #6595) (#6597) (Nicholas C. Zakas) -* de3ed84 Fix: make `no-unused-vars` ignore for-in (fixes #2342) (#6126) (Oleg Gaidarenko) -* 6ef2cbe Fix: strip Unicode BOM of config files (fixes #6556) (#6580) (Toru Nagashima) -* ee7fcfa Docs: Correct type of `outerIIFEBody` in `indent` (fixes #6581) (#6584) (alberto) -* 25fc7b7 Fix: false negative of `max-len` (fixes #6564) (#6565) (not-an-aardvark) -* f6b8452 Docs: Distinguish examples in rules under Stylistic Issues part 6 (#6567) (Kenneth Williams) - -v3.0.0 - July 1, 2016 - -* 66de9d8 Docs: Update installation instructions on README (#6569) (Nicholas C. Zakas) -* dc5b78b Breaking: Add `require-yield` rule to `eslint:recommended` (fixes #6550) (#6554) (Gyandeep Singh) -* 7988427 Fix: lib/config.js tests pass if personal config exists (fixes #6559) (#6566) (Kevin Partington) -* 4c05967 Docs: Update rule docs for new format (fixes #5417) (#6551) (Nicholas C. Zakas) -* 70da5a8 Docs: Correct link to rules page (#fixes 6553) (#6561) (alberto) -* e2b2030 Update: Check RegExp strings for `no-regex-spaces` (fixes #3586) (#6379) (Jackson Ray Hamilton) -* 397e51b Update: Implement outerIIFEBody for indent rule (fixes #6259) (#6382) (David Shepherd) -* 666da7c Docs: 3.0.0 migration guide (#6521) (Nicholas C. Zakas) -* b9bf8fb Docs: Update Governance Policy (fixes #6452) (#6522) (Nicholas C. Zakas) -* 1290657 Update: `no-unused-vars` ignores read it modifies itself (fixes #6348) (#6535) (Toru Nagashima) -* d601f6b Fix: Delete cache only when executing on files (fixes #6459) (#6540) (Kai Cataldo) -* e0d4b19 Breaking: Error thrown/printed if no config found (fixes #5987) (#6538) (Kevin Partington) -* 18663d4 Fix: false negative of `no-useless-rename` (fixes #6502) (#6506) (Toru Nagashima) -* 0a7936d Update: Add fixer for prefer-const (fixes #6448) (#6486) (Nick Heiner) -* c60341f Chore: Update index and `meta` for `"eslint:recommended"` (refs #6403) (#6539) (Mark Pedrotti) -* 73da28d Better wording for the error reported by the rule "no-else-return" #6411 (#6413) (Olivier Thomann) -* e06a5b5 Update: Add fixer for arrow-parens (fixes #4766) (#6501) (madmed88) -* 5f8f3e8 Docs: Remove Box as a sponsor (#6529) (Nicholas C. Zakas) -* 7dfe0ad Docs: fix max-lines samples (fixes #6516) (#6515) (Dmitriy Shekhovtsov) -* fa05119 Breaking: Update eslint:recommended (fixes #6403) (#6509) (Nicholas C. Zakas) -* e96177b Docs: Add "Proposing a Rule Change" link to CONTRIBUTING.md (#6511) (Kevin Partington) -* bea9096 Docs: Update pull request steps (fixes #6474) (#6510) (Nicholas C. Zakas) -* 7bcf6e0 Docs: Consistent example headings & text pt3 (refs #5446) (#6492) (Guy Fraser) -* 1a328d9 Docs: Consistent example headings & text pt4 (refs #5446) (#6493) (Guy Fraser) -* ff5765e Docs: Consistent example headings & text pt2 (refs #5446)(#6491) (Guy Fraser) -* 01384fa Docs: Fixing typos (refs #5446)(#6494) (Guy Fraser) -* 4343ae8 Fix: false negative of `object-shorthand` (fixes #6429) (#6434) (Toru Nagashima) -* b7d8c7d Docs: more accurate yoda-speak (#6497) (Tony Lukasavage) -* 3b0ab0d Fix: add warnIgnored flag to CLIEngine.executeOnText (fixes #6302) (#6305) (Robert Levy) -* c2c6cec Docs: Mark object-shorthand as fixable. (#6485) (Nick Heiner) -* 5668236 Fix: Allow objectsInObjects exception when destructuring (fixes #6469) (#6470) (Adam Renklint) -* 17ac0ae Fix: `strict` rule reports a syntax error for ES2016 (fixes #6405) (#6464) (Toru Nagashima) -* 4545123 Docs: Rephrase documentation for `no-duplicate-imports` (#6463) (Simen Bekkhus) -* 1b133e3 Docs: improve `no-native-reassign` and specifying globals (fixes #5358) (#6462) (Toru Nagashima) -* b179373 Chore: Remove dead code in excuteOnFiles (fixes #6467) (#6466) (Andrew Hutchings) -* 18fbc4b Chore: Simplify eslint process exit code (fixes #6368) (#6371) (alberto) -* 58542e4 Breaking: Drop support for node < 4 (fixes #4483) (#6401) (alberto) -* f50657e Breaking: use default for complexity in eslint:recommended (fixes #6021) (#6410) (alberto) -* 3e690fb Fix: Exit init early if guide is chosen w/ no package.json (fixes #6476) (#6478) (Kai Cataldo) - -v2.13.1 - June 20, 2016 - -* 434de7f Fix: wrong baseDir (fixes #6450) (#6457) (Toru Nagashima) -* 3c9ce09 Fix: Keep indentation when fixing `padded-blocks` "never" (fixes #6454) (#6456) (Ed Lee) -* a9d4cb2 Docs: Fix typo in max-params examples (#6471) (J. William Ashton) -* 1e185b9 Fix: no-multiple-empty-lines errors when no line breaks (fixes #6449) (#6451) (strawbrary) - -v2.13.0 - June 17, 2016 - -* cf223dd Fix: add test for a syntax error (fixes #6013) (#6378) (Toru Nagashima) -* da30cf9 Update: Add fixer for object-shorthand (fixes #6412) (#6418) (Nick Heiner) -* 2cd90eb Chore: Fix rule meta description inconsistencies (refs #5417) (#6422) (Mark Pedrotti) -* d798b2c Added quotes around "classes" option key (#6441) (Guy Fraser) -* 852b6df Docs: Delete empty table of links from Code Path Analysis (#6423) (Mark Pedrotti) -* 5e9117e Chore: sort rules in eslint.json (fixes #6425) (#6426) (alberto) -* c2b5277 Docs: Add gitter chat link to Reporting Bugs (#6430) (Mark Pedrotti) -* 1316db0 Update: Add `never` option for `func-names` (fixes #6059) (#6392) (alberto) -* 1c123e2 Update: Add autofix for `padded-blocks` (fixes #6320) (#6393) (alberto) -* 8ec89c8 Fix: `--print-config` return config inside subdir (fixes #6329) (#6385) (alberto) -* 4f73240 Fix: `object-curly-newline` multiline with comments (fixes #6381) (#6396) (Toru Nagashima) -* 77697a7 Chore: Fake config hierarchy fixtures (fixes #6206) (#6402) (Gyandeep Singh) -* 73a9a6d Docs: Fix links in Configuring ESLint (#6421) (Mark Pedrotti) -* ed84c4c Fix: improve `newline-per-chained-call` message (fixes #6340) (#6360) (Toru Nagashima) -* 9ea4e44 Docs: Update parser reference to `espree` instead of `esprima` (#6404) (alberto) -* 7f57467 Docs: Make `fix` param clearer (fixes #6366) (#6367) (Nick Heiner) -* fb49c7f Fix: nested `extends` with relative path (fixes #6358) (#6359) (Toru Nagashima) -* 5122f73 Update: no-multiple-empty-lines fixer (fixes #6225) (#6226) (Ruurd Moelker) -* 0e7ce72 Docs: Fix rest-spread-spacing's name (#6365) (cody) -* cfdd524 Fix: allow semi as braceless body of statements (fixes #6386) (#6391) (alberto) -* 6b08cfc Docs: key-spacing fixable documenation notes (fixes #6375) (#6376) (Ruurd Moelker) -* 4b4be3b Docs: `max-lines` option: fix `skipComments` typo (#6374) (Jordan Harband) -* 20ab4f6 Docs: Fix wrong link in object-curly-newline (#6373) (Grant Snodgrass) -* 412ce8d Docs: Fix broken links in no-mixed-operators (#6372) (Grant Snodgrass) - -v2.12.0 - June 10, 2016 - -* 54c30fb Update: Add explicit default option `always` for `eqeqeq` (refs #6144) (#6342) (alberto) -* 2d63370 Update: max-len will warn indented comment lines (fixes #6322) (#6324) (Kai Cataldo) -* dcd4ad7 Docs: clarify usage of inline disable comments (fixes #6335) (#6347) (Kai Cataldo) -* c03300b Docs: Clarified how plugin rules look in plugin configs (fixes #6346) (#6351) (Kevin Partington) -* 9c87709 Docs: Add semantic versioning policy (fixes #6244) (#6343) (Nicholas C. Zakas) -* 5affab1 Docs: Describe values under Extending Configuration Files (refs #6240) (#6336) (Mark Pedrotti) -* 2520f5a New: `max-lines` rule (fixes #6078) (#6321) (alberto) -* 9bfbc64 Update: Option for object literals in `arrow-body-style` (fixes #5936) (#6216) (alberto) -* 977cdd5 Chore: remove unused method from FileFinder (fixes #6344) (#6345) (alberto) -* 477fbc1 Docs: Add section about customizing RuleTester (fixes #6227) (#6331) (Jeroen Engels) -* 0e14016 New: `no-mixed-operators` rule (fixes #6023) (#6241) (Toru Nagashima) -* 6e03c4b Update: Add never option to arrow-body-style (fixes #6317) (#6318) (Andrew Hyndman) -* f804397 New: Add `eslint:all` option (fixes #6240) (#6248) (Robert Fletcher) -* dfe05bf Docs: Link JSCS rules to their corresponding page. (#6334) (alberto) -* 1cc4356 Docs: Remove reference to numeric config (fixes #6309) (#6327) (Kevin Partington) -* 2d4efbe Docs: Describe options in rule under Strict Mode (#6312) (Mark Pedrotti) -* c1953fa Docs: Typo fix 'and' -> 'any' (#6326) (Stephen Edgar) -* d49ab4b Docs: Code conventions improvements (#6313) (Kevin Partington) -* 316a507 Fix: one-var allows uninitialized vars in ForIn/ForOf (fixes #5744) (#6272) (Kai Cataldo) -* 6cbee31 Docs: Typo fix 'colum' -> 'column' (#6306) (Andrew Cobby) -* 2663569 New: `object-curly-newline` (fixes #6072) (#6223) (Toru Nagashima) -* 72c2ea5 Update: callback-return allows for object methods (fixes #4711) (#6277) (Kai Cataldo) -* 89580a4 Docs: Distinguish examples in rules under Stylistic Issues part 5 (#6291) (Kenneth Williams) -* 1313804 New: rest-spread-spacing rule (fixes #5391) (#6278) (Kai Cataldo) -* 61dfe68 Fix: `no-useless-rename` false positive in babel-eslint (fixes #6266) (#6290) (alberto) -* c78c8cb Build: Remove commit check from appveyor (fixes #6292) (#6294) (alberto) -* 3e38fc1 Chore: more tests for comments at the end of blocks (refs #6090) (#6273) (Kai Cataldo) -* 38dccdd Docs: `--no-ignore` disables all forms of ignore (fixes #6260) (#6304) (alberto) -* bb69380 Fix: no-useless-rename handles ExperimentalRestProperty (fixes #6284) (#6288) (Kevin Partington) -* fca0679 Update: Improve perf not traversing default ignored dirs (fixes #5679) (#6276) (alberto) -* 320e8b0 Docs: Describe options in rules under Possible Errors part 4 (#6270) (Mark Pedrotti) -* 3e052c1 Docs: Mark no-useless-rename as fixable in rules index (#6297) (Dalton Santos) - -v2.11.1 - May 30, 2016 - -* 64b0d0c Fix: failed to parse `/*eslint` comments by colon (fixes #6224) (#6258) (Toru Nagashima) -* c8936eb Build: Don't check commit count (fixes #5935) (#6263) (Nicholas C. Zakas) -* 113c1a8 Fix: `max-statements-per-line` false positive at exports (fixes #6264) (#6268) (Toru Nagashima) -* 03beb27 Fix: `no-useless-rename` false positives (fixes #6266) (#6267) (alberto) -* fe89037 Docs: Fix rule name in example (#6279) (Kenneth Williams) - -v2.11.0 - May 27, 2016 - -* 77dd2b4 Fix: On --init, print message when package.json is invalid (fixes #6257) (#6261) (Kai Cataldo) -* 7f60186 Fix: `--ignore-pattern` can't uningnore files (fixes #6127) (#6253) (alberto) -* fea8fe6 New: no-useless-rename (fixes #6058) (#6249) (Kai Cataldo) -* b4cff9d Fix: Incorrect object-property-newline behavior (fixes #6207) (#6213) (Rafał Ruciński) -* 35b4656 Docs: Edit arrow-parens.md to show correct output value (#6245) (Adam Terlson) -* ee0cd58 Fix: `newline-before-return` shouldn't disallow newlines (fixes #6176) (#6217) (alberto) -* d4f5526 Fix: `vars-on-top` crashs at export declarations (fixes #6210) (#6220) (Toru Nagashima) -* 088bda9 New: `unicode-bom` rule to allow or disallow BOM (fixes #5502) (#6230) (Andrew Johnston) -* 14bfc03 Fix: `comma-dangle` wrong autofix (fixes #6233) (#6235) (Toru Nagashima) -* cdd65d7 Docs: added examples for arrow-body-style (refs #5498) (#6242) (Tieme van Veen) -* c10c07f Fix: lost code in autofixing (refs #6233) (#6234) (Toru Nagashima) -* e6d5b1f Docs: Add rule deprecation section to user guide (fixes #5845) (#6201) (Kai Cataldo) -* 777941e Upgrade: doctrine to 1.2.2 (fixes #6121) (#6231) (alberto) -* 74c458d Update: key-spacing rule whitespace fixer (fixes #6167) (#6169) (Ruurd Moelker) -* 04bd586 New: Disallow use of Object.prototype methods on objects (fixes #2693) (#6107) (Andrew Levine) -* 53754ec Update: max in `max-statements-per-line` should be >=0 (fixes #6171) (#6172) (alberto) -* 54d1201 Update: Add treatUndefinedAsUnspecified option (fixes #6026) (#6194) (Kenneth Williams) -* 18152dd Update: Add checkLoops option to no-constant-condition (fixes #5477) (#6202) (Kai Cataldo) -* 7644908 Fix: no-multiple-empty-lines BOF and EOF defaults (fixes #6179) (#6180) (Ruurd Moelker) -* 72335eb Fix: `max-statements-per-line` false positive (fixes #6173, fixes #6153) (#6192) (Toru Nagashima) -* 9fce04e Fix: `generator-star-spacing` false positive (fixes #6135) (#6168) (Toru Nagashima) - -v2.10.2 - May 16, 2016 - -* bda5de5 Fix: Remove default parser from CLIEngine options (fixes #6182) (#6183) (alberto) -* e59e5a0 Docs: Describe options in rules under Possible Errors part 3 (#6105) (Mark Pedrotti) -* 842ab2e Build: Run phantomjs tests using karma (fixes #6128) (#6178) (alberto) - -v2.10.1 - May 14, 2016 - -* 9397135 Fix: `valid-jsdoc` false positive at default parameters (fixes #6097) (#6170) (Toru Nagashima) -* 2166ad4 Fix: warning & error count in `CLIEngine.getErrorResults` (fixes #6155) (#6157) (alberto) -* 1e0a652 Fix: ignore empty statements in max-statements-per-line (fixes #6153) (#6156) (alberto) -* f9ca0d6 Fix: `no-extra-parens` to check for nulls (fixes #6161) (#6164) (Gyandeep Singh) -* d095ee3 Fix: Parser merge sequence in config (fixes #6158) (#6160) (Gyandeep Singh) -* f33e49f Fix: `no-return-assign` to check for null tokens (fixes #6159) (#6162) (Gyandeep Singh) - -v2.10.0 - May 13, 2016 - -* 098cd9c Docs: Distinguish examples in rules under Stylistic Issues part 4 (#6136) (Kenneth Williams) -* 805742c Docs: Clarify JSX option usage (#6132) (Richard Collins) -* 10b0933 Fix: Optimize no-irregular-whitespace for the common case (fixes #6116) (#6117) (Andres Suarez) -* 36bec90 Docs: linkify URLs in development-environment.md (#6150) (chrisjshull) -* 29c401a Docs: Convert rules in index under Removed from list to table (#6091) (Mark Pedrotti) -* e13e696 Fix: `_` and `$` in isES5Constructor (fixes #6085) (#6094) (Kevin Locke) -* 67916b9 Fix: `no-loop-func` crashed (fixes #6130) (#6138) (Toru Nagashima) -* d311a62 Fix: Sort fixes consistently even if they overlap (fixes #6124) (#6133) (alberto) -* 6294459 Docs: Correct syntax for default ignores and `.eslintignore` example (#6118) (alberto) -* 067db14 Fix: Replace `assert.deepEqual` by `lodash.isEqual` (fixes #6111) (#6112) (alberto) -* 52fdf04 Fix: `no-multiple-empty-lines` duplicate errors at BOF (fixes #6113) (#6114) (alberto) -* e6f56da Docs: Document `--ignore-pattern` (#6120) (alberto) -* ef739cd Fix: Merge various command line configs at the same time (fixes #6104) (#6108) (Ed Lee) -* 767da6f Update: add returnAssign option to no-extra-parens (fixes #6036) (#6095) (Kai Cataldo) -* 06f6252 Build: Use split instead of slice/indexOf for commit check (fixes #6109) (#6110) (Ed Lee) -* c4fc39b Docs: Update headings of rules under Removed (refs #5774) (#6102) (Mark Pedrotti) -* 716345f Build: Match rule id at beginning of heading (refs #5774) (#6089) (Mark Pedrotti) -* 0734967 Update: Add an option to `prefer-const` (fixes #5692) (#6040) (Toru Nagashima) -* 7941d5e Update: Add autofix for `lines-around-comment` (fixes #5956) (#6062) (alberto) -* dc538aa Build: Pin proxyquire to ">=1.0.0 <1.7.5" (fixes #6096) (#6100) (alberto) -* 04563ca Docs: Describe options in rules under Possible Errors part 2 (#6063) (Mark Pedrotti) -* 5d390b2 Chore: Replace deprecated calls to context - batch 4 (fixes #6029) (#6087) (alberto) -* 6df4b23 Fix: `no-return-assign` warning nested expressions (fixes #5913) (#6041) (Toru Nagashima) -* 16fad58 Merge pull request #6088 from eslint/docs-one-var-per-line (alberto) -* 0b67170 Docs: Correct default for `one-var-declaration-per-line` (fixes #6017) (#6022) (Ed Lee) -* d40017f Fix: comma-style accounts for parens in array (fixes #6006) (#6038) (Kai Cataldo) -* 992d9cf Docs: Fix typography/teriminology in indent doc (fixes #6045) (#6044) (Rich Trott) -* 4ae39d2 Chore: Replace deprecated calls to context - batch 3 (refs #6029) (#6056) (alberto) -* 8633e4d Update: multipass should not exit prematurely (fixes #5995) (#6048) (alberto) -* 3c44c2c Update: Adds an avoidQuotes option for object-shorthand (fixes #3366) (#5870) (Chris Sauvé) -* a9a4652 Fix: throw when rule uses `fix` but `meta.fixable` not set (fixes #5970) (#6043) (Vitor Balocco) -* ad10106 Docs: Update comma-style docs (#6039) (Kai Cataldo) -* 388d6f8 Fix: `no-sequences` false negative at arrow expressions (fixes #6082) (#6083) (Toru Nagashima) -* 8e96064 Docs: Clarify rule example in README since we allow string error levels (#6061) (Kevin Partington) -* a66bf19 Fix: `lines-around-comment` multiple errors on same line (fixes #5965) (#5994) (alberto) -* a2cc54e Docs: Organize meta and describe visitor in Working with Rules (#5967) (Mark Pedrotti) -* ef8cbff Fix: object-shorthand should only lint computed methods (fixes #6015) (#6024) (Kai Cataldo) -* cd1b057 Chore: Replace deprecated calls to context - batch 2 (refs #6029) (#6049) (alberto) -* a3a6e06 Update: no-irregal-whitespace in a regular expression (fixes #5840) (#6018) (Linda_pp) -* 9b9d76c Chore: Replace deprecated calls to context - batch 1 (refs #6029) (#6034) (alberto) -* dd8bf93 Fix: blockless else in max-statements-per-line (fixes #5926) (#5993) (Glen Mailer) -* f84eb80 New: Add new rule `object-property-newline` (fixes #5667) (#5933) (Vitor Balocco) -* d5f4104 Docs: mention parsing errors in strict mode (fixes #5485) (#5991) (Mark Pedrotti) -* 249732e Docs: Move docs from eslint.github.io (fixes #5964) (#6012) (Nicholas C. Zakas) -* 4c2de6c Docs: Add example of diff clarity to comma-dangle rule docs (#6035) (Vitor Balocco) -* 3db2e89 Fix: Do not swallow exceptions in CLIEngine.getFormatter (fixes #5977) (#5978) (Gustav Nikolaj) -* eb2fb44 Fix: Always ignore defaults unless explicitly passed (fixes #5547) (#5820) (Ian VanSchooten) -* ab57e94 Docs: Add example of diff clarity to newline-per-chained-call (#5986) (Vitor Balocco) -* 88bc014 Docs: Update readme info about jshint (#6027) (alberto) -* a2c15cc Docs: put config example in code block (#6005) (Amos Wenger) -* a5011cb Docs: Fix a wrong examples' header of `prefer-arrow-callback`. (#6020) (Toru Nagashima) -* 1484ede Docs: Typo in nodejs-api (#6025) (alberto) -* ade6a9b Docs: typo: "eslint-disable-line" not "eslint disable-line" (#6019) (Will Day) -* 2f15354 Fix: Removed false positives of break and continue (fixes #5972) (#6000) (Onur Temizkan) - -v2.9.0 - April 29, 2016 - -* a8a2cd8 Fix: Avoid autoconfig crashes from inline comments (fixes #5992) (#5999) (Ian VanSchooten) -* 23b00e0 Upgrade: npm-license to 0.3.2 (fixes #5996) (#5998) (alberto) -* 377167d Upgrade: ignore to 3.1.2 (fixes #5979) (#5988) (alberto) -* 141b778 Fix: no-control-regex literal handling fixed. (fixes #5737) (#5943) (Efe Gürkan YALAMAN) -* 577757d Fix: Clarify color option (fixes #5928) (#5974) (Grant Snodgrass) -* e7e6581 Docs: Update CLA link (#5980) (Gustav Nikolaj) -* 0be26bc Build: Add nodejs 6 to travis (fixes #5971) (#5973) (Gyandeep Singh) -* e606523 New: Rule `no-unsafe-finally` (fixes #5808) (#5932) (Onur Temizkan) -* 42d1ecc Chore: Add metadata to existing rules - Batch 7 (refs #5417) (#5969) (Vitor Balocco) -* e2ad1ec Update: object-shorthand lints computed methods (fixes #5871) (#5963) (Chris Sauvé) -* d24516a Chore: Add metadata to existing rules - Batch 6 (refs #5417) (#5966) (Vitor Balocco) -* 1e7a3ef Fix: `id-match` false positive in property values (fixes #5885) (#5960) (Mike Sherov) -* 51ddd4b Update: Use process @abstract when processing @return (fixes #5941) (#5945) (Simon Schick) -* 52a4bea Update: Add autofix for `no-whitespace-before-property` (fixes #5927) (#5951) (alberto) -* 46e058d Docs: Correct typo in configuring.md (#5957) (Nick S. Plekhanov) -* 5f8abab Chore: Add metadata to existing rules - Batch 5 (refs #5417) (#5944) (Vitor Balocco) -* 0562f77 Chore: Add missing newlines to test cases (fixes #5947) (Rich Trott) -* fc78e78 Chore: Enable quote-props rule in eslint-config-eslint (refs #5188) (#5938) (Gyandeep Singh) -* 43f6d05 Docs: Update docs to refer to column (#5937) (Sashko Stubailo) -* 586478e Update: Add autofix for `comma-dangle` (fixes #3805) (#5925) (alberto) -* a4f9c5a Docs: Distinguish examples in rules under Stylistic Issues part 3 (Kenneth Williams) -* e7c0737 Chore: Enable no-console rule in eslint-config-eslint (refs #5188) (Kevin Partington) -* 0023fe6 Build: Add “chore” to commit tags (fixes #5880) (#5929) (Mike Sherov) -* 25d626a Upgrade: espree 3.1.4 (fixes #5923, fixes #5756) (Kai Cataldo) -* a01b412 New: Add `no-useless-computed-key` rule (fixes #5402) (Burak Yigit Kaya) -* 9afb9cb Chore: Remove workaround for espree and escope bugs (fixes #5852) (alberto) -* 3ffc582 Chore: Update copyright and license info (alberto) -* 249eb40 Docs: Clarify init sets up local installation (fixes #5874) (Kai Cataldo) -* 6cd8c86 Docs: Describe options in rules under Possible Errors part 1 (Mark Pedrotti) -* f842d18 Fix: `no-this-before-super` crash on unreachable paths (fixes #5894) (Toru Nagashima) -* a02960b Docs: Fix missing delimiter in README links (Kevin Partington) -* 3a9e72c Docs: Update developer guide with new standards (Nicholas C. Zakas) -* cb78585 Update: Add `allowUnboundThis` to `prefer-arrow-callback` (fixes #4668) (Burak Yigit Kaya) -* 02be29f Chore: Remove CLA check from bot (Nicholas C. Zakas) -* 220713e Chore: Add metadata to existing rules - Batch 4 (refs #5417) (Vitor Balocco) -* df53414 Chore: Include jQuery Foundation info (Nicholas C. Zakas) -* f1b2992 Fix: `no-useless-escape` false positive in JSXAttribute (fixes #5882) (Toru Nagashima) -* 74674ad Docs: Move `sort-imports` to 'ECMAScript 6' (Kenneth Williams) -* ae69ddb Docs: Fix severity type in example (Kenneth Williams) -* 19f6fff Update: Autofixing does multiple passes (refs #5329) (Nicholas C. Zakas) -* 1e4b0ca Docs: Reduce length of paragraphs in rules index (Mark Pedrotti) -* 8cfe1eb Docs: Fix a wrong option (Zach Orlovsky) -* 8f6739f Docs: Add alberto as reviewer (alberto) -* 2ae4938 Docs: Fix message for `inline-config` option (alberto) -* 089900b Docs: Fix a wrong rule name in an example (Toru Nagashima) -* c032b41 Docs: Fix emphasis (Toru Nagashima) -* ae606f0 Docs: Update JSCS info in README (alberto) -* a9c5323 Fix: Install ESLint on init if not installed (fixes #5833) (Kai Cataldo) -* ed38358 Docs: Removed incorrect example (James M. Greene) -* af3113c Docs: Fix config comments in indent docs (Brandon Mills) -* 2b39461 Update: `commentPattern` option for `default-case` rule (fixes #5803) (Artyom Lvov) - -v2.8.0 - April 15, 2016 - -* a8821a5 Docs: Distinguish examples in rules under Stylistic Issues part 2 (Kenneth Williams) -* 76913b6 Update: Add metadata to existing rules - Batch 3 (refs #5417) (Vitor Balocco) -* 34ad8d2 Fix: Check that module.paths exists (fixes #5791) (Nicholas C. Zakas) -* 37239b1 Docs: Add new members of the team (Ilya Volodin) -* fb3c2eb Update: allow template literals (fixes #5234) (Jonathan Haines) -* 5a4a935 Update: Add metadata to existing rules - Batch 2 (refs #5417) (Vitor Balocco) -* ea2e625 Fix: newline-before-return handles return as first token (fixes #5816) (Kevin Partington) -* f8db9c9 Update: add nestedBinaryExpressions to no-extra-parens (fixes #3065) (Ilya Volodin) -* 0045d57 Update: `allowNamedFunctions` in `prefer-arrow-callback` (fixes #5675) (alberto) -* 19da72a Update: Add metadata to existing rules - Batch 1 (refs #5417) (Vitor Balocco) -* cc14e43 Fix: `no-fallthrough` empty case with comment (fixes #5799) (alberto) -* 13c8b14 Fix: LogicalExpression checks for short circuit (fixes #5693) (Vamshi krishna) -* 73b225e Fix: Document and fix metadata (refs #5417) (Ilya Volodin) -* 882d199 Docs: Improve options description in `no-redeclare` (alberto) -* 6a71ceb Docs: Improve options description in `no-params-reassign` (alberto) -* 24b6215 Update: Include 'typeof' in rule 'no-constant-condition' (fixes #5228) (Vamshi krishna) -* a959063 Docs: Remove link to deprecated ESLintTester project (refs #3110) (Trey Thomas) -* 6fd7d82 Update: Change order in `eslint --init` env options (fixes #5742) (alberto) -* c59d909 Fix: Extra paren check around object arrow bodies (fixes #5789) (Brandon Mills) -* 6f88546 Docs: Use double quotes for better Win compatibility (fixes #5796) (alberto) -* 02743d5 Fix: catch self-assignment operators in `no-magic-number` (fixes #4400) (alberto) -* c94e74e Docs: Make rule descriptions more consistent (Kenneth Williams) -* 6028252 Docs: Distinguish examples in rules under Stylistic Issues part 1 (Mark Pedrotti) -* ccd8ca9 Fix: Added property onlyDeclaration to id-match rule (fixes #3488) (Gajus Kuizinas) -* 6703c02 Update: no-useless-escape / exact locations of errors (fixes #5751) (Onur Temizkan) -* 3d84b91 Fix: ignore trailing whitespace in template literal (fixes #5786) (Kai Cataldo) -* b0e6bc4 Update: add allowEmptyCatch option to no-empty (fixes #5800) (Kai Cataldo) -* f1f1dd7 Docs: Add @pedrottimark as a committer (Brandon Mills) -* 228f201 Update: `commentPattern` option for `no-fallthrough` rule (fixes #5757) (Artyom Lvov) -* 41db670 Docs: Clarify disable inline comments (Kai Cataldo) -* 9c9a295 Docs: Add note about shell vs node glob parameters in cli (alberto) -* 5308ff9 Docs: Add code backticks to sentence in fixable rules (Mark Pedrotti) -* 965ec06 Docs: fix the examples for space-before-function-paren. (Craig Silverstein) -* 2b202fc Update: Add ignore option to space-before-function-parens (fixes #4127) (Craig Silverstein) -* 24c12ba Fix: improve `constructor-super` errors for literals (fixes #5449) (Toru Nagashima) - -v2.7.0 - April 4, 2016 - -* 134cb1f Revert "Update: adds nestedBinaryExpressions for no-extra-parens rule (fixes #3065)" (Ilya Volodin) -* 7e80867 Docs: Update sentence in fixable rules (Mark Pedrotti) -* 1b6d5a3 Update: adds nestedBinaryExpressions for no-extra-parens (fixes #3065) (Nick Fisher) -* 4f93c32 Docs: Clarify `array-bracket-spacing` with newlines (fixes #5768) (alberto) -* 161ddac Fix: remove `console.dir` (fixes #5770) (Toru Nagashima) -* 0c33f6a Fix: indent rule uses wrong node for class indent level (fixes #5764) (Paul O’Shannessy) - -v2.6.0 - April 1, 2016 - -* ce2accd Fix: vars-on-top now accepts exported variables (fixes #5711) (Olmo Kramer) -* 7aacba7 Update: Deprecate option `maximum` in favor of `max` (fixes #5685) (Vitor Balocco) -* 5fe6fca Fix: no-useless-escape \B regex escape (fixes #5750) (Onur Temizkan) -* 9b73ffd Update: `destructuring` option of `prefer-const` rule (fixes #5594) (Toru Nagashima) -* 8ac9206 Docs: Typo in `sort-imports` (alberto) -* 12902c5 Fix: valid-jsdoc crash w/ Field & Array Type (fixes #5745) (fixes #5746) (Burak Yigit Kaya) -* 2c8b65a Docs: Edit examples for a few rules (Mark Pedrotti) -* d736bc2 Fix: Treat SwitchCase like a block in lines-around-comment (fixes #5718) (Scott O'Hara) -* 24a61a4 Update: make `no-useless-escape` allowing line breaks (fixes #5689) (Toru Nagashima) -* 4ecd45e Fix: Ensure proper lookup of config files (fixes #5175, fixes #5468) (Nicholas C. Zakas) -* 088e26b Fix: Update doctrine to allow hyphens in JSDoc names (fixes #5612) (Kai Cataldo) -* 692fd5d Upgrade: Old Chalk.JS deprecated method (fixes #5716) (Morris Singer) -* f59d91d Update: no-param-reassign error msgs (fixes #5705) (Isaac Levy) -* c1b16cd Fix: Object spread throws error in key-spacing rule. (fixes #5724) (Ziad El Khoury Hanna) -* 3091613 Docs: Correct explanation about properties (James Monger) -* cb0f0be Fix: Lint issue with `valid-jsdoc` rule (refs #5188) (Gyandeep Singh) -* aba1954 Build: Ignore jsdoc folder internally (fixes #5714) (alberto) -* a35f127 Fix: Lint for eslint project in regards to vars (refs #5188) (Gyandeep Singh) -* d9ab4f0 Fix: Windows scoped package configs (fixes #5644) (Nicholas C. Zakas) -* 8d0cd0d Update: Basic valid-jsdoc default parameter support (fixes #5658) (Tom Andrews) - -v2.5.3 - March 28, 2016 - -* 8749ac5 Build: Disable bundling dependencies (fixes #5687) (Nicholas C. Zakas) - -v2.5.2 - March 28, 2016 - -* 1cc7f8e Docs: Remove mention of minimatch for .eslintignore (Ian VanSchooten) -* 5bd69a9 Docs: Reorder FAQ in README (alberto) -* 98e6bd9 Fix: Correct default for indentation in `eslint --init` (fixes #5698) (alberto) -* 679095e Fix: make the default of `options.cwd` in runtime (fixes #5694) (Toru Nagashima) -* 4f06f2f Docs: Distinguish examples in rules under Best Practices part 2 (Mark Pedrotti) -* 013a18e Build: Fix bundling script (fixes #5680) (Nicholas C. Zakas) -* 8c5d954 Docs: Typo fix (István Donkó) -* 09659d6 Docs: Use string severity (Kenneth Williams) -* a4ae769 Docs: Manual changelog update for v2.5.1 (Nicholas C. Zakas) -* c41fab9 Fix: don't use path.extname with undefined value (fixes #5678) (Myles Borins) - -v2.5.1 - March 25, 2016 - -* Build: No functional changes, just republished with a working package. - -v2.5.0 - March 25, 2016 - -* 7021aa9 Fix: lines-around-comment in ESLint repo, part 2 (refs #5188) (Kevin Partington) -* 095c435 Docs: Remove ES2016 from experimental section of README (Kevin Partington) -* 646f863 Build: Bundle dependencies in package.json (fixes #5013) (Nicholas C. Zakas) -* ea06868 Docs: Clarify --ext does not apply to globs (fixes #5452) (Ian VanSchooten) -* 569c478 Build: Fix phantomjs CI problems (fixes #5666) (alberto) -* 6022426 Docs: Add link to chat room in README primary links (alberto) -* 2fbb530 Docs: Add link to "Proposing a Rule Change" in README (alberto) -* 25bf491 Upgrade: globals 9.x (fixes #5668) (Toru Nagashima) -* d6f8409 New: Rule - No useless escape (fixes #5460) (Onur Temizkan) -* 12a43f1 Docs: remove brace expansion from configuring.md (refs #5314) (Jonathan Haines) -* 92d1749 New: max-statements-per-line (fixes #5424) (Kenneth Williams) -* aaf324a Fix: missing support for json sub configs (fixes #5413) (Noam Okman) -* 48ad5fe Update: Add 'caughtErrors' to rule no-unused-vars (fixes #3837) (vamshi) -* ad90c2b Fix: incorrect config message (fixes #5653) (s0ph1e) -* a551831 Docs: Distinguish examples in rules under Node.js and CommonJS (Mark Pedrotti) -* 83cd651 Upgrade: chai to 3.5.0 (fixes #5647) (alberto) -* 32748dc Fix: `radix` rule false positive at shadowed variables (fixes #5639) (Toru Nagashima) -* 66db38d Fix: `--no-ignore` should not un-ignore default ignores (fixes #5547) (alberto) -* e3e06f3 Docs: Distinguish examples in rules under Best Practices part 4 (Mark Pedrotti) -* a9f0865 Docs: Update no-sequences rule docs for clarity (fixes #5536) (Kai Cataldo) -* bae7b30 Docs: Add michaelficarra as committer (alberto) -* e2990e7 Docs: Consistent wording in rules README (alberto) -* 49b4d2a Docs: Update team list with new members (Ilya Volodin) -* d0ae66c Update: Allow autoconfiguration for JSX code (fixes #5511) (Ian VanSchooten) -* 38a0a64 Docs: Clarify `linebreak-style` docs (fixes #5628) (alberto) -* 4b7305e Fix: Allow default ignored files to be unignored (fixes #5410) (Ian VanSchooten) -* 4b05ce6 Update: Enforce repo coding conventions via ESLint (refs #5188) (Kevin Partington) -* 051b255 Docs: Remove or rewrite references to former ecmaFeatures (Mark Pedrotti) -* 9a22625 Fix: `prefer-const` false positive at non-blocked if (fixes #5610) (Toru Nagashima) -* b1fd482 Fix: leading comments added from previous node (fixes #5531) (Kai Cataldo) -* c335650 Docs: correct the no-confusing-arrow docs (Daniel Norman) -* e94b77d Fix: Respect 'ignoreTrailingComments' in max-len rule (fixes #5563) (Vamshi Krishna) -* 9289ef8 Fix: handle personal package.json without config (fixes #5496) (Denny Christochowitz) -* 87d74b2 Fix: `prefer-const` got to not change scopes (refs #5284) (Toru Nagashima) -* 5a881e7 Docs: Fix typo in code snippet for no-unmodified-loop-condition rule (Chris Rebert) -* 03037c2 Update: Overrides for space-unary-ops (fixes #5060) (Afnan Fahim) -* 24d986a Update: replace MD5 hashing of cache files with MurmurHash (fixes #5522) (Michael Ficarra) -* f405030 Fix: Ensure allowing `await` as a property name (fixes #5564) (Toru Nagashima) -* aefc90c Fix: `no-useless-constructor` clash (fixes #5573) (Toru Nagashima) -* 9eaa20d Docs: Fix typo in CLI help message (ryym) -* a7c3e67 Docs: Invalid json in `configuring.md` (alberto) -* 4e50332 Docs: Make `prefer-template` examples consistent. (alberto) -* cfc14a9 Fix: valid-jsdoc correctly checks type union (fixes #5260) (Kai Cataldo) -* 689cb7d Fix: `quote-props` false positive on certain keys (fixes #5532) (Burak Yigit Kaya) -* 167a03a Fix: `brace-style` erroneously ignoring certain errors (fixes #5197) (Burak Yigit Kaya) -* 3133f28 Fix: object-curly-spacing doesn't know types (fixes #5537) (fixes #5538) (Burak Yigit Kaya) -* d0ca171 Docs: Separate parser and config questions in issue template (Kevin Partington) -* bc769ca Fix: Improve file path resolution (fixes #5314) (Ian VanSchooten) -* 9ca8567 Docs: Distinguish examples in rules under Best Practices part 3 (Mark Pedrotti) -* b9c69f1 Docs: Distinguish examples in rules under Variables part 2 (Mark Pedrotti) -* c289414 New: `no-duplicate-imports` rule (fixes #3478) (Simen Bekkhus) - -v2.4.0 - March 11, 2016 - -* 97b2466 Fix: estraverse/escope to work with unknowns (fixes #5476) (Nicholas C. Zakas) -* 641b3f7 Fix: validate the type of severity level (fixes #5499) (Shinnosuke Watanabe) -* 9ee8869 Docs: no-unused-expressions - add more edge unusable and usable examples (Brett Zamir) -* 56bf864 Docs: Create parity between no-sequences examples (Brett Zamir) -* 13ef1c7 New: add `--parser-options` to CLI (fixes #5495) (Jordan Harband) -* ae1ee54 Docs: fix func-style arrow exception option (Craig Martin) -* 91852fd Docs: no-lone-blocks - show non-problematic (and problematic) label (Brett Zamir) -* b34458f Docs: Rearrange rules for better categories (and improve rule summaries) (Brett Zamir) -* 1198b26 Docs: Minor README clarifications (Brett Zamir) -* 03e6869 Fix: newline-before-return: bug with comment (fixes #5480) (mustafa) -* ad100fd Fix: overindent in VariableDeclarator parens or brackets (fixes #5492) (David Greenspan) -* 9b8e04b Docs: Replace all node references to Node.js which is the official name (Brett Zamir) -* cc1f2f0 Docs: Minor fixes in no-new-func (Brett Zamir) -* 6ab81d4 Docs: Distinguish examples in rules under Best Practices part 1 (Mark Pedrotti) -* 9c6c70c Update: add `allowParens` option to `no-confusing-arrow` (fixes #5332) (Burak Yigit Kaya) -* 979c096 Docs: Document linebreak-style as fixable. (Afnan Fahim) -* 9f18a81 Fix: Ignore destructuring assignment in `object-shorthand` (fixes #5488) (alberto) -* 5d9a798 Docs: README.md, prefer-const; change modified to reassigned (Michiel de Bruijne) -* 38eb7f1 Fix: key-spacing checks ObjectExpression is multiline (fixes #5479) (Kevin Partington) -* 9592c45 Fix: `no-unmodified-loop-condition` false positive (fixes #5445) (Toru Nagashima) - -v2.3.0 - March 4, 2016 - -* 1b2c6e0 Update: Proposed no-magic-numbers option: ignoreJSXNumbers (fixes #5348) (Brandon Beeks) -* 63c0b7d Docs: Fix incorrect environment ref. in Rules in Plugins. (fixes #5421) (Jesse McCarthy) -* 124c447 Build: Add additional linebreak to docs (fixes #5464) (Ilya Volodin) -* 0d3831b Docs: Add RuleTester parserOptions migration steps (Kevin Partington) -* 50f4d5a Fix: extends chain (fixes #5411) (Toru Nagashima) -* 0547072 Update: Replace getLast() with lodash.last() (fixes #5456) (Jordan Eldredge) -* 8c29946 Docs: Distinguish examples in rules under Possible Errors part 1 (Mark Pedrotti) -* 5319b4a Docs: Distinguish examples in rules under Possible Errors part 2 (Mark Pedrotti) -* 1da2420 Fix: crash when SourceCode object was reused (fixes #5007) (Toru Nagashima) -* 9e9daab New: newline-before-return rule (fixes #5009) (Kai Cataldo) -* e1bbe45 Fix: Check space after anonymous generator star (fixes #5435) (alberto) -* 119e0ed Docs: Distinguish examples in rules under Variables (Mark Pedrotti) -* 905c049 Fix: `no-undef` false positive at new.target (fixes #5420) (Toru Nagashima) -* 4a67b9a Update: Add ES7 support (fixes #5401) (Brandon Mills) -* 89c757d Docs: Replace ecmaFeatures with parserOptions in working-with-rules (Kevin Partington) -* 804c08e Docs: Add parserOptions to RuleTester section of working-with-rules (Kevin Partington) -* 1982c50 Docs: Document string option for `no-unused-vars`. (alberto) -* 4f82b2b Update: Support classes in `padded-blocks` (fixes #5092) (alberto) -* ed5564f Docs: Specify results of `no-unused-var` with `args` (fixes #5334) (chinesedfan) -* de0a4ef Fix: `getFormatter` throws an error when called as static (fixes #5378) (cowchimp) -* 78f7ca9 Fix: Prevent crash from swallowing console.log (fixes #5381) (Ian VanSchooten) -* 34b648d Fix: remove tests which have invalid syntax (fixes #5405) (Toru Nagashima) -* 7de5ae4 Docs: Missing allow option in docs (Scott O'Hara) -* cf14c71 Fix: `no-useless-constructor` rule crashes sometimes (fixes #5290) (Burak Yigit Kaya) -* 70e3a02 Update: Allow string severity in config (fixes #3626) (Nicholas C. Zakas) -* 13c7c19 Update: Exclude ES5 constructors from consistent-return (fixes #5379) (Kevin Locke) -* 784d3bf Fix: Location info in `dot-notation` rule (fixes #5397) (Gyandeep Singh) -* 6280b2d Update: Support switch statements in padded-blocks (fixes #5056) (alberto) -* 25a5b2c Fix: Allow irregular whitespace in comments (fixes #5368) (Christophe Porteneuve) -* 560c0d9 New: no-restricted-globals rule implementation (fixes #3966) (Benoît Zugmeyer) -* c5bb478 Fix: `constructor-super` false positive after a loop (fixes #5394) (Toru Nagashima) -* 6c0c4aa Docs: Add Issue template (fixes #5313) (Kai Cataldo) -* 1170e67 Fix: indent rule doesn't handle constructor instantiation (fixes #5384) (Nate Cavanaugh) -* 6bc9932 Fix: Avoid magic numbers in rule options (fixes #4182) (Brandon Beeks) -* 694e1c1 Fix: Add tests to cover default magic number tests (fixes #5385) (Brandon Beeks) -* 0b5349d Fix: .eslintignore paths should be absolute (fixes #5362) (alberto) -* 8f6c2e7 Update: Better error message for plugins (refs #5221) (Nicholas C. Zakas) -* 972d41b Update: Improve error message for rule-tester (fixes #5369) (Jeroen Engels) -* fe3f6bd Fix: `no-self-assign` false positive at shorthand (fixes #5371) (Toru Nagashima) -* 2376291 Docs: Missing space in `no-fallthrough` doc. (alberto) -* 5aedb87 Docs: Add mysticatea as reviewer (Nicholas C. Zakas) -* 1f9fd10 Update: no-invalid-regexp allows custom flags (fixes #5249) (Afnan Fahim) -* f1eab9b Fix: Support for dash and slash in `valid-jsdoc` (fixes #1598) (Gyandeep Singh) -* cd12a4b Fix:`newline-per-chained-call` should only warn on methods (fixes #5289) (Burak Yigit Kaya) -* 0d1377d Docs: Add missing `symbol` type into valid list (Plusb Preco) -* 6aa2380 Update: prefer-const; change modified to reassigned (fixes #5350) (Michiel de Bruijne) -* d1d62c6 Fix: indent check for else keyword with Stroustrup style (fixes #5218) (Gyandeep Singh) -* 7932f78 Build: Fix commit message validation (fixes #5340) (Nicholas C. Zakas) -* 1c347f5 Fix: Cleanup temp files from tests (fixes #5338) (Nick) -* 2f3e1ae Build: Change rules to warnings in perf test (fixes #5330) (Brandon Mills) -* 36f40c2 Docs: Achieve consistent order of h2 in rule pages (Mark Pedrotti) - -v2.2.0 - February 19, 2016 - -* 45a22b5 Docs: remove esprima-fb from suggested parsers (Henry Zhu) -* a4d9cd3 Docs: Fix semi rule typo (Brandon Mills) -* 9d005c0 Docs: Correct option name in `no-implicit-coercion` rule (Neil Kistner) -* 2977248 Fix: Do not cache `.eslintrc.js` (fixes #5067) (Nick) -* 211eb8f Fix: no-multi-spaces conflicts with smart tabs (fixes #2077) (Afnan Fahim) -* 6dc9483 Fix: Crash in `constructor-super` (fixes #5319) (Burak Yigit Kaya) -* 3f48875 Docs: Fix yield star spacing examples (Dmitriy Lazarev) -* 4dab76e Docs: Update `preferType` heading to keep code format (fixes #5307) (chinesedfan) -* 7020b82 Fix: `sort-imports` warned between default and members (fixes #5305) (Toru Nagashima) -* 2f4cd1c Fix: `constructor-super` and `no-this-before-super` false (fixes #5261) (Toru Nagashima) -* 59e9c5b New: eslint-disable-next-line (fixes #5206) (Kai Cataldo) -* afb6708 Fix: `indent` rule forgot about some CallExpressions (fixes #5295) (Burak Yigit Kaya) -* d18d406 Docs: Update PR creation bot message (fixes #5268) (Nicholas C. Zakas) -* 0b1cd19 Fix: Ignore parser option if set to default parser (fixes #5241) (Kai Cataldo) - -v2.1.0 - February 15, 2016 - -* 7981ef5 Build: Fix release script (Nicholas C. Zakas) -* c9c34ea Fix: Skip computed members in `newline-per-chained-call` (fixes #5245) (Burak Yigit Kaya) -* b32ddad Build: `npm run perf` command should check the exit code (fixes #5279) (Burak Yigit Kaya) -* 6580d1c Docs: Fix incorrect `api.verify` JSDoc for `config` param (refs #5104) (Burak Yigit Kaya) -* 1f47868 Docs: Update yield-star-spacing documentation for 2.0.0 (fixes #5272) (Burak Yigit Kaya) -* 29da8aa Fix: `newline-after-var` crash on a switch statement (fixes #5277) (Toru Nagashima) -* 86c5a20 Fix: `func-style` should ignore ExportDefaultDeclarations (fixes #5183) (Burak Yigit Kaya) -* ba287aa Fix: Consolidate try/catches to top levels (fixes #5243) (Ian VanSchooten) -* 3ef5da1 Docs: Update no-magic-numbers#ignorearrayindexes. (KazuakiM) -* 0d6850e Update: Allow var declaration at end of block (fixes #5246) (alberto) -* c1e3a73 Fix: Popular style init handles missing package.json keys (refs #5243) (Brandon Mills) -* 68c6e22 Docs: fix default value of `keyword-spacing`'s overrides option. (Toru Nagashima) -* 00fe46f Upgrade: inquirer (fixes #5265) (Bogdan Chadkin) -* ef729d7 Docs: Remove option that is not being used in max-len rule (Thanos Lefteris) -* 4a5ddd5 Docs: Fix rule config above examples for require-jsdoc (Thanos Lefteris) -* c5cbc1b Docs: Add rule config above each example in jsx-quotes (Thanos Lefteris) -* f0aceba Docs: Correct alphabetical ordering in rule list (Randy Coulman) -* 1651ffa Docs: update migrating to 2.0.0 (fixes #5232) (Toru Nagashima) -* 9078537 Fix: `indent` on variable declaration with separate array (fixes #5237) (Burak Yigit Kaya) -* f8868b2 Docs: Typo fix in consistent-this rule doc fixes #5240 (Nicolas Froidure) -* 44f6915 Fix: ESLint Bot mentions the wrong person for extra info (fixes #5229) (Burak Yigit Kaya) -* c612a8e Fix: `no-empty-function` crash (fixes #5227) (Toru Nagashima) -* ae663b6 Docs: Add links for issue documentation (Nicholas C. Zakas) -* 717bede Build: Switch to using eslint-release (fixes #5223) (Nicholas C. Zakas) -* 980e139 Fix: Combine all answers for processAnswers (fixes #5220) (Ian VanSchooten) -* 1f2a1d5 Docs: Remove inline errors from doc examples (fixes #4104) (Burak Yigit Kaya) - -v2.0.0 - February 12, 2016 - -* cc3a66b Docs: Issue message when more info is needed (Nicholas C. Zakas) -* 2bc40fa Docs: Simplify hierarchy of headings in rule pages (Mark Pedrotti) -* 1666254 Docs: Add note about only-whitespace rule for `--fix` (fixes #4774) (Burak Yigit Kaya) -* 2fa09d2 Docs: Add `quotes` to related section of `prefer-template` (fixes #5192) (Burak Yigit Kaya) -* 7b12995 Fix: `key-spacing` not enforcing no-space in minimum mode (fixes #5008) (Burak Yigit Kaya) -* c1c4f4d Breaking: new `no-empty-function` rule (fixes #5161) (Toru Nagashima) - -v2.0.0-rc.1 - February 9, 2016 - -* 4dad82a Update: Adding shared environment for node and browser (refs #5196) (Eli White) -* b46c893 Fix: Config file relative paths (fixes #5164, fixes #5160) (Nicholas C. Zakas) -* aa5b2ac Fix: no-whitespace-before-property fixes (fixes #5167) (Kai Cataldo) -* 4e99924 Update: Replace several dependencies with lodash (fixes #5012) (Gajus Kuizinas) -* 718dc68 Docs: Remove periods in rules' README for consistency. (alberto) -* 7a47085 Docs: Correct `arrow-spacing` overview. (alberto) -* a4cde1b Docs: Clarify global-require inside try/catch (fixes #3834) (Brandon Mills) -* fd07925 Docs: Clarify docs for api.verify (fixes #5101, fixes #5104) (Burak Yigit Kaya) -* 413247f New: Add a --print-config flag (fixes #5099) (Christopher Crouzet) -* efeef42 Update: Implement auto fix for space-in-parens (fixes #5050) (alberto) -* e07fdd4 Fix: code path analysis and labels (fixes #5171) (Toru Nagashima) -* 2417bb2 Fix: `no-unmodified-loop-condition` false positive (fixes #5166) (Toru Nagashima) -* fae1884 Fix: Allow same-line comments in padded-blocks (fixes #5055) (Brandon Mills) -* a24d8ad Fix: Improve autoconfig logging (fixes #5119) (Ian VanSchooten) -* e525923 Docs: Correct obvious inconsistencies in rules h2 elements (Mark Pedrotti) -* 9675b5e Docs: `avoid-escape` does not allow backticks (fixes #5147) (alberto) -* a03919a Fix: `no-unexpected-multiline` false positive (fixes #5148) (Feross Aboukhadijeh) -* 74360d6 Docs: Note no-empty applies to empty block statements (fixes #5105) (alberto) -* 6eeaa3f Build: Remove pending tests (fixes #5126) (Ian VanSchooten) -* 02c83df Docs: Update docs/rules/no-plusplus.md (Sheldon Griffin) -* 0c4de5c New: Added "table" formatter (fixes #4037) (Gajus Kuizinas) -* 0a59926 Update: 'implied strict mode' ecmaFeature (fixes #4832) (Nick Evans) -* 53a6eb3 Fix: Handle singular case in rule-tester error message (fixes #5141) (Bryan Smith) -* 97ac91c Build: Increment eslint-config-eslint (Nicholas C. Zakas) - -v2.0.0-rc.0 - February 2, 2016 - -* 973c499 Fix: `sort-imports` crash (fixes #5130) (Toru Nagashima) -* e64b2c2 Breaking: remove `no-empty-label` (fixes #5042) (Toru Nagashima) -* 79ebbc9 Breaking: update `eslint:recommended` (fixes #5103) (Toru Nagashima) -* e1d7368 New: `no-extra-label` rule (fixes #5059) (Toru Nagashima) -* c83b48c Fix: find ignore file only in cwd (fixes #5087) (Nicholas C. Zakas) -* 3a24240 Docs: Fix jsdoc param names to match function param names (Thanos Lefteris) -* 1d79746 Docs: Replace ecmaFeatures setting with link to config page (Thanos Lefteris) -* e96ffd2 New: `template-curly-spacing` rule (fixes #5049) (Toru Nagashima) -* 4b02902 Update: Extended no-console rule (fixes #5095) (EricHenry) -* 757651e Docs: Remove reference to rules enabled by default (fixes #5100) (Brandon Mills) -* 0d87f5d Docs: Clarify eslint-disable comments only affect rules (fixes #5005) (Brandon Mills) -* 1e791a2 New: `no-self-assign` rule (fixes #4729) (Toru Nagashima) -* c706eb9 Fix: reduced `no-loop-func` false positive (fixes #5044) (Toru Nagashima) -* 3275e86 Update: Add extra aliases to consistent-this rule (fixes #4492) (Zachary Alexander Belford) -* a227360 Docs: Replace joyent org with nodejs (Thanos Lefteris) -* b2aedfe New: Rule to enforce newline after each call in the chain (fixes #4538) (Rajendra Patil) -* d67bfdd New: `no-unused-labels` rule (fixes #5052) (Toru Nagashima) - -v2.0.0-beta.3 - January 29, 2016 - -* 86a3e3d Update: Remove blank lines at beginning of files (fixes #5045) (Jared Sohn) -* 4fea752 New: Autoconfiguration from source inspection (fixes #3567) (Ian VanSchooten) -* 519f39f Breaking: Remove deprecated rules (fixes #5032) (Gyandeep Singh) -* c75ee4a New: Add support for configs in plugins (fixes #3659) (Ilya Volodin) -* 361377f Fix: `prefer-const` false positive reading before writing (fixes #5074) (Toru Nagashima) -* ff2551d Build: Improve `npm run perf` command (fixes #5028) (Toru Nagashima) -* bcca69b Update: add int32Hint option to `no-bitwise` rule (fixes #4873) (Maga D. Zandaqo) -* e3f2683 Update: config extends dependency lookup (fixes #5023) (Nicholas C. Zakas) -* a327a06 Fix: Indent rule for allman brace style scenario (fixes #5064) (Gyandeep Singh) -* afdff6d Fix: `no-extra-bind` false positive (fixes #5058) (Toru Nagashima) -* c1fad4f Update: add autofix support for spaced-comment (fixes #4969, fixes #5030) (Maga D. Zandaqo) -* 889b942 Revert "Docs: Update readme for legend describing rules icons (refs #4355)" (Nicholas C. Zakas) -* b0f21a0 Fix: `keyword-spacing` false positive in template strings (fixes #5043) (Toru Nagashima) -* 53fa5d1 Fix: `prefer-const` false positive in a loop condition (fixes #5024) (Toru Nagashima) -* 385d399 Docs: Update readme for legend describing rules icons (Kai Cataldo) -* 505f1a6 Update: Allow parser to be relative to config (fixes #4985) (Nicholas C. Zakas) -* 79e8a0b New: `one-var-declaration-per-line` rule (fixes #1622) (alberto) -* 654e6e1 Update: Check extra Boolean calls in no-extra-boolean-cast (fixes #3650) (Andrew Sutton) - -v2.0.0-beta.2 - January 22, 2016 - -* 3fa834f Docs: Fix formatter links (fixes #5006) (Gyandeep Singh) -* 54b1bc8 Docs: Fix link in strict.md (fixes #5026) (Nick Evans) -* e0c5cf7 Upgrade: Espree to 3.0.0 (fixes #5018) (Ilya Volodin) -* 69f149d Docs: language tweaks (Andres Kalle) -* 2b33c74 Update: valid-jsdoc to not require @return in constructors (fixes #4976) (Maga D. Zandaqo) -* 6ac2e01 Docs: Fix description of exported comment (Mickael Jeanroy) -* 29392f8 New: allow-multiline option on comma-dangle (fixes #4967) (Alberto Gimeno) -* 05b8cb3 Update: Module overrides all 'strict' rule options (fixes #4936) (Nick Evans) -* 8470474 New: Add metadata to few test rules (fixes #4494) (Ilya Volodin) -* ba11c1b Docs: Add Algolia as sponsor to README (Nicholas C. Zakas) -* b28a19d Breaking: Plugins envs and config removal (fixes #4782, fixes #4952) (Nicholas C. Zakas) -* a456077 Docs: newline-after-var doesn't allow invalid options. (alberto) -* 3e6a24e Breaking: Change `strict` default mode to "safe" (fixes #4961) (alberto) -* 5b96265 Breaking: Update eslint:recommended (fixes #4953) (alberto) -* 7457a4e Upgrade: glob to 6.x (fixes #4991) (Gyandeep Singh) -* d3f4bdd Build: Cleanup for code coverage (fixes #4983) (Gyandeep Singh) -* b8fbaa0 Fix: multiple message in TAP formatter (fixes #4975) (Simon Degraeve) -* 990f8da Fix: `getNodeByRangeIndex` performance issue (fixes #4989) (Toru Nagashima) -* 8ac1dac Build: Update markdownlint dependency to 0.1.0 (fixes #4988) (David Anson) -* 5cd5429 Fix: function expression doc in call expression (fixes #4964) (Tim Schaub) -* 4173baa Fix: `no-dupe-class-members` false positive (fixes #4981) (Toru Nagashima) -* 12fe803 Breaking: Supports Unicode BOM (fixes #4878) (Toru Nagashima) -* 1fc80e9 Build: Increment eslint-config-eslint (Nicholas C. Zakas) -* e0a9024 Update: Report newline between template tag and literal (fixes #4210) (Rajendra Patil) -* da3336c Update: Rules should get `sourceType` from Program node (fixes #4960) (Nick Evans) -* a2ac359 Update: Make jsx-quotes fixable (refs #4377) (Gabriele Petronella) -* ee1014d Fix: Incorrect error location for object-curly-spacing (fixes #4957) (alberto) -* b52ed17 Fix: Incorrect error location for space-in-parens (fixes #4956) (alberto) -* 9c1bafb Fix: Columns of parse errors are off by 1 (fixes #4896) (alberto) -* 5e4841e New: 'id-blacklist' rule (fixes #3358) (Keith Cirkel) -* 700b8bc Update: Add "allow" option to allow specific operators (fixes #3308) (Rajendra Patil) -* d82eeb1 Update: Add describe around rule tester blocks (fixes #4907) (Ilya Volodin) -* 2967402 Update: Add minimum value to integer values in schema (fixes #4941) (Ilya Volodin) -* 7b632f8 Upgrade: Globals to ^8.18.0 (fixes #4728) (Gyandeep Singh) -* 86e6e57 Fix: Incorrect error at EOF for no-multiple-empty-lines (fixes #4917) (alberto) -* 7f058f3 Fix: Incorrect location for padded-blocks (fixes #4913) (alberto) -* b3de8f7 Fix: Do not show ignore messages for default ignored files (fixes #4931) (Gyandeep Singh) -* b1360da Update: Support multiLine and singleLine options (fixes #4697) (Rajendra Patil) -* 82fbe09 Docs: Small semantic issue in documentation example (fixes #4937) (Marcelo Zarate) -* 13a4e30 Docs: Formatting inconsistencies (fixes #4912) (alberto) -* d487013 Update: Option to allow extra parens for cond assign (fixes #3317) (alberto) -* 0f469b4 Fix: JSDoc for function expression on object property (fixes #4900) (Tim Schaub) -* c2dee27 Update: Add module tests to no-extra-semi (fixes #4915) (Nicholas C. Zakas) -* 5a633bf Update: Add `preferType` option to `valid-jsdoc` rule (fixes #3056) (Gyandeep Singh) -* ebd01b7 Build: Fix version number on release (fixes #4921) (Nicholas C. Zakas) -* 2d626a3 Docs: Fix typo in changelog (Nicholas C. Zakas) -* c4c4139 Fix: global-require no longer warns if require is shadowed (fixes #4812) (Kevin Partington) -* bbf7f27 New: provide config.parser via `parserName` on RuleContext (fixes #3670) (Ben Mosher) - -v2.0.0-beta.1 - January 11, 2016 - -* 6c70d84 Build: Fix prerelease script (fixes #4919) (Nicholas C. Zakas) -* d5c9435 New: 'sort-imports' rule (refs #3143) (Christian Schuller) -* a8cfd56 Fix: remove duplicate of eslint-config-eslint (fixes #4909) (Toru Nagashima) -* 19a9fbb Breaking: `space-before-blocks` ignores after keywords (fixes #1338) (Toru Nagashima) -* c275b41 Fix: no-extra-parens ExpressionStatement restricted prods (fixes #4902) (Michael Ficarra) -* b795850 Breaking: don't load ~/.eslintrc when using --config flag (fixes #4881) (alberto) -* 3906481 Build: Add AppVeyor CI (fixes #4894) (Gyandeep Singh) -* 6390862 Docs: Fix missing footnote (Yoshiya Hinosawa) -* e5e06f8 Fix: Jsdoc comment for multi-line function expressions (fixes #4889) (Gyandeep Singh) -* 7c9be60 Fix: Fix path errors in windows (fixes #4888) (Gyandeep Singh) -* a1840e7 Fix: gray text was invisible on Solarized Dark theme (fixes #4886) (Jack Leigh) -* fc9f528 Docs: Modify unnecessary flag docs in quote-props (Matija Marohnić) -* 186e8f0 Update: Ignore camelcase in object destructuring (fixes #3185) (alberto) -* 7c97201 Upgrade: doctrine version to 1.1.0 (fixes #4854) (Tim Schaub) -* ceaf324 New: Add no-new-symbol rule (fixes #4862) (alberto) -* e2f2b66 Breaking: Remove defaults from `eslint:recommended` (fixes #4809) (Ian VanSchooten) -* 0b3c01e Docs: Specify default for func-style (fixes #4834) (Ian VanSchooten) -* 008ea39 Docs: Document default for operator assignment (fixes #4835) (alberto) -* b566f56 Docs: no-new-func typo (alberto) -* 1569695 Update: Adds default 'that' for consistent-this (fixes #4833) (alberto) -* f7b28b7 Docs: clarify `requireReturn` option for valid-jsdoc rule (fixes #4859) (Tim Schaub) -* 407f329 Build: Fix prerelease script (Nicholas C. Zakas) -* 688f277 Fix: Set proper exit code for Node > 0.10 (fixes #4691) (Nicholas C. Zakas) -* 58715e9 Fix: Use single quotes in context.report messages (fixes #4845) (Joe Lencioni) -* 5b7586b Fix: do not require a @return tag for @interface (fixes #4860) (Tim Schaub) -* d43f26c Breaking: migrate from minimatch to node-ignore (fixes #2365) (Stefan Grönke) -* c07ca39 Breaking: merges keyword spacing rules (fixes #3869) (Toru Nagashima) -* 871f534 Upgrade: Optionator version to 0.8.1 (fixes #4851) (Eric Johnson) -* 82d4cd9 Update: Add atomtest env (fixes #4848) (Andres Suarez) -* 9c9beb5 Update: Add "ignore" override for operator-linebreak (fixes #4294) (Rajendra Patil) -* 9c03abc Update: Add "allowCall" option (fixes #4011) (Rajendra Patil) -* 29516f1 Docs: fix migration guide for no-arrow-condition rule (Peter Newnham) -* 2ef7549 Docs: clarify remedy to some prefer-const errors (Turadg Aleahmad) -* 1288ba4 Update: Add default limit to `complexity` (fixes #4808) (Ian VanSchooten) -* d3e8179 Fix: env is rewritten by modules (fixes #4814) (Toru Nagashima) -* fd72aba Docs: Example fix for `no-extra-parens` rule (fixes #3527) (Gyandeep Singh) -* 315f272 Fix: Change max-warnings type to Int (fixes #4660) (George Zahariev) -* 5050768 Update: Ask for `commonjs` under config init (fixes #3553) (Gyandeep Singh) -* 4665256 New: Add no-whitespace-before-property rule (fixes #1086) (Kai Cataldo) -* f500d7d Fix: allow extending @scope/eslint/file (fixes #4800) (André Cruz) -* 5ab564e New: 'ignoreArrayIndexes' option for 'no-magic-numbers' (fixes #4370) (Christian Schuller) -* 97cdb95 New: Add no-useless-constructor rule (fixes #4785) (alberto) -* b9bcbaf Fix: Bug in no-extra-bind (fixes #4806) (Andres Kalle) -* 246a6d2 Docs: Documentation fix (Andres Kalle) -* 9ea6b36 Update: Ignore case in jsdoc tags (fixes #4576) (alberto) -* acdda24 Fix: ignore argument parens in no-unexpected-multiline (fixes #4658) (alberto) -* 4931f56 Update: optionally allow bitwise operators (fixes #4742) (Swaagie) - -v2.0.0-alpha-2 - December 23, 2015 - -* Build: Add prerelease script (Nicholas C. Zakas) -* Update: Allow to omit semi for one-line blocks (fixes #4385) (alberto) -* Fix: Handle getters and setters in key-spacing (fixes #4792) (Brandon Mills) -* Fix: ObjectRestSpread throws error in key-spacing rule (fixes #4763) (Ziad El Khoury Hanna) -* Docs: Typo in generator-star (alberto) -* Fix: Backtick behavior in quotes rule (fixes #3090) (Nicholas C. Zakas) -* Fix: Empty schemas forbid any options (fixes #4789) (Brandon Mills) -* Fix: Remove `isMarkedAsUsed` function name (fixes #4783) (Gyandeep Singh) -* Fix: support arrow functions in no-return-assign (fixes #4743) (alberto) -* Docs: Add license header to Working with Rules guide (Brandon Mills) -* Fix: RuleTester to show parsing errors (fixes #4779) (Nicholas C. Zakas) -* Docs: Escape underscores in no-path-concat (alberto) -* Update: configuration for classes in space-before-blocks (fixes #4089) (alberto) -* Docs: Typo in no-useless-concat (alberto) -* Docs: fix typos, suggests (molee1905) -* Docs: Typos in space-before-keywords and space-unary-ops (fixes #4771) (alberto) -* Upgrade: beefy to ^2.0.0, fixes installation errors (fixes #4760) (Kai Cataldo) -* Docs: Typo in no-unexpected-multiline (fixes #4756) (alberto) -* Update: option to ignore top-level max statements (fixes #4309) (alberto) -* Update: Implement auto fix for semi-spacing rule (fixes #3829) (alberto) -* Fix: small typos in code examples (Plusb Preco) -* Docs: Add section on file extensions to user-guide/configuring (adam) -* Fix: Comma first issue in `indent` (fixes #4739, fixes #3456) (Gyandeep Singh) -* Fix: no-constant-condition false positive (fixes #4737) (alberto) -* Fix: Add source property for fatal errors (fixes #3325) (Gyandeep Singh) -* New: Add a comment length option to the max-len rule (fixes #4665) (Ian) -* Docs: RuleTester doesn't require any tests (fixes #4681) (alberto) -* Fix: Remove path analysis from debug log (fixes #4631) (Ilya Volodin) -* Fix: Set null to property ruleId when fatal is true (fixes #4722) (Sébastien Règne) -* New: Visual Studio compatible formatter (fixes #4708) (rhpijnacker) -* New: Add greasemonkey environment (fixes #4715) (silverwind) -* Fix: always-multiline for comma-dangle import (fixes #4704) (Nicholas C. Zakas) -* Fix: Check 1tbs non-block else (fixes #4692) (Nicholas C. Zakas) -* Fix: Apply environment configs last (fixes #3915) (Nicholas C. Zakas) -* New: `no-unmodified-loop-condition` rule (fixes #4523) (Toru Nagashima) -* Breaking: deprecate `no-arrow-condition` rule (fixes #4417) (Luke Karrys) -* Update: Add cwd option for cli-engine (fixes #4472) (Ilya Volodin) -* New: Add no-confusing-arrow rule (refs #4417) (Luke Karrys) -* Fix: ensure `ConfigOps.merge` do a deep copy (fixes #4682) (Toru Nagashima) -* Fix: `no-invalid-this` allows this in static method (fixes #4669) (Toru Nagashima) -* Fix: Export class syntax for `require-jsdoc` rule (fixes #4667) (Gyandeep Singh) -* Update: Add "safe" mode to strict (fixes #3306) (Brandon Mills) - -v2.0.0-alpha-1 - December 11, 2015 - -* Breaking: Correct links between variables and references (fixes #4615) (Toru Nagashima) -* Fix: Update rule tests for parser options (fixes #4673) (Nicholas C. Zakas) -* Breaking: Implement parserOptions (fixes #4641) (Nicholas C. Zakas) -* Fix: max-len rule overestimates the width of some tabs (fixes #4661) (Nick Evans) -* New: Add no-implicit-globals rule (fixes #4542) (Joshua Peek) -* Update: `no-use-before-define` checks invalid initializer (fixes #4280) (Toru Nagashima) -* Fix: Use oneValuePerFlag for --ignore-pattern option (fixes #4507) (George Zahariev) -* New: `array-callback-return` rule (fixes #1128) (Toru Nagashima) -* Upgrade: Handlebars to >= 4.0.5 for security reasons (fixes #4642) (Jacques Favreau) -* Update: Add class body support to `indent` rule (fixes #4372) (Gyandeep Singh) -* Breaking: Remove space-after-keyword newline check (fixes #4149) (Nicholas C. Zakas) -* Breaking: Treat package.json like the rest of configs (fixes #4451) (Ilya Volodin) -* Docs: writing mistake (molee1905) -* Update: Add 'method' option to no-empty (fixes #4605) (Kai Cataldo) -* Breaking: Remove autofix from eqeqeq (fixes #4578) (Ilya Volodin) -* Breaking: Remove ES6 global variables from builtins (fixes #4085) (Brandon Mills) -* Fix: Handle forbidden LineTerminators in no-extra-parens (fixes #4229) (Brandon Mills) -* Update: Option to ignore constructor Fns object-shorthand (fixes #4487) (Kai Cataldo) -* Fix: Check YieldExpression argument in no-extra-parens (fixes #4608) (Brandon Mills) -* Fix: Do not cache `package.json` (fixes #4611) (Spain) -* Build: Consume no-underscore-dangle allowAfterThis option (fixes #4599) (Kevin Partington) -* New: Add no-restricted-imports rule (fixes #3196) (Guy Ellis) -* Docs: no-extra-semi no longer refers to deprecated rule (fixes #4598) (Kevin Partington) -* Fix: `consistent-return` checks the last (refs #3530, fixes #3373) (Toru Nagashima) -* Update: add class option to `no-use-before-define` (fixes #3944) (Toru Nagashima) -* Breaking: Simplify rule schemas (fixes #3625) (Nicholas C. Zakas) -* Docs: Update docs/rules/no-plusplus.md (Xiangyun Chi) -* Breaking: added bower_components to default ignore (fixes #3550) (Julian Laval) -* Fix: `no-unreachable` with the code path (refs #3530, fixes #3939) (Toru Nagashima) -* Fix: `no-this-before-super` with the code path analysis (refs #3530) (Toru Nagashima) -* Fix: `no-fallthrough` with the code path analysis (refs #3530) (Toru Nagashima) -* Fix: `constructor-super` with the code path analysis (refs #3530) (Toru Nagashima) -* Breaking: Switch to Espree 3.0.0 (fixes #4334) (Nicholas C. Zakas) -* Breaking: Freeze context object (fixes #4495) (Nicholas C. Zakas) -* Docs: Add Code of Conduct (fixes #3095) (Nicholas C. Zakas) -* Breaking: Remove warnings of readonly from `no-undef` (fixes #4504) (Toru Nagashima) -* Update: allowAfterThis option in no-underscore-dangle (fixes #3435) (just-boris) -* Fix: Adding options unit tests for --ignore-pattern (refs #4507) (Kevin Partington) -* Breaking: Implement yield-star-spacing rule (fixes #4115) (Bryan Smith) -* New: `prefer-rest-params` rule (fixes #4108) (Toru Nagashima) -* Update: `prefer-const` begins to cover separating init (fixes #4474) (Toru Nagashima) -* Fix: `no-eval` come to catch indirect eval (fixes #4399, fixes #4441) (Toru Nagashima) -* Breaking: Default no-magic-numbers to none. (fixes #4193) (alberto) -* Breaking: Allow empty arrow body (fixes #4411) (alberto) -* New: Code Path Analysis (fixes #3530) (Toru Nagashima) - -v1.10.3 - December 1, 2015 - -* Docs: Update strict rule docs (fixes #4583) (Nicholas C. Zakas) -* Docs: Reference .eslintrc.* in contributing docs (fixes #4532) (Kai Cataldo) -* Fix: Add for-of to `curly` rule (fixes #4571) (Kai Cataldo) -* Fix: Ignore space before function in array start (fixes #4569) (alberto) - -v1.10.2 - November 27, 2015 - -* Upgrade: escope@3.3.0 (refs #4485) (Nicholas C. Zakas) -* Upgrade: Pinned down js-yaml to avoid breaking dep (fixes #4553) (alberto) -* Fix: lines-around-comment with multiple comments (fixes #3509) (alberto) -* Upgrade: doctrine@0.7.1 (fixes #4545) (Kevin Partington) -* Fix: Bugfix for eqeqeq autofix (fixes #4540) (Kevin Partington) -* Fix: Add for-in to `curly` rule (fixes #4436) (Kai Cataldo) -* Fix: `valid-jsdoc` unneeded require check fix (fixes #4527) (Gyandeep Singh) -* Fix: `brace-style` ASI fix for if-else condition (fixes #4520) (Gyandeep Singh) -* Build: Add branch update during release process (fixes #4491) (Gyandeep Singh) -* Build: Allow revert commits in commit messages (fixes #4452) (alberto) -* Fix: Incorrect location in no-fallthrough (fixes #4516) (alberto) -* Fix: `no-spaced-func` had been crashed (fixes #4508) (Toru Nagashima) -* Fix: Add a RestProperty test of `no-undef` (fixes #3271) (Toru Nagashima) -* Docs: Load badge from HTTPS (Brian J Brennan) -* Build: Update eslint bot messages (fixes #4497) (Nicholas C. Zakas) - -v1.10.1 - November 20, 2015 - -* Fix: Revert freezing context object (refs #4495) (Nicholas C. Zakas) -* 1.10.0 (Nicholas C. Zakas) - -v1.10.0 - November 20, 2015 - -* Docs: Remove dupes from changelog (Nicholas C. Zakas) -* Update: --init to create extensioned files (fixes #4476) (Nicholas C. Zakas) -* Docs: Update description of exported comment (fixes #3916) (Nicholas C. Zakas) -* Docs: Move legacy rules to stylistic (files #4111) (Nicholas C. Zakas) -* Docs: Clean up description of recommended rules (fixes #4365) (Nicholas C. Zakas) -* Docs: Fix home directory config description (fixes #4398) (Nicholas C. Zakas) -* Update: Add class support to `require-jsdoc` rule (fixes #4268) (Gyandeep Singh) -* Update: return type error in `valid-jsdoc` rule (fixes #4443) (Gyandeep Singh) -* Update: Display errors at the place where fix should go (fixes #4470) (nightwing) -* Docs: Fix typo in default `cacheLocation` value (Andrew Hutchings) -* Fix: Handle comments in block-spacing (fixes #4387) (alberto) -* Update: Accept array for `ignorePattern` (fixes #3982) (Jesse McCarthy) -* Update: replace label and break with IIFE and return (fixes #4459) (Ilya Panasenko) -* Fix: space-before-keywords false positive (fixes #4449) (alberto) -* Fix: Improves performance (refs #3530) (Toru Nagashima) -* Fix: Autofix quotes produces invalid javascript (fixes #4380) (nightwing) -* Docs: Update indent.md (Nathan Brown) -* New: Disable comment config option (fixes #3901) (Matthew Riley MacPherson) -* New: Config files with extensions (fixes #4045, fixes #4263) (Nicholas C. Zakas) -* Revert "Update: Add JSX exceptions to no-extra-parens (fixes #4229)" (Brandon Mills) -* Update: Add JSX exceptions to no-extra-parens (fixes #4229) (Brandon Mills) -* Docs: Replace link to deprecated rule with newer rule (Andrew Marshall) -* Fix: `no-extend-native` crashed at empty defineProperty (fixes #4438) (Toru Nagashima) -* Fix: Support empty if blocks in lines-around-comment (fixes #4339) (alberto) -* Fix: `curly` warns wrong location for `else` (fixes #4362) (Toru Nagashima) -* Fix: `id-length` properties never option (fixes #4347) (Toru Nagashima) -* Docs: missing close rbracket in example (@storkme) -* Revert "Update: Allow empty arrow body (fixes #4411)" (Nicholas C. Zakas) -* Fix: eqeqeq autofix avoids clashes with space-infix-ops (fixes #4423) (Kevin Partington) -* Docs: Document semi-spacing behaviour (fixes #4404) (alberto) -* Update: Allow empty arrow body (fixes #4411) (alberto) -* Fix: Handle comments in comma-spacing (fixes #4389) (alberto) -* Update: Refactor eslint.verify args (fixes #4395) (Nicholas C. Zakas) -* Fix: no-undef-init should ignore const (fixes #4284) (Nicholas C. Zakas) -* Fix: Add the missing "as-needed" docs to the radix rule (fixes #4364) (Michał Gołębiowski) -* Fix: Display singular/plural version of "line" in message (fixes #4359) (Marius Schulz) -* Update: Add Popular Style Guides (fixes #4320) (Jamund Ferguson) -* Fix: eslint.report can be called w/o node if loc provided (fixes #4220) (Kevin Partington) -* Update: no-implicit-coercion validate AssignmentExpression (fixes #4348) (Ilya Panasenko) - -v1.9.0 - November 6, 2015 - -* Update: Make radix accept a "as-needed" option (fixes #4048) (Michał Gołębiowski) -* Fix: Update the message to include number of lines (fixes #4342) (Brian Delahunty) -* Docs: ASI causes problem whether semicolons are used or not (Thai Pangsakulyanont) -* Fix: Fixer to not overlap ranges among fix objects (fixes #4321) (Gyandeep Singh) -* Update: Add default to `max-nested-callbacks` (fixes #4297) (alberto) -* Fix: Check comments in space-in-parens (fixes #4302) (alberto) -* Update: Add quotes to error messages to improve clarity (fixes #4313) (alberto) -* Fix: tests failing due to differences in temporary paths (fixes #4324) (alberto) -* Fix: Make tests compatible with Windows (fixes #4315) (Ian VanSchooten) -* Update: Extract glob and filesystem logic from cli-engine (fixes #4305) (Ian VanSchooten) -* Build: Clarify commit-check messages (fixes #4256) (Ian VanSchooten) -* Upgrade: Upgrade various dependencies (fixes #4303) (Gyandeep Singh) -* Build: Add node 5 to travis build (fixes #4310) (Gyandeep Singh) -* Fix: ensure using correct estraverse (fixes #3951) (Toru Nagashima) -* Docs: update docs about using gitignore (Mateusz Derks) -* Update: Detect and fix wrong linebreaks (fixes #3981) (alberto) -* New: Add no-case-declarations rule (fixes #4278) (Erik Arvidsson) - -v1.8.0 - October 30, 2015 - -* Fix: Check for node property before testing type (fixes #4298) (Ian VanSchooten) -* Docs: Specify 'double' as default for quotes (fixes #4270) (Ian VanSchooten) -* Fix: Missing errors in space-in-parens (fixes #4257, fixes #3996) (alberto) -* Docs: fixed typo (Mathieu M-Gosselin) -* Fix: `cacheLocation` handles paths in windows style. (fixes #4285) (royriojas) -* Docs: fixed typo (mpal9000) -* Update: Add support for class in `valid-jsdoc` rule (fixes #4279) (Gyandeep Singh) -* Update: cache-file accepts a directory. (fixes #4241) (royriojas) -* Update: Add `maxEOF` to no-multiple-empty-lines (fixes #4235) (Adrien Vergé) -* Update: fix option for comma-spacing (fixes #4232) (HIPP Edgar (PRESTA EXT)) -* Docs: Fix use of wrong word in configuration doc (Jérémie Astori) -* Fix: Prepare config before verifying SourceCode (fixes #4230) (Ian VanSchooten) -* Update: RuleTester come to check AST was not modified (fixes #4156) (Toru Nagashima) -* Fix: wrong count for 'no-multiple-empty-lines' on last line (fixes #4228) (alberto) -* Update: Add `allow` option to `no-shadow` rule (fixes #3035) (Gyandeep Singh) -* Doc: Correct the spelling of Alberto's surname (alberto) -* Docs: Add alberto as a committer (Gyandeep Singh) -* Build: Do not stub console in testing (fixes #1328) (Gyandeep Singh) -* Fix: Check node exists before checking type (fixes #4231) (Ian VanSchooten) -* Update: Option to exclude afterthoughts from no-plusplus (fixes #4093) (Brody McKee) -* New: Add rule no-arrow-condition (fixes #3280) (Luke Karrys) -* Update: Add linebreak style option to eol-last (fixes #4148) (alberto) -* New: arrow-body-style rule (fixes #4109) (alberto) - -v1.7.3 - October 21, 2015 - -* Fix: Support comma-first style in key-spacing (fixes #3877) (Brandon Mills) -* Fix: no-magic-numbers: variable declarations (fixes #4192) (Ilya Panasenko) -* Fix: Support ES6 shorthand in key-spacing (fixes #3678) (Brandon Mills) -* Fix: `indent` array with memberExpression (fixes #4203) (Gyandeep Singh) -* Fix: `indent` param function on sameline (fixes #4174) (Gyandeep Singh) -* Fix: no-multiple-empty-lines fails when empty line at EOF (fixes #4214) (alberto) -* Fix: `comma-dangle` false positive (fixes #4200) (Nicholas C. Zakas) -* Fix: `valid-jsdoc` prefer problem (fixes #4205) (Nicholas C. Zakas) -* Docs: Add missing single-quote (Kevin Lamping) -* Fix: correct no-multiple-empty-lines at EOF (fixes #4140) (alberto) - -v1.7.2 - October 19, 2015 - -* Fix: comma-dangle confused by parens (fixes #4195) (Nicholas C. Zakas) -* Fix: no-mixed-spaces-and-tabs (fixes #4189, fixes #4190) (alberto) -* Fix: no-extend-native disallow using Object.properties (fixes #4180) (Nathan Woltman) -* Fix: no-magic-numbers should ignore Number.parseInt (fixes #4167) (Henry Zhu) - -v1.7.1 - October 16, 2015 - -* Fix: id-match schema (fixes #4155) (Nicholas C. Zakas) -* Fix: no-magic-numbers should ignore parseInt (fixes #4167) (Nicholas C. Zakas) -* Fix: `indent` param function fix (fixes #4165, fixes #4164) (Gyandeep Singh) - -v1.7.0 - October 16, 2015 - -* Fix: array-bracket-spacing for empty array (fixes #4141) (alberto) -* Fix: `indent` arrow function check fix (fixes #4142) (Gyandeep Singh) -* Update: Support .js files for config (fixes #3102) (Gyandeep Singh) -* Fix: Make eslint-config-eslint work (fixes #4145) (Nicholas C. Zakas) -* Fix: `prefer-arrow-callback` had been wrong at arguments (fixes #4095) (Toru Nagashima) -* Docs: Update various rules docs (Nicholas C. Zakas) -* New: Create eslint-config-eslint (fixes #3525) (Nicholas C. Zakas) -* Update: RuleTester allows string errors in invalid cases (fixes #4117) (Kevin Partington) -* Docs: Reference no-unexpected-multiline in semi (fixes #4114) (alberto) -* Update: added exceptions to `lines-around-comment` rule. (fixes #2965) (Mathieu M-Gosselin) -* Update: Add `matchDescription` option to `valid-jsdoc` (fixes #2449) (Gyandeep Singh) -* Fix: check for objects or arrays in array-bracket-spacing (fixes #4083) (alberto) -* Docs: Alphabetize Rules lists (Kenneth Chung) -* Fix: message templates fail when no parameters are passed (fixes #4080) (Ilya Volodin) -* Fix: `indent` multi-line function call (fixes #4073, fixes #4075) (Gyandeep Singh) -* Docs: Improve comma-dangle documentation (Gilad Peleg) -* Fix: no-mixed-tabs-and-spaces fails with some comments (fixes #4086) (alberto) -* Fix: `semi` to check for do-while loops (fixes #4090) (Gyandeep Singh) -* Build: Fix path related failures on Windows in tests (fixes #4061) (Burak Yigit Kaya) -* Fix: `no-unused-vars` had been missing some parameters (fixes #4047) (Toru Nagashima) -* Fix: no-mixed-spaces-and-tabs with comments and templates (fixes #4077) (alberto) -* Update: Add `allow` option for `no-underscore-dangle` rule (fixes #2135) (Gyandeep Singh) -* Update: `allowArrowFunctions` option for `func-style` rule (fixes #1897) (Gyandeep Singh) -* Fix: Ignore template literals in no-mixed-tabs-and-spaces (fixes #4054) (Nicholas C. Zakas) -* Build: Enable CodeClimate (fixes #4068) (Nicholas C. Zakas) -* Fix: `no-cond-assign` had needed double parens in `for` (fixes #4023) (Toru Nagashima) -* Update: Ignore end of function in newline-after-var (fixes #3682) (alberto) -* Build: Performance perf to not ignore jshint file (refs #3765) (Gyandeep Singh) -* Fix: id-match bug incorrectly errors on `NewExpression` (fixes #4042) (Burak Yigit Kaya) -* Fix: `no-trailing-spaces` autofix to handle linebreaks (fixes #4050) (Gyandeep Singh) -* Fix: renamed no-magic-number to no-magic-numbers (fixes #4053) (Vincent Lemeunier) -* New: add "consistent" option to the "curly" rule (fixes #2390) (Benoît Zugmeyer) -* Update: Option to ignore for loops in init-declarations (fixes #3641) (alberto) -* Update: Add webextensions environment (fixes #4051) (Blake Winton) -* Fix: no-cond-assign should report assignment location (fixes #4040) (alberto) -* New: no-empty-pattern rule (fixes #3668) (alberto) -* Upgrade: Upgrade globals to 8.11.0 (fixes #3599) (Burak Yigit Kaya) -* Docs: Re-tag JSX code fences (fixes #4020) (Brandon Mills) -* New: no-magic-number rule (fixes #4027) (Vincent Lemeunier) -* Docs: Remove list of users from README (fixes #3881) (Brandon Mills) -* Fix: `no-redeclare` and `no-sahadow` for builtin globals (fixes #3971) (Toru Nagashima) -* Build: Add `.eslintignore` file for the project (fixes #3765) (Gyandeep Singh) - -v1.6.0 - October 2, 2015 - -* Fix: cache is basically not working (fixes #4008) (Richard Hansen) -* Fix: a test failure on Windows (fixes #3968) (Toru Nagashima) -* Fix: `no-invalid-this` had been missing globals in node (fixes #3961) (Toru Nagashima) -* Fix: `curly` with `multi` had false positive (fixes #3856) (Toru Nagashima) -* Build: Add load performance check inside perf function (fixes #3994) (Gyandeep Singh) -* Fix: space-before-keywords fails with super keyword (fixes #3946) (alberto) -* Fix: CLI should not fail on account of ignored files (fixes #3978) (Dominic Barnes) -* Fix: brace-style rule incorrectly flagging switch (fixes #4002) (Aparajita Fishman) -* Update: Implement auto fix for space-unary-ops rule (fixes #3976) (alberto) -* Update: Implement auto fix for computed-property-spacing (fixes #3975) (alberto) -* Update: Implement auto fix for no-multi-spaces rule (fixes #3979) (alberto) -* Fix: Report shorthand method names in complexity rule (fixes #3955) (Tijn Kersjes) -* Docs: Add note about typeof check for isNaN (fixes #3985) (Daniel Lo Nigro) -* Update: ESLint reports parsing errors with clear prefix. (fixes #3555) (Kevin Partington) -* Build: Update markdownlint dependency (fixes #3954) (David Anson) -* Update: `no-mixed-require` to have non boolean option (fixes #3922) (Gyandeep Singh) -* Fix: trailing spaces auto fix to check for line breaks (fixes #3940) (Gyandeep Singh) -* Update: Add `typeof` option to `no-undef` rule (fixes #3684) (Gyandeep Singh) -* Docs: Fix explanation and typos for accessor-pairs (alberto) -* Docs: Fix typos for camelcase (alberto) -* Docs: Fix typos for max-statements (Danny Guo) -* Update: Implement auto fix for object-curly-spacing (fixes #3857) (alberto) -* Update: Implement auto fix for array-bracket-spacing rule (fixes #3858) (alberto) -* Fix: Add schema to `global-require` rule (fixes #3923) (Gyandeep Singh) -* Update: Apply lazy loading for rules (fixes #3930) (Gyandeep Singh) -* Docs: Fix typo for arrow-spacing (Danny Guo) -* Docs: Fix typos for wrap-regex (Danny Guo) -* Docs: Fix explanation for space-before-keywords (Danny Guo) -* Docs: Fix typos for operator-linebreak (Danny Guo) -* Docs: Fix typos for callback-return (Danny Guo) -* Fix: no-trailing-spaces autofix to account for blank lines (fixes #3912) (Gyandeep Singh) -* Docs: Fix example in no-negated-condition.md (fixes #3908) (alberto) -* Update:warn message use @return when prefer.returns=return (fixes #3889) (闲耘™) -* Update: Implement auto fix for generator-star-spacing rule (fixes #3873) (alberto) -* Update: Implement auto fix for arrow-spacing rule (fixes #3860) (alberto) -* Update: Implement auto fix for block-spacing rule (fixes #3859) (alberto) -* Fix: Support allman style for switch statement (fixes #3903) (Gyandeep Singh) -* New: no-negated-condition rule (fixes #3740) (alberto) -* Docs: Fix typo in blog post template (Nicholas C. Zakas) -* Update: Add env 'nashorn' to support Java 8 Nashorn Engine (fixes #3874) (Benjamin Winterberg) -* Docs: Prepare for rule doc linting (refs #2271) (Ian VanSchooten) - -v1.5.1 - September 22, 2015 - -* Fix: valid-jsdoc fix for param with properties (fixes #3476) (Gyandeep Singh) -* Fix: valid-jsdoc error with square braces (fixes #2270) (Gyandeep Singh) -* Upgrade: `doctrine` to 0.7.0 (fixes #3891) (Gyandeep Singh) -* Fix: `space-before-keywords` had been wrong on getters (fixes #3854) (Toru Nagashima) -* Fix: `no-dupe-args` had been wrong for nested destructure (fixes #3867) (Toru Nagashima) -* Docs: io.js is the new Node.js (thefourtheye) -* Docs: Fix method signature on working-with-rules docs (fixes #3862) (alberto) -* Docs: Add related ternary links (refs #3835) (Ian VanSchooten) -* Fix: don’t ignore config if cwd is the home dir (fixes #3846) (Mathias Schreck) -* Fix: `func-style` had been warning arrows with `this` (fixes #3819) (Toru Nagashima) -* Fix: `space-before-keywords`; allow opening curly braces (fixes #3789) (Marko Raatikka) -* Build: Fix broken .gitattributes generation (fixes #3566) (Nicholas C. Zakas) -* Build: Fix formatter docs generation (fixes #3847) (Nicholas C. Zakas) - -v1.5.0 - September 18, 2015 - -* Fix: invalidate cache when config changes. (fixes #3770) (royriojas) -* Fix: function body indent issues (fixes #3614, fixes #3799) (Gyandeep Singh) -* Update: Add configuration option to `space-before-blocks` (fixes #3758) (Phil Vargas) -* Fix: space checking between tokens (fixes #2211) (Nicholas C. Zakas) -* Fix: env-specified ecmaFeatures had been wrong (fixes #3735) (Toru Nagashima) -* Docs: Change example wording from warnings to problems (fixes #3676) (Ian VanSchooten) -* Build: Generate formatter example docs (fixes #3560) (Ian VanSchooten) -* New: Add --debug flag to CLI (fixes #2692) (Nicholas C. Zakas) -* Docs: Update no-undef-init docs (fixes #3170) (Nicholas C. Zakas) -* Docs: Update no-unused-expressions docs (fixes #3685) (Nicholas C. Zakas) -* Docs: Clarify node types in no-multi-spaces (fixes #3781) (Nicholas C. Zakas) -* Docs: Update new-cap docs (fixes #3798) (Nicholas C. Zakas) -* Fix: `space-before-blocks` had conflicted `arrow-spacing` (fixes #3769) (Toru Nagashima) -* Fix: `comma-dangle` had not been checking imports/exports (fixes #3794) (Toru Nagashima) -* Fix: tests fail due to differences in temporary paths. (fixes #3778) (royriojas) -* Fix: Directory ignoring should work (fixes #3812) (Nicholas C. Zakas) -* Fix: Ensure **/node_modules works in ignore files (fixes #3788) (Nicholas C. Zakas) -* Update: Implement auto fix for `space-infix-ops` rule (fixes #3801) (Gyandeep Singh) -* Fix: `no-warning-comments` can't be set via config comment (fixes #3619) (Burak Yigit Kaya) -* Update: `key-spacing` should allow 1+ around colon (fixes #3363) (Burak Yigit Kaya) -* Fix: false alarm of semi-spacing with semi set to never (fixes #1983) (Chen Yicai) -* Fix: Ensure ./ works correctly with CLI (fixes #3792) (Nicholas C. Zakas) -* Docs: add more examples + tests for block-scoped-var (fixes #3791) (JT) -* Update: Implement auto fix for `indent` rule (fixes #3734) (Gyandeep Singh) -* Fix: `space-before-keywords` fails to handle some cases (fixes #3756) (Marko Raatikka) -* Docs: Add if-else example (fixes #3722) (Ian VanSchooten) -* Fix: jsx-quotes exception for attributes without value (fixes #3793) (Mathias Schreck) -* Docs: Fix closing code fence on cli docs (Ian VanSchooten) -* Update: Implement auto fix for `space-before-blocks` rule (fixes #3776) (Gyandeep Singh) -* Update: Implement auto fix for `space-after-keywords` rule (fixes #3773) (Gyandeep Singh) -* Fix: `semi-spacing` had conflicted with `block-spacing` (fixes #3721) (Toru Nagashima) -* Update: Implement auto fix for `space-before-keywords` rule (fixes #3771) (Gyandeep Singh) -* Update: auto fix for space-before-function-paren rule (fixes #3766) (alberto) -* Update: Implement auto fix for `no-extra-semi` rule (fixes #3745) (Gyandeep Singh) -* Update: Refactors the traversing logic (refs #3530) (Toru Nagashima) -* Update: Implement auto fix for `space-return-throw-case` (fixes #3732) (Gyandeep Singh) -* Update: Implement auto fix for `no-spaced-func` rule (fixes #3728) (Gyandeep Singh) -* Update: Implement auto fix for `eol-last` rule (fixes #3725) (Gyandeep Singh) -* Update: Implement auto fix for `no-trailing-spaces` rule (fixes #3723) (Gyandeep Singh) - -v1.4.3 - September 15, 2015 - -* Fix: Directory ignoring should work (fixes #3812) (Nicholas C. Zakas) -* Fix: jsx-quotes exception for attributes without value (fixes #3793) (Mathias Schreck) - -v1.4.2 - September 15, 2015 - -* Fix: Ensure **/node_modules works in ignore files (fixes #3788) (Nicholas C. Zakas) -* Fix: Ensure ./ works correctly with CLI (fixes #3792) (Nicholas C. Zakas) - -v1.4.1 - September 11, 2015 - -* Fix: CLIEngine default cache parameter name (fixes #3755) (Daniel G. Taylor) -* Fix: Glob pattern from .eslintignore not applied (fixes #3750) (Burak Yigit Kaya) -* Fix: Skip JSDoc from NewExpression (fixes #3744) (Nicholas C. Zakas) -* Docs: Shorten and simplify autocomment for new issues (Nicholas C. Zakas) - -v1.4.0 - September 11, 2015 - -* Docs: Add new formatters to API docs (Ian VanSchooten) -* New: Implement autofixing (fixes #3134) (Nicholas C. Zakas) -* Fix: Remove temporary `"allow-null"` (fixes #3705) (Toru Nagashima) -* Fix: `no-unused-vars` had been crashed at `/*global $foo*/` (fixes #3714) (Toru Nagashima) -* Build: check-commit now checks commit message length. (fixes #3706) (Kevin Partington) -* Fix: make getScope acquire innermost scope (fixes #3700) (voideanvalue) -* Docs: Fix spelling mistake (domharrington) -* Fix: Allow whitespace in rule message parameters. (fixes #3690) (Kevin Partington) -* Fix: Eqeqeq rule with no option does not warn on 'a == null' (fixes #3699) (fediev) -* Fix: `no-unused-expressions` with `allowShortCircuit` false positive if left has no effect (fixes #3675) (Toru Nagashima) -* Update: Add Node 4 to travis builds (fixes #3697) (Ian VanSchooten) -* Fix: Not check for punctuator if on same line as last var (fixes #3694) (Gyandeep Singh) -* Docs: Make `quotes` docs clearer (fixes #3646) (Nicholas C. Zakas) -* Build: Increase mocha timeout (fixes #3692) (Nicholas C. Zakas) -* Fix: `no-extra-bind` to flag all arrow funcs (fixes #3672) (Nicholas C. Zakas) -* Docs: Update README with release and sponsor info (Nicholas C. Zakas) -* Fix: `object-curly-spacing` had been crashing on an empty object pattern (fixes #3658) (Toru Nagashima) -* Fix: `no-extra-parens` false positive at IIFE with member accessing (fixes #3653) (Toru Nagashima) -* Fix: `comma-dangle` with `"always"`/`"always-multiline"` false positive after a rest element (fixes #3627) (Toru Nagashima) -* New: `jsx-quotes` rule (fixes #2011) (Mathias Schreck) -* Docs: Add linting for second half of rule docs (refs #2271) (Ian VanSchooten) -* Fix: `no-unused-vars` had not shown correct locations for `/*global` (fixes #3617) (Toru Nagashima) -* Fix: `space-after-keywords` not working for `catch` (fixes #3654) (Burak Yigit Kaya) -* Fix: Incorrectly warning about ignored files (fixes #3649) (Burak Yigit Kaya) -* Fix: Indent rule VariableDeclarator doesn't apply to arrow functions (fixes #3661) (Burak Yigit Kaya) -* Upgrade: Consuming handlebars@^4.0.0 (fixes #3632) (Kevin Partington) -* Docs: Fixing typos in plugin processor section. (fixes #3648) (Kevin Partington) -* Fix: Invalid env keys would cause an unhandled exception.(fixes #3265) (Ray Booysen) -* Docs: Fixing broken link in documentation (Ilya Volodin) -* Update: Check for default assignment in no-unneeded-ternary (fixes #3232) (cjihrig) -* Fix: `consistent-as-needed` mode with `keyword: true` (fixes #3636) (Alex Guerrero) -* New: Implement cache in order to only operate on changed files since previous run. (fixes #2998) (Roy Riojas) -* Update: Grouping related CLI options. (fixes #3612) (Kevin Partington) -* Update: Using @override does not require @param or @returns (fixes #3629) (Whitney Young) -* Docs: Use eslint-env in no-undef (fixes #3616) (Ian VanSchooten) -* New: `require-jsdoc` rule (fixes #1842) (Gyandeep Singh) -* New: Support glob path on command line (fixes #3402) (Burak Yigit Kaya) -* Update: Short circuit and ternary support in no-unused-expressions (fixes #2733) (David Warkentin) -* Docs: Replace to npmjs.com (Ryuichi Okumura) -* Fix: `indent` should only indent chain calls if the first call is single line (fixes #3591) (Burak Yigit Kaya) -* Fix: `quote-props` should not crash for object rest spread syntax (fixes #3595) (Joakim Carlstein) -* Update: Use `globals` module for the `commonjs` globals (fixes #3606) (Sindre Sorhus) -* New: `no-restricted-syntax` rule to forbid certain syntax (fixes #2422) (Burak Yigit Kaya) -* Fix: `no-useless-concat` false positive at numbers (fixes #3575, fixes #3589) (Toru Nagashima) -* New: Add --max-warnings flag to CLI (fixes #2769) (Kevin Partington) -* New: Add `parser` as an option (fixes #3127) (Gyandeep Singh) -* New: `space-before-keywords` rule (fixes #1631) (Marko Raatikka) -* Update: Allowing inline comments to disable eslint rules (fixes #3472) (Whitney Young) -* Docs: Including for(;;) as valid case in no-constant-condition (Kevin Partington) -* Update: Add quotes around the label in `no-redeclare` error messages (fixes #3583) (Ian VanSchooten) -* Docs: correct contributing URL (Dieter Luypaert) -* Fix: line number for duplicate object keys error (fixes #3573) (Elliot Lynde) -* New: global-require rule (fixes #2318) (Jamund Ferguson) - -v1.3.1 - August 29, 2015 - -* Fix: `indent` to not crash on empty files (fixes #3570) (Gyandeep Singh) -* Fix: Remove unused config file (fixes #2227) (Gyandeep Singh) - -v1.3.0 - August 28, 2015 - -* Build: Autogenerate release blog post (fixes #3562) (Nicholas C. Zakas) -* New: `no-useless-concat` rule (fixes #3506) (Henry Zhu) -* Update: Add `keywords` flag to `consistent-as-needed` mode in `quote-props` (fixes #3532) (Burak Yigit Kaya) -* Update: adds `numbers` option to quote-props (fixes #2914) (Jose Roberto Vidal) -* Fix: `quote-props` rule should ignore computed and shorthand properties (fixes #3557) (fixes #3544) (Burak Yigit Kaya) -* Docs: Add config comments for rule examples 'accessor-pairs' to 'no-extra-semi' (refs #2271) (Ian VanSchooten) -* Update: Return to accept `undefined` type (fixes #3382) (Gyandeep Singh) -* New: Added HTML formatter (fixes #3505) (Julian Laval) -* Fix: check space after yield keyword in space-unary-ops (fixes #2707) (Mathias Schreck) -* Docs: (curly) Fix broken code in example (Kent C. Dodds) -* Update: Quote var name in `no-unused-vars` error messages (refs #3526) (Burak Yigit Kaya) -* Update: Move methods to SourceCode (fixes #3516) (Nicholas C. Zakas) -* Fix: Don't try too hard to find fault in `no-implicit-coercion` (refs #3402) (Burak Yigit Kaya) -* Fix: Detect ternary operator in operator-linebreak rule (fixes #3274) (Burak Yigit Kaya) -* Docs: Clearer plugin rule configuration (fixes #2022) (Nicholas C. Zakas) -* Update: Add quotes around the label in `no-empty-label` error reports (fixes #3526) (Burak Yigit Kaya) -* Docs: Turn off Liquid in example (Nicholas C. Zakas) -* Docs: Mention CommonJS along with Node.js (fixes #3388) (Nicholas C. Zakas) -* Docs: Make it clear which rules are recommended (fixes #3398) (Nicholas C. Zakas) -* Docs: Add links to JSON Schema resources (fixes #3411) (Nicholas C. Zakas) -* Docs: Add more info to migration guide (fixes #3439) (Nicholas C. Zakas) -* Fix: ASI indentation issue (fixes #3514) (Burak Yigit Kaya) -* Fix: Make `no-implicit-coercion` smarter about numerical expressions (fixes #3510) (Burak Yigit Kaya) -* Fix: `prefer-template` had not been handling TemplateLiteral as literal node (fixes #3507) (Toru Nagashima) -* Update: `newline-after-var` Allow comment + blank after var (fixes #2852) (Ian VanSchooten) -* Update: Add `unnecessary` option to `quote-props` (fixes #3381) (Burak Yigit Kaya) -* Fix: `indent` shouldn't check the last line unless it is a punctuator (fixes #3498) (Burak Yigit Kaya) -* Fix: `indent` rule does not indent when doing multi-line chain calls (fixes #3279) (Burak Yigit Kaya) -* Fix: sort-vars rule fails when memo is undefined (fixes #3474) (Burak Yigit Kaya) -* Fix: `brace-style` doesn't report some closing brace errors (fixes #3486) (Burak Yigit Kaya) -* Update: separate options for block and line comments in `spaced-comment` rule (fixes #2897) (Burak Yigit Kaya) -* Fix: `indent` does not check FunctionDeclaration nodes properly (fixes #3173) (Burak Yigit Kaya) -* Update: Added "properties" option to `id-length` rule to ignore property names. (fixes #3450) (Mathieu M-Gosselin) -* Update: add new ignore pattern options to no-unused-vars (fixes #2321) (Mathias Schreck) -* New: Protractor environment (fixes #3457) (James Whitney) -* Docs: Added section to shareable config (Gregory Waxman) -* Update: Allow pre-parsed code (fixes #1025, fixes #948) (Nicholas C. Zakas) - -v1.2.1 - August 20, 2015 - -* Fix: "key-spacing" crashes eslint on object literal shorthand properties (fixes #3463) (Burak Yigit Kaya) -* Fix: ignore leading space check for `null` elements in comma-spacing (fixes #3392) (Mathias Schreck) -* Fix: `prefer-arrow-callback` false positive at recursive functions (fixes #3454) (Toru Nagashima) -* Fix: one-var rule doesn’t have default options (fixes #3449) (Burak Yigit Kaya) -* Fix: Refactor `no-duplicate-case` to be simpler and more efficient (fixes #3440) (Burak Yigit Kaya) -* Docs: Fix trailing spaces in README (Nicholas C. Zakas) -* Docs: Update gyandeeps and add byk (Nicholas C. Zakas) -* Docs: Update plugins documentation for 1.0.0 (Nicholas C. Zakas) -* Docs: `object-curly-spacing` doc is inaccurate about exceptions (Burak Yigit Kaya) -* Fix: `object-curly-spacing` shows the incorrect column for opening brace (fixes #3438) (Burak Yigit Kaya) - -v1.2.0 - August 18, 2015 - -* Update: add support for semicolon in comma-first setup in indent rule (fixes #3423) (Burak Yigit Kaya) -* Docs: better JSDoc for indent rule (Burak Yigit Kaya) -* Docs: Document the second argument of `CLIEngine.executeOnText()` (Sindre Sorhus) -* New: `no-dupe-class-members` rule (fixes #3294) (Toru Nagashima) -* Fix: exclude `AssignmentExpression` and `Property` nodes from extra indentation on first line (fixes #3391) (Burak Yigit Kaya) -* Update: Separate indent options for var, let and const (fixes #3339) (Burak Yigit Kaya) -* Fix: Add AssignmentPattern to space-infix-ops (fixes #3380) (Burak Yigit Kaya) -* Docs: Fix typo: exception label (tienslebien) -* Update: Clean up tests for CLI config support (refs #2543) (Gyandeep Singh) -* New: `block-spacing` rule (fixes #3303) (Toru Nagashima) -* Docs: Update docs for no-iterator (fixes #3405) (Nicholas C. Zakas) -* Upgrade: bump `espree` dependency to `2.2.4` (fixes #3403) (Burak Yigit Kaya) -* Fix: false positive on switch 'no duplicate case', (fixes #3408) (Cristian Carlesso) -* Fix: `valid-jsdoc` test does not recognize aliases for `@param` (fixes #3399) (Burak Yigit Kaya) -* New: enable `-c` flag to accept a shareable config (fixes #2543) (Shinnosuke Watanabe) -* Fix: Apply plugin given in CLI (fixes #3383) (Ian VanSchooten) -* New: Add commonjs environment (fixes #3377) (Nicholas C. Zakas) -* Docs: Update no-unused-var docs (Nicholas C. Zakas) -* Fix: trailing commas in object-curly-spacing for import/export (fixes #3324) (Henry Zhu) -* Update: Make `baseConfig` to behave as other config options (fixes #3371) (Gyandeep Singh) -* Docs: Add "Compatibility" section to linebreak-style (Vitor Balocco) -* New: `prefer-arrow-callback` rule (fixes #3140) (Toru Nagashima) -* Docs: Clarify what an unused var is (fixes #2342) (Nicholas C. Zakas) -* Docs: Mention double-byte character limitation in max-len (fixes #2370) (Nicholas C. Zakas) -* Fix: object curly spacing incorrectly warning for import with default and multiple named specifiers (fixes #3370) (Luke Karrys) -* Fix: Indent rule errors with array of objects (fixes #3329) (Burak Yigit Kaya) -* Update: Make it clear that `space-infix-ops` support `const` (fixes #3299) (Burak Yigit Kaya) -* New: `prefer-template` rule (fixes #3014) (Toru Nagashima) -* Docs: Clarify `no-process-env` docs (fixes #3318) (Nicholas C. Zakas) -* Docs: Fix arrow name typo (fixes #3309) (Nicholas C. Zakas) -* Update: Improve error message for `indent` rule violation (fixes #3340) (Burak Yigit Kaya) -* Fix: radix rule does not apply for Number.parseInt (ES6) (fixes #3364) (Burak Yigit Kaya) -* Fix: `key-spacing.align` doesn't pay attention to non-whitespace before key (fixes #3267) (Burak Yigit Kaya) -* Fix: arrow-parens & destructuring/default params (fixes #3353) (Jamund Ferguson) -* Update: Add support for Allman to brace-style rule, brackets on newline (fixes #3347) (Burak Yigit Kaya) -* Fix: Regression no-catch-shadow (1.1.0) (fixes #3322) (Burak Yigit Kaya) -* Docs: remove note outdated in 1.0.0 (Denis Sokolov) -* Build: automatically convert line endings in release script (fixes #2642) (Burak Yigit Kaya) -* Update: allow disabling new-cap on object methods (fixes #3172) (Burak Yigit Kaya) -* Update: Improve checkstyle format (fixes #3183) (Burak Yigit Kaya) -* Fix: Indent rule errors if an array literal starts a new statement (fixes #3328) (Burak Yigit Kaya) -* Update: Improve validation error messages (fixes #3193) (Burak Yigit Kaya) -* Docs: fix syntax error in space-before-function-paren (Fabrício Matté) -* Fix: `indent` rule to check for last line correctly (fixes #3327) (Gyandeep Singh) -* Fix: Inconsistent off-by-one errors with column numbers (fixes #3231) (Burak Yigit Kaya) -* Fix: Keyword "else" must not be followed by a newline (fixes #3226) (Burak Yigit Kaya) -* Fix: `id-length` does not work for most of the new ES6 patterns (fixes #3286) (Burak Yigit Kaya) -* Fix: Spaced Comment Exceptions Not Working (fixes #3276) (Jamund Ferguson) - -v1.1.0 - August 7, 2015 - -* Update: Added as-needed option to arrow-parens (fixes #3277) (Jamund Ferguson) -* Fix: curly-spacing missing import case (fixes #3302) (Jamund Ferguson) -* Fix: `eslint-env` in comments had not been setting `ecmaFeatures` (fixes #2134) (Toru Nagashima) -* Fix: `es6` env had been missing `spread` and `newTarget` (fixes #3281) (Toru Nagashima) -* Fix: Report no-spaced-func on last token before paren (fixes #3289) (Benjamin Woodruff) -* Fix: Check for null elements in indent rule (fixes #3272) (Gyandeep Singh) -* Docs: Use backticks for option heading (Gyandeep Singh) -* Fix: `no-invalid-this` had been missing jsdoc comment (fixes #3287) (Toru Nagashima) -* Fix: `indent` rule for multi-line objects and arrays (fixes #3236) (Gyandeep Singh) -* Update: add new `multi-or-nest` option for the `curly` rule (fixes #1806) (Ivan Nikulin) -* Fix: `no-cond-assign` had been missing simplest pattern (fixes #3249) (Toru Nagashima) -* Fix: id-length rule doesn't catch violations in arrow function parameters (fixes #3275) (Burak Yigit Kaya) -* New: Added grep-style formatter (fixes #2991) (Nobody Really) -* Update: Split out generic AST methods into utility (fixes #962) (Gyandeep Singh) -* Fix: `accessor-pairs` false positive (fixes #3262) (Toru Nagashima) -* Fix: `context.getScope()` returns correct scope in blockBindings (fixes #3254) (Toru Nagashima) -* Update: Expose `getErrorResults` as a static method on `CLIEngine` (fixes #3242) (Gyandeep Singh) -* Update: Expose `getFormatter` as a static method on `CLIEngine` (fixes #3239) (Gyandeep Singh) -* Docs: use correct encoding for id-match.md (fixes #3246) (Matthieu Larcher) -* Docs: place id-match rule at correct place in README.md (fixes #3245) (Matthieu Larcher) -* Docs: Update no-proto.md (Joe Zimmerman) -* Docs: Fix typo in object-shorthand docs (Gunnar Lium) -* Upgrade: inquirer dependency (fixes #3241) (Gyandeep Singh) -* Fix: `indent` rule for objects and nested one line blocks (fixes #3238, fixes #3237) (Gyandeep Singh) -* Docs: Fix wrong options in examples of key-spacing (keik) -* Docs: Adds missing "not" to semi.md (Marius Schulz) -* Docs: Update no-multi-spaces.md (Kenneth Powers) -* Fix: `indent` to not error on same line nodes (fixes #3228) (Gyandeep Singh) -* New: Jest environment (fixes #3212) (Darshak Parikh) - -v1.0.0 - July 31, 2015 - -* Update: merge `no-reserved-keys` into `quote-props` (fixes #1539) (Jose Roberto Vidal) -* Fix: `indent` error message (fixes #3220) (Gyandeep Singh) -* Update: Add embertest env (fixes #3205) (ismay) -* Docs: Correct documentation errors for `id-length` rule. (Jess Telford) -* Breaking: `indent` rule to have node specific options (fixes #3210) (Gyandeep Singh) -* Fix: space-after-keyword shouldn't allow newlines (fixes #3198) (Brandon Mills) -* New: Add JSON formatter (fixes #3036) (Burak Yigit Kaya) -* Breaking: Switch to RuleTester (fixes #3186) (Nicholas C. Zakas) -* Breaking: remove duplicate warnings of `no-undef` from `block-scoped-var` (fixes #3201) (Toru Nagashima) -* Fix: `init-declarations` ignores in for-in/of (fixes #3202) (Toru Nagashima) -* Fix: `quotes` with `"backtick"` ignores ModuleSpecifier and LiteralPropertyName (fixes #3181) (Toru Nagashima) -* Fix: space-in-parens in Template Strings (fixes #3182) (Ian VanSchooten) -* Fix: Check for concatenation in no-throw-literal (fixes #3099, fixes #3101) (Ian VanSchooten) -* Build: Remove `eslint-tester` from devDependencies (fixes #3189) (Gyandeep Singh) -* Fix: Use new ESLintTester (fixes #3187) (Nicholas C. Zakas) -* Update: `new-cap` supports fullnames (fixes #2584) (Toru Nagashima) -* Fix: Non object rule options merge (fixes #3179) (Gyandeep Singh) -* New: add id-match rule (fixes #2829) (Matthieu Larcher) -* Fix: Rule options merge (fixes #3175) (Gyandeep Singh) -* Fix: `spaced-comment` allows a mix of markers and exceptions (fixes #2895) (Toru Nagashima) -* Fix: `block-scoped-var` issues (fixes #2253, fixes #2747, fixes #2967) (Toru Nagashima) -* New: Add id-length rule (fixes #2784) (Burak Yigit Kaya) -* Update: New parameters for quote-props rule (fixes #1283, fixes #1658) (Tomasz Olędzki) - -v1.0.0-rc-3 - July 24, 2015 - -* Fix: Make Chai and Mocha as a dependency (fixes #3156) (Gyandeep Singh) -* Fix: traverse `ExperimentalSpread/RestProperty.argument` (fixes #3157) (Toru Nagashima) -* Fix: Check shareable config package prefix correctly (fixes #3146) (Gyandeep Singh) -* Update: move redeclaration checking for builtins (fixes #3070) (Toru Nagashima) -* Fix: `quotes` with `"backtick"` allows directive prologues (fixes #3132) (Toru Nagashima) -* Fix: `ESLintTester` path in exposed API (fixes #3149) (Gyandeep Singh) -* Docs: Remove AppVeyor badge (Gyandeep Singh) -* Fix: Check no-new-func on CallExpressions (fixes #3145) (Benjamin Woodruff) - -v1.0.0-rc-2 - July 23, 2015 - -* Docs: Mention eslint-tester in migration guide (Nicholas C. Zakas) -* Docs: Mention variables defined in a global comment (fixes #3137) (William Becker) -* Docs: add documentation about custom-formatters. (fixes #1260) (royriojas) -* Fix: Multi-line variable declarations indent (fixes #3139) (Gyandeep Singh) -* Fix: handles blocks in no-use-before-define (fixes #2960) (Jose Roberto Vidal) -* Update: `props` option of `no-param-reassign` (fixes #1600) (Toru Nagashima) -* New: Support shared configs named `@scope/eslint-config`, with shortcuts of `@scope` and `@scope/` (fixes #3123) (Jordan Harband) -* New: Add ignorePattern, ignoreComments, and ignoreUrls options to max-len (fixes #2934, fixes #2221, fixes #1661) (Benjamin Woodruff) -* Build: Increase Windows Mocha timeout (fixes #3133) (Ian VanSchooten) -* Docs: incorrect syntax in the example for rule «one-var» (Alexander Burtsev) -* Build: Check commit message format at end of tests (fixes #3058) (Ian VanSchooten) -* Update: Move eslint-tester into repo (fixes #3110) (Nicholas C. Zakas) -* Fix: Not load configs outside config with `root: true` (fixes #3109) (Gyandeep Singh) -* Docs: Add config information to README (fixes #3074) (Nicholas C. Zakas) -* Docs: Add mysticatea as committer (Nicholas C. Zakas) -* Docs: Grammar fixes in rule descriptions (refs #3038) (Greg Cochard) -* Fix: Update sort-vars to ignore Array and ObjectPattern (fixes #2954) (Harry Ho) -* Fix: block-scoped-var rule incorrectly flagging break/continue with label (fixes #3082) (Aparajita Fishman) -* Fix: spaces trigger wrong in `no-useless-call` and `prefer-spread` (fixes #3054) (Toru Nagashima) -* Fix: `arrow-spacing` allow multi-spaces and line-endings (fixes #3079) (Toru Nagashima) -* Fix: add missing loop scopes to one-var (fixes #3073) (Jose Roberto Vidal) -* New: the `no-invalid-this` rule (fixes #2815) (Toru Nagashima) -* Fix: allow empty loop body in no-extra-semi (fixes #3075) (Mathias Schreck) -* Update: Add qunit to environments (fixes #2870) (Nicholas C. Zakas) -* Fix: `space-before-blocks` to consider classes (fixes #3062) (Gyandeep Singh) -* Fix: Include phantomjs globals (fixes #3064) (Linus Unnebäck) -* Fix: no-else-return handles multiple else-if blocks (fixes #3015) (Jose Roberto Vidal) -* Fix: `no-*-assgin` rules support destructuring (fixes #3029) (Toru Nagashima) -* New: the `no-implicit-coercion` rule (fixes #1621) (Toru Nagashima) -* Fix: Make no-implied-eval match more types of strings (fixes #2898) (Benjamin Woodruff) -* Docs: Clarify that bot message is automatic (Ian VanSchooten) -* Fix: Skip rest properties in no-dupe-keys (fixes 3042) (Nicholas C. Zakas) -* Docs: New issue template (fixes #3048) (Nicholas C. Zakas) -* Fix: strict rule supports classes (fixes #2977) (Toru Nagashima) -* New: the `prefer-reflect` rule (fixes #2939) (Keith Cirkel) -* Docs: make grammar consistent in rules index (Greg Cochard) -* Docs: Fix unmatched paren in rule description (Greg Cochard) -* Docs: Small typo fix in no-useless-call documentation (Paul O’Shannessy) -* Build: readd phantomjs dependency with locked down version (fixes #3026) (Mathias Schreck) -* Docs: Add IanVS as committer (Nicholas C. Zakas) -* docs: additional computed-property-spacing documentation (fixes #2941) (Jamund Ferguson) -* Docs: Add let and const examples for newline-after-var (fixes #3020) (James Whitney) -* Build: Remove unnecessary phantomjs devDependency (fixes #3021) (Gyandeep Singh) -* Update: added shared builtins list (fixes #2972) (Jose Roberto Vidal) - -v1.0.0-rc-1 - July 15, 2015 - -* Upgrade: Espree to 2.2.0 (fixes #3011) (Nicholas C. Zakas) -* Docs: fix a typo (bartmichu) -* Fix: indent rule should recognize single line statements with ASI (fixes #3001, fixes #3000) (Mathias Schreck) -* Update: Handle CRLF line endings in spaced-comment rule - 2 (fixes #3005) (Burak Yigit Kaya) -* Fix: Indent rule error on empty block body (fixes #2999) (Gyandeep Singh) -* New: the `no-class-assign` rule (fixes #2718) (Toru Nagashima) -* New: the `no-const-assign` rule (fixes #2719) (Toru Nagashima) -* Docs: Add 1.0.0 migration guide (fixes #2994) (Nicholas C. Zakas) -* Docs: Update changelog for 0.24.1 (fixes #2976) (Nicholas C. Zakas) -* Breaking: Remove deprecated rules (fixes #1898) (Ian VanSchooten) -* Fix: multi-line + fat arrow indent (fixes #2239) (Gyandeep Singh) -* Breaking: Create eslint:recommended and add to --init (fixes #2713) (Greg Cochard) -* Fix: Indent rule (fixes #1797, fixes #1799, fixes #2248, fixes #2343, fixes #2278, fixes #1800) (Gyandeep Singh) -* New: `context.getDeclaredVariables(node)` (fixes #2801) (Toru Nagashima) -* New: the `no-useless-call` rule (fixes #1925) (Toru Nagashima) -* New: the `prefer-spread` rule (fixes #2946) (Toru Nagashima) -* Fix: `valid-jsdoc` counts `return` for arrow expressions (fixes #2952) (Toru Nagashima) -* New: Add exported comment option (fixes #1200) (Jamund Ferguson) -* Breaking: Default to --reset behavior (fixes #2100) (Brandon Mills) -* New: Add arrow-parens and arrow-spacing rule (fixes #2628) (Jxck) -* Fix: Shallow cloning issues in eslint config (fixes #2961) (Gyandeep Singh) -* Add: Warn on missing rule definition or deprecation (fixes #1549) (Ian VanSchooten) -* Update: adding some tests for no-redeclare to test named functions (fixes #2953) (Dominic Barnes) -* New: Add support for root: true in config files (fixes #2736) (Ian VanSchooten) -* Fix: workaround for leading and trailing comments in padded-block (fixes #2336 and fixes #2788) (Mathias Schreck) -* Fix: object-shorthand computed props (fixes #2937) (Jamund Ferguson) -* Fix: Remove invalid check inside `getJSDocComment` function (fixes #2938) (Gyandeep Singh) -* Docs: Clarify when not to use space-before-blocks (Ian VanSchooten) -* Update: `no-loop-func` allows block-scoped variables (fixes #2517) (Toru Nagashima) -* Docs: remove mistaken "off by default" (Jan Schär) -* Build: Add appveyor CI system (fixes #2923) (Gyandeep Singh) -* Docs: Fix typo in the shareable configs doc (Siddharth Kannan) -* Fix: max-len to report correct column number (fixes #2926) (Mathias Schreck) -* Fix: add destructuring support to comma-dangle rule (fixes #2911) (Mathias Schreck) -* Docs: clarification in no-unused-vars (Jan Schär) -* Fix: `no-redeclare` checks module scopes (fixes #2903) (Toru Nagashima) -* Docs: missing quotes in JSON (Jan Schär) -* Breaking: Switch to 1-based columns (fixes #2284) (Nicholas C. Zakas) -* Docs: array-bracket-spacing examples used space-in-brackets (Brandon Mills) -* Docs: Add spaced-line-comment deprecation notice (Brandon Mills) -* Docs: Add space-in-brackets deprecation notice (Brandon Mills) -* Fix: Include execScript in no-implied-eval rule (fixes #2873) (Frederik Braun) -* Fix: Support class syntax for line-around-comment rule (fixes #2894) (Gyandeep Singh) -* Fix: lines-around-comment was crashing in some cases due to a missing check (fixes #2892) (Mathieu M-Gosselin) -* New: Add init-declarations rule (fixes #2606) (cjihrig) -* Docs: Fix typo in array-bracket-spacing rule (zallek) -* Fix: Added missing export syntax support to the block-scoped-var rule. (fixes #2887) (Mathieu M-Gosselin) -* Build: gensite target supports rule removal (refs #1898) (Brandon Mills) -* Update: Handle CRLF line endings in spaced-comment rule (fixes #2884) (David Anson) -* Update: Attach parent in getNodeByRangeIndex (fixes #2863) (Brandon Mills) -* Docs: Fix typo (Bryan Smith) -* New: Add serviceworker environment (fixes #2557) (Gyandeep Singh) -* Fix: Yoda should ignore comparisons where both sides are constants (fixes #2867) (cjihrig) -* Update: Loosens regex rules around intentional fall through comments (Fixes #2811) (greg5green) -* Update: Add missing schema to rules (fixes #2858) (Ilya Volodin) -* New: `require-yield` rule (fixes #2822) (Toru Nagashima) -* New: add callback-return rule (fixes #994) (Jamund Ferguson) - -v0.24.1 - July 10, 2015 - -* Docs: Clarify when not to use space-before-blocks (Ian VanSchooten) -* Docs: remove mistaken "off by default" (Jan Schär) -* Docs: remove mistaken "off by default" (Jan Schär) -* Docs: Fix typo in the shareable configs doc (Siddharth Kannan) -* Docs: clarification in no-unused-vars (Jan Schär) -* Docs: missing quotes in JSON (Jan Schär) -* Fix: Revert 1-based column changes in tests for patch (refs #2284) (Nicholas C. Zakas) -* Fix: Shallow cloning issues in eslint config (fixes #2961) (Gyandeep Singh) -* Fix: object-shorthand computed props (fixes #2937) (Jamund Ferguson) -* Fix: Remove invalid check inside `getJSDocComment` function (fixes #2938) (Gyandeep Singh) -* Fix: max-len to report correct column number (fixes #2926) (Mathias Schreck) -* Fix: add destructuring support to comma-dangle rule (fixes #2911) (Mathias Schreck) -* Fix: `no-redeclare` checks module scopes (fixes #2903) (Toru Nagashima) -* Fix: Include execScript in no-implied-eval rule (fixes #2873) (Frederik Braun) -* Fix: Support class syntax for line-around-comment rule (fixes #2894) (Gyandeep Singh) -* Fix: lines-around-comment was crashing in some cases due to a missing check (fixes #2892) (Mathieu M-Gosselin) -* Fix: Added missing export syntax support to the block-scoped-var rule. (fixes #2887) (Mathieu M-Gosselin) -* Fix: Yoda should ignore comparisons where both sides are constants (fixes #2867) (cjihrig) -* Docs: array-bracket-spacing examples used space-in-brackets (Brandon Mills) -* Docs: Add spaced-line-comment deprecation notice (Brandon Mills) -* Docs: Add space-in-brackets deprecation notice (Brandon Mills) - -v0.24.0 - June 26, 2015 - -* Upgrade: eslint-tester to 0.8.1 (Nicholas C. Zakas) -* Fix: no-dupe-args sparse array crash (fixes #2848) (Chris Walker) -* Fix: space-after-keywords should ignore extra parens (fixes #2847) (Mathias Schreck) -* New: add no-unexpected-multiline rule (fixes #746) (Glen Mailer) -* Update: refactor handle-callback-err to improve performance (fixes #2841) (Mathias Schreck) -* Fix: Add --init to the CLI options (fixes #2817) (Gyandeep Singh) -* Update: Add `except-parens` option to `no-return-assign` rule (fixes #2809) (Toru Nagashima) -* Fix: handle-callback-err missing arrow functions (fixes #2823) (Jamund Ferguson) -* Fix: `no-extra-semi` in class bodies (fixes #2794) (Toru Nagashima) -* Fix: Check type to be file when looking for config files (fixes #2790) (Gyandeep Singh) -* Fix: valid-jsdoc to work for object getters (fixes #2407) (Gyandeep Singh) -* Update: Add an option as an object to `generator-star-spacing` rule (fixes #2787) (Toru Nagashima) -* Build: Update markdownlint dependency (David Anson) -* Fix: context report message to handle more scenarios (fixes #2746) (Gyandeep Singh) -* Update: Ignore JsDoc comments by default for `spaced-comment` (fixes #2766) (Gyandeep Singh) -* Fix: one-var 'never' option for mixed initialization (Fixes #2786) (Ian VanSchooten) -* Docs: Fix a minor typo in a prefer-const example (jviide) -* Fix: comma-dangle always-multiline: no comma right before the last brace (fixes #2091) (Benoît Zugmeyer) -* Fix: Allow blocked comments with markers and new-line (fixes #2777) (Gyandeep Singh) -* Docs: small fix in quote-props examples (Jose Roberto Vidal) -* Fix: object-shorthand rule should not warn for NFEs (fixes #2748) (Michael Ficarra) -* Fix: arraysInObjects for object-curly-spacing (fixes #2752) (Jamund Ferguson) -* Docs: Clarify --rule description (fixes #2773) (Nicholas C. Zakas) -* Fix: object literals in arrow function bodies (fixes #2702) (Jose Roberto Vidal) -* New: `constructor-super` rule (fixes #2720) (Toru Nagashima) -* New: `no-this-before-super` rule (fixes #2721) (Toru Nagashima) -* Fix: space-unary-ops flags expressions starting w/ keyword (fixes #2764) (Michael Ficarra) -* Update: Add block options to `lines-around-comment` rule (fixes #2667) (Gyandeep Singh) -* New: array-bracket-spacing (fixes #2226) (Jamund Ferguson) -* Fix: No-shadow rule duplicating error messages (fixes #2706) (Aliaksei Shytkin) - -v0.23.0 - June 14, 2015 - -* Build: Comment out auto publishing of release notes (refs #2640) (Ilya Volodin) -* Fix: "extends" within package.json (fixes #2754) (Gyandeep Singh) -* Upgrade: globals@8.0.0 (fixes #2759) (silverwind) -* Docs: eol-last docs fix (fixes #2755) (Gyandeep Singh) -* Docs: btmills is a reviewer (Nicholas C. Zakas) -* Build: Revert lock io.js to v2.1.0 (refs #2745) (Brandon Mills) -* New: computed-property-spacing (refs #2226) (Jamund Ferguson) -* Build: Pin Sinon version (fixes #2742) (Ilya Volodin) -* Fix: `prefer-const` treats `for-in`/`for-of` with the same way (Fixes #2739) (Toru Nagashima) -* Docs: Add links to team members profile (Gyandeep Singh) -* Docs: add team and ES7 info to readme (Nicholas C. Zakas) -* Fix: don't try to strip "line:" prefix from parser errors with no such prefix (fixes #2698) (Tim Cuthbertson) -* Fix: never ignore config comment options (fixes #2725) (Brandon Mills) -* Update: Add clarification to spaced-comment (refs #2588) (Greg Cochard) -* Update: Add markers to spaced-comment (fixes #2588) (Greg Cochard) -* Fix: no-trailing-spaces now handles skipBlankLines (fixes #2575) (Greg Cochard) -* Docs: Mark global-strict on by default (fixes #2629) (Ilya Volodin) -* New: Allow extends to be an array (fixes #2699) (Justin Morris) -* New: globals@7.1.0 (fixes #2682) (silverwind) -* New: `prefer-const` rule (fixes #2333) (Toru Nagashima) -* Fix: remove hard-coded list of unary keywords in space-unary-ops rule (fixes #2696) (Tim Cuthbertson) -* Breaking: Automatically validate rule options (fixes #2595) (Brandon Mills) -* Update: no-lone-blocks does not report block-level scopes (fixes #2119) (Jose Roberto Vidal) -* Update: yoda onlyEquality option (fixes #2638) (Denis Sokolov) -* Docs: update comment to align with source code it's referencing (Michael Ficarra) -* Fix: Misconfigured default option for lines-around-comment rule (fixes #2677) (Gyandeep Singh) -* Fix: `no-shadow` allows shadowing in the TDZ (fixes #2568) (Toru Nagashima) -* New: spaced-comment rule (fixes #1088) (Gyandeep Singh) -* Fix: Check unused vars in exported functions (fixes #2678) (Gyandeep Singh) -* Build: Stringify payload of release notes (fixes #2640) (Greg Cochard) -* Fix: Allowing u flag in regex to properly lint no-empty-character-class (fixes #2679) (Dominic Barnes) -* Docs: deprecate no-wrap-func (fixes #2644) (Jose Roberto Vidal) -* Docs: Fixing grammar: then -> than (E) -* Fix: trailing commas in object-curly-spacing (fixes #2647) (Jamund Ferguson) -* Docs: be consistent about deprecation status (Matthew Dapena-Tretter) -* Docs: Fix mistakes in object-curly-spacing docs (Matthew Dapena-Tretter) -* New: run processors when calling executeOnText (fixes #2331) (Mordy Tikotzky) -* Update: move executeOnText() tests to the correct describe block (fixes #2648) (Mordy Tikotzky) -* Update: add tests to assert that the preprocessor is running (fixes #2651) (Mordy Tikotzky) -* Build: Lock io.js to v2.1.0 (fixes #2653) (Ilya Volodin) - -v0.22.1 - May 30, 2015 - -* Build: Remove release notes auto-publish (refs #2640) (Ilya Volodin) - -v0.22.0 - May 30, 2015 - -* Upgrade: escope 3.1.0 (fixes #2310, #2405) (Toru Nagashima) -* Fix: “consistent-this” incorrectly flagging destructuring of `this` (fixes #2633) (David Aurelio) -* Upgrade: eslint-tester to 0.7.0 (Ilya Volodin) -* Update: allow shadowed references in no-alert (fixes #1105) (Mathias Schreck) -* Fix: no-multiple-empty-lines and template strings (fixes #2605) (Jamund Ferguson) -* New: object-curly-spacing (fixes #2225) (Jamund Ferguson) -* Docs: minor fix for one-var rule (Jamund Ferguson) -* Fix: Shared config being clobbered by other config (fixes #2592) (Dominic Barnes) -* Update: adds "functions" option to no-extra-parens (fixes #2477) (Jose Roberto Vidal) -* Docs: Fix json formatting for lines-around-comments rule (Gyandeep Singh) -* Fix: Improve around function/class names of `no-shadow` (fixes #2556, #2552) (Toru Nagashima) -* Fix: Improve code coverage (fixes #2590) (Ilya Volodin) -* Fix: Allow scoped configs to have sub-configs (fixes #2594) (Greg Cochard) -* Build: Add auto-update of release tag on github (fixes #2566) (Greg Cochard) -* New: lines-around-comment (fixes #1344) (Jamund Ferguson) -* Build: Unblock build by increasing code coverage (Ilya Volodin) -* New: accessor-pairs rule to object initializations (fixes #1638) (Gyandeep Singh) -* Fix: counting of variables statements in one-var (fixes #2570) (Mathias Schreck) -* Build: Add sudo:false for Travis (fixes #2582) (Ilya Volodin) -* New: Add rule schemas (refs #2179) (Brandon Mills) -* Docs: Fix typo in shareable-configs example (fixes #2571) (Ted Piotrowski) -* Build: Relax markdownlint rules by disabling style-only items (David Anson) -* Fix: Object shorthand rule incorrectly flagging getters/setters (fixes #2563) (Brad Dougherty) -* New: Add config validator (refs #2179) (Brandon Mills) -* New: Add worker environment (fixes #2442) (Ilya Volodin) -* New no-empty-character class (fixes #2508) (Jamund Ferguson) -* New: Adds --ignore-pattern option. (fixes #1742) (Patrick McElhaney) - -v0.21.2 - May 18, 2015 - -* 0.21.2 (Nicholas C. Zakas) -* Fix: one-var exception for ForStatement.init (fixes #2505) (Brandon Mills) -* Fix: Don't throw spurious shadow errors for classes (fixes #2545) (Jimmy Jia) -* Fix: valid-jsdoc rule to support exported functions (fixes #2522) (Gyandeep Singh) -* Fix: Allow scoped packages in configuration extends (fixes #2544) (Eric Isakson) -* Docs: Add chatroom to FAQ (Nicholas C. Zakas) -* Docs: Move Gitter badge (Nicholas C. Zakas) - -v0.21.1 - May 15, 2015 - -* 0.21.1 (Nicholas C. Zakas) -* Fix: loc obj in report fn expects column (fixes #2481) (Varun Verma) -* Build: Make sure that all md files end with empty line (fixes #2520) (Ilya Volodin) -* Added Gitter badge (The Gitter Badger) -* Fix: forced no-shadow to check all scopes (fixes #2294) (Jose Roberto Vidal) -* Fix: --init indent setting (fixes #2493) (Nicholas C. Zakas) -* Docs: Mention bundling multiple shareable configs (Nicholas C. Zakas) -* Fix: Not to override the required extended config object directly (fixes #2487) (Gyandeep Singh) -* Build: Update markdownlint dependency (David Anson) -* Docs: added recursive function example to no-unused-vars (Jose Roberto Vidal) -* Docs: Fix typo (then -> than) (Vladimir Agafonkin) -* Revert "Fix: sanitise Jekyll interpolation during site generation (fixes #2297)" (Nicholas C. Zakas) -* Fix: dot-location should use correct dot token (fixes #2504) (Mathias Schreck) -* Fix: Stop linebreak-style from crashing (fixes #2490) (James Whitney) -* Fix: rule no-duplicate-case problem with CallExpressions. (fixes #2499) (Matthias Osswald) -* Fix: Enable full support for eslint-env comments (refs #2134) (Ilya Volodin) -* Build: Speed up site generation (fixes #2475) (Ilya Volodin) -* Docs: Fixing trailing spaces (Fixes #2478) (Ilya Volodin) -* Docs: Update README FAQs (Nicholas C. Zakas) -* Fix: Allow comment before comma for comma-spacing rule (fixes #2408) (Gyandeep Singh) - -v0.21.0 - May 9, 2015 - -* 0.21.0 (Nicholas C. Zakas) -* New: Shareable configs (fixes #2415) (Nicholas C. Zakas) -* Fix: Edge cases for no-wrap-func (fixes #2466) (Nicholas C. Zakas) -* Docs: Update ecmaFeatures description (Nicholas C. Zakas) -* New: Add dot-location rule. (fixes #1884) (Greg Cochard) -* New: Add addPlugin method to CLI-engine (Fixes #1971) (Ilya Volodin) -* Breaking: Do not check unset declaration types (Fixes #2448) (Ilya Volodin) -* Fix: no-redeclare switch scoping (fixes #2337) (Nicholas C. Zakas) -* Fix: Check extra scope in no-use-before-define (fixes #2372) (Nicholas C. Zakas) -* Fix: Ensure baseConfig isn't changed (fixes #2380) (Nicholas C. Zakas) -* Fix: Don't warn for member expression functions (fixes #2402) (Nicholas C. Zakas) -* New: Adds skipBlankLines option to the no-trailing-spaces rule (fixes #2303) (Andrew Vaughan) -* Fix: Adding exception for last line (Refs #2423) (Greg Cochard) -* Fix: crash on 0 max (fixes #2423) (gcochard) -* Fix object-shorthand arrow functions (fixes #2414) (Jamund Ferguson) -* Fix: Improves detection of self-referential functions (fixes #2363) (Jose Roberto Vidal) -* Update: key-spacing groups must be consecutive lines (fixes #1728) (Brandon Mills) -* Docs: grammar fix in no-sync (Tony Lukasavage) -* Docs: Update configuring.md to fix incorrect link. (Ans) -* New: Check --stdin-filename by ignore settings (fixes #2432) (Aliaksei Shytkin) -* Fix: `no-loop-func` rule allows functions at init part (fixes #2427) (Toru Nagashima) -* New: Add init command (fixes #2302) (Ilya Volodin) -* Fix: no-irregular-whitespace should work with irregular line breaks (fixes #2316) (Mathias Schreck) -* Fix: generator-star-spacing with class methods (fixes #2351) (Brandon Mills) -* New: no-unneeded-ternary rule to disallow boolean literals in conditional expressions (fixes #2391) (Gyandeep Singh) -* Docs: Add `restParams` to `ecmaFeatures` options list (refs: #2346) (Bogdan Savluk) -* Fix: space-in-brackets Cannot read property 'range' (fixes #2392) (Gyandeep Singh) -* Docs: Sort the rules (Lukas Böcker) -* Add: Exception option for `no-extend-native` and `no-native-reassign` (fixes #2355) (Gyandeep Singh) -* Fix: space-in-brackets import declaration (fixes #2378) (Gyandeep Singh) -* Update: Add uninitialized and initialized options (fixes #2206) (Ian VanSchooten) -* Fix: brace-style to not warn about curly mix ifStatements (fixes #1739) (Gyandeep Singh) -* Fix: npm run profile script should use espree (fixes #2150) (Mathias Schreck) -* New: Add support for extending configurations (fixes #1637) (Espen Hovlandsdal) -* Fix: Include string literal keys in object-shorthand (Fixes #2374) (Jamund Ferguson) -* Docs: Specify language for all code fences, enable corresponding markdownlint rule. (David Anson) -* New: linebreak-style rule (fixes #1255) (Erik Müller) -* Update: Add "none" option to operator-linebreak rule (fixes #2295) (Casey Visco) -* Fix: sanitise Jekyll interpolation during site generation (fixes #2297) (Michael Ficarra) - -v0.20.0 - April 24, 2015 - -* 0.20.0 (Nicholas C. Zakas) -* Fix: support arrow functions in no-extra-parens (fixes #2367) (Michael Ficarra) -* Fix: Column position in space-infix-ops rule (fixes #2354) (Gyandeep Singh) -* Fix: allow plugins to be namespaced (fixes #2360) (Seth Pollack) -* Update: one-var: enable let & const (fixes #2301) (Joey Baker) -* Docs: Add meteor to avaiable environments list (bartmichu) -* Update: Use `Object.assign()` polyfill for all object merging (fixes #2348) (Sindre Sorhus) -* Docs: Update markdownlint dependency, resolve/suppress new issues. (David Anson) -* Fix: newline-after-var declare and export (fixes #2325) (Gyandeep Singh) -* Docs: Some typos and grammar. (AlexKVal) -* Fix: newline-after-var to ignore declare in for specifiers (fixes #2317) (Gyandeep Singh) -* New: add --stdin-filename option (fixes #1950) (Mordy Tikotzky) -* Fix: Load .eslintrc in $HOME only if no other .eslintrc is found (fixes #2279) (Jasper Woudenberg) -* Fix: Add `v8` module to no-mixed-requires rule (fixes #2320) (Gyandeep Singh) -* Fix: key-spacing with single properties (fixes #2311) (Brandon Mills) -* Docs: `no-invalid-regexp`: add `ecmaFeatures` flags for `u`/`y` (Jordan Harband) -* New: object-shorthand rule (refs: #1617) (Jamund Ferguson) -* Update: backticks support for quotes rule (fixes #2153) (borislavjivkov) -* Fix: space-in-brackets to work with modules (fixes #2216) (Nicholas C. Zakas) - -v0.19.0 - April 11, 2015 - -* 0.19.0 (Nicholas C. Zakas) -* Upgrade: Espree to 2.0.1 (Nicholas C. Zakas) -* Docs: Update one-var documentation (fixes #2210) (Nicholas C. Zakas) -* Update: Add test for no-undef (fixes #2214) (Nicholas C. Zakas) -* Fix: Report better location for padded-blocks error (fixes #2224) (Nicholas C. Zakas) -* Fix: Don't check concise methods in quote-props (fixes #2251) (Nicholas C. Zakas) -* Fix: Consider tabs for space-in-parens rule (fixes #2191) (Josh Quintana) -* Fix: block-scoped-var to work with classes (fixes #2280) (Nicholas C. Zakas) -* Docs: Remove trailing spaces, enable corresponding markdownlint rule. (David Anson) -* Fix: padded-blocks with ASI (fixes #2273) (Brandon Mills) -* Fix: Handle comment lines in newline-after-var (fixed #2237) (Casey Visco) -* Docs: Standardize on '*' for unordered lists, enable corresponding markdownlint rule. (David Anson) -* Fix: no-undef and no-underscore-dangle to use double quotes (fixes #2258) (Gyandeep Singh) -* Docs: Improve grammar and style in comma-dangle.md (Nate Eagleson) -* Docs: Improve grammar and style in padded-blocks.md (Nate Eagleson) -* Docs: Update URL in no-wrap-func.md to resolve 404 (Nate Eagleson) -* Docs: Fix typo in command-line-interface.md (Nate Eagleson) -* Docs: Fix typo in working-with-rules.md (Nate Eagleson) -* Docs: Remove hard tabs from *.md, enable corresponding markdownlint rule. (David Anson) -* Fix: Function id missing in parent scope when using ecmaFeature `modules` for rule block-scoped-var (fixes #2242) (Michael Ferris) -* Fix: Ignore single lines for vertical alignment (fixes #2018) (Ian VanSchooten) -* Fix: Allow inline comments in newline-after-var rule (fixes #2229) (Casey Visco) -* Upgrade: Espree 2.0.0 and escope 3.0.0 (fixes #2234, fixes #2201, fixes (Nicholas C. Zakas) -* Docs: Update --no-ignore warning (Brandon Mills) -* Build: Remove jshint files (fixes #2222) (Jeff Tan) -* Docs: no-empty fix comment change (refs #2188) (Gyandeep Singh) -* Fix: duplicate semi and no-extra-semi errors (fixes #2207) (Brandon Mills) -* Docs: Update processors description (Nicholas C. Zakas) -* Fix: semi error on export declaration (fixes #2194) (Brandon Mills) -* New: operator-linebreak rule (fixes #1405) (Benoît Zugmeyer) -* Docs: Fixing broken links in documentation (Ilya Volodin) -* Upgrade: Espree to 0.12.3 (fixes #2195) (Gyandeep Singh) -* Fix: camelcase rule with {properties: never} shouldn't check assignment (fixes #2189) (Gyandeep Singh) -* New: Allow modifying base config (fixes #2143) (Meo) -* New: no-continue rule (fixes #1945) (borislavjivkov) -* Fix: `no-empty` rule should allow any comments (fixes #2188) (Gyandeep Singh) -* Docs: Fix spell in camelcase doc (fixes #2190) (Gyandeep Singh) -* Fix: Require semicolon after import/export statements (fixes #2174) (Gyandeep Singh) -* Build: Add linting of Markdown files to "npm test" script (fixes #2182) (David Anson) -* Build: Fixing site generation (Ilya Volodin) -* Build: Fix gensite task to work even if files are missing (Nicholas C. Zakas) - -v0.18.0 - March 28, 2015 - -* 0.18.0 (Nicholas C. Zakas) -* Fix: Mark variables as used in module scope (fixes #2137) (Nicholas C. Zakas) -* Fix: arrow functions need wrapping (fixes #2113) (Nicholas C. Zakas) -* Fix: Don't crash on empty array pattern item (fixes #2111) (Nicholas C. Zakas) -* Fix: Don't error on destructured params (fixes #2051) (Nicholas C. Zakas) -* Docs: Fixing broken links (Ilya Volodin) -* Fix: no-constant-condition should not flag += (fixes #2155) (Nicholas C. Zakas) -* Fix: Ensure piped in code will trigger correct errors (fixes #2154) (Nicholas C. Zakas) -* Fix: block-scoped-var to handle imports (fixes #2087) (Nicholas C. Zakas) -* Fix: no-dupe-args to work with destructuring (fixes #2148) (Nicholas C. Zakas) -* Fix: key-spacing crash on computed properties (fixes #2120) (Brandon Mills) -* Fix: indent crash on caseless switch (fixes #2144) (Brandon Mills) -* Fix: Don't warn about destructured catch params (fixes #2125) (Nicholas C. Zakas) -* Update: Omit setter param from no-unused-vars (fixes #2133) (Nicholas C. Zakas) -* Docs: Cleaning dead links (Ilya Volodin) -* Docs: Moving documentation out of the repository and modifying build scripts (Ilya Volodin) -* Docs: Update link to Documentation (Kate Lizogubova) -* Docs: Adding back deprecated space-unary-word-ops documentation (Ilya Volodin) -* Fix: Unused recursive functions should be flagged (issue2095) (Nicholas C. Zakas) -* Breaking: Remove JSX support from no-undef (fixes #2093) (Nicholas C. Zakas) -* Fix: markVariableAsUsed() should work in Node.js env (fixes #2089) (Nicholas C. Zakas) -* New: Add "always" and "never" options to "one-var" rule. (fixes #1619) (Danny Fritz) -* New: newline-after-var rule (fixes #2057) (Gopal Venkatesan) -* Fix: func-names with ES6 classes (fixes #2103) (Marsup) -* Fix: Add "Error" to the "new-cap" rule exceptions (fixes #2098) (Mickaël Tricot) -* Fix: vars-on-top conflict with ES6 import (fixes #2099) (Gyandeep Singh) -* Docs: Fixed JSON syntax (Sajin) -* New: space-before-function-paren rule (fixes #2028) (Brandon Mills) -* Breaking: rule no-empty also checking for empty catch blocks. (fixes #1841) (Dieter Oberkofler) -* Update: rule camelcase to allow snake_case in object literals. (fixes #1919) (Dieter Oberkofler) -* New: Added option int32Hint for space-infix-ops (fixes #1295) (Kirill Efimov) -* New: no-param-reassign rule (fixes #1599) (Nat Burns) - -v0.17.1 - March 17, 2015 - -* 0.17.1 (Nicholas C. Zakas) -* Fix: no-func-assign should not fail on import declarations (fixes #2060) (Igor Zalutsky) -* Fix: block-scoped-var to work with destructuring (fixes #2059) (Nicholas C. Zakas) -* Fix: no-redeclare should check Node.js scope (fixes #2064) (Nicholas C. Zakas) -* Fix: space-before-function-parentheses generator methods (fixes #2082) (Brandon Mills) -* Fix: Method name resolution in complexity rule (fixes #2049) (Nicholas C. Zakas) -* Fix: no-unused-vars crash from escope workaround (fixes #2042) (Brandon Mills) -* Fix: restrict dot-notation keywords to actual ES3 keywords (fixes #2075) (Michael Ficarra) -* Fix: block-scoped-var to work with classes (fixes #2048) (Nicholas C. Zakas) -* Docs: Update no-new documentation (fixes #2044) (Nicholas C. Zakas) -* Fix: yoda range exceptions with this (fixes #2063) (Brandon Mills) -* Docs: Fix documentation on configuring eslint with comments (Miguel Ping) -* Fix: rule no-duplicate-case problem with MemberExpressions. (fixes #2038) (Dieter Oberkofler) -* Fix: Exempt \0 from no-octal-escape (fixes #1923) (Michael Ficarra) - -v0.17.0 - March 14, 2015 - -* 0.17.0 (Nicholas C. Zakas) -* Fix: module import specifiers should be defined (refs #1978) (Nicholas C. Zakas) -* Fix: Ignore super in no-undef (refs #1968) (Nicholas C. Zakas) -* Upgrade: Espree to v0.12.0 (refs #1968) (Nicholas C. Zakas) -* Fix: destructured arguments should work in block-scoped-var (fixes #1996) (Nicholas C. Zakas) -* Fix: Line breaking with just carriage return (fixes #2005) (Nicholas C. Zakas) -* Fix: location of new-cap error messages (fixes #2025) (Mathias Schreck) -* Breaking: Stop checking JSX variable use, expose API instead (fixes #1911) (Glen Mailer) -* Fix: Check spacing of class methods (fixes #1989) (Nicholas C. Zakas) -* New: no-duplicate-case rule to disallow a duplicate case label (fixes #2015) (Dieter Oberkofler) -* Clarify issue requirement for doc pull requests (Ian) -* Add quotes around object key (Ian) -* Fix: Add comma-dangle allow-multiline (fixes #1984) (Keith Cirkel) -* Fix: Don't explode on default export function (fixes #1985) (Nicholas C. Zakas) -* Update: Add AST node exceptions to comma-style. (fixes #1932) (Evan Simmons) -* Docs: Add spread operator to available language options (Nicholas C. Zakas) -* New: generator-star-spacing rule (fixes #1680, fixes #1949) (Brandon Mills) - -v0.16.2 - March 10, 2015 - -* 0.16.2 (Nicholas C. Zakas) -* Fix: Ensure globalReturn isn't on when node:false (fixes #1995) (Nicholas C. Zakas) -* Downgrade: escope pegged to 2.0.6 (refs #2001) (Nicholas C. Zakas) -* Upgrade: escope to 2.0.7 (fixes #1978) (Nicholas C. Zakas) -* Docs: Update descriptive text for --no-ignore option. (David Anson) -* Upgrade: estraverse to latest for ESTree support (fixes #1986) (Nicholas C. Zakas) -* Fix: Global block-scope-var check should work (fixes #1980) (Nicholas C. Zakas) -* Fix: Don't warn about parens around yield (fixes #1981) (Nicholas C. Zakas) - -v0.16.1 - March 8, 2015 - -* 0.16.1 (Nicholas C. Zakas) -* Fix: Node.js scoping in block-scoped-var (fixes #1969) (Nicholas C. Zakas) -* Update: Enable ES6 scoping for more options (Nicholas C. Zakas) -* Fix: Ensure all export nodes are traversable (fixes #1965) (Nicholas C. Zakas) -* Fix: Ensure class names are marked as used (fixes #1967) (Nicholas C. Zakas) -* Fix: remove typo that caused a crash (fixes #1963) (Fabricio C Zuardi) -* Docs: Added missing "are" (Sean Wilkinson) - -v0.16.0 - March 7, 2015 - -* 0.16.0 (Nicholas C. Zakas) -* Fix: Pass correct sourceType to escope (fixes #1959) (Nicholas C. Zakas) -* Fix: Scoping for Node.js (fixes #892) (Nicholas C. Zakas) -* Fix: strict rule should honor module code (fixes #1956) (Nicholas C. Zakas) -* New: Add es6 environment (fixes #1864, fixes #1944) (Nicholas C. Zakas) -* Docs: Update ecmaFeatures list (fixes #1942) (Nicholas C. Zakas) -* Fix: Make no-unused-vars ignore exports (fixes #1903) (Nicholas C. Zakas) -* Upgrade: Espree to v1.11.0 (Nicholas C. Zakas) -* Fix: Comment configuration of rule doesn't work (fixes #1792) (Jary) -* Fix: Rest args should work in no-undef and block-scoped-var (fixes #1543) (Nicholas C. Zakas) -* Breaking: change no-comma-dangle to comma-dangle (fixes #1350) (Mathias Schreck) -* Update: space-before-function-parentheses to support generators (fixes #1929) (Brandon Mills) -* New: Adding support for "// eslint-disable-line rule" style comments (Billy Matthews) -* Fix: Use unversioned sinon file in browser test (fixes #1947) (Nicholas C. Zakas) -* Docs: Add mention of compatible parsers (Nicholas C. Zakas) -* Fix: Better error when given null as rule config (fixes #1760) (Glen Mailer) -* Update: no-empty to check TryStatement.handler (fixes #1930) (Brandon Mills) -* Fix: space-before-function-parentheses and object methods (fixes #1920) (Brandon Mills) -* New: no-dupe-args rule (fixes #1880) (Jamund Ferguson) -* Fix: comma-spacing should ignore JSX text (fixes #1916) (Brandon Mills) -* Breaking: made eol-last less strict (fixes #1460) (Glen Mailer) -* New: generator-star middle option (fixes #1808) (Jamund Ferguson) -* Upgrade: Espree to 1.10.0 for classes support (Nicholas C. Zakas) -* Docs: no-plusplus.md - auto semicolon insertion (Miroslav Obradović) -* Docs: Use union types in TokenStore JSDoc (refs #1878) (Brandon Mills) -* Fix: block-scoped-var to work with destructuring (fixes #1863) (Nicholas C. Zakas) -* Docs: Update docs for token-related methods (fixes #1878) (Nicholas C. Zakas) -* Update: Remove preferGlobal from package.json (fixes #1877) (Nicholas C. Zakas) -* Fix: allow block bindings in no-inner-declarations (fixes #1893) (Roberto Vidal) -* Fix: getScope and no-use-before-define for arrow functions (fixes #1895) (Brandon Mills) -* Fix: Make no-inner-declarations look for arrow functions (fixes #1892) (Brandon Mills) -* Breaking: Change no-space-before-semi to semi-spacing and add "after" option (fixes #1671) (Mathias Schreck) -* Update: Add support for custom preprocessors (fixes #1817) (Ilya Volodin) - -v0.15.1 - February 26, 2015 - -* 0.15.1 (Nicholas C. Zakas) -* Build: Fix release task (Nicholas C. Zakas) -* Fix: check all semicolons in no-space-before-semi (fixes #1885) (Mathias Schreck) -* Fix: Refactor comma-spacing (fixes #1587, fixes #1845) (Roberto Vidal) -* Fix: Allow globalReturn in consistent-return (fixes #1868) (Brandon Mills) -* Fix: semi rule should check throw statements (fixes #1873) (Mathias Schreck) -* Docs: Added HolidayCheck AG as user (0xPIT) -* Upgrade: `chalk` to 1.0.0 (Sindre Sorhus) -* Docs: Add CustomInk to the list of companies (Derek Lindahl) -* Docs: Alphabetize project & company usage list (Derek Lindahl) -* Docs: fix typo (Henry Zhu) -* Docs: Fix typo (Brenard Cubacub) - -v0.15.0 - February 21, 2015 - -* 0.15.0 (Nicholas C. Zakas) -* Upgrade: Espree to 1.9.1 (fixes #1816, fixes #1805) (Nicholas C. Zakas) -* Fix: make rules work with for-of statements (fixes #1859) (Mathias Schreck) -* Fix: Enable globalReturn for Node.js environment (fixes #1158) (Nicholas C. Zakas) -* Fix: Location of extra paren message (fixes #1814) (Nicholas C. Zakas) -* Fix: Remove unnecessary file exists check (fixes #1831) (Nicholas C. Zakas) -* Fix: Don't count else-if in max-depth (fixes #1835) (Nicholas C. Zakas) -* Fix: Don't flag for-of statement (fixes #1852) (Nicholas C. Zakas) -* Build: Test using io.js as well (Nicholas C. Zakas) -* Change customformat value to path (suisho) -* Docs: Add a missing word in the Contributing doc (Ben Linskey) -* Docs: Fix typo in wrap-iife rule doc title (Ben Linskey) -* Docs: Update pages to fix rendering of lists (David Anson) -* Fix: new-cap should allow defining exceptions (fixes #1424) (Brian Di Palma) -* Update: Add requireReturnDescription for valid-jsdoc (fixes #1833) (Brian Di Palma) -* New: rule no-throw-literal added (fixes #1791) (Dieter Oberkofler) -* New: multi-line option for the curly rule (fixes #1812) (Hugo Wood) -* Docs: fix typo in configuring docs (mendenhallmagic) -* Update: Backslashes in path (fixes #1818) (Jan Schär) -* Docs: Update pages to fix rendering of lists and fenced code blocks (David Anson) -* Docs: add webpack loader to the docs/integrations page (Maxime Thirouin) -* Breaking: space-before-function-parentheses replaces space-after-function-name and checkFunctionKeyword (fixes #1618) (Mathias Schreck) - -v0.14.1 - February 8, 2015 - -* 0.14.1 (Nicholas C. Zakas) -* Fix: Exit code should be 1 for any number of errors (fixes #1795) (Nicholas C. Zakas) -* Fix: Check indentation of first line (fixes #1796) (Nicholas C. Zakas) -* Fix: strict rules shouldn't throw on arrow functions (fixes #1789) (Nicholas C. Zakas) - -v0.14.0 - February 7, 2015 - -* 0.14.0 (Nicholas C. Zakas) -* Update: Fix indentation of comment (Nicholas C. Zakas) -* Fix: comma-spacing for template literals (fixes #1736) (Nicholas C. Zakas) -* Build: Add Node.js 0.12 testing (Nicholas C. Zakas) -* Breaking: Remove node from results (fixes #957) (Nicholas C. Zakas) -* Breaking: Exit code is now error count (Nicholas C. Zakas) -* Docs: Correct getFormatter() documentation (refs #1723) (Nicholas C. Zakas) -* Update: Make rules work with arrow functions (fixes #1508, fixes #1509, fixes #1493) (Nicholas C. Zakas) -* Fix: Ensure template string references count (fixes #1542) (Nicholas C. Zakas) -* Fix: no-undef to work with arrow functions (fixes #1604) (Nicholas C. Zakas) -* Upgrade: Espree to version 1.8.0 (Nicholas C. Zakas) -* Fix: Don't throw error for arguments (fixes #1759) (Nicholas C. Zakas) -* Fix: Don't warn on computed nonliteral properties (fixes #1762) (Nicholas C. Zakas) -* New: Allow parser to be configured (fixes #1624) (Nicholas C. Zakas) -* Docs: Added double quotes for JSON keys for comma-spacing and key-spacing rule (Dmitry Polovka) -* New: Rule indent (fixes #1022) (Dmitriy Shekhovtsov) -* Revert "New: Rule indent (fixes #1022)" (Nicholas C. Zakas) -* Update: fix eslint indentations (fixes #1770) (Dmitriy Shekhovtsov) -* Fix: Scoping issues for no-unused-vars (fixes #1741) (Nicholas C. Zakas) -* Docs: Added `eslint-enable` inline (Ivan Fraixedes) -* New: Add predefined Meteor globals (fixes #1763) (Johan Brook) -* New: Rule indent (fixes #1022) (Dmitriy Shekhovtsov) -* Update: Check all assignments for consistent-this (fixes #1513) (Timothy Jones) -* Fix: Support exceptions in no-multi-spaces (fixes #1755) (Brandon Mills) -* Docs: Forgotten parentheses in code snippet (Ivan Fraixedes) -* Update: CLIEngine results include warning and error count (fixes #1732) (gyandeeps) -* Fix: Scoping issues for no-unused-vars (fixes #1733) (Nicholas C. Zakas) -* Update: Add getNodeByRangeIndex method (refs #1755) (Brandon Mills) -* Update: Replace getTokenByRange(Index->Start) (refs #1721) (Brandon Mills) -* Update: Fast-path for empty input (fixes #546) (Nicholas C. Zakas) -* Fix: Allow single line else-if (fixes #1739) (Nicholas C. Zakas) -* Fix: Don't crash when $HOME isn't set (fixes #1465) (Nicholas C. Zakas) -* Fix: Make no-multi-spaces work for every case (fixes #1603, fixes #1659) (Nicholas C. Zakas) -* Breaking: Show error and warning counts in stylish summary (fixes #1746) (Brandon Mills) -* Docs: fixed typo in no-lone-blocks docs (Vitor Balocco) -* Docs: fixed typo in consistent-return docs (Vitor Balocco) -* Breaking: remove implied eval check from no-eval (fixes #1202) (Mathias Schreck) -* Update: Improve CLIEngine.getFormatter() (refs #1723) (Nicholas C. Zakas) -* Docs: Add Backbone plugin link (Ilya Volodin) -* Docs: use npm's keyword route (Tom Vincent) -* Build: Update sitegen script (Closes #1725) (Ilya Volodin) - -v0.13.0 - January 24, 2015 - -* 0.13.0 (Nicholas C. Zakas) -* Update: The rule spaced-line-comment now also allows tabs and not only spaces as whitespace. (fixes #1713) (Dieter Oberkofler) -* Docs: add Jasmine rules and eslintplugin npm links (Tom Vincent) -* Fix: Make no-redeclare work with let (fixes #917) (Nicholas C. Zakas) -* Update: Add CLIEngine.getFormatter() (fixes #1653) (Nicholas C. Zakas) -* Breaking: Update escope (fixes #1642) (Nicholas C. Zakas) -* Update: Switch to using estraverse-fb (fixes #1712) (Nicholas C. Zakas) -* Docs: Update README FAQ (Nicholas C. Zakas) -* Update: no-warning-comments matches on whole word only (fixes #1709) (Nick Fisher) -* Build: Add JSDoc generation (fixes #1363) (Nicholas C. Zakas) -* Docs: Add more info about context (fixes #1330) (Nicholas C. Zakas) -* Upgrade: Espree to 1.7.1 (fixes #1706) (Nicholas C. Zakas) -* Docs: Make CLA notice more prominent (Nicholas C. Zakas) -* Update: Added globals for: phantom,jquery, prototypejs, shelljs (fixes #1704) (Dmitriy Shekhovtsov) -* Docs: Fixed example for the space-return-throw-case rule (mpal9000) -* Fix: Except object literal methods from func-names (fixes #1699) (Brandon Mills) -* Update: use global strict mode everywhere (fixes #1691) (Brandon Mills) -* Update: Add allowPattern option for dot-notation rule (fixes #1679) (Tim Schaub) -* Fix: Missing undeclared variables in JSX (fixes #1676) (Yannick Croissant) -* Fix: no-unused-expressions rule incorrectly flagging yield (fixes #1672) (Rémi Gérard-Marchant) -* Update: Combine strict mode rules (fixes #1246) (Brandon Mills) -* Fix: disregards leading './' in ignore pattern or file name (fixes #1685) (Chris Montrois) -* Upgrade: globals module to latest (fixes #1670) (Nicholas C. Zakas) -* Fix: generator-star should allow params (fixes #1677) (Brandon Mills) -* Fix: no-unused-vars for JSX (fixes #1673 and fixes #1534) (Yannick Croissant) -* Docs: Add angularjs-eslint link into the integration doc (Emmanuel DEMEY) - -v0.12.0 - January 17, 2015 - -* 0.12.0 (Nicholas C. Zakas) -* Fix: Track JSX global variable correctly (fixes #1534) (Nicholas C. Zakas) -* Fix: Property regex flag checking (fixes #1537) (Nicholas C. Zakas) -* Docs: Add angularjs-eslint link into the integration doc (Emmanuel DEMEY) -* Update: Expose ecmaFeatures on context (fixes #1648) (Nicholas C. Zakas) -* Docs: Added Fitbit to the list of companies (Igor Zalutsky) -* New: gen-star rule (refs #1617) (Jamund Ferguson) -* New: no-var rule (refs #1617) (Jamund Ferguson) -* Fix: Support JSX spread operator (fixes #1634) (Nicholas C. Zakas) -* Docs: Document ecmaFeatures (Nicholas C. Zakas) -* Upgrade: several dependencies (fixes #1377) (Nicholas C. Zakas) -* Fix: Broken JSX test (Nicholas C. Zakas) -* Fix: no-bitwise reports on bitwise assignment expressions (fixes #1643) (Mathias Schreck) -* Fix: Find JSXIdentifier refs in no-unused-vars (fixes #1534) (Nicholas C. Zakas) -* Update: Add a couple JSX tests (Nicholas C. Zakas) -* Fix: quotes rule ignores JSX literals (fixes #1477) (Nicholas C. Zakas) -* Fix: Don't warn on JSX literals with newlines (fixes #1533) (Nicholas C. Zakas) -* Update: Fully enable JSX support (fixes #1640) (Nicholas C. Zakas) -* Breaking: Allow parser feature flips (fixes #1602) (Nicholas C. Zakas) -* Fix: Allow comments in key-spacing groups (fixes #1632) (Brandon Mills) -* Fix: block-scoped-var reports labels (fixes #1630) (Michael Ficarra) -* Docs: add newline to no-process-env (fixes #1627) (Tom Vincent) -* Fix: Update optionator, --no in help (fixes #1134) (George Zahariev) -* Fix: Allow individual newlines in space-in-brackets (fixes #1614) (Brandon Mills) -* Docs: Correct alignment in example project tree (Tim Schaub) -* Docs: Remove references to Esprima (Nicholas C. Zakas) -* Docs: Remove illegal code fence (Nicholas C. Zakas) - -v0.11.0 - December 30, 2014 - -* 0.11.0 (Nicholas C. Zakas) -* Fix: Adding regexp literal exception (fixes #1589) (Greg Cochard) -* Fix: padded-blocks incorrectly complained on comments (fixes #1416) (Mathias Schreck) -* Fix: column location of key-spacing with additional tokens (fixes #1458) (Mathias Schreck) -* Build: tag correct commit (refs #1606) (Mathias Schreck) -* Upgrade: Updat Espree to 1.3.1 (Nicholas C. Zakas) -* Fix: add es3 config option to dot-notation rule (fixes #1484) (Michael Ficarra) -* Fix: valid-jsdoc should recognize @class (fixes #1585) (Nicholas C. Zakas) -* Update: Switch to use Espree (fixes #1595) (Nicholas C. Zakas) -* Fix: brace-style stroustrup should report on cuddled elseif (fixes #1583) (Ian Christian Myers) -* New: Configuration via package.json (fixes #698) (Michael Mclaughlin) -* Update: Set environments w/ globals (fixes #1577) (Elan Shanker) -* Fix: yoda treats negative numbers as literals (fixes #1571) (Brandon Mills) -* Fix: function arguments now count towards no-shadow check (fixes #1584) (Glen Mailer) -* Fix: check if next statement is on newline when warning against extra semicolons. (fixes #1580) (Evan You) -* Update: add yoda exception for range tests (fixes #1561) (Brandon Mills) -* New: space-after-function-name (fixes #1340) (Roberto Vidal) - -v0.10.2 - December 12, 2014 - -* 0.10.2 (Nicholas C. Zakas) -* Fix: detect for...in in no-loop-func (fixes #1573) (Greg Cochard) -* Update: simplify comma-spacing logic (fixes #1562) (Brandon Mills) -* Fix: operator-assignment addition is non-commutative (fixes#1556) (Brandon Mills) -* 0.10.1 (Nicholas C. Zakas) -* Update: Add new-cap exception configurations. (Fixes #1487) - `newCapsAllowed` - `nonNewCapsAllowed` (Jordan Harband) - -v0.10.1 - December 6, 2014 - -* 0.10.1 (Nicholas C. Zakas) -* Docs: Fix v0.10.0 changelog (Nicholas C. Zakas) -* Build: Ensure changelog works with large semver versions (Nicholas C. Zakas) -* Fix: comma-spacing and comma-style to work with array literals (fixes #1492) (Nicholas C. Zakas) -* Update: better operator regex in use-isnan rule (fixes #1551) (Michael Ficarra) -* Fix: wrong op index in no-multi-spaces (fixes #1547) (Brandon Mills) -* Fix: Restrict use-isnan violations to comparison operators. (Fixes #1535) (Jordan Harband) -* Fix: comma-spacing has false positives when parenthesis are used (fixes #1457) (Jamund Ferguson) -* Docs: alphabetize the "Stylistic Issues" section (Jeff Williams) -* Build: make the "gensite" target work when DOCS_DIR does not exist (fixes #1530) (Jeff Williams) -* Docs: badges should only refer to master branch (Mathias Schreck) -* Fix: prevent crash on empty blocks in no-else-return (fixes #1527) (Mathias Schreck) -* Build: Fix md to html conversion regex (fixes #1525) (Brandon Mills) -* 0.10.0 (Nicholas C. Zakas) - -v0.10.0 - November 27, 2014 - -* 0.10.0 (Nicholas C. Zakas) -* Fix: Add Object and Function as exceptions in new-cap (refs #1487) (Nicholas C. Zakas) -* Breaking: Allow extensionless files to be passed on CLI (fixes #1131) (Nicholas C. Zakas) -* Fix: typo: iffe to iife, none to non (Michael Ficarra) -* Update: refactor tokens API (refs #1212) (Brandon Mills) -* New: Allow other file extensions (fixes #801) (Nicholas C. Zakas) -* Update: Add Event to browser globals (fixes #1474) (Nicholas C. Zakas) -* Fix: check function call arguments in comma-spacing (fixes #1515) (Mathias Schreck) -* Update: Add no-cond-assign option to disallow nested assignments in conditionals (fixes #1444) (Jeff Williams) -* Fix: crash in no-multi-spaces on empty array elements (fixes #1418) (Brandon Mills) -* Fix: Don't explode on directory traversal (fixes #1452) (Nicholas C. Zakas) -* Fix: no-fallthrough should work when semis are missing (fixes #1447) (Nicholas C. Zakas) -* Fix: JSDoc parsing by updating doctrine (fixes #1442) (Nicholas C. Zakas) -* Update: restore the "runs" global present in Jasmine 1.3 (fixes #1498) (Michał Gołębiowski) -* Fix: ignore undefined identifiers in typeof (fixes #1482) (Mathias Schreck) -* Fix: Ignoring empty comments. (fixes #1488) (Greg Cochard) -* New: Add space-unary-ops rules (#1346) (Marcin Kumorek) -* Update: Remove shebang workaround in spaced-line-comment (fixes #1433) (Michael Ficarra) -* Docs: change 'and' to 'an' in docs/rules/valid-jsdoc.md (fixes #1441) (Michael Ficarra) -* Update: Add `beforeAll` and `afterAll` to the Jasmine globals (fixes #1478) (Gyandeep Singh) -* Update: Add exception options to space-in-parens (fixes #1368) (David Clark) -* Build: Add check for license issues (fixes #782) (Brandon Mills) -* Docs: update badges (Yoshua Wuyts) -* Docs: Update pages to fix rendering of lists and fenced code blocks (David Anson) -* Fix: env rules merging for command line config (fixes #1271) (Roberto Vidal) -* Fix: Collect variables declare in switch-case.(fixes #1453) (chris) -* Fix: remove extra capture group (Nate-Wilkins) -* Update: allow distinct alignment groups in key-spacing (fixes #1439) (Brandon Mills) -* Fix: message for numeric property names in quote-props (fixes #1459) (Brandon Mills) -* Docs: Remove assumption about the rule config (Alexander Schmidt) -* New: Add ability to time individual rules (fixes #1437) (Brandon Mills) -* Fix: single quotes (Nate-Wilkins) -* Docs: Fix broken code fences in key-spacing docs (Brandon Mills) -* Docs: Explain .eslintignore features (fixes #1094) (Brandon Mills) -* Breaking: ignore node_modules by default (fixes #1163) (Brandon Mills) -* Fix: Adds clamping to getSource beforeCount (fixes #1427) (Greg Gianforcaro) -* New: add no-inline-comment rule (fixes #1366) (Greg Cochard) -* Fix: '.md' to '.html' with anchors (fixes #1415) (Nate-Wilkins) -* Build: Filter and sort versions in gensite (fixes #1430) (Brandon Mills) -* Build: Escape period in regex (fixes #1428) (Brandon Mills) -* Revert "Fix: '.md' to '.html' with anchors (fixes #1415)" (Nicholas C. Zakas) -* 0.9.2 (Nicholas C. Zakas) -* New: Add operator-assignment rule (fixes #1420) (Brandon Mills) - -v0.9.2 - November 1, 2014 - -* 0.9.2 (Nicholas C. Zakas) -* Fix: '.md' to '.html' with anchors (fixes #1415) (Nate-Wilkins) -* Fix: Allow line breaks in key-spacing rule (fixes #1407) (Brandon Mills) -* Build: add coveralls integration (fixes #1411) (Mathias Schreck) -* Fix: add severity flag for ignored file warning (fixes #1401) (Mathias Schreck) -* Fix: Keep sinon at ~1.10.3 (fixes #1406) (Brandon Mills) -* Fix: ! negates .eslintignore patterns (fixes #1093) (Brandon Mills) -* Fix: let fs.stat throw if a file does not exist (fixes #1296) (Mathias Schreck) -* Fix: check switch statements in space-before-blocks (fixes #1397) (Mathias Schreck) -* Docs: fix rule name in example configuration (Mathias Schreck) -* Fix: disable colors during test run (fixes #1395) (Mathias Schreck) -* New: add isPathIgnored method to CLIEngine (fixes #1392) (Mathias Schreck) -* Docs: changing eslint to ESLint and add missing backtick (Mathias Schreck) -* Docs: Documents the functionality to load a custom formatter from a file (Adam Baldwin) -* 0.9.1 (Nicholas C. Zakas) -* Update: Option type for mixed tabs and spaces (fixes #1374) (Max Nordlund) -* Fix: Nested occurrences of no-else-return now show multiple reports (fixes #1369) (Jordan Hawker) - -v0.9.1 - October 25, 2014 - -* 0.9.1 (Nicholas C. Zakas) -* Docs: fix link on governance model (azu) -* Fix: plugins without rulesConfig causes crash (fixes #1388) (Mathias Schreck) -* 0.9.0 (Nicholas C. Zakas) - -v0.9.0 - October 24, 2014 - -* 0.9.0 (Nicholas C. Zakas) -* New: Allow reading from STDIN (fixes #368) (Nicholas C. Zakas) -* New: add --quiet option (fixes #905) (Mathias Schreck) -* Update: Add support for plugin default configuration (fixes #1358) (Ilya Volodin) -* Fix: Make sure shebang comment node is removed (fixes #1352) (Nicholas C. Zakas) -* New: Adding in rule for irregular whitespace checking. (fixes #1024) (Jonathan Kingston) -* Fix: space-in-parens should not throw for multiline statements (fixes #1351) (Jary) -* Docs: Explain global vs. local plugins (fixes #1238) (Nicholas C. Zakas) -* Docs: Add docs on Node.js API (fixes #1247) (Nicholas C. Zakas) -* Docs: Add recommended keywords for plugins (fixes #1248) (Nicholas C. Zakas) -* Update: Add CLIEngine#getConfigForFile (fixes #1309) (Nicholas C. Zakas) -* Update: turn on comma-style for project (fixes #1316) (Nicholas C. Zakas) -* Fix: Ensure messages are sorted by line (fixes #1343) (Nicholas C. Zakas) -* Update: Added arraysInObjects and objectsInObjects options to space-in-brackets rule (fixes #1265, fixes #1302) (vegetableman) -* Breaking: Removed comma spacing check from space-infix-ops (fixes #1361) (vegetableman) -* Fix: addressed linting errors (Nicholas C. Zakas) -* Docs: Add Contributor Model (fixes #1341) (Nicholas C. Zakas) -* Docs: Add reference to CLA (Nicholas C. Zakas) -* Build: add version numbers to docs (fixes #1170) (Mathias Schreck) -* Fix: no-fallthrough incorrectly flagged falls through annotations (fixes #1353) (Mathias Schreck) -* Build: separate site publishing form generation (fixes #1356) (Mathias Schreck) -* New: Add key-spacing rule (fixes #1280) (Brandon Mills) -* New: add spaced-line-comment rule (fixes #1345) (Greg Cochard) -* Docs: added more Related Rules sections (fixes #1347) (Delapouite) -* Fix: resolve linting issue in (fixes #1339) (Nicholas C. Zakas) -* New: add space-before-blocks rule (fixes #1277) (Mathias Schreck) -* Docs: Remove moot integration plugins (Sindre Sorhus) -* New: add rule for multiple empty lines (fixes #1254) (Greg Cochard) -* Fix: no-shadow rule should consider function expressions (fixes #1322) (Mathias Schreck) -* Update: remove globals present only in Jasmine plugins (fixes #1326) (Michał Gołębiowski) -* New: added no-multi-spaces rule (fixes #630) (vegetableman) -* New: Added comma-spacing rule (Fixes #628, Fixes #1319) (vegetableman) -* New: add rule for padded blocks (fixes #1278) (Mathias Schreck) -* Docs: fix eqeqeq isNullCheck comment (Denis Sokolov) -* Fix: no-comma-dangle violation in unit test and Makefile.js/lint not checking return codes (fixes #1306) (David Anson) -* Fix: allow comma-last with object properties having line breaks (fixes #1314) (vegetableman) -* New: Added comma-style rule (fixes #1282) (vegetableman) -* Update: add space after function keyword check (fixes #1276) (Mathias Schreck) -* Update: Add missing environments and fix sorting/grouping of rules (fixes #1307, fixes #1308) (David Anson) -* Docs: Fix sorting of rules within each section (David Anson) -* Docs: Correct a few misspelled words (David Anson) -* Docs: Update multiple pages to fix rendering of fenced code blocks (David Anson) -* New: Added no-process-env rule (fixes #657) (vegetableman) -* Fix: add rule ensuring #1258 is fixed by recent rewrite (fixes #1258) (Michael Ficarra) -* Update: split propertyName from singleValue in space-in-brackets (fixes #1253) (Michael Ficarra) -* Update: add "as-needed" option to quote-props rule (fixes #1279) (Michael Ficarra) -* Docs: fixed broken link and changed warning level to error level (vegetableman) -* Docs: Added "the native web" to the list of companies that use ESLint. (Golo Roden) -* Docs: Add BountySource badge to README (Nicholas C. Zakas) -* 0.8.2 (Nicholas C. Zakas) - -v0.8.2 - September 20, 2014 - -* 0.8.2 (Nicholas C. Zakas) -* Docs: Updated contribution guidelines to add accepted/bounty issues descriptions (Nicholas C. Zakas) -* Docs: Update README with links and FAQs (Nicholas C. Zakas) -* Docs: add finally to space-after-keywords documentation (Mathias Schreck) -* New: add ignoreCase option to sort-vars (fixes #1272) (Mathias Schreck) -* Docs: fix typo (Barry Handelman) -* Docs: Fix broken Markdown on configuration page (Nicholas C. Zakas) -* Docs: Fix reference to wrong rule name (Harry Wolff) -* Upgrade: Most dev dependencies (Nicholas C. Zakas) -* Upgrade: shelljs to 0.3.0 (Nicholas C. Zakas) -* Upgrade: doctrine to 0.5.2 (Nicholas C. Zakas) -* Upgrade: esprima to 1.2.2 (Nicholas C. Zakas) -* Upgrade: eslint-tester to latest (Nicholas C. Zakas) -* Fix: Load .eslintrc in directory with $HOME as an ancestor (fixes #1266) (Beau Gunderson) -* Fix: load .eslintrc from HOME (fixes #1262) (Beau Gunderson) -* New: Add sharable rule settings (fixes #1233) (Ilya Volodin) -* Upgrade: upgrade outdated dependencies (fixes #1251) (Mathias Schreck) -* Docs: fix typo in no-ex-assign documentation (Michael Ficarra) -* Docs: add intellij plugin to integrations (ido) -* Docs: Changing NPM to npm (Peter deHaan) -* Fix: strict should check function expressions (fixes #1244) (Brandon Mills) -* Docs: fix vars-on-top documentation (fixes #1234) (Mathias Schreck) -* 0.8.1 (Nicholas C. Zakas) -* Docs: Fixed a typo in brace-style.md (Anton Antonov) - -v0.8.1 - September 9, 2014 - -* 0.8.1 (Nicholas C. Zakas) -* Fix: Ensure exit code is 1 when there's a syntax error (fixes #1239) (Nicholas C. Zakas) -* Docs: fix up vars-on-top documentation (fixes #1234) (Michael Ficarra) -* Fix: vars-on-top directive support (fixes #1235) (Michael Ficarra) -* Fix: Avoid mutating node.range in max-len (fixes #1224) (Brandon Mills) -* Docs: Typo, add missing quotation mark (Ádám Lippai) -* Update: space-in-brackets to allow exceptions (fixes #1142) (Brandyn Bennett) -* 0.8.0 (Nicholas C. Zakas) - -v0.8.0 - September 5, 2014 - -* 0.8.0 (Nicholas C. Zakas) -* Perf-related revert "Fix: Speed up tokens API (refs #1212)" (Nicholas C. Zakas) -* Fix: no-fallthrough: continue affects control flow, too (fixes #1220) (Michael Ficarra) -* Fix: rewrite no-unused-vars rule (refs #1212) (Michael Ficarra) -* Fix: Error when there's a \r in .eslintrc (#1172) (Gyandeep Singh) -* Added rule disallowing reserved words being used as keys (fixes #1144) (Emil Bay) -* Fix: rewrite no-spaced-func rule (refs #1212) (Michael Ficarra) -* Fix: Speed up getScope() (refs #1212) (Brandon Mills) -* Fix: no-extra-strict behavior for named function expressions (fixes #1209) (Mathias Schreck) -* Add Date.UTC to allowed capitalized functions (David Brockman Smoliansky) -* New: Adding 'vars-on-top' rule (fixes #1148) (Gyandeep Singh) -* Fix: Speed up tokens API (refs #1212) (Brandon Mills) -* Docs: document plugin usage (fixes #1117) (Mathias Schreck) -* New: accept plugins from cli (fixes #1113) (Mathias Schreck) -* Docs: fix some typos. (Mathias Schreck) -* New: Load plugins from configs (fixes #1115). (Mathias Schreck) -* Fix: no-unused-expressions better directive detection (fixes #1195) (Michael Ficarra) -* Fix: no-unused-expressions directive support (fixes #1185) (Michael Ficarra) -* Update: Add 'allowSingleLine' option to brace-style (fixes #1089) (John Gozde) -* Docs: Spell checking and one extra closing curly in code example (Juga Paazmaya) -* Fix: mergeConfigs ensures the plugins property exists (fixes #1191). (Mathias Schreck) -* Update: Declare ES6 collections (Map, Set, WeakMap, WeakSet) as built-in globals (fixes #1189) (Michał Gołębiowski) -* New: Adding 'plugin' CLI option (fixes #1112) (Greg) -* Fix: Correct a typo in the error message in tests (Michał Gołębiowski) -* New: Add no-extra-bind rule to flag unnecessary bind calls (fixes #982) (Bence Dányi) -* Fix: Useless bind call in cli-engine (fixes #1181) (Bence Dányi) -* Docs: Updates `amd` description (fixes #1175) (James Whitney) -* New: Adds support for the `jasmine` env (fixes #1176) (James Whitney) -* Fix: for-in support to no-empty-label rule (fixes #1161) (Marc Harter) -* docs: Update link (Mathias Bynens) -* Fix: crash when loading empty eslintrc file (fixes #1164) (Michael Ficarra) -* Fix: no-unused-var should respect compound assignments (fixes #1166) (Michael Ficarra) -* Update: ES3 `ReservedWord`s (fixes #1151) Adds ES3 `ReservedWord`s to the list of keywords in the `dot-notation` rule (fixes #1151) (Emil Bay) -* Update: Update comment parser to read rule slashes (fixes #1116) (Jary) -* New: add no-void rule (fixes #1017). (Mike Sidorov) -* New: Add rules.import() (fixes #1114) (Mathias Schreck) -* New: Make mergeConfigs() merge plugin entries (fixes #1111) (Mathias Schreck) -* Breaking: Change no-global-strict to global-strict and add "always" option (fixes #989) (Brandon Mills) -* Fix: no-unreachable should check top-level statements (fixes #1138) (Brandon Mills) -* Fix: Speed up no-unreachable (fixes #1135) (Brandon Mills) -* New: advanced handle-callback-err configuration (fixes #1124) (Mathias Schreck) -* New: Expose CLIEngine (fixes #1083) (Gyandeep Singh) -* Docs: Add link to new Atom linter (fixes #1125) (Gil Pedersen) -* Fix: space-after-keywords checks finally of TryStatement (fixes #1122) (Michael Ficarra) -* Fix: space-after-keywords checks while of DoWhileStatement (fixes #1120) (Michael Ficarra) -* Fix: space-after-keywords w/ "never" should allow else-if (fixes #1118) (Michael Ficarra) -* Fix: dot-notation rule flags non-keyword reserved words (fixes #1102) (Michael Ficarra) -* Update: Use xml-escape instead of inline helper (Ref #848) (jrajav) -* Update: Added comments support to .eslintignore (fixes #1084) (Vitaly Puzrin) -* Update: enabled 'no-trailing-spaces' rule by default (fixes #1051) (Vitaly Puzrin) -* Breaking: Ignore children of all patterns by adding "/**" (Fixes #1069) (jrajav) -* Fix: skip dot files and ignored dirs on traverse (fixes #1077, related to #814) (Vitaly Puzrin) -* Docs: Added Gruntjs plugin on integrations page (Gyandeep Singh) -* Fix: don't break node offsets if hasbang present (fixes #1078) (Vitaly Puzrin) -* Build: Exclude readme/index from rules Resources generation (Fixes #1072) (jrajav) -* Docs: Change eol-last examples to `
` (Fixes #1068) (jrajav)
-* 0.7.4 (Nicholas C. Zakas)
-* New: space-in-parens rule (Closes #627) (jrajav)
-
-v0.7.4 - July 10, 2014
-
-* 0.7.4 (Nicholas C. Zakas)
-* Docs: Fix 'lintinging' typo and ref links (Tom Vincent)
-* Fix: Transform envs option to object in Config (Fixes #1064) (jrajav)
-* 0.7.3 (Nicholas C. Zakas)
-
-v0.7.3 - July 9, 2014
-
-* 0.7.3 (Nicholas C. Zakas)
-* Update: Address code review comment for strict rule (refs #1011) (Nicholas C. Zakas)
-* Docs: Update copyright policy (Nicholas C. Zakas)
-* Docs: Update documentation for max-len to include description of second option (fixes #1006) (Nicholas C. Zakas)
-* Fix: Avoid double warnings for strict rule (fixes #1011) (Nicholas C. Zakas)
-* Fix: Check envs for true/false (Fixes #1059) (jrajav)
-* 0.7.2 (Nicholas C. Zakas)
-
-v0.7.2 - July 8, 2014
-
-* 0.7.2 (Nicholas C. Zakas)
-* Fix: no-mixed-spaces-and-tabs incorrectly flagging multiline comments (fixes #1055) (Nicholas C. Zakas)
-* Fix: new-cap error that throws on non-string member (fixes #1056) (Nicholas C. Zakas)
-* Fix: Always make globals an object (Fixes #1049) (jrajav)
-* 0.7.1 (Nicholas C. Zakas)
-
-v0.7.1 - July 7, 2014
-
-* 0.7.1 (Nicholas C. Zakas)
-* Docs: Add Related Rules sections (Fixes #990) (jrajav)
-* Fix: Check output file isn't dir, fix tests (Fixes #1034) (jrajav)
-* Docs: Updated documentation for several rules (Nicholas C. Zakas)
-* Docs: Updated contributor guide and dev env setup guide (Nicholas C. Zakas)
-* Breaking: Implement configuration hierarchy (fixes #963) (Nicholas C. Zakas)
-* Update: greatly simplify eqeqeq's operator finding logic (fixes #1037) (Michael Ficarra)
-* New: Add getSourceLines() to core and rule context (fixed #1005) (Jary)
-* Build + Docs: Adding generated resource links to rule docs (Fixes #1021) (jrajav)
-* Fix: Ignore unused params for args: 'none' (Fixes #1026) (jrajav)
-* Fix: Point eqeqeq error at operator (Fixes #1029) (jrajav)
-* New: report output to a file (fixes #1027) (Gyandeep Singh)
-* Breaking: CLIEngine abstraction for CLI operations; formatters no longer are passed configs (fixes #935) (Nicholas C. Zakas)
-* Fix: Allow stdout to drain before exiting (fixes #317) (Nicholas C. Zakas)
-* New: add no-undefined rule (fixes #1020) (Michael Ficarra)
-* New: Added no-mixed-spaces-and-tabs rule (fixes #1003) (Jary)
-* New: Added no-trailing-spaces rule (fixes #995) (Vitaly Puzrin)
-* Update: Factor ignores out of Config (fixes #958) (jrajav)
-* Fix: rewrite eol-last rule (fixes #1007) (fixes #1008) (Michael Ficarra)
-* Fix: add additional IIFE exception in no-extra-parens (fixes #1004) (Michael Ficarra)
-* Docs: Removed reference to brace-style Stroustrup default (fixes #1000) (Caleb Troughton)
-* New: Added eol-last rule (Fixes #996) (Vitaly Puzrin)
-* Fix: Put rule severity in messages (Fixes #984); deprecates passing full config to Formatters (jrajav)
-* Fix: no-unused-vars to check only file globals (fixes #975) (Aliaksei Shytkin)
-* Build: Makefile - Check for rule ids in docs titles (Fixes #969) (Delapouite)
-* Docs: guard-for-in - added missing id in title (Fixes #969) (Delapouite)
-* Breaking: Change 'no-yoda' rule to 'yoda' and add "always" option (Fixes #959) (jrajav)
-* Fix: Fixes no-unused-vars to check /*globals*/ (Fixes #955) (jrajav)
-* Update: no-eval to also warn on setTimeout and setInterval (fixes #721) (Nicholas C. Zakas)
-* Remove: experimental match() method (Nicholas C. Zakas)
-* Update: space-in-brackets now always allows empty object and array literals to have no spaces (fixes #797) (Nicholas C. Zakas)
-* New: Allow the cli parameter "color" and "no-color" (fixes #954) (Tom Gallacher)
-* Fix: valid-jsdoc no more warning for multi-level params (Fixes #925) (Delapouite)
-* Update: Search parent directories for .eslintignore (Fixes #933) (jrajav)
-* Fix: Correct order of arguments passed to assert.equal (fixes #945) (Michał Gołębiowski)
-* Update: Write the summary in stylish formatter in yellow if no errors (fixes #906); test coloring of messages (Michał Gołębiowski)
-* Fix: Corrects configs merging into base config (Fixes #838) (jrajav)
-* Fix: Adding check if char is non-alphabetic to new-cap (Fixes #940) (jrajav)
-* Docs: Update about page description (fixes #936) (Nicholas C. Zakas)
-* Docs: Add '/', forgotten in first commit (Fixes #931) (jrajav)
-* Update: Rule `new-cap` checks capitalized functions (fixes #904) (Aliaksei Shytkin)
-* Docs: Mention allowed semicolons in "never" mode for 'semi' rule (fixes #931) (jrajav)
-* Docs: Mention Yeoman generator in dev setup (fixes #914) (Nicholas C. Zakas)
-* Build: Remove flaky perf test from Travis (Nicholas C. Zakas)
-* Breaking: Refactor .eslintignore functionality (refs #928, fixes #901, fixes #837, fixes #853) (Nicholas C. Zakas)
-* 0.6.2 (Nicholas C. Zakas)
-* Breaking: Remove JSON support for .eslintignore (fixes #883) (icebox)
-
-v0.6.2 - May 23, 2014
-
-* 0.6.2 (Nicholas C. Zakas)
-* Fix: Adding per-environment rule configs to docs and doc validation (Fixes #918) (jrajav)
-* Docs: Updated contribution guidelines (Nicholas C. Zakas)
-* Docs: Update description of eqeqeq to mention special cases (fixes #924) (Nicholas C. Zakas)
-* Fix: block-scoped-var CatchClause handling (fixes #922) (Michael Ficarra)
-* Fix: block-scoped-var respects decls in for and for-in (fixes #919) (Michael Ficarra)
-* Update: Implement eqeqeq option "allow-null" (fixes #910) (Michał Gołębiowski)
-* Fix: new-cap should allow non-alpha characters (fixes #897) (Michael Ficarra)
-* Update: Refactor ESLintTester to fix dependency hell (fixes #602) (Nicholas C. Zakas)
-* Fix: Merge configs with ancestors (Fixes #820) (jrajav)
-* Fix: no-fallthrough should respect block statements in case statements (fixes #893) (Nicholas C. Zakas)
-* Docs: Fix layout issue in configuration docs (fixes #889) (Nicholas C. Zakas)
-* Build: Enable default-case rule (fixes #881) (icebox)
-* Build: Enable space-after-keywords (fixes #884) (icebox)
-* Fix api double emit on comment nodes (fixes #876) (Aliaksei Shytkin)
-* 0.6.1 (Nicholas C. Zakas)
-
-v0.6.1 - May 17, 2014
-
-* 0.6.1 (Nicholas C. Zakas)
-* Upgrade: Optionator to 0.4.0 (fixes #885) (Nicholas C. Zakas)
-* 0.6.0 (Nicholas C. Zakas)
-
-v0.6.0 - May 17, 2014
-
-* 0.6.0 (Nicholas C. Zakas)
-* Fix: Remove -r alias for --rule (fixes #882) (Nicholas C. Zakas)
-* Docs: Update dev setup, contributing, default-case descriptions (Nicholas C. Zakas)
-* Update: valid-jsdoc now allows you to optionally turn off parameter description checks (fixes #822) (Nicholas C. Zakas)
-* Breaking: brace-style now disallows block statements where curlies are on the same line (fixes #758) (Nicholas C. Zakas)
-* Add linting Makefile.js (fixes #870) (icebox)
-* add rule flag, closes #692 (George Zahariev)
-* Add check between rules doc and index (fixes #865) (icebox)
-* Add Build Next mention in integrations README. (icebox)
-* document new IIFE exception for no-extra parens added as part of #655 (Michael Ficarra)
-* (fixes #622) Add rule ID on documentation pages (Delapouite)
-* fixes #655: add IIFE exception to no-extra-parens (Michael Ficarra)
-* add new rule "no-new-require" (Wil Moore III)
-* exit with non-zero status when tests fail (fixes #858) (Márton Salomváry)
-* removed unicode zero width space character from messages (fixes #857) (Márton Salomváry)
-* Change: --rulesdir now can be specified multiple times (fixes #830) (Nicholas C. Zakas)
-* Update: Node 0.8 no longer supported (fixes #734) (Nicholas C. Zakas)
-* Update: Add typed arrays into builtin environment globals (fixes #846) (Nicholas C. Zakas)
-* Fix: Add prototype methods to global scope (fixes #700) (Nicholas C. Zakas)
-* Rule: no-restricted-modules (fixes #791) (Christian)
-* Upgrade: Esprima to 1.2 (fixes #842) (Nicholas C. Zakas)
-* Docs: reporting level 2 is an error (fixes #843) (Brandon Mills)
-* Upgrade: Esprima to 1.2, switch to using Esprima comment attachment (fixes #730) (Nicholas C. Zakas)
-* Fix: Semi rule incorrectly flagging extra semicolon (fixes #840) (Nicholas C. Zakas)
-* Build: Update Travis to only test Node 0.10 (refs #734) (Nicholas C. Zakas)
-* Add "nofunc" option (fixes #829) (Conrad Zimmerman)
-* Rule: no-inner-declarations (fixes #587) (Brandon Mills)
-* Rule 'block-scoped-var': correct scope for functions, arguments (fixes #832) (Aliaksei Shytkin)
-* Rule: default-case (fixes #787) (Aliaksei Shytkin)
-* Ignored files are excluded unless --force is passed on the CLI (Nick Fisher)
-* Fixes a typo and a broken link in the documentation (Nick Fisher)
-* Replaces .some() with .indexOf() where appropriate (Nick Fisher)
-* Fix correct config merge for array values (fixes #819) (Aliaksei Shytkin)
-* Remove warning about ESLint being in Alpha (Nick Fisher)
-* Adds `space-after-keywords` rule (fixes #807) (Nick Fisher)
-* Rule: no-lonely-if (fixes #790) (Brandon Mills)
-* Add ignore comments in file (fixes #305) (Aliaksei Shytkin)
-* 0.5.1 (Nicholas C. Zakas)
-* Change: no-unused-vars default to 'all' (fixes #760) (Nicholas C. Zakas)
-
-v0.5.1 - April 17, 2014
-
-* 0.5.1 (Nicholas C. Zakas)
-* Fix general config not to be modified by comment config in files (fixes #806) (Aliaksei Shytkin)
-* SVG badges (Ryuichi Okumura)
-* fixes #804: clean up implementation of #803 (which fixed #781) (Michael Ficarra)
-* Build: Fix perf test to take median of three runs (fixes #781) (Nicholas C. Zakas)
-* Fix: --reset will now properly ignore default rules in environments.json (fixes #800) (Nicholas C. Zakas)
-* Docs: Updated contributor guidelines (Nicholas C. Zakas)
-* Added Mocha global variables for TDD style. Fixes #793. (Golo Roden)
-* Rule: no-sequences (fixes #561) (Brandon Mills)
-* Change .eslintingore to plain text (fixes #761) (Brandon Mills)
-* Change 'no-spaced-func' message (fixes #762) (Aliaksei Shytkin)
-* Rule 'block-scoped-var' works correct when object inits (fixes #783) (Aliaksei Shytkin)
-* Build: Always build docs site on top of origin/master (Nicholas C. Zakas)
-* 0.5.0 (Nicholas C. Zakas)
-
-v0.5.0 - April 10, 2014
-
-* 0.5.0 (Nicholas C. Zakas)
-* Build: Bump perf limit so Travis won't fail every time (fixes #780) (Nicholas C. Zakas)
-* Add tests to cover 100% of eslint.js (Aliaksei Shytkin)
-* Fix: Make sure no-path-concat doesn't flag non-concat operations (fixes #776) (Nicholas C. Zakas)
-* Rule 'no-unused-var' in functional expression with identifier (fixes #775) (Aliaksei Shytkin)
-* Rule: valid-typeof (Ian Christian Myers)
-* Add global cli flag (ref #692) (Brandon Mills)
-* update to latest Optionator (George Zahariev)
-* Add options for rule 'no-unused-vars' to check all arguments in functions (fixes #728) (Aliaksei Shytkin)
-* Fix: Cleanup package.json (Nicholas C. Zakas)
-* New: Experimental support for CSS Auron (fixes #765) (Nicholas C. Zakas)
-* Lint tests on build (fixes #764) (Aliaksei Shytkin)
-* Rule block-scoped-var works correct with object properties (fixes #755) (Aliaksei Shytkin)
-* Breaking: implement eslint-env and remove jshint/jslint environment comment support (fixes #759) (Aliaksei Shytkin)
-* readme: npm i -> npm install (Linus Unnebäck)
-* Add env flag to cli options summary (fixes #752) (Brandon Mills)
-* Fix: Give the perf test a better calculated budget (fixes #749) (Nicholas C. Zakas)
-* give the `env` flag type `[String]`, improve code (fixes #748) (George Zahariev)
-* fixes #735: add new, more efficient getTokens interfaces (Michael Ficarra)
-* Add --env cli flag (ref #692) (Brandon Mills)
-* Fixes #740 - Make sure callbacks exist before marking them as 'handled'. (mstuart)
-* fixes #743: wrap-regex rule warns on regex used in dynamic member access (Michael Ficarra)
-* replace tab indents with 4 spaces in lib/rules/handle-callback-err.js (Michael Ficarra)
-* Adding homepage and bugs links to package.json (Peter deHaan)
-* JSDoc for rules (Anton Rudeshko)
-* 0.4.5 (Nicholas C. Zakas)
-
-v0.4.5 - March 29, 2014
-
-* 0.4.5 (Nicholas C. Zakas)
-* Build: Add perf check into Travis build to better monitor performance regressions (fixes #732) (Nicholas C. Zakas)
-* Fix: Make sure semi reports correct location of missing semicolon (fixes #726) (Nicholas C. Zakas)
-* Add --no-eslintrc cli flag (ref #717) (Brandon Mills)
-* Fix #716 crash with reset flag (Brandon Mills)
-* Fixed JSON formatting and highlighting (Anton Rudeshko (Tesla))
-* fixes #723: block-scoped-var throws on unnamed function expression (Michael Ficarra)
-* Fix: Make stroustrup brace-style closing message make sense (fixes #719) (Nicholas C. Zakas)
-* no-comma-dangle reports correct line number (Andrey Popp)
-* Upgrade: Esprima to 1.1.1 and EScope to 1.0.1 (fixes #718) (Nicholas C. Zakas)
-* Add reset cli flag (refs #692) (Brandon Mills)
-* Relax eqeqeq null check (fixes #669) (Brandon Mills)
-* 0.4.4 (Nicholas C. Zakas)
-* New Rule: handle-callback-err (fixes #567) (Jamund Ferguson)
-
-v0.4.4 - March 25, 2014
-
-* 0.4.4 (Nicholas C. Zakas)
-* Fix no-used-vars to report FunctionExpression params (fixes #697). (Andrey Popp)
-* fixes #711: eslint reports wrong line number for files with shebang (Michael Ficarra)
-* Fix for no-unused-vars and MemberExpression (Andrey Popp)
-* added no-warning-comments rule (Alexander Schmidt)
-* fixes #699: brace-style does not check function expressions (Michael Ficarra)
-* rewrite block-scoped-var (Michael Ficarra)
-* recommend using hasOwnProperty from Object.prototype in guard-for-in docs (Michael Ficarra)
-* change conf/environments.json spacing to be simpler and more consistent (Michael Ficarra)
-* Update API to use context.getFilename() instead of .filename. (Loren Segal)
-* Small changes, JSDoc is clarified (Aliaksei Shytkin)
-* Move FileFinder to separate file (Aliaksei Shytkin)
-* Cache if file is not found (Aliaksei Shytkin)
-* Use cache on config files seach (Aliaksei Shytkin)
-* Added .eslintignore to load from parents folders (fixes #681) (Aliaksei Shytkin)
-* fix 'node-modules' typo in docs (Fred K. Schott)
-* Upgrade to the latest version of doctrine. (Brian Di Palma)
-* Document optional filename and default it to `input`. (Loren Segal)
-* Fix: Compatibility for Node 0.8 (Nicholas C. Zakas)
-* Update: Makefile.js now uses shelljs-nodecli (Nicholas C. Zakas)
-* #681 apply all .eslintignore exclusions (Aliaksei Shytkin)
-* Add RuleContext.filename property (for eslint/eslint#468). (Loren Segal)
-* 0.4.3 (Nicholas C. Zakas)
-
-v0.4.3 - March 18, 2014
-
-* 0.4.3 (Nicholas C. Zakas)
-* fixes #682: rewrite no-constant-condition rule (Michael Ficarra)
-* Fixes #673 allow configuration of @return errors via requireReturn - (fixes #673) (Brian Di Palma)
-* Tweaking inline code formatting for "if, while, dowhile" (Peter deHaan)
-* Fixes #677 getJSDocComment() should not search beyond FunctionExpression or FunctionDeclaration parent nodes. (Brian Di Palma)
-* Relaxed enforcement of camelcase rule (Ian Christian Myers)
-* Fixing issue #675. Incorrect triggering of no-else-return rule. (Brian Di Palma)
-* Added style option for wrap-iife (Mathias Schreck)
-* Fix: Issues with named function expressions in no-unused-vars and no-shadow (fixes #662) (Nicholas C. Zakas)
-* Update: camelcase rule now doesn't flag function calls (fixes #656) (Nicholas C. Zakas)
-* Updating documentation description for: no-space-before-semi rule, changing rules to exempt strings with semicolons and test for that condition. Fixes #629. (Jonathan Kingston)
-* Adding in rule no-space-before-semi to prevent spaces before semicolons. fixes #629 (Jonathan Kingston)
-* show NPM version (Paul Verest)
-* adapt code formatting (Mathias Schreck)
-* Added a TextMate 2 integration to the docs (Nate Silva)
-* 0.4.2 (Nicholas C. Zakas)
-
-v0.4.2 - March 3, 2014
-
-* 0.4.2 (Nicholas C. Zakas)
-* fixes #651: disable no-catch-shadow rule in node environment (Michael Ficarra)
-* Fixed context.report message parsing (Ian Christian Myers)
-* fixe #648: wrap-iife rule should actually check that IIFEs are wrapped (Michael Ficarra)
-* Added "stroustrup" option for brace-style (Ian Christian Myers)
-* 0.4.1 (Nicholas C. Zakas)
-
-v0.4.1 - February 27, 2014
-
-* 0.4.1 (Nicholas C. Zakas)
-* Created space-in-brackets rule (Ian Christian Myers)
-* Update: Allow valid-jsdoc to specify replacement tags (fixes #637) (Nicholas C. Zakas)
-* Fix: Ensure getJSDocComment() works for all function declarations (fixes #638) (Nicholas C. Zakas)
-* Added broccoli-eslint to integration docs (Christian)
-* fixes #634: getters/setters shouldn't trigger no-dupe-keys (Michael Ficarra)
-* Update: semi to also enforce not using semicolons (fixes #618) (Nicholas C. Zakas)
-* New Rule: no-constant-condition  - removed SwitchStatement discriminant check  - removed AssignmentExpression with right Identifier  - fixed copy paste error  - added DoWhileStatement, ForStatement based on discussion: https://github.com/eslint/eslint/pull/624 (fixes #621) (Christian)
-* New Rule: no-constant-condition (fixes #621) (Christian)
-* Adding mimosa-eslint to Build System list (dbashford)
-* Fix: Make sure semi flags return statements without a semicolon (fixes #616) (Nicholas C. Zakas)
-* Fix: stylish formatter blue text -> white text (fixes #607) (Nicholas C. Zakas)
-* Fix: radix rule should warn (not throw error) when parseInt() is called without arguments (fixes #611) (Nicholas C. Zakas)
-* Update README.md (Dmitry)
-* Adding JSDoc comments for TAP format helper functions (Jonathan Kingston)
-* Updating documentation to include TAP format option (Jonathan Kingston)
-* Fixing validation issues to TAP formatter (Jonathan Kingston)
-* Adding TAP formatter and basic tests (Jonathan Kingston)
-* Docs: Updated integrations page (Nicholas C. Zakas)
-* 0.4.0 (Nicholas C. Zakas)
-
-v0.4.0 - February 12, 2014
-
-* 0.4.0 (Nicholas C. Zakas)
-* Change: Switch :after to :exit (fixes #605) (Nicholas C. Zakas)
-* Fix: Make sure no-unused-vars doesn't get confused by nested functions (fixes #584) (Nicholas C. Zakas)
-* Update: .eslintrc to check more things (Nicholas C. Zakas)
-* Fix: Make sure JSDoc parser accepts JSDoc3-style optional parameters (Nicholas C. Zakas)
-* Docs: Update documentation with linking instructions for ESLintTester (Nicholas C. Zakas)
-* New Rule: valid-jsdoc (fixes #536) (Nicholas C. Zakas)
-* #595 improved func-names documentation (Kyle Nunery)
-* #595 added more func-names tests (Kyle Nunery)
-* #595 fix rule message and add more tests (Kyle Nunery)
-* use optionator for option parsing, not optimist (George Zahariev)
-* Include instructions for working with ESLintTester (Nicholas C. Zakas)
-* #595 remove needless 'function Foo() {}' in tests (Kyle Nunery)
-* #595 fix whitespace (Kyle Nunery)
-* #595 fix markdown for js code blocks (Kyle Nunery)
-* Adding information about Yeomen generator (Ilya Volodin)
-* #595 add docs for rule func-names (Kyle Nunery)
-* #595 add func-names rule (Kyle Nunery)
-* migrate variables array to map (Brandon Mills)
-* Perf: Move try-catch out of verify() function to allow V8 optimization (refs #574) (Nicholas C. Zakas)
-* Docs: Added instructions for running npm run profile (Nicholas C. Zakas)
-* refactor variable name lookup into a separate function (Brandon Mills)
-* optimize findVariable() in no-unused-vars (Brandon Mills)
-* move to tests/bench (Chris Dickinson)
-* add `npm run profile`. (Chris Dickinson)
-* #586 refactor based on https://github.com/eslint/eslint/pull/590#discussion_r9476367 (Christian)
-* #586 added no-unreachable jsdoc, documentation note on hoisting case (Christian)
-* #586 add hoisting check to no-unreachable (Christian)
-* readme: Remove stray asterisk (Timo Tijhof)
-* #580 Remove eslint.getAllComments(), related docs, related tests (Christian)
-* Added test for bug fix #582. Test Passes (Shmueli Englard)
-* Added curly braces to if statment (Shmueli Englard)
-* Added new test for fix to #582 (fixes 582) (Shmueli Englard)
-* Bug #582: Added check if node.value isn't a string just exit (Shmueli Englard)
-* Update Rule: implement curly options for single-statement bodies (fixes #511) (Nicholas C. Zakas)
-* New Rule: no-extra-boolean-cast (fixes #557) (Brandon Mills)
-* New Rule: no-sparse-arrays (fixes #499) (Nicholas C. Zakas)
-* Fix: no-spaced-func is now an error (Nicholas C. Zakas)
-* New Rule: no-process-exit (fixes #568) (Nicholas C. Zakas)
-* New Rule: no-labels (fixes #550) (Nicholas C. Zakas)
-* New Rule: no-lone-blocks (fixes #512) (Brandon Mills)
-* Added Emacs/Flycheck integration (Nikolai Prokoschenko)
-* Build: Add perf test (Nicholas C. Zakas)
-* Fix: no-cond-assign shouldn't throw error when there's a for loop with an empty conditional (fixes #53) (Nicholas C. Zakas)
-* Docs: Add docs for no-regex-spaces and all doc errors now break build (closes #562) (Nicholas C. Zakas)
-* Rename: regex-spaces to no-regex-spaces (Nicholas C. Zakas)
-* Docs: Add docs for no-underscore-dangle (refs #562) (Nicholas C. Zakas)
-* Docs: Add docs for no-undef-init (refs #562) (Nicholas C. Zakas)
-* Docs: Add docs for no-return-assign (refs #562) (Nicholas C. Zakas)
-* Fix: Misspelling in no-return-assign message (Nicholas C. Zakas)
-* Docs: Add docs for no-new-wrappers (refs #562) (Nicholas C. Zakas)
-* Docs: Add docs for no-new-object (refs #562) (Nicholas C. Zakas)
-* Docs: Add docs for no-implied-eval (refs #562) (Nicholas C. Zakas)
-* Docs: Updated documentation for developing rules (Nicholas C. Zakas)
-* Testing: Move ESLintTester to be external dependency (fixes #480) (Nicholas C. Zakas)
-* Docs: Add list of known integrations (Nicholas C. Zakas)
-* Fix #570 (dmp42)
-* document no-array-constructor rule (Michael Ficarra)
-* fixes #500: no-array-constructor should not flag 1-argument construction (Michael Ficarra)
-* fixes #501: no-array-constructor recognises CallExpression form (Michael Ficarra)
-* rename no-new-array rule to no-array-constructor; ref #501 (Michael Ficarra)
-* Fix: Make radix rule warn on invalid second parameter (fixes #563) (Nicholas C. Zakas)
-* Docs: Added no-floating-decimal docs (refs #562) (Nicholas C. Zakas)
-* New Rule: no-path-concat (fixes #540) (Nicholas C. Zakas)
-* Docs: Add some missing rule docs (refs #562) (Nicholas C. Zakas)
-* Fix: CLI should not output anything when there are no warnings (fixes #558) (Nicholas C. Zakas)
-* New Rule: no-yoda (fixes #504) (Nicholas C. Zakas)
-* New Rule: consistent-return (fixes #481) (Nicholas C. Zakas)
-* Rewrite configuration documentation to include information about globals (fixes #555) (Nicholas C. Zakas)
-* Allow YAML configuration files (fixes #491) (Nicholas C. Zakas)
-* 0.3.0 (Nicholas C. Zakas)
-
-v0.3.0 - January 20, 2014
-
-* 0.3.0 (Nicholas C. Zakas)
-* Config: Allow comments in JSON configuration files (fixes #492) (Nicholas C. Zakas)
-* Bug: max-len fix to report correct line number (fixes #552) (Nicholas C. Zakas)
-* Build: Use browserify to create browser-ready ESLint (fixes #119) (Nicholas C. Zakas)
-* Docs: Ensure all rules have entry on top-level rules index page (Nicholas C. Zakas)
-* Docs: Add docs for no-fallthrough rule (Nicholas C. Zakas)
-* Update README.md (Peter deHaan)
-* Update README.md (Peter deHaan)
-* Update package.json (Peter deHaan)
-* Docs: Added documentation for semi rule (Nicholas C. Zakas)
-* Build: Reset branch coverage target (Nicholas C. Zakas)
-* Update build system to generate eslint.org during release (Nicholas C. Zakas)
-* Updated setup doc (Nicholas C. Zakas)
-* Fix #525 & #528 (Mangled Deutz)
-* Improve no-negated-in-lhs description (David Bruant)
-* Fixing typo (David Bruant)
-* Update no-new.md (Tamas Fodor)
-* Update no-extra-semi.md (Tamas Fodor)
-* Fixing broken links in documentation (Ilya Volodin)
-* Update about page (Nicholas C. Zakas)
-* Site generation build step and documentation updates to support it (fixes #478) (Nicholas C. Zakas)
-* Change message for brace-style rule (fixes #490) (Nicholas C. Zakas)
-* Add question about ES6 support to FAQ (fixes #530) (Nicholas C. Zakas)
-* Set unlimited number of listeners for event emitter (fixes #524) (Nicholas C. Zakas)
-* Add support for comment events (fixes #531) Add :after events for comments (Nicholas C. Zakas)
-* Add :after events for comments (Nicholas C. Zakas)
-* Allow config files to have any name (fixes #486). (Aparajita Fishman)
-* List available formatters (fixes #533). (Aparajita Fishman)
-* Add support for comment events (fixes #531) (Nicholas C. Zakas)
-* Add Stylish formatter and make it default. Fixes #517 (Sindre Sorhus)
-* Fix missing code exit (Mangled Deutz)
-* Added unit test for calling Config.getConfig with no arguments. (Aparajita Fishman)
-* Typo (Mangled Deutz)
-* Fixed docs typo (Nicholas C. Zakas)
-* Mark functions as used when any method is called on them (Nicholas C. Zakas)
-* Fixed: Config.getConfig is called either with a file path or with no args (fixes #520) (Aparajita Fishman)
-* Fix minor bug in no-empty rule (Nicholas C. Zakas)
-* add more info for failure messages (Nicholas C. Zakas)
-* Add ruleId to all formatters output (fixes #472) (Nicholas C. Zakas)
-* Remove unused code (Nicholas C. Zakas)
-* Correctly handle case with both finally and catch in no-empty (Nicholas C. Zakas)
-* Update documentation for no-unused-vars (Nicholas C. Zakas)
-* Ensure that bound function expressions are reported as being used (fixes #510) (Nicholas C. Zakas)
-* Allow empty catch/finally blocks (fixes #514) and update documentation (fixes #513) (Nicholas C. Zakas)
-* Updated contribution guidelines (Nicholas C. Zakas)
-* Add default setting for no-cond-assign (Nicholas C. Zakas)
-* Add build step to check rule consistency (Nicholas C. Zakas)
-* update docs: explicit cli args are exempt from eslintignore exclusions (Michael Ficarra)
-* fixes #505: no-cond-assign should ignore doubly parenthesised tests (Michael Ficarra)
-* Renamed unnecessary-strict to no-extra-strict (Nicholas C. Zakas)
-* Fixed missing documentation links (Nicholas C. Zakas)
-* Add build task to check for missing docs and tests for rules (Nicholas C. Zakas)
-* Slight reorganization of rule groups (Nicholas C. Zakas)
-* Added one-var and sorted some rules (Nicholas C. Zakas)
-* Updated Travis badge for new location (Nicholas C. Zakas)
-* fixes #494: allow shebangs in processed JS files (Michael Ficarra)
-* fixes #496: lint ignored files when explicitly specified via the CLI (Michael Ficarra)
-* More tests (Ilya Volodin)
-* Upgrade Istanbul (Ilya Volodin)
-* fixes #495: holey arrays cause no-comma-dangle rule to throw (Michael Ficarra)
-* Documentation and minor changes (Ilya Volodin)
-* Adding missing package registration (Ilya Volodin)
-* Adding support for .eslintignore and .jshintignore (Closes #484) (Ilya Volodin)
-* fixes #482: brace-style bug with multiline conditions (Michael Ficarra)
-* Switching Travis to use ESLint (Closes #462) (Ilya Volodin)
-* 0.2.0 (Nicholas C. Zakas)
-
-v0.2.0 - January 1, 2014
-
-* 0.2.0 (Nicholas C. Zakas)
-* Bump code coverage checks (Nicholas C. Zakas)
-* Take care of unreachable code in case statement (Nicholas C. Zakas)
-* Updated rule messaging and added extra tests (Nicholas C. Zakas)
-* Fixing eslint errors and unittests (Ilya Volodin)
-* Rule: max-nested-callbacks (Ian Christian Myers)
-* Fix fall-through rule with nested switch statements (fixes #430) (Nicholas C. Zakas)
-* Fixed trailing comma (Nicholas C. Zakas)
-* Added more tests for func-style (Nicholas C. Zakas)
-* Fixed documentation for func-style (Nicholas C. Zakas)
-* Fixed linting error (Nicholas C. Zakas)
-* Rule to enforce function style (fixes #460) (Nicholas C. Zakas)
-* Rule is off by default. Updated documentation (Ilya Volodin)
-* Rule: sort variables. Closes #457 (Ilya Volodin)
-* Update architecture.md (Nicholas C. Zakas)
-* Change quotes option to avoid-escapes and update docs (fixes #199) (Brandon Payton)
-* Add allow-avoiding-escaped-quotes option to quotes rule (fixes #199) (Brandon Payton)
-* Update no-empty-class.md (Nicholas C. Zakas)
-* Updated titles on all rule documentation (fixes #348) (Nicholas C. Zakas)
-* Fixing eslint errors in codebase (Ilya Volodin)
-* fixes #464: space-infix-ops checks for VariableDeclarator init spacing (Michael Ficarra)
-* Add options to no-unused-vars. Fixes #367 (Ilya Volodin)
-* rename escape function to xmlEscape in checkstyle formatter (Michael Ficarra)
-* The semi rule now reports correct line number (Ian Christian Myers)
-* context.report now takes optional location (Ian Christian Myers)
-* fixes #454: escape values for XML in checkstyle formatter (Michael Ficarra)
-* Add color to Mocha test reporting (Ian Christian Myers)
-* Rule no-nested-ternary (Ian Christian Myers)
-* Fixing no-unused-var and no-redeclare (Ilya Volodin)
-* fixes #449: no-mixed-requires throws TypeError when grouping is enabled (Michael Ficarra)
-* Fixed reported line number for trailing comma error (Ian Christian Myers)
-* Update doc title for quote (Matthew DuVall)
-* fixes #446: join paths without additional delimiters (Michael Ficarra)
-* docs: add documentation for quotes rule (Matthew DuVall)
-* minor style changes to lib/rules/space-infix-ops.js as requested in #444 (Michael Ficarra)
-* remove "function invalid(){ return D }" from some tests (Michael Ficarra)
-* fixes #429: require spaces around infix operators; enabled by default (Michael Ficarra)
-* simplify fix for #442 (Michael Ficarra)
-* Fix broken test, ensure tests get run before a release is pushed (Nicholas C. Zakas)
-* 0.1.4 (Nicholas C. Zakas)
-
-v0.1.4 - December 5, 2013
-
-* 0.1.4 (Nicholas C. Zakas)
-* Add release scripts to package.json (Nicholas C. Zakas)
-* Fixed release error in Makefile (Nicholas C. Zakas)
-* Fix JSHint warnings (Nicholas C. Zakas)
-* Make sure 'default' isn't flagged by no-space-returns-throw rule (fixes #442) (Nicholas C. Zakas)
-* Fixing documentation (Ilya Volodin)
-* Fixing disabling rules with invalid comments Closes #435 (Ilya Volodin)
-* improve assertion on wrong number of errors (Christoph Neuroth)
-* fixes #431: no-unused-expressions should not flag statement level void (Michael Ficarra)
-* fixes #437: fragile no-extend-native rule (Michael Ficarra)
-* change space-* rule documentation headers to be more descriptive (Michael Ficarra)
-* Moved to tabs, added comments, a few more tests (Jamund Ferguson)
-* split GH-332 rule into space-unary-word-ops and space-return-throw-case (Michael Ficarra)
-* fixes #346: validate strings passed to the RegExp constructor (Michael Ficarra)
-* change some documentation extensions from js to md (Michael Ficarra)
-* fixes #332: unary word operators must be followed by whitespace (Michael Ficarra)
-* Add some docs (Jamund Ferguson)
-* DRYing cli tests and improving code coverage (Ilya Volodin)
-* fixes #371: add no-shadow-restricted-names rule (Michael Ficarra)
-* Added Support for Object.defineProperty() checking (Jamund Ferguson)
-* fixes #333: add rule to disallow gratuitously parenthesised expressions (Michael Ficarra)
-* improve rule test coverage (Michael Ficarra)
-* No Extend Native (Jamund Ferguson)
-* change getTokens 2nd/3rd arguments to count tokens, not characters (Michael Ficarra)
-* fixes #416: no-fallthrough flagging last case + reporting wrong line num (Michael Ficarra)
-* fixes #415: fix unnecessary-strict rule false positives (Michael Ficarra)
-* Add missing dependency (Nicholas C. Zakas)
-* Update docs related to running unit tests (Nicholas C. Zakas)
-* Add JSHint as missing dependency (Nicholas C. Zakas)
-* Switch to using ShellJS makefile (fixes #418) (Nicholas C. Zakas)
-* Updated documentation to reflect test changes (refs #417) (Nicholas C. Zakas)
-* Change to eslintTester.addRuleTest (fixes #417) (Nicholas C. Zakas)
-* Fix false positives for no-script-url (fixes #400) (Nicholas C. Zakas)
-* Fix lint warning (Nicholas C. Zakas)
-* Fixing ESLint warnings, introducing Makefile.js (not yet wired in) (Nicholas C. Zakas)
-* fixes #384: include builtin module list to avoid repl dependency (Michael Ficarra)
-* 0.1.3 (Nicholas C. Zakas)
-
-v0.1.3 - November 25, 2013
-
-* 0.1.3 (Nicholas C. Zakas)
-* Updated changelog (Nicholas C. Zakas)
-* Vows is gone. Mocha is now default (Ilya Volodin)
-* fixes #412: remove last remaining false positives in no-spaced-func (Michael Ficarra)
-* fixes #407: no-spaced-func rule flagging non-argument-list spaced parens (Michael Ficarra)
-* Add no-extra-semi to configuration (fixes #386) (Nicholas C. Zakas)
-* Converting formatter tests and core (Ilya Volodin)
-* Don't output anything when there are no errors in compact formatter (fixes #408) (Nicholas C. Zakas)
-* Removing Node 0.11 test - it fails all the time (Nicholas C. Zakas)
-* Completing conversion of rule's tests to mocha (Ilya Volodin)
-* added mocha conversion tests for strict, quote-props and one-var; enhanced one of the invalid one-var tests that was expecting two messages (Michael Paulukonis)
-
-
-v0.1.2 - November 23, 2013
-
-* 0.1.2 (Nicholas C. Zakas)
-* added mocha tests for radix and quotes; fixed some of the internals on quotes from vows annotations (Michael Paulukonis)
-* added tests for regex-spaces, strict, unnecessary-strict; fixed some types in overview/author notes in other tests. (Michael Paulukonis)
-* Converting unittests to mocha (Ilya Volodin)
-* mocha conversions of tests for 'use-isnan' and 'wrap-iife' (Michael Paulukonis)
-* added mocha tests semi.js and wrap-regex.js (Michael Paulukonis)
-* Converting more tests to mocha (Ilya Volodin)
-* Update CONTRIBUTING.md (Nicholas C. Zakas)
-* Cleaning up eslintTester (Ilya Volodin)
-* DRYing unittests and converting them to mocha (Ilya Volodin)
-* Reformatted Gruntfile (Nicholas C. Zakas)
-* Add tests to config load order: base, env, user. (icebox)
-* Fixing indent in gruntfile (Ilya Volodin)
-* Removing jake, adding Grunt, Travis now runs grunt (Ilya Volodin)
-* Add rules per environments to config. (icebox)
-* Add globals property to the environments. (icebox)
-* Fix error about IIFE if the function is in a new (Marsup)
-* Fix a broken link in the docs (Brian J Brennan)
-* Add test coverage for additional cases, fix open paren at beginning of expr (Matthew DuVall)
-* Fixing no-undef for eval use case (Ilya Volodin)
-* fixes #372: disallow negated left operand in `in` operator (Michael Ficarra)
-* Fixing no-self-compare rule to check for operator (Ilya Volodin)
-* bug: open parens in args causes no-spaced-func to trigger (Matthew DuVall)
-* fixes #369: restrict UnaryExpressions to delete in no-unused-expressions (Michael Ficarra)
-* Make sure delete operator isn't flagged as unused expression (fixes #364) (Nicholas C. Zakas)
-* Don't flag ++ or -- as unused expressions (fixes #366) (Nicholas C. Zakas)
-* Ensure that 'use strict' isn't flagged as an unused expression (fixes #361) (Nicholas C. Zakas)
-* Increase test coverage for strict-related rules (refs #361) (Nicholas C. Zakas)
-* Up code coverage numbers (Nicholas C. Zakas)
-* Fixes error in new-cap rule when 'new' is used without a constructor (fixes #360) (Nicholas C. Zakas)
-* added files array in package json (Christian)
-* removed unused jshint dependency (Christian)
-* Add test coverage for new Foo constructor usage (Matt DuVall)
-* Pull code coverage up by removing unused method (Matt DuVall)
-* recognise CallExpression variant of RegExp ctor in no-control-regex rule (Michael Ficarra)
-* Merge smart-eqeqeq into eqeqeq (Matt DuVall)
-* Catch additional cases for a.b, new F, iife (Matt DuVall)
-* 0.2.0-dev (Nicholas C. Zakas)
-* Version 0.1.0 (Nicholas C. Zakas)
-* rule: no-spaced-func disallow spaces between function identifier and application (Matt DuVall)
-
-v0.1.1 - November 09, 2013
-
-* Ensure mergeConfigs() doesn't thrown an error when keys are missing in base config (fixes #358) (Nicholas C. Zakas)
-
-v0.1.0 - November 03, 2013
-
-* Version 0.1.0 (Nicholas C. Zakas)
-* Updated Readme for v0.1.0 (Nicholas C. Zakas)
-* Bump code coverage verification to 95% across the board (Nicholas C. Zakas)
-* Fixed broken links (Nicholas C. Zakas)
-* Added information about runtime rules (Nicholas C. Zakas)
-* Added documentation about configuration files (Nicholas C. Zakas)
-* Added description of -v option (Nicholas C. Zakas)
-* Updated architecture documentation (Nicholas C. Zakas)
-* Fix bug in no-control-regex (fixes #347) (Nicholas C. Zakas)
-* Fix link to architecture doc in readme (azu)
-* Rule: No control characters in regular expressions (fixes #338) (Nicholas C. Zakas)
-* Add escaping \= test (Matt DuVall)
-* Add docs for rule (Matt DuVall)
-* rule: no-div-regex for catching ambiguous division operators in regexes (Matt DuVall)
-* Change context-var to block-scoped-var (Matt DuVall)
-* Implement config.globals (Oleg Grenrus)
-* Add 'config-declared global' test (Oleg Grenrus)
-* Adding ability to separate rules with comma (Ilya Volodin)
-* Added rule for missing 'use strict' (fixes #321) (Nicholas C. Zakas)
-* Fixing unittests and finishing code (Ilya Volodin)
-* Disabling/enabling rules through comments (Ilya Volodin)
-* Rename rule to context-var and add documentation (Matt DuVall)
-* Added link to no-global-strict doc in readme (Nicholas C. Zakas)
-* Add try-catch scoping with tests (Matt DuVall)
-* Fix linting error (Matt DuVall)
-* Store FunctionDeclarations in scope as they can be used as literals (Matt DuVall)
-* Fix to use getTokens and add test for MemberExpression usage (Matt DuVall)
-* rule: block-scope-var to check for variables declared in block-scope (Matt DuVall)
-* no-unused-expressions rule: add test and doc mention for `a && b()` (Michael Ficarra)
-* rule: wrap-regex for parens around regular expression literals (Matt DuVall)
-* fixes #308: implement no-unused-expressions rule; ref. jshint rule W030 (Michael Ficarra)
-* Updated change log script to filter out merge messages (Nicholas C. Zakas)
-* Updated changelog (Nicholas C. Zakas)
-* 0.1.0-dev (Nicholas C. Zakas)
-
-v0.0.9 - October 5, 2013
-
-* Version 0.0.9 release (Nicholas C. Zakas)
-* Added rule for no global strict mode (fixes #322) (Nicholas C. Zakas)
-* Change default on to be errors instead of warnings (fixes #326) (Nicholas C. Zakas)
-* Fixed bug where JSHint was using the wrong file in lint task (Nicholas C. Zakas)
-* Updated docs for no-unused vars rule. (Andrew de Andrade)
-* Removed console.log in tests. (Andrew de Andrade)
-* Added link to roadmap and JSHint feature parity list. (Andrew de Andrade)
-* Fixed warning when unused var declared as param in FunctionExpression/Declaration can be ignored because later param is used (Andrew de Andrade)
-* Rename test for smartereqeqeq.js to smarter-eqeqeq.js (Andrew de Andrade)
-* Keep test filename inline with rule name (Andrew de Andrade)
-* Added further instructions for multiline test cases. (Andrew de Andrade)
-* Protecting private method (Seth McLaughlin)
-* Updating look up algorithm for local config files (Seth McLaughlin)
-* Fixing ESLint errors (Ilya Volodin)
-* Implemented local default config file (Seth McLaughlin)
-* Upgrading escope version and fixing related bugs (Ilya Volodin)
-* Fixing assignment during initialization issue (Ilya Volodin)
-* add plain-English regexp description to no-empty-class rule (Michael Ficarra)
-* fixes #289: no-empty-class flags regexps with... flags (Michael Ficarra)
-* Rule: no-catch-shadow (Ian Christian Myers)
-* Update no-empty for compatibility with esprima@1.0.4 (fixes #290) (Mark Macdonald)
-* Fixing bug with _ in MemberExpression (Ilya Volodin)
-* Rule: no-func-assign (Ian Christian Myers)
-* Fix false warning from no-undef rule (fixes #283) (Mark Macdonald)
-* Adding eslint to jake (Ilya Volodin)
-* Rule no redeclare (Ilya Volodin)
-* Fixing no use before define issues (Ilya Volodin)
-* Rule: no-octal-escape (Ian Christian Myers)
-* Fix for `no-proto` and `no-iterator` false positive (Ian Christian Myers)
-* Rule: no-iterator (Ian Christian Myers)
-* Fixing type in guard-for-in documentation (Ilya Volodin)
-* Rule No use before define (Ilya Volodin)
-* Added documentation for the `no-new` rule (Ian Christian Myers)
-* Added documentation for the `no-eval` rule (Ian Christian Myers)
-* Added documentation for the `no-caller` rule (Ian Christian Myers)
-* Added documentation for the `no-bitwise` rule (Ian Christian Myers)
-* simplify no-empty-class rule (Michael Ficarra)
-* Fix `no-empty-class` false negatives (Ian Christian Myers)
-* Added documentation for the `no-alert` rule (Ian Christian Myers)
-* Added documentation for the `new-parens` rule (Ian Christian Myers)
-* Added documentation for the `max-params` rule (Ian Christian Myers)
-* Added documentation for `max-len` rule (Ian Christian Myers)
-* Created link from rules README.md to no-plusplus.md documentation (Ian Christian Myers)
-* Added documentation for `guard-for-in` rule (Ian Christian Myers)
-* Added documentation for `dot-notation` rule (Ian Christian Myers)
-* Added documentation for `curly` rule (Ian Christian Myers)
-* Updated `camelcase` rule documentation (Ian Christian Myers)
-* Added documentation for `complexity` rule (Ian Christian Myers)
-* Changed `no-dangle` documentation to `no-comma-dangle` (Ian Christian Myers)
-* Rule: no-empty-class (Ian Christian Myers)
-* Increased test coverage for max-depth (Ian Christian Myers)
-* Increased test coverage for no-shadow (Ian Christian Myers)
-* Increased test coverage on no-mixed-requires (Ian Christian Myers)
-* Added docs for eqeqeq and no-with (fixes #262) (Raphael Pigulla)
-* Create camelcase.md (Micah Eschbacher)
-* Fix issues with function in no-unused-vars (Ilya Volodin)
-* Rule: No shadow (Ilya Volodin)
-* fixes #252: semi rule errors on VariableDeclarations in ForInStatements (Michael Ficarra)
-* rule: max-len to lint maximum length of a line (Matt DuVall)
-* Fixes #249 (Raphael Pigulla)
-* Merge branch 'master' of https://github.com/beardtwizzle/eslint (Jonathan Mahoney)
-* Re-add lines that were accidentally deleted from config (Jonathan Mahoney)
-* Add support for pre-defined environment globals (re: #228) (Jonathan Mahoney)
-* Rule: no-else-return (Ian Christian Myers)
-* Re-add lines that were accidentally deleted from config (Jonathan Mahoney)
-* Add support for pre-defined environment globals (re: #228) (Jonathan Mahoney)
-* Fix no-unused-vars to report correct line numbers (Ilya Volodin)
-* Rule: no proto (Ilya Volodin)
-* Rule: No Script URL (Ilya Volodin)
-* Rule: max-depth (Ian Christian Myers)
-* Fix: Error severity for rules with options. (Ian Christian Myers)
-* Rule: No wrap func (Ilya Volodin)
-* bug: Fixes semi rule for VariableDeclaration in ForStatement (Matt DuVall)
-* Individual perf tests for rules (Ilya Volodin)
-* Fix loading rules from a rules directory (Ian Christian Myers)
-* Rule no-mixed-requires (fixes #221) (Raphael Pigulla)
-* bug: Add ForStatement for no-cond-assign check (Matthew DuVall)
-* JSLint XML formatter now escapes special characters in the evidence and reason attributes. (Ian Christian Myers)
-* Formatter: JSLint XML (Ian Christian Myers)
-* Refactored `max-statements` rule. (Ian Christian Myers)
-* Fix tests broken due to new rule message text (James Allardice)
-* Merge branch 'master' into match-jshint-messages (James Allardice)
-* Refactored `one-var` rule. (Ian Christian Myers)
-* split eslint.define into eslint.defineRule and eslint.defineRules (Michael Ficarra)
-* Removed unnecessary rules.js test. (Ian Christian Myers)
-* Rule: one-var (Ian Christian Myers)
-* Rule: No unused variables (Ilya Volodin)
-* expose interface for defining new rules at runtime without fs access (Michael Ficarra)
-* disallow 00 in no-octal rule (Michael Ficarra)
-* Increased test coverage for `lib/cli.js`. (Ian Christian Myers)
-* Increased test coverage for `lib/rules.js` (Ian Christian Myers)
-* Increased test coverage for jUnit formatter. (Ian Christian Myers)
-* scripts/bundle: output bundle+map to /build directory (Michael Ficarra)
-* add test for 0X... hex literals in no-octal tests (Michael Ficarra)
-* fixes #200: no-octals should not see leading-0 floats as violations (Michael Ficarra)
-* add back tests for loading rules from a directory (Michael Ficarra)
-* add back in ability to load rules from a directory (Michael Ficarra)
-* Increased test coverage for `complexity` rule. (Ian Christian Myers)
-* Increased test coverage for `max-params` rule. (Ian Christian Myers)
-* also output source map when generating bundle (Michael Ficarra)
-* Rule: unnecessary-strict (Ian Christian Myers)
-* Improve performance of getTokens (Ilya Volodin)
-* Performance jake task (Ilya Volodin)
-* don't force explicit listing of rules; generate listing for bundle (Michael Ficarra)
-* Rule: no-dupe-keys (Ian Christian Myers)
-* fixes #145: create a browser bundle (Michael Ficarra)
-* Fixing no-caller bug (Ilya Volodin)
-* Check for use of underscore library as an exception for var declarations (Matthew DuVall)
-* Merge branch 'master' of https://github.com/nzakas/eslint into no-underscore-dangle (Matthew DuVall)
-* Fixing spelling (Ilya Volodin)
-* Rule: no-empty-label (Ilya Volodin)
-* Add builtin globals to the global scope (fixes #185) (Mark Macdonald)
-* Rule: no-loop-func (Ilya Volodin)
-* Merge branch 'master' of https://github.com/nzakas/eslint into no-underscore-dangle (Matt DuVall)
-* Use proper node declarations and __proto__ exception (Matt DuVall)
-* Updating no-undef patch (see pull request #164) - Simplify parseBoolean() - Make knowledge of```/*jshint*/``` and ```/*global */``` internal to eslint object - Put user-declared globals in Program scope (Mark Macdonald)
-* Rule: no-eq-null (Ian Christian Myers)
-* fixed broken merge (Raphael Pigulla)
-* fixes #143 (Raphael Pigulla)
-* added consistent-this rule (Raphael Pigulla)
-* Rule: no-sync to encourage async usage (Matt DuVall)
-* Update eslint.json with no-underscore-dangle rule (Matt DuVall)
-* Rule: no-underscore-dangle for func/var declarations (Matt DuVall)
-* Warn on finding the bitwise NOT operator (James Allardice)
-* Updating no-undef patch (see pull request #164) 3. Move parsing of ```/*global */``` and ```/*jshint */``` to eslint.js (Mark Macdonald)
-* Warn on finding a bitwise shift operator (fixes #170) (James Allardice)
-* Fix broken test (James Allardice)
-* Add support for the do-while statement to the curly rule (closes #167) (James Allardice)
-* Removing nasty leading underscores (Patrick Brosset)
-* Added tests and test cases for a few files (Patrick Brosset)
-* CLI: -f now accepts a file path (Ian Christian Myers)
-* Updating no-undef patch (see pull request #164) 1. Move predefined globals to ```conf/environments.json``` 2. Move mixin() to ```lib/util.js``` (Mark Macdonald)
-* Match messages to JS[LH]int where appropriate, and ensure consistent message formatting (closes #163) (James Allardice)
-* Add support for the do-while statement to the curly rule (closes #167) (James Allardice)
-* Removing nasty leading underscores (Patrick Brosset)
-* Added tests and test cases for a few files (Patrick Brosset)
-* Merge branch 'master' of github.com:nzakas/jscheck (Nicholas C. Zakas)
-* Added acceptance criteria for rules to docs (Nicholas C. Zakas)
-* Add no-undef (fixes #6) (Mark Macdonald)
-* Fixing no-self-compare (Ilya Volodin)
-* Rule: No multiline strings (Ilya Volodin)
-* CLI refactor to remove process.exit(), file not found now a regular error message, updated formatters to handle this case (Nicholas C. Zakas)
-* Rule: no-self-compare (Ilya Volodin)
-* Rule: No unnecessary semicolons (fixes #158) (Nicholas C. Zakas)
-* Fixed error in no-ex-assign when return statement as found in catch clause (Nicholas C. Zakas)
-* Rename no-exc-assign to no-ex-assign and add to config (Nicholas C. Zakas)
-* Renamed count-spaces to regex-spaces (Nicholas C. Zakas)
-* Documentation updates (Nicholas C. Zakas)
-* Put all rules into strict mode and update docs accordingly (Nicholas C. Zakas)
-* Merge branch 'master' of github.com:nzakas/jscheck (Nicholas C. Zakas)
-* Ensure getScope() works properly when called from Program node (fixes #148) (Nicholas C. Zakas)
-* Rule: wrap-iife (Ilya Volodin)
-* add additional test for no-cond-assign rule (Stephen Murray)
-* Merge branch 'master' of github.com:nzakas/jscheck (Nicholas C. Zakas)
-* Experimental support for Jake as a build system (fixes #151) (Nicholas C. Zakas)
-* fixes #152 (Stephen Murray)
-* add docs for no-exc-assign (Stephen Murray)
-* Merge branch 'master' of https://github.com/nzakas/eslint into no-new-object-array-literals (Matt DuVall)
-* Merge branch 'master' of https://github.com/nzakas/eslint into count-spaces (Matt DuVall)
-* Added a test for getting global scope from Program node (refs #148) (Nicholas C. Zakas)
-* Add positive test case for `object.Array` (Matthew DuVall)
-* Only support space characters for repetitions (Matthew DuVall)
-* fix line length per code conventions (Stephen Murray)
-* fix indentation per code conventions (Stephen Murray)
-* fixes #149 (Stephen Murray)
-* Rule: no-ternary (Ian Christian Myers)
-* Check that the return statement has an argument before checking its type (James Allardice)
-* Rule: count-spaces for multiple spaces in regular expressions (Matt DuVall)
-* Update eslint.json configuration file for literal rules (Matt DuVall)
-* Created no-label-var rule. (Ian Christian Myers)
-* Rule: no-new-array and no-new-object (Matt DuVall)
-* Added ability to retrieve scope using escope. (Ian Christian Myers)
-* Corrected unused arguments (Patrick Brosset)
-* Reporting function complexity on function:after and using array push/pop to handle nesting (Patrick Brosset)
-* Fixing style issues discovered while npm testing (Patrick Brosset)
-* First draft proposal for a cyclomatic complexity ESLint rule (Patrick Brosset)
-* Corrected file extension on no-plusplus rule documentation. (Ian Christian Myers)
-* Documentation for no-delete-var rule. Closes #129 (Ilya Volodin)
-* Rule: max-statements (Ian Christian Myers)
-* Better documentation for the `no-plusplus` rule. (Ian Christian Myers)
-* Rule: no-plusplus (Ian Christian Myers)
-* Rule: no assignment in return statement (Ilya Volodin)
-* Updating max-params rule name (Ilya Volodin)
-* Rule: Function has too many parameters (Ilya Volodin)
-* Removing merge originals (Ilya Volodin)
-* Rebasing on master (Ilya Volodin)
-* Rule: Variables should not be deleted (Ilya Volodin)
-* Fixes incorrect reporting of missing semicolon (Ian Christian Myers)
-* Rebase against master branch (Mathias Bynens)
-* Rule to warn on use of Math and JSON as functions (James Allardice)
-* Formatter: Checkstyle (Ian Christian Myers)
-* docs: Clean up structure (Mathias Bynens)
-* Merging no-native-reassign and no-redefine (Ilya Volodin)
-* Rule: no native reassignment (Ilya Volodin)
-* 0.0.8-dev (Nicholas C. Zakas)
-* v0.0.7 released (Nicholas C. Zakas)
-* Updated Tests, etc. (Jamund Ferguson)
-* Added jUnit Support (Fixes #16) (Jamund Ferguson)
-
-v0.0.7 - July 22, 2013
-
-* 0.0.7 (Nicholas C. Zakas)
-* Add code coverage checks to npm test and update rule tests to have better coverage (Nicholas C. Zakas)
-* Fixed CLI output on serial programatic executions (Ian Christian Myers)
-* Removes line length from code style convention docs (Josh Perez)
-* Adds escapeRegExp and fixes documentation (Josh Perez)
-* Add quotes rule and test coverage for configuration options (Matt DuVall)
-* Adds templating for lint messages and refactors rules to use it (Josh Perez)
-* Fixes lint rules for unchecked test file (Josh Perez)
-* Changes dotnotation rule to match JSHint style (Josh Perez)
-* Change configInfo to options and add test coverage (Matt DuVall)
-* Merge branch 'master' of https://github.com/nzakas/eslint into optional-args-for-rule (Matt DuVall)
-* Adds dot notation lint rule (Josh Perez)
-* Strip trailing underscores in camelcase rule - Fixes #94 (Patrick Brosset)
-* add mailing list link (Douglas Campos)
-* Strip leading underscores in camelcase rule - Fixes #94 (Patrick Brosset)
-* Created no-dangle rule. (Ian Christian Myers)
-* Fixed rule name (James Allardice)
-* Make sure the callee type is Identifier (James Allardice)
-* Add rule for implied eval via setTimeout/Interval (James Allardice)
-* Fix rule name in config (James Allardice)
-* Fixes #90 -- updates docstrings (Stephen Murray)
-* Fixes issue with fs.existsSync on NodeJS 0.6 (Ian Christian Myers)
-* Fixing -c config option. (Ian Christian Myers)
-* Allow arrays to be passed as multiple args to rule (Matt DuVall)
-* Test to make sure empty case with one line break is safe (Matt DuVall)
-* Rule: The Function constructor is eval (Ilya Volodin)
-* Enabled require("eslint") and exposed out CLI. (Ian Christian Myers)
-* Adds test and fix for issue #82 (Mark Macdonald)
-* Merge branch 'master' of https://github.com/nzakas/eslint into ok (Yusuke Suzuki)
-* Created brace-style rule. (Ian Christian Myers)
-* Formatters can now process multiple files at once (Jamund Ferguson)
-* Rule: Do not use 'new' for side effects (Ilya Volodin)
-* Adds smarter-eqeqeq rule (Josh Perez)
-* Add EditorConfig file for consistent editor/IDE behavior (Jed Hunsaker)
-* Fix the positive case for no-unreachable where there is no return statement at all, or if the return is at the end. Those cases should not return any errors. The error condition was not be checked before throwing the rule error. (Joel Feenstra)
-* Adds test and fix for no-octal on 0 literal (Mark Macdonald)
-* Don't report no-empty warnings when a parent is FunctionExpression / FunctionDeclaration (Yusuke Suzuki)
-* Add api.getAncestors (Yusuke Suzuki)
-* Ensure estraverse version 1.2.0 or later (Yusuke Suzuki)
-* Fixes no-alert lint rule for non identifier calls (Josh Perez)
-* Fixes exception when init is null (Josh Perez)
-* Fixes no-octal check to only check for numbers (Josh Perez)
-* 0.0.7-dev (Nicholas C. Zakas)
-* 0.0.6 (Nicholas C. Zakas)
-* Follow the rule naming conventions (James Allardice)
-* Add rule for missing radix argument to parseInt (James Allardice)
-* Allow return, falls-through comment, and throw for falls-through (Matt DuVall)
-* Merge branch 'master' of https://github.com/nzakas/eslint into rule-fall-through (Matt DuVall)
-* Globals are not good, declare len (Matt DuVall)
-* Rule to add no-fall-through (Matt DuVall)
-
-v0.0.6 - July 16, 2013
-
-* 0.0.6 (Nicholas C. Zakas)
-* Changed semi rule to use tokens instead of source (Nicholas C. Zakas)
-* Renaming new-parens rule (Ilya Volodin)
-* Renaming no-new-wrappers rule and adding tests (Ilya Volodin)
-* Add license URL (Nick Schonning)
-* Remove unused sinon requires (Nick Schonning)
-* Remove redundant JSHint directives (Nick Schonning)
-* Rule: Do not use constructor for wrapper objects (Ilya Volodin)
-* Test node 0.11 unstable but allow it to fail (Nick Schonning)
-* Rule: Constructor should use parentheses (Ilya Volodin)
-* Fix reference to "CSS Lint" in Contributing documentation (Brian McKenna)
-* Add git attributes file for line endings (Andy Hu)
-* Rename to create an 'index' file in GH web view (Evan Goer)
-* Avoid accidentally creating a markdown link (Evan Goer)
-* Add headings and correct internal links (Evan Goer)
-* Add wiki files to docs directory (Evan Goer)
-* Add rules for leading/trailing decimal points (James Allardice)
-* Add rule to prevent comparisons with value NaN (James Allardice)
-* Fixing jshint error (Ilya Volodin)
-* Rule: no octal literals (Ilya Volodin)
-* Rule: no undefined when initializing variables (Ilya Volodin)
-* Updated CONTRIBUTING.md (Nicholas C. Zakas)
-* Make sure namespaces are honored in new-cap (Nicholas C. Zakas)
-* Make sure no-empty also checks for ';;' (Nicholas C. Zakas)
-* Add CLI option to output version (Nicholas C. Zakas)
-* Updated contribution guidelines (Nicholas C. Zakas)
-* Fixing jshint complaints. (Joel Feenstra)
-* Converting to a switch statement and declaring variables. (Joel Feenstra)
-* Added .jshintrc file (until ESLint can lint itself) and cleaned up JSHint warnings (Nicholas C. Zakas)
-* Merge branch 'master' of github.com:nzakas/jscheck (Nicholas C. Zakas)
-* A bit of cleanup (Nicholas C. Zakas)
-* Add unreachable code detection for switch cases and after continue/break. (Joel Feenstra)
-* Add support for detecting unreachable code after a throw or return statement. (Joel Feenstra)
-* Fix curly brace check when an if statement is the alternate. (Joel Feenstra)
-* Check for empty switch statements with no cases. (Matt DuVall)
-* Added CONTRIBUTING.md (Nicholas C. Zakas)
-* Added rule to check for missing semicolons (fixes #9) (Nicholas C. Zakas)
-* Verify that file paths exist before reading the file (Matt DuVall)
-* Added guard-for-in rule (fixes #1) (Nicholas C. Zakas)
-* Run linting with npm test as well (Nicholas C. Zakas)
-* Removed foo.txt (Nicholas C. Zakas)
-* Updated config file with new no-caller ID (Nicholas C. Zakas)
-* Changed name of no-arg to no-caller (Nicholas C. Zakas)
-* Increased test coverage (Nicholas C. Zakas)
-* Got npm test to work with istanbul, huzzah\! (Nicholas C. Zakas)
-* Moved /config to /conf (Nicholas C. Zakas)
-* Added script to auto-generate changelog (Nicholas C. Zakas)
-* Add `quote-props` rule (Mathias Bynens)
-* Cleaned up relationship between bin/eslint, lib/cli.js, and lib/eslint.js (Nicholas C. Zakas)
-* Add problem count to compact formatter (Nicholas C. Zakas)
-* Fix merge conflict (Nicholas C. Zakas)
-* Change reporters to formatters, add format command line option. Also added tests for compact format. (Nicholas C. Zakas)
-* Change reporters to formatters, add format command line option (Nicholas C. Zakas)
-* Start development of 0.0.6-dev (Nicholas C. Zakas)
diff --git a/tools/eslint/README.md b/tools/eslint/README.md
index f15d49b90af1c8..4d84a7e3dfd5cd 100644
--- a/tools/eslint/README.md
+++ b/tools/eslint/README.md
@@ -129,6 +129,7 @@ These folks keep the project moving and are resources for help.
 * Kevin Partington ([@platinumazure](https://github.com/platinumazure))
 * Vitor Balocco ([@vitorbal](https://github.com/vitorbal))
 * James Henry ([@JamesHenry](https://github.com/JamesHenry))
+* Teddy Katz ([@not-an-aardvark](https://github.com/not-an-aardvark))
 
 ## Releases
 
diff --git a/tools/eslint/bin/eslint.js b/tools/eslint/bin/eslint.js
index 8bc431339f0f8e..d85d29d7a5bdae 100755
--- a/tools/eslint/bin/eslint.js
+++ b/tools/eslint/bin/eslint.js
@@ -5,13 +5,15 @@
  * @author Nicholas C. Zakas
  */
 
+/* eslint no-console:off, no-process-exit:off */
+
 "use strict";
 
 //------------------------------------------------------------------------------
 // Helpers
 //------------------------------------------------------------------------------
 
-var useStdIn = (process.argv.indexOf("--stdin") > -1),
+const useStdIn = (process.argv.indexOf("--stdin") > -1),
     init = (process.argv.indexOf("--init") > -1),
     debug = (process.argv.indexOf("--debug") > -1);
 
@@ -25,7 +27,7 @@ if (debug) {
 //------------------------------------------------------------------------------
 
 // now we can safely include the other modules that use debug
-var concat = require("concat-stream"),
+const concat = require("concat-stream"),
     cli = require("../lib/cli"),
     path = require("path"),
     fs = require("fs");
@@ -34,15 +36,16 @@ var concat = require("concat-stream"),
 // Execution
 //------------------------------------------------------------------------------
 
-process.on("uncaughtException", function(err){
+process.on("uncaughtException", function(err) {
+
     // lazy load
-    var lodash = require("lodash");
+    const lodash = require("lodash");
 
     if (typeof err.messageTemplate === "string" && err.messageTemplate.length > 0) {
-        var template = lodash.template(fs.readFileSync(path.resolve(__dirname, "../messages/" + err.messageTemplate + ".txt"), "utf-8"));
+        const template = lodash.template(fs.readFileSync(path.resolve(__dirname, `../messages/${err.messageTemplate}.txt`), "utf-8"));
 
         console.log("\nOops! Something went wrong! :(");
-        console.log("\n" + template(err.messageData || {}));
+        console.log(`\n${template(err.messageData || {})}`);
     } else {
         console.log(err.message);
         console.log(err.stack);
@@ -53,16 +56,11 @@ process.on("uncaughtException", function(err){
 
 if (useStdIn) {
     process.stdin.pipe(concat({ encoding: "string" }, function(text) {
-        try {
-            process.exitCode = cli.execute(process.argv, text);
-        } catch (ex) {
-            console.error(ex.message);
-            console.error(ex.stack);
-            process.exitCode = 1;
-        }
+        process.exitCode = cli.execute(process.argv, text);
     }));
 } else if (init) {
-    var configInit = require("../lib/config/config-initializer");
+    const configInit = require("../lib/config/config-initializer");
+
     configInit.initializeConfig(function(err) {
         if (err) {
             process.exitCode = 1;
diff --git a/tools/eslint/conf/eslint.json b/tools/eslint/conf/eslint.json
index 4850d3dc465dc0..4d54e3ab6dac6a 100755
--- a/tools/eslint/conf/eslint.json
+++ b/tools/eslint/conf/eslint.json
@@ -158,6 +158,7 @@
         "eqeqeq": "off",
         "func-call-spacing": "off",
         "func-names": "off",
+        "func-name-matching": "off",
         "func-style": "off",
         "generator-star-spacing": "off",
         "global-require": "off",
diff --git a/tools/eslint/lib/ast-utils.js b/tools/eslint/lib/ast-utils.js
index 20c3fa2d32c20e..9e171ea316fc31 100644
--- a/tools/eslint/lib/ast-utils.js
+++ b/tools/eslint/lib/ast-utils.js
@@ -560,6 +560,7 @@ module.exports = {
                 /* falls through */
 
             case "UnaryExpression":
+            case "AwaitExpression":
                 return 14;
 
             case "UpdateExpression":
@@ -715,5 +716,27 @@ module.exports = {
         }
 
         return directives;
+    },
+
+
+    /**
+     * Determines whether this node is a decimal integer literal. If a node is a decimal integer literal, a dot added
+     after the node will be parsed as a decimal point, rather than a property-access dot.
+     * @param {ASTNode} node - The node to check.
+     * @returns {boolean} `true` if this node is a decimal integer.
+     * @example
+     *
+     * 5       // true
+     * 5.      // false
+     * 5.0     // false
+     * 05      // false
+     * 0x5     // false
+     * 0b101   // false
+     * 0o5     // false
+     * 5e0     // false
+     * '5'     // false
+     */
+    isDecimalInteger(node) {
+        return node.type === "Literal" && typeof node.value === "number" && /^(0|[1-9]\d*)$/.test(node.raw);
     }
 };
diff --git a/tools/eslint/lib/cli-engine.js b/tools/eslint/lib/cli-engine.js
index cca21096c08e8c..b9019932fe9b54 100644
--- a/tools/eslint/lib/cli-engine.js
+++ b/tools/eslint/lib/cli-engine.js
@@ -75,6 +75,8 @@ const debug = require("debug")("eslint:cli-engine");
  * @property {LintMessage[]} messages All of the messages for the result.
  * @property {number} errorCount Number or errors for the result.
  * @property {number} warningCount Number or warnings for the result.
+ * @property {string=} [source] The source code of the file that was linted.
+ * @property {string=} [output] The source code of the file that was linted, with as many fixes applied as possible.
  */
 
 //------------------------------------------------------------------------------
@@ -150,10 +152,10 @@ function multipassFix(text, config, options) {
     do {
         passNumber++;
 
-        debug("Linting code for " + options.filename + " (pass " + passNumber + ")");
+        debug(`Linting code for ${options.filename} (pass ${passNumber})`);
         messages = eslint.verify(text, config, options);
 
-        debug("Generating fixed text for " + options.filename + " (pass " + passNumber + ")");
+        debug(`Generating fixed text for ${options.filename} (pass ${passNumber})`);
         fixedResult = SourceCodeFixer.applyFixes(eslint.getSourceCode(), messages);
 
         // stop if there are any syntax errors.
@@ -175,7 +177,7 @@ function multipassFix(text, config, options) {
 
 
     /*
-     * If the last result had fixes, we need to lint again to me sure we have
+     * If the last result had fixes, we need to lint again to be sure we have
      * the most up-to-date information.
      */
     if (fixedResult.fixed) {
@@ -198,7 +200,7 @@ function multipassFix(text, config, options) {
  * @param {string} filename An optional string representing the texts filename.
  * @param {boolean} fix Indicates if fixes should be processed.
  * @param {boolean} allowInlineConfig Allow/ignore comments that change config.
- * @returns {Result} The results for linting on this text.
+ * @returns {LintResult} The results for linting on this text.
  * @private
  */
 function processText(text, configHelper, filename, fix, allowInlineConfig) {
@@ -218,7 +220,7 @@ function processText(text, configHelper, filename, fix, allowInlineConfig) {
     }
 
     filename = filename || "";
-    debug("Linting " + filename);
+    debug(`Linting ${filename}`);
     const config = configHelper.getConfig(filePath);
 
     if (config.plugins) {
@@ -279,6 +281,10 @@ function processText(text, configHelper, filename, fix, allowInlineConfig) {
         result.output = fixedResult.output;
     }
 
+    if (result.errorCount + result.warningCount > 0 && typeof result.output === "undefined") {
+        result.source = text;
+    }
+
     return result;
 }
 
@@ -288,7 +294,7 @@ function processText(text, configHelper, filename, fix, allowInlineConfig) {
  * @param {string} filename The filename of the file being checked.
  * @param {Object} configHelper The configuration options for ESLint.
  * @param {Object} options The CLIEngine options object.
- * @returns {Result} The results for linting on this file.
+ * @returns {LintResult} The results for linting on this file.
  * @private
  */
 function processFile(filename, configHelper, options) {
@@ -304,7 +310,7 @@ function processFile(filename, configHelper, options) {
  * Returns result with warning by ignore settings
  * @param {string} filePath - File path of checked code
  * @param {string} baseDir  - Absolute path of base directory
- * @returns {Result}           Result with single warning
+ * @returns {LintResult} Result with single warning
  * @private
  */
 function createIgnoreResult(filePath, baseDir) {
@@ -376,7 +382,7 @@ function getCacheFile(cacheFile, cwd) {
      * @returns {string} the resolved path to the cacheFile
      */
     function getCacheFileForDirectory() {
-        return path.join(resolvedCacheFile, ".cache_" + hash(cwd));
+        return path.join(resolvedCacheFile, `.cache_${hash(cwd)}`);
     }
 
     let fileStats;
@@ -461,7 +467,7 @@ function CLIEngine(options) {
         const cwd = this.options.cwd;
 
         this.options.rulePaths.forEach(function(rulesdir) {
-            debug("Loading rules from " + rulesdir);
+            debug(`Loading rules from ${rulesdir}`);
             rules.load(rulesdir, cwd);
         });
     }
@@ -497,13 +503,13 @@ CLIEngine.getFormatter = function(format) {
 
             formatterPath = path.resolve(cwd, format);
         } else {
-            formatterPath = "./formatters/" + format;
+            formatterPath = `./formatters/${format}`;
         }
 
         try {
             return require(formatterPath);
         } catch (ex) {
-            ex.message = "There was a problem loading formatter: " + formatterPath + "\nError: " + ex.message;
+            ex.message = `There was a problem loading formatter: ${formatterPath}\nError: ${ex.message}`;
             throw ex;
         }
 
@@ -524,12 +530,13 @@ CLIEngine.getErrorResults = function(results) {
         const filteredMessages = result.messages.filter(isErrorMessage);
 
         if (filteredMessages.length > 0) {
-            filtered.push({
-                filePath: result.filePath,
-                messages: filteredMessages,
-                errorCount: filteredMessages.length,
-                warningCount: 0
-            });
+            filtered.push(
+                Object.assign(result, {
+                    messages: filteredMessages,
+                    errorCount: filteredMessages.length,
+                    warningCount: 0
+                })
+            );
         }
     });
 
@@ -608,7 +615,7 @@ CLIEngine.prototype = {
 
                 const eslintVersion = pkg.version;
 
-                prevConfig.hash = hash(eslintVersion + "_" + stringify(config));
+                prevConfig.hash = hash(`${eslintVersion}_${stringify(config)}`);
             }
 
             return prevConfig.hash;
@@ -645,7 +652,7 @@ CLIEngine.prototype = {
                 const changed = descriptor.changed || meta.hashOfConfig !== hashOfConfig;
 
                 if (!changed) {
-                    debug("Skipping file since hasn't changed: " + filename);
+                    debug(`Skipping file since hasn't changed: ${filename}`);
 
                     /*
                      * Add the the cached results (always will be 0 error and
@@ -662,7 +669,7 @@ CLIEngine.prototype = {
                 fileCache.destroy();
             }
 
-            debug("Processing " + filename);
+            debug(`Processing ${filename}`);
 
             const res = processFile(filename, configHelper, options);
 
@@ -674,7 +681,7 @@ CLIEngine.prototype = {
                  * next execution will also operate on this file
                  */
                 if (res.errorCount > 0 || res.warningCount > 0) {
-                    debug("File has problems, skipping it: " + filename);
+                    debug(`File has problems, skipping it: ${filename}`);
 
                     // remove the entry from the cache
                     fileCache.removeEntry(filename);
@@ -713,7 +720,7 @@ CLIEngine.prototype = {
             fileCache.reconcile();
         }
 
-        debug("Linting complete in: " + (Date.now() - startTime) + "ms");
+        debug(`Linting complete in: ${Date.now() - startTime}ms`);
 
         return {
             results,
diff --git a/tools/eslint/lib/cli.js b/tools/eslint/lib/cli.js
index 593c354bc08ba6..9fdcfc701e7167 100644
--- a/tools/eslint/lib/cli.js
+++ b/tools/eslint/lib/cli.js
@@ -135,15 +135,30 @@ const cli = {
 
         if (currentOptions.version) { // version from package.json
 
-            log.info("v" + require("../package.json").version);
+            log.info(`v${require("../package.json").version}`);
 
+        } else if (currentOptions.printConfig) {
+            if (files.length) {
+                log.error("The --print-config option must be used with exactly one file name.");
+                return 1;
+            } else if (text) {
+                log.error("The --print-config option is not available for piped-in code.");
+                return 1;
+            }
+
+            const engine = new CLIEngine(translateOptions(currentOptions));
+
+            const fileConfig = engine.getConfigForFile(currentOptions.printConfig);
+
+            log.info(JSON.stringify(fileConfig, null, "  "));
+            return 0;
         } else if (currentOptions.help || (!files.length && !text)) {
 
             log.info(options.generateHelp());
 
         } else {
 
-            debug("Running on " + (text ? "text" : "files"));
+            debug(`Running on ${text ? "text" : "files"}`);
 
             // disable --fix for piped-in code until we know how to do it correctly
             if (text && currentOptions.fix) {
@@ -153,24 +168,6 @@ const cli = {
 
             const engine = new CLIEngine(translateOptions(currentOptions));
 
-            if (currentOptions.printConfig) {
-                if (files.length !== 1) {
-                    log.error("The --print-config option requires a " +
-                        "single file as positional argument.");
-                    return 1;
-                }
-
-                if (text) {
-                    log.error("The --print-config option is not available for piped-in code.");
-                    return 1;
-                }
-
-                const fileConfig = engine.getConfigForFile(files[0]);
-
-                log.info(JSON.stringify(fileConfig, null, "  "));
-                return 0;
-            }
-
             const report = text ? engine.executeOnText(text, currentOptions.stdinFilename, true) : engine.executeOnFiles(files);
 
             if (currentOptions.fix) {
diff --git a/tools/eslint/lib/code-path-analysis/code-path-analyzer.js b/tools/eslint/lib/code-path-analysis/code-path-analyzer.js
index 1d3b632c625cdb..655211430b4e2e 100644
--- a/tools/eslint/lib/code-path-analysis/code-path-analyzer.js
+++ b/tools/eslint/lib/code-path-analysis/code-path-analyzer.js
@@ -148,7 +148,7 @@ function forwardCurrentToHead(analyzer, node) {
         headSegment = headSegments[i];
 
         if (currentSegment !== headSegment && currentSegment) {
-            debug.dump("onCodePathSegmentEnd " + currentSegment.id);
+            debug.dump(`onCodePathSegmentEnd ${currentSegment.id}`);
 
             if (currentSegment.reachable) {
                 analyzer.emitter.emit(
@@ -168,7 +168,7 @@ function forwardCurrentToHead(analyzer, node) {
         headSegment = headSegments[i];
 
         if (currentSegment !== headSegment && headSegment) {
-            debug.dump("onCodePathSegmentStart " + headSegment.id);
+            debug.dump(`onCodePathSegmentStart ${headSegment.id}`);
 
             CodePathSegment.markUsed(headSegment);
             if (headSegment.reachable) {
@@ -197,7 +197,7 @@ function leaveFromCurrentSegment(analyzer, node) {
     for (let i = 0; i < currentSegments.length; ++i) {
         const currentSegment = currentSegments[i];
 
-        debug.dump("onCodePathSegmentEnd " + currentSegment.id);
+        debug.dump(`onCodePathSegmentEnd ${currentSegment.id}`);
         if (currentSegment.reachable) {
             analyzer.emitter.emit(
                 "onCodePathSegmentEnd",
@@ -353,7 +353,7 @@ function processCodePathToEnter(analyzer, node) {
             state = CodePath.getState(codePath);
 
             // Emits onCodePathStart events.
-            debug.dump("onCodePathStart " + codePath.id);
+            debug.dump(`onCodePathStart ${codePath.id}`);
             analyzer.emitter.emit("onCodePathStart", codePath, node);
             break;
 
@@ -546,7 +546,7 @@ function postprocess(analyzer, node) {
             leaveFromCurrentSegment(analyzer, node);
 
             // Emits onCodePathEnd event of this code path.
-            debug.dump("onCodePathEnd " + codePath.id);
+            debug.dump(`onCodePathEnd ${codePath.id}`);
             analyzer.emitter.emit("onCodePathEnd", codePath, node);
             debug.dumpDot(codePath);
 
@@ -643,7 +643,7 @@ CodePathAnalyzer.prototype = {
      */
     onLooped(fromSegment, toSegment) {
         if (fromSegment.reachable && toSegment.reachable) {
-            debug.dump("onCodePathSegmentLoop " + fromSegment.id + " -> " + toSegment.id);
+            debug.dump(`onCodePathSegmentLoop ${fromSegment.id} -> ${toSegment.id}`);
             this.emitter.emit(
                 "onCodePathSegmentLoop",
                 fromSegment,
diff --git a/tools/eslint/lib/code-path-analysis/code-path-state.js b/tools/eslint/lib/code-path-analysis/code-path-state.js
index 392e3898f6932c..3b0b1606e2c993 100644
--- a/tools/eslint/lib/code-path-analysis/code-path-state.js
+++ b/tools/eslint/lib/code-path-analysis/code-path-state.js
@@ -967,7 +967,7 @@ CodePathState.prototype = {
 
             /* istanbul ignore next */
             default:
-                throw new Error("unknown type: \"" + type + "\"");
+                throw new Error(`unknown type: "${type}"`);
         }
     },
 
diff --git a/tools/eslint/lib/code-path-analysis/code-path.js b/tools/eslint/lib/code-path-analysis/code-path.js
index 1e7b76e5ab1dc7..96363423c23ed5 100644
--- a/tools/eslint/lib/code-path-analysis/code-path.js
+++ b/tools/eslint/lib/code-path-analysis/code-path.js
@@ -49,7 +49,7 @@ function CodePath(id, upper, onLooped) {
     Object.defineProperty(
         this,
         "internal",
-        {value: new CodePathState(new IdGenerator(id + "_"), onLooped)});
+        {value: new CodePathState(new IdGenerator(`${id}_`), onLooped)});
 
     // Adds this into `childCodePaths` of `upper`.
     if (upper) {
diff --git a/tools/eslint/lib/code-path-analysis/debug-helpers.js b/tools/eslint/lib/code-path-analysis/debug-helpers.js
index ac163268b62a65..5e311eb352b986 100644
--- a/tools/eslint/lib/code-path-analysis/debug-helpers.js
+++ b/tools/eslint/lib/code-path-analysis/debug-helpers.js
@@ -64,10 +64,10 @@ module.exports = {
             }
         }
 
-        debug(
-            state.currentSegments.map(getId).join(",") + ") " +
-            node.type + (leaving ? ":exit" : "")
-        );
+        debug([
+            `${state.currentSegments.map(getId).join(",")})`,
+            `${node.type}${leaving ? ":exit" : ""}`
+        ].join(" "));
     },
 
     /**
@@ -99,7 +99,7 @@ module.exports = {
         for (const id in traceMap) { // eslint-disable-line guard-for-in
             const segment = traceMap[id];
 
-            text += id + "[";
+            text += `${id}[`;
 
             if (segment.reachable) {
                 text += "label=\"";
@@ -110,17 +110,17 @@ module.exports = {
             if (segment.internal.nodes.length > 0) {
                 text += segment.internal.nodes.map(function(node) {
                     switch (node.type) {
-                        case "Identifier": return node.type + " (" + node.name + ")";
-                        case "Literal": return node.type + " (" + node.value + ")";
+                        case "Identifier": return `${node.type} (${node.name})`;
+                        case "Literal": return `${node.type} (${node.value})`;
                         default: return node.type;
                     }
                 }).join("\\n");
             } else if (segment.internal.exitNodes.length > 0) {
                 text += segment.internal.exitNodes.map(function(node) {
                     switch (node.type) {
-                        case "Identifier": return node.type + ":exit (" + node.name + ")";
-                        case "Literal": return node.type + ":exit (" + node.value + ")";
-                        default: return node.type + ":exit";
+                        case "Identifier": return `${node.type}:exit (${node.name})`;
+                        case "Literal": return `${node.type}:exit (${node.value})`;
+                        default: return `${node.type}:exit`;
                     }
                 }).join("\\n");
             } else {
@@ -130,7 +130,7 @@ module.exports = {
             text += "\"];\n";
         }
 
-        text += arrows + "\n";
+        text += `${arrows}\n`;
         text += "}";
         debug("DOT", text);
     },
@@ -147,7 +147,7 @@ module.exports = {
         const stack = [[codePath.initialSegment, 0]];
         const done = traceMap || Object.create(null);
         let lastId = codePath.initialSegment.id;
-        let text = "initial->" + codePath.initialSegment.id;
+        let text = `initial->${codePath.initialSegment.id}`;
 
         while (stack.length > 0) {
             const item = stack.pop();
@@ -166,9 +166,9 @@ module.exports = {
             }
 
             if (lastId === segment.id) {
-                text += "->" + nextSegment.id;
+                text += `->${nextSegment.id}`;
             } else {
-                text += ";\n" + segment.id + "->" + nextSegment.id;
+                text += `;\n${segment.id}->${nextSegment.id}`;
             }
             lastId = nextSegment.id;
 
@@ -180,7 +180,7 @@ module.exports = {
             if (lastId === finalSegment.id) {
                 text += "->final";
             } else {
-                text += ";\n" + finalSegment.id + "->final";
+                text += `;\n${finalSegment.id}->final`;
             }
             lastId = null;
         });
@@ -189,11 +189,11 @@ module.exports = {
             if (lastId === finalSegment.id) {
                 text += "->thrown";
             } else {
-                text += ";\n" + finalSegment.id + "->thrown";
+                text += `;\n${finalSegment.id}->thrown`;
             }
             lastId = null;
         });
 
-        return text + ";";
+        return `${text};`;
     }
 };
diff --git a/tools/eslint/lib/code-path-analysis/fork-context.js b/tools/eslint/lib/code-path-analysis/fork-context.js
index f47249b99848e5..6996af1dcc1f71 100644
--- a/tools/eslint/lib/code-path-analysis/fork-context.js
+++ b/tools/eslint/lib/code-path-analysis/fork-context.js
@@ -187,7 +187,7 @@ ForkContext.prototype = {
      * @returns {void}
      */
     add(segments) {
-        assert(segments.length >= this.count, segments.length + " >= " + this.count);
+        assert(segments.length >= this.count, `${segments.length} >= ${this.count}`);
 
         this.segmentsList.push(mergeExtraSegments(this, segments));
     },
@@ -200,7 +200,7 @@ ForkContext.prototype = {
      * @returns {void}
      */
     replaceHead(segments) {
-        assert(segments.length >= this.count, segments.length + " >= " + this.count);
+        assert(segments.length >= this.count, `${segments.length} >= ${this.count}`);
 
         this.segmentsList.splice(-1, 1, mergeExtraSegments(this, segments));
     },
diff --git a/tools/eslint/lib/config.js b/tools/eslint/lib/config.js
index f3a03750cc3d2b..9ff203c16d9e45 100644
--- a/tools/eslint/lib/config.js
+++ b/tools/eslint/lib/config.js
@@ -126,7 +126,7 @@ function getLocalConfig(thisConfig, directory) {
             continue;
         }
 
-        debug("Loading " + localConfigFile);
+        debug(`Loading ${localConfigFile}`);
         const localConfig = loadConfig(localConfigFile);
 
         // Don't consider a local config file found if the config is null
@@ -140,7 +140,7 @@ function getLocalConfig(thisConfig, directory) {
         }
 
         found = true;
-        debug("Using " + localConfigFile);
+        debug(`Using ${localConfigFile}`);
         config = ConfigOps.merge(localConfig, config);
     }
 
@@ -221,8 +221,8 @@ function Config(options) {
     this.options = options;
 
     if (useConfig) {
-        debug("Using command line config " + useConfig);
-        if (isResolvable(useConfig) || isResolvable("eslint-config-" + useConfig) || useConfig.charAt(0) === "@") {
+        debug(`Using command line config ${useConfig}`);
+        if (isResolvable(useConfig) || isResolvable(`eslint-config-${useConfig}`) || useConfig.charAt(0) === "@") {
             this.useSpecificConfig = loadConfig(useConfig);
         } else {
             this.useSpecificConfig = loadConfig(path.resolve(this.options.cwd, useConfig));
@@ -241,7 +241,7 @@ Config.prototype.getConfig = function(filePath) {
     let config,
         userConfig;
 
-    debug("Constructing config for " + (filePath ? filePath : "text"));
+    debug(`Constructing config for ${filePath ? filePath : "text"}`);
 
     config = this.cache[directory];
 
diff --git a/tools/eslint/lib/config/autoconfig.js b/tools/eslint/lib/config/autoconfig.js
index 5f558bb177bc14..dd25bcd49191bc 100644
--- a/tools/eslint/lib/config/autoconfig.js
+++ b/tools/eslint/lib/config/autoconfig.js
@@ -295,7 +295,7 @@ Registry.prototype = {
         const totalFilesLinting = filenames.length * ruleSets.length;
 
         filenames.forEach(function(filename) {
-            debug("Linting file: " + filename);
+            debug(`Linting file: ${filename}`);
 
             ruleSetIdx = 0;
 
diff --git a/tools/eslint/lib/config/config-file.js b/tools/eslint/lib/config/config-file.js
index 67c5970de02995..c11a55fad8413d 100644
--- a/tools/eslint/lib/config/config-file.js
+++ b/tools/eslint/lib/config/config-file.js
@@ -90,7 +90,7 @@ function isFilePath(filePath) {
  * @private
  */
 function loadYAMLConfigFile(filePath) {
-    debug("Loading YAML config file: " + filePath);
+    debug(`Loading YAML config file: ${filePath}`);
 
     // lazy load YAML to improve performance when not used
     const yaml = require("js-yaml");
@@ -100,8 +100,8 @@ function loadYAMLConfigFile(filePath) {
         // empty YAML file can be null, so always use
         return yaml.safeLoad(readFile(filePath)) || {};
     } catch (e) {
-        debug("Error reading YAML file: " + filePath);
-        e.message = "Cannot read config file: " + filePath + "\nError: " + e.message;
+        debug(`Error reading YAML file: ${filePath}`);
+        e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
         throw e;
     }
 }
@@ -114,13 +114,13 @@ function loadYAMLConfigFile(filePath) {
  * @private
  */
 function loadJSONConfigFile(filePath) {
-    debug("Loading JSON config file: " + filePath);
+    debug(`Loading JSON config file: ${filePath}`);
 
     try {
         return JSON.parse(stripComments(readFile(filePath)));
     } catch (e) {
-        debug("Error reading JSON file: " + filePath);
-        e.message = "Cannot read config file: " + filePath + "\nError: " + e.message;
+        debug(`Error reading JSON file: ${filePath}`);
+        e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
         throw e;
     }
 }
@@ -133,7 +133,7 @@ function loadJSONConfigFile(filePath) {
  * @private
  */
 function loadLegacyConfigFile(filePath) {
-    debug("Loading config file: " + filePath);
+    debug(`Loading config file: ${filePath}`);
 
     // lazy load YAML to improve performance when not used
     const yaml = require("js-yaml");
@@ -141,8 +141,8 @@ function loadLegacyConfigFile(filePath) {
     try {
         return yaml.safeLoad(stripComments(readFile(filePath))) || /* istanbul ignore next */ {};
     } catch (e) {
-        debug("Error reading YAML file: " + filePath);
-        e.message = "Cannot read config file: " + filePath + "\nError: " + e.message;
+        debug(`Error reading YAML file: ${filePath}`);
+        e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
         throw e;
     }
 }
@@ -155,12 +155,12 @@ function loadLegacyConfigFile(filePath) {
  * @private
  */
 function loadJSConfigFile(filePath) {
-    debug("Loading JS config file: " + filePath);
+    debug(`Loading JS config file: ${filePath}`);
     try {
         return requireUncached(filePath);
     } catch (e) {
-        debug("Error reading JavaScript file: " + filePath);
-        e.message = "Cannot read config file: " + filePath + "\nError: " + e.message;
+        debug(`Error reading JavaScript file: ${filePath}`);
+        e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
         throw e;
     }
 }
@@ -173,12 +173,12 @@ function loadJSConfigFile(filePath) {
  * @private
  */
 function loadPackageJSONConfigFile(filePath) {
-    debug("Loading package.json config file: " + filePath);
+    debug(`Loading package.json config file: ${filePath}`);
     try {
         return loadJSONConfigFile(filePath).eslintConfig || null;
     } catch (e) {
-        debug("Error reading package.json file: " + filePath);
-        e.message = "Cannot read config file: " + filePath + "\nError: " + e.message;
+        debug(`Error reading package.json file: ${filePath}`);
+        e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
         throw e;
     }
 }
@@ -233,7 +233,7 @@ function loadConfigFile(file) {
  * @private
  */
 function writeJSONConfigFile(config, filePath) {
-    debug("Writing JSON config file: " + filePath);
+    debug(`Writing JSON config file: ${filePath}`);
 
     const content = stringify(config, {cmp: sortByKey, space: 4});
 
@@ -248,7 +248,7 @@ function writeJSONConfigFile(config, filePath) {
  * @private
  */
 function writeYAMLConfigFile(config, filePath) {
-    debug("Writing YAML config file: " + filePath);
+    debug(`Writing YAML config file: ${filePath}`);
 
     // lazy load YAML to improve performance when not used
     const yaml = require("js-yaml");
@@ -266,9 +266,9 @@ function writeYAMLConfigFile(config, filePath) {
  * @private
  */
 function writeJSConfigFile(config, filePath) {
-    debug("Writing JS config file: " + filePath);
+    debug(`Writing JS config file: ${filePath}`);
 
-    const content = "module.exports = " + stringify(config, {cmp: sortByKey, space: 4}) + ";";
+    const content = `module.exports = ${stringify(config, {cmp: sortByKey, space: 4})};`;
 
     fs.writeFileSync(filePath, content, "utf8");
 }
@@ -387,7 +387,7 @@ function applyExtends(config, filePath, relativeTo) {
         }
 
         try {
-            debug("Loading " + parentPath);
+            debug(`Loading ${parentPath}`);
             return ConfigOps.merge(load(parentPath, false, relativeTo), previousValue);
         } catch (e) {
 
@@ -397,7 +397,7 @@ function applyExtends(config, filePath, relativeTo) {
              * message so the user is able to see where it was referenced from,
              * then re-throw.
              */
-            e.message += "\nReferenced from: " + filePath;
+            e.message += `\nReferenced from: ${filePath}`;
             throw e;
         }
 
@@ -430,21 +430,21 @@ function normalizePackageName(name, prefix) {
          * it's a scoped package
          * package name is "eslint-config", or just a username
          */
-        const scopedPackageShortcutRegex = new RegExp("^(@[^\/]+)(?:\/(?:" + prefix + ")?)?$"),
-            scopedPackageNameRegex = new RegExp("^" + prefix + "(-|$)");
+        const scopedPackageShortcutRegex = new RegExp(`^(@[^\/]+)(?:\/(?:${prefix})?)?$`),
+            scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`);
 
         if (scopedPackageShortcutRegex.test(name)) {
-            name = name.replace(scopedPackageShortcutRegex, "$1/" + prefix);
+            name = name.replace(scopedPackageShortcutRegex, `$1/${prefix}`);
         } else if (!scopedPackageNameRegex.test(name.split("/")[1])) {
 
             /*
              * for scoped packages, insert the eslint-config after the first / unless
              * the path is already @scope/eslint or @scope/eslint-config-xxx
              */
-            name = name.replace(/^@([^\/]+)\/(.*)$/, "@$1/" + prefix + "-$2");
+            name = name.replace(/^@([^\/]+)\/(.*)$/, `@$1/${prefix}-$2`);
         }
-    } else if (name.indexOf(prefix + "-") !== 0) {
-        name = prefix + "-" + name;
+    } else if (name.indexOf(`${prefix}-`) !== 0) {
+        name = `${prefix}-${name}`;
     }
 
     return name;
@@ -469,12 +469,12 @@ function resolve(filePath, relativeTo) {
             const configName = filePath.substr(filePath.lastIndexOf("/") + 1, filePath.length - filePath.lastIndexOf("/") - 1);
 
             normalizedPackageName = normalizePackageName(packagePath, "eslint-plugin");
-            debug("Attempting to resolve " + normalizedPackageName);
+            debug(`Attempting to resolve ${normalizedPackageName}`);
             filePath = resolver.resolve(normalizedPackageName, getLookupPath(relativeTo));
             return { filePath, configName };
         } else {
             normalizedPackageName = normalizePackageName(filePath, "eslint-config");
-            debug("Attempting to resolve " + normalizedPackageName);
+            debug(`Attempting to resolve ${normalizedPackageName}`);
             filePath = resolver.resolve(normalizedPackageName, getLookupPath(relativeTo));
             return { filePath };
         }
diff --git a/tools/eslint/lib/config/config-initializer.js b/tools/eslint/lib/config/config-initializer.js
index 202c3bfcd0add7..e3aef07baef388 100644
--- a/tools/eslint/lib/config/config-initializer.js
+++ b/tools/eslint/lib/config/config-initializer.js
@@ -44,8 +44,8 @@ function writeFile(config, format) {
         extname = ".json";
     }
 
-    ConfigFile.write(config, "./.eslintrc" + extname);
-    log.info("Successfully created .eslintrc" + extname + " file in " + process.cwd());
+    ConfigFile.write(config, `./.eslintrc${extname}`);
+    log.info(`Successfully created .eslintrc${extname} file in ${process.cwd()}`);
 
     if (config.installedESLint) {
         log.info("ESLint was installed locally. We recommend using this local copy instead of your globally-installed copy.");
@@ -63,11 +63,11 @@ function installModules(config) {
     // Create a list of modules which should be installed based on config
     if (config.plugins) {
         modules = modules.concat(config.plugins.map(function(name) {
-            return "eslint-plugin-" + name;
+            return `eslint-plugin-${name}`;
         }));
     }
     if (config.extends && config.extends.indexOf("eslint:") === -1) {
-        modules.push("eslint-config-" + config.extends);
+        modules.push(`eslint-config-${config.extends}`);
     }
 
     // Determine which modules are already installed
@@ -93,7 +93,7 @@ function installModules(config) {
     });
 
     if (modulesToInstall.length > 0) {
-        log.info("Installing " + modulesToInstall.join(", "));
+        log.info(`Installing ${modulesToInstall.join(", ")}`);
         npmUtil.installSyncSaveDev(modulesToInstall);
     }
 }
@@ -150,7 +150,7 @@ function configureRules(answers, config) {
     registry = registry.lintSourceCode(sourceCodes, newConfig, function(total) {
         bar.tick((BAR_TOTAL - BAR_SOURCE_CODE_TOTAL) / total); // Subtract out ticks used at beginning
     });
-    debug("\nRegistry: " + util.inspect(registry.rules, {depth: null}));
+    debug(`\nRegistry: ${util.inspect(registry.rules, {depth: null})}`);
 
     // Create a list of recommended rules, because we don't want to disable them
     const recRules = Object.keys(recConfig.rules).filter(function(ruleId) {
@@ -198,9 +198,9 @@ function configureRules(answers, config) {
         return (newConfig.rules[ruleId] !== 0);
     }).length;
     const resultMessage = [
-        "\nEnabled " + enabledRules + " out of " + totalRules,
-        "rules based on " + fileQty,
-        "file" + ((fileQty === 1) ? "." : "s.")
+        `\nEnabled ${enabledRules} out of ${totalRules}`,
+        `rules based on ${fileQty}`,
+        `file${(fileQty === 1) ? "." : "s."}`
     ].join(" ");
 
     log.info(resultMessage);
diff --git a/tools/eslint/lib/config/config-ops.js b/tools/eslint/lib/config/config-ops.js
index d0e791b54854ff..42b0fe81b90615 100644
--- a/tools/eslint/lib/config/config-ops.js
+++ b/tools/eslint/lib/config/config-ops.js
@@ -63,7 +63,7 @@ module.exports = {
                 const environment = Environments.get(name);
 
                 if (environment) {
-                    debug("Creating config for environment " + name);
+                    debug(`Creating config for environment ${name}`);
                     if (environment.globals) {
                         Object.assign(envConfig.globals, environment.globals);
                     }
diff --git a/tools/eslint/lib/config/environments.js b/tools/eslint/lib/config/environments.js
index 072d07b63cbb7d..36b989068ff6da 100644
--- a/tools/eslint/lib/config/environments.js
+++ b/tools/eslint/lib/config/environments.js
@@ -66,7 +66,7 @@ module.exports = {
     importPlugin(plugin, pluginName) {
         if (plugin.environments) {
             Object.keys(plugin.environments).forEach(function(envName) {
-                this.define(pluginName + "/" + envName, plugin.environments[envName]);
+                this.define(`${pluginName}/${envName}`, plugin.environments[envName]);
             }, this);
         }
     },
diff --git a/tools/eslint/lib/config/plugins.js b/tools/eslint/lib/config/plugins.js
index 460dc89c8d9dca..5073d564a04e79 100644
--- a/tools/eslint/lib/config/plugins.js
+++ b/tools/eslint/lib/config/plugins.js
@@ -115,7 +115,7 @@ module.exports = {
         let plugin = null;
 
         if (pluginName.match(/\s+/)) {
-            const whitespaceError = new Error("Whitespace found in plugin name '" + pluginName + "'");
+            const whitespaceError = new Error(`Whitespace found in plugin name '${pluginName}'`);
 
             whitespaceError.messageTemplate = "whitespace-found";
             whitespaceError.messageData = {
@@ -128,8 +128,8 @@ module.exports = {
             try {
                 plugin = require(longName);
             } catch (err) {
-                debug("Failed to load plugin " + longName + ".");
-                err.message = "Failed to load plugin " + pluginName + ": " + err.message;
+                debug(`Failed to load plugin ${longName}.`);
+                err.message = `Failed to load plugin ${pluginName}: ${err.message}`;
                 err.messageTemplate = "plugin-missing";
                 err.messageData = {
                     pluginName: longName
diff --git a/tools/eslint/lib/eslint.js b/tools/eslint/lib/eslint.js
index 14362b2c208475..fd7685f49257c6 100755
--- a/tools/eslint/lib/eslint.js
+++ b/tools/eslint/lib/eslint.js
@@ -97,7 +97,7 @@ function parseJsonConfig(string, location, messages) {
     items = {};
     string = string.replace(/([a-zA-Z0-9\-\/]+):/g, "\"$1\":").replace(/(\]|[0-9])\s+(?=")/, "$1,");
     try {
-        items = JSON.parse("{" + string + "}");
+        items = JSON.parse(`{${string}}`);
     } catch (ex) {
 
         messages.push({
@@ -105,7 +105,7 @@ function parseJsonConfig(string, location, messages) {
             fatal: true,
             severity: 2,
             source: null,
-            message: "Failed to parse JSON from '" + string + "': " + ex.message,
+            message: `Failed to parse JSON from '${string}': ${ex.message}`,
             line: location.start.line,
             column: location.start.column + 1
         });
@@ -350,7 +350,7 @@ function modifyConfigsFromComments(filename, ast, config, reportingConfig, messa
                         Object.keys(items).forEach(function(name) {
                             const ruleValue = items[name];
 
-                            validator.validateRuleOptions(name, ruleValue, filename + " line " + comment.loc.start.line);
+                            validator.validateRuleOptions(name, ruleValue, `${filename} line ${comment.loc.start.line}`);
                             commentRules[name] = ruleValue;
                         });
                         break;
@@ -446,7 +446,7 @@ function prepareConfig(config) {
             const rule = config.rules[k];
 
             if (rule === null) {
-                throw new Error("Invalid config for rule '" + k + "'\.");
+                throw new Error(`Invalid config for rule '${k}'\.`);
             }
             if (Array.isArray(rule)) {
                 copiedRules[k] = rule.slice();
@@ -527,7 +527,7 @@ function getRuleReplacementMessage(ruleId) {
     if (ruleId in replacements.rules) {
         const newRules = replacements.rules[ruleId];
 
-        return "Rule \'" + ruleId + "\' was removed and replaced by: " + newRules.join(", ");
+        return `Rule '${ruleId}' was removed and replaced by: ${newRules.join(", ")}`;
     }
 
     return null;
@@ -585,7 +585,6 @@ module.exports = (function() {
     let messages = [],
         currentConfig = null,
         currentScopes = null,
-        scopeMap = null,
         scopeManager = null,
         currentFilename = null,
         traverser = null,
@@ -655,7 +654,7 @@ module.exports = (function() {
                 fatal: true,
                 severity: 2,
                 source,
-                message: "Parsing error: " + message,
+                message: `Parsing error: ${message}`,
 
                 line: ex.lineNumber,
                 column: ex.column
@@ -706,7 +705,6 @@ module.exports = (function() {
         messages = [];
         currentConfig = null;
         currentScopes = null;
-        scopeMap = null;
         scopeManager = null;
         traverser = null;
         reportingConfig = [];
@@ -783,7 +781,7 @@ module.exports = (function() {
             ast = parse(
                 stripUnicodeBOM(text).replace(/^#!([^\r\n]+)/, function(match, captured) {
                     shebang = captured;
-                    return "//" + captured;
+                    return `//${captured}`;
                 }),
                 config,
                 currentFilename
@@ -823,7 +821,7 @@ module.exports = (function() {
                     if (replacementMsg) {
                         ruleCreator = createStubRule(replacementMsg);
                     } else {
-                        ruleCreator = createStubRule("Definition for rule '" + key + "' was not found");
+                        ruleCreator = createStubRule(`Definition for rule '${key}' was not found`);
                     }
                     rules.define(key, ruleCreator);
                 }
@@ -847,7 +845,7 @@ module.exports = (function() {
                         );
                     });
                 } catch (ex) {
-                    ex.message = "Error while loading rule '" + key + "': " + ex.message;
+                    ex.message = `Error while loading rule '${key}': ${ex.message}`;
                     throw ex;
                 }
             });
@@ -871,24 +869,6 @@ module.exports = (function() {
 
             currentScopes = scopeManager.scopes;
 
-            /*
-             * Index the scopes by the start range of their block for efficient
-             * lookup in getScope.
-             */
-            scopeMap = [];
-
-            currentScopes.forEach(function(scope, index) {
-                const range = scope.block.range[0];
-
-                /*
-                 * Sometimes two scopes are returned for a given node. This is
-                 * handled later in a known way, so just don't overwrite here.
-                 */
-                if (!scopeMap[range]) {
-                    scopeMap[range] = index;
-                }
-            });
-
             // augment global scope with declared global variables
             addDeclaredGlobals(ast, currentScopes[0], currentConfig);
 
diff --git a/tools/eslint/lib/formatters/checkstyle.js b/tools/eslint/lib/formatters/checkstyle.js
index 1f4554c0fcf1b9..0beedcf6895217 100644
--- a/tools/eslint/lib/formatters/checkstyle.js
+++ b/tools/eslint/lib/formatters/checkstyle.js
@@ -38,15 +38,16 @@ module.exports = function(results) {
     results.forEach(function(result) {
         const messages = result.messages;
 
-        output += "";
+        output += ``;
 
         messages.forEach(function(message) {
-            output += "";
+            output += [
+                ``
+            ].join(" ");
         });
 
         output += "";
diff --git a/tools/eslint/lib/formatters/compact.js b/tools/eslint/lib/formatters/compact.js
index 366ac8519a8221..9c7aeb87d7c064 100644
--- a/tools/eslint/lib/formatters/compact.js
+++ b/tools/eslint/lib/formatters/compact.js
@@ -40,12 +40,12 @@ module.exports = function(results) {
 
         messages.forEach(function(message) {
 
-            output += result.filePath + ": ";
-            output += "line " + (message.line || 0);
-            output += ", col " + (message.column || 0);
-            output += ", " + getMessageType(message);
-            output += " - " + message.message;
-            output += message.ruleId ? " (" + message.ruleId + ")" : "";
+            output += `${result.filePath}: `;
+            output += `line ${message.line || 0}`;
+            output += `, col ${message.column || 0}`;
+            output += `, ${getMessageType(message)}`;
+            output += ` - ${message.message}`;
+            output += message.ruleId ? ` (${message.ruleId})` : "";
             output += "\n";
 
         });
@@ -53,7 +53,7 @@ module.exports = function(results) {
     });
 
     if (total > 0) {
-        output += "\n" + total + " problem" + (total !== 1 ? "s" : "");
+        output += `\n${total} problem${total !== 1 ? "s" : ""}`;
     }
 
     return output;
diff --git a/tools/eslint/lib/formatters/html.js b/tools/eslint/lib/formatters/html.js
index a5c324bee31cc7..66e89d372cb8db 100644
--- a/tools/eslint/lib/formatters/html.js
+++ b/tools/eslint/lib/formatters/html.js
@@ -23,7 +23,7 @@ const resultTemplate = lodash.template(fs.readFileSync(path.join(__dirname, "htm
  * @returns {string} The original word with an s on the end if count is not one.
  */
 function pluralize(word, count) {
-    return (count === 1 ? word : word + "s");
+    return (count === 1 ? word : `${word}s`);
 }
 
 /**
@@ -34,10 +34,10 @@ function pluralize(word, count) {
  */
 function renderSummary(totalErrors, totalWarnings) {
     const totalProblems = totalErrors + totalWarnings;
-    let renderedText = totalProblems + " " + pluralize("problem", totalProblems);
+    let renderedText = `${totalProblems} ${pluralize("problem", totalProblems)}`;
 
     if (totalProblems !== 0) {
-        renderedText += " (" + totalErrors + " " + pluralize("error", totalErrors) + ", " + totalWarnings + " " + pluralize("warning", totalWarnings) + ")";
+        renderedText += ` (${totalErrors} ${pluralize("error", totalErrors)}, ${totalWarnings} ${pluralize("warning", totalWarnings)})`;
     }
     return renderedText;
 }
diff --git a/tools/eslint/lib/formatters/jslint-xml.js b/tools/eslint/lib/formatters/jslint-xml.js
index 8ef2efcb7f2ef6..7cfa893d32fad2 100644
--- a/tools/eslint/lib/formatters/jslint-xml.js
+++ b/tools/eslint/lib/formatters/jslint-xml.js
@@ -20,14 +20,15 @@ module.exports = function(results) {
     results.forEach(function(result) {
         const messages = result.messages;
 
-        output += "";
+        output += ``;
 
         messages.forEach(function(message) {
-            output += "";
+            output += [
+                ``
+            ].join(" ");
         });
 
         output += "";
diff --git a/tools/eslint/lib/formatters/junit.js b/tools/eslint/lib/formatters/junit.js
index 7b2aa7a0cec3e7..0c29a72c466791 100644
--- a/tools/eslint/lib/formatters/junit.js
+++ b/tools/eslint/lib/formatters/junit.js
@@ -40,21 +40,21 @@ module.exports = function(results) {
         const messages = result.messages;
 
         if (messages.length) {
-            output += "\n";
+            output += `\n`;
         }
 
         messages.forEach(function(message) {
             const type = message.fatal ? "error" : "failure";
 
-            output += "";
-            output += "<" + type + " message=\"" + xmlEscape(message.message || "") + "\">";
+            output += ``;
+            output += `<${type} message="${xmlEscape(message.message || "")}">`;
             output += "";
-            output += "";
+            output += ``;
             output += "\n";
         });
 
diff --git a/tools/eslint/lib/formatters/stylish.js b/tools/eslint/lib/formatters/stylish.js
index ee70bf5d74db09..578a146c010f57 100644
--- a/tools/eslint/lib/formatters/stylish.js
+++ b/tools/eslint/lib/formatters/stylish.js
@@ -18,7 +18,7 @@ const chalk = require("chalk"),
  * @returns {string} The original word with an s on the end if count is not one.
  */
 function pluralize(word, count) {
-    return (count === 1 ? word : word + "s");
+    return (count === 1 ? word : `${word}s`);
 }
 
 //------------------------------------------------------------------------------
@@ -41,9 +41,9 @@ module.exports = function(results) {
         }
 
         total += messages.length;
-        output += chalk.underline(result.filePath) + "\n";
+        output += `${chalk.underline(result.filePath)}\n`;
 
-        output += table(
+        output += `${table(
             messages.map(function(message) {
                 let messageType;
 
@@ -73,9 +73,9 @@ module.exports = function(results) {
             }
         ).split("\n").map(function(el) {
             return el.replace(/(\d+)\s+(\d+)/, function(m, p1, p2) {
-                return chalk.dim(p1 + ":" + p2);
+                return chalk.dim(`${p1}:${p2}`);
             });
-        }).join("\n") + "\n\n";
+        }).join("\n")}\n\n`;
     });
 
     if (total > 0) {
diff --git a/tools/eslint/lib/formatters/table.js b/tools/eslint/lib/formatters/table.js
index 4fc5ad3953414f..cd09626cc79381 100644
--- a/tools/eslint/lib/formatters/table.js
+++ b/tools/eslint/lib/formatters/table.js
@@ -97,7 +97,7 @@ function drawReport(results) {
             return "";
         }
 
-        return "\n" + result.filePath + "\n\n" + drawTable(result.messages);
+        return `\n${result.filePath}\n\n${drawTable(result.messages)}`;
     });
 
     files = files.filter(function(content) {
@@ -129,7 +129,7 @@ module.exports = function(report) {
         result = drawReport(report);
     }
 
-    result += "\n" + table([
+    result += `\n${table([
         [
             chalk.red(pluralize("Error", errorCount, true))
         ],
@@ -146,7 +146,7 @@ module.exports = function(report) {
         drawHorizontalLine() {
             return true;
         }
-    });
+    })}`;
 
     return result;
 };
diff --git a/tools/eslint/lib/formatters/tap.js b/tools/eslint/lib/formatters/tap.js
index df8668024fc48e..568ac1e8b64548 100644
--- a/tools/eslint/lib/formatters/tap.js
+++ b/tools/eslint/lib/formatters/tap.js
@@ -30,9 +30,9 @@ function getMessageType(message) {
  */
 function outputDiagnostics(diagnostic) {
     const prefix = "  ";
-    let output = prefix + "---\n";
+    let output = `${prefix}---\n`;
 
-    output += prefix + yaml.safeDump(diagnostic).split("\n").join("\n" + prefix);
+    output += prefix + yaml.safeDump(diagnostic).split("\n").join(`\n${prefix}`);
     output += "...\n";
     return output;
 }
@@ -42,7 +42,7 @@ function outputDiagnostics(diagnostic) {
 //------------------------------------------------------------------------------
 
 module.exports = function(results) {
-    let output = "TAP version 13\n1.." + results.length + "\n";
+    let output = `TAP version 13\n1..${results.length}\n`;
 
     results.forEach(function(result, id) {
         const messages = result.messages;
@@ -77,7 +77,7 @@ module.exports = function(results) {
             });
         }
 
-        output += testResult + " " + (id + 1) + " - " + result.filePath + "\n";
+        output += `${testResult} ${id + 1} - ${result.filePath}\n`;
 
         // If we have an error include diagnostics
         if (messages.length > 0) {
diff --git a/tools/eslint/lib/formatters/unix.js b/tools/eslint/lib/formatters/unix.js
index f11f30a0652cd0..867bbd5b49fcd3 100644
--- a/tools/eslint/lib/formatters/unix.js
+++ b/tools/eslint/lib/formatters/unix.js
@@ -39,12 +39,11 @@ module.exports = function(results) {
 
         messages.forEach(function(message) {
 
-            output += result.filePath + ":";
-            output += (message.line || 0) + ":";
-            output += (message.column || 0) + ":";
-            output += " " + message.message + " ";
-            output += "[" + getMessageType(message) +
-                      (message.ruleId ? "/" + message.ruleId : "") + "]";
+            output += `${result.filePath}:`;
+            output += `${message.line || 0}:`;
+            output += `${message.column || 0}:`;
+            output += ` ${message.message} `;
+            output += `[${getMessageType(message)}${message.ruleId ? `/${message.ruleId}` : ""}]`;
             output += "\n";
 
         });
@@ -52,7 +51,7 @@ module.exports = function(results) {
     });
 
     if (total > 0) {
-        output += "\n" + total + " problem" + (total !== 1 ? "s" : "");
+        output += `\n${total} problem${total !== 1 ? "s" : ""}`;
     }
 
     return output;
diff --git a/tools/eslint/lib/formatters/visualstudio.js b/tools/eslint/lib/formatters/visualstudio.js
index e11474d5a42abf..134a04a5134ca0 100644
--- a/tools/eslint/lib/formatters/visualstudio.js
+++ b/tools/eslint/lib/formatters/visualstudio.js
@@ -42,11 +42,11 @@ module.exports = function(results) {
         messages.forEach(function(message) {
 
             output += result.filePath;
-            output += "(" + (message.line || 0);
-            output += message.column ? "," + message.column : "";
-            output += "): " + getMessageType(message);
-            output += message.ruleId ? " " + message.ruleId : "";
-            output += " : " + message.message;
+            output += `(${message.line || 0}`;
+            output += message.column ? `,${message.column}` : "";
+            output += `): ${getMessageType(message)}`;
+            output += message.ruleId ? ` ${message.ruleId}` : "";
+            output += ` : ${message.message}`;
             output += "\n";
 
         });
@@ -56,7 +56,7 @@ module.exports = function(results) {
     if (total === 0) {
         output += "no problems";
     } else {
-        output += "\n" + total + " problem" + (total !== 1 ? "s" : "");
+        output += `\n${total} problem${total !== 1 ? "s" : ""}`;
     }
 
     return output;
diff --git a/tools/eslint/lib/ignored-paths.js b/tools/eslint/lib/ignored-paths.js
index 4e0953885c6ddb..bc2db8aaac8dc0 100644
--- a/tools/eslint/lib/ignored-paths.js
+++ b/tools/eslint/lib/ignored-paths.js
@@ -136,16 +136,16 @@ function IgnoredPaths(options) {
                 fs.statSync(options.ignorePath);
                 ignorePath = options.ignorePath;
             } catch (e) {
-                e.message = "Cannot read ignore file: " + options.ignorePath + "\nError: " + e.message;
+                e.message = `Cannot read ignore file: ${options.ignorePath}\nError: ${e.message}`;
                 throw e;
             }
         } else {
-            debug("Looking for ignore file in " + options.cwd);
+            debug(`Looking for ignore file in ${options.cwd}`);
             ignorePath = findIgnoreFile(options.cwd);
 
             try {
                 fs.statSync(ignorePath);
-                debug("Loaded ignore file " + ignorePath);
+                debug(`Loaded ignore file ${ignorePath}`);
             } catch (e) {
                 debug("Could not find ignore file in cwd");
                 this.options = options;
@@ -153,7 +153,7 @@ function IgnoredPaths(options) {
         }
 
         if (ignorePath) {
-            debug("Adding " + ignorePath);
+            debug(`Adding ${ignorePath}`);
             this.baseDir = path.dirname(path.resolve(options.cwd, ignorePath));
             addIgnoreFile(this.ig.custom, ignorePath);
             addIgnoreFile(this.ig.default, ignorePath);
diff --git a/tools/eslint/lib/internal-rules/.eslintrc.yml b/tools/eslint/lib/internal-rules/.eslintrc.yml
new file mode 100644
index 00000000000000..22d3a30ce32e1e
--- /dev/null
+++ b/tools/eslint/lib/internal-rules/.eslintrc.yml
@@ -0,0 +1,3 @@
+rules:
+    internal-no-invalid-meta: "error"
+    internal-consistent-docs-description: "error"
diff --git a/tools/eslint/lib/internal-rules/internal-consistent-docs-description.js b/tools/eslint/lib/internal-rules/internal-consistent-docs-description.js
new file mode 100644
index 00000000000000..3e4671aa7b151d
--- /dev/null
+++ b/tools/eslint/lib/internal-rules/internal-consistent-docs-description.js
@@ -0,0 +1,131 @@
+/**
+ * @fileoverview Internal rule to enforce meta.docs.description conventions.
+ * @author Vitor Balocco
+ */
+
+"use strict";
+
+const ALLOWED_FIRST_WORDS = [
+    "enforce",
+    "require",
+    "disallow"
+];
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Gets the property of the Object node passed in that has the name specified.
+ *
+ * @param {string} property Name of the property to return.
+ * @param {ASTNode} node The ObjectExpression node.
+ * @returns {ASTNode} The Property node or null if not found.
+ */
+function getPropertyFromObject(property, node) {
+    const properties = node.properties;
+
+    for (let i = 0; i < properties.length; i++) {
+        if (properties[i].key.name === property) {
+            return properties[i];
+        }
+    }
+
+    return null;
+}
+
+/**
+ * Verifies that the meta.docs.description property follows our internal conventions.
+ *
+ * @param {RuleContext} context The ESLint rule context.
+ * @param {ASTNode} exportsNode ObjectExpression node that the rule exports.
+ * @returns {void}
+ */
+function checkMetaDocsDescription(context, exportsNode) {
+    if (exportsNode.type !== "ObjectExpression") {
+
+        // if the exported node is not the correct format, "internal-no-invalid-meta" will already report this.
+        return;
+    }
+
+    const metaProperty = getPropertyFromObject("meta", exportsNode);
+    const metaDocs = metaProperty && getPropertyFromObject("docs", metaProperty.value);
+    const metaDocsDescription = metaDocs && getPropertyFromObject("description", metaDocs.value);
+
+    if (!metaDocsDescription) {
+
+        // if there is no `meta.docs.description` property, "internal-no-invalid-meta" will already report this.
+        return;
+    }
+
+    const description = metaDocsDescription.value.value;
+
+    if (typeof description !== "string") {
+        context.report({
+            node: metaDocsDescription.value,
+            message: "`meta.docs.description` should be a string."
+        });
+        return;
+    }
+
+    if (description === "") {
+        context.report({
+            node: metaDocsDescription.value,
+            message: "`meta.docs.description` should not be empty.",
+        });
+        return;
+    }
+
+    if (description.indexOf(" ") === 0) {
+        context.report({
+            node: metaDocsDescription.value,
+            message: "`meta.docs.description` should not start with whitespace."
+        });
+        return;
+    }
+
+    const firstWord = description.split(" ")[0];
+
+    if (ALLOWED_FIRST_WORDS.indexOf(firstWord) === -1) {
+        context.report({
+            node: metaDocsDescription.value,
+            message: "`meta.docs.description` should start with one of the following words: {{ allowedWords }}. Started with \"{{ firstWord }}\" instead.",
+            data: {
+                allowedWords: ALLOWED_FIRST_WORDS.join(", "),
+                firstWord
+            }
+        });
+        return;
+    }
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+    meta: {
+        docs: {
+            description: "enforce correct conventions of `meta.docs.description` property in core rules",
+            category: "Internal",
+            recommended: false
+        },
+
+        schema: []
+    },
+
+    create(context) {
+        return {
+            AssignmentExpression(node) {
+                if (node.left &&
+                    node.right &&
+                    node.left.type === "MemberExpression" &&
+                    node.left.object.name === "module" &&
+                    node.left.property.name === "exports") {
+
+                    checkMetaDocsDescription(context, node.right);
+                }
+            }
+        };
+    }
+};
diff --git a/tools/eslint/lib/options.js b/tools/eslint/lib/options.js
index bbb2456a98049f..5669104c0311ab 100644
--- a/tools/eslint/lib/options.js
+++ b/tools/eslint/lib/options.js
@@ -216,8 +216,8 @@ module.exports = optionator({
         },
         {
             option: "print-config",
-            type: "Boolean",
-            description: "Print the configuration to be used"
+            type: "path::String",
+            description: "Print the configuration for the given file"
         }
     ]
 });
diff --git a/tools/eslint/lib/rules.js b/tools/eslint/lib/rules.js
index ee8695f48d9f34..128a6bcd15b652 100644
--- a/tools/eslint/lib/rules.js
+++ b/tools/eslint/lib/rules.js
@@ -54,7 +54,7 @@ function load(rulesDir, cwd) {
 function importPlugin(plugin, pluginName) {
     if (plugin.rules) {
         Object.keys(plugin.rules).forEach(function(ruleId) {
-            const qualifiedRuleId = pluginName + "/" + ruleId,
+            const qualifiedRuleId = `${pluginName}/${ruleId}`,
                 rule = plugin.rules[ruleId];
 
             define(qualifiedRuleId, rule);
diff --git a/tools/eslint/lib/rules/.eslintrc.yml b/tools/eslint/lib/rules/.eslintrc.yml
index fded5b84978444..22d3a30ce32e1e 100644
--- a/tools/eslint/lib/rules/.eslintrc.yml
+++ b/tools/eslint/lib/rules/.eslintrc.yml
@@ -1,2 +1,3 @@
 rules:
     internal-no-invalid-meta: "error"
+    internal-consistent-docs-description: "error"
diff --git a/tools/eslint/lib/rules/array-callback-return.js b/tools/eslint/lib/rules/array-callback-return.js
index d85ba0422df12e..1713125a7a722d 100644
--- a/tools/eslint/lib/rules/array-callback-return.js
+++ b/tools/eslint/lib/rules/array-callback-return.js
@@ -185,7 +185,9 @@ module.exports = {
                     shouldCheck:
                         TARGET_NODE_TYPE.test(node.type) &&
                         node.body.type === "BlockStatement" &&
-                        isCallbackOfArrayMethod(node)
+                        isCallbackOfArrayMethod(node) &&
+                        !node.async &&
+                        !node.generator
                 };
             },
 
diff --git a/tools/eslint/lib/rules/arrow-parens.js b/tools/eslint/lib/rules/arrow-parens.js
index d9b72b81fe59f9..67bfdf541c2955 100644
--- a/tools/eslint/lib/rules/arrow-parens.js
+++ b/tools/eslint/lib/rules/arrow-parens.js
@@ -51,7 +51,7 @@ module.exports = {
          * @returns {void}
          */
         function parens(node) {
-            const token = sourceCode.getFirstToken(node);
+            const token = sourceCode.getFirstToken(node, node.async ? 1 : 0);
 
             // "as-needed", { "requireForBlockBody": true }: x => x
             if (
diff --git a/tools/eslint/lib/rules/class-methods-use-this.js b/tools/eslint/lib/rules/class-methods-use-this.js
index 0802846ffa6c27..d429c579b94110 100644
--- a/tools/eslint/lib/rules/class-methods-use-this.js
+++ b/tools/eslint/lib/rules/class-methods-use-this.js
@@ -16,9 +16,23 @@ module.exports = {
             category: "Best Practices",
             recommended: false
         },
-        schema: []
+        schema: [{
+            type: "object",
+            properties: {
+                exceptMethods: {
+                    type: "array",
+                    items: {
+                        type: "string"
+                    }
+                }
+            },
+            additionalProperties: false
+        }]
     },
     create(context) {
+        const config = context.options[0] ? Object.assign({}, context.options[0]) : {};
+        const exceptMethods = new Set(config.exceptMethods || []);
+
         const stack = [];
 
         /**
@@ -41,6 +55,16 @@ module.exports = {
             return !node.static && node.kind !== "constructor" && node.type === "MethodDefinition";
         }
 
+        /**
+         * Check if the node is an instance method not excluded by config
+         * @param {ASTNode} node - node to check
+         * @returns {boolean} True if it is an instance method, and not excluded by config
+         * @private
+         */
+        function isIncludedInstanceMethod(node) {
+            return isInstanceMethod(node) && !exceptMethods.has(node.key.name);
+        }
+
         /**
          * Checks if we are leaving a function that is a method, and reports if 'this' has not been used.
          * Static methods and the constructor are exempt.
@@ -52,7 +76,7 @@ module.exports = {
         function exitFunction(node) {
             const methodUsesThis = stack.pop();
 
-            if (isInstanceMethod(node.parent) && !methodUsesThis) {
+            if (isIncludedInstanceMethod(node.parent) && !methodUsesThis) {
                 context.report({
                     node,
                     message: "Expected 'this' to be used by class method '{{classMethod}}'.",
diff --git a/tools/eslint/lib/rules/comma-dangle.js b/tools/eslint/lib/rules/comma-dangle.js
index 621bc2f63ea7ff..763ee89fd5d55e 100644
--- a/tools/eslint/lib/rules/comma-dangle.js
+++ b/tools/eslint/lib/rules/comma-dangle.js
@@ -11,16 +11,62 @@
 
 const lodash = require("lodash");
 
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const DEFAULT_OPTIONS = Object.freeze({
+    arrays: "never",
+    objects: "never",
+    imports: "never",
+    exports: "never",
+    functions: "ignore",
+});
+
 /**
  * Checks whether or not a trailing comma is allowed in a given node.
- * `ArrayPattern` which has `RestElement` disallows it.
+ * If the `lastItem` is `RestElement` or `RestProperty`, it disallows trailing commas.
  *
- * @param {ASTNode} node - A node to check.
  * @param {ASTNode} lastItem - The node of the last element in the given node.
  * @returns {boolean} `true` if a trailing comma is allowed.
  */
-function isTrailingCommaAllowed(node, lastItem) {
-    return node.type !== "ArrayPattern" || lastItem.type !== "RestElement";
+function isTrailingCommaAllowed(lastItem) {
+    return !(
+        lastItem.type === "RestElement" ||
+        lastItem.type === "RestProperty" ||
+        lastItem.type === "ExperimentalRestProperty"
+    );
+}
+
+/**
+ * Normalize option value.
+ *
+ * @param {string|Object|undefined} optionValue - The 1st option value to normalize.
+ * @returns {Object} The normalized option value.
+ */
+function normalizeOptions(optionValue) {
+    if (typeof optionValue === "string") {
+        return {
+            arrays: optionValue,
+            objects: optionValue,
+            imports: optionValue,
+            exports: optionValue,
+
+            // For backward compatibility, always ignore functions.
+            functions: "ignore",
+        };
+    }
+    if (typeof optionValue === "object" && optionValue !== null) {
+        return {
+            arrays: optionValue.arrays || DEFAULT_OPTIONS.arrays,
+            objects: optionValue.objects || DEFAULT_OPTIONS.objects,
+            imports: optionValue.imports || DEFAULT_OPTIONS.imports,
+            exports: optionValue.exports || DEFAULT_OPTIONS.exports,
+            functions: optionValue.functions || DEFAULT_OPTIONS.functions,
+        };
+    }
+
+    return DEFAULT_OPTIONS;
 }
 
 //------------------------------------------------------------------------------
@@ -39,16 +85,112 @@ module.exports = {
 
         schema: [
             {
-                enum: ["always", "always-multiline", "only-multiline", "never"]
-            }
+                defs: {
+                    value: {
+                        enum: [
+                            "always",
+                            "always-multiline",
+                            "only-multiline",
+                            "never"
+                        ]
+                    },
+                    valueWithIgnore: {
+                        anyOf: [
+                            {
+                                $ref: "#/defs/value"
+                            },
+                            {
+                                enum: ["ignore"]
+                            }
+                        ]
+                    }
+                },
+                anyOf: [
+                    {
+                        $ref: "#/defs/value"
+                    },
+                    {
+                        type: "object",
+                        properties: {
+                            arrays: {$refs: "#/defs/valueWithIgnore"},
+                            objects: {$refs: "#/defs/valueWithIgnore"},
+                            imports: {$refs: "#/defs/valueWithIgnore"},
+                            exports: {$refs: "#/defs/valueWithIgnore"},
+                            functions: {$refs: "#/defs/valueWithIgnore"}
+                        },
+                        additionalProperties: false
+                    }
+                ]
+            },
         ]
     },
 
     create(context) {
-        const mode = context.options[0];
+        const options = normalizeOptions(context.options[0]);
+        const sourceCode = context.getSourceCode();
         const UNEXPECTED_MESSAGE = "Unexpected trailing comma.";
         const MISSING_MESSAGE = "Missing trailing comma.";
 
+        /**
+         * Gets the last item of the given node.
+         * @param {ASTNode} node - The node to get.
+         * @returns {ASTNode|null} The last node or null.
+         */
+        function getLastItem(node) {
+            switch (node.type) {
+                case "ObjectExpression":
+                case "ObjectPattern":
+                    return lodash.last(node.properties);
+                case "ArrayExpression":
+                case "ArrayPattern":
+                    return lodash.last(node.elements);
+                case "ImportDeclaration":
+                case "ExportNamedDeclaration":
+                    return lodash.last(node.specifiers);
+                case "FunctionDeclaration":
+                case "FunctionExpression":
+                case "ArrowFunctionExpression":
+                    return lodash.last(node.params);
+                case "CallExpression":
+                case "NewExpression":
+                    return lodash.last(node.arguments);
+                default:
+                    return null;
+            }
+        }
+
+        /**
+         * Gets the trailing comma token of the given node.
+         * If the trailing comma does not exist, this returns the token which is
+         * the insertion point of the trailing comma token.
+         *
+         * @param {ASTNode} node - The node to get.
+         * @param {ASTNode} lastItem - The last item of the node.
+         * @returns {Token} The trailing comma token or the insertion point.
+         */
+        function getTrailingToken(node, lastItem) {
+            switch (node.type) {
+                case "ObjectExpression":
+                case "ObjectPattern":
+                case "ArrayExpression":
+                case "ArrayPattern":
+                case "CallExpression":
+                case "NewExpression":
+                    return sourceCode.getLastToken(node, 1);
+                case "FunctionDeclaration":
+                case "FunctionExpression":
+                    return sourceCode.getTokenBefore(node.body, 1);
+                default: {
+                    const nextToken = sourceCode.getTokenAfter(lastItem);
+
+                    if (nextToken.value === ",") {
+                        return nextToken;
+                    }
+                    return sourceCode.getLastToken(lastItem);
+                }
+            }
+        }
+
         /**
          * Checks whether or not a given node is multiline.
          * This rule handles a given node as multiline when the closing parenthesis
@@ -58,26 +200,14 @@ module.exports = {
          * @returns {boolean} `true` if the node is multiline.
          */
         function isMultiline(node) {
-            const lastItem = lodash.last(node.properties || node.elements || node.specifiers);
+            const lastItem = getLastItem(node);
 
             if (!lastItem) {
                 return false;
             }
 
-            const sourceCode = context.getSourceCode();
-            let penultimateToken = sourceCode.getLastToken(lastItem),
-                lastToken = sourceCode.getTokenAfter(penultimateToken);
-
-            // parentheses are a pain
-            while (lastToken.value === ")") {
-                penultimateToken = lastToken;
-                lastToken = sourceCode.getTokenAfter(lastToken);
-            }
-
-            if (lastToken.value === ",") {
-                penultimateToken = lastToken;
-                lastToken = sourceCode.getTokenAfter(lastToken);
-            }
+            const penultimateToken = getTrailingToken(node, lastItem);
+            const lastToken = sourceCode.getTokenAfter(penultimateToken);
 
             return lastToken.loc.end.line !== penultimateToken.loc.end.line;
         }
@@ -91,21 +221,13 @@ module.exports = {
          * @returns {void}
          */
         function forbidTrailingComma(node) {
-            const lastItem = lodash.last(node.properties || node.elements || node.specifiers);
+            const lastItem = getLastItem(node);
 
             if (!lastItem || (node.type === "ImportDeclaration" && lastItem.type !== "ImportSpecifier")) {
                 return;
             }
 
-            const sourceCode = context.getSourceCode();
-            let trailingToken;
-
-            // last item can be surrounded by parentheses for object and array literals
-            if (node.type === "ObjectExpression" || node.type === "ArrayExpression") {
-                trailingToken = sourceCode.getTokenBefore(sourceCode.getLastToken(node));
-            } else {
-                trailingToken = sourceCode.getTokenAfter(lastItem);
-            }
+            const trailingToken = getTrailingToken(node, lastItem);
 
             if (trailingToken.value === ",") {
                 context.report({
@@ -132,33 +254,25 @@ module.exports = {
          * @returns {void}
          */
         function forceTrailingComma(node) {
-            const lastItem = lodash.last(node.properties || node.elements || node.specifiers);
+            const lastItem = getLastItem(node);
 
             if (!lastItem || (node.type === "ImportDeclaration" && lastItem.type !== "ImportSpecifier")) {
                 return;
             }
-            if (!isTrailingCommaAllowed(node, lastItem)) {
+            if (!isTrailingCommaAllowed(lastItem)) {
                 forbidTrailingComma(node);
                 return;
             }
 
-            const sourceCode = context.getSourceCode();
-            let penultimateToken = lastItem,
-                trailingToken = sourceCode.getTokenAfter(lastItem);
-
-            // Skip close parentheses.
-            while (trailingToken.value === ")") {
-                penultimateToken = trailingToken;
-                trailingToken = sourceCode.getTokenAfter(trailingToken);
-            }
+            const trailingToken = getTrailingToken(node, lastItem);
 
             if (trailingToken.value !== ",") {
                 context.report({
                     node: lastItem,
-                    loc: lastItem.loc.end,
+                    loc: trailingToken.loc.end,
                     message: MISSING_MESSAGE,
                     fix(fixer) {
-                        return fixer.insertTextAfter(penultimateToken, ",");
+                        return fixer.insertTextAfter(trailingToken, ",");
                     }
                 });
             }
@@ -198,26 +312,30 @@ module.exports = {
             }
         }
 
-        // Chooses a checking function.
-        let checkForTrailingComma;
-
-        if (mode === "always") {
-            checkForTrailingComma = forceTrailingComma;
-        } else if (mode === "always-multiline") {
-            checkForTrailingComma = forceTrailingCommaIfMultiline;
-        } else if (mode === "only-multiline") {
-            checkForTrailingComma = allowTrailingCommaIfMultiline;
-        } else {
-            checkForTrailingComma = forbidTrailingComma;
-        }
+        const predicate = {
+            always: forceTrailingComma,
+            "always-multiline": forceTrailingCommaIfMultiline,
+            "only-multiline": allowTrailingCommaIfMultiline,
+            never: forbidTrailingComma,
+            ignore: lodash.noop,
+        };
 
         return {
-            ObjectExpression: checkForTrailingComma,
-            ObjectPattern: checkForTrailingComma,
-            ArrayExpression: checkForTrailingComma,
-            ArrayPattern: checkForTrailingComma,
-            ImportDeclaration: checkForTrailingComma,
-            ExportNamedDeclaration: checkForTrailingComma
+            ObjectExpression: predicate[options.objects],
+            ObjectPattern: predicate[options.objects],
+
+            ArrayExpression: predicate[options.arrays],
+            ArrayPattern: predicate[options.arrays],
+
+            ImportDeclaration: predicate[options.imports],
+
+            ExportNamedDeclaration: predicate[options.exports],
+
+            FunctionDeclaration: predicate[options.functions],
+            FunctionExpression: predicate[options.functions],
+            ArrowFunctionExpression: predicate[options.functions],
+            CallExpression: predicate[options.functions],
+            NewExpression: predicate[options.functions],
         };
     }
 };
diff --git a/tools/eslint/lib/rules/curly.js b/tools/eslint/lib/rules/curly.js
index 96a7c70155a02f..02d74a1e037560 100644
--- a/tools/eslint/lib/rules/curly.js
+++ b/tools/eslint/lib/rules/curly.js
@@ -9,6 +9,7 @@
 //------------------------------------------------------------------------------
 
 const astUtils = require("../ast-utils");
+const esUtils = require("esutils");
 
 //------------------------------------------------------------------------------
 // Rule Definition
@@ -48,7 +49,9 @@ module.exports = {
                     maxItems: 2
                 }
             ]
-        }
+        },
+
+        fixable: "code"
     },
 
     create(context) {
@@ -137,12 +140,13 @@ module.exports = {
         /**
          * Reports "Expected { after ..." error
          * @param {ASTNode} node The node to report.
+         * @param {ASTNode} bodyNode The body node that is incorrectly missing curly brackets
          * @param {string} name The name to report.
          * @param {string} suffix Additional string to add to the end of a report.
          * @returns {void}
          * @private
          */
-        function reportExpectedBraceError(node, name, suffix) {
+        function reportExpectedBraceError(node, bodyNode, name, suffix) {
             context.report({
                 node,
                 loc: (name !== "else" ? node : getElseKeyword(node)).loc.start,
@@ -150,19 +154,73 @@ module.exports = {
                 data: {
                     name,
                     suffix: (suffix ? ` ${suffix}` : "")
-                }
+                },
+                fix: fixer => fixer.replaceText(bodyNode, `{${sourceCode.getText(bodyNode)}}`)
             });
         }
 
+        /**
+        * Determines if a semicolon needs to be inserted after removing a set of curly brackets, in order to avoid a SyntaxError.
+        * @param {Token} closingBracket The } token
+        * @returns {boolean} `true` if a semicolon needs to be inserted after the last statement in the block.
+        */
+        function needsSemicolon(closingBracket) {
+            const tokenBefore = sourceCode.getTokenBefore(closingBracket);
+            const tokenAfter = sourceCode.getTokenAfter(closingBracket);
+            const lastBlockNode = sourceCode.getNodeByRangeIndex(tokenBefore.range[0]);
+
+            if (tokenBefore.value === ";") {
+
+                // If the last statement already has a semicolon, don't add another one.
+                return false;
+            }
+
+            if (!tokenAfter) {
+
+                // If there are no statements after this block, there is no need to add a semicolon.
+                return false;
+            }
+
+            if (lastBlockNode.type === "BlockStatement" && lastBlockNode.parent.type !== "FunctionExpression" && lastBlockNode.parent.type !== "ArrowFunctionExpression") {
+
+                // If the last node surrounded by curly brackets is a BlockStatement (other than a FunctionExpression or an ArrowFunctionExpression),
+                // don't insert a semicolon. Otherwise, the semicolon would be parsed as a separate statement, which would cause
+                // a SyntaxError if it was followed by `else`.
+                return false;
+            }
+
+            if (tokenBefore.loc.end.line === tokenAfter.loc.start.line) {
+
+                // If the next token is on the same line, insert a semicolon.
+                return true;
+            }
+
+            if (/^[(\[\/`+-]/.test(tokenAfter.value)) {
+
+                // If the next token starts with a character that would disrupt ASI, insert a semicolon.
+                return true;
+            }
+
+            if (tokenBefore.type === "Punctuator" && (tokenBefore.value === "++" || tokenBefore.value === "--")) {
+
+                // If the last token is ++ or --, insert a semicolon to avoid disrupting ASI.
+                return true;
+            }
+
+            // Otherwise, do not insert a semicolon.
+            return false;
+        }
+
         /**
          * Reports "Unnecessary { after ..." error
          * @param {ASTNode} node The node to report.
+         * @param {ASTNode} bodyNode The block statement that is incorrectly surrounded by parens
          * @param {string} name The name to report.
          * @param {string} suffix Additional string to add to the end of a report.
          * @returns {void}
          * @private
          */
-        function reportUnnecessaryBraceError(node, name, suffix) {
+        function reportUnnecessaryBraceError(node, bodyNode, name, suffix) {
             context.report({
                 node,
                 loc: (name !== "else" ? node : getElseKeyword(node)).loc.start,
@@ -170,6 +228,33 @@ module.exports = {
                 data: {
                     name,
                     suffix: (suffix ? ` ${suffix}` : "")
+                },
+                fix(fixer) {
+
+                    // `do while` expressions sometimes need a space to be inserted after `do`.
+                    // e.g. `do{foo()} while (bar)` should be corrected to `do foo() while (bar)`
+                    const needsPrecedingSpace = node.type === "DoWhileStatement" &&
+                        sourceCode.getTokenBefore(bodyNode).end === bodyNode.start &&
+                        esUtils.code.isIdentifierPartES6(sourceCode.getText(bodyNode).charCodeAt(1));
+
+                    const openingBracket = sourceCode.getFirstToken(bodyNode);
+                    const closingBracket = sourceCode.getLastToken(bodyNode);
+                    const lastTokenInBlock = sourceCode.getTokenBefore(closingBracket);
+
+                    if (needsSemicolon(closingBracket)) {
+
+                        /*
+                         * If removing braces would cause a SyntaxError due to multiple statements on the same line (or
+                         * change the semantics of the code due to ASI), don't perform a fix.
+                         */
+                        return null;
+                    }
+
+                    const resultingBodyText = sourceCode.getText().slice(openingBracket.range[1], lastTokenInBlock.range[0]) +
+                        sourceCode.getText(lastTokenInBlock) +
+                        sourceCode.getText().slice(lastTokenInBlock.range[1], closingBracket.range[0]);
+
+                    return fixer.replaceText(bodyNode, (needsPrecedingSpace ? " " : "") + resultingBodyText);
                 }
             });
         }
@@ -218,9 +303,9 @@ module.exports = {
                 check() {
                     if (this.expected !== null && this.expected !== this.actual) {
                         if (this.expected) {
-                            reportExpectedBraceError(node, name, suffix);
+                            reportExpectedBraceError(node, body, name, suffix);
                         } else {
-                            reportUnnecessaryBraceError(node, name, suffix);
+                            reportUnnecessaryBraceError(node, body, name, suffix);
                         }
                     }
                 }
diff --git a/tools/eslint/lib/rules/dot-location.js b/tools/eslint/lib/rules/dot-location.js
index 3f2b1e44705be1..60f4af7013a9e3 100644
--- a/tools/eslint/lib/rules/dot-location.js
+++ b/tools/eslint/lib/rules/dot-location.js
@@ -23,7 +23,9 @@ module.exports = {
             {
                 enum: ["object", "property"]
             }
-        ]
+        ],
+
+        fixable: "code"
     },
 
     create(context) {
@@ -44,14 +46,28 @@ module.exports = {
          */
         function checkDotLocation(obj, prop, node) {
             const dot = sourceCode.getTokenBefore(prop);
+            const textBeforeDot = sourceCode.getText().slice(obj.range[1], dot.range[0]);
+            const textAfterDot = sourceCode.getText().slice(dot.range[1], prop.range[0]);
 
             if (dot.type === "Punctuator" && dot.value === ".") {
                 if (onObject) {
                     if (!astUtils.isTokenOnSameLine(obj, dot)) {
-                        context.report(node, dot.loc.start, "Expected dot to be on same line as object.");
+                        const neededTextAfterObj = astUtils.isDecimalInteger(obj) ? " " : "";
+
+                        context.report({
+                            node,
+                            loc: dot.loc.start,
+                            message: "Expected dot to be on same line as object.",
+                            fix: fixer => fixer.replaceTextRange([obj.range[1], prop.range[0]], `${neededTextAfterObj}.${textBeforeDot}${textAfterDot}`)
+                        });
                     }
                 } else if (!astUtils.isTokenOnSameLine(dot, prop)) {
-                    context.report(node, dot.loc.start, "Expected dot to be on same line as property.");
+                    context.report({
+                        node,
+                        loc: dot.loc.start,
+                        message: "Expected dot to be on same line as property.",
+                        fix: fixer => fixer.replaceTextRange([obj.range[1], prop.range[0]], `${textBeforeDot}${textAfterDot}.`)
+                    });
                 }
             }
         }
diff --git a/tools/eslint/lib/rules/eol-last.js b/tools/eslint/lib/rules/eol-last.js
index ef15635cb51206..1f3676b0e96b2a 100644
--- a/tools/eslint/lib/rules/eol-last.js
+++ b/tools/eslint/lib/rules/eol-last.js
@@ -1,9 +1,15 @@
 /**
- * @fileoverview Require file to end with single newline.
+ * @fileoverview Require or disallow newline at the end of files
  * @author Nodeca Team 
  */
 "use strict";
 
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const lodash = require("lodash");
+
 //------------------------------------------------------------------------------
 // Rule Definition
 //------------------------------------------------------------------------------
@@ -11,20 +17,17 @@
 module.exports = {
     meta: {
         docs: {
-            description: "enforce at least one newline at the end of files",
+            description: "require or disallow newline at the end of files",
             category: "Stylistic Issues",
             recommended: false
         },
-
         fixable: "whitespace",
-
         schema: [
             {
-                enum: ["unix", "windows"]
+                enum: ["always", "never", "unix", "windows"]
             }
         ]
     },
-
     create(context) {
 
         //--------------------------------------------------------------------------
@@ -32,31 +35,60 @@ module.exports = {
         //--------------------------------------------------------------------------
 
         return {
-
             Program: function checkBadEOF(node) {
-
                 const sourceCode = context.getSourceCode(),
                     src = sourceCode.getText(),
-                    location = {column: 1},
-                    linebreakStyle = context.options[0] || "unix",
-                    linebreak = linebreakStyle === "unix" ? "\n" : "\r\n";
+                    location = {
+                        column: lodash.last(sourceCode.lines).length,
+                        line: sourceCode.lines.length
+                    },
+                    LF = "\n",
+                    CRLF = `\r${LF}`,
+                    endsWithNewline = lodash.endsWith(src, LF);
+
+                let mode = context.options[0] || "always",
+                    appendCRLF = false;
+
+                if (mode === "unix") {
+
+                    // `"unix"` should behave exactly as `"always"`
+                    mode = "always";
+                }
+                if (mode === "windows") {
 
-                if (src[src.length - 1] !== "\n") {
+                    // `"windows"` should behave exactly as `"always"`, but append CRLF in the fixer for backwards compatibility
+                    mode = "always";
+                    appendCRLF = true;
+                }
+                if (mode === "always" && !endsWithNewline) {
 
-                    // file is not newline-terminated
-                    location.line = src.split(/\n/g).length;
+                    // File is not newline-terminated, but should be
                     context.report({
                         node,
                         loc: location,
                         message: "Newline required at end of file but not found.",
                         fix(fixer) {
-                            return fixer.insertTextAfterRange([0, src.length], linebreak);
+                            return fixer.insertTextAfterRange([0, src.length], appendCRLF ? CRLF : LF);
+                        }
+                    });
+                } else if (mode === "never" && endsWithNewline) {
+
+                    // File is newline-terminated, but shouldn't be
+                    context.report({
+                        node,
+                        loc: location,
+                        message: "Newline not allowed at end of file.",
+                        fix(fixer) {
+                            const finalEOLs = /(?:\r?\n)+$/,
+                                match = finalEOLs.exec(sourceCode.text),
+                                start = match.index,
+                                end = sourceCode.text.length;
+
+                            return fixer.replaceTextRange([start, end], "");
                         }
                     });
                 }
             }
-
         };
-
     }
 };
diff --git a/tools/eslint/lib/rules/func-call-spacing.js b/tools/eslint/lib/rules/func-call-spacing.js
index 36699ee52ae6a7..417f2bdf313e17 100644
--- a/tools/eslint/lib/rules/func-call-spacing.js
+++ b/tools/eslint/lib/rules/func-call-spacing.js
@@ -12,7 +12,7 @@
 module.exports = {
     meta: {
         docs: {
-            description: "require or disallow spacing between `function` identifiers and their invocations",
+            description: "require or disallow spacing between function identifiers and their invocations",
             category: "Stylistic Issues",
             recommended: false
         },
diff --git a/tools/eslint/lib/rules/func-name-matching.js b/tools/eslint/lib/rules/func-name-matching.js
new file mode 100644
index 00000000000000..d4d760cbe45f1b
--- /dev/null
+++ b/tools/eslint/lib/rules/func-name-matching.js
@@ -0,0 +1,149 @@
+/**
+ * @fileoverview Rule to require function names to match the name of the variable or property to which they are assigned.
+ * @author Annie Zhang, Pavel Strashkin
+ */
+
+"use strict";
+
+//--------------------------------------------------------------------------
+// Requirements
+//--------------------------------------------------------------------------
+
+const astUtils = require("../ast-utils");
+const esutils = require("esutils");
+
+//--------------------------------------------------------------------------
+// Helpers
+//--------------------------------------------------------------------------
+
+/**
+ * Determines if a pattern is `module.exports` or `module["exports"]`
+ * @param {ASTNode} pattern The left side of the AssignmentExpression
+ * @returns {boolean} True if the pattern is `module.exports` or `module["exports"]`
+ */
+function isModuleExports(pattern) {
+    if (pattern.type === "MemberExpression" && pattern.object.type === "Identifier" && pattern.object.name === "module") {
+
+        // module.exports
+        if (pattern.property.type === "Identifier" && pattern.property.name === "exports") {
+            return true;
+        }
+
+        // module["exports"]
+        if (pattern.property.type === "Literal" && pattern.property.value === "exports") {
+            return true;
+        }
+    }
+    return false;
+}
+
+/**
+ * Determines if a string name is a valid identifier
+ * @param {string} name The string to be checked
+ * @param {int} ecmaVersion The ECMAScript version if specified in the parserOptions config
+ * @returns {boolean} True if the string is a valid identifier
+ */
+function isIdentifier(name, ecmaVersion) {
+    if (ecmaVersion >= 6) {
+        return esutils.keyword.isIdentifierES6(name);
+    }
+    return esutils.keyword.isIdentifierES5(name);
+}
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+module.exports = {
+    meta: {
+        docs: {
+            description: "require function names to match the name of the variable or property to which they are assigned",
+            category: "Stylistic Issues",
+            recommended: false
+        },
+
+        schema: [
+            {
+                type: "object",
+                properties: {
+                    includeCommonJSModuleExports: {
+                        type: "boolean"
+                    }
+                },
+                additionalProperties: false
+            }
+        ]
+    },
+
+    create(context) {
+
+        const includeModuleExports = context.options[0] && context.options[0].includeCommonJSModuleExports;
+        const ecmaVersion = context.parserOptions && context.parserOptions.ecmaVersion ? context.parserOptions.ecmaVersion : 5;
+
+        /**
+         * Reports
+         * @param {ASTNode} node The node to report
+         * @param {string} name The variable or property name
+         * @param {string} funcName The function name
+         * @param {boolean} isProp True if the reported node is a property assignment
+         * @returns {void}
+         */
+        function report(node, name, funcName, isProp) {
+            context.report({
+                node,
+                message: isProp ? "Function name `{{funcName}}` should match property name `{{name}}`"
+                                : "Function name `{{funcName}}` should match variable name `{{name}}`",
+                data: {
+                    name,
+                    funcName
+                }
+            });
+        }
+
+        //--------------------------------------------------------------------------
+        // Public
+        //--------------------------------------------------------------------------
+
+        return {
+
+            VariableDeclarator(node) {
+                if (!node.init || node.init.type !== "FunctionExpression") {
+                    return;
+                }
+                if (node.init.id && node.id.name !== node.init.id.name) {
+                    report(node, node.id.name, node.init.id.name, false);
+                }
+            },
+
+            AssignmentExpression(node) {
+                if (node.right.type !== "FunctionExpression" ||
+                   (node.left.computed && node.left.property.type !== "Literal") ||
+                    (!includeModuleExports && isModuleExports(node.left))
+                   ) {
+                    return;
+                }
+
+                const isProp = node.left.type === "MemberExpression" ? true : false;
+                const name = isProp ? astUtils.getStaticPropertyName(node.left) : node.left.name;
+
+                if (node.right.id && isIdentifier(name) && name !== node.right.id.name) {
+                    report(node, name, node.right.id.name, isProp);
+                }
+            },
+
+            Property(node) {
+                if (node.value.type !== "FunctionExpression" || !node.value.id || node.computed && node.key.type !== "Literal") {
+                    return;
+                }
+                if (node.key.type === "Identifier" && node.key.name !== node.value.id.name) {
+                    report(node, node.key.name, node.value.id.name, true);
+                } else if (node.key.type === "Literal" &&
+                           isIdentifier(node.key.value, ecmaVersion) &&
+                           node.key.value !== node.value.id.name
+                          ) {
+                    report(node, node.key.value, node.value.id.name, true);
+                }
+            }
+        };
+    }
+};
diff --git a/tools/eslint/lib/rules/id-length.js b/tools/eslint/lib/rules/id-length.js
index d3a942cd040bed..1747552707901c 100644
--- a/tools/eslint/lib/rules/id-length.js
+++ b/tools/eslint/lib/rules/id-length.js
@@ -61,7 +61,9 @@ module.exports = {
                 return !parent.computed && (
 
                     // regular property assignment
-                    (parent.parent.left === parent || // or the last identifier in an ObjectPattern destructuring
+                    (parent.parent.left === parent && parent.parent.type === "AssignmentExpression" ||
+
+                    // or the last identifier in an ObjectPattern destructuring
                     parent.parent.type === "Property" && parent.parent.value === parent &&
                     parent.parent.parent.type === "ObjectPattern" && parent.parent.parent.parent.left === parent.parent.parent)
                 );
diff --git a/tools/eslint/lib/rules/indent.js b/tools/eslint/lib/rules/indent.js
index f723fbfca7eb41..2b069011f99d02 100644
--- a/tools/eslint/lib/rules/indent.js
+++ b/tools/eslint/lib/rules/indent.js
@@ -121,8 +121,6 @@ module.exports = {
     },
 
     create(context) {
-
-        const MESSAGE = "Expected indentation of {{needed}} {{type}} {{characters}} but found {{gotten}}.";
         const DEFAULT_VARIABLE_INDENT = 1;
         const DEFAULT_PARAMETER_INDENT = null; // For backwards compatibility, don't check parameter indentation unless specified in the config
         const DEFAULT_FUNCTION_BODY_INDENT = 1;
@@ -192,92 +190,67 @@ module.exports = {
             }
         }
 
-        const indentPattern = {
-            normal: indentType === "space" ? /^ +/ : /^\t+/,
-            excludeCommas: indentType === "space" ? /^[ ,]+/ : /^[\t,]+/
-        };
-
         const caseIndentStore = {};
 
         /**
-         * Reports a given indent violation and properly pluralizes the message
+         * Creates an error message for a line, given the expected/actual indentation.
+         * @param {int} expectedAmount The expected amount of indentation characters for this line
+         * @param {int} actualSpaces The actual number of indentation spaces that were found on this line
+         * @param {int} actualTabs The actual number of indentation tabs that were found on this line
+         * @returns {string} An error message for this line
+         */
+        function createErrorMessage(expectedAmount, actualSpaces, actualTabs) {
+            const expectedStatement = `${expectedAmount} ${indentType}${expectedAmount === 1 ? "" : "s"}`; // e.g. "2 tabs"
+            const foundSpacesWord = `space${actualSpaces === 1 ? "" : "s"}`; // e.g. "space"
+            const foundTabsWord = `tab${actualTabs === 1 ? "" : "s"}`; // e.g. "tabs"
+            let foundStatement;
+
+            if (actualSpaces > 0 && actualTabs > 0) {
+                foundStatement = `${actualSpaces} ${foundSpacesWord} and ${actualTabs} ${foundTabsWord}`; // e.g. "1 space and 2 tabs"
+            } else if (actualSpaces > 0) {
+
+                // Abbreviate the message if the expected indentation is also spaces.
+                // e.g. 'Expected 4 spaces but found 2' rather than 'Expected 4 spaces but found 2 spaces'
+                foundStatement = indentType === "space" ? actualSpaces : `${actualSpaces} ${foundSpacesWord}`;
+            } else if (actualTabs > 0) {
+                foundStatement = indentType === "tab" ? actualTabs : `${actualTabs} ${foundTabsWord}`;
+            } else {
+                foundStatement = "0";
+            }
+
+            return `Expected indentation of ${expectedStatement} but found ${foundStatement}.`;
+        }
+
+        /**
+         * Reports a given indent violation
          * @param {ASTNode} node Node violating the indent rule
          * @param {int} needed Expected indentation character count
-         * @param {int} gotten Indentation character count in the actual node/code
+         * @param {int} gottenSpaces Indentation space count in the actual node/code
+         * @param {int} gottenTabs Indentation tab count in the actual node/code
          * @param {Object=} loc Error line and column location
          * @param {boolean} isLastNodeCheck Is the error for last node check
          * @returns {void}
          */
-        function report(node, needed, gotten, loc, isLastNodeCheck) {
-            const msgContext = {
-                needed,
-                type: indentType,
-                characters: needed === 1 ? "character" : "characters",
-                gotten
-            };
-            const indentChar = indentType === "space" ? " " : "\t";
-
-            /**
-             * Responsible for fixing the indentation issue fix
-             * @returns {Function} function to be executed by the fixer
-             * @private
-             */
-            function getFixerFunction() {
-                let rangeToFix = [];
+        function report(node, needed, gottenSpaces, gottenTabs, loc, isLastNodeCheck) {
 
-                if (needed > gotten) {
-                    const spaces = indentChar.repeat(needed - gotten);
+            if (gottenSpaces && gottenTabs) {
 
-                    if (isLastNodeCheck === true) {
-                        rangeToFix = [
-                            node.range[1] - 1,
-                            node.range[1] - 1
-                        ];
-                    } else {
-                        rangeToFix = [
-                            node.range[0],
-                            node.range[0]
-                        ];
-                    }
+                // To avoid conflicts with `no-mixed-spaces-and-tabs`, don't report lines that have both spaces and tabs.
+                return;
+            }
 
-                    return function(fixer) {
-                        return fixer.insertTextBeforeRange(rangeToFix, spaces);
-                    };
-                } else {
-                    if (isLastNodeCheck === true) {
-                        rangeToFix = [
-                            node.range[1] - (gotten - needed) - 1,
-                            node.range[1] - 1
-                        ];
-                    } else {
-                        rangeToFix = [
-                            node.range[0] - (gotten - needed),
-                            node.range[0]
-                        ];
-                    }
+            const desiredIndent = (indentType === "space" ? " " : "\t").repeat(needed);
 
-                    return function(fixer) {
-                        return fixer.removeRange(rangeToFix);
-                    };
-                }
-            }
+            const textRange = isLastNodeCheck
+                ? [node.range[1] - gottenSpaces - gottenTabs - 1, node.range[1] - 1]
+                : [node.range[0] - gottenSpaces - gottenTabs, node.range[0]];
 
-            if (loc) {
-                context.report({
-                    node,
-                    loc,
-                    message: MESSAGE,
-                    data: msgContext,
-                    fix: getFixerFunction()
-                });
-            } else {
-                context.report({
-                    node,
-                    message: MESSAGE,
-                    data: msgContext,
-                    fix: getFixerFunction()
-                });
-            }
+            context.report({
+                node,
+                loc,
+                message: createErrorMessage(needed, gottenSpaces, gottenTabs),
+                fix: fixer => fixer.replaceTextRange(textRange, desiredIndent)
+            });
         }
 
         /**
@@ -285,15 +258,23 @@ module.exports = {
          * @param {ASTNode|Token} node Node to examine
          * @param {boolean} [byLastLine=false] get indent of node's last line
          * @param {boolean} [excludeCommas=false] skip comma on start of line
-         * @returns {int} Indent
+         * @returns {Object} The node's indent. Contains keys `space` and `tab`, representing the indent of each character. Also
+         contains keys `goodChar` and `badChar`, where `goodChar` is the amount of the user's desired indentation character, and
+         `badChar` is the amount of the other indentation character.
          */
-        function getNodeIndent(node, byLastLine, excludeCommas) {
+        function getNodeIndent(node, byLastLine) {
             const token = byLastLine ? sourceCode.getLastToken(node) : sourceCode.getFirstToken(node);
-            const src = sourceCode.getText(token, token.loc.start.column);
-            const regExp = excludeCommas ? indentPattern.excludeCommas : indentPattern.normal;
-            const indent = regExp.exec(src);
-
-            return indent ? indent[0].length : 0;
+            const srcCharsBeforeNode = sourceCode.getText(token, token.loc.start.column).split("");
+            const indentChars = srcCharsBeforeNode.slice(0, srcCharsBeforeNode.findIndex(char => char !== " " && char !== "\t"));
+            const spaces = indentChars.filter(char => char === " ").length;
+            const tabs = indentChars.filter(char => char === "\t").length;
+
+            return {
+                space: spaces,
+                tab: tabs,
+                goodChar: indentType === "space" ? spaces : tabs,
+                badChar: indentType === "space" ? tabs : spaces
+            };
         }
 
         /**
@@ -313,27 +294,29 @@ module.exports = {
         /**
          * Check indent for node
          * @param {ASTNode} node Node to check
-         * @param {int} indent needed indent
+         * @param {int} neededIndent needed indent
          * @param {boolean} [excludeCommas=false] skip comma on start of line
          * @returns {void}
          */
-        function checkNodeIndent(node, indent, excludeCommas) {
-            const nodeIndent = getNodeIndent(node, false, excludeCommas);
+        function checkNodeIndent(node, neededIndent) {
+            const actualIndent = getNodeIndent(node, false);
 
             if (
-                node.type !== "ArrayExpression" && node.type !== "ObjectExpression" &&
-                nodeIndent !== indent && isNodeFirstInLine(node)
+                node.type !== "ArrayExpression" &&
+                node.type !== "ObjectExpression" &&
+                (actualIndent.goodChar !== neededIndent || actualIndent.badChar !== 0) &&
+                isNodeFirstInLine(node)
             ) {
-                report(node, indent, nodeIndent);
+                report(node, neededIndent, actualIndent.space, actualIndent.tab);
             }
 
             if (node.type === "IfStatement" && node.alternate) {
                 const elseToken = sourceCode.getTokenBefore(node.alternate);
 
-                checkNodeIndent(elseToken, indent, excludeCommas);
+                checkNodeIndent(elseToken, neededIndent);
 
                 if (!isNodeFirstInLine(node.alternate)) {
-                    checkNodeIndent(node.alternate, indent, excludeCommas);
+                    checkNodeIndent(node.alternate, neededIndent);
                 }
             }
         }
@@ -345,8 +328,8 @@ module.exports = {
          * @param {boolean} [excludeCommas=false] skip comma on start of line
          * @returns {void}
          */
-        function checkNodesIndent(nodes, indent, excludeCommas) {
-            nodes.forEach(node => checkNodeIndent(node, indent, excludeCommas));
+        function checkNodesIndent(nodes, indent) {
+            nodes.forEach(node => checkNodeIndent(node, indent));
         }
 
         /**
@@ -359,11 +342,12 @@ module.exports = {
             const lastToken = sourceCode.getLastToken(node);
             const endIndent = getNodeIndent(lastToken, true);
 
-            if (endIndent !== lastLineIndent && isNodeFirstInLine(node, true)) {
+            if ((endIndent.goodChar !== lastLineIndent || endIndent.badChar !== 0) && isNodeFirstInLine(node, true)) {
                 report(
                     node,
                     lastLineIndent,
-                    endIndent,
+                    endIndent.space,
+                    endIndent.tab,
                     { line: lastToken.loc.start.line, column: lastToken.loc.start.column },
                     true
                 );
@@ -379,11 +363,12 @@ module.exports = {
         function checkFirstNodeLineIndent(node, firstLineIndent) {
             const startIndent = getNodeIndent(node, false);
 
-            if (startIndent !== firstLineIndent && isNodeFirstInLine(node)) {
+            if ((startIndent.goodChar !== firstLineIndent || startIndent.badChar !== 0) && isNodeFirstInLine(node)) {
                 report(
                     node,
                     firstLineIndent,
-                    startIndent,
+                    startIndent.space,
+                    startIndent.tab,
                     { line: node.loc.start.line, column: node.loc.start.column }
                 );
             }
@@ -526,11 +511,11 @@ module.exports = {
                 calleeNode.parent.type === "ArrayExpression")) {
 
                 // If function is part of array or object, comma can be put at left
-                indent = getNodeIndent(calleeNode, false, false);
+                indent = getNodeIndent(calleeNode, false, false).goodChar;
             } else {
 
                 // If function is standalone, simple calculate indent
-                indent = getNodeIndent(calleeNode);
+                indent = getNodeIndent(calleeNode).goodChar;
             }
 
             if (calleeNode.parent.type === "CallExpression") {
@@ -538,13 +523,13 @@ module.exports = {
 
                 if (calleeNode.type !== "FunctionExpression" && calleeNode.type !== "ArrowFunctionExpression") {
                     if (calleeParent && calleeParent.loc.start.line < node.loc.start.line) {
-                        indent = getNodeIndent(calleeParent);
+                        indent = getNodeIndent(calleeParent).goodChar;
                     }
                 } else {
                     if (isArgBeforeCalleeNodeMultiline(calleeNode) &&
                         calleeParent.callee.loc.start.line === calleeParent.callee.loc.end.line &&
                         !isNodeFirstInLine(calleeNode)) {
-                        indent = getNodeIndent(calleeParent);
+                        indent = getNodeIndent(calleeParent).goodChar;
                     }
                 }
             }
@@ -644,7 +629,7 @@ module.exports = {
                         effectiveParent = parent.parent;
                     }
                 }
-                nodeIndent = getNodeIndent(effectiveParent);
+                nodeIndent = getNodeIndent(effectiveParent).goodChar;
                 if (parentVarNode && parentVarNode.loc.start.line !== node.loc.start.line) {
                     if (parent.type !== "VariableDeclarator" || parentVarNode === parentVarNode.parent.declarations[0]) {
                         if (parent.type === "VariableDeclarator" && parentVarNode.loc.start.line === effectiveParent.loc.start.line) {
@@ -654,7 +639,8 @@ module.exports = {
                             parent.type === "ArrayExpression" ||
                             parent.type === "CallExpression" ||
                             parent.type === "ArrowFunctionExpression" ||
-                            parent.type === "NewExpression"
+                            parent.type === "NewExpression" ||
+                            parent.type === "LogicalExpression"
                         ) {
                             nodeIndent = nodeIndent + indentSize;
                         }
@@ -667,7 +653,7 @@ module.exports = {
 
                 checkFirstNodeLineIndent(node, nodeIndent);
             } else {
-                nodeIndent = getNodeIndent(node);
+                nodeIndent = getNodeIndent(node).goodChar;
                 elementsIndent = nodeIndent + indentSize;
             }
 
@@ -679,8 +665,7 @@ module.exports = {
                 elementsIndent += indentSize * options.VariableDeclarator[parentVarNode.parent.kind];
             }
 
-            // Comma can be placed before property name
-            checkNodesIndent(elements, elementsIndent, true);
+            checkNodesIndent(elements, elementsIndent);
 
             if (elements.length > 0) {
 
@@ -736,9 +721,9 @@ module.exports = {
             ];
 
             if (node.parent && statementsWithProperties.indexOf(node.parent.type) !== -1 && isNodeBodyBlock(node)) {
-                indent = getNodeIndent(node.parent);
+                indent = getNodeIndent(node.parent).goodChar;
             } else {
-                indent = getNodeIndent(node);
+                indent = getNodeIndent(node).goodChar;
             }
 
             if (node.type === "IfStatement" && node.consequent.type !== "BlockStatement") {
@@ -784,13 +769,12 @@ module.exports = {
          */
         function checkIndentInVariableDeclarations(node) {
             const elements = filterOutSameLineVars(node);
-            const nodeIndent = getNodeIndent(node);
+            const nodeIndent = getNodeIndent(node).goodChar;
             const lastElement = elements[elements.length - 1];
 
             const elementsIndent = nodeIndent + indentSize * options.VariableDeclarator[node.kind];
 
-            // Comma can be placed before declaration
-            checkNodesIndent(elements, elementsIndent, true);
+            checkNodesIndent(elements, elementsIndent);
 
             // Only check the last line if there is any token after the last item
             if (sourceCode.getLastToken(node).loc.end.line <= lastElement.loc.end.line) {
@@ -802,7 +786,7 @@ module.exports = {
             if (tokenBeforeLastElement.value === ",") {
 
                 // Special case for comma-first syntax where the semicolon is indented
-                checkLastNodeLineIndent(node, getNodeIndent(tokenBeforeLastElement));
+                checkLastNodeLineIndent(node, getNodeIndent(tokenBeforeLastElement).goodChar);
             } else {
                 checkLastNodeLineIndent(node, elementsIndent - indentSize);
             }
@@ -834,7 +818,7 @@ module.exports = {
                 return caseIndentStore[switchNode.loc.start.line];
             } else {
                 if (typeof switchIndent === "undefined") {
-                    switchIndent = getNodeIndent(switchNode);
+                    switchIndent = getNodeIndent(switchNode).goodChar;
                 }
 
                 if (switchNode.cases.length > 0 && options.SwitchCase === 0) {
@@ -853,7 +837,7 @@ module.exports = {
                 if (node.body.length > 0) {
 
                     // Root nodes should have no indent
-                    checkNodesIndent(node.body, getNodeIndent(node));
+                    checkNodesIndent(node.body, getNodeIndent(node).goodChar);
                 }
             },
 
@@ -912,7 +896,7 @@ module.exports = {
                     return;
                 }
 
-                const propertyIndent = getNodeIndent(node) + indentSize * options.MemberExpression;
+                const propertyIndent = getNodeIndent(node).goodChar + indentSize * options.MemberExpression;
 
                 const checkNodes = [node.property];
 
@@ -928,7 +912,7 @@ module.exports = {
             SwitchStatement(node) {
 
                 // Switch is not a 'BlockStatement'
-                const switchIndent = getNodeIndent(node);
+                const switchIndent = getNodeIndent(node).goodChar;
                 const caseIndent = expectedCaseIndent(node, switchIndent);
 
                 checkNodesIndent(node.cases, caseIndent);
@@ -955,7 +939,7 @@ module.exports = {
                 if (options.FunctionDeclaration.parameters === "first" && node.params.length) {
                     checkNodesIndent(node.params.slice(1), node.params[0].loc.start.column);
                 } else if (options.FunctionDeclaration.parameters !== null) {
-                    checkNodesIndent(node.params, indentSize * options.FunctionDeclaration.parameters);
+                    checkNodesIndent(node.params, getNodeIndent(node).goodChar + indentSize * options.FunctionDeclaration.parameters);
                 }
             },
 
@@ -966,7 +950,7 @@ module.exports = {
                 if (options.FunctionExpression.parameters === "first" && node.params.length) {
                     checkNodesIndent(node.params.slice(1), node.params[0].loc.start.column);
                 } else if (options.FunctionExpression.parameters !== null) {
-                    checkNodesIndent(node.params, indentSize * options.FunctionExpression.parameters);
+                    checkNodesIndent(node.params, getNodeIndent(node).goodChar + indentSize * options.FunctionExpression.parameters);
                 }
             }
         };
diff --git a/tools/eslint/lib/rules/init-declarations.js b/tools/eslint/lib/rules/init-declarations.js
index c6f63840b527e7..1f53f3dfc482db 100644
--- a/tools/eslint/lib/rules/init-declarations.js
+++ b/tools/eslint/lib/rules/init-declarations.js
@@ -45,7 +45,7 @@ function isInitialized(node) {
 module.exports = {
     meta: {
         docs: {
-            description: "require or disallow initialization in `var` declarations",
+            description: "require or disallow initialization in variable declarations",
             category: "Variables",
             recommended: false
         },
diff --git a/tools/eslint/lib/rules/keyword-spacing.js b/tools/eslint/lib/rules/keyword-spacing.js
index 8e4b774b727ea6..4a6a024552111c 100644
--- a/tools/eslint/lib/rules/keyword-spacing.js
+++ b/tools/eslint/lib/rules/keyword-spacing.js
@@ -23,7 +23,7 @@ const NEXT_TOKEN_M = /^[\{*]$/;
 const TEMPLATE_OPEN_PAREN = /\$\{$/;
 const TEMPLATE_CLOSE_PAREN = /^\}/;
 const CHECK_TYPE = /^(?:JSXElement|RegularExpression|String|Template)$/;
-const KEYS = keywords.concat(["as", "await", "from", "get", "let", "of", "set", "yield"]);
+const KEYS = keywords.concat(["as", "async", "await", "from", "get", "let", "of", "set", "yield"]);
 
 // check duplications.
 (function() {
@@ -352,6 +352,23 @@ module.exports = {
             }
         }
 
+        /**
+         * Reports `async` or `function` keywords of a given node if usage of
+         * spacing around those keywords is invalid.
+         *
+         * @param {ASTNode} node - A node to report.
+         * @returns {void}
+         */
+        function checkSpacingForFunction(node) {
+            const firstToken = node && sourceCode.getFirstToken(node);
+
+            if (firstToken &&
+                (firstToken.type === "Keyword" || firstToken.value === "async")
+            ) {
+                checkSpacingBefore(firstToken);
+            }
+        }
+
         /**
          * Reports `class` and `extends` keywords of a given node if usage of
          * spacing around those keywords is invalid.
@@ -482,7 +499,13 @@ module.exports = {
             if (node.static) {
                 checkSpacingAroundFirstToken(node);
             }
-            if (node.kind === "get" || node.kind === "set") {
+            if (node.kind === "get" ||
+                node.kind === "set" ||
+                (
+                    (node.method || node.type === "MethodDefinition") &&
+                    node.value.async
+                )
+            ) {
                 const token = sourceCode.getFirstToken(
                     node,
                     node.static ? 1 : 0
@@ -492,6 +515,17 @@ module.exports = {
             }
         }
 
+        /**
+         * Reports `await` keyword of a given node if usage of spacing before
+         * this keyword is invalid.
+         *
+         * @param {ASTNode} node - A node to report.
+         * @returns {void}
+         */
+        function checkSpacingForAwaitExpression(node) {
+            checkSpacingBefore(sourceCode.getFirstToken(node));
+        }
+
         return {
 
             // Statements
@@ -522,13 +556,15 @@ module.exports = {
             ExportNamedDeclaration: checkSpacingForModuleDeclaration,
             ExportDefaultDeclaration: checkSpacingAroundFirstToken,
             ExportAllDeclaration: checkSpacingForModuleDeclaration,
-            FunctionDeclaration: checkSpacingBeforeFirstToken,
+            FunctionDeclaration: checkSpacingForFunction,
             ImportDeclaration: checkSpacingForModuleDeclaration,
             VariableDeclaration: checkSpacingAroundFirstToken,
 
             // Expressions
+            ArrowFunctionExpression: checkSpacingForFunction,
+            AwaitExpression: checkSpacingForAwaitExpression,
             ClassExpression: checkSpacingForClass,
-            FunctionExpression: checkSpacingBeforeFirstToken,
+            FunctionExpression: checkSpacingForFunction,
             NewExpression: checkSpacingBeforeFirstToken,
             Super: checkSpacingBeforeFirstToken,
             ThisExpression: checkSpacingBeforeFirstToken,
diff --git a/tools/eslint/lib/rules/line-comment-position.js b/tools/eslint/lib/rules/line-comment-position.js
index cd4c9a9fd8a15b..fa2384e88a8583 100644
--- a/tools/eslint/lib/rules/line-comment-position.js
+++ b/tools/eslint/lib/rules/line-comment-position.js
@@ -50,7 +50,7 @@ module.exports = {
             ignorePattern,
             applyDefaultPatterns = true;
 
-        if (!options || typeof option === "string") {
+        if (!options || typeof options === "string") {
             above = !options || options === "above";
 
         } else {
diff --git a/tools/eslint/lib/rules/lines-around-directive.js b/tools/eslint/lib/rules/lines-around-directive.js
index 15a7779d7c0314..f0f0ebd0b9037b 100644
--- a/tools/eslint/lib/rules/lines-around-directive.js
+++ b/tools/eslint/lib/rules/lines-around-directive.js
@@ -37,7 +37,8 @@ module.exports = {
                     minProperties: 2
                 }
             ]
-        }]
+        }],
+        fixable: "whitespace"
     },
 
     create(context) {
@@ -88,6 +89,12 @@ module.exports = {
                     expected: expected ? "Expected" : "Unexpected",
                     value: node.expression.value,
                     location
+                },
+                fix(fixer) {
+                    if (expected) {
+                        return location === "before" ? fixer.insertTextBefore(node, "\n") : fixer.insertTextAfter(node, "\n");
+                    }
+                    return fixer.removeRange(location === "before" ? [node.range[0] - 1, node.range[0]] : [node.range[1], node.range[1] + 1]);
                 }
             });
         }
diff --git a/tools/eslint/lib/rules/max-len.js b/tools/eslint/lib/rules/max-len.js
index 8ef12b4cd8eb1a..d1f6df2996f9aa 100644
--- a/tools/eslint/lib/rules/max-len.js
+++ b/tools/eslint/lib/rules/max-len.js
@@ -107,7 +107,7 @@ module.exports = {
 
                 extraCharacterCount += spaceCount - 1;  // -1 for the replaced tab
             });
-            return line.length + extraCharacterCount;
+            return Array.from(line).length + extraCharacterCount;
         }
 
         // The options object must be the last option specified…
@@ -235,8 +235,9 @@ module.exports = {
          * @private
          */
         function groupByLineNumber(acc, node) {
-            ensureArrayAndPush(acc, node.loc.start.line, node);
-            ensureArrayAndPush(acc, node.loc.end.line, node);
+            for (let i = node.loc.start.line; i <= node.loc.end.line; ++i) {
+                ensureArrayAndPush(acc, i, node);
+            }
             return acc;
         }
 
diff --git a/tools/eslint/lib/rules/max-params.js b/tools/eslint/lib/rules/max-params.js
index 165362556c2780..fc84efcd40b285 100644
--- a/tools/eslint/lib/rules/max-params.js
+++ b/tools/eslint/lib/rules/max-params.js
@@ -12,7 +12,7 @@
 module.exports = {
     meta: {
         docs: {
-            description: "enforce a maximum number of parameters in `function` definitions",
+            description: "enforce a maximum number of parameters in function definitions",
             category: "Stylistic Issues",
             recommended: false
         },
diff --git a/tools/eslint/lib/rules/max-statements-per-line.js b/tools/eslint/lib/rules/max-statements-per-line.js
index 1ee83fe0e7af99..888ec37eda0fb9 100644
--- a/tools/eslint/lib/rules/max-statements-per-line.js
+++ b/tools/eslint/lib/rules/max-statements-per-line.js
@@ -22,7 +22,7 @@ module.exports = {
                 properties: {
                     max: {
                         type: "integer",
-                        minimum: 0
+                        minimum: 1
                     }
                 },
                 additionalProperties: false
@@ -185,23 +185,7 @@ module.exports = {
             "ExportNamedDeclaration:exit": leaveStatement,
             "ExportDefaultDeclaration:exit": leaveStatement,
             "ExportAllDeclaration:exit": leaveStatement,
-            "Program:exit": reportFirstExtraStatementAndClear,
-
-            // For backward compatibility.
-            // Empty blocks should be warned if `{max: 0}` was given.
-            BlockStatement: function reportIfZero(node) {
-                if (maxStatementsPerLine === 0 && node.body.length === 0) {
-                    context.report({
-                        node,
-                        message,
-                        data: {
-                            numberOfStatementsOnThisLine: 0,
-                            maxStatementsPerLine,
-                            statements: "statements",
-                        }
-                    });
-                }
-            }
+            "Program:exit": reportFirstExtraStatementAndClear
         };
     }
 };
diff --git a/tools/eslint/lib/rules/max-statements.js b/tools/eslint/lib/rules/max-statements.js
index b2dc2b4d73fdcb..1232930c6e68f1 100644
--- a/tools/eslint/lib/rules/max-statements.js
+++ b/tools/eslint/lib/rules/max-statements.js
@@ -12,7 +12,7 @@
 module.exports = {
     meta: {
         docs: {
-            description: "enforce a maximum number of statements allowed in `function` blocks",
+            description: "enforce a maximum number of statements allowed in function blocks",
             category: "Stylistic Issues",
             recommended: false
         },
diff --git a/tools/eslint/lib/rules/new-cap.js b/tools/eslint/lib/rules/new-cap.js
index 17a697e95e6e76..6fcd582a694d1a 100644
--- a/tools/eslint/lib/rules/new-cap.js
+++ b/tools/eslint/lib/rules/new-cap.js
@@ -75,7 +75,7 @@ function calculateCapIsNewExceptions(config) {
 module.exports = {
     meta: {
         docs: {
-            description: "require constructor `function` names to begin with a capital letter",
+            description: "require constructor names to begin with a capital letter",
             category: "Stylistic Issues",
             recommended: false
         },
diff --git a/tools/eslint/lib/rules/newline-after-var.js b/tools/eslint/lib/rules/newline-after-var.js
index bf837258d94844..440652b1c10696 100644
--- a/tools/eslint/lib/rules/newline-after-var.js
+++ b/tools/eslint/lib/rules/newline-after-var.js
@@ -12,7 +12,7 @@
 module.exports = {
     meta: {
         docs: {
-            description: "require or disallow an empty line after `var` declarations",
+            description: "require or disallow an empty line after variable declarations",
             category: "Stylistic Issues",
             recommended: false
         },
diff --git a/tools/eslint/lib/rules/no-extra-bind.js b/tools/eslint/lib/rules/no-extra-bind.js
index 544a12b9f09468..c2795998c66e48 100644
--- a/tools/eslint/lib/rules/no-extra-bind.js
+++ b/tools/eslint/lib/rules/no-extra-bind.js
@@ -22,7 +22,9 @@ module.exports = {
             recommended: false
         },
 
-        schema: []
+        schema: [],
+
+        fixable: "code"
     },
 
     create(context) {
@@ -39,7 +41,14 @@ module.exports = {
             context.report({
                 node: node.parent.parent,
                 message: "The function binding is unnecessary.",
-                loc: node.parent.property.loc.start
+                loc: node.parent.property.loc.start,
+                fix(fixer) {
+                    const firstTokenToRemove = context.getSourceCode()
+                        .getTokensBetween(node.parent.object, node.parent.property)
+                        .find(token => token.value !== ")");
+
+                    return fixer.removeRange([firstTokenToRemove.range[0], node.parent.parent.range[1]]);
+                }
             });
         }
 
diff --git a/tools/eslint/lib/rules/no-extra-parens.js b/tools/eslint/lib/rules/no-extra-parens.js
index 1d355cf0a313f4..efa3d53bbd3328 100644
--- a/tools/eslint/lib/rules/no-extra-parens.js
+++ b/tools/eslint/lib/rules/no-extra-parens.js
@@ -367,15 +367,15 @@ module.exports = {
          * @private
          */
         function dryBinaryLogical(node) {
-            if (!NESTED_BINARY) {
-                const prec = precedence(node);
+            const prec = precedence(node);
+            const shouldSkipLeft = NESTED_BINARY && (node.left.type === "BinaryExpression" || node.left.type === "LogicalExpression");
+            const shouldSkipRight = NESTED_BINARY && (node.right.type === "BinaryExpression" || node.right.type === "LogicalExpression");
 
-                if (hasExcessParens(node.left) && precedence(node.left) >= prec) {
-                    report(node.left);
-                }
-                if (hasExcessParens(node.right) && precedence(node.right) > prec) {
-                    report(node.right);
-                }
+            if (!shouldSkipLeft && hasExcessParens(node.left) && precedence(node.left) >= prec) {
+                report(node.left);
+            }
+            if (!shouldSkipRight && hasExcessParens(node.right) && precedence(node.right) > prec) {
+                report(node.right);
             }
         }
 
@@ -587,6 +587,7 @@ module.exports = {
 
             UnaryExpression: dryUnaryUpdate,
             UpdateExpression: dryUnaryUpdate,
+            AwaitExpression: dryUnaryUpdate,
 
             VariableDeclarator(node) {
                 if (node.init && hasExcessParens(node.init) &&
diff --git a/tools/eslint/lib/rules/no-implicit-coercion.js b/tools/eslint/lib/rules/no-implicit-coercion.js
index 3e665a2258bc06..8e8db9879ba38c 100644
--- a/tools/eslint/lib/rules/no-implicit-coercion.js
+++ b/tools/eslint/lib/rules/no-implicit-coercion.js
@@ -107,16 +107,6 @@ function getNonNumericOperand(node) {
     return null;
 }
 
-/**
- * Checks whether a node is a string literal or not.
- * @param {ASTNode} node The node to check.
- * @returns {boolean} Whether or not the passed in node is a
- * string literal or not.
- */
-function isStringLiteral(node) {
-    return astUtils.isStringLiteral(node) && node.type !== "TemplateLiteral";
-}
-
 /**
  * Checks whether a node is an empty string literal or not.
  * @param {ASTNode} node The node to check.
@@ -124,7 +114,7 @@ function isStringLiteral(node) {
  * empty string literal or not.
  */
 function isEmptyString(node) {
-    return isStringLiteral(node) && node.value === "";
+    return astUtils.isStringLiteral(node) && (node.value === "" || (node.type === "TemplateLiteral" && node.quasis.length === 1 && node.quasis[0].value.cooked === ""));
 }
 
 /**
@@ -134,8 +124,8 @@ function isEmptyString(node) {
  */
 function isConcatWithEmptyString(node) {
     return node.operator === "+" && (
-        (isEmptyString(node.left) && !isStringLiteral(node.right)) ||
-        (isEmptyString(node.right) && !isStringLiteral(node.left))
+        (isEmptyString(node.left) && !astUtils.isStringLiteral(node.right)) ||
+        (isEmptyString(node.right) && !astUtils.isStringLiteral(node.left))
     );
 }
 
@@ -202,19 +192,24 @@ module.exports = {
         * Reports an error and autofixes the node
         * @param {ASTNode} node - An ast node to report the error on.
         * @param {string} recommendation - The recommended code for the issue
+        * @param {bool} shouldFix - Whether this report should fix the node
         * @returns {void}
         */
-        function report(node, recommendation) {
-            context.report({
+        function report(node, recommendation, shouldFix) {
+            shouldFix = typeof shouldFix === "undefined" ? true : shouldFix;
+            const reportObj = {
                 node,
                 message: "use `{{recommendation}}` instead.",
                 data: {
                     recommendation
-                },
-                fix(fixer) {
-                    return fixer.replaceText(node, recommendation);
                 }
-            });
+            };
+
+            if (shouldFix) {
+                reportObj.fix = fixer => fixer.replaceText(node, recommendation);
+            }
+
+            context.report(reportObj);
         }
 
         return {
@@ -234,7 +229,7 @@ module.exports = {
                 if (!operatorAllowed && options.boolean && isBinaryNegatingOfIndexOf(node)) {
                     const recommendation = `${sourceCode.getText(node.argument)} !== -1`;
 
-                    report(node, recommendation);
+                    report(node, recommendation, false);
                 }
 
                 // +foo
diff --git a/tools/eslint/lib/rules/no-implicit-globals.js b/tools/eslint/lib/rules/no-implicit-globals.js
index ba01bd12c3836b..fd49f0c5ac3011 100644
--- a/tools/eslint/lib/rules/no-implicit-globals.js
+++ b/tools/eslint/lib/rules/no-implicit-globals.js
@@ -12,7 +12,7 @@
 module.exports = {
     meta: {
         docs: {
-            description: "disallow `var` and named `function` declarations in the global scope",
+            description: "disallow variable and `function` declarations in the global scope",
             category: "Best Practices",
             recommended: false
         },
diff --git a/tools/eslint/lib/rules/no-inner-declarations.js b/tools/eslint/lib/rules/no-inner-declarations.js
index b50ad53410258a..e5a186133cc34e 100644
--- a/tools/eslint/lib/rules/no-inner-declarations.js
+++ b/tools/eslint/lib/rules/no-inner-declarations.js
@@ -12,7 +12,7 @@
 module.exports = {
     meta: {
         docs: {
-            description: "disallow `function` or `var` declarations in nested blocks",
+            description: "disallow variable or `function` declarations in nested blocks",
             category: "Possible Errors",
             recommended: true
         },
diff --git a/tools/eslint/lib/rules/no-lonely-if.js b/tools/eslint/lib/rules/no-lonely-if.js
index 3a1f0b9daac047..19517bc3dc491a 100644
--- a/tools/eslint/lib/rules/no-lonely-if.js
+++ b/tools/eslint/lib/rules/no-lonely-if.js
@@ -16,10 +16,13 @@ module.exports = {
             recommended: false
         },
 
-        schema: []
+        schema: [],
+
+        fixable: "code"
     },
 
     create(context) {
+        const sourceCode = context.getSourceCode();
 
         return {
             IfStatement(node) {
@@ -31,7 +34,46 @@ module.exports = {
                         parent.body.length === 1 && grandparent &&
                         grandparent.type === "IfStatement" &&
                         parent === grandparent.alternate) {
-                    context.report(node, "Unexpected if as the only statement in an else block.");
+                    context.report({
+                        node,
+                        message: "Unexpected if as the only statement in an else block.",
+                        fix(fixer) {
+                            const openingElseCurly = sourceCode.getFirstToken(parent);
+                            const closingElseCurly = sourceCode.getLastToken(parent);
+                            const elseKeyword = sourceCode.getTokenBefore(openingElseCurly);
+                            const tokenAfterElseBlock = sourceCode.getTokenAfter(closingElseCurly);
+                            const lastIfToken = sourceCode.getLastToken(node.consequent);
+                            const sourceText = sourceCode.getText();
+
+                            if (sourceText.slice(openingElseCurly.range[1], node.range[0]).trim() || sourceText.slice(node.range[1], closingElseCurly.range[0]).trim()) {
+
+                                // Don't fix if there are any non-whitespace characters interfering (e.g. comments)
+                                return null;
+                            }
+
+                            if (
+                                node.consequent.type !== "BlockStatement" && lastIfToken.value !== ";" && tokenAfterElseBlock &&
+                                (
+                                    node.consequent.loc.end.line === tokenAfterElseBlock.loc.start.line ||
+                                    /^[(\[\/+`-]/.test(tokenAfterElseBlock.value) ||
+                                    lastIfToken.value === "++" ||
+                                    lastIfToken.value === "--"
+                                )
+                            ) {
+
+                                /*
+                                 * If the `if` statement has no block, and is not followed by a semicolon, make sure that fixing
+                                 * the issue would not change semantics due to ASI. If this would happen, don't do a fix.
+                                 */
+                                return null;
+                            }
+
+                            return fixer.replaceTextRange(
+                                [openingElseCurly.range[0], closingElseCurly.range[1]],
+                                (elseKeyword.range[1] === openingElseCurly.range[0] ? " " : "") + sourceCode.getText(node)
+                            );
+                        }
+                    });
                 }
             }
         };
diff --git a/tools/eslint/lib/rules/no-mixed-requires.js b/tools/eslint/lib/rules/no-mixed-requires.js
index d1199daef31147..89ba345c248f61 100644
--- a/tools/eslint/lib/rules/no-mixed-requires.js
+++ b/tools/eslint/lib/rules/no-mixed-requires.js
@@ -12,7 +12,7 @@
 module.exports = {
     meta: {
         docs: {
-            description: "disallow `require` calls to be mixed with regular `var` declarations",
+            description: "disallow `require` calls to be mixed with regular variable declarations",
             category: "Node.js and CommonJS",
             recommended: false
         },
diff --git a/tools/eslint/lib/rules/no-multiple-empty-lines.js b/tools/eslint/lib/rules/no-multiple-empty-lines.js
index 679c4f69c73f14..9d44064d23f1d3 100644
--- a/tools/eslint/lib/rules/no-multiple-empty-lines.js
+++ b/tools/eslint/lib/rules/no-multiple-empty-lines.js
@@ -46,11 +46,8 @@ module.exports = {
 
         // Use options.max or 2 as default
         let max = 2,
-            maxEOF,
-            maxBOF;
-
-        // store lines that appear empty but really aren't
-        const notEmpty = [];
+            maxEOF = max,
+            maxBOF = max;
 
         if (context.options.length) {
             max = context.options[0].max;
@@ -59,159 +56,64 @@ module.exports = {
         }
 
         const sourceCode = context.getSourceCode();
+        const fullLines = sourceCode.text.match(/.*(\r\n|\r|\n|\u2028|\u2029)/g) || [];
+        const lineStartLocations = fullLines.reduce((startIndices, nextLine) => startIndices.concat(startIndices[startIndices.length - 1] + nextLine.length), [0]);
+
+        // Swallow the final newline, as some editors add it automatically and we don't want it to cause an issue
+        const allLines = sourceCode.lines[sourceCode.lines.length - 1] === "" ? sourceCode.lines.slice(0, -1) : sourceCode.lines;
+        const templateLiteralLines = new Set();
 
         //--------------------------------------------------------------------------
         // Public
         //--------------------------------------------------------------------------
 
         return {
-
             TemplateLiteral(node) {
-                let start = node.loc.start.line;
-                const end = node.loc.end.line;
+                node.quasis.forEach(literalPart => {
 
-                while (start <= end) {
-                    notEmpty.push(start);
-                    start++;
-                }
-            },
-
-            "Program:exit": function checkBlankLines(node) {
-                const lines = sourceCode.lines,
-                    fullLines = sourceCode.text.match(/.*(\r\n|\r|\n|\u2028|\u2029)/g) || [],
-                    linesRangeStart = [];
-                let firstNonBlankLine = -1,
-                    trimmedLines = [],
-                    blankCounter = 0,
-                    currentLocation,
-                    lastLocation,
-                    firstOfEndingBlankLines,
-                    diff,
-                    rangeStart,
-                    rangeEnd;
-
-                /**
-                 * Fix code.
-                 * @param {RuleFixer} fixer - The fixer of this context.
-                 * @returns {Object} The fixing information.
-                 */
-                function fix(fixer) {
-                    return fixer.removeRange([rangeStart, rangeEnd]);
-                }
-
-                linesRangeStart.push(0);
-                lines.forEach(function(str, i) {
-                    const length = i < fullLines.length ? fullLines[i].length : 0,
-                        trimmed = str.trim();
-
-                    if ((firstNonBlankLine === -1) && (trimmed !== "")) {
-                        firstNonBlankLine = i;
+                    // Empty lines have a semantic meaning if they're inside template literals. Don't count these as empty lines.
+                    for (let ignoredLine = literalPart.loc.start.line; ignoredLine < literalPart.loc.end.line; ignoredLine++) {
+                        templateLiteralLines.add(ignoredLine);
                     }
-
-                    linesRangeStart.push(linesRangeStart[linesRangeStart.length - 1] + length);
-                    trimmedLines.push(trimmed);
-                });
-
-                // add the notEmpty lines in there with a placeholder
-                notEmpty.forEach(function(x, i) {
-                    trimmedLines[i] = x;
                 });
+            },
+            "Program:exit"(node) {
+                return allLines
 
-                if (typeof maxEOF === "undefined") {
+                    // Given a list of lines, first get a list of line numbers that are non-empty.
+                    .reduce((nonEmptyLineNumbers, line, index) => nonEmptyLineNumbers.concat(line.trim() || templateLiteralLines.has(index + 1) ? [index + 1] : []), [])
 
-                    /*
-                     * Swallow the final newline, as some editors add it
-                     * automatically and we don't want it to cause an issue
-                     */
-                    if (trimmedLines[trimmedLines.length - 1] === "") {
-                        trimmedLines = trimmedLines.slice(0, -1);
-                    }
+                    // Add a value at the end to allow trailing empty lines to be checked.
+                    .concat(allLines.length + 1)
 
-                    firstOfEndingBlankLines = trimmedLines.length;
-                } else {
+                    // Given two line numbers of non-empty lines, report the lines between if the difference is too large.
+                    .reduce((lastLineNumber, lineNumber) => {
+                        let message, maxAllowed;
 
-                    // save the number of the first of the last blank lines
-                    firstOfEndingBlankLines = trimmedLines.length;
-                    while (trimmedLines[firstOfEndingBlankLines - 1] === ""
-                            && firstOfEndingBlankLines > 0) {
-                        firstOfEndingBlankLines--;
-                    }
-                }
-
-                // Aggregate and count blank lines
-                if (firstNonBlankLine > maxBOF) {
-                    diff = firstNonBlankLine - maxBOF;
-                    rangeStart = linesRangeStart[firstNonBlankLine - diff];
-                    rangeEnd = linesRangeStart[firstNonBlankLine];
-                    context.report({
-                        node,
-                        loc: node.loc.start,
-                        message: "Too many blank lines at the beginning of file. Max of {{maxBOF}} allowed.",
-                        data: {
-                            maxBOF
-                        },
-                        fix
-                    });
-                }
-                currentLocation = firstNonBlankLine - 1;
-
-                lastLocation = currentLocation;
-                currentLocation = trimmedLines.indexOf("", currentLocation + 1);
-                while (currentLocation !== -1) {
-                    lastLocation = currentLocation;
-                    currentLocation = trimmedLines.indexOf("", currentLocation + 1);
-                    if (lastLocation === currentLocation - 1) {
-                        blankCounter++;
-                    } else {
-                        const location = {
-                            line: lastLocation + 1,
-                            column: 0
-                        };
-
-                        if (lastLocation < firstOfEndingBlankLines) {
-
-                            // within the file, not at the end
-                            if (blankCounter >= max) {
-                                diff = blankCounter - max + 1;
-                                rangeStart = linesRangeStart[location.line - diff];
-                                rangeEnd = linesRangeStart[location.line];
-
-                                context.report({
-                                    node,
-                                    loc: location,
-                                    message: "More than {{max}} blank {{lines}} not allowed.",
-                                    data: {
-                                        max,
-                                        lines: (max === 1 ? "line" : "lines")
-                                    },
-                                    fix
-                                });
-                            }
+                        if (lastLineNumber === 0) {
+                            message = "Too many blank lines at the beginning of file. Max of {{max}} allowed.";
+                            maxAllowed = maxBOF;
+                        } else if (lineNumber === allLines.length + 1) {
+                            message = "Too many blank lines at the end of file. Max of {{max}} allowed.";
+                            maxAllowed = maxEOF;
                         } else {
+                            message = "More than {{max}} blank {{pluralizedLines}} not allowed.";
+                            maxAllowed = max;
+                        }
 
-                            // inside the last blank lines
-                            if (blankCounter > maxEOF) {
-                                diff = blankCounter - maxEOF + 1;
-                                rangeStart = linesRangeStart[location.line - diff];
-                                rangeEnd = linesRangeStart[location.line - 1];
-                                context.report({
-                                    node,
-                                    loc: location,
-                                    message: "Too many blank lines at the end of file. Max of {{maxEOF}} allowed.",
-                                    data: {
-                                        maxEOF
-                                    },
-                                    fix
-                                });
-                            }
+                        if (lineNumber - lastLineNumber - 1 > maxAllowed) {
+                            context.report({
+                                node,
+                                loc: {start: {line: lastLineNumber + 1, column: 0}, end: {line: lineNumber, column: 0}},
+                                message,
+                                data: {max: maxAllowed, pluralizedLines: maxAllowed === 1 ? "line" : "lines"},
+                                fix: fixer => fixer.removeRange([lineStartLocations[lastLineNumber], lineStartLocations[lineNumber - maxAllowed - 1]])
+                            });
                         }
 
-                        // Finally, reset the blank counter
-                        blankCounter = 0;
-                    }
-                }
+                        return lineNumber;
+                    }, 0);
             }
         };
-
     }
 };
diff --git a/tools/eslint/lib/rules/no-redeclare.js b/tools/eslint/lib/rules/no-redeclare.js
index 28e560382babd5..fcd4943460b421 100644
--- a/tools/eslint/lib/rules/no-redeclare.js
+++ b/tools/eslint/lib/rules/no-redeclare.js
@@ -12,7 +12,7 @@
 module.exports = {
     meta: {
         docs: {
-            description: "disallow `var` redeclaration",
+            description: "disallow variable redeclaration",
             category: "Best Practices",
             recommended: true
         },
diff --git a/tools/eslint/lib/rules/no-regex-spaces.js b/tools/eslint/lib/rules/no-regex-spaces.js
index 0baa7d8bba9211..c6e26ac3980020 100644
--- a/tools/eslint/lib/rules/no-regex-spaces.js
+++ b/tools/eslint/lib/rules/no-regex-spaces.js
@@ -5,6 +5,8 @@
 
 "use strict";
 
+const astUtils = require("../ast-utils");
+
 //------------------------------------------------------------------------------
 // Rule Definition
 //------------------------------------------------------------------------------
@@ -17,7 +19,9 @@ module.exports = {
             recommended: true
         },
 
-        schema: []
+        schema: [],
+
+        fixable: "code"
     },
 
     create(context) {
@@ -27,19 +31,27 @@ module.exports = {
          * Validate regular expressions
          * @param {ASTNode} node node to validate
          * @param {string} value regular expression to validate
+         * @param {number} valueStart The start location of the regex/string literal. It will always be the case that
+         `sourceCode.getText().slice(valueStart, valueStart + value.length) === value`
          * @returns {void}
          * @private
          */
-        function checkRegex(node, value) {
+        function checkRegex(node, value, valueStart) {
             const multipleSpacesRegex = /( {2,})+?/,
                 regexResults = multipleSpacesRegex.exec(value);
 
             if (regexResults !== null) {
+                const count = regexResults[0].length;
+
                 context.report({
                     node,
                     message: "Spaces are hard to count. Use {{{count}}}.",
-                    data: {
-                        count: regexResults[0].length
+                    data: {count},
+                    fix(fixer) {
+                        return fixer.replaceTextRange(
+                            [valueStart + regexResults.index, valueStart + regexResults.index + count],
+                            ` {${count}}`
+                        );
                     }
                 });
 
@@ -62,7 +74,7 @@ module.exports = {
                 nodeValue = token.value;
 
             if (nodeType === "RegularExpression") {
-                checkRegex(node, nodeValue);
+                checkRegex(node, nodeValue, token.start);
             }
         }
 
@@ -83,8 +95,12 @@ module.exports = {
          * @private
          */
         function checkFunction(node) {
-            if (node.callee.type === "Identifier" && node.callee.name === "RegExp" && isString(node.arguments[0])) {
-                checkRegex(node, node.arguments[0].value);
+            const scope = context.getScope();
+            const regExpVar = astUtils.getVariableByName(scope, "RegExp");
+            const shadowed = regExpVar && regExpVar.defs.length > 0;
+
+            if (node.callee.type === "Identifier" && node.callee.name === "RegExp" && isString(node.arguments[0]) && !shadowed) {
+                checkRegex(node, node.arguments[0].value, node.arguments[0].start + 1);
             }
         }
 
diff --git a/tools/eslint/lib/rules/no-restricted-properties.js b/tools/eslint/lib/rules/no-restricted-properties.js
index c0d0a380abcb5a..f8bd47ba4b2c18 100644
--- a/tools/eslint/lib/rules/no-restricted-properties.js
+++ b/tools/eslint/lib/rules/no-restricted-properties.js
@@ -15,29 +15,46 @@ module.exports = {
     meta: {
         docs: {
             description: "disallow certain properties on certain objects",
-            category: "Node.js and CommonJS",
+            category: "Best Practices",
             recommended: false
         },
 
         schema: {
             type: "array",
             items: {
-                type: "object",
-                properties: {
-                    object: {
-                        type: "string"
+                anyOf: [ // `object` and `property` are both optional, but at least one of them must be provided.
+                    {
+                        type: "object",
+                        properties: {
+                            object: {
+                                type: "string"
+                            },
+                            property: {
+                                type: "string"
+                            },
+                            message: {
+                                type: "string"
+                            }
+                        },
+                        additionalProperties: false,
+                        required: ["object"]
                     },
-                    property: {
-                        type: "string"
-                    },
-                    message: {
-                        type: "string"
+                    {
+                        type: "object",
+                        properties: {
+                            object: {
+                                type: "string"
+                            },
+                            property: {
+                                type: "string"
+                            },
+                            message: {
+                                type: "string"
+                            }
+                        },
+                        additionalProperties: false,
+                        required: ["property"]
                     }
-                },
-                additionalProperties: false,
-                required: [
-                    "object",
-                    "property"
                 ]
             },
             uniqueItems: true
@@ -51,38 +68,96 @@ module.exports = {
             return {};
         }
 
-        const restrictedProperties = restrictedCalls.reduce(function(restrictions, option) {
+        const restrictedProperties = new Map();
+        const globallyRestrictedObjects = new Map();
+        const globallyRestrictedProperties = new Map();
+
+        restrictedCalls.forEach(option => {
             const objectName = option.object;
             const propertyName = option.property;
 
-            if (!restrictions.has(objectName)) {
-                restrictions.set(objectName, new Map());
+            if (typeof objectName === "undefined") {
+                globallyRestrictedProperties.set(propertyName, {message: option.message});
+            } else if (typeof propertyName === "undefined") {
+                globallyRestrictedObjects.set(objectName, {message: option.message});
+            } else {
+                if (!restrictedProperties.has(objectName)) {
+                    restrictedProperties.set(objectName, new Map());
+                }
+
+                restrictedProperties.get(objectName).set(propertyName, {
+                    message: option.message
+                });
             }
+        });
 
-            restrictions.get(objectName).set(propertyName, {
-                message: option.message
-            });
+        /**
+        * Checks to see whether a property access is restricted, and reports it if so.
+        * @param {ASTNode} node The node to report
+        * @param {string} objectName The name of the object
+        * @param {string} propertyName The name of the property
+        * @returns {undefined}
+        */
+        function checkPropertyAccess(node, objectName, propertyName) {
+            if (propertyName === null) {
+                return;
+            }
+            const matchedObject = restrictedProperties.get(objectName);
+            const matchedObjectProperty = matchedObject ? matchedObject.get(propertyName) : globallyRestrictedObjects.get(objectName);
+            const globalMatchedProperty = globallyRestrictedProperties.get(propertyName);
 
-            return restrictions;
-        }, new Map());
+            if (matchedObjectProperty) {
+                const message = matchedObjectProperty.message ? ` ${matchedObjectProperty.message}` : "";
 
-        return {
-            MemberExpression(node) {
-                const objectName = node.object && node.object.name;
-                const propertyName = astUtils.getStaticPropertyName(node);
-                const matchedObject = restrictedProperties.get(objectName);
-                const matchedObjectProperty = matchedObject && matchedObject.get(propertyName);
-
-                if (matchedObjectProperty) {
-                    const message = matchedObjectProperty.message ? " " + matchedObjectProperty.message : "";
-
-                    context.report(node, "'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}", {
-                        objectName,
-                        propertyName,
-                        message
+                context.report(node, "'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}", {
+                    objectName,
+                    propertyName,
+                    message
+                });
+            } else if (globalMatchedProperty) {
+                const message = globalMatchedProperty.message ? ` ${globalMatchedProperty.message}` : "";
+
+                context.report(node, "'{{propertyName}}' is restricted from being used.{{message}}", {
+                    propertyName,
+                    message
+                });
+            }
+        }
+
+        /**
+        * Checks property accesses in a destructuring assignment expression, e.g. `var foo; ({foo} = bar);`
+        * @param {ASTNode} node An AssignmentExpression or AssignmentPattern node
+        * @returns {undefined}
+        */
+        function checkDestructuringAssignment(node) {
+            if (node.right.type === "Identifier") {
+                const objectName = node.right.name;
+
+                if (node.left.type === "ObjectPattern") {
+                    node.left.properties.forEach(property => {
+                        checkPropertyAccess(node.left, objectName, astUtils.getStaticPropertyName(property));
                     });
                 }
             }
+        }
+
+        return {
+            MemberExpression(node) {
+                checkPropertyAccess(node, node.object && node.object.name, astUtils.getStaticPropertyName(node));
+            },
+            VariableDeclarator(node) {
+                if (node.init && node.init.type === "Identifier") {
+                    const objectName = node.init.name;
+
+                    if (node.id.type === "ObjectPattern") {
+                        node.id.properties.forEach(property => {
+                            checkPropertyAccess(node.id, objectName, astUtils.getStaticPropertyName(property));
+                        });
+                    }
+                }
+            },
+            AssignmentExpression: checkDestructuringAssignment,
+            AssignmentPattern: checkDestructuringAssignment
         };
     }
 };
diff --git a/tools/eslint/lib/rules/no-shadow.js b/tools/eslint/lib/rules/no-shadow.js
index a31288749b5de5..27ea10ef9217aa 100644
--- a/tools/eslint/lib/rules/no-shadow.js
+++ b/tools/eslint/lib/rules/no-shadow.js
@@ -18,7 +18,7 @@ const astUtils = require("../ast-utils");
 module.exports = {
     meta: {
         docs: {
-            description: "disallow `var` declarations from shadowing variables in the outer scope",
+            description: "disallow variable declarations from shadowing variables declared in the outer scope",
             category: "Variables",
             recommended: false
         },
diff --git a/tools/eslint/lib/rules/no-spaced-func.js b/tools/eslint/lib/rules/no-spaced-func.js
index 39a2f7f7ad9be8..361c1e0cd7ec0c 100644
--- a/tools/eslint/lib/rules/no-spaced-func.js
+++ b/tools/eslint/lib/rules/no-spaced-func.js
@@ -13,7 +13,7 @@
 module.exports = {
     meta: {
         docs: {
-            description: "disallow spacing between `function` identifiers and their applications (deprecated)",
+            description: "disallow spacing between function identifiers and their applications (deprecated)",
             category: "Stylistic Issues",
             recommended: false,
             replacedBy: ["func-call-spacing"]
diff --git a/tools/eslint/lib/rules/no-undef-init.js b/tools/eslint/lib/rules/no-undef-init.js
index 67efa87085339d..ca9f0272ba5bf5 100644
--- a/tools/eslint/lib/rules/no-undef-init.js
+++ b/tools/eslint/lib/rules/no-undef-init.js
@@ -5,6 +5,8 @@
 
 "use strict";
 
+const astUtils = require("../ast-utils");
+
 //------------------------------------------------------------------------------
 // Rule Definition
 //------------------------------------------------------------------------------
@@ -17,19 +19,38 @@ module.exports = {
             recommended: false
         },
 
-        schema: []
+        schema: [],
+
+        fixable: "code"
     },
 
     create(context) {
 
+        const sourceCode = context.getSourceCode();
+
         return {
 
             VariableDeclarator(node) {
-                const name = node.id.name,
-                    init = node.init && node.init.name;
-
-                if (init === "undefined" && node.parent.kind !== "const") {
-                    context.report(node, "It's not necessary to initialize '{{name}}' to undefined.", { name });
+                const name = sourceCode.getText(node.id),
+                    init = node.init && node.init.name,
+                    scope = context.getScope(),
+                    undefinedVar = astUtils.getVariableByName(scope, "undefined"),
+                    shadowed = undefinedVar && undefinedVar.defs.length > 0;
+
+                if (init === "undefined" && node.parent.kind !== "const" && !shadowed) {
+                    context.report({
+                        node,
+                        message: "It's not necessary to initialize '{{name}}' to undefined.",
+                        data: {name},
+                        fix(fixer) {
+                            if (node.id.type === "ArrayPattern" || node.id.type === "ObjectPattern") {
+
+                                // Don't fix destructuring assignment to `undefined`.
+                                return null;
+                            }
+                            return fixer.removeRange([node.id.range[1], node.range[1]]);
+                        }
+                    });
                 }
             }
         };
diff --git a/tools/eslint/lib/rules/no-unused-expressions.js b/tools/eslint/lib/rules/no-unused-expressions.js
index b6408956467448..cdabca204a64df 100644
--- a/tools/eslint/lib/rules/no-unused-expressions.js
+++ b/tools/eslint/lib/rules/no-unused-expressions.js
@@ -101,7 +101,7 @@ module.exports = {
                 }
             }
 
-            return /^(?:Assignment|Call|New|Update|Yield)Expression$/.test(node.type) ||
+            return /^(?:Assignment|Call|New|Update|Yield|Await)Expression$/.test(node.type) ||
                 (node.type === "UnaryExpression" && ["delete", "void"].indexOf(node.operator) >= 0);
         }
 
diff --git a/tools/eslint/lib/rules/no-unused-vars.js b/tools/eslint/lib/rules/no-unused-vars.js
index 398d85566fa8ae..683176e944f357 100644
--- a/tools/eslint/lib/rules/no-unused-vars.js
+++ b/tools/eslint/lib/rules/no-unused-vars.js
@@ -60,7 +60,8 @@ module.exports = {
 
     create(context) {
 
-        const MESSAGE = "'{{name}}' is defined but never used.";
+        const DEFINED_MESSAGE = "'{{name}}' is defined but never used.";
+        const ASSIGNED_MESSAGE = "'{{name}}' is assigned a value but never used.";
 
         const config = {
             vars: "all",
@@ -414,6 +415,33 @@ module.exports = {
             });
         }
 
+        /**
+         * Checks whether the given variable is the last parameter in the non-ignored parameters.
+         *
+         * @param {escope.Variable} variable - The variable to check.
+         * @returns {boolean} `true` if the variable is the last.
+         */
+        function isLastInNonIgnoredParameters(variable) {
+            const def = variable.defs[0];
+
+            // This is the last.
+            if (def.index === def.node.params.length - 1) {
+                return true;
+            }
+
+            // if all parameters preceded by this variable are ignored and unused, this is the last.
+            if (config.argsIgnorePattern) {
+                const params = context.getDeclaredVariables(def.node);
+                const posteriorParams = params.slice(params.indexOf(variable) + 1);
+
+                if (posteriorParams.every(v => v.references.length === 0 && config.argsIgnorePattern.test(v.name))) {
+                    return true;
+                }
+            }
+
+            return false;
+        }
+
         /**
          * Gets an array of variables without read references.
          * @param {Scope} scope - an escope Scope object.
@@ -466,7 +494,7 @@ module.exports = {
                         if (type === "Parameter") {
 
                             // skip any setter argument
-                            if (def.node.parent.type === "Property" && def.node.parent.kind === "set") {
+                            if ((def.node.parent.type === "Property" || def.node.parent.type === "MethodDefinition") && def.node.parent.kind === "set") {
                                 continue;
                             }
 
@@ -481,7 +509,7 @@ module.exports = {
                             }
 
                             // if "args" option is "after-used", skip all but the last parameter
-                            if (config.args === "after-used" && def.index < def.node.params.length - 1) {
+                            if (config.args === "after-used" && !isLastInNonIgnoredParameters(variable)) {
                                 continue;
                             }
                         } else {
@@ -569,13 +597,13 @@ module.exports = {
                         context.report({
                             node: programNode,
                             loc: getLocation(unusedVar),
-                            message: MESSAGE,
+                            message: DEFINED_MESSAGE,
                             data: unusedVar
                         });
                     } else if (unusedVar.defs.length > 0) {
                         context.report({
                             node: unusedVar.identifiers[0],
-                            message: MESSAGE,
+                            message: unusedVar.references.some(ref => ref.isWrite()) ? ASSIGNED_MESSAGE : DEFINED_MESSAGE,
                             data: unusedVar
                         });
                     }
diff --git a/tools/eslint/lib/rules/no-useless-computed-key.js b/tools/eslint/lib/rules/no-useless-computed-key.js
index 34a8c9dc22f31a..c1ab1d9acd5bc2 100644
--- a/tools/eslint/lib/rules/no-useless-computed-key.js
+++ b/tools/eslint/lib/rules/no-useless-computed-key.js
@@ -18,7 +18,9 @@ module.exports = {
             recommended: false
         },
 
-        schema: []
+        schema: [],
+
+        fixable: "code"
     },
     create(context) {
         const sourceCode = context.getSourceCode();
@@ -33,7 +35,24 @@ module.exports = {
                     nodeType = typeof key.value;
 
                 if (key.type === "Literal" && (nodeType === "string" || nodeType === "number")) {
-                    context.report(node, MESSAGE_UNNECESSARY_COMPUTED, { property: sourceCode.getText(key) });
+                    context.report({
+                        node,
+                        message: MESSAGE_UNNECESSARY_COMPUTED,
+                        data: { property: sourceCode.getText(key) },
+                        fix(fixer) {
+                            const leftSquareBracket = sourceCode.getFirstToken(node, node.value.generator || node.value.async ? 1 : 0);
+                            const rightSquareBracket = sourceCode.getTokensBetween(node.key, node.value).find(token => token.value === "]");
+
+                            const tokensBetween = sourceCode.getTokensBetween(leftSquareBracket, rightSquareBracket, 1);
+
+                            if (tokensBetween.slice(0, -1).some((token, index) => sourceCode.getText().slice(token.range[1], tokensBetween[index + 1].range[0]).trim())) {
+
+                                // If there are comments between the brackets and the property name, don't do a fix.
+                                return null;
+                            }
+                            return fixer.replaceTextRange([leftSquareBracket.range[0], rightSquareBracket.range[1]], key.raw);
+                        }
+                    });
                 }
             }
         };
diff --git a/tools/eslint/lib/rules/no-useless-escape.js b/tools/eslint/lib/rules/no-useless-escape.js
index f7b2848fc3a1f9..629a52a7ec9b9f 100644
--- a/tools/eslint/lib/rules/no-useless-escape.js
+++ b/tools/eslint/lib/rules/no-useless-escape.js
@@ -76,23 +76,44 @@ module.exports = {
          * @private
          * @param {string[]} escapes - list of valid escapes
          * @param {ASTNode} node - node to validate.
-         * @param {string} elm - string slice to validate.
+         * @param {string} match - string slice to validate.
          * @returns {void}
          */
-        function validate(escapes, node, elm) {
-            const escapeNotFound = escapes.indexOf(elm[0][1]) === -1;
-            const isQuoteEscape = elm[0][1] === node.raw[0];
+        function validate(escapes, node, match) {
+            const isTemplateElement = node.type === "TemplateElement";
+            const escapedChar = match[0][1];
+            let isUnnecessaryEscape = escapes.indexOf(escapedChar) === -1;
+            let isQuoteEscape;
 
-            if (escapeNotFound && !isQuoteEscape) {
+            if (isTemplateElement) {
+                isQuoteEscape = escapedChar === "`";
+
+                if (escapedChar === "$") {
+
+                    // Warn if `\$` is not followed by `{`
+                    isUnnecessaryEscape = match.input[match.index + 2] !== "{";
+                } else if (escapedChar === "{") {
+
+                    /* Warn if `\{` is not preceded by `$`. If preceded by `$`, escaping
+                     * is necessary and the rule should not warn. If preceded by `/$`, the rule
+                     * will warn for the `/$` instead, as it is the first unnecessarily escaped character.
+                     */
+                    isUnnecessaryEscape = match.input[match.index - 1] !== "$";
+                }
+            } else {
+                isQuoteEscape = escapedChar === node.raw[0];
+            }
+
+            if (isUnnecessaryEscape && !isQuoteEscape) {
                 context.report({
                     node,
                     loc: {
                         line: node.loc.start.line,
-                        column: node.loc.start.column + elm.index
+                        column: node.loc.start.column + match.index
                     },
                     message: "Unnecessary escape character: {{character}}.",
                     data: {
-                        character: elm[0]
+                        character: match[0]
                     }
                 });
             }
@@ -105,12 +126,18 @@ module.exports = {
          * @returns {void}
          */
         function check(node) {
-            let nodeEscapes, match;
+            const isTemplateElement = node.type === "TemplateElement";
+            const value = isTemplateElement ? node.value.raw : node.raw;
             const pattern = /\\[^\d]/g;
+            let nodeEscapes,
+                match;
 
-            if (typeof node.value === "string") {
+            if (typeof node.value === "string" || isTemplateElement) {
 
-                // JSXAttribute doesn't have any escape sequence: https://facebook.github.io/jsx/
+                /*
+                 * JSXAttribute doesn't have any escape sequence: https://facebook.github.io/jsx/.
+                 * In addition, backticks are not supported by JSX yet: https://github.com/facebook/jsx/issues/25.
+                 */
                 if (node.parent.type === "JSXAttribute") {
                     return;
                 }
@@ -122,12 +149,14 @@ module.exports = {
                 return;
             }
 
-            while ((match = pattern.exec(node.raw))) {
+            while ((match = pattern.exec(value))) {
                 validate(nodeEscapes, node, match);
             }
         }
+
         return {
-            Literal: check
+            Literal: check,
+            TemplateElement: check
         };
     }
 };
diff --git a/tools/eslint/lib/rules/no-whitespace-before-property.js b/tools/eslint/lib/rules/no-whitespace-before-property.js
index 8751f143f19138..cb9af56579fce3 100644
--- a/tools/eslint/lib/rules/no-whitespace-before-property.js
+++ b/tools/eslint/lib/rules/no-whitespace-before-property.js
@@ -62,6 +62,12 @@ module.exports = {
                     propName: sourceCode.getText(node.property)
                 },
                 fix(fixer) {
+                    if (!node.computed && astUtils.isDecimalInteger(node.object)) {
+
+                        // If the object is a number literal, fixing it to something like 5.toString() would cause a SyntaxError.
+                        // Don't fix this case.
+                        return null;
+                    }
                     return fixer.replaceTextRange([leftToken.range[1], rightToken.range[0]], replacementText);
                 }
             });
diff --git a/tools/eslint/lib/rules/object-shorthand.js b/tools/eslint/lib/rules/object-shorthand.js
index 912c606b118d43..3ef782461a4018 100644
--- a/tools/eslint/lib/rules/object-shorthand.js
+++ b/tools/eslint/lib/rules/object-shorthand.js
@@ -14,6 +14,11 @@ const OPTIONS = {
     consistentAsNeeded: "consistent-as-needed"
 };
 
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+const astUtils = require("../ast-utils");
+
 //------------------------------------------------------------------------------
 // Rule Definition
 //------------------------------------------------------------------------------
@@ -113,13 +118,13 @@ module.exports = {
         }
 
         /**
-         * Determines if the property is not a getter and a setter.
+         * Determines if the property can have a shorthand form.
          * @param {ASTNode} property Property AST node
-         * @returns {boolean} True if the property is not a getter and a setter, false if it is.
+         * @returns {boolean} True if the property can have a shorthand form
          * @private
          **/
-        function isNotGetterOrSetter(property) {
-            return (property.kind !== "set" && property.kind !== "get");
+        function canHaveShorthand(property) {
+            return (property.kind !== "set" && property.kind !== "get" && property.type !== "SpreadProperty" && property.type !== "ExperimentalSpreadProperty");
         }
 
         /**
@@ -149,15 +154,17 @@ module.exports = {
          * @returns {boolean} True if the key and value are named equally, false if not.
          * @private
          **/
-        function isRedudant(property) {
-            return (property.key && (
+        function isRedundant(property) {
+            const value = property.value;
 
-                // A function expression
-                property.value && property.value.id && property.value.id.name === property.key.name ||
+            if (value.type === "FunctionExpression") {
+                return !value.id; // Only anonymous should be shorthand method.
+            }
+            if (value.type === "Identifier") {
+                return astUtils.getStaticPropertyName(property) === value.name;
+            }
 
-                // A property
-                property.value && property.value.name === property.key.name
-            ));
+            return false;
         }
 
         /**
@@ -168,8 +175,8 @@ module.exports = {
          **/
         function checkConsistency(node, checkRedundancy) {
 
-            // We are excluding getters and setters as they are considered neither longform nor shorthand.
-            const properties = node.properties.filter(isNotGetterOrSetter);
+            // We are excluding getters/setters and spread properties as they are considered neither longform nor shorthand.
+            const properties = node.properties.filter(canHaveShorthand);
 
             // Do we still have properties left after filtering the getters and setters?
             if (properties.length > 0) {
@@ -185,8 +192,8 @@ module.exports = {
                     } else if (checkRedundancy) {
 
                         // If all properties of the object contain a method or value with a name matching it's key,
-                        // all the keys are redudant.
-                        const canAlwaysUseShorthand = properties.every(isRedudant);
+                        // all the keys are redundant.
+                        const canAlwaysUseShorthand = properties.every(isRedundant);
 
                         if (canAlwaysUseShorthand) {
                             context.report(node, "Expected shorthand for all properties.");
diff --git a/tools/eslint/lib/rules/one-var-declaration-per-line.js b/tools/eslint/lib/rules/one-var-declaration-per-line.js
index cc821d2b90c020..eb0d5c3bf1ad74 100644
--- a/tools/eslint/lib/rules/one-var-declaration-per-line.js
+++ b/tools/eslint/lib/rules/one-var-declaration-per-line.js
@@ -11,7 +11,7 @@
 module.exports = {
     meta: {
         docs: {
-            description: "require or disallow newlines around `var` declarations",
+            description: "require or disallow newlines around variable declarations",
             category: "Stylistic Issues",
             recommended: false
         },
@@ -20,7 +20,9 @@ module.exports = {
             {
                 enum: ["always", "initializations"]
             }
-        ]
+        ],
+
+        fixable: "whitespace"
     },
 
     create(context) {
@@ -63,7 +65,8 @@ module.exports = {
                         context.report({
                             node,
                             message: ERROR_MESSAGE,
-                            loc: current.loc.start
+                            loc: current.loc.start,
+                            fix: fixer => fixer.insertTextBefore(current, "\n")
                         });
                     }
                 }
diff --git a/tools/eslint/lib/rules/prefer-arrow-callback.js b/tools/eslint/lib/rules/prefer-arrow-callback.js
index dd2505cb533dcb..034112093bd405 100644
--- a/tools/eslint/lib/rules/prefer-arrow-callback.js
+++ b/tools/eslint/lib/rules/prefer-arrow-callback.js
@@ -275,16 +275,17 @@ module.exports = {
 
                             const paramsLeftParen = node.params.length ? sourceCode.getTokenBefore(node.params[0]) : sourceCode.getTokenBefore(node.body, 1);
                             const paramsRightParen = sourceCode.getTokenBefore(node.body);
+                            const asyncKeyword = node.async ? "async " : "";
                             const paramsFullText = sourceCode.text.slice(paramsLeftParen.range[0], paramsRightParen.range[1]);
 
                             if (callbackInfo.isLexicalThis) {
 
                                 // If the callback function has `.bind(this)`, replace it with an arrow function and remove the binding.
-                                return fixer.replaceText(node.parent.parent, paramsFullText + " => " + sourceCode.getText(node.body));
+                                return fixer.replaceText(node.parent.parent, `${asyncKeyword}${paramsFullText} => ${sourceCode.getText(node.body)}`);
                             }
 
                             // Otherwise, only replace the `function` keyword and parameters with the arrow function parameters.
-                            return fixer.replaceTextRange([node.start, node.body.start], paramsFullText + " => ");
+                            return fixer.replaceTextRange([node.start, node.body.start], `${asyncKeyword}${paramsFullText} => `);
                         }
                     });
                 }
diff --git a/tools/eslint/lib/rules/prefer-numeric-literals.js b/tools/eslint/lib/rules/prefer-numeric-literals.js
index 1e3bed59158356..ed84ce6a9f703a 100644
--- a/tools/eslint/lib/rules/prefer-numeric-literals.js
+++ b/tools/eslint/lib/rules/prefer-numeric-literals.js
@@ -17,7 +17,9 @@ module.exports = {
             recommended: false
         },
 
-        schema: []
+        schema: [],
+
+        fixable: "code"
     },
 
     create(context) {
@@ -27,6 +29,12 @@ module.exports = {
             16: "hexadecimal"
         };
 
+        const prefixMap = {
+            2: "0b",
+            8: "0o",
+            16: "0x"
+        };
+
         //--------------------------------------------------------------------------
         // Public
         //--------------------------------------------------------------------------
@@ -53,6 +61,17 @@ module.exports = {
                         message: "Use {{radixName}} literals instead of parseInt().",
                         data: {
                             radixName
+                        },
+                        fix(fixer) {
+                            const newPrefix = prefixMap[node.arguments[1].value];
+
+                            if (+(newPrefix + node.arguments[0].value) !== parseInt(node.arguments[0].value, node.arguments[1].value)) {
+
+                                // If the newly-produced literal would be invalid, (e.g. 0b1234),
+                                // or it would yield an incorrect parseInt result for some other reason, don't make a fix.
+                                return null;
+                            }
+                            return fixer.replaceText(node, prefixMap[node.arguments[1].value] + node.arguments[0].value);
                         }
                     });
                 }
diff --git a/tools/eslint/lib/rules/prefer-spread.js b/tools/eslint/lib/rules/prefer-spread.js
index 59fe7754a3ca7b..158d6777f9cf75 100644
--- a/tools/eslint/lib/rules/prefer-spread.js
+++ b/tools/eslint/lib/rules/prefer-spread.js
@@ -23,7 +23,8 @@ function isVariadicApplyCalling(node) {
         node.callee.property.name === "apply" &&
         node.callee.computed === false &&
         node.arguments.length === 2 &&
-        node.arguments[1].type !== "ArrayExpression"
+        node.arguments[1].type !== "ArrayExpression" &&
+        node.arguments[1].type !== "SpreadElement"
     );
 }
 
@@ -78,7 +79,9 @@ module.exports = {
             recommended: false
         },
 
-        schema: []
+        schema: [],
+
+        fixable: "code"
     },
 
     create(context) {
@@ -95,7 +98,21 @@ module.exports = {
                 const thisArg = node.arguments[0];
 
                 if (isValidThisArg(expectedThis, thisArg, sourceCode)) {
-                    context.report(node, "use the spread operator instead of the '.apply()'.");
+                    context.report({
+                        node,
+                        message: "Use the spread operator instead of '.apply()'.",
+                        fix(fixer) {
+                            if (expectedThis && expectedThis.type !== "Identifier") {
+
+                                // Don't fix cases where the `this` value could be a computed expression.
+                                return null;
+                            }
+
+                            const propertyDot = sourceCode.getTokensBetween(applied, node.callee.property).find(token => token.value === ".");
+
+                            return fixer.replaceTextRange([propertyDot.range[0], node.range[1]], `(...${sourceCode.getText(node.arguments[1])})`);
+                        }
+                    });
                 }
             }
         };
diff --git a/tools/eslint/lib/rules/prefer-template.js b/tools/eslint/lib/rules/prefer-template.js
index 48e598752db746..28e69cd3c505af 100644
--- a/tools/eslint/lib/rules/prefer-template.js
+++ b/tools/eslint/lib/rules/prefer-template.js
@@ -36,6 +36,20 @@ function getTopConcatBinaryExpression(node) {
     return node;
 }
 
+/**
+* Checks whether or not a given binary expression has string literals.
+* @param {ASTNode} node - A node to check.
+* @returns {boolean} `true` if the node has string literals.
+*/
+function hasStringLiteral(node) {
+    if (isConcatenation(node)) {
+
+        // `left` is deeper than `right` normally.
+        return hasStringLiteral(node.right) || hasStringLiteral(node.left);
+    }
+    return astUtils.isStringLiteral(node);
+}
+
 /**
  * Checks whether or not a given binary expression has non string literals.
  * @param {ASTNode} node - A node to check.
@@ -50,6 +64,36 @@ function hasNonStringLiteral(node) {
     return !astUtils.isStringLiteral(node);
 }
 
+/**
+* Determines whether a given node will start with a template curly expression (`${}`) when being converted to a template literal.
+* @param {ASTNode} node The node that will be fixed to a template literal
+* @returns {boolean} `true` if the node will start with a template curly.
+*/
+function startsWithTemplateCurly(node) {
+    if (node.type === "BinaryExpression") {
+        return startsWithTemplateCurly(node.left);
+    }
+    if (node.type === "TemplateLiteral") {
+        return node.expressions.length && node.quasis.length && node.quasis[0].start === node.quasis[0].end;
+    }
+    return node.type !== "Literal" || typeof node.value !== "string";
+}
+
+/**
+* Determines whether a given node end with a template curly expression (`${}`) when being converted to a template literal.
+* @param {ASTNode} node The node that will be fixed to a template literal
+* @returns {boolean} `true` if the node will end with a template curly.
+*/
+function endsWithTemplateCurly(node) {
+    if (node.type === "BinaryExpression") {
+        return startsWithTemplateCurly(node.right);
+    }
+    if (node.type === "TemplateLiteral") {
+        return node.expressions.length && node.quasis.length && node.quasis[node.quasis.length - 1].start === node.quasis[node.quasis.length - 1].end;
+    }
+    return node.type !== "Literal" || typeof node.value !== "string";
+}
+
 //------------------------------------------------------------------------------
 // Rule Definition
 //------------------------------------------------------------------------------
@@ -62,12 +106,86 @@ module.exports = {
             recommended: false
         },
 
-        schema: []
+        schema: [],
+
+        fixable: "code"
     },
 
     create(context) {
+        const sourceCode = context.getSourceCode();
         let done = Object.create(null);
 
+        /**
+        * Gets the non-token text between two nodes, ignoring any other tokens that appear between the two tokens.
+        * @param {ASTNode} node1 The first node
+        * @param {ASTNode} node2 The second node
+        * @returns {string} The text between the nodes, excluding other tokens
+        */
+        function getTextBetween(node1, node2) {
+            const allTokens = [node1].concat(sourceCode.getTokensBetween(node1, node2)).concat(node2);
+            const sourceText = sourceCode.getText();
+
+            return allTokens.slice(0, -1).reduce((accumulator, token, index) => accumulator + sourceText.slice(token.range[1], allTokens[index + 1].range[0]), "");
+        }
+
+        /**
+        * Returns a template literal form of the given node.
+        * @param {ASTNode} currentNode A node that should be converted to a template literal
+        * @param {string} textBeforeNode Text that should appear before the node
+        * @param {string} textAfterNode Text that should appear after the node
+        * @returns {string} A string form of this node, represented as a template literal
+        */
+        function getTemplateLiteral(currentNode, textBeforeNode, textAfterNode) {
+            if (currentNode.type === "Literal" && typeof currentNode.value === "string") {
+
+                // If the current node is a string literal, escape any instances of ${ or ` to prevent them from being interpreted
+                // as a template placeholder. However, if the code already contains a backslash before the ${ or `
+                // for some reason, don't add another backslash, because that would change the meaning of the code (it would cause
+                // an actual backslash character to appear before the dollar sign).
+                return `\`${currentNode.raw.slice(1, -1).replace(/\\*(\${|`)/g, matched => {
+                    if (matched.lastIndexOf("\\") % 2) {
+                        return `\\${matched}`;
+                    }
+                    return matched;
+
+                // Unescape any quotes that appear in the original Literal that no longer need to be escaped.
+                }).replace(new RegExp(`\\\\${currentNode.raw[0]}`, "g"), currentNode.raw[0])}\``;
+            }
+
+            if (currentNode.type === "TemplateLiteral") {
+                return sourceCode.getText(currentNode);
+            }
+
+            if (isConcatenation(currentNode) && hasStringLiteral(currentNode) && hasNonStringLiteral(currentNode)) {
+                const plusSign = sourceCode.getTokensBetween(currentNode.left, currentNode.right).find(token => token.value === "+");
+                const textBeforePlus = getTextBetween(currentNode.left, plusSign);
+                const textAfterPlus = getTextBetween(plusSign, currentNode.right);
+                const leftEndsWithCurly = endsWithTemplateCurly(currentNode.left);
+                const rightStartsWithCurly = startsWithTemplateCurly(currentNode.right);
+
+                if (leftEndsWithCurly) {
+
+                    // If the left side of the expression ends with a template curly, add the extra text to the end of the curly bracket.
+                    // `foo${bar}` /* comment */ + 'baz' --> `foo${bar /* comment */  }${baz}`
+                    return getTemplateLiteral(currentNode.left, textBeforeNode, textBeforePlus + textAfterPlus).slice(0, -1) +
+                        getTemplateLiteral(currentNode.right, null, textAfterNode).slice(1);
+                }
+                if (rightStartsWithCurly) {
+
+                    // Otherwise, if the right side of the expression starts with a template curly, add the text there.
+                    // 'foo' /* comment */ + `${bar}baz` --> `foo${ /* comment */  bar}baz`
+                    return getTemplateLiteral(currentNode.left, textBeforeNode, null).slice(0, -1) +
+                        getTemplateLiteral(currentNode.right, textBeforePlus + textAfterPlus, textAfterNode).slice(1);
+                }
+
+                // Otherwise, these nodes should not be combined into a template curly, since there is nowhere to put
+                // the text between them.
+                return `${getTemplateLiteral(currentNode.left, textBeforeNode, null)}${textBeforePlus}+${textAfterPlus}${getTemplateLiteral(currentNode.right, textAfterNode, null)}`;
+            }
+
+            return `\`\${${textBeforeNode || ""}${sourceCode.getText(currentNode)}${textAfterNode || ""}}\``;
+        }
+
         /**
          * Reports if a given node is string concatenation with non string literals.
          *
@@ -88,9 +206,13 @@ module.exports = {
             done[topBinaryExpr.range[0]] = true;
 
             if (hasNonStringLiteral(topBinaryExpr)) {
-                context.report(
-                    topBinaryExpr,
-                    "Unexpected string concatenation.");
+                context.report({
+                    node: topBinaryExpr,
+                    message: "Unexpected string concatenation.",
+                    fix(fixer) {
+                        return fixer.replaceText(topBinaryExpr, getTemplateLiteral(topBinaryExpr, null, null));
+                    }
+                });
             }
         }
 
diff --git a/tools/eslint/lib/rules/quote-props.js b/tools/eslint/lib/rules/quote-props.js
index 88a634278edc49..2129ce6aa99b87 100644
--- a/tools/eslint/lib/rules/quote-props.js
+++ b/tools/eslint/lib/rules/quote-props.js
@@ -61,7 +61,9 @@ module.exports = {
                     maxItems: 2
                 }
             ]
-        }
+        },
+
+        fixable: "code"
     },
 
     create(context) {
@@ -74,7 +76,8 @@ module.exports = {
             MESSAGE_UNNECESSARY = "Unnecessarily quoted property '{{property}}' found.",
             MESSAGE_UNQUOTED = "Unquoted property '{{property}}' found.",
             MESSAGE_NUMERIC = "Unquoted number literal '{{property}}' used as key.",
-            MESSAGE_RESERVED = "Unquoted reserved word '{{property}}' used as key.";
+            MESSAGE_RESERVED = "Unquoted reserved word '{{property}}' used as key.",
+            sourceCode = context.getSourceCode();
 
 
         /**
@@ -100,6 +103,31 @@ module.exports = {
                 (tokens[0].type === "Numeric" && !skipNumberLiterals && String(+tokens[0].value) === tokens[0].value));
         }
 
+        /**
+        * Returns a string representation of a property node with quotes removed
+        * @param {ASTNode} key Key AST Node, which may or may not be quoted
+        * @returns {string} A replacement string for this property
+        */
+        function getUnquotedKey(key) {
+            return key.type === "Identifier" ? key.name : key.value;
+        }
+
+        /**
+        * Returns a string representation of a property node with quotes added
+        * @param {ASTNode} key Key AST Node, which may or may not be quoted
+        * @returns {string} A replacement string for this property
+        */
+        function getQuotedKey(key) {
+            if (key.type === "Literal" && typeof key.value === "string") {
+
+                // If the key is already a string literal, don't replace the quotes with double quotes.
+                return sourceCode.getText(key);
+            }
+
+            // Otherwise, the key is either an identifier or a number literal.
+            return `"${key.type === "Identifier" ? key.name : key.value}"`;
+        }
+
         /**
          * Ensures that a property's key is quoted only when necessary
          * @param   {ASTNode} node Property AST node
@@ -131,12 +159,27 @@ module.exports = {
                 }
 
                 if (CHECK_UNNECESSARY && areQuotesRedundant(key.value, tokens, NUMBERS)) {
-                    context.report(node, MESSAGE_UNNECESSARY, {property: key.value});
+                    context.report({
+                        node,
+                        message: MESSAGE_UNNECESSARY,
+                        data: {property: key.value},
+                        fix: fixer => fixer.replaceText(key, getUnquotedKey(key))
+                    });
                 }
             } else if (KEYWORDS && key.type === "Identifier" && isKeyword(key.name)) {
-                context.report(node, MESSAGE_RESERVED, {property: key.name});
+                context.report({
+                    node,
+                    message: MESSAGE_RESERVED,
+                    data: {property: key.name},
+                    fix: fixer => fixer.replaceText(key, getQuotedKey(key))
+                });
             } else if (NUMBERS && key.type === "Literal" && typeof key.value === "number") {
-                context.report(node, MESSAGE_NUMERIC, {property: key.value});
+                context.report({
+                    node,
+                    message: MESSAGE_NUMERIC,
+                    data: {property: key.value},
+                    fix: fixer => fixer.replaceText(key, getQuotedKey(key))
+                });
             }
         }
 
@@ -149,8 +192,11 @@ module.exports = {
             const key = node.key;
 
             if (!node.method && !node.computed && !node.shorthand && !(key.type === "Literal" && typeof key.value === "string")) {
-                context.report(node, MESSAGE_UNQUOTED, {
-                    property: key.name || key.value
+                context.report({
+                    node,
+                    message: MESSAGE_UNQUOTED,
+                    data: {property: key.name || key.value},
+                    fix: fixer => fixer.replaceText(key, getQuotedKey(key))
                 });
             }
         }
@@ -162,8 +208,9 @@ module.exports = {
          * @returns {void}
          */
         function checkConsistency(node, checkQuotesRedundancy) {
-            let quotes = false,
-                lackOfQuotes = false,
+            const quotedProps = [],
+                unquotedProps = [];
+            let keywordKeyName = null,
                 necessaryQuotes = false;
 
             node.properties.forEach(function(property) {
@@ -176,7 +223,7 @@ module.exports = {
 
                 if (key.type === "Literal" && typeof key.value === "string") {
 
-                    quotes = true;
+                    quotedProps.push(property);
 
                     if (checkQuotesRedundancy) {
                         try {
@@ -189,21 +236,40 @@ module.exports = {
                         necessaryQuotes = necessaryQuotes || !areQuotesRedundant(key.value, tokens) || KEYWORDS && isKeyword(tokens[0].value);
                     }
                 } else if (KEYWORDS && checkQuotesRedundancy && key.type === "Identifier" && isKeyword(key.name)) {
+                    unquotedProps.push(property);
                     necessaryQuotes = true;
-                    context.report(node, "Properties should be quoted as '{{property}}' is a reserved word.", {property: key.name});
+                    keywordKeyName = key.name;
                 } else {
-                    lackOfQuotes = true;
-                }
-
-                if (quotes && lackOfQuotes) {
-                    context.report(node, "Inconsistently quoted property '{{key}}' found.", {
-                        key: key.name || key.value
-                    });
+                    unquotedProps.push(property);
                 }
             });
 
-            if (checkQuotesRedundancy && quotes && !necessaryQuotes) {
-                context.report(node, "Properties shouldn't be quoted as all quotes are redundant.");
+            if (checkQuotesRedundancy && quotedProps.length && !necessaryQuotes) {
+                quotedProps.forEach(property => {
+                    context.report({
+                        node: property,
+                        message: "Properties shouldn't be quoted as all quotes are redundant.",
+                        fix: fixer => fixer.replaceText(property.key, getUnquotedKey(property.key))
+                    });
+                });
+            } else if (unquotedProps.length && keywordKeyName) {
+                unquotedProps.forEach(property => {
+                    context.report({
+                        node: property,
+                        message: "Properties should be quoted as '{{property}}' is a reserved word.",
+                        data: {property: keywordKeyName},
+                        fix: fixer => fixer.replaceText(property.key, getQuotedKey(property.key))
+                    });
+                });
+            } else if (quotedProps.length && unquotedProps.length) {
+                unquotedProps.forEach(property => {
+                    context.report({
+                        node: property,
+                        message: "Inconsistently quoted property '{{key}}' found.",
+                        data: {key: property.key.name || property.key.value},
+                        fix: fixer => fixer.replaceText(property.key, getQuotedKey(property.key))
+                    });
+                });
             }
         }
 
diff --git a/tools/eslint/lib/rules/quotes.js b/tools/eslint/lib/rules/quotes.js
index 29ef600c423142..90e68289e05662 100644
--- a/tools/eslint/lib/rules/quotes.js
+++ b/tools/eslint/lib/rules/quotes.js
@@ -123,12 +123,26 @@ module.exports = {
 
         /**
          * Determines if a given node is part of JSX syntax.
-         * @param {ASTNode} node The node to check.
-         * @returns {boolean} True if the node is a JSX node, false if not.
+         *
+         * This function returns `true` in the following cases:
+         *
+         * - `
` ... If the literal is an attribute value, the parent of the literal is `JSXAttribute`. + * - `
foo
` ... If the literal is a text content, the parent of the literal is `JSXElement`. + * + * In particular, this function returns `false` in the following cases: + * + * - `
` + * - `
{"foo"}
` + * + * In both cases, inside of the braces is handled as normal JavaScript. + * The braces are `JSXExpressionContainer` nodes. + * + * @param {ASTNode} node The Literal node to check. + * @returns {boolean} True if the node is a part of JSX, false if not. * @private */ - function isJSXElement(node) { - return node.type.indexOf("JSX") === 0; + function isJSXLiteral(node) { + return node.parent.type === "JSXAttribute" || node.parent.type === "JSXElement"; } /** @@ -215,7 +229,7 @@ module.exports = { if (settings && typeof val === "string") { isValid = (quoteOption === "backtick" && isAllowedAsNonBacktick(node)) || - isJSXElement(node.parent) || + isJSXLiteral(node) || astUtils.isSurroundedBy(rawVal, settings.quote); if (!isValid && avoidEscape) { diff --git a/tools/eslint/lib/rules/semi.js b/tools/eslint/lib/rules/semi.js index 7fc80ab8dabfd6..2f28f1614d1a42 100644 --- a/tools/eslint/lib/rules/semi.js +++ b/tools/eslint/lib/rules/semi.js @@ -53,7 +53,7 @@ module.exports = { create(context) { - const OPT_OUT_PATTERN = /[\[\(\/\+\-]/; // One of [(/+- + const OPT_OUT_PATTERN = /^[-[(\/+]$/; // One of [(/+-, but not ++ or -- const options = context.options[1]; const never = context.options[0] === "never", exceptOneLine = options && options.omitLastInOneLineBlock === true, diff --git a/tools/eslint/lib/rules/sort-keys.js b/tools/eslint/lib/rules/sort-keys.js index b3aeb81d8e0ee0..e42375d6bcc59f 100644 --- a/tools/eslint/lib/rules/sort-keys.js +++ b/tools/eslint/lib/rules/sort-keys.js @@ -1,5 +1,5 @@ /** - * @fileoverview Rule to requires object keys to be sorted + * @fileoverview Rule to require object keys to be sorted * @author Toru Nagashima */ @@ -74,7 +74,7 @@ const isValidOrders = { module.exports = { meta: { docs: { - description: "requires object keys to be sorted", + description: "require object keys to be sorted", category: "Stylistic Issues", recommended: false }, diff --git a/tools/eslint/lib/rules/space-before-function-paren.js b/tools/eslint/lib/rules/space-before-function-paren.js index 04c169a78624cc..c62413a37cd829 100644 --- a/tools/eslint/lib/rules/space-before-function-paren.js +++ b/tools/eslint/lib/rules/space-before-function-paren.js @@ -32,6 +32,9 @@ module.exports = { }, named: { enum: ["always", "never", "ignore"] + }, + asyncArrow: { + enum: ["always", "never", "ignore"] } }, additionalProperties: false @@ -48,7 +51,9 @@ module.exports = { let requireAnonymousFunctionSpacing = true, forbidAnonymousFunctionSpacing = false, requireNamedFunctionSpacing = true, - forbidNamedFunctionSpacing = false; + forbidNamedFunctionSpacing = false, + requireArrowFunctionSpacing = false, + forbidArrowFunctionSpacing = false; if (typeof configuration === "object") { requireAnonymousFunctionSpacing = ( @@ -57,6 +62,8 @@ module.exports = { requireNamedFunctionSpacing = ( !configuration.named || configuration.named === "always"); forbidNamedFunctionSpacing = configuration.named === "never"; + requireArrowFunctionSpacing = configuration.asyncArrow === "always"; + forbidArrowFunctionSpacing = configuration.asyncArrow === "never"; } else if (configuration === "never") { requireAnonymousFunctionSpacing = false; forbidAnonymousFunctionSpacing = true; @@ -92,13 +99,31 @@ module.exports = { * @returns {void} */ function validateSpacingBeforeParentheses(node) { - const isNamed = isNamedFunction(node); - let rightToken; + const isArrow = node.type === "ArrowFunctionExpression"; + const isNamed = !isArrow && isNamedFunction(node); + const isAnonymousGenerator = node.generator && !isNamed; + const isNormalArrow = isArrow && !node.async; + const isArrowWithoutParens = isArrow && sourceCode.getFirstToken(node, 1).value !== "("; + let forbidSpacing, requireSpacing, rightToken; - if (node.generator && !isNamed) { + // isAnonymousGenerator → `generator-star-spacing` should warn it. E.g. `function* () {}` + // isNormalArrow → ignore always. + // isArrowWithoutParens → ignore always. E.g. `async a => a` + if (isAnonymousGenerator || isNormalArrow || isArrowWithoutParens) { return; } + if (isArrow) { + forbidSpacing = forbidArrowFunctionSpacing; + requireSpacing = requireArrowFunctionSpacing; + } else if (isNamed) { + forbidSpacing = forbidNamedFunctionSpacing; + requireSpacing = requireNamedFunctionSpacing; + } else { + forbidSpacing = forbidAnonymousFunctionSpacing; + requireSpacing = requireAnonymousFunctionSpacing; + } + rightToken = sourceCode.getFirstToken(node); while (rightToken.value !== "(") { rightToken = sourceCode.getTokenAfter(rightToken); @@ -107,7 +132,7 @@ module.exports = { const location = leftToken.loc.end; if (sourceCode.isSpaceBetweenTokens(leftToken, rightToken)) { - if ((isNamed && forbidNamedFunctionSpacing) || (!isNamed && forbidAnonymousFunctionSpacing)) { + if (forbidSpacing) { context.report({ node, loc: location, @@ -118,7 +143,7 @@ module.exports = { }); } } else { - if ((isNamed && requireNamedFunctionSpacing) || (!isNamed && requireAnonymousFunctionSpacing)) { + if (requireSpacing) { context.report({ node, loc: location, @@ -133,7 +158,8 @@ module.exports = { return { FunctionDeclaration: validateSpacingBeforeParentheses, - FunctionExpression: validateSpacingBeforeParentheses + FunctionExpression: validateSpacingBeforeParentheses, + ArrowFunctionExpression: validateSpacingBeforeParentheses, }; } }; diff --git a/tools/eslint/lib/rules/space-infix-ops.js b/tools/eslint/lib/rules/space-infix-ops.js index c99c32880682ef..9831e8e2af6085 100644 --- a/tools/eslint/lib/rules/space-infix-ops.js +++ b/tools/eslint/lib/rules/space-infix-ops.js @@ -11,7 +11,7 @@ module.exports = { meta: { docs: { - description: "require spacing around operators", + description: "require spacing around infix operators", category: "Stylistic Issues", recommended: false }, diff --git a/tools/eslint/lib/rules/space-unary-ops.js b/tools/eslint/lib/rules/space-unary-ops.js index da79c5c7563470..11c59c8274f358 100644 --- a/tools/eslint/lib/rules/space-unary-ops.js +++ b/tools/eslint/lib/rules/space-unary-ops.js @@ -176,6 +176,17 @@ module.exports = { checkUnaryWordOperatorForSpaces(node, tokens[0], tokens[1], word); } + /** + * Verifies AwaitExpressions satisfy spacing requirements + * @param {ASTNode} node AwaitExpression AST node + * @returns {void} + */ + function checkForSpacesAfterAwait(node) { + const tokens = sourceCode.getFirstTokens(node, 3); + + checkUnaryWordOperatorForSpaces(node, tokens[0], tokens[1], "await"); + } + /** * Verifies UnaryExpression, UpdateExpression and NewExpression have spaces before or after the operator * @param {ASTnode} node AST node @@ -291,7 +302,8 @@ module.exports = { UnaryExpression: checkForSpaces, UpdateExpression: checkForSpaces, NewExpression: checkForSpaces, - YieldExpression: checkForSpacesAfterYield + YieldExpression: checkForSpacesAfterYield, + AwaitExpression: checkForSpacesAfterAwait }; } diff --git a/tools/eslint/lib/rules/strict.js b/tools/eslint/lib/rules/strict.js index 6581ac1bfd07d9..1591bd871465d4 100644 --- a/tools/eslint/lib/rules/strict.js +++ b/tools/eslint/lib/rules/strict.js @@ -88,7 +88,9 @@ module.exports = { { enum: ["never", "global", "function", "safe"] } - ] + ], + + fixable: "code" }, create(context) { @@ -104,40 +106,59 @@ module.exports = { mode = ecmaFeatures.globalReturn ? "global" : "function"; } + /** + * Determines whether a reported error should be fixed, depending on the error type. + * @param {string} errorType The type of error + * @returns {boolean} `true` if the reported error should be fixed + */ + function shouldFix(errorType) { + return errorType === "multiple" || errorType === "unnecessary" || errorType === "module" || errorType === "implied" || errorType === "unnecessaryInClasses"; + } + + /** + * Gets a fixer function to remove a given 'use strict' directive. + * @param {ASTNode} node The directive that should be removed + * @returns {Function} A fixer function + */ + function getFixFunction(node) { + return fixer => fixer.remove(node); + } + /** * Report a slice of an array of nodes with a given message. * @param {ASTNode[]} nodes Nodes. * @param {string} start Index to start from. * @param {string} end Index to end before. * @param {string} message Message to display. + * @param {boolean} fix `true` if the directive should be fixed (i.e. removed) * @returns {void} */ - function reportSlice(nodes, start, end, message) { - let i; - - for (i = start; i < end; i++) { - context.report(nodes[i], message); - } + function reportSlice(nodes, start, end, message, fix) { + nodes.slice(start, end).forEach(node => { + context.report({node, message, fix: fix ? getFixFunction(node) : null}); + }); } /** * Report all nodes in an array with a given message. * @param {ASTNode[]} nodes Nodes. * @param {string} message Message to display. + * @param {boolean} fix `true` if the directive should be fixed (i.e. removed) * @returns {void} */ - function reportAll(nodes, message) { - reportSlice(nodes, 0, nodes.length, message); + function reportAll(nodes, message, fix) { + reportSlice(nodes, 0, nodes.length, message, fix); } /** * Report all nodes in an array, except the first, with a given message. * @param {ASTNode[]} nodes Nodes. * @param {string} message Message to display. + * @param {boolean} fix `true` if the directive should be fixed (i.e. removed) * @returns {void} */ - function reportAllExceptFirst(nodes, message) { - reportSlice(nodes, 1, nodes.length, message); + function reportAllExceptFirst(nodes, message, fix) { + reportSlice(nodes, 1, nodes.length, message, fix); } /** @@ -157,12 +178,12 @@ module.exports = { if (!isSimpleParameterList(node.params)) { context.report(useStrictDirectives[0], messages.nonSimpleParameterList); } else if (isParentStrict) { - context.report(useStrictDirectives[0], messages.unnecessary); + context.report({node: useStrictDirectives[0], message: messages.unnecessary, fix: getFixFunction(useStrictDirectives[0])}); } else if (isInClass) { - context.report(useStrictDirectives[0], messages.unnecessaryInClasses); + context.report({node: useStrictDirectives[0], message: messages.unnecessaryInClasses, fix: getFixFunction(useStrictDirectives[0])}); } - reportAllExceptFirst(useStrictDirectives, messages.multiple); + reportAllExceptFirst(useStrictDirectives, messages.multiple, true); } else if (isParentGlobal) { if (isSimpleParameterList(node.params)) { context.report(node, messages.function); @@ -198,10 +219,10 @@ module.exports = { enterFunctionInFunctionMode(node, useStrictDirectives); } else if (useStrictDirectives.length > 0) { if (isSimpleParameterList(node.params)) { - reportAll(useStrictDirectives, messages[mode]); + reportAll(useStrictDirectives, messages[mode], shouldFix(mode)); } else { context.report(useStrictDirectives[0], messages.nonSimpleParameterList); - reportAllExceptFirst(useStrictDirectives, messages.multiple); + reportAllExceptFirst(useStrictDirectives, messages.multiple, true); } } } @@ -218,9 +239,9 @@ module.exports = { if (node.body.length > 0 && useStrictDirectives.length === 0) { context.report(node, messages.global); } - reportAllExceptFirst(useStrictDirectives, messages.multiple); + reportAllExceptFirst(useStrictDirectives, messages.multiple, true); } else { - reportAll(useStrictDirectives, messages[mode]); + reportAll(useStrictDirectives, messages[mode], shouldFix(mode)); } }, FunctionDeclaration: enterFunction, diff --git a/tools/eslint/lib/rules/valid-jsdoc.js b/tools/eslint/lib/rules/valid-jsdoc.js index d6ebd24a4ac887..09fc684719a4af 100644 --- a/tools/eslint/lib/rules/valid-jsdoc.js +++ b/tools/eslint/lib/rules/valid-jsdoc.js @@ -165,7 +165,7 @@ module.exports = { } /** - * Check if return tag type is void or undefined + * Validate type for a given JSDoc node * @param {Object} jsdocNode JSDoc node * @param {Object} type JSDoc tag * @returns {void} @@ -192,7 +192,9 @@ module.exports = { elements = type.elements; break; case "FieldType": // Array.<{count: number, votes: number}> - typesToCheck.push(getCurrentExpectedTypes(type.value)); + if (type.value) { + typesToCheck.push(getCurrentExpectedTypes(type.value)); + } break; default: typesToCheck.push(getCurrentExpectedTypes(type)); diff --git a/tools/eslint/lib/rules/valid-typeof.js b/tools/eslint/lib/rules/valid-typeof.js index b13e2aefdd08c1..ed0a7c017955f2 100644 --- a/tools/eslint/lib/rules/valid-typeof.js +++ b/tools/eslint/lib/rules/valid-typeof.js @@ -34,6 +34,17 @@ module.exports = { const VALID_TYPES = ["symbol", "undefined", "object", "boolean", "number", "string", "function"], OPERATORS = ["==", "===", "!=", "!=="]; + const requireStringLiterals = context.options[0] && context.options[0].requireStringLiterals; + + /** + * Determines whether a node is a typeof expression. + * @param {ASTNode} node The node + * @returns {boolean} `true` if the node is a typeof expression + */ + function isTypeofExpression(node) { + return node.type === "UnaryExpression" && node.operator === "typeof"; + } + //-------------------------------------------------------------------------- // Public //-------------------------------------------------------------------------- @@ -41,17 +52,19 @@ module.exports = { return { UnaryExpression(node) { - if (node.operator === "typeof") { + if (isTypeofExpression(node)) { const parent = context.getAncestors().pop(); if (parent.type === "BinaryExpression" && OPERATORS.indexOf(parent.operator) !== -1) { const sibling = parent.left === node ? parent.right : parent.left; - if (sibling.type === "Literal") { - if (VALID_TYPES.indexOf(sibling.value) === -1) { + if (sibling.type === "Literal" || sibling.type === "TemplateLiteral" && !sibling.expressions.length) { + const value = sibling.type === "Literal" ? sibling.value : sibling.quasis[0].value.cooked; + + if (VALID_TYPES.indexOf(value) === -1) { context.report(sibling, "Invalid typeof comparison value."); } - } else if (context.options[0] && context.options[0].requireStringLiterals) { + } else if (requireStringLiterals && !isTypeofExpression(sibling)) { context.report(sibling, "Typeof comparisons should be to string literals."); } } diff --git a/tools/eslint/lib/rules/wrap-iife.js b/tools/eslint/lib/rules/wrap-iife.js index c648af82d2e208..bbbc79ab1fff25 100644 --- a/tools/eslint/lib/rules/wrap-iife.js +++ b/tools/eslint/lib/rules/wrap-iife.js @@ -5,6 +5,8 @@ "use strict"; +const astUtils = require("../ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -20,13 +22,25 @@ module.exports = { schema: [ { enum: ["outside", "inside", "any"] + }, + { + type: "object", + properties: { + functionPrototypeMethods: { + type: "boolean" + } + }, + additionalProperties: false } - ] + ], + + fixable: "code" }, create(context) { const style = context.options[0] || "outside"; + const includeFunctionPrototypeMethods = (context.options[1] && context.options[1].functionPrototypeMethods) || false; const sourceCode = context.getSourceCode(); @@ -44,20 +58,91 @@ module.exports = { nextToken && nextToken.value === ")"; } - return { + /** + * Get the function node from an IIFE + * @param {ASTNode} node node to evaluate + * @returns {ASTNode} node that is the function expression of the given IIFE, or null if none exist + */ + function getFunctionNodeFromIIFE(node) { + const callee = node.callee; + + if (callee.type === "FunctionExpression") { + return callee; + } + + if (includeFunctionPrototypeMethods && + callee.type === "MemberExpression" && + callee.object.type === "FunctionExpression" && + (astUtils.getStaticPropertyName(callee) === "call" || astUtils.getStaticPropertyName(callee) === "apply") + ) { + return callee.object; + } + + return null; + } + + return { CallExpression(node) { - if (node.callee.type === "FunctionExpression") { - const callExpressionWrapped = wrapped(node), - functionExpressionWrapped = wrapped(node.callee); - - if (!callExpressionWrapped && !functionExpressionWrapped) { - context.report(node, "Wrap an immediate function invocation in parentheses."); - } else if (style === "inside" && !functionExpressionWrapped) { - context.report(node, "Wrap only the function expression in parens."); - } else if (style === "outside" && !callExpressionWrapped) { - context.report(node, "Move the invocation into the parens that contain the function."); - } + const innerNode = getFunctionNodeFromIIFE(node); + + if (!innerNode) { + return; + } + + const callExpressionWrapped = wrapped(node), + functionExpressionWrapped = wrapped(innerNode); + + if (!callExpressionWrapped && !functionExpressionWrapped) { + context.report({ + node, + message: "Wrap an immediate function invocation in parentheses.", + fix(fixer) { + const nodeToSurround = style === "inside" ? innerNode : node; + + return fixer.replaceText(nodeToSurround, `(${sourceCode.getText(nodeToSurround)})`); + } + }); + } else if (style === "inside" && !functionExpressionWrapped) { + context.report({ + node, + message: "Wrap only the function expression in parens.", + fix(fixer) { + + /* + * The outer call expression will always be wrapped at this point. + * Replace the range between the end of the function expression and the end of the call expression. + * for example, in `(function(foo) {}(bar))`, the range `(bar))` should get replaced with `)(bar)`. + * Replace the parens from the outer expression, and parenthesize the function expression. + */ + const parenAfter = sourceCode.getTokenAfter(node); + + return fixer.replaceTextRange( + [innerNode.range[1], parenAfter.range[1]], + `)${sourceCode.getText().slice(innerNode.range[1], parenAfter.range[0])}` + ); + } + }); + } else if (style === "outside" && !callExpressionWrapped) { + context.report({ + node, + message: "Move the invocation into the parens that contain the function.", + fix(fixer) { + + /* + * The inner function expression will always be wrapped at this point. + * It's only necessary to replace the range between the end of the function expression + * and the call expression. For example, in `(function(foo) {})(bar)`, the range `)(bar)` + * should get replaced with `(bar))`. + */ + const parenAfter = sourceCode.getTokenAfter(innerNode); + + return fixer.replaceTextRange( + [parenAfter.range[0], node.range[1]], + `${sourceCode.getText().slice(parenAfter.range[1], node.range[1])})` + ); + } + }); } } }; diff --git a/tools/eslint/lib/rules/yoda.js b/tools/eslint/lib/rules/yoda.js index ab68db4e8a4dd5..e463a476ab6be4 100644 --- a/tools/eslint/lib/rules/yoda.js +++ b/tools/eslint/lib/rules/yoda.js @@ -141,7 +141,9 @@ module.exports = { }, additionalProperties: false } - ] + ], + + fixable: "code" }, create(context) { @@ -219,46 +221,57 @@ module.exports = { isParenWrapped()); } + const OPERATOR_FLIP_MAP = { + "===": "===", + "!==": "!==", + "==": "==", + "!=": "!=", + "<": ">", + ">": "<", + "<=": ">=", + ">=": "<=" + }; + + /** + * Returns a string representation of a BinaryExpression node with its sides/operator flipped around. + * @param {ASTNode} node The BinaryExpression node + * @returns {string} A string representation of the node with the sides and operator flipped + */ + function getFlippedString(node) { + const operatorToken = sourceCode.getTokensBetween(node.left, node.right).find(token => token.value === node.operator); + const textBeforeOperator = sourceCode.getText().slice(sourceCode.getTokenBefore(operatorToken).range[1], operatorToken.range[0]); + const textAfterOperator = sourceCode.getText().slice(operatorToken.range[1], sourceCode.getTokenAfter(operatorToken).range[0]); + const leftText = sourceCode.getText().slice(sourceCode.getFirstToken(node).range[0], sourceCode.getTokenBefore(operatorToken).range[1]); + const rightText = sourceCode.getText().slice(sourceCode.getTokenAfter(operatorToken).range[0], sourceCode.getLastToken(node).range[1]); + + return rightText + textBeforeOperator + OPERATOR_FLIP_MAP[operatorToken.value] + textAfterOperator + leftText; + } + //-------------------------------------------------------------------------- // Public //-------------------------------------------------------------------------- return { - BinaryExpression: always ? function(node) { - - // Comparisons must always be yoda-style: if ("blue" === color) - if ( - (node.right.type === "Literal" || looksLikeLiteral(node.right)) && - !(node.left.type === "Literal" || looksLikeLiteral(node.left)) && - !(!isEqualityOperator(node.operator) && onlyEquality) && - isComparisonOperator(node.operator) && - !(exceptRange && isRangeTest(context.getAncestors().pop())) - ) { - context.report({ - node, - message: "Expected literal to be on the left side of {{operator}}.", - data: { - operator: node.operator - } - }); - } - - } : function(node) { + BinaryExpression(node) { + const expectedLiteral = always ? node.left : node.right; + const expectedNonLiteral = always ? node.right : node.left; - // Comparisons must never be yoda-style (default) + // If `expectedLiteral` is not a literal, and `expectedNonLiteral` is a literal, raise an error. if ( - (node.left.type === "Literal" || looksLikeLiteral(node.left)) && - !(node.right.type === "Literal" || looksLikeLiteral(node.right)) && + (expectedNonLiteral.type === "Literal" || looksLikeLiteral(expectedNonLiteral)) && + !(expectedLiteral.type === "Literal" || looksLikeLiteral(expectedLiteral)) && !(!isEqualityOperator(node.operator) && onlyEquality) && isComparisonOperator(node.operator) && !(exceptRange && isRangeTest(context.getAncestors().pop())) ) { context.report({ node, - message: "Expected literal to be on the right side of {{operator}}.", + message: "Expected literal to be on the {{expectedSide}} side of {{operator}}.", data: { - operator: node.operator - } + operator: node.operator, + expectedSide: always ? "left" : "right" + }, + fix: fixer => fixer.replaceText(node, getFlippedString(node)) }); } diff --git a/tools/eslint/lib/testers/rule-tester.js b/tools/eslint/lib/testers/rule-tester.js index 04e64cf662248e..25b86993593c4a 100644 --- a/tools/eslint/lib/testers/rule-tester.js +++ b/tools/eslint/lib/testers/rule-tester.js @@ -182,13 +182,53 @@ RuleTester.resetDefaultConfig = function() { }; // default separators for testing -RuleTester.describe = (typeof describe === "function") ? describe : /* istanbul ignore next */ function(text, method) { - return method.apply(this); -}; +const DESCRIBE = Symbol("describe"); +const IT = Symbol("it"); + +RuleTester[DESCRIBE] = RuleTester[IT] = null; -RuleTester.it = (typeof it === "function") ? it : /* istanbul ignore next */ function(text, method) { +/** + * This is `it` or `describe` if those don't exist. + * @this {Mocha} + * @param {string} text - The description of the test case. + * @param {Function} method - The logic of the test case. + * @returns {any} Returned value of `method`. + */ +function defaultHandler(text, method) { return method.apply(this); -}; +} + +// If people use `mocha test.js --watch` command, `describe` and `it` function +// instances are different for each execution. So this should get fresh instance +// always. +Object.defineProperties(RuleTester, { + describe: { + get() { + return ( + RuleTester[DESCRIBE] || + (typeof describe === "function" ? describe : defaultHandler) + ); + }, + set(value) { + RuleTester[DESCRIBE] = value; + }, + configurable: true, + enumerable: true, + }, + it: { + get() { + return ( + RuleTester[IT] || + (typeof it === "function" ? it : defaultHandler) + ); + }, + set(value) { + RuleTester[IT] = value; + }, + configurable: true, + enumerable: true, + }, +}); RuleTester.prototype = { @@ -266,9 +306,9 @@ RuleTester.prototype = { if (validateSchema.errors) { throw new Error([ - "Schema for rule " + ruleName + " is invalid:" + `Schema for rule ${ruleName} is invalid:` ].concat(validateSchema.errors.map(function(error) { - return "\t" + error.field + ": " + error.message; + return `\t${error.field}: ${error.message}`; })).join("\n")); } } @@ -373,7 +413,7 @@ RuleTester.prototype = { */ function testInvalidTemplate(ruleName, item) { assert.ok(item.errors || item.errors === 0, - "Did not specify errors for an invalid test of " + ruleName); + `Did not specify errors for an invalid test of ${ruleName}`); const result = runRuleForItem(ruleName, item); const messages = result.messages; @@ -389,7 +429,7 @@ RuleTester.prototype = { item.errors.length, item.errors.length === 1 ? "" : "s", messages.length, util.inspect(messages))); for (let i = 0, l = item.errors.length; i < l; i++) { - assert.ok(!("fatal" in messages[i]), "A fatal parsing error occurred: " + messages[i].message); + assert.ok(!("fatal" in messages[i]), `A fatal parsing error occurred: ${messages[i].message}`); assert.equal(messages[i].ruleId, ruleName, "Error rule name should be the same as the name of the rule being tested"); if (typeof item.errors[i] === "string") { @@ -408,23 +448,23 @@ RuleTester.prototype = { } if (item.errors[i].type) { - assert.equal(messages[i].nodeType, item.errors[i].type, "Error type should be " + item.errors[i].type); + assert.equal(messages[i].nodeType, item.errors[i].type, `Error type should be ${item.errors[i].type}`); } if (item.errors[i].hasOwnProperty("line")) { - assert.equal(messages[i].line, item.errors[i].line, "Error line should be " + item.errors[i].line); + assert.equal(messages[i].line, item.errors[i].line, `Error line should be ${item.errors[i].line}`); } if (item.errors[i].hasOwnProperty("column")) { - assert.equal(messages[i].column, item.errors[i].column, "Error column should be " + item.errors[i].column); + assert.equal(messages[i].column, item.errors[i].column, `Error column should be ${item.errors[i].column}`); } if (item.errors[i].hasOwnProperty("endLine")) { - assert.equal(messages[i].endLine, item.errors[i].endLine, "Error endLine should be " + item.errors[i].endLine); + assert.equal(messages[i].endLine, item.errors[i].endLine, `Error endLine should be ${item.errors[i].endLine}`); } if (item.errors[i].hasOwnProperty("endColumn")) { - assert.equal(messages[i].endColumn, item.errors[i].endColumn, "Error endColumn should be " + item.errors[i].endColumn); + assert.equal(messages[i].endColumn, item.errors[i].endColumn, `Error endColumn should be ${item.errors[i].endColumn}`); } } else { diff --git a/tools/eslint/lib/timing.js b/tools/eslint/lib/timing.js index b9394af47cee69..627aa5f82f8118 100644 --- a/tools/eslint/lib/timing.js +++ b/tools/eslint/lib/timing.js @@ -66,7 +66,7 @@ function display(data) { .slice(0, 10); rows.forEach(function(row) { - row.push((row[1] * 100 / total).toFixed(1) + "%"); + row.push(`${(row[1] * 100 / total).toFixed(1)}%`); row[1] = row[1].toFixed(3); }); diff --git a/tools/eslint/lib/util/glob-util.js b/tools/eslint/lib/util/glob-util.js index 03d1a2bdd9cb25..cba2e694ad5238 100644 --- a/tools/eslint/lib/util/glob-util.js +++ b/tools/eslint/lib/util/glob-util.js @@ -50,9 +50,9 @@ function processPath(options) { let suffix = "/**"; if (extensions.length === 1) { - suffix += "/*." + extensions[0]; + suffix += `/*.${extensions[0]}`; } else { - suffix += "/*.{" + extensions.join(",") + "}"; + suffix += `/*.{${extensions.join(",")}}`; } /** diff --git a/tools/eslint/lib/util/module-resolver.js b/tools/eslint/lib/util/module-resolver.js index d59413c505c123..40c107a70e82bd 100644 --- a/tools/eslint/lib/util/module-resolver.js +++ b/tools/eslint/lib/util/module-resolver.js @@ -71,7 +71,7 @@ ModuleResolver.prototype = { const result = Module._findPath(name, lookupPaths); // eslint-disable-line no-underscore-dangle if (!result) { - throw new Error("Cannot find module '" + name + "'"); + throw new Error(`Cannot find module '${name}'`); } return result; diff --git a/tools/eslint/lib/util/node-event-generator.js b/tools/eslint/lib/util/node-event-generator.js index 92253f6ca23b6e..95d9132dd2f3b3 100644 --- a/tools/eslint/lib/util/node-event-generator.js +++ b/tools/eslint/lib/util/node-event-generator.js @@ -46,7 +46,7 @@ NodeEventGenerator.prototype = { * @returns {void} */ leaveNode: function leaveNode(node) { - this.emitter.emit(node.type + ":exit", node); + this.emitter.emit(`${node.type}:exit`, node); } }; diff --git a/tools/eslint/lib/util/npm-util.js b/tools/eslint/lib/util/npm-util.js index a910419403309d..e9131595e7e822 100644 --- a/tools/eslint/lib/util/npm-util.js +++ b/tools/eslint/lib/util/npm-util.js @@ -53,7 +53,7 @@ function installSyncSaveDev(packages) { if (Array.isArray(packages)) { packages = packages.join(" "); } - shell.exec("npm i --save-dev " + packages, {stdio: "inherit"}); + shell.exec(`npm i --save-dev ${packages}`, {stdio: "inherit"}); } /** diff --git a/tools/eslint/lib/util/source-code-util.js b/tools/eslint/lib/util/source-code-util.js index c96552f8f6646f..8e660e0961d330 100644 --- a/tools/eslint/lib/util/source-code-util.js +++ b/tools/eslint/lib/util/source-code-util.js @@ -36,7 +36,7 @@ function getSourceCodeOfFile(filename, options) { if (results && results.results[0] && results.results[0].messages[0] && results.results[0].messages[0].fatal) { const msg = results.results[0].messages[0]; - throw new Error("(" + filename + ":" + msg.line + ":" + msg.column + ") " + msg.message); + throw new Error(`(${filename}:${msg.line}:${msg.column}) ${msg.message}`); } const sourceCode = eslint.getSourceCode(); @@ -89,7 +89,7 @@ function getSourceCodeOfFiles(patterns, options, cb) { }, []); if (filenames.length === 0) { - debug("Did not find any files matching pattern(s): " + patterns); + debug(`Did not find any files matching pattern(s): ${patterns}`); } filenames.forEach(function(filename) { const sourceCode = getSourceCodeOfFile(filename, opts); diff --git a/tools/eslint/lib/util/xml-escape.js b/tools/eslint/lib/util/xml-escape.js index 2c3abd39d5b482..698abaf38eaecf 100644 --- a/tools/eslint/lib/util/xml-escape.js +++ b/tools/eslint/lib/util/xml-escape.js @@ -15,7 +15,7 @@ * @private */ module.exports = function(s) { - return ("" + s).replace(/[<>&"'\x00-\x1F\x7F\u0080-\uFFFF]/g, function(c) { // eslint-disable-line no-control-regex + return (`${s}`).replace(/[<>&"'\x00-\x1F\x7F\u0080-\uFFFF]/g, function(c) { // eslint-disable-line no-control-regex switch (c) { case "<": return "<"; @@ -28,7 +28,7 @@ module.exports = function(s) { case "'": return "'"; default: - return "&#" + c.charCodeAt(0) + ";"; + return `&#${c.charCodeAt(0)};`; } }); }; diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/.bin/acorn b/tools/eslint/node_modules/acorn-jsx/node_modules/.bin/acorn new file mode 120000 index 00000000000000..cf76760386200f --- /dev/null +++ b/tools/eslint/node_modules/acorn-jsx/node_modules/.bin/acorn @@ -0,0 +1 @@ +../acorn/bin/acorn \ No newline at end of file diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/.tern-project b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/.tern-project new file mode 100644 index 00000000000000..6718ce07e1c8a0 --- /dev/null +++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/.tern-project @@ -0,0 +1,6 @@ +{ + "plugins": { + "node": true, + "es_modules": true + } +} \ No newline at end of file diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/AUTHORS b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/AUTHORS new file mode 100644 index 00000000000000..1b2061cd4b3021 --- /dev/null +++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/AUTHORS @@ -0,0 +1,59 @@ +List of Acorn contributors. Updated before every release. + +Adrian Rakovsky +Alistair Braidwood +Amila Welihinda +Andres Suarez +Angelo +Aparajita Fishman +Arian Stolwijk +Artem Govorov +Brandon Mills +Charles Hughes +Conrad Irwin +Daniel Tschinder +David Bonnet +Domenico Matteo +ForbesLindesay +Forbes Lindesay +Gilad Peleg +impinball +Ingvar Stepanyan +Jackson Ray Hamilton +Jesse McCarthy +Jiaxing Wang +Joel Kemp +Johannes Herr +Jordan Klassen +Jürg Lehni +keeyipchan +Keheliya Gallaba +Kevin Irish +Kevin Kwok +krator +Marijn Haverbeke +Martin Carlberg +Mathias Bynens +Mathieu 'p01' Henri +Matthew Bastien +Max Schaefer +Max Zerzouri +Mihai Bazon +Mike Rennie +Nicholas C. Zakas +Nick Fitzgerald +Olivier Thomann +Oskar Schöldström +Paul Harper +Peter Rust +PlNG +Prayag Verma +ReadmeCritic +r-e-d +Richard Gibson +Rich Harris +Rich-Harris +Sebastian McKenzie +Timothy Gu +Toru Nagashima +zsjforcn diff --git a/tools/eslint/node_modules/xregexp/LICENSE b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/LICENSE similarity index 92% rename from tools/eslint/node_modules/xregexp/LICENSE rename to tools/eslint/node_modules/acorn-jsx/node_modules/acorn/LICENSE index 5561edc5d2ffce..a35ebf44fd859e 100644 --- a/tools/eslint/node_modules/xregexp/LICENSE +++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/LICENSE @@ -1,6 +1,4 @@ -The MIT License - -Copyright (c) 2007-2016 Steven Levithan +Copyright (C) 2012-2016 by various contributors (see AUTHORS) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/README.md b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/README.md new file mode 100644 index 00000000000000..6c53802b8a8792 --- /dev/null +++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/README.md @@ -0,0 +1,407 @@ +# Acorn + +[![Build Status](https://travis-ci.org/ternjs/acorn.svg?branch=master)](https://travis-ci.org/ternjs/acorn) +[![NPM version](https://img.shields.io/npm/v/acorn.svg)](https://www.npmjs.com/package/acorn) +[Author funding status: ![maintainer happiness](https://marijnhaverbeke.nl/fund/status_s.png?force)](https://marijnhaverbeke.nl/fund/) + +A tiny, fast JavaScript parser, written completely in JavaScript. + +## Community + +Acorn is open source software released under an +[MIT license](https://github.com/ternjs/acorn/blob/master/LICENSE). + +You are welcome to +[report bugs](https://github.com/ternjs/acorn/issues) or create pull +requests on [github](https://github.com/ternjs/acorn). For questions +and discussion, please use the +[Tern discussion forum](https://discuss.ternjs.net). + +## Installation + +The easiest way to install acorn is with [`npm`][npm]. + +[npm]: https://www.npmjs.com/ + +```sh +npm install acorn +``` + +Alternately, download the source. + +```sh +git clone https://github.com/ternjs/acorn.git +``` + +## Components + +When run in a CommonJS (node.js) or AMD environment, exported values +appear in the interfaces exposed by the individual files, as usual. +When loaded in the browser (Acorn works in any JS-enabled browser more +recent than IE5) without any kind of module management, a single +global object `acorn` will be defined, and all the exported properties +will be added to that. + +### Main parser + +This is implemented in `dist/acorn.js`, and is what you get when you +`require("acorn")` in node.js. + +**parse**`(input, options)` is used to parse a JavaScript program. +The `input` parameter is a string, `options` can be undefined or an +object setting some of the options listed below. The return value will +be an abstract syntax tree object as specified by the +[ESTree spec][estree]. + +When encountering a syntax error, the parser will raise a +`SyntaxError` object with a meaningful message. The error object will +have a `pos` property that indicates the character offset at which the +error occurred, and a `loc` object that contains a `{line, column}` +object referring to that same position. + +[estree]: https://github.com/estree/estree + +- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be + either 3, 5, 6, or 7. This influences support for strict mode, the set + of reserved words, and support for new syntax features. Default is 6. + + **NOTE**: Only 'stage 4' (finalized) ECMAScript 7 features are being + implemented by Acorn. That means that most of the draft standard is + not yet being parsed. + +- **sourceType**: Indicate the mode the code should be parsed in. Can be + either `"script"` or `"module"`. + +- **onInsertedSemicolon**: If given a callback, that callback will be + called whenever a missing semicolon is inserted by the parser. The + callback will be given the character offset of the point where the + semicolon is inserted as argument, and if `locations` is on, also a + `{line, column}` object representing this position. + +- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing + commas. + +- **allowReserved**: If `false`, using a reserved word will generate + an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher + versions. When given the value `"never"`, reserved words and + keywords can also not be used as property names (as in Internet + Explorer's old parser). + +- **allowReturnOutsideFunction**: By default, a return statement at + the top level raises an error. Set this to `true` to accept such + code. + +- **allowImportExportEverywhere**: By default, `import` and `export` + declarations can only appear at a program's top level. Setting this + option to `true` allows them anywhere where a statement is allowed. + +- **allowHashBang**: When this is enabled (off by default), if the + code starts with the characters `#!` (as in a shellscript), the + first line will be treated as a comment. + +- **locations**: When `true`, each node has a `loc` object attached + with `start` and `end` subobjects, each of which contains the + one-based line and zero-based column numbers in `{line, column}` + form. Default is `false`. + +- **onToken**: If a function is passed for this option, each found + token will be passed in same format as tokens returned from + `tokenizer().getToken()`. + + If array is passed, each found token is pushed to it. + + Note that you are not allowed to call the parser from the + callback—that will corrupt its internal state. + +- **onComment**: If a function is passed for this option, whenever a + comment is encountered the function will be called with the + following parameters: + + - `block`: `true` if the comment is a block comment, false if it + is a line comment. + - `text`: The content of the comment. + - `start`: Character offset of the start of the comment. + - `end`: Character offset of the end of the comment. + + When the `locations` options is on, the `{line, column}` locations + of the comment’s start and end are passed as two additional + parameters. + + If array is passed for this option, each found comment is pushed + to it as object in Esprima format: + + ```javascript + { + "type": "Line" | "Block", + "value": "comment text", + "start": Number, + "end": Number, + // If `locations` option is on: + "loc": { + "start": {line: Number, column: Number} + "end": {line: Number, column: Number} + }, + // If `ranges` option is on: + "range": [Number, Number] + } + ``` + + Note that you are not allowed to call the parser from the + callback—that will corrupt its internal state. + +- **ranges**: Nodes have their start and end characters offsets + recorded in `start` and `end` properties (directly on the node, + rather than the `loc` object, which holds line/column data. To also + add a [semi-standardized][range] `range` property holding a + `[start, end]` array with the same numbers, set the `ranges` option + to `true`. + +- **program**: It is possible to parse multiple files into a single + AST by passing the tree produced by parsing the first file as the + `program` option in subsequent parses. This will add the toplevel + forms of the parsed file to the "Program" (top) node of an existing + parse tree. + +- **sourceFile**: When the `locations` option is `true`, you can pass + this option to add a `source` attribute in every node’s `loc` + object. Note that the contents of this option are not examined or + processed in any way; you are free to use whatever format you + choose. + +- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property + will be added (regardless of the `location` option) directly to the + nodes, rather than the `loc` object. + +- **preserveParens**: If this option is `true`, parenthesized expressions + are represented by (non-standard) `ParenthesizedExpression` nodes + that have a single `expression` property containing the expression + inside parentheses. + +[range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + +**parseExpressionAt**`(input, offset, options)` will parse a single +expression in a string, and return its AST. It will not complain if +there is more of the string left after the expression. + +**getLineInfo**`(input, offset)` can be used to get a `{line, +column}` object for a given program string and character offset. + +**tokenizer**`(input, options)` returns an object with a `getToken` +method that can be called repeatedly to get the next token, a `{start, +end, type, value}` object (with added `loc` property when the +`locations` option is enabled and `range` property when the `ranges` +option is enabled). When the token's type is `tokTypes.eof`, you +should stop calling the method, since it will keep returning that same +token forever. + +In ES6 environment, returned result can be used as any other +protocol-compliant iterable: + +```javascript +for (let token of acorn.tokenizer(str)) { + // iterate over the tokens +} + +// transform code to array of tokens: +var tokens = [...acorn.tokenizer(str)]; +``` + +**tokTypes** holds an object mapping names to the token type objects +that end up in the `type` properties of tokens. + +#### Note on using with [Escodegen][escodegen] + +Escodegen supports generating comments from AST, attached in +Esprima-specific format. In order to simulate same format in +Acorn, consider following example: + +```javascript +var comments = [], tokens = []; + +var ast = acorn.parse('var x = 42; // answer', { + // collect ranges for each node + ranges: true, + // collect comments in Esprima's format + onComment: comments, + // collect token ranges + onToken: tokens +}); + +// attach comments using collected information +escodegen.attachComments(ast, comments, tokens); + +// generate code +console.log(escodegen.generate(ast, {comment: true})); +// > 'var x = 42; // answer' +``` + +[escodegen]: https://github.com/estools/escodegen + +### dist/acorn_loose.js ### + +This file implements an error-tolerant parser. It exposes a single +function. The loose parser is accessible in node.js via `require("acorn/dist/acorn_loose")`. + +**parse_dammit**`(input, options)` takes the same arguments and +returns the same syntax tree as the `parse` function in `acorn.js`, +but never raises an error, and will do its best to parse syntactically +invalid code in as meaningful a way as it can. It'll insert identifier +nodes with name `"✖"` as placeholders in places where it can't make +sense of the input. Depends on `acorn.js`, because it uses the same +tokenizer. + +### dist/walk.js ### + +Implements an abstract syntax tree walker. Will store its interface in +`acorn.walk` when loaded without a module system. + +**simple**`(node, visitors, base, state)` does a 'simple' walk over +a tree. `node` should be the AST node to walk, and `visitors` an +object with properties whose names correspond to node types in the +[ESTree spec][estree]. The properties should contain functions +that will be called with the node object and, if applicable the state +at that point. The last two arguments are optional. `base` is a walker +algorithm, and `state` is a start state. The default walker will +simply visit all statements and expressions and not produce a +meaningful state. (An example of a use of state is to track scope at +each point in the tree.) + +**ancestor**`(node, visitors, base, state)` does a 'simple' walk over +a tree, building up an array of ancestor nodes (including the current node) +and passing the array to the callbacks as a third parameter. + +**recursive**`(node, state, functions, base)` does a 'recursive' +walk, where the walker functions are responsible for continuing the +walk on the child nodes of their target node. `state` is the start +state, and `functions` should contain an object that maps node types +to walker functions. Such functions are called with `(node, state, c)` +arguments, and can cause the walk to continue on a sub-node by calling +the `c` argument on it with `(node, state)` arguments. The optional +`base` argument provides the fallback walker functions for node types +that aren't handled in the `functions` object. If not given, the +default walkers will be used. + +**make**`(functions, base)` builds a new walker object by using the +walker functions in `functions` and filling in the missing ones by +taking defaults from `base`. + +**findNodeAt**`(node, start, end, test, base, state)` tries to +locate a node in a tree at the given start and/or end offsets, which +satisfies the predicate `test`. `start` and `end` can be either `null` +(as wildcard) or a number. `test` may be a string (indicating a node +type) or a function that takes `(nodeType, node)` arguments and +returns a boolean indicating whether this node is interesting. `base` +and `state` are optional, and can be used to specify a custom walker. +Nodes are tested from inner to outer, so if two nodes match the +boundaries, the inner one will be preferred. + +**findNodeAround**`(node, pos, test, base, state)` is a lot like +`findNodeAt`, but will match any node that exists 'around' (spanning) +the given position. + +**findNodeAfter**`(node, pos, test, base, state)` is similar to +`findNodeAround`, but will match all nodes *after* the given position +(testing outer nodes before inner nodes). + +## Command line interface + +The `bin/acorn` utility can be used to parse a file from the command +line. It accepts as arguments its input file and the following +options: + +- `--ecma3|--ecma5|--ecma6|--ecma7`: Sets the ECMAScript version to parse. Default is + version 5. + +- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise. + +- `--locations`: Attaches a "loc" object to each node with "start" and + "end" subobjects, each of which contains the one-based line and + zero-based column numbers in `{line, column}` form. + +- `--allow-hash-bang`: If the code starts with the characters #! (as in a shellscript), the first line will be treated as a comment. + +- `--compact`: No whitespace is used in the AST output. + +- `--silent`: Do not output the AST, just return the exit status. + +- `--help`: Print the usage information and quit. + +The utility spits out the syntax tree as JSON data. + +## Build system + +Acorn is written in ECMAScript 6, as a set of small modules, in the +project's `src` directory, and compiled down to bigger ECMAScript 3 +files in `dist` using [Browserify](http://browserify.org) and +[Babel](http://babeljs.io/). If you are already using Babel, you can +consider including the modules directly. + +The command-line test runner (`npm test`) uses the ES6 modules. The +browser-based test page (`test/index.html`) uses the compiled modules. +The `bin/build-acorn.js` script builds the latter from the former. + +If you are working on Acorn, you'll probably want to try the code out +directly, without an intermediate build step. In your scripts, you can +register the Babel require shim like this: + + require("babel-core/register") + +That will allow you to directly `require` the ES6 modules. + +## Plugins + +Acorn is designed support allow plugins which, within reasonable +bounds, redefine the way the parser works. Plugins can add new token +types and new tokenizer contexts (if necessary), and extend methods in +the parser object. This is not a clean, elegant API—using it requires +an understanding of Acorn's internals, and plugins are likely to break +whenever those internals are significantly changed. But still, it is +_possible_, in this way, to create parsers for JavaScript dialects +without forking all of Acorn. And in principle it is even possible to +combine such plugins, so that if you have, for example, a plugin for +parsing types and a plugin for parsing JSX-style XML literals, you +could load them both and parse code with both JSX tags and types. + +A plugin should register itself by adding a property to +`acorn.plugins`, which holds a function. Calling `acorn.parse`, a +`plugins` option can be passed, holding an object mapping plugin names +to configuration values (or just `true` for plugins that don't take +options). After the parser object has been created, the initialization +functions for the chosen plugins are called with `(parser, +configValue)` arguments. They are expected to use the `parser.extend` +method to extend parser methods. For example, the `readToken` method +could be extended like this: + +```javascript +parser.extend("readToken", function(nextMethod) { + return function(code) { + console.log("Reading a token!") + return nextMethod.call(this, code) + } +}) +``` + +The `nextMethod` argument passed to `extend`'s second argument is the +previous value of this method, and should usually be called through to +whenever the extended method does not handle the call itself. + +Similarly, the loose parser allows plugins to register themselves via +`acorn.pluginsLoose`. The extension mechanism is the same as for the +normal parser: + +```javascript +looseParser.extend("readToken", function(nextMethod) { + return function() { + console.log("Reading a token in the loose parser!") + return nextMethod.call(this) + } +}) +``` + +### Existing plugins + + - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx) + - [`acorn-es7-plugin`](https://github.com/MatAtBread/acorn-es7-plugin/): Parse [async/await syntax proposal](https://github.com/tc39/ecmascript-asyncawait) + - [`acorn-object-spread`](https://github.com/UXtemple/acorn-object-spread): Parse [object spread syntax proposal](https://github.com/sebmarkbage/ecmascript-rest-spread) + - [`acorn-es7`](https://www.npmjs.com/package/acorn-es7): Parse [decorator syntax proposal](https://github.com/wycats/javascript-decorators) + - [`acorn-objj`](https://www.npmjs.com/package/acorn-objj): [Objective-J](http://www.cappuccino-project.org/learn/objective-j.html) language parser built as Acorn plugin diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/acorn b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/acorn new file mode 100755 index 00000000000000..cf4acd563179ad --- /dev/null +++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/acorn @@ -0,0 +1,65 @@ +#!/usr/bin/env node +'use strict'; + +var path = require('path'); +var fs = require('fs'); +var acorn = require('../dist/acorn.js'); + +var infile; +var forceFile; +var silent = false; +var compact = false; +var tokenize = false; +var options = {} + +function help(status) { + var print = (status == 0) ? console.log : console.error + print("usage: " + path.basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7]") + print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--module] [--help] [--] [infile]") + process.exit(status) +} + +for (var i = 2; i < process.argv.length; ++i) { + var arg = process.argv[i] + if ((arg == "-" || arg[0] != "-") && !infile) infile = arg + else if (arg == "--" && !infile && i + 2 == process.argv.length) forceFile = infile = process.argv[++i] + else if (arg == "--ecma3") options.ecmaVersion = 3 + else if (arg == "--ecma5") options.ecmaVersion = 5 + else if (arg == "--ecma6") options.ecmaVersion = 6 + else if (arg == "--ecma7") options.ecmaVersion = 7 + else if (arg == "--locations") options.locations = true + else if (arg == "--allow-hash-bang") options.allowHashBang = true + else if (arg == "--silent") silent = true + else if (arg == "--compact") compact = true + else if (arg == "--help") help(0) + else if (arg == "--tokenize") tokenize = true + else if (arg == "--module") options.sourceType = 'module' + else help(1) +} + +function run(code) { + var result + if (!tokenize) { + try { result = acorn.parse(code, options) } + catch(e) { console.error(e.message); process.exit(1) } + } else { + result = [] + var tokenizer = acorn.tokenizer(code, options), token + while (true) { + try { token = tokenizer.getToken() } + catch(e) { console.error(e.message); process.exit(1) } + result.push(token) + if (token.type == acorn.tokTypes.eof) break + } + } + if (!silent) console.log(JSON.stringify(result, null, compact ? null : 2)) +} + +if (forceFile || infile && infile != "-") { + run(fs.readFileSync(infile, "utf8")) +} else { + var code = "" + process.stdin.resume() + process.stdin.on("data", function (chunk) { return code += chunk; }) + process.stdin.on("end", function () { return run(code); }) +} \ No newline at end of file diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/generate-identifier-regex.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/generate-identifier-regex.js new file mode 100644 index 00000000000000..100e8cf280fc56 --- /dev/null +++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/generate-identifier-regex.js @@ -0,0 +1,55 @@ +'use strict'; + +// Which Unicode version should be used? +var version = '9.0.0'; + +var start = require('unicode-' + version + '/Binary_Property/ID_Start/code-points.js') + .filter(function(ch) { return ch > 0x7f; }); +var last = -1; +var cont = [0x200c, 0x200d].concat(require('unicode-' + version + '/Binary_Property/ID_Continue/code-points.js') + .filter(function(ch) { return ch > 0x7f && search(start, ch, last + 1) == -1; })); + +function search(arr, ch, starting) { + for (var i = starting; arr[i] <= ch && i < arr.length; last = i++) + if (arr[i] === ch) + return i; + return -1; +} + +function pad(str, width) { + while (str.length < width) str = "0" + str; + return str; +} + +function esc(code) { + var hex = code.toString(16); + if (hex.length <= 2) return "\\x" + pad(hex, 2); + else return "\\u" + pad(hex, 4); +} + +function generate(chars) { + var astral = [], re = ""; + for (var i = 0, at = 0x10000; i < chars.length; i++) { + var from = chars[i], to = from; + while (i < chars.length - 1 && chars[i + 1] == to + 1) { + i++; + to++; + } + if (to <= 0xffff) { + if (from == to) re += esc(from); + else if (from + 1 == to) re += esc(from) + esc(to); + else re += esc(from) + "-" + esc(to); + } else { + astral.push(from - at, to - from); + at = to; + } + } + return {nonASCII: re, astral: astral}; +} + +var startData = generate(start), contData = generate(cont); + +console.log("let nonASCIIidentifierStartChars = \"" + startData.nonASCII + "\""); +console.log("let nonASCIIidentifierChars = \"" + contData.nonASCII + "\""); +console.log("const astralIdentifierStartCodes = " + JSON.stringify(startData.astral)); +console.log("const astralIdentifierCodes = " + JSON.stringify(contData.astral)); diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/update_authors.sh b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/update_authors.sh new file mode 100755 index 00000000000000..466c8db5867cba --- /dev/null +++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/bin/update_authors.sh @@ -0,0 +1,6 @@ +# Combine existing list of authors with everyone known in git, sort, add header. +tail --lines=+3 AUTHORS > AUTHORS.tmp +git log --format='%aN' | grep -v abraidwood >> AUTHORS.tmp +echo -e "List of Acorn contributors. Updated before every release.\n" > AUTHORS +sort -u AUTHORS.tmp >> AUTHORS +rm -f AUTHORS.tmp diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/.keep b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/.keep new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.es.js b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.es.js new file mode 100644 index 00000000000000..4460957fd78f1a --- /dev/null +++ b/tools/eslint/node_modules/acorn-jsx/node_modules/acorn/dist/acorn.es.js @@ -0,0 +1,3112 @@ +// Reserved word lists for various dialects of the language + +var reservedWords = { + 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", + 5: "class enum extends super const export import", + 6: "enum", + 7: "enum", + strict: "implements interface let package private protected public static yield", + strictBind: "eval arguments" +} + +// And the keywords + +var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this" + +var keywords = { + 5: ecma5AndLessKeywords, + 6: ecma5AndLessKeywords + " const class extends export import super" +} + +// ## Character categories + +// Big ugly regular expressions that match characters in the +// whitespace, identifier, and identifier-start categories. These +// are only applied when a character is found to actually have a +// code point above 128. +// Generated by `bin/generate-identifier-regex.js`. + +var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc" +var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d4-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d01-\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f" + +var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]") +var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]") + +nonASCIIidentifierStartChars = nonASCIIidentifierChars = null + +// These are a run-length and offset encoded representation of the +// >0xffff code points that are a valid part of identifiers. The +// offset starts at 0x10000, and each pair of numbers represents an +// offset to the next range, and then a size of the range. They were +// generated by bin/generate-identifier-regex.js +var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541] +var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239] + +// This has a complexity linear to the value of the code. The +// assumption is that looking up astral identifier characters is +// rare. +function isInAstralSet(code, set) { + var pos = 0x10000 + for (var i = 0; i < set.length; i += 2) { + pos += set[i] + if (pos > code) return false + pos += set[i + 1] + if (pos >= code) return true + } +} + +// Test whether a given character code starts an identifier. + +function isIdentifierStart(code, astral) { + if (code < 65) return code === 36 + if (code < 91) return true + if (code < 97) return code === 95 + if (code < 123) return true + if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) + if (astral === false) return false + return isInAstralSet(code, astralIdentifierStartCodes) +} + +// Test whether a given character is part of an identifier. + +function isIdentifierChar(code, astral) { + if (code < 48) return code === 36 + if (code < 58) return true + if (code < 65) return false + if (code < 91) return true + if (code < 97) return code === 95 + if (code < 123) return true + if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) + if (astral === false) return false + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) +} + +// ## Token types + +// The assignment of fine-grained, information-carrying type objects +// allows the tokenizer to store the information it has about a +// token in a way that is very cheap for the parser to look up. + +// All token type variables start with an underscore, to make them +// easy to recognize. + +// The `beforeExpr` property is used to disambiguate between regular +// expressions and divisions. It is set on all token types that can +// be followed by an expression (thus, a slash after them would be a +// regular expression). +// +// The `startsExpr` property is used to check if the token ends a +// `yield` expression. It is set on all token types that either can +// directly start an expression (like a quotation mark) or can +// continue an expression (like the body of a string). +// +// `isLoop` marks a keyword as starting a loop, which is important +// to know when parsing a label, in order to allow or disallow +// continue jumps to that label. + +var TokenType = function TokenType(label, conf) { + if ( conf === void 0 ) conf = {}; + + this.label = label + this.keyword = conf.keyword + this.beforeExpr = !!conf.beforeExpr + this.startsExpr = !!conf.startsExpr + this.isLoop = !!conf.isLoop + this.isAssign = !!conf.isAssign + this.prefix = !!conf.prefix + this.postfix = !!conf.postfix + this.binop = conf.binop || null + this.updateContext = null +}; + +function binop(name, prec) { + return new TokenType(name, {beforeExpr: true, binop: prec}) +} +var beforeExpr = {beforeExpr: true}; +var startsExpr = {startsExpr: true}; +// Map keyword names to token types. + +var keywordTypes = {} + +// Succinct definitions of keyword token types +function kw(name, options) { + if ( options === void 0 ) options = {}; + + options.keyword = name + return keywordTypes[name] = new TokenType(name, options) +} + +var tt = { + num: new TokenType("num", startsExpr), + regexp: new TokenType("regexp", startsExpr), + string: new TokenType("string", startsExpr), + name: new TokenType("name", startsExpr), + eof: new TokenType("eof"), + + // Punctuation token types. + bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), + bracketR: new TokenType("]"), + braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), + braceR: new TokenType("}"), + parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), + parenR: new TokenType(")"), + comma: new TokenType(",", beforeExpr), + semi: new TokenType(";", beforeExpr), + colon: new TokenType(":", beforeExpr), + dot: new TokenType("."), + question: new TokenType("?", beforeExpr), + arrow: new TokenType("=>", beforeExpr), + template: new TokenType("template"), + ellipsis: new TokenType("...", beforeExpr), + backQuote: new TokenType("`", startsExpr), + dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), + + // Operators. These carry several kinds of properties to help the + // parser use them properly (the presence of these properties is + // what categorizes them as operators). + // + // `binop`, when present, specifies that this operator is a binary + // operator, and will refer to its precedence. + // + // `prefix` and `postfix` mark the operator as a prefix or postfix + // unary operator. + // + // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as + // binary operators with a very low precedence, that should result + // in AssignmentExpression nodes. + + eq: new TokenType("=", {beforeExpr: true, isAssign: true}), + assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), + incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), + prefix: new TokenType("prefix", {beforeExpr: true, prefix: true, startsExpr: true}), + logicalOR: binop("||", 1), + logicalAND: binop("&&", 2), + bitwiseOR: binop("|", 3), + bitwiseXOR: binop("^", 4), + bitwiseAND: binop("&", 5), + equality: binop("==/!=", 6), + relational: binop("", 7), + bitShift: binop("<>", 8), + plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), + modulo: binop("%", 10), + star: binop("*", 10), + slash: binop("/", 10), + starstar: new TokenType("**", {beforeExpr: true}), + + // Keyword token types. + _break: kw("break"), + _case: kw("case", beforeExpr), + _catch: kw("catch"), + _continue: kw("continue"), + _debugger: kw("debugger"), + _default: kw("default", beforeExpr), + _do: kw("do", {isLoop: true, beforeExpr: true}), + _else: kw("else", beforeExpr), + _finally: kw("finally"), + _for: kw("for", {isLoop: true}), + _function: kw("function", startsExpr), + _if: kw("if"), + _return: kw("return", beforeExpr), + _switch: kw("switch"), + _throw: kw("throw", beforeExpr), + _try: kw("try"), + _var: kw("var"), + _const: kw("const"), + _while: kw("while", {isLoop: true}), + _with: kw("with"), + _new: kw("new", {beforeExpr: true, startsExpr: true}), + _this: kw("this", startsExpr), + _super: kw("super", startsExpr), + _class: kw("class"), + _extends: kw("extends", beforeExpr), + _export: kw("export"), + _import: kw("import"), + _null: kw("null", startsExpr), + _true: kw("true", startsExpr), + _false: kw("false", startsExpr), + _in: kw("in", {beforeExpr: true, binop: 7}), + _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), + _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), + _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), + _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) +} + +// Matches a whole line break (where CRLF is considered a single +// line break). Used to count lines. + +var lineBreak = /\r\n?|\n|\u2028|\u2029/ +var lineBreakG = new RegExp(lineBreak.source, "g") + +function isNewLine(code) { + return code === 10 || code === 13 || code === 0x2028 || code == 0x2029 +} + +var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/ + +var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g + +function isArray(obj) { + return Object.prototype.toString.call(obj) === "[object Array]" +} + +// Checks if an object has a property. + +function has(obj, propName) { + return Object.prototype.hasOwnProperty.call(obj, propName) +} + +// These are used when `options.locations` is on, for the +// `startLoc` and `endLoc` properties. + +var Position = function Position(line, col) { + this.line = line + this.column = col +}; + +Position.prototype.offset = function offset (n) { + return new Position(this.line, this.column + n) +}; + +var SourceLocation = function SourceLocation(p, start, end) { + this.start = start + this.end = end + if (p.sourceFile !== null) this.source = p.sourceFile +}; + +// The `getLineInfo` function is mostly useful when the +// `locations` option is off (for performance reasons) and you +// want to find the line/column position for a given character +// offset. `input` should be the code string that the offset refers +// into. + +function getLineInfo(input, offset) { + for (var line = 1, cur = 0;;) { + lineBreakG.lastIndex = cur + var match = lineBreakG.exec(input) + if (match && match.index < offset) { + ++line + cur = match.index + match[0].length + } else { + return new Position(line, offset - cur) + } + } +} + +// A second optional argument can be given to further configure +// the parser process. These options are recognized: + +var defaultOptions = { + // `ecmaVersion` indicates the ECMAScript version to parse. Must + // be either 3, or 5, or 6. This influences support for strict + // mode, the set of reserved words, support for getters and + // setters and other features. The default is 6. + ecmaVersion: 6, + // Source type ("script" or "module") for different semantics + sourceType: "script", + // `onInsertedSemicolon` can be a callback that will be called + // when a semicolon is automatically inserted. It will be passed + // th position of the comma as an offset, and if `locations` is + // enabled, it is given the location as a `{line, column}` object + // as second argument. + onInsertedSemicolon: null, + // `onTrailingComma` is similar to `onInsertedSemicolon`, but for + // trailing commas. + onTrailingComma: null, + // By default, reserved words are only enforced if ecmaVersion >= 5. + // Set `allowReserved` to a boolean value to explicitly turn this on + // an off. When this option has the value "never", reserved words + // and keywords can also not be used as property names. + allowReserved: null, + // When enabled, a return at the top level is not considered an + // error. + allowReturnOutsideFunction: false, + // When enabled, import/export statements are not constrained to + // appearing at the top of the program. + allowImportExportEverywhere: false, + // When enabled, hashbang directive in the beginning of file + // is allowed and treated as a line comment. + allowHashBang: false, + // When `locations` is on, `loc` properties holding objects with + // `start` and `end` properties in `{line, column}` form (with + // line being 1-based and column 0-based) will be attached to the + // nodes. + locations: false, + // A function can be passed as `onToken` option, which will + // cause Acorn to call that function with object in the same + // format as tokens returned from `tokenizer().getToken()`. Note + // that you are not allowed to call the parser from the + // callback—that will corrupt its internal state. + onToken: null, + // A function can be passed as `onComment` option, which will + // cause Acorn to call that function with `(block, text, start, + // end)` parameters whenever a comment is skipped. `block` is a + // boolean indicating whether this is a block (`/* */`) comment, + // `text` is the content of the comment, and `start` and `end` are + // character offsets that denote the start and end of the comment. + // When the `locations` option is on, two more parameters are + // passed, the full `{line, column}` locations of the start and + // end of the comments. Note that you are not allowed to call the + // parser from the callback—that will corrupt its internal state. + onComment: null, + // Nodes have their start and end characters offsets recorded in + // `start` and `end` properties (directly on the node, rather than + // the `loc` object, which holds line/column data. To also add a + // [semi-standardized][range] `range` property holding a `[start, + // end]` array with the same numbers, set the `ranges` option to + // `true`. + // + // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + ranges: false, + // It is possible to parse multiple files into a single AST by + // passing the tree produced by parsing the first file as + // `program` option in subsequent parses. This will add the + // toplevel forms of the parsed file to the `Program` (top) node + // of an existing parse tree. + program: null, + // When `locations` is on, you can pass this to record the source + // file in every node's `loc` object. + sourceFile: null, + // This value, if given, is stored in every node, whether + // `locations` is on or off. + directSourceFile: null, + // When enabled, parenthesized expressions are represented by + // (non-standard) ParenthesizedExpression nodes + preserveParens: false, + plugins: {} +} + +// Interpret and default an options object + +function getOptions(opts) { + var options = {} + for (var opt in defaultOptions) + options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt] + if (options.allowReserved == null) + options.allowReserved = options.ecmaVersion < 5 + + if (isArray(options.onToken)) { + var tokens = options.onToken + options.onToken = function (token) { return tokens.push(token); } + } + if (isArray(options.onComment)) + options.onComment = pushComment(options, options.onComment) + + return options +} + +function pushComment(options, array) { + return function (block, text, start, end, startLoc, endLoc) { + var comment = { + type: block ? 'Block' : 'Line', + value: text, + start: start, + end: end + } + if (options.locations) + comment.loc = new SourceLocation(this, startLoc, endLoc) + if (options.ranges) + comment.range = [start, end] + array.push(comment) + } +} + +// Registered plugins +var plugins = {} + +function keywordRegexp(words) { + return new RegExp("^(" + words.replace(/ /g, "|") + ")$") +} + +var Parser = function Parser(options, input, startPos) { + this.options = options = getOptions(options) + this.sourceFile = options.sourceFile + this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]) + var reserved = options.allowReserved ? "" : + reservedWords[options.ecmaVersion] + (options.sourceType == "module" ? " await" : "") + this.reservedWords = keywordRegexp(reserved) + var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict + this.reservedWordsStrict = keywordRegexp(reservedStrict) + this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + reservedWords.strictBind) + this.input = String(input) + + // Used to signal to callers of `readWord1` whether the word + // contained any escape sequences. This is needed because words with + // escape sequences must not be interpreted as keywords. + this.containsEsc = false + + // Load plugins + this.loadPlugins(options.plugins) + + // Set up token state + + // The current position of the tokenizer in the input. + if (startPos) { + this.pos = startPos + this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos)) + this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length + } else { + this.pos = this.lineStart = 0 + this.curLine = 1 + } + + // Properties of the current token: + // Its type + this.type = tt.eof + // For tokens that include more information than their type, the value + this.value = null + // Its start and end offset + this.start = this.end = this.pos + // And, if locations are used, the {line, column} object + // corresponding to those offsets + this.startLoc = this.endLoc = this.curPosition() + + // Position information for the previous token + this.lastTokEndLoc = this.lastTokStartLoc = null + this.lastTokStart = this.lastTokEnd = this.pos + + // The context stack is used to superficially track syntactic + // context to predict whether a regular expression is allowed in a + // given position. + this.context = this.initialContext() + this.exprAllowed = true + + // Figure out if it's a module code. + this.strict = this.inModule = options.sourceType === "module" + + // Used to signify the start of a potential arrow function + this.potentialArrowAt = -1 + + // Flags to track whether we are in a function, a generator. + this.inFunction = this.inGenerator = false + // Labels in scope. + this.labels = [] + + // If enabled, skip leading hashbang line. + if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === '#!') + this.skipLineComment(2) +}; + +// DEPRECATED Kept for backwards compatibility until 3.0 in case a plugin uses them +Parser.prototype.isKeyword = function isKeyword (word) { return this.keywords.test(word) }; +Parser.prototype.isReservedWord = function isReservedWord (word) { return this.reservedWords.test(word) }; + +Parser.prototype.extend = function extend (name, f) { + this[name] = f(this[name]) +}; + +Parser.prototype.loadPlugins = function loadPlugins (pluginConfigs) { + var this$1 = this; + + for (var name in pluginConfigs) { + var plugin = plugins[name] + if (!plugin) throw new Error("Plugin '" + name + "' not found") + plugin(this$1, pluginConfigs[name]) + } +}; + +Parser.prototype.parse = function parse () { + var node = this.options.program || this.startNode() + this.nextToken() + return this.parseTopLevel(node) +}; + +var pp = Parser.prototype + +// ## Parser utilities + +// Test whether a statement node is the string literal `"use strict"`. + +pp.isUseStrict = function(stmt) { + return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && + stmt.expression.type === "Literal" && + stmt.expression.raw.slice(1, -1) === "use strict" +} + +// Predicate that tests whether the next token is of the given +// type, and if yes, consumes it as a side effect. + +pp.eat = function(type) { + if (this.type === type) { + this.next() + return true + } else { + return false + } +} + +// Tests whether parsed token is a contextual keyword. + +pp.isContextual = function(name) { + return this.type === tt.name && this.value === name +} + +// Consumes contextual keyword if possible. + +pp.eatContextual = function(name) { + return this.value === name && this.eat(tt.name) +} + +// Asserts that following token is given contextual keyword. + +pp.expectContextual = function(name) { + if (!this.eatContextual(name)) this.unexpected() +} + +// Test whether a semicolon can be inserted at the current position. + +pp.canInsertSemicolon = function() { + return this.type === tt.eof || + this.type === tt.braceR || + lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) +} + +pp.insertSemicolon = function() { + if (this.canInsertSemicolon()) { + if (this.options.onInsertedSemicolon) + this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc) + return true + } +} + +// Consume a semicolon, or, failing that, see if we are allowed to +// pretend that there is a semicolon at this position. + +pp.semicolon = function() { + if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected() +} + +pp.afterTrailingComma = function(tokType) { + if (this.type == tokType) { + if (this.options.onTrailingComma) + this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc) + this.next() + return true + } +} + +// Expect a token of a given type. If found, consume it, otherwise, +// raise an unexpected token error. + +pp.expect = function(type) { + this.eat(type) || this.unexpected() +} + +// Raise an unexpected token error. + +pp.unexpected = function(pos) { + this.raise(pos != null ? pos : this.start, "Unexpected token") +} + +var DestructuringErrors = function DestructuringErrors() { + this.shorthandAssign = 0 + this.trailingComma = 0 +}; + +pp.checkPatternErrors = function(refDestructuringErrors, andThrow) { + var trailing = refDestructuringErrors && refDestructuringErrors.trailingComma + if (!andThrow) return !!trailing + if (trailing) this.raise(trailing, "Comma is not permitted after the rest element") +} + +pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) { + var pos = refDestructuringErrors && refDestructuringErrors.shorthandAssign + if (!andThrow) return !!pos + if (pos) this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns") +} + +var pp$1 = Parser.prototype + +// ### Statement parsing + +// Parse a program. Initializes the parser, reads any number of +// statements, and wraps them in a Program node. Optionally takes a +// `program` argument. If present, the statements will be appended +// to its body instead of creating a new node. + +pp$1.parseTopLevel = function(node) { + var this$1 = this; + + var first = true + if (!node.body) node.body = [] + while (this.type !== tt.eof) { + var stmt = this$1.parseStatement(true, true) + node.body.push(stmt) + if (first) { + if (this$1.isUseStrict(stmt)) this$1.setStrict(true) + first = false + } + } + this.next() + if (this.options.ecmaVersion >= 6) { + node.sourceType = this.options.sourceType + } + return this.finishNode(node, "Program") +} + +var loopLabel = {kind: "loop"}; +var switchLabel = {kind: "switch"}; +pp$1.isLet = function() { + if (this.type !== tt.name || this.options.ecmaVersion < 6 || this.value != "let") return false + skipWhiteSpace.lastIndex = this.pos + var skip = skipWhiteSpace.exec(this.input) + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next) + if (nextCh === 91 || nextCh == 123) return true // '{' and '[' + if (isIdentifierStart(nextCh, true)) { + for (var pos = next + 1; isIdentifierChar(this.input.charCodeAt(pos), true); ++pos) {} + var ident = this.input.slice(next, pos) + if (!this.isKeyword(ident)) return true + } + return false +} + +// Parse a single statement. +// +// If expecting a statement and finding a slash operator, parse a +// regular expression literal. This is to handle cases like +// `if (foo) /blah/.exec(foo)`, where looking at the previous token +// does not help. + +pp$1.parseStatement = function(declaration, topLevel) { + var starttype = this.type, node = this.startNode(), kind + + if (this.isLet()) { + starttype = tt._var + kind = "let" + } + + // Most types of statements are recognized by the keyword they + // start with. Many are trivial to parse, some require a bit of + // complexity. + + switch (starttype) { + case tt._break: case tt._continue: return this.parseBreakContinueStatement(node, starttype.keyword) + case tt._debugger: return this.parseDebuggerStatement(node) + case tt._do: return this.parseDoStatement(node) + case tt._for: return this.parseForStatement(node) + case tt._function: + if (!declaration && this.options.ecmaVersion >= 6) this.unexpected() + return this.parseFunctionStatement(node) + case tt._class: + if (!declaration) this.unexpected() + return this.parseClass(node, true) + case tt._if: return this.parseIfStatement(node) + case tt._return: return this.parseReturnStatement(node) + case tt._switch: return this.parseSwitchStatement(node) + case tt._throw: return this.parseThrowStatement(node) + case tt._try: return this.parseTryStatement(node) + case tt._const: case tt._var: + kind = kind || this.value + if (!declaration && kind != "var") this.unexpected() + return this.parseVarStatement(node, kind) + case tt._while: return this.parseWhileStatement(node) + case tt._with: return this.parseWithStatement(node) + case tt.braceL: return this.parseBlock() + case tt.semi: return this.parseEmptyStatement(node) + case tt._export: + case tt._import: + if (!this.options.allowImportExportEverywhere) { + if (!topLevel) + this.raise(this.start, "'import' and 'export' may only appear at the top level") + if (!this.inModule) + this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'") + } + return starttype === tt._import ? this.parseImport(node) : this.parseExport(node) + + // If the statement does not start with a statement keyword or a + // brace, it's an ExpressionStatement or LabeledStatement. We + // simply start parsing an expression, and afterwards, if the + // next token is a colon and the expression was a simple + // Identifier node, we switch to interpreting it as a label. + default: + var maybeName = this.value, expr = this.parseExpression() + if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) + return this.parseLabeledStatement(node, maybeName, expr) + else return this.parseExpressionStatement(node, expr) + } +} + +pp$1.parseBreakContinueStatement = function(node, keyword) { + var this$1 = this; + + var isBreak = keyword == "break" + this.next() + if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null + else if (this.type !== tt.name) this.unexpected() + else { + node.label = this.parseIdent() + this.semicolon() + } + + // Verify that there is an actual destination to break or + // continue to. + for (var i = 0; i < this.labels.length; ++i) { + var lab = this$1.labels[i] + if (node.label == null || lab.name === node.label.name) { + if (lab.kind != null && (isBreak || lab.kind === "loop")) break + if (node.label && isBreak) break + } + } + if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword) + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") +} + +pp$1.parseDebuggerStatement = function(node) { + this.next() + this.semicolon() + return this.finishNode(node, "DebuggerStatement") +} + +pp$1.parseDoStatement = function(node) { + this.next() + this.labels.push(loopLabel) + node.body = this.parseStatement(false) + this.labels.pop() + this.expect(tt._while) + node.test = this.parseParenExpression() + if (this.options.ecmaVersion >= 6) + this.eat(tt.semi) + else + this.semicolon() + return this.finishNode(node, "DoWhileStatement") +} + +// Disambiguating between a `for` and a `for`/`in` or `for`/`of` +// loop is non-trivial. Basically, we have to parse the init `var` +// statement or expression, disallowing the `in` operator (see +// the second parameter to `parseExpression`), and then check +// whether the next token is `in` or `of`. When there is no init +// part (semicolon immediately after the opening parenthesis), it +// is a regular `for` loop. + +pp$1.parseForStatement = function(node) { + this.next() + this.labels.push(loopLabel) + this.expect(tt.parenL) + if (this.type === tt.semi) return this.parseFor(node, null) + var isLet = this.isLet() + if (this.type === tt._var || this.type === tt._const || isLet) { + var init$1 = this.startNode(), kind = isLet ? "let" : this.value + this.next() + this.parseVar(init$1, true, kind) + this.finishNode(init$1, "VariableDeclaration") + if ((this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1 && + !(kind !== "var" && init$1.declarations[0].init)) + return this.parseForIn(node, init$1) + return this.parseFor(node, init$1) + } + var refDestructuringErrors = new DestructuringErrors + var init = this.parseExpression(true, refDestructuringErrors) + if (this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) { + this.checkPatternErrors(refDestructuringErrors, true) + this.toAssignable(init) + this.checkLVal(init) + return this.parseForIn(node, init) + } else { + this.checkExpressionErrors(refDestructuringErrors, true) + } + return this.parseFor(node, init) +} + +pp$1.parseFunctionStatement = function(node) { + this.next() + return this.parseFunction(node, true) +} + +pp$1.parseIfStatement = function(node) { + this.next() + node.test = this.parseParenExpression() + node.consequent = this.parseStatement(false) + node.alternate = this.eat(tt._else) ? this.parseStatement(false) : null + return this.finishNode(node, "IfStatement") +} + +pp$1.parseReturnStatement = function(node) { + if (!this.inFunction && !this.options.allowReturnOutsideFunction) + this.raise(this.start, "'return' outside of function") + this.next() + + // In `return` (and `break`/`continue`), the keywords with + // optional arguments, we eagerly look for a semicolon or the + // possibility to insert one. + + if (this.eat(tt.semi) || this.insertSemicolon()) node.argument = null + else { node.argument = this.parseExpression(); this.semicolon() } + return this.finishNode(node, "ReturnStatement") +} + +pp$1.parseSwitchStatement = function(node) { + var this$1 = this; + + this.next() + node.discriminant = this.parseParenExpression() + node.cases = [] + this.expect(tt.braceL) + this.labels.push(switchLabel) + + // Statements under must be grouped (by label) in SwitchCase + // nodes. `cur` is used to keep the node that we are currently + // adding statements to. + + for (var cur, sawDefault = false; this.type != tt.braceR;) { + if (this$1.type === tt._case || this$1.type === tt._default) { + var isCase = this$1.type === tt._case + if (cur) this$1.finishNode(cur, "SwitchCase") + node.cases.push(cur = this$1.startNode()) + cur.consequent = [] + this$1.next() + if (isCase) { + cur.test = this$1.parseExpression() + } else { + if (sawDefault) this$1.raiseRecoverable(this$1.lastTokStart, "Multiple default clauses") + sawDefault = true + cur.test = null + } + this$1.expect(tt.colon) + } else { + if (!cur) this$1.unexpected() + cur.consequent.push(this$1.parseStatement(true)) + } + } + if (cur) this.finishNode(cur, "SwitchCase") + this.next() // Closing brace + this.labels.pop() + return this.finishNode(node, "SwitchStatement") +} + +pp$1.parseThrowStatement = function(node) { + this.next() + if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) + this.raise(this.lastTokEnd, "Illegal newline after throw") + node.argument = this.parseExpression() + this.semicolon() + return this.finishNode(node, "ThrowStatement") +} + +// Reused empty array added for node fields that are always empty. + +var empty = [] + +pp$1.parseTryStatement = function(node) { + this.next() + node.block = this.parseBlock() + node.handler = null + if (this.type === tt._catch) { + var clause = this.startNode() + this.next() + this.expect(tt.parenL) + clause.param = this.parseBindingAtom() + this.checkLVal(clause.param, true) + this.expect(tt.parenR) + clause.body = this.parseBlock() + node.handler = this.finishNode(clause, "CatchClause") + } + node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null + if (!node.handler && !node.finalizer) + this.raise(node.start, "Missing catch or finally clause") + return this.finishNode(node, "TryStatement") +} + +pp$1.parseVarStatement = function(node, kind) { + this.next() + this.parseVar(node, false, kind) + this.semicolon() + return this.finishNode(node, "VariableDeclaration") +} + +pp$1.parseWhileStatement = function(node) { + this.next() + node.test = this.parseParenExpression() + this.labels.push(loopLabel) + node.body = this.parseStatement(false) + this.labels.pop() + return this.finishNode(node, "WhileStatement") +} + +pp$1.parseWithStatement = function(node) { + if (this.strict) this.raise(this.start, "'with' in strict mode") + this.next() + node.object = this.parseParenExpression() + node.body = this.parseStatement(false) + return this.finishNode(node, "WithStatement") +} + +pp$1.parseEmptyStatement = function(node) { + this.next() + return this.finishNode(node, "EmptyStatement") +} + +pp$1.parseLabeledStatement = function(node, maybeName, expr) { + var this$1 = this; + + for (var i = 0; i < this.labels.length; ++i) + if (this$1.labels[i].name === maybeName) this$1.raise(expr.start, "Label '" + maybeName + "' is already declared") + var kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null + for (var i$1 = this.labels.length - 1; i$1 >= 0; i$1--) { + var label = this$1.labels[i$1] + if (label.statementStart == node.start) { + label.statementStart = this$1.start + label.kind = kind + } else break + } + this.labels.push({name: maybeName, kind: kind, statementStart: this.start}) + node.body = this.parseStatement(true) + this.labels.pop() + node.label = expr + return this.finishNode(node, "LabeledStatement") +} + +pp$1.parseExpressionStatement = function(node, expr) { + node.expression = expr + this.semicolon() + return this.finishNode(node, "ExpressionStatement") +} + +// Parse a semicolon-enclosed block of statements, handling `"use +// strict"` declarations when `allowStrict` is true (used for +// function bodies). + +pp$1.parseBlock = function(allowStrict) { + var this$1 = this; + + var node = this.startNode(), first = true, oldStrict + node.body = [] + this.expect(tt.braceL) + while (!this.eat(tt.braceR)) { + var stmt = this$1.parseStatement(true) + node.body.push(stmt) + if (first && allowStrict && this$1.isUseStrict(stmt)) { + oldStrict = this$1.strict + this$1.setStrict(this$1.strict = true) + } + first = false + } + if (oldStrict === false) this.setStrict(false) + return this.finishNode(node, "BlockStatement") +} + +// Parse a regular `for` loop. The disambiguation code in +// `parseStatement` will already have parsed the init statement or +// expression. + +pp$1.parseFor = function(node, init) { + node.init = init + this.expect(tt.semi) + node.test = this.type === tt.semi ? null : this.parseExpression() + this.expect(tt.semi) + node.update = this.type === tt.parenR ? null : this.parseExpression() + this.expect(tt.parenR) + node.body = this.parseStatement(false) + this.labels.pop() + return this.finishNode(node, "ForStatement") +} + +// Parse a `for`/`in` and `for`/`of` loop, which are almost +// same from parser's perspective. + +pp$1.parseForIn = function(node, init) { + var type = this.type === tt._in ? "ForInStatement" : "ForOfStatement" + this.next() + node.left = init + node.right = this.parseExpression() + this.expect(tt.parenR) + node.body = this.parseStatement(false) + this.labels.pop() + return this.finishNode(node, type) +} + +// Parse a list of variable declarations. + +pp$1.parseVar = function(node, isFor, kind) { + var this$1 = this; + + node.declarations = [] + node.kind = kind + for (;;) { + var decl = this$1.startNode() + this$1.parseVarId(decl) + if (this$1.eat(tt.eq)) { + decl.init = this$1.parseMaybeAssign(isFor) + } else if (kind === "const" && !(this$1.type === tt._in || (this$1.options.ecmaVersion >= 6 && this$1.isContextual("of")))) { + this$1.unexpected() + } else if (decl.id.type != "Identifier" && !(isFor && (this$1.type === tt._in || this$1.isContextual("of")))) { + this$1.raise(this$1.lastTokEnd, "Complex binding patterns require an initialization value") + } else { + decl.init = null + } + node.declarations.push(this$1.finishNode(decl, "VariableDeclarator")) + if (!this$1.eat(tt.comma)) break + } + return node +} + +pp$1.parseVarId = function(decl) { + decl.id = this.parseBindingAtom() + this.checkLVal(decl.id, true) +} + +// Parse a function declaration or literal (depending on the +// `isStatement` parameter). + +pp$1.parseFunction = function(node, isStatement, allowExpressionBody) { + this.initFunction(node) + if (this.options.ecmaVersion >= 6) + node.generator = this.eat(tt.star) + var oldInGen = this.inGenerator + this.inGenerator = node.generator + if (isStatement || this.type === tt.name) + node.id = this.parseIdent() + this.parseFunctionParams(node) + this.parseFunctionBody(node, allowExpressionBody) + this.inGenerator = oldInGen + return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression") +} + +pp$1.parseFunctionParams = function(node) { + this.expect(tt.parenL) + node.params = this.parseBindingList(tt.parenR, false, false, true) +} + +// Parse a class declaration or literal (depending on the +// `isStatement` parameter). + +pp$1.parseClass = function(node, isStatement) { + var this$1 = this; + + this.next() + this.parseClassId(node, isStatement) + this.parseClassSuper(node) + var classBody = this.startNode() + var hadConstructor = false + classBody.body = [] + this.expect(tt.braceL) + while (!this.eat(tt.braceR)) { + if (this$1.eat(tt.semi)) continue + var method = this$1.startNode() + var isGenerator = this$1.eat(tt.star) + var isMaybeStatic = this$1.type === tt.name && this$1.value === "static" + this$1.parsePropertyName(method) + method.static = isMaybeStatic && this$1.type !== tt.parenL + if (method.static) { + if (isGenerator) this$1.unexpected() + isGenerator = this$1.eat(tt.star) + this$1.parsePropertyName(method) + } + method.kind = "method" + var isGetSet = false + if (!method.computed) { + var key = method.key; + if (!isGenerator && key.type === "Identifier" && this$1.type !== tt.parenL && (key.name === "get" || key.name === "set")) { + isGetSet = true + method.kind = key.name + key = this$1.parsePropertyName(method) + } + if (!method.static && (key.type === "Identifier" && key.name === "constructor" || + key.type === "Literal" && key.value === "constructor")) { + if (hadConstructor) this$1.raise(key.start, "Duplicate constructor in the same class") + if (isGetSet) this$1.raise(key.start, "Constructor can't have get/set modifier") + if (isGenerator) this$1.raise(key.start, "Constructor can't be a generator") + method.kind = "constructor" + hadConstructor = true + } + } + this$1.parseClassMethod(classBody, method, isGenerator) + if (isGetSet) { + var paramCount = method.kind === "get" ? 0 : 1 + if (method.value.params.length !== paramCount) { + var start = method.value.start + if (method.kind === "get") + this$1.raiseRecoverable(start, "getter should have no params") + else + this$1.raiseRecoverable(start, "setter should have exactly one param") + } + if (method.kind === "set" && method.value.params[0].type === "RestElement") + this$1.raise(method.value.params[0].start, "Setter cannot use rest params") + } + } + node.body = this.finishNode(classBody, "ClassBody") + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") +} + +pp$1.parseClassMethod = function(classBody, method, isGenerator) { + method.value = this.parseMethod(isGenerator) + classBody.body.push(this.finishNode(method, "MethodDefinition")) +} + +pp$1.parseClassId = function(node, isStatement) { + node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null +} + +pp$1.parseClassSuper = function(node) { + node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null +} + +// Parses module export declaration. + +pp$1.parseExport = function(node) { + var this$1 = this; + + this.next() + // export * from '...' + if (this.eat(tt.star)) { + this.expectContextual("from") + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected() + this.semicolon() + return this.finishNode(node, "ExportAllDeclaration") + } + if (this.eat(tt._default)) { // export default ... + var parens = this.type == tt.parenL + var expr = this.parseMaybeAssign() + var needsSemi = true + if (!parens && (expr.type == "FunctionExpression" || + expr.type == "ClassExpression")) { + needsSemi = false + if (expr.id) { + expr.type = expr.type == "FunctionExpression" + ? "FunctionDeclaration" + : "ClassDeclaration" + } + } + node.declaration = expr + if (needsSemi) this.semicolon() + return this.finishNode(node, "ExportDefaultDeclaration") + } + // export var|const|let|function|class ... + if (this.shouldParseExportStatement()) { + node.declaration = this.parseStatement(true) + node.specifiers = [] + node.source = null + } else { // export { x, y as z } [from '...'] + node.declaration = null + node.specifiers = this.parseExportSpecifiers() + if (this.eatContextual("from")) { + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected() + } else { + // check for keywords used as local names + for (var i = 0; i < node.specifiers.length; i++) { + if (this$1.keywords.test(node.specifiers[i].local.name) || this$1.reservedWords.test(node.specifiers[i].local.name)) { + this$1.unexpected(node.specifiers[i].local.start) + } + } + + node.source = null + } + this.semicolon() + } + return this.finishNode(node, "ExportNamedDeclaration") +} + +pp$1.shouldParseExportStatement = function() { + return this.type.keyword || this.isLet() +} + +// Parses a comma-separated list of module exports. + +pp$1.parseExportSpecifiers = function() { + var this$1 = this; + + var nodes = [], first = true + // export { x, y as z } [from '...'] + this.expect(tt.braceL) + while (!this.eat(tt.braceR)) { + if (!first) { + this$1.expect(tt.comma) + if (this$1.afterTrailingComma(tt.braceR)) break + } else first = false + + var node = this$1.startNode() + node.local = this$1.parseIdent(this$1.type === tt._default) + node.exported = this$1.eatContextual("as") ? this$1.parseIdent(true) : node.local + nodes.push(this$1.finishNode(node, "ExportSpecifier")) + } + return nodes +} + +// Parses import declaration. + +pp$1.parseImport = function(node) { + this.next() + // import '...' + if (this.type === tt.string) { + node.specifiers = empty + node.source = this.parseExprAtom() + } else { + node.specifiers = this.parseImportSpecifiers() + this.expectContextual("from") + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected() + } + this.semicolon() + return this.finishNode(node, "ImportDeclaration") +} + +// Parses a comma-separated list of module imports. + +pp$1.parseImportSpecifiers = function() { + var this$1 = this; + + var nodes = [], first = true + if (this.type === tt.name) { + // import defaultObj, { x, y as z } from '...' + var node = this.startNode() + node.local = this.parseIdent() + this.checkLVal(node.local, true) + nodes.push(this.finishNode(node, "ImportDefaultSpecifier")) + if (!this.eat(tt.comma)) return nodes + } + if (this.type === tt.star) { + var node$1 = this.startNode() + this.next() + this.expectContextual("as") + node$1.local = this.parseIdent() + this.checkLVal(node$1.local, true) + nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier")) + return nodes + } + this.expect(tt.braceL) + while (!this.eat(tt.braceR)) { + if (!first) { + this$1.expect(tt.comma) + if (this$1.afterTrailingComma(tt.braceR)) break + } else first = false + + var node$2 = this$1.startNode() + node$2.imported = this$1.parseIdent(true) + if (this$1.eatContextual("as")) { + node$2.local = this$1.parseIdent() + } else { + node$2.local = node$2.imported + if (this$1.isKeyword(node$2.local.name)) this$1.unexpected(node$2.local.start) + if (this$1.reservedWordsStrict.test(node$2.local.name)) this$1.raise(node$2.local.start, "The keyword '" + node$2.local.name + "' is reserved") + } + this$1.checkLVal(node$2.local, true) + nodes.push(this$1.finishNode(node$2, "ImportSpecifier")) + } + return nodes +} + +var pp$2 = Parser.prototype + +// Convert existing expression atom to assignable pattern +// if possible. + +pp$2.toAssignable = function(node, isBinding) { + var this$1 = this; + + if (this.options.ecmaVersion >= 6 && node) { + switch (node.type) { + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + break + + case "ObjectExpression": + node.type = "ObjectPattern" + for (var i = 0; i < node.properties.length; i++) { + var prop = node.properties[i] + if (prop.kind !== "init") this$1.raise(prop.key.start, "Object pattern can't contain getter or setter") + this$1.toAssignable(prop.value, isBinding) + } + break + + case "ArrayExpression": + node.type = "ArrayPattern" + this.toAssignableList(node.elements, isBinding) + break + + case "AssignmentExpression": + if (node.operator === "=") { + node.type = "AssignmentPattern" + delete node.operator + // falls through to AssignmentPattern + } else { + this.raise(node.left.end, "Only '=' operator can be used for specifying default value.") + break + } + + case "AssignmentPattern": + if (node.right.type === "YieldExpression") + this.raise(node.right.start, "Yield expression cannot be a default value") + break + + case "ParenthesizedExpression": + node.expression = this.toAssignable(node.expression, isBinding) + break + + case "MemberExpression": + if (!isBinding) break + + default: + this.raise(node.start, "Assigning to rvalue") + } + } + return node +} + +// Convert list of expression atoms to binding list. + +pp$2.toAssignableList = function(exprList, isBinding) { + var this$1 = this; + + var end = exprList.length + if (end) { + var last = exprList[end - 1] + if (last && last.type == "RestElement") { + --end + } else if (last && last.type == "SpreadElement") { + last.type = "RestElement" + var arg = last.argument + this.toAssignable(arg, isBinding) + if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") + this.unexpected(arg.start) + --end + } + + if (isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") + this.unexpected(last.argument.start) + } + for (var i = 0; i < end; i++) { + var elt = exprList[i] + if (elt) this$1.toAssignable(elt, isBinding) + } + return exprList +} + +// Parses spread element. + +pp$2.parseSpread = function(refDestructuringErrors) { + var node = this.startNode() + this.next() + node.argument = this.parseMaybeAssign(false, refDestructuringErrors) + return this.finishNode(node, "SpreadElement") +} + +pp$2.parseRest = function(allowNonIdent) { + var node = this.startNode() + this.next() + + // RestElement inside of a function parameter must be an identifier + if (allowNonIdent) node.argument = this.type === tt.name ? this.parseIdent() : this.unexpected() + else node.argument = this.type === tt.name || this.type === tt.bracketL ? this.parseBindingAtom() : this.unexpected() + + return this.finishNode(node, "RestElement") +} + +// Parses lvalue (assignable) atom. + +pp$2.parseBindingAtom = function() { + if (this.options.ecmaVersion < 6) return this.parseIdent() + switch (this.type) { + case tt.name: + return this.parseIdent() + + case tt.bracketL: + var node = this.startNode() + this.next() + node.elements = this.parseBindingList(tt.bracketR, true, true) + return this.finishNode(node, "ArrayPattern") + + case tt.braceL: + return this.parseObj(true) + + default: + this.unexpected() + } +} + +pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowNonIdent) { + var this$1 = this; + + var elts = [], first = true + while (!this.eat(close)) { + if (first) first = false + else this$1.expect(tt.comma) + if (allowEmpty && this$1.type === tt.comma) { + elts.push(null) + } else if (allowTrailingComma && this$1.afterTrailingComma(close)) { + break + } else if (this$1.type === tt.ellipsis) { + var rest = this$1.parseRest(allowNonIdent) + this$1.parseBindingListItem(rest) + elts.push(rest) + if (this$1.type === tt.comma) this$1.raise(this$1.start, "Comma is not permitted after the rest element") + this$1.expect(close) + break + } else { + var elem = this$1.parseMaybeDefault(this$1.start, this$1.startLoc) + this$1.parseBindingListItem(elem) + elts.push(elem) + } + } + return elts +} + +pp$2.parseBindingListItem = function(param) { + return param +} + +// Parses assignment pattern around given atom if possible. + +pp$2.parseMaybeDefault = function(startPos, startLoc, left) { + left = left || this.parseBindingAtom() + if (this.options.ecmaVersion < 6 || !this.eat(tt.eq)) return left + var node = this.startNodeAt(startPos, startLoc) + node.left = left + node.right = this.parseMaybeAssign() + return this.finishNode(node, "AssignmentPattern") +} + +// Verify that a node is an lval — something that can be assigned +// to. + +pp$2.checkLVal = function(expr, isBinding, checkClashes) { + var this$1 = this; + + switch (expr.type) { + case "Identifier": + if (this.strict && this.reservedWordsStrictBind.test(expr.name)) + this.raiseRecoverable(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode") + if (checkClashes) { + if (has(checkClashes, expr.name)) + this.raiseRecoverable(expr.start, "Argument name clash") + checkClashes[expr.name] = true + } + break + + case "MemberExpression": + if (isBinding) this.raiseRecoverable(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression") + break + + case "ObjectPattern": + for (var i = 0; i < expr.properties.length; i++) + this$1.checkLVal(expr.properties[i].value, isBinding, checkClashes) + break + + case "ArrayPattern": + for (var i$1 = 0; i$1 < expr.elements.length; i$1++) { + var elem = expr.elements[i$1] + if (elem) this$1.checkLVal(elem, isBinding, checkClashes) + } + break + + case "AssignmentPattern": + this.checkLVal(expr.left, isBinding, checkClashes) + break + + case "RestElement": + this.checkLVal(expr.argument, isBinding, checkClashes) + break + + case "ParenthesizedExpression": + this.checkLVal(expr.expression, isBinding, checkClashes) + break + + default: + this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue") + } +} + +var pp$3 = Parser.prototype + +// Check if property name clashes with already added. +// Object/class getters and setters are not allowed to clash — +// either with each other or with an init property — and in +// strict mode, init properties are also not allowed to be repeated. + +pp$3.checkPropClash = function(prop, propHash) { + if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) + return + var key = prop.key; + var name + switch (key.type) { + case "Identifier": name = key.name; break + case "Literal": name = String(key.value); break + default: return + } + var kind = prop.kind; + if (this.options.ecmaVersion >= 6) { + if (name === "__proto__" && kind === "init") { + if (propHash.proto) this.raiseRecoverable(key.start, "Redefinition of __proto__ property") + propHash.proto = true + } + return + } + name = "$" + name + var other = propHash[name] + if (other) { + var isGetSet = kind !== "init" + if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) + this.raiseRecoverable(key.start, "Redefinition of property") + } else { + other = propHash[name] = { + init: false, + get: false, + set: false + } + } + other[kind] = true +} + +// ### Expression parsing + +// These nest, from the most general expression type at the top to +// 'atomic', nondivisible expression types at the bottom. Most of +// the functions will simply let the function(s) below them parse, +// and, *if* the syntactic construct they handle is present, wrap +// the AST node that the inner parser gave them in another node. + +// Parse a full expression. The optional arguments are used to +// forbid the `in` operator (in for loops initalization expressions) +// and provide reference for storing '=' operator inside shorthand +// property assignment in contexts where both object expression +// and object pattern might appear (so it's possible to raise +// delayed syntax error at correct position). + +pp$3.parseExpression = function(noIn, refDestructuringErrors) { + var this$1 = this; + + var startPos = this.start, startLoc = this.startLoc + var expr = this.parseMaybeAssign(noIn, refDestructuringErrors) + if (this.type === tt.comma) { + var node = this.startNodeAt(startPos, startLoc) + node.expressions = [expr] + while (this.eat(tt.comma)) node.expressions.push(this$1.parseMaybeAssign(noIn, refDestructuringErrors)) + return this.finishNode(node, "SequenceExpression") + } + return expr +} + +// Parse an assignment expression. This includes applications of +// operators like `+=`. + +pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) { + if (this.inGenerator && this.isContextual("yield")) return this.parseYield() + + var ownDestructuringErrors = false + if (!refDestructuringErrors) { + refDestructuringErrors = new DestructuringErrors + ownDestructuringErrors = true + } + var startPos = this.start, startLoc = this.startLoc + if (this.type == tt.parenL || this.type == tt.name) + this.potentialArrowAt = this.start + var left = this.parseMaybeConditional(noIn, refDestructuringErrors) + if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc) + if (this.type.isAssign) { + this.checkPatternErrors(refDestructuringErrors, true) + if (!ownDestructuringErrors) DestructuringErrors.call(refDestructuringErrors) + var node = this.startNodeAt(startPos, startLoc) + node.operator = this.value + node.left = this.type === tt.eq ? this.toAssignable(left) : left + refDestructuringErrors.shorthandAssign = 0 // reset because shorthand default was used correctly + this.checkLVal(left) + this.next() + node.right = this.parseMaybeAssign(noIn) + return this.finishNode(node, "AssignmentExpression") + } else { + if (ownDestructuringErrors) this.checkExpressionErrors(refDestructuringErrors, true) + } + return left +} + +// Parse a ternary conditional (`?:`) operator. + +pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc + var expr = this.parseExprOps(noIn, refDestructuringErrors) + if (this.checkExpressionErrors(refDestructuringErrors)) return expr + if (this.eat(tt.question)) { + var node = this.startNodeAt(startPos, startLoc) + node.test = expr + node.consequent = this.parseMaybeAssign() + this.expect(tt.colon) + node.alternate = this.parseMaybeAssign(noIn) + return this.finishNode(node, "ConditionalExpression") + } + return expr +} + +// Start the precedence parser. + +pp$3.parseExprOps = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc + var expr = this.parseMaybeUnary(refDestructuringErrors, false) + if (this.checkExpressionErrors(refDestructuringErrors)) return expr + return this.parseExprOp(expr, startPos, startLoc, -1, noIn) +} + +// Parse binary operators with the operator precedence parsing +// algorithm. `left` is the left-hand side of the operator. +// `minPrec` provides context that allows the function to stop and +// defer further parser to one of its callers when it encounters an +// operator that has a lower precedence than the set it is parsing. + +pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) { + var prec = this.type.binop + if (prec != null && (!noIn || this.type !== tt._in)) { + if (prec > minPrec) { + var logical = this.type === tt.logicalOR || this.type === tt.logicalAND + var op = this.value + this.next() + var startPos = this.start, startLoc = this.startLoc + var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn) + var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical) + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn) + } + } + return left +} + +pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) { + var node = this.startNodeAt(startPos, startLoc) + node.left = left + node.operator = op + node.right = right + return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") +} + +// Parse unary operators, both prefix and postfix. + +pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) { + var this$1 = this; + + var startPos = this.start, startLoc = this.startLoc, expr + if (this.type.prefix) { + var node = this.startNode(), update = this.type === tt.incDec + node.operator = this.value + node.prefix = true + this.next() + node.argument = this.parseMaybeUnary(null, true) + this.checkExpressionErrors(refDestructuringErrors, true) + if (update) this.checkLVal(node.argument) + else if (this.strict && node.operator === "delete" && + node.argument.type === "Identifier") + this.raiseRecoverable(node.start, "Deleting local variable in strict mode") + else sawUnary = true + expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression") + } else { + expr = this.parseExprSubscripts(refDestructuringErrors) + if (this.checkExpressionErrors(refDestructuringErrors)) return expr + while (this.type.postfix && !this.canInsertSemicolon()) { + var node$1 = this$1.startNodeAt(startPos, startLoc) + node$1.operator = this$1.value + node$1.prefix = false + node$1.argument = expr + this$1.checkLVal(expr) + this$1.next() + expr = this$1.finishNode(node$1, "UpdateExpression") + } + } + + if (!sawUnary && this.eat(tt.starstar)) + return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false) + else + return expr +} + +// Parse call, dot, and `[]`-subscript expressions. + +pp$3.parseExprSubscripts = function(refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc + var expr = this.parseExprAtom(refDestructuringErrors) + var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")" + if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) return expr + return this.parseSubscripts(expr, startPos, startLoc) +} + +pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) { + var this$1 = this; + + for (;;) { + if (this$1.eat(tt.dot)) { + var node = this$1.startNodeAt(startPos, startLoc) + node.object = base + node.property = this$1.parseIdent(true) + node.computed = false + base = this$1.finishNode(node, "MemberExpression") + } else if (this$1.eat(tt.bracketL)) { + var node$1 = this$1.startNodeAt(startPos, startLoc) + node$1.object = base + node$1.property = this$1.parseExpression() + node$1.computed = true + this$1.expect(tt.bracketR) + base = this$1.finishNode(node$1, "MemberExpression") + } else if (!noCalls && this$1.eat(tt.parenL)) { + var node$2 = this$1.startNodeAt(startPos, startLoc) + node$2.callee = base + node$2.arguments = this$1.parseExprList(tt.parenR, false) + base = this$1.finishNode(node$2, "CallExpression") + } else if (this$1.type === tt.backQuote) { + var node$3 = this$1.startNodeAt(startPos, startLoc) + node$3.tag = base + node$3.quasi = this$1.parseTemplate() + base = this$1.finishNode(node$3, "TaggedTemplateExpression") + } else { + return base + } + } +} + +// Parse an atomic expression — either a single token that is an +// expression, an expression started by a keyword like `function` or +// `new`, or an expression wrapped in punctuation like `()`, `[]`, +// or `{}`. + +pp$3.parseExprAtom = function(refDestructuringErrors) { + var node, canBeArrow = this.potentialArrowAt == this.start + switch (this.type) { + case tt._super: + if (!this.inFunction) + this.raise(this.start, "'super' outside of function or class") + + case tt._this: + var type = this.type === tt._this ? "ThisExpression" : "Super" + node = this.startNode() + this.next() + return this.finishNode(node, type) + + case tt.name: + var startPos = this.start, startLoc = this.startLoc + var id = this.parseIdent(this.type !== tt.name) + if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id]) + return id + + case tt.regexp: + var value = this.value + node = this.parseLiteral(value.value) + node.regex = {pattern: value.pattern, flags: value.flags} + return node + + case tt.num: case tt.string: + return this.parseLiteral(this.value) + + case tt._null: case tt._true: case tt._false: + node = this.startNode() + node.value = this.type === tt._null ? null : this.type === tt._true + node.raw = this.type.keyword + this.next() + return this.finishNode(node, "Literal") + + case tt.parenL: + return this.parseParenAndDistinguishExpression(canBeArrow) + + case tt.bracketL: + node = this.startNode() + this.next() + node.elements = this.parseExprList(tt.bracketR, true, true, refDestructuringErrors) + return this.finishNode(node, "ArrayExpression") + + case tt.braceL: + return this.parseObj(false, refDestructuringErrors) + + case tt._function: + node = this.startNode() + this.next() + return this.parseFunction(node, false) + + case tt._class: + return this.parseClass(this.startNode(), false) + + case tt._new: + return this.parseNew() + + case tt.backQuote: + return this.parseTemplate() + + default: + this.unexpected() + } +} + +pp$3.parseLiteral = function(value) { + var node = this.startNode() + node.value = value + node.raw = this.input.slice(this.start, this.end) + this.next() + return this.finishNode(node, "Literal") +} + +pp$3.parseParenExpression = function() { + this.expect(tt.parenL) + var val = this.parseExpression() + this.expect(tt.parenR) + return val +} + +pp$3.parseParenAndDistinguishExpression = function(canBeArrow) { + var this$1 = this; + + var startPos = this.start, startLoc = this.startLoc, val + if (this.options.ecmaVersion >= 6) { + this.next() + + var innerStartPos = this.start, innerStartLoc = this.startLoc + var exprList = [], first = true + var refDestructuringErrors = new DestructuringErrors, spreadStart, innerParenStart + while (this.type !== tt.parenR) { + first ? first = false : this$1.expect(tt.comma) + if (this$1.type === tt.ellipsis) { + spreadStart = this$1.start + exprList.push(this$1.parseParenItem(this$1.parseRest())) + break + } else { + if (this$1.type === tt.parenL && !innerParenStart) { + innerParenStart = this$1.start + } + exprList.push(this$1.parseMaybeAssign(false, refDestructuringErrors, this$1.parseParenItem)) + } + } + var innerEndPos = this.start, innerEndLoc = this.startLoc + this.expect(tt.parenR) + + if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) { + this.checkPatternErrors(refDestructuringErrors, true) + if (innerParenStart) this.unexpected(innerParenStart) + return this.parseParenArrowList(startPos, startLoc, exprList) + } + + if (!exprList.length) this.unexpected(this.lastTokStart) + if (spreadStart) this.unexpected(spreadStart) + this.checkExpressionErrors(refDestructuringErrors, true) + + if (exprList.length > 1) { + val = this.startNodeAt(innerStartPos, innerStartLoc) + val.expressions = exprList + this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc) + } else { + val = exprList[0] + } + } else { + val = this.parseParenExpression() + } + + if (this.options.preserveParens) { + var par = this.startNodeAt(startPos, startLoc) + par.expression = val + return this.finishNode(par, "ParenthesizedExpression") + } else { + return val + } +} + +pp$3.parseParenItem = function(item) { + return item +} + +pp$3.parseParenArrowList = function(startPos, startLoc, exprList) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList) +} + +// New's precedence is slightly tricky. It must allow its argument to +// be a `[]` or dot subscript expression, but not a call — at least, +// not without wrapping it in parentheses. Thus, it uses the noCalls +// argument to parseSubscripts to prevent it from consuming the +// argument list. + +var empty$1 = [] + +pp$3.parseNew = function() { + var node = this.startNode() + var meta = this.parseIdent(true) + if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) { + node.meta = meta + node.property = this.parseIdent(true) + if (node.property.name !== "target") + this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target") + if (!this.inFunction) + this.raiseRecoverable(node.start, "new.target can only be used in functions") + return this.finishNode(node, "MetaProperty") + } + var startPos = this.start, startLoc = this.startLoc + node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true) + if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, false) + else node.arguments = empty$1 + return this.finishNode(node, "NewExpression") +} + +// Parse template expression. + +pp$3.parseTemplateElement = function() { + var elem = this.startNode() + elem.value = { + raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, '\n'), + cooked: this.value + } + this.next() + elem.tail = this.type === tt.backQuote + return this.finishNode(elem, "TemplateElement") +} + +pp$3.parseTemplate = function() { + var this$1 = this; + + var node = this.startNode() + this.next() + node.expressions = [] + var curElt = this.parseTemplateElement() + node.quasis = [curElt] + while (!curElt.tail) { + this$1.expect(tt.dollarBraceL) + node.expressions.push(this$1.parseExpression()) + this$1.expect(tt.braceR) + node.quasis.push(curElt = this$1.parseTemplateElement()) + } + this.next() + return this.finishNode(node, "TemplateLiteral") +} + +// Parse an object literal or binding pattern. + +pp$3.parseObj = function(isPattern, refDestructuringErrors) { + var this$1 = this; + + var node = this.startNode(), first = true, propHash = {} + node.properties = [] + this.next() + while (!this.eat(tt.braceR)) { + if (!first) { + this$1.expect(tt.comma) + if (this$1.afterTrailingComma(tt.braceR)) break + } else first = false + + var prop = this$1.startNode(), isGenerator, startPos, startLoc + if (this$1.options.ecmaVersion >= 6) { + prop.method = false + prop.shorthand = false + if (isPattern || refDestructuringErrors) { + startPos = this$1.start + startLoc = this$1.startLoc + } + if (!isPattern) + isGenerator = this$1.eat(tt.star) + } + this$1.parsePropertyName(prop) + this$1.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors) + this$1.checkPropClash(prop, propHash) + node.properties.push(this$1.finishNode(prop, "Property")) + } + return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") +} + +pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, startPos, startLoc, refDestructuringErrors) { + if (this.eat(tt.colon)) { + prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors) + prop.kind = "init" + } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) { + if (isPattern) this.unexpected() + prop.kind = "init" + prop.method = true + prop.value = this.parseMethod(isGenerator) + } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && + (prop.key.name === "get" || prop.key.name === "set") && + (this.type != tt.comma && this.type != tt.braceR)) { + if (isGenerator || isPattern) this.unexpected() + prop.kind = prop.key.name + this.parsePropertyName(prop) + prop.value = this.parseMethod(false) + var paramCount = prop.kind === "get" ? 0 : 1 + if (prop.value.params.length !== paramCount) { + var start = prop.value.start + if (prop.kind === "get") + this.raiseRecoverable(start, "getter should have no params") + else + this.raiseRecoverable(start, "setter should have exactly one param") + } + if (prop.kind === "set" && prop.value.params[0].type === "RestElement") + this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params") + } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { + if (this.keywords.test(prop.key.name) || + (this.strict ? this.reservedWordsStrictBind : this.reservedWords).test(prop.key.name) || + (this.inGenerator && prop.key.name == "yield")) + this.raiseRecoverable(prop.key.start, "'" + prop.key.name + "' can not be used as shorthand property") + prop.kind = "init" + if (isPattern) { + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key) + } else if (this.type === tt.eq && refDestructuringErrors) { + if (!refDestructuringErrors.shorthandAssign) + refDestructuringErrors.shorthandAssign = this.start + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key) + } else { + prop.value = prop.key + } + prop.shorthand = true + } else this.unexpected() +} + +pp$3.parsePropertyName = function(prop) { + if (this.options.ecmaVersion >= 6) { + if (this.eat(tt.bracketL)) { + prop.computed = true + prop.key = this.parseMaybeAssign() + this.expect(tt.bracketR) + return prop.key + } else { + prop.computed = false + } + } + return prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true) +} + +// Initialize empty function node. + +pp$3.initFunction = function(node) { + node.id = null + if (this.options.ecmaVersion >= 6) { + node.generator = false + node.expression = false + } +} + +// Parse object or class method. + +pp$3.parseMethod = function(isGenerator) { + var node = this.startNode(), oldInGen = this.inGenerator + this.inGenerator = isGenerator + this.initFunction(node) + this.expect(tt.parenL) + node.params = this.parseBindingList(tt.parenR, false, false) + if (this.options.ecmaVersion >= 6) + node.generator = isGenerator + this.parseFunctionBody(node, false) + this.inGenerator = oldInGen + return this.finishNode(node, "FunctionExpression") +} + +// Parse arrow function expression with given parameters. + +pp$3.parseArrowExpression = function(node, params) { + var oldInGen = this.inGenerator + this.inGenerator = false + this.initFunction(node) + node.params = this.toAssignableList(params, true) + this.parseFunctionBody(node, true) + this.inGenerator = oldInGen + return this.finishNode(node, "ArrowFunctionExpression") +} + +// Parse function body and check parameters. + +pp$3.parseFunctionBody = function(node, isArrowFunction) { + var isExpression = isArrowFunction && this.type !== tt.braceL + + if (isExpression) { + node.body = this.parseMaybeAssign() + node.expression = true + } else { + // Start a new scope with regard to labels and the `inFunction` + // flag (restore them to their old value afterwards). + var oldInFunc = this.inFunction, oldLabels = this.labels + this.inFunction = true; this.labels = [] + node.body = this.parseBlock(true) + node.expression = false + this.inFunction = oldInFunc; this.labels = oldLabels + } + + // If this is a strict mode function, verify that argument names + // are not repeated, and it does not try to bind the words `eval` + // or `arguments`. + var useStrict = (!isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) ? node.body.body[0] : null; + if (this.strict || useStrict) { + var oldStrict = this.strict + this.strict = true + if (node.id) + this.checkLVal(node.id, true) + this.checkParams(node, useStrict) + this.strict = oldStrict + } else if (isArrowFunction) { + this.checkParams(node, useStrict) + } +} + +// Checks function params for various disallowed patterns such as using "eval" +// or "arguments" and duplicate parameters. + +pp$3.checkParams = function(node, useStrict) { + var this$1 = this; + + var nameHash = {} + for (var i = 0; i < node.params.length; i++) { + if (useStrict && this$1.options.ecmaVersion >= 7 && node.params[i].type !== "Identifier") + this$1.raiseRecoverable(useStrict.start, "Illegal 'use strict' directive in function with non-simple parameter list"); + this$1.checkLVal(node.params[i], true, nameHash) + } +} + +// Parses a comma-separated list of expressions, and returns them as +// an array. `close` is the token type that ends the list, and +// `allowEmpty` can be turned on to allow subsequent commas with +// nothing in between them to be parsed as `null` (which is needed +// for array literals). + +pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { + var this$1 = this; + + var elts = [], first = true + while (!this.eat(close)) { + if (!first) { + this$1.expect(tt.comma) + if (allowTrailingComma && this$1.afterTrailingComma(close)) break + } else first = false + + var elt + if (allowEmpty && this$1.type === tt.comma) + elt = null + else if (this$1.type === tt.ellipsis) { + elt = this$1.parseSpread(refDestructuringErrors) + if (this$1.type === tt.comma && refDestructuringErrors && !refDestructuringErrors.trailingComma) { + refDestructuringErrors.trailingComma = this$1.lastTokStart + } + } else + elt = this$1.parseMaybeAssign(false, refDestructuringErrors) + elts.push(elt) + } + return elts +} + +// Parse the next token as an identifier. If `liberal` is true (used +// when parsing properties), it will also convert keywords into +// identifiers. + +pp$3.parseIdent = function(liberal) { + var node = this.startNode() + if (liberal && this.options.allowReserved == "never") liberal = false + if (this.type === tt.name) { + if (!liberal && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(this.value) && + (this.options.ecmaVersion >= 6 || + this.input.slice(this.start, this.end).indexOf("\\") == -1)) + this.raiseRecoverable(this.start, "The keyword '" + this.value + "' is reserved") + if (!liberal && this.inGenerator && this.value === "yield") + this.raiseRecoverable(this.start, "Can not use 'yield' as identifier inside a generator") + node.name = this.value + } else if (liberal && this.type.keyword) { + node.name = this.type.keyword + } else { + this.unexpected() + } + this.next() + return this.finishNode(node, "Identifier") +} + +// Parses yield expression inside generator. + +pp$3.parseYield = function() { + var node = this.startNode() + this.next() + if (this.type == tt.semi || this.canInsertSemicolon() || (this.type != tt.star && !this.type.startsExpr)) { + node.delegate = false + node.argument = null + } else { + node.delegate = this.eat(tt.star) + node.argument = this.parseMaybeAssign() + } + return this.finishNode(node, "YieldExpression") +} + +var pp$4 = Parser.prototype + +// This function is used to raise exceptions on parse errors. It +// takes an offset integer (into the current `input`) to indicate +// the location of the error, attaches the position to the end +// of the error message, and then raises a `SyntaxError` with that +// message. + +pp$4.raise = function(pos, message) { + var loc = getLineInfo(this.input, pos) + message += " (" + loc.line + ":" + loc.column + ")" + var err = new SyntaxError(message) + err.pos = pos; err.loc = loc; err.raisedAt = this.pos + throw err +} + +pp$4.raiseRecoverable = pp$4.raise + +pp$4.curPosition = function() { + if (this.options.locations) { + return new Position(this.curLine, this.pos - this.lineStart) + } +} + +var Node = function Node(parser, pos, loc) { + this.type = "" + this.start = pos + this.end = 0 + if (parser.options.locations) + this.loc = new SourceLocation(parser, loc) + if (parser.options.directSourceFile) + this.sourceFile = parser.options.directSourceFile + if (parser.options.ranges) + this.range = [pos, 0] +}; + +// Start an AST node, attaching a start offset. + +var pp$5 = Parser.prototype + +pp$5.startNode = function() { + return new Node(this, this.start, this.startLoc) +} + +pp$5.startNodeAt = function(pos, loc) { + return new Node(this, pos, loc) +} + +// Finish an AST node, adding `type` and `end` properties. + +function finishNodeAt(node, type, pos, loc) { + node.type = type + node.end = pos + if (this.options.locations) + node.loc.end = loc + if (this.options.ranges) + node.range[1] = pos + return node +} + +pp$5.finishNode = function(node, type) { + return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) +} + +// Finish node at given position + +pp$5.finishNodeAt = function(node, type, pos, loc) { + return finishNodeAt.call(this, node, type, pos, loc) +} + +var TokContext = function TokContext(token, isExpr, preserveSpace, override) { + this.token = token + this.isExpr = !!isExpr + this.preserveSpace = !!preserveSpace + this.override = override +}; + +var types = { + b_stat: new TokContext("{", false), + b_expr: new TokContext("{", true), + b_tmpl: new TokContext("${", true), + p_stat: new TokContext("(", false), + p_expr: new TokContext("(", true), + q_tmpl: new TokContext("`", true, true, function (p) { return p.readTmplToken(); }), + f_expr: new TokContext("function", true) +} + +var pp$6 = Parser.prototype + +pp$6.initialContext = function() { + return [types.b_stat] +} + +pp$6.braceIsBlock = function(prevType) { + if (prevType === tt.colon) { + var parent = this.curContext() + if (parent === types.b_stat || parent === types.b_expr) + return !parent.isExpr + } + if (prevType === tt._return) + return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof || prevType === tt.parenR) + return true + if (prevType == tt.braceL) + return this.curContext() === types.b_stat + return !this.exprAllowed +} + +pp$6.updateContext = function(prevType) { + var update, type = this.type + if (type.keyword && prevType == tt.dot) + this.exprAllowed = false + else if (update = type.updateContext) + update.call(this, prevType) + else + this.exprAllowed = type.beforeExpr +} + +// Token-specific context update code + +tt.parenR.updateContext = tt.braceR.updateContext = function() { + if (this.context.length == 1) { + this.exprAllowed = true + return + } + var out = this.context.pop() + if (out === types.b_stat && this.curContext() === types.f_expr) { + this.context.pop() + this.exprAllowed = false + } else if (out === types.b_tmpl) { + this.exprAllowed = true + } else { + this.exprAllowed = !out.isExpr + } +} + +tt.braceL.updateContext = function(prevType) { + this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr) + this.exprAllowed = true +} + +tt.dollarBraceL.updateContext = function() { + this.context.push(types.b_tmpl) + this.exprAllowed = true +} + +tt.parenL.updateContext = function(prevType) { + var statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while + this.context.push(statementParens ? types.p_stat : types.p_expr) + this.exprAllowed = true +} + +tt.incDec.updateContext = function() { + // tokExprAllowed stays unchanged +} + +tt._function.updateContext = function(prevType) { + if (prevType.beforeExpr && prevType !== tt.semi && prevType !== tt._else && + !((prevType === tt.colon || prevType === tt.braceL) && this.curContext() === types.b_stat)) + this.context.push(types.f_expr) + this.exprAllowed = false +} + +tt.backQuote.updateContext = function() { + if (this.curContext() === types.q_tmpl) + this.context.pop() + else + this.context.push(types.q_tmpl) + this.exprAllowed = false +} + +// Object type used to represent tokens. Note that normally, tokens +// simply exist as properties on the parser object. This is only +// used for the onToken callback and the external tokenizer. + +var Token = function Token(p) { + this.type = p.type + this.value = p.value + this.start = p.start + this.end = p.end + if (p.options.locations) + this.loc = new SourceLocation(p, p.startLoc, p.endLoc) + if (p.options.ranges) + this.range = [p.start, p.end] +}; + +// ## Tokenizer + +var pp$7 = Parser.prototype + +// Are we running under Rhino? +var isRhino = typeof Packages == "object" && Object.prototype.toString.call(Packages) == "[object JavaPackage]" + +// Move to the next token + +pp$7.next = function() { + if (this.options.onToken) + this.options.onToken(new Token(this)) + + this.lastTokEnd = this.end + this.lastTokStart = this.start + this.lastTokEndLoc = this.endLoc + this.lastTokStartLoc = this.startLoc + this.nextToken() +} + +pp$7.getToken = function() { + this.next() + return new Token(this) +} + +// If we're in an ES6 environment, make parsers iterable +if (typeof Symbol !== "undefined") + pp$7[Symbol.iterator] = function () { + var self = this + return {next: function () { + var token = self.getToken() + return { + done: token.type === tt.eof, + value: token + } + }} + } + +// Toggle strict mode. Re-reads the next number or string to please +// pedantic tests (`"use strict"; 010;` should fail). + +pp$7.setStrict = function(strict) { + var this$1 = this; + + this.strict = strict + if (this.type !== tt.num && this.type !== tt.string) return + this.pos = this.start + if (this.options.locations) { + while (this.pos < this.lineStart) { + this$1.lineStart = this$1.input.lastIndexOf("\n", this$1.lineStart - 2) + 1 + --this$1.curLine + } + } + this.nextToken() +} + +pp$7.curContext = function() { + return this.context[this.context.length - 1] +} + +// Read a single token, updating the parser object's token-related +// properties. + +pp$7.nextToken = function() { + var curContext = this.curContext() + if (!curContext || !curContext.preserveSpace) this.skipSpace() + + this.start = this.pos + if (this.options.locations) this.startLoc = this.curPosition() + if (this.pos >= this.input.length) return this.finishToken(tt.eof) + + if (curContext.override) return curContext.override(this) + else this.readToken(this.fullCharCodeAtPos()) +} + +pp$7.readToken = function(code) { + // Identifier or keyword. '\uXXXX' sequences are allowed in + // identifiers, so '\' also dispatches to that. + if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) + return this.readWord() + + return this.getTokenFromCode(code) +} + +pp$7.fullCharCodeAtPos = function() { + var code = this.input.charCodeAt(this.pos) + if (code <= 0xd7ff || code >= 0xe000) return code + var next = this.input.charCodeAt(this.pos + 1) + return (code << 10) + next - 0x35fdc00 +} + +pp$7.skipBlockComment = function() { + var this$1 = this; + + var startLoc = this.options.onComment && this.curPosition() + var start = this.pos, end = this.input.indexOf("*/", this.pos += 2) + if (end === -1) this.raise(this.pos - 2, "Unterminated comment") + this.pos = end + 2 + if (this.options.locations) { + lineBreakG.lastIndex = start + var match + while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { + ++this$1.curLine + this$1.lineStart = match.index + match[0].length + } + } + if (this.options.onComment) + this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, + startLoc, this.curPosition()) +} + +pp$7.skipLineComment = function(startSkip) { + var this$1 = this; + + var start = this.pos + var startLoc = this.options.onComment && this.curPosition() + var ch = this.input.charCodeAt(this.pos+=startSkip) + while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) { + ++this$1.pos + ch = this$1.input.charCodeAt(this$1.pos) + } + if (this.options.onComment) + this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, + startLoc, this.curPosition()) +} + +// Called at the start of the parse and after every token. Skips +// whitespace and comments, and. + +pp$7.skipSpace = function() { + var this$1 = this; + + loop: while (this.pos < this.input.length) { + var ch = this$1.input.charCodeAt(this$1.pos) + switch (ch) { + case 32: case 160: // ' ' + ++this$1.pos + break + case 13: + if (this$1.input.charCodeAt(this$1.pos + 1) === 10) { + ++this$1.pos + } + case 10: case 8232: case 8233: + ++this$1.pos + if (this$1.options.locations) { + ++this$1.curLine + this$1.lineStart = this$1.pos + } + break + case 47: // '/' + switch (this$1.input.charCodeAt(this$1.pos + 1)) { + case 42: // '*' + this$1.skipBlockComment() + break + case 47: + this$1.skipLineComment(2) + break + default: + break loop + } + break + default: + if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this$1.pos + } else { + break loop + } + } + } +} + +// Called at the end of every token. Sets `end`, `val`, and +// maintains `context` and `exprAllowed`, and skips the space after +// the token, so that the next one's `start` will point at the +// right position. + +pp$7.finishToken = function(type, val) { + this.end = this.pos + if (this.options.locations) this.endLoc = this.curPosition() + var prevType = this.type + this.type = type + this.value = val + + this.updateContext(prevType) +} + +// ### Token reading + +// This is the function that is called to fetch the next token. It +// is somewhat obscure, because it works in character codes rather +// than characters, and because operator parsing has been inlined +// into it. +// +// All in the name of speed. +// +pp$7.readToken_dot = function() { + var next = this.input.charCodeAt(this.pos + 1) + if (next >= 48 && next <= 57) return this.readNumber(true) + var next2 = this.input.charCodeAt(this.pos + 2) + if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' + this.pos += 3 + return this.finishToken(tt.ellipsis) + } else { + ++this.pos + return this.finishToken(tt.dot) + } +} + +pp$7.readToken_slash = function() { // '/' + var next = this.input.charCodeAt(this.pos + 1) + if (this.exprAllowed) {++this.pos; return this.readRegexp()} + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.slash, 1) +} + +pp$7.readToken_mult_modulo_exp = function(code) { // '%*' + var next = this.input.charCodeAt(this.pos + 1) + var size = 1 + var tokentype = code === 42 ? tt.star : tt.modulo + + // exponentiation operator ** and **= + if (this.options.ecmaVersion >= 7 && next === 42) { + ++size + tokentype = tt.starstar + next = this.input.charCodeAt(this.pos + 2) + } + + if (next === 61) return this.finishOp(tt.assign, size + 1) + return this.finishOp(tokentype, size) +} + +pp$7.readToken_pipe_amp = function(code) { // '|&' + var next = this.input.charCodeAt(this.pos + 1) + if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2) + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1) +} + +pp$7.readToken_caret = function() { // '^' + var next = this.input.charCodeAt(this.pos + 1) + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.bitwiseXOR, 1) +} + +pp$7.readToken_plus_min = function(code) { // '+-' + var next = this.input.charCodeAt(this.pos + 1) + if (next === code) { + if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 && + lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) { + // A `-->` line comment + this.skipLineComment(3) + this.skipSpace() + return this.nextToken() + } + return this.finishOp(tt.incDec, 2) + } + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.plusMin, 1) +} + +pp$7.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1) + var size = 1 + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 + if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) + return this.finishOp(tt.bitShift, size) + } + if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && + this.input.charCodeAt(this.pos + 3) == 45) { + if (this.inModule) this.unexpected() + // `` line comment + this.skipLineComment(3) + this.skipSpace() + return this.nextToken() + } + return this.finishOp(tt.incDec, 2) + } + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.plusMin, 1) + } + + pp$7.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1) + var size = 1 + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 + if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) + return this.finishOp(tt.bitShift, size) + } + if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && + this.input.charCodeAt(this.pos + 3) == 45) { + if (this.inModule) this.unexpected() + // `` line comment + this.skipLineComment(3) + this.skipSpace() + return this.nextToken() + } + return this.finishOp(tt.incDec, 2) + } + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.plusMin, 1) +} + +pp.readToken_lt_gt = function(code) { // '<>' + let next = this.input.charCodeAt(this.pos + 1) + let size = 1 + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 + if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) + return this.finishOp(tt.bitShift, size) + } + if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && + this.input.charCodeAt(this.pos + 3) == 45) { + if (this.inModule) this.unexpected() + // ` From a03811508aa14f67efd4666dc2428a94a2a7d318 Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Mon, 17 Oct 2016 09:31:24 +0100 Subject: [PATCH 041/145] doc: suggest nodejs/help for general support This commit adds a reference to `nodejs/help` in the github template. PR-URL: https://github.com/nodejs/node/pull/9128 Reviewed-By: Ben Noordhuis Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Evan Lucas Reviewed-By: Gibson Fahnestock --- .github/ISSUE_TEMPLATE.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 4c115cb593573f..375a6aa8a24eff 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,5 +1,11 @@ + +AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects. +Optionally it accepts abort function (should be synchronously return by iterator for each item), and terminates left over jobs upon an error event. For specific iteration order built-in (`ascending` and `descending`) and custom sort helpers also supported, via `asynckit.serialOrdered` method. + +It ensures async operations to keep behavior more stable and prevent `Maximum call stack size exceeded` errors, from sync iterators. + +| compression | size | +| :----------------- | -------: | +| asynckit.js | 12.34 kB | +| asynckit.min.js | 4.11 kB | +| asynckit.min.js.gz | 1.47 kB | + + +## Install + +```sh +$ npm install --save asynckit +``` + +## Examples + +### Parallel Jobs + +Runs iterator over provided array in parallel. Stores output in the `result` array, +on the matching positions. In unlikely event of an error from one of the jobs, +will terminate rest of the active jobs (if abort function is provided) +and return error along with salvaged data to the main callback function. + +#### Input Array + +```javascript +var parallel = require('asynckit').parallel + , assert = require('assert') + ; + +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] + , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] + , target = [] + ; + +parallel(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); +}); + +// async job accepts one element from the array +// and a callback function +function asyncJob(item, cb) +{ + // different delays (in ms) per item + var delay = item * 25; + + // pretend different jobs take different time to finish + // and not in consequential order + var timeoutId = setTimeout(function() { + target.push(item); + cb(null, item * 2); + }, delay); + + // allow to cancel "leftover" jobs upon error + // return function, invoking of which will abort this job + return clearTimeout.bind(null, timeoutId); +} +``` + +More examples could be found in [test/test-parallel-array.js](test/test-parallel-array.js). + +#### Input Object + +Also it supports named jobs, listed via object. + +```javascript +var parallel = require('asynckit/parallel') + , assert = require('assert') + ; + +var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } + , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } + , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] + , expectedKeys = [ 'first', 'one', 'two', 'four', 'eight', 'sixteen', 'thirtyTwo', 'sixtyFour' ] + , target = [] + , keys = [] + ; + +parallel(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); + assert.deepEqual(keys, expectedKeys); +}); + +// supports full value, key, callback (shortcut) interface +function asyncJob(item, key, cb) +{ + // different delays (in ms) per item + var delay = item * 25; + + // pretend different jobs take different time to finish + // and not in consequential order + var timeoutId = setTimeout(function() { + keys.push(key); + target.push(item); + cb(null, item * 2); + }, delay); + + // allow to cancel "leftover" jobs upon error + // return function, invoking of which will abort this job + return clearTimeout.bind(null, timeoutId); +} +``` + +More examples could be found in [test/test-parallel-object.js](test/test-parallel-object.js). + +### Serial Jobs + +Runs iterator over provided array sequentially. Stores output in the `result` array, +on the matching positions. In unlikely event of an error from one of the jobs, +will not proceed to the rest of the items in the list +and return error along with salvaged data to the main callback function. + +#### Input Array + +```javascript +var serial = require('asynckit/serial') + , assert = require('assert') + ; + +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] + , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] + , target = [] + ; + +serial(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); +}); + +// extended interface (item, key, callback) +// also supported for arrays +function asyncJob(item, key, cb) +{ + target.push(key); + + // it will be automatically made async + // even it iterator "returns" in the same event loop + cb(null, item * 2); +} +``` + +More examples could be found in [test/test-serial-array.js](test/test-serial-array.js). + +#### Input Object + +Also it supports named jobs, listed via object. + +```javascript +var serial = require('asynckit').serial + , assert = require('assert') + ; + +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] + , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] + , target = [] + ; + +var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } + , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } + , expectedTarget = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , target = [] + ; + + +serial(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); +}); + +// shortcut interface (item, callback) +// works for object as well as for the arrays +function asyncJob(item, cb) +{ + target.push(item); + + // it will be automatically made async + // even it iterator "returns" in the same event loop + cb(null, item * 2); +} +``` + +More examples could be found in [test/test-serial-object.js](test/test-serial-object.js). + +_Note: Since _object_ is an _unordered_ collection of properties, +it may produce unexpected results with sequential iterations. +Whenever order of the jobs' execution is important please use `serialOrdered` method._ + +### Ordered Serial Iterations + +TBD + +For example [compare-property](compare-property) package. + +### Streaming interface + +TBD + +## Want to Know More? + +More examples can be found in [test folder](test/). + +Or open an [issue](https://github.com/alexindigo/asynckit/issues) with questions and/or suggestions. + +## License + +AsyncKit is licensed under the MIT license. diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/bench.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/bench.js new file mode 100644 index 00000000000000..c612f1a55fda02 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/bench.js @@ -0,0 +1,76 @@ +/* eslint no-console: "off" */ + +var asynckit = require('./') + , async = require('async') + , assert = require('assert') + , expected = 0 + ; + +var Benchmark = require('benchmark'); +var suite = new Benchmark.Suite; + +var source = []; +for (var z = 1; z < 100; z++) +{ + source.push(z); + expected += z; +} + +suite +// add tests + +.add('async.map', function(deferred) +{ + var total = 0; + + async.map(source, + function(i, cb) + { + setImmediate(function() + { + total += i; + cb(null, total); + }); + }, + function(err, result) + { + assert.ifError(err); + assert.equal(result[result.length - 1], expected); + deferred.resolve(); + }); +}, {'defer': true}) + + +.add('asynckit.parallel', function(deferred) +{ + var total = 0; + + asynckit.parallel(source, + function(i, cb) + { + setImmediate(function() + { + total += i; + cb(null, total); + }); + }, + function(err, result) + { + assert.ifError(err); + assert.equal(result[result.length - 1], expected); + deferred.resolve(); + }); +}, {'defer': true}) + + +// add listeners +.on('cycle', function(ev) +{ + console.log(String(ev.target)); +}) +.on('complete', function() +{ + console.log('Fastest is ' + this.filter('fastest').map('name')); +}) +// run async +.run({ 'async': true }); diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/index.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/index.js new file mode 100644 index 00000000000000..455f9454ee6483 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/index.js @@ -0,0 +1,6 @@ +module.exports = +{ + parallel : require('./parallel.js'), + serial : require('./serial.js'), + serialOrdered : require('./serialOrdered.js') +}; diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/abort.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/abort.js new file mode 100644 index 00000000000000..114367e5fbf144 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/abort.js @@ -0,0 +1,29 @@ +// API +module.exports = abort; + +/** + * Aborts leftover active jobs + * + * @param {object} state - current state object + */ +function abort(state) +{ + Object.keys(state.jobs).forEach(clean.bind(state)); + + // reset leftover jobs + state.jobs = {}; +} + +/** + * Cleans up leftover job by invoking abort function for the provided job id + * + * @this state + * @param {string|number} key - job id to abort + */ +function clean(key) +{ + if (typeof this.jobs[key] == 'function') + { + this.jobs[key](); + } +} diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/async.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/async.js new file mode 100644 index 00000000000000..7f1288a4ce9ae0 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/async.js @@ -0,0 +1,34 @@ +var defer = require('./defer.js'); + +// API +module.exports = async; + +/** + * Runs provided callback asynchronously + * even if callback itself is not + * + * @param {function} callback - callback to invoke + * @returns {function} - augmented callback + */ +function async(callback) +{ + var isAsync = false; + + // check if async happened + defer(function() { isAsync = true; }); + + return function async_callback(err, result) + { + if (isAsync) + { + callback(err, result); + } + else + { + defer(function nextTick_callback() + { + callback(err, result); + }); + } + }; +} diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/defer.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/defer.js new file mode 100644 index 00000000000000..b67110c7ad6e55 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/defer.js @@ -0,0 +1,26 @@ +module.exports = defer; + +/** + * Runs provided function on next iteration of the event loop + * + * @param {function} fn - function to run + */ +function defer(fn) +{ + var nextTick = typeof setImmediate == 'function' + ? setImmediate + : ( + typeof process == 'object' && typeof process.nextTick == 'function' + ? process.nextTick + : null + ); + + if (nextTick) + { + nextTick(fn); + } + else + { + setTimeout(fn, 0); + } +} diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/iterate.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/iterate.js new file mode 100644 index 00000000000000..5d2839a590b2ba --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/iterate.js @@ -0,0 +1,75 @@ +var async = require('./async.js') + , abort = require('./abort.js') + ; + +// API +module.exports = iterate; + +/** + * Iterates over each job object + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {object} state - current job status + * @param {function} callback - invoked when all elements processed + */ +function iterate(list, iterator, state, callback) +{ + // store current index + var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; + + state.jobs[key] = runJob(iterator, key, list[key], function(error, output) + { + // don't repeat yourself + // skip secondary callbacks + if (!(key in state.jobs)) + { + return; + } + + // clean up jobs + delete state.jobs[key]; + + if (error) + { + // don't process rest of the results + // stop still active jobs + // and reset the list + abort(state); + } + else + { + state.results[key] = output; + } + + // return salvaged results + callback(error, state.results); + }); +} + +/** + * Runs iterator over provided job element + * + * @param {function} iterator - iterator to invoke + * @param {string|number} key - key/index of the element in the list of jobs + * @param {mixed} item - job description + * @param {function} callback - invoked after iterator is done with the job + * @returns {function|mixed} - job abort function or something else + */ +function runJob(iterator, key, item, callback) +{ + var aborter; + + // allow shortcut if iterator expects only two arguments + if (iterator.length == 2) + { + aborter = iterator(item, async(callback)); + } + // otherwise go with full three arguments + else + { + aborter = iterator(item, key, async(callback)); + } + + return aborter; +} diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_asynckit.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_asynckit.js new file mode 100644 index 00000000000000..78ad240f0afd80 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_asynckit.js @@ -0,0 +1,91 @@ +var streamify = require('./streamify.js') + , defer = require('./defer.js') + ; + +// API +module.exports = ReadableAsyncKit; + +/** + * Base constructor for all streams + * used to hold properties/methods + */ +function ReadableAsyncKit() +{ + ReadableAsyncKit.super_.apply(this, arguments); + + // list of active jobs + this.jobs = {}; + + // add stream methods + this.destroy = destroy; + this._start = _start; + this._read = _read; +} + +/** + * Destroys readable stream, + * by aborting outstanding jobs + * + * @returns {void} + */ +function destroy() +{ + if (this.destroyed) + { + return; + } + + this.destroyed = true; + + if (typeof this.terminator == 'function') + { + this.terminator(); + } +} + +/** + * Starts provided jobs in async manner + * + * @private + */ +function _start() +{ + // first argument – runner function + var runner = arguments[0] + // take away first argument + , args = Array.prototype.slice.call(arguments, 1) + // second argument - input data + , input = args[0] + // last argument - result callback + , endCb = streamify.callback.call(this, args[args.length - 1]) + ; + + args[args.length - 1] = endCb; + // third argument - iterator + args[1] = streamify.iterator.call(this, args[1]); + + // allow time for proper setup + defer(function() + { + if (!this.destroyed) + { + this.terminator = runner.apply(null, args); + } + else + { + endCb(null, Array.isArray(input) ? [] : {}); + } + }.bind(this)); +} + + +/** + * Implement _read to comply with Readable streams + * Doesn't really make sense for flowing object mode + * + * @private + */ +function _read() +{ + +} diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_parallel.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_parallel.js new file mode 100644 index 00000000000000..5d2929f7a67750 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_parallel.js @@ -0,0 +1,25 @@ +var parallel = require('../parallel.js'); + +// API +module.exports = ReadableParallel; + +/** + * Streaming wrapper to `asynckit.parallel` + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {stream.Readable#} + */ +function ReadableParallel(list, iterator, callback) +{ + if (!(this instanceof ReadableParallel)) + { + return new ReadableParallel(list, iterator, callback); + } + + // turn on object mode + ReadableParallel.super_.call(this, {objectMode: true}); + + this._start(parallel, list, iterator, callback); +} diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_serial.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_serial.js new file mode 100644 index 00000000000000..78226982041ce4 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_serial.js @@ -0,0 +1,25 @@ +var serial = require('../serial.js'); + +// API +module.exports = ReadableSerial; + +/** + * Streaming wrapper to `asynckit.serial` + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {stream.Readable#} + */ +function ReadableSerial(list, iterator, callback) +{ + if (!(this instanceof ReadableSerial)) + { + return new ReadableSerial(list, iterator, callback); + } + + // turn on object mode + ReadableSerial.super_.call(this, {objectMode: true}); + + this._start(serial, list, iterator, callback); +} diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_serial_ordered.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_serial_ordered.js new file mode 100644 index 00000000000000..3de89c47291b40 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/readable_serial_ordered.js @@ -0,0 +1,29 @@ +var serialOrdered = require('../serialOrdered.js'); + +// API +module.exports = ReadableSerialOrdered; +// expose sort helpers +module.exports.ascending = serialOrdered.ascending; +module.exports.descending = serialOrdered.descending; + +/** + * Streaming wrapper to `asynckit.serialOrdered` + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} sortMethod - custom sort function + * @param {function} callback - invoked when all elements processed + * @returns {stream.Readable#} + */ +function ReadableSerialOrdered(list, iterator, sortMethod, callback) +{ + if (!(this instanceof ReadableSerialOrdered)) + { + return new ReadableSerialOrdered(list, iterator, sortMethod, callback); + } + + // turn on object mode + ReadableSerialOrdered.super_.call(this, {objectMode: true}); + + this._start(serialOrdered, list, iterator, sortMethod, callback); +} diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/state.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/state.js new file mode 100644 index 00000000000000..cbea7ad8f6bc63 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/state.js @@ -0,0 +1,37 @@ +// API +module.exports = state; + +/** + * Creates initial state object + * for iteration over list + * + * @param {array|object} list - list to iterate over + * @param {function|null} sortMethod - function to use for keys sort, + * or `null` to keep them as is + * @returns {object} - initial state object + */ +function state(list, sortMethod) +{ + var isNamedList = !Array.isArray(list) + , initState = + { + index : 0, + keyedList: isNamedList || sortMethod ? Object.keys(list) : null, + jobs : {}, + results : isNamedList ? {} : [], + size : isNamedList ? Object.keys(list).length : list.length + } + ; + + if (sortMethod) + { + // sort array keys based on it's values + // sort object's keys just on own merit + initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) + { + return sortMethod(list[a], list[b]); + }); + } + + return initState; +} diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/streamify.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/streamify.js new file mode 100644 index 00000000000000..f56a1c92bf5c21 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/streamify.js @@ -0,0 +1,141 @@ +var async = require('./async.js'); + +// API +module.exports = { + iterator: wrapIterator, + callback: wrapCallback +}; + +/** + * Wraps iterators with long signature + * + * @this ReadableAsyncKit# + * @param {function} iterator - function to wrap + * @returns {function} - wrapped function + */ +function wrapIterator(iterator) +{ + var stream = this; + + return function(item, key, cb) + { + var aborter + , wrappedCb = async(wrapIteratorCallback.call(stream, cb, key)) + ; + + stream.jobs[key] = wrappedCb; + + // it's either shortcut (item, cb) + if (iterator.length == 2) + { + aborter = iterator(item, wrappedCb); + } + // or long format (item, key, cb) + else + { + aborter = iterator(item, key, wrappedCb); + } + + return aborter; + }; +} + +/** + * Wraps provided callback function + * allowing to execute snitch function before + * real callback + * + * @this ReadableAsyncKit# + * @param {function} callback - function to wrap + * @returns {function} - wrapped function + */ +function wrapCallback(callback) +{ + var stream = this; + + var wrapped = function(error, result) + { + return finisher.call(stream, error, result, callback); + }; + + return wrapped; +} + +/** + * Wraps provided iterator callback function + * makes sure snitch only called once, + * but passes secondary calls to the original callback + * + * @this ReadableAsyncKit# + * @param {function} callback - callback to wrap + * @param {number|string} key - iteration key + * @returns {function} wrapped callback + */ +function wrapIteratorCallback(callback, key) +{ + var stream = this; + + return function(error, output) + { + // don't repeat yourself + if (!(key in stream.jobs)) + { + callback(error, output); + return; + } + + // clean up jobs + delete stream.jobs[key]; + + return streamer.call(stream, error, {key: key, value: output}, callback); + }; +} + +/** + * Stream wrapper for iterator callback + * + * @this ReadableAsyncKit# + * @param {mixed} error - error response + * @param {mixed} output - iterator output + * @param {function} callback - callback that expects iterator results + */ +function streamer(error, output, callback) +{ + if (error && !this.error) + { + this.error = error; + this.pause(); + this.emit('error', error); + // send back value only, as expected + callback(error, output && output.value); + return; + } + + // stream stuff + this.push(output); + + // back to original track + // send back value only, as expected + callback(error, output && output.value); +} + +/** + * Stream wrapper for finishing callback + * + * @this ReadableAsyncKit# + * @param {mixed} error - error response + * @param {mixed} output - iterator output + * @param {function} callback - callback that expects final results + */ +function finisher(error, output, callback) +{ + // signal end of the stream + // only for successfully finished streams + if (!error) + { + this.push(null); + } + + // back to original track + callback(error, output); +} diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/terminator.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/terminator.js new file mode 100644 index 00000000000000..d6eb99219f3d9d --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/lib/terminator.js @@ -0,0 +1,29 @@ +var abort = require('./abort.js') + , async = require('./async.js') + ; + +// API +module.exports = terminator; + +/** + * Terminates jobs in the attached state context + * + * @this AsyncKitState# + * @param {function} callback - final callback to invoke after termination + */ +function terminator(callback) +{ + if (!Object.keys(this.jobs).length) + { + return; + } + + // fast forward iteration index + this.index = this.size; + + // abort jobs + abort(this); + + // send back results we have so far + async(callback)(null, this.results); +} diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/package.json b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/package.json new file mode 100644 index 00000000000000..ac7a956bf84863 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/package.json @@ -0,0 +1,126 @@ +{ + "_args": [ + [ + { + "raw": "asynckit@^0.4.0", + "scope": null, + "escapedName": "asynckit", + "name": "asynckit", + "rawSpec": "^0.4.0", + "spec": ">=0.4.0 <0.5.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/request/node_modules/form-data" + ] + ], + "_from": "asynckit@>=0.4.0 <0.5.0", + "_id": "asynckit@0.4.0", + "_inCache": true, + "_location": "/request/form-data/asynckit", + "_nodeVersion": "0.12.11", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/asynckit-0.4.0.tgz_1465928940169_0.8008207362145185" + }, + "_npmUser": { + "name": "alexindigo", + "email": "iam@alexindigo.com" + }, + "_npmVersion": "2.15.6", + "_phantomChildren": {}, + "_requested": { + "raw": "asynckit@^0.4.0", + "scope": null, + "escapedName": "asynckit", + "name": "asynckit", + "rawSpec": "^0.4.0", + "spec": ">=0.4.0 <0.5.0", + "type": "range" + }, + "_requiredBy": [ + "/request/form-data" + ], + "_resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "_shasum": "c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79", + "_shrinkwrap": null, + "_spec": "asynckit@^0.4.0", + "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/form-data", + "author": { + "name": "Alex Indigo", + "email": "iam@alexindigo.com" + }, + "bugs": { + "url": "https://github.com/alexindigo/asynckit/issues" + }, + "dependencies": {}, + "description": "Minimal async jobs utility library, with streams support", + "devDependencies": { + "browserify": "^13.0.0", + "browserify-istanbul": "^2.0.0", + "coveralls": "^2.11.9", + "eslint": "^2.9.0", + "istanbul": "^0.4.3", + "obake": "^0.1.2", + "phantomjs-prebuilt": "^2.1.7", + "pre-commit": "^1.1.3", + "reamde": "^1.1.0", + "rimraf": "^2.5.2", + "size-table": "^0.2.0", + "tap-spec": "^4.1.1", + "tape": "^4.5.1" + }, + "directories": {}, + "dist": { + "shasum": "c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79", + "tarball": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" + }, + "gitHead": "583a75ed4fe41761b66416bb6e703ebb1f8963bf", + "homepage": "https://github.com/alexindigo/asynckit#readme", + "keywords": [ + "async", + "jobs", + "parallel", + "serial", + "iterator", + "array", + "object", + "stream", + "destroy", + "terminate", + "abort" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "alexindigo", + "email": "iam@alexindigo.com" + } + ], + "name": "asynckit", + "optionalDependencies": {}, + "pre-commit": [ + "clean", + "lint", + "test", + "browser", + "report", + "size" + ], + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/alexindigo/asynckit.git" + }, + "scripts": { + "browser": "browserify -t browserify-istanbul test/lib/browserify_adjustment.js test/test-*.js | obake --coverage | tap-spec", + "clean": "rimraf coverage", + "debug": "tape test/test-*.js", + "lint": "eslint *.js lib/*.js test/*.js", + "report": "istanbul report", + "size": "browserify index.js | size-table asynckit", + "test": "istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec", + "win-test": "tape test/test-*.js" + }, + "version": "0.4.0" +} diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/parallel.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/parallel.js new file mode 100644 index 00000000000000..3c50344d8515f8 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/parallel.js @@ -0,0 +1,43 @@ +var iterate = require('./lib/iterate.js') + , initState = require('./lib/state.js') + , terminator = require('./lib/terminator.js') + ; + +// Public API +module.exports = parallel; + +/** + * Runs iterator over provided array elements in parallel + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function parallel(list, iterator, callback) +{ + var state = initState(list); + + while (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, function(error, result) + { + if (error) + { + callback(error, result); + return; + } + + // looks like it's the last one + if (Object.keys(state.jobs).length === 0) + { + callback(null, state.results); + return; + } + }); + + state.index++; + } + + return terminator.bind(state, callback); +} diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/serial.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/serial.js new file mode 100644 index 00000000000000..6cd949a6777137 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/serial.js @@ -0,0 +1,17 @@ +var serialOrdered = require('./serialOrdered.js'); + +// Public API +module.exports = serial; + +/** + * Runs iterator over provided array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serial(list, iterator, callback) +{ + return serialOrdered(list, iterator, null, callback); +} diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/serialOrdered.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/serialOrdered.js new file mode 100644 index 00000000000000..607eafea56cb06 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/serialOrdered.js @@ -0,0 +1,75 @@ +var iterate = require('./lib/iterate.js') + , initState = require('./lib/state.js') + , terminator = require('./lib/terminator.js') + ; + +// Public API +module.exports = serialOrdered; +// sorting helpers +module.exports.ascending = ascending; +module.exports.descending = descending; + +/** + * Runs iterator over provided sorted array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} sortMethod - custom sort function + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serialOrdered(list, iterator, sortMethod, callback) +{ + var state = initState(list, sortMethod); + + iterate(list, iterator, state, function iteratorHandler(error, result) + { + if (error) + { + callback(error, result); + return; + } + + state.index++; + + // are we there yet? + if (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, iteratorHandler); + return; + } + + // done here + callback(null, state.results); + }); + + return terminator.bind(state, callback); +} + +/* + * -- Sort methods + */ + +/** + * sort helper to sort array elements in ascending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function ascending(a, b) +{ + return a < b ? -1 : a > b ? 1 : 0; +} + +/** + * sort helper to sort array elements in descending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function descending(a, b) +{ + return -1 * ascending(a, b); +} diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/stream.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/stream.js new file mode 100644 index 00000000000000..7b77116ebab733 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/asynckit/stream.js @@ -0,0 +1,21 @@ +var inherits = require('util').inherits + , Readable = require('stream').Readable + , ReadableAsyncKit = require('./lib/readable_asynckit.js') + , ReadableParallel = require('./lib/readable_parallel.js') + , ReadableSerial = require('./lib/readable_serial.js') + , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js') + ; + +// API +module.exports = +{ + parallel : ReadableParallel, + serial : ReadableSerial, + serialOrdered : ReadableSerialOrdered, +}; + +inherits(ReadableAsyncKit, Readable); + +inherits(ReadableParallel, ReadableAsyncKit); +inherits(ReadableSerial, ReadableAsyncKit); +inherits(ReadableSerialOrdered, ReadableAsyncKit); diff --git a/deps/npm/node_modules/request/node_modules/form-data/package.json b/deps/npm/node_modules/request/node_modules/form-data/package.json index 5c4375edfe0207..a8b4839b7c7e69 100644 --- a/deps/npm/node_modules/request/node_modules/form-data/package.json +++ b/deps/npm/node_modules/request/node_modules/form-data/package.json @@ -2,49 +2,48 @@ "_args": [ [ { - "raw": "form-data@~1.0.0-rc4", + "raw": "form-data@~2.0.0", "scope": null, "escapedName": "form-data", "name": "form-data", - "rawSpec": "~1.0.0-rc4", - "spec": ">=1.0.0-rc4 <1.1.0", + "rawSpec": "~2.0.0", + "spec": ">=2.0.0 <2.1.0", "type": "range" }, "/Users/rebecca/code/npm/node_modules/request" ] ], - "_from": "form-data@>=1.0.0-rc4 <1.1.0", - "_id": "form-data@1.0.0-rc4", + "_from": "form-data@>=2.0.0 <2.1.0", + "_id": "form-data@2.0.0", "_inCache": true, - "_installable": true, "_location": "/request/form-data", - "_nodeVersion": "0.12.11", + "_nodeVersion": "4.5.0", "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/form-data-1.0.0-rc4.tgz_1458059747097_0.14101114077493548" + "tmp": "tmp/form-data-2.0.0.tgz_1474092617403_0.5404838663525879" }, "_npmUser": { "name": "alexindigo", "email": "iam@alexindigo.com" }, - "_npmVersion": "2.14.9", + "_npmVersion": "2.15.9", "_phantomChildren": {}, "_requested": { - "raw": "form-data@~1.0.0-rc4", + "raw": "form-data@~2.0.0", "scope": null, "escapedName": "form-data", "name": "form-data", - "rawSpec": "~1.0.0-rc4", - "spec": ">=1.0.0-rc4 <1.1.0", + "rawSpec": "~2.0.0", + "spec": ">=2.0.0 <2.1.0", "type": "range" }, "_requiredBy": [ "/request" ], - "_resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc4.tgz", - "_shasum": "05ac6bc22227b43e4461f488161554699d4f8b5e", + "_resolved": "https://registry.npmjs.org/form-data/-/form-data-2.0.0.tgz", + "_shasum": "6f0aebadcc5da16c13e1ecc11137d85f9b883b25", "_shrinkwrap": null, - "_spec": "form-data@~1.0.0-rc4", + "_spec": "form-data@~2.0.0", "_where": "/Users/rebecca/code/npm/node_modules/request", "author": { "name": "Felix Geisendörfer", @@ -56,60 +55,54 @@ "url": "https://github.com/form-data/form-data/issues" }, "dependencies": { - "async": "^1.5.2", + "asynckit": "^0.4.0", "combined-stream": "^1.0.5", - "mime-types": "^2.1.10" + "mime-types": "^2.1.11" }, "description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.", "devDependencies": { - "codacy-coverage": "^1.1.3", - "coveralls": "^2.11.8", - "cross-spawn": "^2.1.5", - "eslint": "^2.4.0", + "coveralls": "^2.11.13", + "cross-spawn": "^4.0.0", + "eslint": "^3.5.0", "fake": "^0.2.2", "far": "^0.0.7", "formidable": "^1.0.17", - "istanbul": "^0.4.2", - "pre-commit": "^1.1.2", - "request": "^2.69.0", - "rimraf": "^2.5.2" + "in-publish": "^2.0.0", + "is-node-modern": "^1.0.0", + "istanbul": "^0.4.5", + "pkgfiles": "^2.3.0", + "pre-commit": "^1.1.3", + "request": "^2.74.0", + "rimraf": "^2.5.4" }, "directories": {}, "dist": { - "shasum": "05ac6bc22227b43e4461f488161554699d4f8b5e", - "tarball": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc4.tgz" + "shasum": "6f0aebadcc5da16c13e1ecc11137d85f9b883b25", + "tarball": "https://registry.npmjs.org/form-data/-/form-data-2.0.0.tgz" }, "engines": { - "node": ">= 0.10" + "node": ">= 0.12" }, - "gitHead": "f73996e0508ee2d4b2b376276adfac1de4188ac2", + "gitHead": "652b16ff5b9077bdf65eb66b67286c823c2a1040", "homepage": "https://github.com/form-data/form-data#readme", "license": "MIT", "main": "./lib/form_data", "maintainers": [ - { - "name": "felixge", - "email": "felix@debuggable.com" - }, - { - "name": "idralyuk", - "email": "igor@buran.us" - }, { "name": "alexindigo", "email": "iam@alexindigo.com" }, { - "name": "mikeal", - "email": "mikeal.rogers@gmail.com" + "name": "dylanpiercey", + "email": "pierceydylan@gmail.com" }, { - "name": "celer", - "email": "dtyree77@gmail.com" + "name": "felixge", + "email": "felix@debuggable.com" }, { - "name": "dylanpiercey", - "email": "pierceydylan@gmail.com" + "name": "mikeal", + "email": "mikeal.rogers@gmail.com" } ], "name": "form-data", @@ -126,13 +119,19 @@ }, "scripts": { "check": "istanbul check-coverage coverage/coverage*.json", - "coverage": "codacy-coverage < ./coverage/lcov.info; true", + "ci-lint": "is-node-modern && npm run lint || is-node-not-modern", "debug": "verbose=1 ./test/run.js", - "lint": "eslint lib/*.js test/*.js test/**/*.js", - "posttest": "istanbul report", + "files": "pkgfiles --sort=name", + "get-version": "node -e \"console.log(require('./package.json').version)\"", + "lint": "eslint lib/*.js test/*.js test/integration/*.js", + "postpublish": "npm run restore-readme", + "posttest": "istanbul report lcov text", "predebug": "rimraf coverage test/tmp", + "prepublish": "in-publish && npm run update-readme || not-in-publish", "pretest": "rimraf coverage test/tmp", - "test": "istanbul cover --report none test/run.js" + "restore-readme": "mv README.md.bak README.md", + "test": "istanbul cover test/run.js", + "update-readme": "sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md" }, - "version": "1.0.0-rc4" + "version": "2.0.0" } diff --git a/deps/npm/node_modules/request/node_modules/form-data/wercker.yml b/deps/npm/node_modules/request/node_modules/form-data/wercker.yml deleted file mode 100644 index 6b118d1e31aa73..00000000000000 --- a/deps/npm/node_modules/request/node_modules/form-data/wercker.yml +++ /dev/null @@ -1,36 +0,0 @@ -# This references the default nodejs container from -# the Docker Hub: https://registry.hub.docker.com/_/node/ -# If you want Nodesource's container you would reference nodesource/node -# Read more about containers on our dev center -# http://devcenter.wercker.com/docs/containers/index.html -box: node -# This is the build pipeline. Pipelines are the core of wercker -# Read more about pipelines on our dev center -# http://devcenter.wercker.com/docs/pipelines/index.html - -# You can also use services such as databases. Read more on our dev center: -# http://devcenter.wercker.com/docs/services/index.html -# services: - # - postgres - # http://devcenter.wercker.com/docs/services/postgresql.html - - # - mongodb - # http://devcenter.wercker.com/docs/services/mongodb.html -build: - # The steps that will be executed on build - # Steps make up the actions in your pipeline - # Read more about steps on our dev center: - # http://devcenter.wercker.com/docs/steps/index.html - steps: - # A step that executes `npm install` command - - npm-install - # A step that executes `npm test` command - - npm-test - - # A custom script step, name value is used in the UI - # and the code value contains the command that get executed - - script: - name: echo nodejs information - code: | - echo "node version $(node -v) running" - echo "npm version $(npm -v) running" diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/index.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/index.js index f929bb75394944..779cfe20bf6009 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/index.js +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/index.js @@ -514,15 +514,23 @@ var compile = function(schema, cache, root, reporter, opts) { } if (node.minimum !== undefined) { + if (type !== 'number' && type !== 'integer') validate('if (%s) {', types.number(name)) + validate('if (%s %s %d) {', name, node.exclusiveMinimum ? '<=' : '<', node.minimum) error('is less than minimum') validate('}') + + if (type !== 'number' && type !== 'integer') validate('}') } if (node.maximum !== undefined) { + if (type !== 'number' && type !== 'integer') validate('if (%s) {', types.number(name)) + validate('if (%s %s %d) {', name, node.exclusiveMaximum ? '>=' : '>', node.maximum) error('is more than maximum') validate('}') + + if (type !== 'number' && type !== 'integer') validate('}') } if (properties) { @@ -540,6 +548,8 @@ var compile = function(schema, cache, root, reporter, opts) { var validate = genfun ('function validate(data) {') + // Since undefined is not a valid JSON value, we coerce to null and other checks will catch this + ('if (data === undefined) data = null') ('validate.errors = null') ('var errors = 0') diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/.travis.yml b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/.travis.yml index 9338bf147031df..7f56324f5c870d 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/.travis.yml +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/.travis.yml @@ -1,10 +1,7 @@ language: "node_js" node_js: - - 0.6 - - 0.8 - 0.10 - 0.11 - 0.12 - - iojs-v1.0 - - iojs-v2.0 - - iojs + - 4.0 + - node diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/LICENSE.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/LICENSE.md new file mode 100644 index 00000000000000..ce3647904d79b9 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2011-2015 Jan Lehnardt & Marc Bachmann + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/README.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/README.md index e096dfa5d62a77..bc7aa153dd863b 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/README.md +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/README.md @@ -3,17 +3,24 @@ This is an implementation of [JSON Pointer](http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-08). ## Usage +```javascript +var jsonpointer = require('jsonpointer'); +var obj = { foo: 1, bar: { baz: 2}, qux: [3, 4, 5]}; - var jsonpointer = require("jsonpointer"); - var obj = { foo: 1, bar: { baz: 2}, qux: [3, 4, 5]}; - var one = jsonpointer.get(obj, "/foo"); - var two = jsonpointer.get(obj, "/bar/baz"); - var three = jsonpointer.get(obj, "/qux/0"); - var four = jsonpointer.get(obj, "/qux/1"); - var five = jsonpointer.get(obj, "/qux/2"); - var notfound = jsonpointer.get(obj, "/quo"); // returns null +jsonpointer.get(obj, '/foo'); // returns 1 +jsonpointer.get(obj, '/bar/baz'); // returns 2 +jsonpointer.get(obj, '/qux/0'); // returns 3 +jsonpointer.get(obj, '/qux/1'); // returns 4 +jsonpointer.get(obj, '/qux/2'); // returns 5 +jsonpointer.get(obj, '/quo'); // returns null - jsonpointer.set(obj, "/foo", 6); // obj.foo = 6; +jsonpointer.set(obj, '/foo', 6); // sets obj.foo = 6; +jsonpointer.set(obj, '/qux/-', 6) // sets obj.qux = [3, 4, 5, 6] + +var pointer = jsonpointer.compile('/foo') +pointer.get(obj) // returns 1 +pointer.set(obj, 1) // sets obj.foo = 1 +``` ## Testing @@ -25,7 +32,7 @@ This is an implementation of [JSON Pointer](http://tools.ietf.org/html/draft-iet ## Author -(c) 2011 Jan Lehnardt +(c) 2011-2015 Jan Lehnardt & Marc Bachmann ## License diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/benchmark.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/benchmark.js new file mode 100644 index 00000000000000..8a95636deee0b9 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/benchmark.js @@ -0,0 +1,56 @@ +var jsonpointer = require('./') + +var i +var obj = { + a: 1, + b: { + c: 2 + }, + d: { + e: [{ a: 3 }, { b: 4 }, { c: 5 }] + } +} + +// Get +console.time('get first level property') +for (i = 0; i < 1e6; i++) { + jsonpointer.get(obj, '/a') +} +console.timeEnd('get first level property') + +console.time('get second level property') +for (i = 0; i < 1e6; i++) { + jsonpointer.get(obj, '/d/e') +} +console.timeEnd('get second level property') + +console.time('get third level property') +for (i = 0; i < 1e6; i++) { + jsonpointer.get(obj, '/d/e/0') +} +console.timeEnd('get third level property') + +// Set +console.time('set first level property') +for (i = 0; i < 1e6; i++) { + jsonpointer.set(obj, '/a', 'bla') +} +console.timeEnd('set first level property') + +console.time('set second level property') +for (i = 0; i < 1e6; i++) { + jsonpointer.set(obj, '/d/e', 'bla') +} +console.timeEnd('set second level property') + +console.time('set third level property') +for (i = 0; i < 1e6; i++) { + jsonpointer.set(obj, '/d/e/0', 'bla') +} +console.timeEnd('set third level property') + +console.time('push property into array') +for (i = 0; i < 1e6; i++) { + jsonpointer.set(obj, '/d/e/-', 'bla') +} +console.timeEnd('push property into array') diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/jsonpointer.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/jsonpointer.js index 006f85ef3a5489..7cfaec0fbda968 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/jsonpointer.js +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/jsonpointer.js @@ -1,76 +1,93 @@ -var untilde = function(str) { - return str.replace(/~./g, function(m) { - switch (m) { - case "~0": - return "~"; - case "~1": - return "/"; - } - throw new Error("Invalid tilde escape: " + m); - }); +var hasExcape = /~/ +var escapeMatcher = /~[01]/g +function escapeReplacer (m) { + switch (m) { + case '~1': return '/' + case '~0': return '~' + } + throw new Error('Invalid tilde escape: ' + m) } -var traverse = function(obj, pointer, value) { - // assert(isArray(pointer)) - var part = untilde(pointer.shift()); - if(!obj.hasOwnProperty(part)) { - return null; - } - if(pointer.length !== 0) { // keep traversin! - return traverse(obj[part], pointer, value); - } - // we're done - if(typeof value === "undefined") { - // just reading - return obj[part]; - } - // set new value, return old value - var old_value = obj[part]; - if(value === null) { - delete obj[part]; - } else { - obj[part] = value; - } - return old_value; +function untilde (str) { + if (!hasExcape.test(str)) return str + return str.replace(escapeMatcher, escapeReplacer) } -var validate_input = function(obj, pointer) { - if(typeof obj !== "object") { - throw new Error("Invalid input object."); - } +function setter (obj, pointer, value) { + var part + var hasNextPart - if(pointer === "") { - return []; - } + for (var p = 1, len = pointer.length; p < len;) { + part = untilde(pointer[p++]) + hasNextPart = len > p + + if (typeof obj[part] === 'undefined') { + // support setting of /- + if (Array.isArray(obj) && part === '-') { + part = obj.length + } - if(!pointer) { - throw new Error("Invalid JSON pointer."); + // support nested objects/array when setting values + if (hasNextPart) { + if ((pointer[p] !== '' && pointer[p] < Infinity) || pointer[p] === '-') obj[part] = [] + else obj[part] = {} + } + } + + if (!hasNextPart) break + obj = obj[part] } - pointer = pointer.split("/"); - var first = pointer.shift(); - if (first !== "") { - throw new Error("Invalid JSON pointer."); + var oldValue = obj[part] + if (value === undefined) delete obj[part] + else obj[part] = value + return oldValue +} + +function compilePointer (pointer) { + if (typeof pointer === 'string') { + pointer = pointer.split('/') + if (pointer[0] === '') return pointer + throw new Error('Invalid JSON pointer.') + } else if (Array.isArray(pointer)) { + return pointer } - return pointer; + throw new Error('Invalid JSON pointer.') } -var get = function(obj, pointer) { - pointer = validate_input(obj, pointer); - if (pointer.length === 0) { - return obj; +function get (obj, pointer) { + if (typeof obj !== 'object') throw new Error('Invalid input object.') + pointer = compilePointer(pointer) + var len = pointer.length + if (len === 1) return obj + + for (var p = 1; p < len;) { + obj = obj[untilde(pointer[p++])] + if (len === p) return obj + if (typeof obj !== 'object') return undefined } - return traverse(obj, pointer); } -var set = function(obj, pointer, value) { - pointer = validate_input(obj, pointer); - if (pointer.length === 0) { - throw new Error("Invalid JSON pointer for set.") +function set (obj, pointer, value) { + if (typeof obj !== 'object') throw new Error('Invalid input object.') + pointer = compilePointer(pointer) + if (pointer.length === 0) throw new Error('Invalid JSON pointer for set.') + return setter(obj, pointer, value) +} + +function compile (pointer) { + var compiled = compilePointer(pointer) + return { + get: function (object) { + return get(object, compiled) + }, + set: function (object, value) { + return set(object, compiled, value) + } } - return traverse(obj, pointer, value); } exports.get = get exports.set = set +exports.compile = compile diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json index c90dcced7caae7..b2fe8c6ee36903 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json @@ -2,45 +2,48 @@ "_args": [ [ { - "raw": "jsonpointer@2.0.0", + "raw": "jsonpointer@^4.0.0", "scope": null, "escapedName": "jsonpointer", "name": "jsonpointer", - "rawSpec": "2.0.0", - "spec": "2.0.0", - "type": "version" + "rawSpec": "^4.0.0", + "spec": ">=4.0.0 <5.0.0", + "type": "range" }, "/Users/rebecca/code/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid" ] ], - "_from": "jsonpointer@2.0.0", - "_id": "jsonpointer@2.0.0", + "_from": "jsonpointer@>=4.0.0 <5.0.0", + "_id": "jsonpointer@4.0.0", "_inCache": true, - "_installable": true, "_location": "/request/har-validator/is-my-json-valid/jsonpointer", - "_nodeVersion": "0.10.36", + "_nodeVersion": "6.1.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/jsonpointer-4.0.0.tgz_1463651460494_0.02921536797657609" + }, "_npmUser": { "name": "marcbachmann", "email": "marc.brookman@gmail.com" }, - "_npmVersion": "2.10.1", + "_npmVersion": "3.8.6", "_phantomChildren": {}, "_requested": { - "raw": "jsonpointer@2.0.0", + "raw": "jsonpointer@^4.0.0", "scope": null, "escapedName": "jsonpointer", "name": "jsonpointer", - "rawSpec": "2.0.0", - "spec": "2.0.0", - "type": "version" + "rawSpec": "^4.0.0", + "spec": ">=4.0.0 <5.0.0", + "type": "range" }, "_requiredBy": [ "/request/har-validator/is-my-json-valid" ], - "_resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz", - "_shasum": "3af1dd20fe85463910d469a385e33017d2a030d9", + "_resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.0.tgz", + "_shasum": "6661e161d2fc445f19f98430231343722e1fcbd5", "_shrinkwrap": null, - "_spec": "jsonpointer@2.0.0", + "_spec": "jsonpointer@^4.0.0", "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid", "author": { "name": "Jan Lehnardt", @@ -53,20 +56,26 @@ { "name": "Joe Hildebrand", "email": "joe-github@cursive.net" + }, + { + "name": "Marc Bachmann", + "email": "marc.brookman@gmail.com" } ], "dependencies": {}, "description": "Simple JSON Addressing.", - "devDependencies": {}, + "devDependencies": { + "standard": "^5.3.1" + }, "directories": {}, "dist": { - "shasum": "3af1dd20fe85463910d469a385e33017d2a030d9", - "tarball": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz" + "shasum": "6661e161d2fc445f19f98430231343722e1fcbd5", + "tarball": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.0.tgz" }, "engines": { - "node": ">=0.6.0" + "node": ">=0.10.0" }, - "gitHead": "26ea4a5c0fcb6d9a2e87f733403791dd05637af8", + "gitHead": "2d46030ba6df41b566934c7202e31fb65058de71", "homepage": "https://github.com/janl/node-jsonpointer#readme", "license": "MIT", "main": "./jsonpointer", @@ -88,7 +97,7 @@ "url": "git+ssh://git@github.com/janl/node-jsonpointer.git" }, "scripts": { - "test": "node test.js" + "test": "standard && node test.js" }, "tags": [ "util", @@ -96,5 +105,5 @@ "util", "utility" ], - "version": "2.0.0" + "version": "4.0.0" } diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/test.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/test.js index 1c67d7f7efc898..e3d99630f0a903 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/test.js +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/test.js @@ -1,5 +1,5 @@ -var assert = require("assert"); -var jsonpointer = require("./jsonpointer"); +var assert = require('assert') +var jsonpointer = require('./jsonpointer') var obj = { a: 1, @@ -7,92 +7,125 @@ var obj = { c: 2 }, d: { - e: [{a:3}, {b:4}, {c:5}] + e: [{ a: 3 }, { b: 4 }, { c: 5 }] } -}; +} -assert.equal(jsonpointer.get(obj, "/a"), 1); -assert.equal(jsonpointer.get(obj, "/b/c"), 2); -assert.equal(jsonpointer.get(obj, "/d/e/0/a"), 3); -assert.equal(jsonpointer.get(obj, "/d/e/1/b"), 4); -assert.equal(jsonpointer.get(obj, "/d/e/2/c"), 5); +assert.equal(jsonpointer.get(obj, '/a'), 1) +assert.equal(jsonpointer.get(obj, '/b/c'), 2) +assert.equal(jsonpointer.get(obj, '/d/e/0/a'), 3) +assert.equal(jsonpointer.get(obj, '/d/e/1/b'), 4) +assert.equal(jsonpointer.get(obj, '/d/e/2/c'), 5) // set returns old value -assert.equal(jsonpointer.set(obj, "/a", 2), 1); -assert.equal(jsonpointer.set(obj, "/b/c", 3), 2); -assert.equal(jsonpointer.set(obj, "/d/e/0/a", 4), 3); -assert.equal(jsonpointer.set(obj, "/d/e/1/b", 5), 4); -assert.equal(jsonpointer.set(obj, "/d/e/2/c", 6), 5); - -assert.equal(jsonpointer.get(obj, "/a"), 2); -assert.equal(jsonpointer.get(obj, "/b/c"), 3); -assert.equal(jsonpointer.get(obj, "/d/e/0/a"), 4); -assert.equal(jsonpointer.get(obj, "/d/e/1/b"), 5); -assert.equal(jsonpointer.get(obj, "/d/e/2/c"), 6); - -assert.equal(jsonpointer.get(obj, ""), obj); -assert.throws(function(){ jsonpointer.get(obj, "a"); }, validateError); -assert.throws(function(){ jsonpointer.get(obj, "a/"); }, validateError); - -function validateError(err) { - if ( (err instanceof Error) && /Invalid JSON pointer/.test(err.message) ) { - return true; +assert.equal(jsonpointer.set(obj, '/a', 2), 1) +assert.equal(jsonpointer.set(obj, '/b/c', 3), 2) +assert.equal(jsonpointer.set(obj, '/d/e/0/a', 4), 3) +assert.equal(jsonpointer.set(obj, '/d/e/1/b', 5), 4) +assert.equal(jsonpointer.set(obj, '/d/e/2/c', 6), 5) + +// set nested properties +assert.equal(jsonpointer.set(obj, '/f/g/h/i', 6), undefined) +assert.equal(jsonpointer.get(obj, '/f/g/h/i'), 6) + +// set an array +assert.equal(jsonpointer.set(obj, '/f/g/h/foo/-', 'test'), undefined) +var arr = jsonpointer.get(obj, '/f/g/h/foo') +assert(Array.isArray(arr), 'set /- creates an array.') +assert.equal(arr[0], 'test') + +assert.equal(jsonpointer.get(obj, '/a'), 2) +assert.equal(jsonpointer.get(obj, '/b/c'), 3) +assert.equal(jsonpointer.get(obj, '/d/e/0/a'), 4) +assert.equal(jsonpointer.get(obj, '/d/e/1/b'), 5) +assert.equal(jsonpointer.get(obj, '/d/e/2/c'), 6) + +// can set `null` as a value +assert.equal(jsonpointer.set(obj, '/f/g/h/foo/0', null), 'test') +assert.strictEqual(jsonpointer.get(obj, '/f/g/h/foo/0'), null) +assert.equal(jsonpointer.set(obj, '/b/c', null), 3) +assert.strictEqual(jsonpointer.get(obj, '/b/c'), null) + +assert.equal(jsonpointer.get(obj, ''), obj) +assert.throws(function () { jsonpointer.get(obj, 'a') }, validateError) +assert.throws(function () { jsonpointer.get(obj, 'a/') }, validateError) + +// can unset values with `undefined` +jsonpointer.set(obj, '/a', undefined) +assert.strictEqual(jsonpointer.get(obj, '/a'), undefined) +jsonpointer.set(obj, '/d/e/1', undefined) +assert.strictEqual(jsonpointer.get(obj, '/d/e/1'), undefined) + +// returns `undefined` when path extends beyond any existing objects +assert.strictEqual(jsonpointer.get(obj, '/x/y/z'), undefined) + +function validateError (err) { + if ((err instanceof Error) && /Invalid JSON pointer/.test(err.message)) { + return true } } var complexKeys = { - "a/b": { + 'a/b': { c: 1 }, d: { - "e/f": 2 + 'e/f': 2 }, - "~1": 3, - "01": 4 + '~1': 3, + '01': 4 } -assert.equal(jsonpointer.get(complexKeys, "/a~1b/c"), 1); -assert.equal(jsonpointer.get(complexKeys, "/d/e~1f"), 2); -assert.equal(jsonpointer.get(complexKeys, "/~01"), 3); -assert.equal(jsonpointer.get(complexKeys, "/01"), 4); -assert.equal(jsonpointer.get(complexKeys, "/a/b/c"), null); -assert.equal(jsonpointer.get(complexKeys, "/~1"), null); +assert.equal(jsonpointer.get(complexKeys, '/a~1b/c'), 1) +assert.equal(jsonpointer.get(complexKeys, '/d/e~1f'), 2) +assert.equal(jsonpointer.get(complexKeys, '/~01'), 3) +assert.equal(jsonpointer.get(complexKeys, '/01'), 4) +assert.equal(jsonpointer.get(complexKeys, '/a/b/c'), null) +assert.equal(jsonpointer.get(complexKeys, '/~1'), null) // draft-ietf-appsawg-json-pointer-08 has special array rules -var ary = [ "zero", "one", "two" ]; -assert.equal(jsonpointer.get(ary, "/01"), null); +var ary = [ 'zero', 'one', 'two' ] +assert.equal(jsonpointer.get(ary, '/01'), null) -//assert.equal(jsonpointer.set(ary, "/-", "three"), null); -//assert.equal(ary[3], "three"); +assert.equal(jsonpointer.set(ary, '/-', 'three'), null) +assert.equal(ary[3], 'three') // Examples from the draft: var example = { - "foo": ["bar", "baz"], - "": 0, - "a/b": 1, - "c%d": 2, - "e^f": 3, - "g|h": 4, - "i\\j": 5, - "k\"l": 6, - " ": 7, - "m~n": 8 -}; - -assert.equal(jsonpointer.get(example, ""), example); -var ans = jsonpointer.get(example, "/foo"); -assert.equal(ans.length, 2); -assert.equal(ans[0], "bar"); -assert.equal(ans[1], "baz"); -assert.equal(jsonpointer.get(example, "/foo/0"), "bar"); -assert.equal(jsonpointer.get(example, "/"), 0); -assert.equal(jsonpointer.get(example, "/a~1b"), 1); -assert.equal(jsonpointer.get(example, "/c%d"), 2); -assert.equal(jsonpointer.get(example, "/e^f"), 3); -assert.equal(jsonpointer.get(example, "/g|h"), 4); -assert.equal(jsonpointer.get(example, "/i\\j"), 5); -assert.equal(jsonpointer.get(example, "/k\"l"), 6); -assert.equal(jsonpointer.get(example, "/ "), 7); -assert.equal(jsonpointer.get(example, "/m~0n"), 8); - -console.log("All tests pass."); + 'foo': ['bar', 'baz'], + '': 0, + 'a/b': 1, + 'c%d': 2, + 'e^f': 3, + 'g|h': 4, + 'i\\j': 5, + 'k\'l': 6, + ' ': 7, + 'm~n': 8 +} + +assert.equal(jsonpointer.get(example, ''), example) +var ans = jsonpointer.get(example, '/foo') +assert.equal(ans.length, 2) +assert.equal(ans[0], 'bar') +assert.equal(ans[1], 'baz') +assert.equal(jsonpointer.get(example, '/foo/0'), 'bar') +assert.equal(jsonpointer.get(example, '/'), 0) +assert.equal(jsonpointer.get(example, '/a~1b'), 1) +assert.equal(jsonpointer.get(example, '/c%d'), 2) +assert.equal(jsonpointer.get(example, '/e^f'), 3) +assert.equal(jsonpointer.get(example, '/g|h'), 4) +assert.equal(jsonpointer.get(example, '/i\\j'), 5) +assert.equal(jsonpointer.get(example, '/k\'l'), 6) +assert.equal(jsonpointer.get(example, '/ '), 7) +assert.equal(jsonpointer.get(example, '/m~0n'), 8) + +// jsonpointer.compile(path) +var a = {foo: 'bar'} +var pointer = jsonpointer.compile('/foo') +assert.equal(pointer.get(a), 'bar') +assert.equal(pointer.set(a, 'test'), 'bar') +assert.equal(pointer.get(a), 'test') +assert.deepEqual(a, {foo: 'test'}) + +console.log('All tests pass.') diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json index aedffd1037d5fc..a38d59e52afa2b 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json @@ -14,20 +14,19 @@ ] ], "_from": "is-my-json-valid@>=2.12.4 <3.0.0", - "_id": "is-my-json-valid@2.13.1", + "_id": "is-my-json-valid@2.15.0", "_inCache": true, - "_installable": true, "_location": "/request/har-validator/is-my-json-valid", - "_nodeVersion": "4.2.3", + "_nodeVersion": "4.2.6", "_npmOperationalInternal": { - "host": "packages-5-east.internal.npmjs.com", - "tmp": "tmp/is-my-json-valid-2.13.1.tgz_1456180270224_0.17748022079467773" + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/is-my-json-valid-2.15.0.tgz_1475420473174_0.8758093405049294" }, "_npmUser": { "name": "mafintosh", "email": "mathiasbuus@gmail.com" }, - "_npmVersion": "2.14.7", + "_npmVersion": "2.14.12", "_phantomChildren": {}, "_requested": { "raw": "is-my-json-valid@^2.12.4", @@ -41,8 +40,8 @@ "_requiredBy": [ "/request/har-validator" ], - "_resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.13.1.tgz", - "_shasum": "d55778a82feb6b0963ff4be111d5d1684e890707", + "_resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz", + "_shasum": "936edda3ca3c211fd98f3b2d3e08da43f7b2915b", "_shrinkwrap": null, "_spec": "is-my-json-valid@^2.12.4", "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/har-validator", @@ -55,7 +54,7 @@ "dependencies": { "generate-function": "^2.0.0", "generate-object-property": "^1.1.0", - "jsonpointer": "2.0.0", + "jsonpointer": "^4.0.0", "xtend": "^4.0.0" }, "description": "A JSONSchema validator that uses code generation to be extremely fast", @@ -64,10 +63,10 @@ }, "directories": {}, "dist": { - "shasum": "d55778a82feb6b0963ff4be111d5d1684e890707", - "tarball": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.13.1.tgz" + "shasum": "936edda3ca3c211fd98f3b2d3e08da43f7b2915b", + "tarball": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz" }, - "gitHead": "5bacc71441750bc6e79829abcfc21d4f2f0c4396", + "gitHead": "c4da71bf1e57083d2dac6e7d123d2e8bd6b9255e", "homepage": "https://github.com/mafintosh/is-my-json-valid", "keywords": [ "json", @@ -78,6 +77,14 @@ "license": "MIT", "main": "index.js", "maintainers": [ + { + "name": "emilbay", + "email": "github@tixz.dk" + }, + { + "name": "emilbayes", + "email": "github@tixz.dk" + }, { "name": "freeall", "email": "freeall@gmail.com" @@ -105,5 +112,5 @@ "scripts": { "test": "tape test/*.js" }, - "version": "2.13.1" + "version": "2.15.0" } diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/misc.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/misc.js index 275f2ac72f3877..4ea36d51b0c736 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/misc.js +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/misc.js @@ -20,6 +20,14 @@ tape('simple', function(t) { t.end() }) +tape('data is undefined', function (t) { + var validate = validator({type: 'string'}) + + t.notOk(validate(null)) + t.notOk(validate(undefined)) + t.end() +}) + tape('advanced', function(t) { var validate = validator(cosmic.schema) @@ -194,6 +202,22 @@ tape('exclusiveMinimum/exclusiveMaximum', function(t) { t.end() }) +tape('minimum/maximum number type', function(t) { + var validate = validator({ + type: ['integer', 'null'], + minimum: 1, + maximum: 100 + }) + + t.notOk(validate(-1)) + t.notOk(validate(0)) + t.ok(validate(null)) + t.ok(validate(1)) + t.ok(validate(100)) + t.notOk(validate(101)) + t.end() +}) + tape('custom format', function(t) { var validate = validator({ type: 'object', diff --git a/deps/npm/node_modules/request/node_modules/hawk/.npmignore b/deps/npm/node_modules/request/node_modules/hawk/.npmignore index 70febc05e4f360..ab108bf92f34a7 100644 --- a/deps/npm/node_modules/request/node_modules/hawk/.npmignore +++ b/deps/npm/node_modules/request/node_modules/hawk/.npmignore @@ -17,4 +17,3 @@ config.json */*/._* coverage.* lib-cov - diff --git a/deps/npm/node_modules/request/node_modules/hawk/.travis.yml b/deps/npm/node_modules/request/node_modules/hawk/.travis.yml index 047f7e3d5e1e39..77795c6a9b47df 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/.travis.yml +++ b/deps/npm/node_modules/request/node_modules/hawk/.travis.yml @@ -2,4 +2,3 @@ language: node_js node_js: - 0.10 - diff --git a/deps/npm/node_modules/request/node_modules/hawk/README.md b/deps/npm/node_modules/request/node_modules/hawk/README.md index 4aff23f3a3f7c5..63725034fc5e72 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/README.md +++ b/deps/npm/node_modules/request/node_modules/hawk/README.md @@ -75,12 +75,12 @@ and the server. ## Replay Protection -Without replay protection, an attacker can use a compromised (but otherwise valid and authenticated) request more -than once, gaining access to a protected resource. To mitigate this, clients include both a nonce and a timestamp when +Without replay protection, an attacker can use a compromised (but otherwise valid and authenticated) request more +than once, gaining access to a protected resource. To mitigate this, clients include both a nonce and a timestamp when making requests. This gives the server enough information to prevent replay attacks. The nonce is generated by the client, and is a string unique across all requests with the same timestamp and -key identifier combination. +key identifier combination. The timestamp enables the server to restrict the validity period of the credentials where requests occuring afterwards are rejected. It also removes the need for the server to retain an unbounded number of nonce values for future checks. @@ -373,7 +373,7 @@ and for a finite period of time. Both the client and server can issue bewit cred credentials as the client to maintain clear traceability as to who issued which credentials. In order to simplify implementation, bewit credentials do not support single-use policy and can be replayed multiple times within -the granted access timeframe. +the granted access timeframe. ## Bewit Usage Example @@ -496,7 +496,7 @@ which can often affect how the request body is interpreted by the server. If the or value of such headers, an attacker can manipulate the request headers without being detected. Implementers should use the `ext` feature to pass application-specific information via the `Authorization` header which is protected by the request MAC. -The response authentication, when performed, only covers the response payload, content-type, and the request information +The response authentication, when performed, only covers the response payload, content-type, and the request information provided by the client in it's request (method, resource, timestamp, nonce, etc.). It does not cover the HTTP status code or any other response header field (e.g. Location) which can affect the client's behaviour. diff --git a/deps/npm/node_modules/request/node_modules/hawk/example/usage.js b/deps/npm/node_modules/request/node_modules/hawk/example/usage.js index 13b860b4c5ad8a..64fe17674a5753 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/example/usage.js +++ b/deps/npm/node_modules/request/node_modules/hawk/example/usage.js @@ -75,4 +75,3 @@ credentialsFunc('dh37fgj492je', function (err, credentials) { process.exit(0); }); }); - diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/client.js b/deps/npm/node_modules/request/node_modules/hawk/lib/client.js index b3e8649e3a6215..f9ae69171343bd 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/lib/client.js +++ b/deps/npm/node_modules/request/node_modules/hawk/lib/client.js @@ -364,6 +364,3 @@ exports.message = function (host, port, message, options) { return result; }; - - - diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/index.js b/deps/npm/node_modules/request/node_modules/hawk/lib/index.js index a883882c8c538c..911b906aabdaed 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/lib/index.js +++ b/deps/npm/node_modules/request/node_modules/hawk/lib/index.js @@ -12,4 +12,3 @@ exports.uri = { authenticate: exports.server.authenticateBewit, getBewit: exports.client.getBewit }; - diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/utils.js b/deps/npm/node_modules/request/node_modules/hawk/lib/utils.js index 28a35118ff8c00..2da3343904aeab 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/lib/utils.js +++ b/deps/npm/node_modules/request/node_modules/hawk/lib/utils.js @@ -181,4 +181,3 @@ exports.unauthorized = function (message, attributes) { return Boom.unauthorized(message, 'Hawk', attributes); }; - diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore index 77ba16cb055ca5..b0939eabe34d2d 100644 --- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore +++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore @@ -15,4 +15,3 @@ config.json */*/._* coverage.* lib-cov - diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml index dd1b24f13ac1f8..7a64dd2210cb10 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml +++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml @@ -5,4 +5,3 @@ node_js: - 4.0 sudo: false - diff --git a/deps/npm/node_modules/request/node_modules/hawk/test/readme.js b/deps/npm/node_modules/request/node_modules/hawk/test/readme.js index a466264667ee64..7a343f5e219c61 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/test/readme.js +++ b/deps/npm/node_modules/request/node_modules/hawk/test/readme.js @@ -92,4 +92,3 @@ describe('README', function () { }); }); }); - diff --git a/deps/npm/node_modules/request/node_modules/hawk/test/server.js b/deps/npm/node_modules/request/node_modules/hawk/test/server.js index 1d3405a9ecc11e..0fdf13d435913e 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/test/server.js +++ b/deps/npm/node_modules/request/node_modules/hawk/test/server.js @@ -1326,4 +1326,3 @@ describe('Server', function () { }); }); }); - diff --git a/deps/npm/node_modules/request/node_modules/hawk/test/uri.js b/deps/npm/node_modules/request/node_modules/hawk/test/uri.js index f3c6ba2d629a65..3dc8e6a1c51042 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/test/uri.js +++ b/deps/npm/node_modules/request/node_modules/hawk/test/uri.js @@ -835,4 +835,3 @@ describe('Uri', function () { }); }); }); - diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/CHANGES.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/CHANGES.md index ab3a66417a6fa6..3e152ab804377d 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/CHANGES.md +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/CHANGES.md @@ -4,6 +4,10 @@ None yet. +## v1.3.1 (2016-09-12) + +* #13 Incompatible with webpack + ## v1.3.0 (2016-06-22) * #14 add safer version of hasOwnProperty() diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/README.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/README.md index 4de0124476e98c..78b81d39683251 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/README.md +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/README.md @@ -1,5 +1,5 @@ JSON Schema is a repository for the JSON Schema specification, reference schemas and a CommonJS implementation of JSON Schema (not the only JavaScript implementation of JSON Schema, JSV is another excellent JavaScript validator). -Code is licensed under the AFL or BSD license as part of the Persevere +Code is licensed under the AFL or BSD license as part of the Persevere project which is administered under the Dojo foundation, and all contributions require a Dojo CLA. \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/hyper-schema b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/hyper-schema index de80b918b671c7..36a85ccd244926 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/hyper-schema +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/hyper-schema @@ -8,61 +8,61 @@ "items" : {"$ref" : "http://json-schema.org/draft-00/links#"}, "optional" : true }, - + "fragmentResolution" : { "type" : "string", "optional" : true, "default" : "dot-delimited" }, - + "root" : { "type" : "boolean", "optional" : true, "default" : false }, - + "readonly" : { "type" : "boolean", "optional" : true, "default" : false }, - + "pathStart" : { "type" : "string", "optional" : true, "format" : "uri" }, - + "mediaType" : { "type" : "string", "optional" : true, "format" : "media-type" }, - + "alternate" : { "type" : "array", "items" : {"$ref" : "#"}, "optional" : true } }, - + "links" : [ { "href" : "{$ref}", "rel" : "full" }, - + { "href" : "{$schema}", "rel" : "describedby" }, - + { "href" : "{id}", "rel" : "self" } ], - + "fragmentResolution" : "dot-delimited", "extends" : {"$ref" : "http://json-schema.org/draft-00/schema#"} } \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/json-ref b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/json-ref index 3a872a71c973dc..5d1f76b6a694a4 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/json-ref +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/json-ref @@ -1,26 +1,26 @@ { "$schema" : "http://json-schema.org/draft-00/hyper-schema#", "id" : "http://json-schema.org/draft-00/json-ref#", - + "items" : {"$ref" : "#"}, "additionalProperties" : {"$ref" : "#"}, - + "links" : [ { "href" : "{$ref}", "rel" : "full" }, - + { "href" : "{$schema}", "rel" : "describedby" }, - + { "href" : "{id}", "rel" : "self" } ], - + "fragmentResolution" : "dot-delimited" } \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/links b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/links index 8a5e7807250cf9..cbef326dd3de5b 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/links +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/links @@ -2,28 +2,28 @@ "$schema" : "http://json-schema.org/draft-00/hyper-schema#", "id" : "http://json-schema.org/draft-00/links#", "type" : "object", - + "properties" : { "href" : { "type" : "string" }, - + "rel" : { "type" : "string" }, - + "method" : { "type" : "string", "default" : "GET", "optional" : true }, - + "enctype" : { "type" : "string", "requires" : "method", "optional" : true }, - + "properties" : { "type" : "object", "additionalProperties" : {"$ref" : "http://json-schema.org/draft-00/hyper-schema#"}, diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/schema b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/schema index 9aa2fbc57a4054..d452b023ee484a 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/schema +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/schema @@ -2,7 +2,7 @@ "$schema" : "http://json-schema.org/draft-00/hyper-schema#", "id" : "http://json-schema.org/draft-00/schema#", "type" : "object", - + "properties" : { "type" : { "type" : ["string", "array"], @@ -12,136 +12,136 @@ "optional" : true, "default" : "any" }, - + "properties" : { "type" : "object", "additionalProperties" : {"$ref" : "#"}, "optional" : true, "default" : {} }, - + "items" : { "type" : [{"$ref" : "#"}, "array"], "items" : {"$ref" : "#"}, "optional" : true, "default" : {} }, - + "optional" : { "type" : "boolean", "optional" : true, "default" : false }, - + "additionalProperties" : { "type" : [{"$ref" : "#"}, "boolean"], "optional" : true, "default" : {} }, - + "requires" : { "type" : ["string", {"$ref" : "#"}], "optional" : true }, - + "minimum" : { "type" : "number", "optional" : true }, - + "maximum" : { "type" : "number", "optional" : true }, - + "minimumCanEqual" : { "type" : "boolean", "optional" : true, "requires" : "minimum", "default" : true }, - + "maximumCanEqual" : { "type" : "boolean", "optional" : true, "requires" : "maximum", "default" : true }, - + "minItems" : { "type" : "integer", "optional" : true, "minimum" : 0, "default" : 0 }, - + "maxItems" : { "type" : "integer", "optional" : true, "minimum" : 0 }, - + "pattern" : { "type" : "string", "optional" : true, "format" : "regex" }, - + "minLength" : { "type" : "integer", "optional" : true, "minimum" : 0, "default" : 0 }, - + "maxLength" : { "type" : "integer", "optional" : true }, - + "enum" : { "type" : "array", "optional" : true, "minItems" : 1 }, - + "title" : { "type" : "string", "optional" : true }, - + "description" : { "type" : "string", "optional" : true }, - + "format" : { "type" : "string", "optional" : true }, - + "contentEncoding" : { "type" : "string", "optional" : true }, - + "default" : { "type" : "any", "optional" : true }, - + "maxDecimal" : { "type" : "integer", "optional" : true, "minimum" : 0 }, - + "disallow" : { "type" : ["string", "array"], "items" : {"type" : "string"}, "optional" : true }, - + "extends" : { "type" : [{"$ref" : "#"}, "array"], "items" : {"$ref" : "#"}, @@ -149,7 +149,7 @@ "default" : {} } }, - + "optional" : true, "default" : {} } \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/hyper-schema b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/hyper-schema index 3f6c6cc2c012df..b0fb5e157ef9bd 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/hyper-schema +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/hyper-schema @@ -8,61 +8,61 @@ "items" : {"$ref" : "http://json-schema.org/draft-01/links#"}, "optional" : true }, - + "fragmentResolution" : { "type" : "string", "optional" : true, "default" : "dot-delimited" }, - + "root" : { "type" : "boolean", "optional" : true, "default" : false }, - + "readonly" : { "type" : "boolean", "optional" : true, "default" : false }, - + "pathStart" : { "type" : "string", "optional" : true, "format" : "uri" }, - + "mediaType" : { "type" : "string", "optional" : true, "format" : "media-type" }, - + "alternate" : { "type" : "array", "items" : {"$ref" : "#"}, "optional" : true } }, - + "links" : [ { "href" : "{$ref}", "rel" : "full" }, - + { "href" : "{$schema}", "rel" : "describedby" }, - + { "href" : "{id}", "rel" : "self" } ], - + "fragmentResolution" : "dot-delimited", "extends" : {"$ref" : "http://json-schema.org/draft-01/schema#"} } \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/json-ref b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/json-ref index 4d26174ef17ad9..cbac1ba2e53286 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/json-ref +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/json-ref @@ -1,26 +1,26 @@ { "$schema" : "http://json-schema.org/draft-01/hyper-schema#", "id" : "http://json-schema.org/draft-01/json-ref#", - + "items" : {"$ref" : "#"}, "additionalProperties" : {"$ref" : "#"}, - + "links" : [ { "href" : "{$ref}", "rel" : "full" }, - + { "href" : "{$schema}", "rel" : "describedby" }, - + { "href" : "{id}", "rel" : "self" } ], - + "fragmentResolution" : "dot-delimited" } \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/links b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/links index 52430a5d94ac75..ebc7b7b58b1326 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/links +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/links @@ -2,28 +2,28 @@ "$schema" : "http://json-schema.org/draft-01/hyper-schema#", "id" : "http://json-schema.org/draft-01/links#", "type" : "object", - + "properties" : { "href" : { "type" : "string" }, - + "rel" : { "type" : "string" }, - + "method" : { "type" : "string", "default" : "GET", "optional" : true }, - + "enctype" : { "type" : "string", "requires" : "method", "optional" : true }, - + "properties" : { "type" : "object", "additionalProperties" : {"$ref" : "http://json-schema.org/draft-01/hyper-schema#"}, diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/schema b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/schema index 7a208e680e631b..a0f3801f840cca 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/schema +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/schema @@ -2,7 +2,7 @@ "$schema" : "http://json-schema.org/draft-01/hyper-schema#", "id" : "http://json-schema.org/draft-01/schema#", "type" : "object", - + "properties" : { "type" : { "type" : ["string", "array"], @@ -12,136 +12,136 @@ "optional" : true, "default" : "any" }, - + "properties" : { "type" : "object", "additionalProperties" : {"$ref" : "#"}, "optional" : true, "default" : {} }, - + "items" : { "type" : [{"$ref" : "#"}, "array"], "items" : {"$ref" : "#"}, "optional" : true, "default" : {} }, - + "optional" : { "type" : "boolean", "optional" : true, "default" : false }, - + "additionalProperties" : { "type" : [{"$ref" : "#"}, "boolean"], "optional" : true, "default" : {} }, - + "requires" : { "type" : ["string", {"$ref" : "#"}], "optional" : true }, - + "minimum" : { "type" : "number", "optional" : true }, - + "maximum" : { "type" : "number", "optional" : true }, - + "minimumCanEqual" : { "type" : "boolean", "optional" : true, "requires" : "minimum", "default" : true }, - + "maximumCanEqual" : { "type" : "boolean", "optional" : true, "requires" : "maximum", "default" : true }, - + "minItems" : { "type" : "integer", "optional" : true, "minimum" : 0, "default" : 0 }, - + "maxItems" : { "type" : "integer", "optional" : true, "minimum" : 0 }, - + "pattern" : { "type" : "string", "optional" : true, "format" : "regex" }, - + "minLength" : { "type" : "integer", "optional" : true, "minimum" : 0, "default" : 0 }, - + "maxLength" : { "type" : "integer", "optional" : true }, - + "enum" : { "type" : "array", "optional" : true, "minItems" : 1 }, - + "title" : { "type" : "string", "optional" : true }, - + "description" : { "type" : "string", "optional" : true }, - + "format" : { "type" : "string", "optional" : true }, - + "contentEncoding" : { "type" : "string", "optional" : true }, - + "default" : { "type" : "any", "optional" : true }, - + "maxDecimal" : { "type" : "integer", "optional" : true, "minimum" : 0 }, - + "disallow" : { "type" : ["string", "array"], "items" : {"type" : "string"}, "optional" : true }, - + "extends" : { "type" : [{"$ref" : "#"}, "array"], "items" : {"$ref" : "#"}, @@ -149,7 +149,7 @@ "default" : {} } }, - + "optional" : true, "default" : {} } \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/hyper-schema b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/hyper-schema index 4ec1b7569137c3..0771e2b31e8eef 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/hyper-schema +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/hyper-schema @@ -8,61 +8,61 @@ "items" : {"$ref" : "http://json-schema.org/draft-02/links#"}, "optional" : true }, - + "fragmentResolution" : { "type" : "string", "optional" : true, "default" : "slash-delimited" }, - + "root" : { "type" : "boolean", "optional" : true, "default" : false }, - + "readonly" : { "type" : "boolean", "optional" : true, "default" : false }, - + "pathStart" : { "type" : "string", "optional" : true, "format" : "uri" }, - + "mediaType" : { "type" : "string", "optional" : true, "format" : "media-type" }, - + "alternate" : { "type" : "array", "items" : {"$ref" : "#"}, "optional" : true } }, - + "links" : [ { "href" : "{$ref}", "rel" : "full" }, - + { "href" : "{$schema}", "rel" : "describedby" }, - + { "href" : "{id}", "rel" : "self" } ], - + "fragmentResolution" : "slash-delimited", "extends" : {"$ref" : "http://json-schema.org/draft-02/schema#"} } \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/json-ref b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/json-ref index 6526c394556665..1a6c56d04b665a 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/json-ref +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/json-ref @@ -1,26 +1,26 @@ { "$schema" : "http://json-schema.org/draft-02/hyper-schema#", "id" : "http://json-schema.org/draft-02/json-ref#", - + "items" : {"$ref" : "#"}, "additionalProperties" : {"$ref" : "#"}, - + "links" : [ { "href" : "{$ref}", "rel" : "full" }, - + { "href" : "{$schema}", "rel" : "describedby" }, - + { "href" : "{id}", "rel" : "self" } ], - + "fragmentResolution" : "dot-delimited" } \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/links b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/links index 1b176178a2c333..dacc53a1a4adb6 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/links +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/links @@ -2,30 +2,30 @@ "$schema" : "http://json-schema.org/draft-02/hyper-schema#", "id" : "http://json-schema.org/draft-02/links#", "type" : "object", - + "properties" : { "href" : { "type" : "string" }, - + "rel" : { "type" : "string" }, - + "targetSchema" : {"$ref" : "http://json-schema.org/draft-02/hyper-schema#"}, - + "method" : { "type" : "string", "default" : "GET", "optional" : true }, - + "enctype" : { "type" : "string", "requires" : "method", "optional" : true }, - + "properties" : { "type" : "object", "additionalProperties" : {"$ref" : "http://json-schema.org/draft-02/hyper-schema#"}, diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/schema b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/schema index 61b8de15483962..a4998abea2065e 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/schema +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/schema @@ -2,7 +2,7 @@ "$schema" : "http://json-schema.org/draft-02/hyper-schema#", "id" : "http://json-schema.org/draft-02/schema#", "type" : "object", - + "properties" : { "type" : { "type" : ["string", "array"], @@ -13,131 +13,131 @@ "uniqueItems" : true, "default" : "any" }, - + "properties" : { "type" : "object", "additionalProperties" : {"$ref" : "#"}, "optional" : true, "default" : {} }, - + "items" : { "type" : [{"$ref" : "#"}, "array"], "items" : {"$ref" : "#"}, "optional" : true, "default" : {} }, - + "optional" : { "type" : "boolean", "optional" : true, "default" : false }, - + "additionalProperties" : { "type" : [{"$ref" : "#"}, "boolean"], "optional" : true, "default" : {} }, - + "requires" : { "type" : ["string", {"$ref" : "#"}], "optional" : true }, - + "minimum" : { "type" : "number", "optional" : true }, - + "maximum" : { "type" : "number", "optional" : true }, - + "minimumCanEqual" : { "type" : "boolean", "optional" : true, "requires" : "minimum", "default" : true }, - + "maximumCanEqual" : { "type" : "boolean", "optional" : true, "requires" : "maximum", "default" : true }, - + "minItems" : { "type" : "integer", "optional" : true, "minimum" : 0, "default" : 0 }, - + "maxItems" : { "type" : "integer", "optional" : true, "minimum" : 0 }, - + "uniqueItems" : { "type" : "boolean", "optional" : true, "default" : false }, - + "pattern" : { "type" : "string", "optional" : true, "format" : "regex" }, - + "minLength" : { "type" : "integer", "optional" : true, "minimum" : 0, "default" : 0 }, - + "maxLength" : { "type" : "integer", "optional" : true }, - + "enum" : { "type" : "array", "optional" : true, "minItems" : 1, "uniqueItems" : true }, - + "title" : { "type" : "string", "optional" : true }, - + "description" : { "type" : "string", "optional" : true }, - + "format" : { "type" : "string", "optional" : true }, - + "contentEncoding" : { "type" : "string", "optional" : true }, - + "default" : { "type" : "any", "optional" : true }, - + "divisibleBy" : { "type" : "number", "minimum" : 0, @@ -145,14 +145,14 @@ "optional" : true, "default" : 1 }, - + "disallow" : { "type" : ["string", "array"], "items" : {"type" : "string"}, "optional" : true, "uniqueItems" : true }, - + "extends" : { "type" : [{"$ref" : "#"}, "array"], "items" : {"$ref" : "#"}, @@ -160,7 +160,7 @@ "default" : {} } }, - + "optional" : true, "default" : {} } \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/calendar b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/calendar index 463cfb314b6431..d8fb5335f081b4 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/calendar +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/calendar @@ -12,12 +12,12 @@ "type":"string", "required":true }, - "location" : { - "type" : "string" + "location" : { + "type" : "string" }, "url" : { - "type" : "string", - "format" : "url" + "type" : "string", + "format" : "url" }, "dtend" : { "format" : "date-time", @@ -47,7 +47,3 @@ "geo" : { "$ref" : "http://json-schema.org/draft-03/geo" } } } - - - - diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/interfaces b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/interfaces index 288a19856b7263..84ebf83a993f6d 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/interfaces +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/interfaces @@ -6,18 +6,18 @@ "type":"object", "description":"This defines the set of methods available to the class instances", "additionalProperties":{ - "type":"object", - "description":"The definition of the method", - "properties":{ - "parameters":{ - "type":"array", - "description":"The set of parameters that should be passed to the method when it is called", - "items":{"$ref":"#"}, - "required": true - }, - "returns":{"$ref":"#"} - } + "type":"object", + "description":"The definition of the method", + "properties":{ + "parameters":{ + "type":"array", + "description":"The set of parameters that should be passed to the method when it is called", + "items":{"$ref":"#"}, + "required": true + }, + "returns":{"$ref":"#"} + } } - } + } } } diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/json-ref b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/json-ref index 7e491a8e882347..388476323a08ab 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/json-ref +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/json-ref @@ -1,26 +1,26 @@ { "$schema" : "http://json-schema.org/draft-03/hyper-schema#", "id" : "http://json-schema.org/draft-03/json-ref#", - + "additionalItems" : {"$ref" : "#"}, "additionalProperties" : {"$ref" : "#"}, - + "links" : [ { "href" : "{id}", "rel" : "self" }, - + { "href" : "{$ref}", "rel" : "full" }, - + { "href" : "{$schema}", "rel" : "describedby" } ], - + "fragmentResolution" : "dot-delimited" } \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/links b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/links index 6b0a85a6295b25..3dbcdba73cc4e8 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/links +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/links @@ -2,31 +2,31 @@ "$schema" : "http://json-schema.org/draft-03/hyper-schema#", "id" : "http://json-schema.org/draft-03/links#", "type" : "object", - + "properties" : { "href" : { "type" : "string", "required" : true, "format" : "link-description-object-template" }, - + "rel" : { "type" : "string", "required" : true }, - + "targetSchema" : {"$ref" : "http://json-schema.org/draft-03/hyper-schema#"}, - + "method" : { "type" : "string", "default" : "GET" }, - + "enctype" : { "type" : "string", "requires" : "method" }, - + "properties" : { "type" : "object", "additionalProperties" : {"$ref" : "http://json-schema.org/draft-03/hyper-schema#"} diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/schema b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/schema index 55ae47d808c0ab..361456d8a7e89e 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/schema +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/schema @@ -2,7 +2,7 @@ "$schema" : "http://json-schema.org/draft-03/schema#", "id" : "http://json-schema.org/draft-03/schema#", "type" : "object", - + "properties" : { "type" : { "type" : ["string", "array"], @@ -12,40 +12,40 @@ "uniqueItems" : true, "default" : "any" }, - + "properties" : { "type" : "object", "additionalProperties" : {"$ref" : "#"}, "default" : {} }, - + "patternProperties" : { "type" : "object", "additionalProperties" : {"$ref" : "#"}, "default" : {} }, - + "additionalProperties" : { "type" : [{"$ref" : "#"}, "boolean"], "default" : {} }, - + "items" : { "type" : [{"$ref" : "#"}, "array"], "items" : {"$ref" : "#"}, "default" : {} }, - + "additionalItems" : { "type" : [{"$ref" : "#"}, "boolean"], "default" : {} }, - + "required" : { "type" : "boolean", "default" : false }, - + "dependencies" : { "type" : "object", "additionalProperties" : { @@ -56,85 +56,85 @@ }, "default" : {} }, - + "minimum" : { "type" : "number" }, - + "maximum" : { "type" : "number" }, - + "exclusiveMinimum" : { "type" : "boolean", "default" : false }, - + "exclusiveMaximum" : { "type" : "boolean", "default" : false }, - + "minItems" : { "type" : "integer", "minimum" : 0, "default" : 0 }, - + "maxItems" : { "type" : "integer", "minimum" : 0 }, - + "uniqueItems" : { "type" : "boolean", "default" : false }, - + "pattern" : { "type" : "string", "format" : "regex" }, - + "minLength" : { "type" : "integer", "minimum" : 0, "default" : 0 }, - + "maxLength" : { "type" : "integer" }, - + "enum" : { "type" : "array", "minItems" : 1, "uniqueItems" : true }, - + "default" : { "type" : "any" }, - + "title" : { "type" : "string" }, - + "description" : { "type" : "string" }, - + "format" : { "type" : "string" }, - + "divisibleBy" : { "type" : "number", "minimum" : 0, "exclusiveMinimum" : true, "default" : 1 }, - + "disallow" : { "type" : ["string", "array"], "items" : { @@ -142,33 +142,33 @@ }, "uniqueItems" : true }, - + "extends" : { "type" : [{"$ref" : "#"}, "array"], "items" : {"$ref" : "#"}, "default" : {} }, - + "id" : { "type" : "string", "format" : "uri" }, - + "$ref" : { "type" : "string", "format" : "uri" }, - + "$schema" : { "type" : "string", "format" : "uri" } }, - + "dependencies" : { "exclusiveMinimum" : "minimum", "exclusiveMaximum" : "maximum" }, - + "default" : {} } \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/links b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/links index de272cc4513d0a..7cf7c92c20965c 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/links +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/links @@ -2,7 +2,7 @@ "$schema" : "http://json-schema.org/draft-04/hyper-schema#", "id" : "http://json-schema.org/draft-04/links#", "type" : "object", - + "properties" : { "rel" : { "type" : "string" @@ -15,26 +15,26 @@ "template" : { "type" : "string" }, - + "targetSchema" : {"$ref" : "http://json-schema.org/draft-04/hyper-schema#"}, - + "method" : { "type" : "string", "default" : "GET" }, - + "enctype" : { "type" : "string" }, - + "properties" : { "type" : "object", "additionalProperties" : {"$ref" : "http://json-schema.org/draft-04/hyper-schema#"} } }, - + "required" : ["rel", "href"], - + "dependencies" : { "enctype" : "method" } diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/schema b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/schema index 598951e57d2eb7..e9c90699fda128 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/schema +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/schema @@ -2,7 +2,7 @@ "$schema" : "http://json-schema.org/draft-04/schema#", "id" : "http://json-schema.org/draft-04/schema#", "type" : "object", - + "properties" : { "type" : { "type" : [ @@ -10,19 +10,19 @@ "id" : "#simple-type", "type" : "string", "enum" : ["object", "array", "string", "number", "boolean", "null", "any"] - }, + }, "array" ], "items" : { "type" : [ - {"$ref" : "#simple-type"}, + {"$ref" : "#simple-type"}, {"$ref" : "#"} ] }, "uniqueItems" : true, "default" : "any" }, - + "disallow" : { "type" : ["string", "array"], "items" : { @@ -30,7 +30,7 @@ }, "uniqueItems" : true }, - + "extends" : { "type" : [{"$ref" : "#"}, "array"], "items" : {"$ref" : "#"}, @@ -42,108 +42,108 @@ "minItems" : 1, "uniqueItems" : true }, - + "minimum" : { "type" : "number" }, - + "maximum" : { "type" : "number" }, - + "exclusiveMinimum" : { "type" : "boolean", "default" : false }, - + "exclusiveMaximum" : { "type" : "boolean", "default" : false }, - + "divisibleBy" : { "type" : "number", "minimum" : 0, "exclusiveMinimum" : true, "default" : 1 }, - + "minLength" : { "type" : "integer", "minimum" : 0, "default" : 0 }, - + "maxLength" : { "type" : "integer" }, - + "pattern" : { "type" : "string" }, - + "items" : { "type" : [{"$ref" : "#"}, "array"], "items" : {"$ref" : "#"}, "default" : {} }, - + "additionalItems" : { "type" : [{"$ref" : "#"}, "boolean"], "default" : {} }, - + "minItems" : { "type" : "integer", "minimum" : 0, "default" : 0 }, - + "maxItems" : { "type" : "integer", "minimum" : 0 }, - + "uniqueItems" : { "type" : "boolean", "default" : false }, - + "properties" : { "type" : "object", "additionalProperties" : {"$ref" : "#"}, "default" : {} }, - + "patternProperties" : { "type" : "object", "additionalProperties" : {"$ref" : "#"}, "default" : {} }, - + "additionalProperties" : { "type" : [{"$ref" : "#"}, "boolean"], "default" : {} }, - + "minProperties" : { "type" : "integer", "minimum" : 0, "default" : 0 }, - + "maxProperties" : { "type" : "integer", "minimum" : 0 }, - + "required" : { "type" : "array", "items" : { "type" : "string" } }, - + "dependencies" : { "type" : "object", "additionalProperties" : { @@ -154,36 +154,36 @@ }, "default" : {} }, - + "id" : { "type" : "string" }, - + "$ref" : { "type" : "string" }, - + "$schema" : { "type" : "string" }, - + "title" : { "type" : "string" }, - + "description" : { "type" : "string" }, - + "default" : { "type" : "any" } }, - + "dependencies" : { "exclusiveMinimum" : "minimum", "exclusiveMaximum" : "maximum" }, - + "default" : {} } \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-03.xml b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-03.xml index c28f40dcd6ee44..1cf715910b5a83 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-03.xml +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-03.xml @@ -24,7 +24,7 @@ A JSON Media Type for Describing the Structure and Meaning of JSON Documents - + SitePen (USA)
@@ -37,7 +37,7 @@ kris@sitepen.com
- +
@@ -48,7 +48,7 @@ gary.court@gmail.com
- + Internet Engineering Task Force JSON @@ -58,59 +58,59 @@ Notation Hyper Schema Hypermedia - + - JSON (JavaScript Object Notation) Schema defines the media type "application/schema+json", - a JSON based format for defining - the structure of JSON data. JSON Schema provides a contract for what JSON - data is required for a given application and how to interact with it. JSON - Schema is intended to define validation, documentation, hyperlink - navigation, and interaction control of JSON data. + JSON (JavaScript Object Notation) Schema defines the media type "application/schema+json", + a JSON based format for defining + the structure of JSON data. JSON Schema provides a contract for what JSON + data is required for a given application and how to interact with it. JSON + Schema is intended to define validation, documentation, hyperlink + navigation, and interaction control of JSON data.
- +
- JSON (JavaScript Object Notation) Schema is a JSON media type for defining - the structure of JSON data. JSON Schema provides a contract for what JSON - data is required for a given application and how to interact with it. JSON - Schema is intended to define validation, documentation, hyperlink - navigation, and interaction control of JSON data. + JSON (JavaScript Object Notation) Schema is a JSON media type for defining + the structure of JSON data. JSON Schema provides a contract for what JSON + data is required for a given application and how to interact with it. JSON + Schema is intended to define validation, documentation, hyperlink + navigation, and interaction control of JSON data.
- +
- - - The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", + + The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
- + - +
- JSON Schema defines the media type "application/schema+json" for + JSON Schema defines the media type "application/schema+json" for describing the structure of other - JSON documents. JSON Schema is JSON-based and includes facilities + JSON documents. JSON Schema is JSON-based and includes facilities for describing the structure of JSON documents in terms of allowable values, descriptions, and interpreting relations with other resources. - JSON Schema format is organized into several separate definitions. The first - definition is the core schema specification. This definition is primary + JSON Schema format is organized into several separate definitions. The first + definition is the core schema specification. This definition is primary concerned with describing a JSON structure and specifying valid elements in the structure. The second definition is the Hyper Schema specification which is intended define elements in a structure that can be interpreted as hyperlinks. - Hyper Schema builds on JSON Schema to describe the hyperlink structure of + Hyper Schema builds on JSON Schema to describe the hyperlink structure of other JSON documents and elements of interaction. This allows user agents to be able to successfully navigate JSON documents based on their schemas. @@ -118,12 +118,12 @@ Cumulatively JSON Schema acts as a meta-document that can be used to define the required type and constraints on property values, as well as define the meaning of the property values for the purpose of describing a resource and determining hyperlinks - within the representation. + within the representation.
An example JSON Schema that describes products might look like: - - This schema defines the properties of the instance JSON documents, + This schema defines the properties of the instance JSON documents, the required properties (id, name, and price), as well as an optional property (tags). This also defines the link relations of the instance JSON documents.
- +
- For this specification, schema will be used to denote a JSON Schema - definition, and an instance refers to a JSON value that the schema + For this specification, schema will be used to denote a JSON Schema + definition, and an instance refers to a JSON value that the schema will be describing and validating.
- +
The JSON Schema media type does not attempt to dictate the structure of JSON @@ -194,7 +194,7 @@ This specification is protocol agnostic. The underlying protocol (such as HTTP) should sufficiently define the semantics of the client-server interface, the retrieval of resource - representations linked to by JSON representations, and modification of + representations linked to by JSON representations, and modification of those resources. The goal of this format is to sufficiently describe JSON structures such that one can utilize existing information available in existing JSON @@ -203,7 +203,7 @@
- +
JSON Schema instances are correlated to their schema by the "describedby" @@ -217,22 +217,22 @@ representation and messages may retain the self-descriptive characteristic, avoiding the need for out-of-band information about instance data. Two approaches are recommended for declaring the - relation to the schema that describes the meaning of a JSON instance's (or collection + relation to the schema that describes the meaning of a JSON instance's (or collection of instances) structure. A MIME type parameter named "profile" or a relation of "describedby" (which could be defined by a Link header) may be used: - +
-
- + or if the content is being transferred by a protocol (such as HTTP) that provides headers, a Link header can be used: - +
; rel="describedby" ]]>
- - Instances MAY specify multiple schemas, to indicate all the schemas that - are applicable to the data, and the data SHOULD be valid by all the schemas. - The instance data MAY have multiple schemas - that it is defined by (the instance data SHOULD be valid for those schemas). - Or if the document is a collection of instances, the collection MAY contain - instances from different schemas. When collections contain heterogeneous - instances, the "pathStart" attribute MAY be specified in the - schema to disambiguate which schema should be applied for each item in the + + Instances MAY specify multiple schemas, to indicate all the schemas that + are applicable to the data, and the data SHOULD be valid by all the schemas. + The instance data MAY have multiple schemas + that it is defined by (the instance data SHOULD be valid for those schemas). + Or if the document is a collection of instances, the collection MAY contain + instances from different schemas. When collections contain heterogeneous + instances, the "pathStart" attribute MAY be specified in the + schema to disambiguate which schema should be applied for each item in the collection. However, ultimately, the mechanism for referencing a schema is up to the media type of the instance documents (if they choose to specify that schemas can be referenced).
- +
- JSON Schemas can themselves be described using JSON Schemas. + JSON Schemas can themselves be described using JSON Schemas. A self-describing JSON Schema for the core JSON Schema can - be found at http://json-schema.org/schema for the latest version or - http://json-schema.org/draft-03/schema for the draft-03 version. The hyper schema - self-description can be found at http://json-schema.org/hyper-schema + be found at http://json-schema.org/schema for the latest version or + http://json-schema.org/draft-03/schema for the draft-03 version. The hyper schema + self-description can be found at http://json-schema.org/hyper-schema or http://json-schema.org/draft-03/hyper-schema. All schemas used within a protocol with media type definitions SHOULD include a MIME parameter that refers to the self-descriptive hyper schema or another schema that extends this hyper schema: - +
- @@ -277,15 +277,15 @@ Content-Type: application/json;
- +
- A JSON Schema is a JSON Object that defines various attributes + A JSON Schema is a JSON Object that defines various attributes (including usage and valid values) of a JSON value. JSON Schema has recursive capabilities; there are a number of elements in the structure that allow for nested JSON Schemas. - +
An example JSON Schema definition could look like: @@ -307,15 +307,15 @@ Content-Type: application/json; ]]>
- + A JSON Schema object may have any of the following properties, called schema attributes (all attributes are optional): - +
- This attribute defines what the primitive type or the schema of the instance MUST be in order to validate. + This attribute defines what the primitive type or the schema of the instance MUST be in order to validate. This attribute can take one of two forms: @@ -332,19 +332,19 @@ Content-Type: application/json; Value MUST be null. Note this is mainly for purpose of being able use union types to define nullability. If this type is not included in a union, null values are not allowed (the primitives listed above do not allow nulls on their own). Value MAY be of any type including null. - - If the property is not defined or is not in this list, then any type of value is acceptable. - Other type values MAY be used for custom purposes, but minimal validators of the specification + + If the property is not defined or is not in this list, then any type of value is acceptable. + Other type values MAY be used for custom purposes, but minimal validators of the specification implementation can allow any instance value on unknown type values. - + An array of two or more simple type definitions. Each item in the array MUST be a simple type definition or a schema. - The instance value is valid if it is of the same type as one of the simple type definitions, or valid by one of the schemas, in the array. + The instance value is valid if it is of the same type as one of the simple type definitions, or valid by one of the schemas, in the array. - +
For example, a schema that defines if an instance can be a string or a number would be: @@ -355,38 +355,38 @@ Content-Type: application/json; ]]>
- +
This attribute is an object with property definitions that define the valid values of instance object property values. When the instance value is an object, the property values of the instance object MUST conform to the property definitions in this object. In this object, each property definition's value MUST be a schema, and the property's name MUST be the name of the instance property that it defines. The instance property value MUST be valid according to the schema from the property definition. Properties are considered unordered, the order of the instance properties MAY be in any order.
- +
This attribute is an object that defines the schema for a set of property names of an object instance. The name of each property of this attribute's object is a regular expression pattern in the ECMA 262/Perl 5 format, while the value is a schema. If the pattern matches the name of a property on the instance object, the value of the instance's property MUST be valid against the pattern name's schema value.
- +
This attribute defines a schema for all properties that are not explicitly defined in an object type definition. If specified, the value MUST be a schema or a boolean. If false is provided, no additional properties are allowed beyond the properties defined in the schema. The default value is an empty schema which allows any value for additional properties.
- +
This attribute defines the allowed items in an instance array, and MUST be a schema or an array of schemas. The default value is an empty schema which allows any value for items in the instance array. When this attribute value is a schema and the instance value is an array, then all the items in the array MUST be valid according to the schema. When this attribute value is an array of schemas and the instance value is an array, each position in the instance array MUST conform to the schema in the corresponding position for this array. This called tuple typing. When tuple typing is used, additional items are allowed, disallowed, or constrained by the "additionalItems" attribute using the same rules as "additionalProperties" for objects.
- +
This provides a definition for additional items in an array instance when tuple definitions of the items is provided. This can be false to indicate additional items in the array are not allowed, or it can be a schema that defines the schema of the additional items.
- +
This attribute indicates if the instance must have a value, and not be undefined. This is false by default, making the instance optional.
- +
This attribute is an object that defines the requirements of a property on an instance object. If an object instance has a property with the same name as a property in this attribute's object, then the instance must be valid against the attribute's property value (hereafter referred to as the "dependency value"). The dependency value can take one of two forms: - + If the dependency value is a string, then the instance object MUST have a property with the same name as the dependency value. @@ -398,36 +398,36 @@ Content-Type: application/json;
- +
This attribute defines the minimum value of the instance property when the type of the instance value is a number.
- +
This attribute defines the maximum value of the instance property when the type of the instance value is a number.
- +
This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "minimum" attribute. This is false by default, meaning the instance value can be greater then or equal to the minimum value.
- +
This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "maximum" attribute. This is false by default, meaning the instance value can be less then or equal to the maximum value.
- +
This attribute defines the minimum number of values in an array when the array is the instance value.
- +
This attribute defines the maximum number of values in an array when the array is the instance value.
- +
This attribute indicates that all items in an array instance MUST be unique (contains no two identical values). Two instance are consider equal if they are both of the same type and: - + are null; or are booleans/numbers/strings and have the same value; or @@ -436,41 +436,41 @@ Content-Type: application/json;
- +
When the instance value is a string, this provides a regular expression that a string instance MUST match in order to be valid. Regular expressions SHOULD follow the regular expression specification from ECMA 262/Perl 5
- +
When the instance value is a string, this defines the minimum length of the string.
- +
When the instance value is a string, this defines the maximum length of the string.
- +
This provides an enumeration of all possible values that are valid for the instance property. This MUST be an array, and each item in the array represents a possible value for the instance value. If this attribute is defined, the instance value MUST be one of the values in the array in order for the schema to be valid. Comparison of enum values uses the same algorithm as defined in "uniqueItems".
- +
This attribute defines the default value of the instance when the instance is undefined.
- +
This attribute is a string that provides a short description of the instance property.
- +
This attribute is a string that provides a full description of the of purpose the instance property.
- +
This property defines the type of data, content type, or microformat to be expected in the instance property values. A format attribute MAY be one of the values listed below, and if so, SHOULD adhere to the semantics describing for the format. A format SHOULD only be used to give meaning to primitive types (string, integer, number, or boolean). Validators MAY (but are not required to) validate that the instance values conform to a format. - + The following formats are predefined: - + This SHOULD be a date in ISO 8601 format of YYYY-MM-DDThh:mm:ssZ in UTC time. This is the recommended form of date/timestamp. This SHOULD be a date in the format of YYYY-MM-DD. It is recommended that you use the "date-time" format instead of "date" unless you need to transfer only the date part. @@ -487,18 +487,18 @@ Content-Type: application/json; This SHOULD be a host-name. - + Additional custom formats MAY be created. These custom formats MAY be expressed as an URI, and this URI MAY reference a schema of that format.
- +
This attribute defines what value the number instance must be divisible by with no remainder (the result of the division must be an integer.) The value of this attribute SHOULD NOT be 0.
- +
This attribute takes the same values as the "type" attribute, however if the instance matches the type or if this value is an array and the instance matches any type or schema in the array, then this instance is not valid.
- +
The value of this property MUST be another schema which will provide a base schema which the current schema will inherit from. The inheritance rules are such that any instance that is valid according to the current schema MUST be valid according to the referenced schema. This MAY also be an array, in which case, the instance MUST be valid for all the schemas in the array. A schema that extends another schema MAY define additional attributes, constrain existing attributes, or add other constraints. @@ -506,7 +506,7 @@ Content-Type: application/json; instance against all constraints in the extending schema as well as the extended schema(s). More optimized implementations that merge schemas are possible, but are not required. Some examples of using "extends": - +
- +
- +
This attribute defines the current URI of this schema (this attribute is @@ -553,28 +553,28 @@ Content-Type: application/json; is also used to construct relative references such as for $ref.
- +
- This attribute defines a URI of a schema that contains the full representation of this schema. - When a validator encounters this attribute, it SHOULD replace the current schema with the schema referenced by the value's URI (if known and available) and re-validate the instance. + This attribute defines a URI of a schema that contains the full representation of this schema. + When a validator encounters this attribute, it SHOULD replace the current schema with the schema referenced by the value's URI (if known and available) and re-validate the instance. This URI MAY be relative or absolute, and relative URIs SHOULD be resolved against the URI of the current schema.
- +
- This attribute defines a URI of a JSON Schema that is the schema of the current schema. + This attribute defines a URI of a JSON Schema that is the schema of the current schema. When this attribute is defined, a validator SHOULD use the schema referenced by the value's URI (if known and available) when resolving Hyper Schemalinks. - + - A validator MAY use this attribute's value to determine which version of JSON Schema the current schema is written in, and provide the appropriate validation features and behavior. + A validator MAY use this attribute's value to determine which version of JSON Schema the current schema is written in, and provide the appropriate validation features and behavior. Therefore, it is RECOMMENDED that all schema authors include this attribute in their schemas to prevent conflicts with future JSON Schema specification changes.
- +
The following attributes are specified in addition to those @@ -586,28 +586,28 @@ Content-Type: application/json; essentially describes plain JSON (no constraints on the structures). Addition of attributes provides additive information for user agents. - +
- The value of the links property MUST be an array, where each item + The value of the links property MUST be an array, where each item in the array is a link description object which describes the link relations of the instances. - +
- A link description object is used to describe link relations. In - the context of a schema, it defines the link relations of the + A link description object is used to describe link relations. In + the context of a schema, it defines the link relations of the instances of the schema, and can be parameterized by the instance values. The link description format can be used on its own in regular (non-schema documents), and use of this format can be declared by referencing the normative link description - schema as the the schema for the data structure that uses the - links. The URI of the normative link description schema is: + schema as the the schema for the data structure that uses the + links. The URI of the normative link description schema is: http://json-schema.org/links (latest version) or http://json-schema.org/draft-03/links (draft-03 version). - +
The value of the "href" link description property @@ -615,19 +615,19 @@ Content-Type: application/json; of the instance property SHOULD be resolved as a URI-Reference per RFC 3986 and MAY be a relative URI. The base URI to be used for relative resolution SHOULD be the URI used to retrieve the instance object (not the schema) - when used within a schema. Also, when links are used within a schema, the URI - SHOULD be parametrized by the property values of the instance + when used within a schema. Also, when links are used within a schema, the URI + SHOULD be parametrized by the property values of the instance object, if property values exist for the corresponding variables in the template (otherwise they MAY be provided from alternate sources, like user input). - + Instance property values SHOULD be substituted into the URIs where matching braces ('{', '}') are found surrounding zero or more characters, creating an expanded URI. Instance property value substitutions are resolved by using the text between the braces to denote the property name - from the instance to get the value to substitute. - + from the instance to get the value to substitute. +
For example, if an href value is defined: @@ -637,7 +637,7 @@ http://somesite.com/{id} Then it would be resolved by replace the value of the "id" property value from the instance object.
- +
If the value of the "id" property was "45", the expanded URI would be: @@ -646,23 +646,23 @@ http://somesite.com/45 ]]>
- - If matching braces are found with the string "@" (no quotes) between the braces, then the + + If matching braces are found with the string "@" (no quotes) between the braces, then the actual instance value SHOULD be used to replace the braces, rather than a property value. - This should only be used in situations where the instance is a scalar (string, + This should only be used in situations where the instance is a scalar (string, boolean, or number), and not for objects or arrays.
- +
- The value of the "rel" property indicates the name of the + The value of the "rel" property indicates the name of the relation to the target resource. The relation to the target SHOULD be interpreted as specifically from the instance object that the schema (or sub-schema) applies to, not just the top level resource that contains the object within its hierarchy. If a resource JSON representation contains a sub object with a property interpreted as a link, that sub-object holds the relation with the target. A relation to target from the top level resource MUST be indicated with the schema describing the top level JSON representation. - + Relationship definitions SHOULD NOT be media type dependent, and users are encouraged to utilize existing accepted relation definitions, including those in existing relation registries (see RFC 4287). However, we define these relations here for clarity of normative interpretation within the context of JSON hyper schema defined relations: - + If the relation value is "self", when this property is encountered in @@ -670,15 +670,15 @@ http://somesite.com/45 treated as a full representation of the target resource identified by the specified URI. - + This indicates that the target of the link is the full representation for the instance object. The object that contains this link possibly may not be the full representation. - + This indicates the target of the link is the schema for the instance object. This MAY be used to specifically denote the schemas of objects within a JSON object hierarchy, facilitating polymorphic type data structures. - + This relation indicates that the target of the link SHOULD be treated as the root or the body of the representation for the @@ -688,7 +688,7 @@ http://somesite.com/45 - + The following relations are applicable for schemas (the schema as the "from" resource in the relation): @@ -697,7 +697,7 @@ http://somesite.com/45 This indicates a target to use for creating new instances of a schema. This link definition SHOULD be a submission link with a non-safe method (like POST). - +
For example, if a schema is defined: @@ -718,7 +718,7 @@ http://somesite.com/45 ]]>
- +
And if a collection of instance resource's JSON representation was retrieved: @@ -742,37 +742,37 @@ GET /Resource/ The "children" collection would be located at "/Resource/?upId=thing".
- +
This property value is a schema that defines the expected structure of the JSON representation of the target of the link.
- +
- The following properties also apply to link definition objects, and - provide functionality analogous to HTML forms, in providing a + The following properties also apply to link definition objects, and + provide functionality analogous to HTML forms, in providing a means for submitting extra (often user supplied) information to send to a server. - +
- This attribute defines which method can be used to access the target resource. - In an HTTP environment, this would be "GET" or "POST" (other HTTP methods - such as "PUT" and "DELETE" have semantics that are clearly implied by - accessed resources, and do not need to be defined here). + This attribute defines which method can be used to access the target resource. + In an HTTP environment, this would be "GET" or "POST" (other HTTP methods + such as "PUT" and "DELETE" have semantics that are clearly implied by + accessed resources, and do not need to be defined here). This defaults to "GET".
- +
If present, this property indicates a query media type format that the server - supports for querying or posting to the collection of instances at the target - resource. The query can be + supports for querying or posting to the collection of instances at the target + resource. The query can be suffixed to the target URI to query the collection with property-based constraints on the resources that SHOULD be returned from the server or used to post data to the resource (depending on the method). - +
For example, with the following schema: @@ -793,7 +793,7 @@ GET /Resource/ This indicates that the client can query the server for instances that have a specific name.
- +
For example: @@ -803,23 +803,23 @@ GET /Resource/
- If no enctype or method is specified, only the single URI specified by - the href property is defined. If the method is POST, "application/json" is + If no enctype or method is specified, only the single URI specified by + the href property is defined. If the method is POST, "application/json" is the default media type.
- +
This attribute contains a schema which defines the acceptable structure of the submitted - request (for a GET request, this schema would define the properties for the query string + request (for a GET request, this schema would define the properties for the query string and for a POST request, this would define the body).
- +
This property indicates the fragment resolution protocol to use for @@ -829,12 +829,12 @@ GET /Resource/ protocol is "slash-delimited", which is defined below. Other fragment resolution protocols MAY be used, but are not defined in this document. - + The fragment identifier is based on RFC 2396, Sec 5, and defines the mechanism for resolving references to entities within a document. - +
With the slash-delimited fragment resolution protocol, the fragment @@ -852,15 +852,15 @@ GET /Resource/ item in array the array with the index defined by the next property reference token (which MUST be a number). The target is successively updated for each property reference token, until the entire fragment has - been traversed. + been traversed. - + - Property names SHOULD be URI-encoded. In particular, any "/" in a - property name MUST be encoded to avoid being interpreted as a property + Property names SHOULD be URI-encoded. In particular, any "/" in a + property name MUST be encoded to avoid being interpreted as a property delimiter. - +
For example, for the following JSON representation: @@ -879,7 +879,7 @@ GET /Resource/ ]]>
- +
The following fragment identifiers would be resolved: @@ -889,10 +889,10 @@ fragment identifier resolution # self, the root of the resource itself #/foo the object referred to by the foo property #/foo/another%20prop the object referred to by the "another prop" - property of the object referred to by the + property of the object referred to by the "foo" property #/foo/another%20prop/baz the string referred to by the value of "baz" - property of the "another prop" property of + property of the "another prop" property of the object referred to by the "foo" property #/foo/anArray/0 the first object in the "anArray" array ]]> @@ -900,61 +900,61 @@ fragment identifier resolution
- +
- The dot-delimited fragment resolution protocol is the same as - slash-delimited fragment resolution protocol except that the "." character - (\x2E) is used as the delimiter between property names (instead of "/") and + The dot-delimited fragment resolution protocol is the same as + slash-delimited fragment resolution protocol except that the "." character + (\x2E) is used as the delimiter between property names (instead of "/") and the path does not need to start with a ".". For example, #.foo and #foo are a valid fragment identifiers for referencing the value of the foo propery.
- +
This attribute indicates that the instance property SHOULD NOT be changed. Attempts by a user agent to modify the value of this property are expected to be rejected by a server.
- +
If the instance property value is a string, this attribute defines that the string SHOULD be interpreted as binary data and decoded using the encoding named by this schema property. RFC 2045, Sec 6.1 lists the possible values for this property.
- +
- This attribute is a URI that defines what the instance's URI MUST start with in order to validate. - The value of the "pathStart" attribute MUST be resolved as per RFC 3986, Sec 5, + This attribute is a URI that defines what the instance's URI MUST start with in order to validate. + The value of the "pathStart" attribute MUST be resolved as per RFC 3986, Sec 5, and is relative to the instance's URI. - + - When multiple schemas have been referenced for an instance, the user agent - can determine if this schema is applicable for a particular instance by + When multiple schemas have been referenced for an instance, the user agent + can determine if this schema is applicable for a particular instance by determining if the URI of the instance begins with the the value of the "pathStart" - attribute. If the URI of the instance does not start with this URI, - or if another schema specifies a starting URI that is longer and also matches the - instance, this schema SHOULD NOT be applied to the instance. Any schema - that does not have a pathStart attribute SHOULD be considered applicable + attribute. If the URI of the instance does not start with this URI, + or if another schema specifies a starting URI that is longer and also matches the + instance, this schema SHOULD NOT be applied to the instance. Any schema + that does not have a pathStart attribute SHOULD be considered applicable to all the instances for which it is referenced.
- +
This attribute defines the media type of the instance representations that this schema is defining.
- +
- This specification is a sub-type of the JSON format, and - consequently the security considerations are generally the same as RFC 4627. + This specification is a sub-type of the JSON format, and + consequently the security considerations are generally the same as RFC 4627. However, an additional issue is that when link relation of "self" - is used to denote a full representation of an object, the user agent + is used to denote a full representation of an object, the user agent SHOULD NOT consider the representation to be the authoritative representation of the resource denoted by the target URI if the target URI is not - equivalent to or a sub-path of the the URI used to request the resource + equivalent to or a sub-path of the the URI used to request the resource representation which contains the target URI with the "self" link. - +
For example, if a hyper schema was defined: @@ -968,7 +968,7 @@ fragment identifier resolution ]]>
- +
And a resource was requested from somesite.com: @@ -1005,22 +1005,22 @@ Content-Type: application/json; profile=/schema-for-this-data
- +
The proposed MIME media type for JSON Schema is "application/schema+json". Type name: application Subtype name: schema+json Required parameters: profile - The value of the profile parameter SHOULD be a URI (relative or absolute) that - refers to the schema used to define the structure of this structure (the + The value of the profile parameter SHOULD be a URI (relative or absolute) that + refers to the schema used to define the structure of this structure (the meta-schema). Normally the value would be http://json-schema.org/draft-03/hyper-schema, but it is allowable to use other schemas that extend the hyper schema's meta- schema. Optional parameters: pretty The value of the pretty parameter MAY be true or false to indicate if additional whitespace has been included to make the JSON representation easier to read. - +
This registry is maintained by IANA per RFC 4287 and this specification adds @@ -1032,7 +1032,7 @@ Content-Type: application/json; profile=/schema-for-this-data
- + @@ -1080,7 +1080,7 @@ Content-Type: application/json; profile=/schema-for-this-data Added "$ref" and "$schema" attributes. - + Replaced "maxDecimal" attribute with "divisibleBy" attribute. @@ -1090,13 +1090,13 @@ Content-Type: application/json; profile=/schema-for-this-data Added "targetSchema" attribute to link description object. - + Fixed category and updates from template. - + Initial draft. @@ -1105,7 +1105,7 @@ Content-Type: application/json; profile=/schema-for-this-data - +
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-04.xml b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-04.xml index f9c1ea5a0c00a2..22fb3290df1472 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-04.xml +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-04.xml @@ -23,7 +23,7 @@ A JSON Media Type for Describing the Structure and Meaning of JSON Documents - + SitePen (USA)
@@ -36,7 +36,7 @@ kris@sitepen.com
- +
@@ -47,7 +47,7 @@ gary.court@gmail.com
- + Internet Engineering Task Force JSON @@ -57,48 +57,48 @@ Notation Hyper Schema Hypermedia - + - JSON (JavaScript Object Notation) Schema defines the media type "application/schema+json", - a JSON based format for defining the structure of JSON data. JSON Schema provides a contract for what JSON - data is required for a given application and how to interact with it. JSON - Schema is intended to define validation, documentation, hyperlink - navigation, and interaction control of JSON data. + JSON (JavaScript Object Notation) Schema defines the media type "application/schema+json", + a JSON based format for defining the structure of JSON data. JSON Schema provides a contract for what JSON + data is required for a given application and how to interact with it. JSON + Schema is intended to define validation, documentation, hyperlink + navigation, and interaction control of JSON data.
- +
- JSON (JavaScript Object Notation) Schema is a JSON media type for defining - the structure of JSON data. JSON Schema provides a contract for what JSON - data is required for a given application and how to interact with it. JSON - Schema is intended to define validation, documentation, hyperlink - navigation, and interaction control of JSON data. + JSON (JavaScript Object Notation) Schema is a JSON media type for defining + the structure of JSON data. JSON Schema provides a contract for what JSON + data is required for a given application and how to interact with it. JSON + Schema is intended to define validation, documentation, hyperlink + navigation, and interaction control of JSON data.
- +
- - - The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", + + The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119. - + - The terms "JSON", "JSON text", "JSON value", "member", "element", "object", - "array", "number", "string", "boolean", "true", "false", and "null" in this + The terms "JSON", "JSON text", "JSON value", "member", "element", "object", + "array", "number", "string", "boolean", "true", "false", and "null" in this document are to be interpreted as defined in RFC 4627. - + This specification also uses the following defined terms: - + A JSON Schema object. Equivalent to "JSON value" as defined in RFC 4627. @@ -108,35 +108,35 @@
- +
- JSON Schema defines the media type "application/schema+json" for - describing the structure of JSON text. JSON Schemas are also written in JSON and includes facilities + JSON Schema defines the media type "application/schema+json" for + describing the structure of JSON text. JSON Schemas are also written in JSON and includes facilities for describing the structure of JSON in terms of allowable values, descriptions, and interpreting relations with other resources. - This document is organized into several separate definitions. The first - definition is the core schema specification. This definition is primary + This document is organized into several separate definitions. The first + definition is the core schema specification. This definition is primary concerned with describing a JSON structure and specifying valid elements in the structure. The second definition is the Hyper Schema specification which is intended to define elements in a structure that can be interpreted as hyperlinks. - Hyper Schema builds on JSON Schema to describe the hyperlink structure of + Hyper Schema builds on JSON Schema to describe the hyperlink structure of JSON values. This allows user agents to be able to successfully navigate documents containing JSON based on their schemas. - Cumulatively JSON Schema acts as meta-JSON that can be used to define the + Cumulatively JSON Schema acts as meta-JSON that can be used to define the required type and constraints on JSON values, as well as define the meaning of the JSON values for the purpose of describing a resource and determining - hyperlinks within the representation. + hyperlinks within the representation.
An example JSON Schema that describes products might look like: - - This schema defines the properties of the instance, + This schema defines the properties of the instance, the required properties (id, name, and price), as well as an optional property (tags). This also defines the link relations of the instance.
- +
The JSON Schema media type does not attempt to dictate the structure of JSON @@ -195,7 +195,7 @@ This specification is protocol agnostic. The underlying protocol (such as HTTP) should sufficiently define the semantics of the client-server interface, the retrieval of resource - representations linked to by JSON representations, and modification of + representations linked to by JSON representations, and modification of those resources. The goal of this format is to sufficiently describe JSON structures such that one can utilize existing information available in existing JSON @@ -204,35 +204,35 @@
- +
JSON values are correlated to their schema by the "describedby" relation, where the schema is the target of the relation. JSON values MUST be of the "application/json" media type or - any other subtype. Consequently, dictating how a JSON value should + any other subtype. Consequently, dictating how a JSON value should specify the relation to the schema is beyond the normative scope of this document since this document specifically defines the JSON Schema media type, and no other. It is RECOMMNENDED that JSON values specify their schema so that user agents can interpret the instance and retain the self-descriptive characteristics. This avoides the need for out-of-band information about instance data. Two approaches are recommended for declaring the - relation to the schema that describes the meaning of a JSON instance's (or collection + relation to the schema that describes the meaning of a JSON instance's (or collection of instances) structure. A MIME type parameter named "profile" or a relation of "describedby" (which could be specified by a Link header) may be used: - +
-
- + or if the content is being transferred by a protocol (such as HTTP) that provides headers, a Link header can be used: - +
; rel="describedby" ]]>
- - Instances MAY specify multiple schemas, to indicate all the schemas that - are applicable to the data, and the data SHOULD be valid by all the schemas. - The instance data MAY have multiple schemas - that it is described by (the instance data SHOULD be valid for those schemas). - Or if the document is a collection of instances, the collection MAY contain - instances from different schemas. The mechanism for referencing a schema is - determined by the media type of the instance (if it provides a method for + + Instances MAY specify multiple schemas, to indicate all the schemas that + are applicable to the data, and the data SHOULD be valid by all the schemas. + The instance data MAY have multiple schemas + that it is described by (the instance data SHOULD be valid for those schemas). + Or if the document is a collection of instances, the collection MAY contain + instances from different schemas. The mechanism for referencing a schema is + determined by the media type of the instance (if it provides a method for referencing schemas).
- +
- JSON Schemas can themselves be described using JSON Schemas. + JSON Schemas can themselves be described using JSON Schemas. A self-describing JSON Schema for the core JSON Schema can - be found at http://json-schema.org/schema for the latest version or - http://json-schema.org/draft-04/schema for the draft-04 version. The hyper schema - self-description can be found at http://json-schema.org/hyper-schema + be found at http://json-schema.org/schema for the latest version or + http://json-schema.org/draft-04/schema for the draft-04 version. The hyper schema + self-description can be found at http://json-schema.org/hyper-schema or http://json-schema.org/draft-04/hyper-schema. All schemas used within a protocol with a media type specified SHOULD include a MIME parameter that refers to the self-descriptive hyper schema or another schema that extends this hyper schema: - +
- @@ -273,15 +273,15 @@ Content-Type: application/json;
- +
- A JSON Schema is a JSON object that defines various attributes + A JSON Schema is a JSON object that defines various attributes (including usage and valid values) of a JSON value. JSON Schema has recursive capabilities; there are a number of elements in the structure that allow for nested JSON Schemas. - +
An example JSON Schema could look like: @@ -305,17 +305,17 @@ Content-Type: application/json; ]]>
- + A JSON Schema object MAY have any of the following optional properties: - + - +
- This attribute defines what the primitive type or the schema of the instance MUST be in order to validate. + This attribute defines what the primitive type or the schema of the instance MUST be in order to validate. This attribute can take one of two forms: @@ -332,16 +332,16 @@ Content-Type: application/json; Instance MAY be of any type, including null. - + An array of one or more simple or schema types. - The instance value is valid if it is of the same type as one of the simple types, or valid by one of the schemas, in the array. + The instance value is valid if it is of the same type as one of the simple types, or valid by one of the schemas, in the array. - - If this attribute is not specified, then all value types are accepted. + + If this attribute is not specified, then all value types are accepted. - +
For example, a schema that defines if an instance can be a string or a number would be: @@ -352,37 +352,37 @@ Content-Type: application/json; ]]>
- +
This attribute is an object with properties that specify the schemas for the properties of the instance object. - In this attribute's object, each property value MUST be a schema. + In this attribute's object, each property value MUST be a schema. When the instance value is an object, the value of the instance's properties MUST be valid according to the schemas with the same property names specified in this attribute. Objects are unordered, so therefore the order of the instance properties or attribute properties MUST NOT determine validation success.
- +
- This attribute is an object that defines the schema for a set of property names of an object instance. - The name of each property of this attribute's object is a regular expression pattern in the ECMA 262/Perl 5 format, while the value is a schema. + This attribute is an object that defines the schema for a set of property names of an object instance. + The name of each property of this attribute's object is a regular expression pattern in the ECMA 262/Perl 5 format, while the value is a schema. If the pattern matches the name of a property on the instance object, the value of the instance's property MUST be valid against the pattern name's schema value.
- +
- This attribute specifies how any instance property that is not explicitly defined by either the "properties" or "patternProperties" attributes (hereafter referred to as "additional properties") is handled. If specified, the value MUST be a schema or a boolean. + This attribute specifies how any instance property that is not explicitly defined by either the "properties" or "patternProperties" attributes (hereafter referred to as "additional properties") is handled. If specified, the value MUST be a schema or a boolean. If a schema is provided, then all additional properties MUST be valid according to the schema. If false is provided, then no additional properties are allowed. The default value is an empty schema, which allows any value for additional properties.
- +
This attribute provides the allowed items in an array instance. If specified, this attribute MUST be a schema or an array of schemas. When this attribute value is a schema and the instance value is an array, then all the items in the array MUST be valid according to the schema. When this attribute value is an array of schemas and the instance value is an array, each position in the instance array MUST be valid according to the schema in the corresponding position for this array. This called tuple typing. When tuple typing is used, additional items are allowed, disallowed, or constrained by the "additionalItems" attribute the same way as "additionalProperties" for objects is.
- +
This attribute specifies how any item in the array instance that is not explicitly defined by "items" (hereafter referred to as "additional items") is handled. If specified, the value MUST be a schema or a boolean. If a schema is provided: @@ -395,16 +395,16 @@ Content-Type: application/json; If false is provided, then any additional items in the array are not allowed. The default value is an empty schema, which allows any value for additional items.
- +
This attribute is an array of strings that defines all the property names that must exist on the object instance.
- +
This attribute is an object that specifies the requirements of a property on an object instance. If an object instance has a property with the same name as a property in this attribute's object, then the instance must be valid against the attribute's property value (hereafter referred to as the "dependency value"). The dependency value can take one of two forms: - + If the dependency value is a string, then the instance object MUST have a property with the same name as the dependency value. @@ -416,44 +416,44 @@ Content-Type: application/json;
- +
This attribute defines the minimum value of the instance property when the type of the instance value is a number.
- +
This attribute defines the maximum value of the instance property when the type of the instance value is a number.
- +
This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "minimum" attribute. This is false by default, meaning the instance value can be greater then or equal to the minimum value.
- +
This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "maximum" attribute. This is false by default, meaning the instance value can be less then or equal to the maximum value.
- +
This attribute defines the minimum number of values in an array when the array is the instance value.
- +
This attribute defines the maximum number of values in an array when the array is the instance value.
- +
This attribute defines the minimum number of properties required on an object instance.
- +
This attribute defines the maximum number of properties the object instance can have.
- +
This attribute indicates that all items in an array instance MUST be unique (contains no two identical values). Two instance are consider equal if they are both of the same type and: - + are null; or are booleans/numbers/strings and have the same value; or @@ -462,43 +462,43 @@ Content-Type: application/json;
- +
When the instance value is a string, this provides a regular expression that a string instance MUST match in order to be valid. Regular expressions SHOULD follow the regular expression specification from ECMA 262/Perl 5
- +
When the instance value is a string, this defines the minimum length of the string.
- +
When the instance value is a string, this defines the maximum length of the string.
- +
This provides an enumeration of all possible values that are valid for the instance property. This MUST be an array, and each item in the array represents a possible value for the instance value. If this attribute is defined, the instance value MUST be one of the values in the array in order for the schema to be valid. Comparison of enum values uses the same algorithm as defined in "uniqueItems".
- +
This attribute defines the default value of the instance when the instance is undefined.
- +
This attribute is a string that provides a short description of the instance property.
- +
This attribute is a string that provides a full description of the of purpose the instance property.
- +
This attribute defines what value the number instance must be divisible by with no remainder (the result of the division must be an integer.) The value of this attribute SHOULD NOT be 0.
- +
This attribute takes the same values as the "type" attribute, however if the instance matches the type or if this value is an array and the instance matches any type or schema in the array, then this instance is not valid.
- +
The value of this property MUST be another schema which will provide a base schema which the current schema will inherit from. The inheritance rules are such that any instance that is valid according to the current schema MUST be valid according to the referenced schema. This MAY also be an array, in which case, the instance MUST be valid for all the schemas in the array. A schema that extends another schema MAY define additional attributes, constrain existing attributes, or add other constraints. @@ -506,7 +506,7 @@ Content-Type: application/json; instance against all constraints in the extending schema as well as the extended schema(s). More optimized implementations that merge schemas are possible, but are not required. Some examples of using "extends": - +
- +
- +
This attribute defines the current URI of this schema (this attribute is @@ -553,28 +553,28 @@ Content-Type: application/json; is also used to construct relative references such as for $ref.
- +
- This attribute defines a URI of a schema that contains the full representation of this schema. - When a validator encounters this attribute, it SHOULD replace the current schema with the schema referenced by the value's URI (if known and available) and re-validate the instance. + This attribute defines a URI of a schema that contains the full representation of this schema. + When a validator encounters this attribute, it SHOULD replace the current schema with the schema referenced by the value's URI (if known and available) and re-validate the instance. This URI MAY be relative or absolute, and relative URIs SHOULD be resolved against the URI of the current schema.
- +
- This attribute defines a URI of a JSON Schema that is the schema of the current schema. + This attribute defines a URI of a JSON Schema that is the schema of the current schema. When this attribute is defined, a validator SHOULD use the schema referenced by the value's URI (if known and available) when resolving Hyper Schemalinks. - + - A validator MAY use this attribute's value to determine which version of JSON Schema the current schema is written in, and provide the appropriate validation features and behavior. + A validator MAY use this attribute's value to determine which version of JSON Schema the current schema is written in, and provide the appropriate validation features and behavior. Therefore, it is RECOMMENDED that all schema authors include this attribute in their schemas to prevent conflicts with future JSON Schema specification changes.
- +
The following attributes are specified in addition to those @@ -586,30 +586,30 @@ Content-Type: application/json; essentially describes plain JSON (no constraints on the structures). Addition of attributes provides additive information for user agents. - +
- The value of the links property MUST be an array, where each item + The value of the links property MUST be an array, where each item in the array is a link description object which describes the link relations of the instances. - + - +
- A link description object is used to describe link relations. In - the context of a schema, it defines the link relations of the + A link description object is used to describe link relations. In + the context of a schema, it defines the link relations of the instances of the schema, and can be parameterized by the instance - values. The link description format can be used without JSON Schema, + values. The link description format can be used without JSON Schema, and use of this format can be declared by referencing the normative link description - schema as the the schema for the data structure that uses the - links. The URI of the normative link description schema is: + schema as the the schema for the data structure that uses the + links. The URI of the normative link description schema is: http://json-schema.org/links (latest version) or http://json-schema.org/draft-04/links (draft-04 version). - +
The value of the "href" link description property @@ -617,19 +617,19 @@ Content-Type: application/json; of the instance property SHOULD be resolved as a URI-Reference per RFC 3986 and MAY be a relative URI. The base URI to be used for relative resolution SHOULD be the URI used to retrieve the instance object (not the schema) - when used within a schema. Also, when links are used within a schema, the URI - SHOULD be parametrized by the property values of the instance + when used within a schema. Also, when links are used within a schema, the URI + SHOULD be parametrized by the property values of the instance object, if property values exist for the corresponding variables in the template (otherwise they MAY be provided from alternate sources, like user input). - + Instance property values SHOULD be substituted into the URIs where matching braces ('{', '}') are found surrounding zero or more characters, creating an expanded URI. Instance property value substitutions are resolved by using the text between the braces to denote the property name - from the instance to get the value to substitute. - + from the instance to get the value to substitute. +
For example, if an href value is defined: @@ -639,7 +639,7 @@ http://somesite.com/{id} Then it would be resolved by replace the value of the "id" property value from the instance object.
- +
If the value of the "id" property was "45", the expanded URI would be: @@ -648,23 +648,23 @@ http://somesite.com/45 ]]>
- - If matching braces are found with the string "@" (no quotes) between the braces, then the + + If matching braces are found with the string "@" (no quotes) between the braces, then the actual instance value SHOULD be used to replace the braces, rather than a property value. - This should only be used in situations where the instance is a scalar (string, + This should only be used in situations where the instance is a scalar (string, boolean, or number), and not for objects or arrays.
- +
- The value of the "rel" property indicates the name of the + The value of the "rel" property indicates the name of the relation to the target resource. The relation to the target SHOULD be interpreted as specifically from the instance object that the schema (or sub-schema) applies to, not just the top level resource that contains the object within its hierarchy. If a resource JSON representation contains a sub object with a property interpreted as a link, that sub-object holds the relation with the target. A relation to target from the top level resource MUST be indicated with the schema describing the top level JSON representation. - + Relationship definitions SHOULD NOT be media type dependent, and users are encouraged to utilize existing accepted relation definitions, including those in existing relation registries (see RFC 4287). However, we define these relations here for clarity of normative interpretation within the context of JSON hyper schema defined relations: - + If the relation value is "self", when this property is encountered in @@ -672,15 +672,15 @@ http://somesite.com/45 treated as a full representation of the target resource identified by the specified URI. - + This indicates that the target of the link is the full representation for the instance object. The object that contains this link possibly may not be the full representation. - + This indicates the target of the link is the schema for the instance object. This MAY be used to specifically denote the schemas of objects within a JSON object hierarchy, facilitating polymorphic type data structures. - + This relation indicates that the target of the link SHOULD be treated as the root or the body of the representation for the @@ -690,7 +690,7 @@ http://somesite.com/45 - + The following relations are applicable for schemas (the schema as the "from" resource in the relation): @@ -699,7 +699,7 @@ http://somesite.com/45 This indicates a target to use for creating new instances of a schema. This link definition SHOULD be a submission link with a non-safe method (like POST). - +
For example, if a schema is defined: @@ -720,7 +720,7 @@ http://somesite.com/45 ]]>
- +
And if a collection of instance resource's JSON representation was retrieved: @@ -744,41 +744,41 @@ GET /Resource/ The "children" collection would be located at "/Resource/?upId=thing".
- +
This property value is a string that defines the templating language used in the "href" attribute. If no templating language is defined, then the default Link Description Object templating langauge is used.
- +
This property value is a schema that defines the expected structure of the JSON representation of the target of the link.
- +
- The following properties also apply to link definition objects, and - provide functionality analogous to HTML forms, in providing a + The following properties also apply to link definition objects, and + provide functionality analogous to HTML forms, in providing a means for submitting extra (often user supplied) information to send to a server. - +
- This attribute defines which method can be used to access the target resource. - In an HTTP environment, this would be "GET" or "POST" (other HTTP methods - such as "PUT" and "DELETE" have semantics that are clearly implied by - accessed resources, and do not need to be defined here). + This attribute defines which method can be used to access the target resource. + In an HTTP environment, this would be "GET" or "POST" (other HTTP methods + such as "PUT" and "DELETE" have semantics that are clearly implied by + accessed resources, and do not need to be defined here). This defaults to "GET".
- +
If present, this property indicates a query media type format that the server - supports for querying or posting to the collection of instances at the target - resource. The query can be + supports for querying or posting to the collection of instances at the target + resource. The query can be suffixed to the target URI to query the collection with property-based constraints on the resources that SHOULD be returned from the server or used to post data to the resource (depending on the method). - +
For example, with the following schema: @@ -799,7 +799,7 @@ GET /Resource/ This indicates that the client can query the server for instances that have a specific name.
- +
For example: @@ -809,23 +809,23 @@ GET /Resource/
- If no enctype or method is specified, only the single URI specified by - the href property is defined. If the method is POST, "application/json" is + If no enctype or method is specified, only the single URI specified by + the href property is defined. If the method is POST, "application/json" is the default media type.
- +
This attribute contains a schema which defines the acceptable structure of the submitted - request (for a GET request, this schema would define the properties for the query string + request (for a GET request, this schema would define the properties for the query string and for a POST request, this would define the body).
- +
This property indicates the fragment resolution protocol to use for @@ -835,62 +835,62 @@ GET /Resource/ protocol is "json-pointer", which is defined below. Other fragment resolution protocols MAY be used, but are not defined in this document. - + The fragment identifier is based on RFC 3986, Sec 5, and defines the mechanism for resolving references to entities within a document. - +
The "json-pointer" fragment resolution protocol uses a JSON Pointer to resolve fragment identifiers in URIs within instance representations.
- + - +
This attribute indicates that the instance value SHOULD NOT be changed. Attempts by a user agent to modify the value of this property are expected to be rejected by a server.
- +
If the instance property value is a string, this attribute defines that the string SHOULD be interpreted as binary data and decoded using the encoding named by this schema property. RFC 2045, Sec 6.1 lists the possible values for this property.
- +
- This attribute is a URI that defines what the instance's URI MUST start with in order to validate. - The value of the "pathStart" attribute MUST be resolved as per RFC 3986, Sec 5, + This attribute is a URI that defines what the instance's URI MUST start with in order to validate. + The value of the "pathStart" attribute MUST be resolved as per RFC 3986, Sec 5, and is relative to the instance's URI. - + - When multiple schemas have been referenced for an instance, the user agent - can determine if this schema is applicable for a particular instance by + When multiple schemas have been referenced for an instance, the user agent + can determine if this schema is applicable for a particular instance by determining if the URI of the instance begins with the the value of the "pathStart" - attribute. If the URI of the instance does not start with this URI, - or if another schema specifies a starting URI that is longer and also matches the - instance, this schema SHOULD NOT be applied to the instance. Any schema - that does not have a pathStart attribute SHOULD be considered applicable + attribute. If the URI of the instance does not start with this URI, + or if another schema specifies a starting URI that is longer and also matches the + instance, this schema SHOULD NOT be applied to the instance. Any schema + that does not have a pathStart attribute SHOULD be considered applicable to all the instances for which it is referenced.
- +
This attribute defines the media type of the instance representations that this schema is defining.
- +
- This specification is a sub-type of the JSON format, and - consequently the security considerations are generally the same as RFC 4627. + This specification is a sub-type of the JSON format, and + consequently the security considerations are generally the same as RFC 4627. However, an additional issue is that when link relation of "self" - is used to denote a full representation of an object, the user agent + is used to denote a full representation of an object, the user agent SHOULD NOT consider the representation to be the authoritative representation of the resource denoted by the target URI if the target URI is not - equivalent to or a sub-path of the the URI used to request the resource + equivalent to or a sub-path of the the URI used to request the resource representation which contains the target URI with the "self" link. - +
For example, if a hyper schema was defined: @@ -904,7 +904,7 @@ GET /Resource/ ]]>
- +
And a resource was requested from somesite.com: @@ -941,22 +941,22 @@ Content-Type: application/json; profile=/schema-for-this-data
- +
The proposed MIME media type for JSON Schema is "application/schema+json". Type name: application Subtype name: schema+json Required parameters: profile - The value of the profile parameter SHOULD be a URI (relative or absolute) that - refers to the schema used to define the structure of this structure (the + The value of the profile parameter SHOULD be a URI (relative or absolute) that + refers to the schema used to define the structure of this structure (the meta-schema). Normally the value would be http://json-schema.org/draft-04/hyper-schema, but it is allowable to use other schemas that extend the hyper schema's meta- schema. Optional parameters: pretty The value of the pretty parameter MAY be true or false to indicate if additional whitespace has been included to make the JSON representation easier to read. - +
This registry is maintained by IANA per RFC 4287 and this specification adds @@ -968,7 +968,7 @@ Content-Type: application/json; profile=/schema-for-this-data
- + @@ -1019,7 +1019,7 @@ Content-Type: application/json; profile=/schema-for-this-data Improved wording of many sections.
- + Added example and verbiage to "extends" attribute. @@ -1043,7 +1043,7 @@ Content-Type: application/json; profile=/schema-for-this-data Added "$ref" and "$schema" attributes. - + Replaced "maxDecimal" attribute with "divisibleBy" attribute. @@ -1053,13 +1053,13 @@ Content-Type: application/json; profile=/schema-for-this-data Added "targetSchema" attribute to link description object. - + Fixed category and updates from template. - + Initial draft. diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/links.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/links.js index 5b1bbbfdd61c8d..2ef3f9fb7d0afe 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/links.js +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/links.js @@ -1,21 +1,35 @@ -/** +/** * JSON Schema link handler * Copyright (c) 2007 Kris Zyp SitePen (www.sitepen.com) * Licensed under the MIT (MIT-LICENSE.txt) license. */ -({define:typeof define!="undefined"?define:function(deps, factory){module.exports = factory();}}). -define([], function(){ +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define([], function () { + return factory(); + }); + } else if (typeof module === 'object' && module.exports) { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals + root.jsonSchemaLinks = factory(); + } +}(this, function () {// setup primitive classes to be JSON Schema types var exports = {}; exports.cacheLinks = true; exports.getLink = function(relation, instance, schema){ // gets the URI of the link for the given relation based on the instance and schema // for example: // getLink( - // "brother", - // {"brother_id":33}, + // "brother", + // {"brother_id":33}, // {links:[{rel:"brother", href:"Brother/{brother_id}"}]}) -> // "Brother/33" - var links = schema.__linkTemplates; + var links = schema.__linkTemplates; if(!links){ links = {}; var schemaLinks = schema.links; @@ -49,4 +63,4 @@ exports.substitute = function(linkTemplate, instance){ }); }; return exports; -}); \ No newline at end of file +})); \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/validate.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/validate.js index 97cbbf6fa34603..4b6108800aafb5 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/validate.js +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/validate.js @@ -13,10 +13,23 @@ empty list will be returned. A validation error will have two properties: "property" which indicates which property had the error "message" which indicates what the error was */ -({define:typeof define!="undefined"?define:function(deps, factory){module.exports = factory();}}). -define([], function(){ -var exports = validate; -// setup primitive classes to be JSON Schema types +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define([], function () { + return factory(); + }); + } else if (typeof module === 'object' && module.exports) { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals + root.jsonSchema = factory(); + } +}(this, function () {// setup primitive classes to be JSON Schema types +var exports = validate exports.Integer = {type:"integer"}; var primitiveConstructors = { String: String, @@ -194,8 +207,8 @@ var validate = exports._validate = function(/*Any*/instance,/*Object*/schema,/*O if(typeof instance != 'object' || instance instanceof Array){ errors.push({property:path,message:"an object is required"}); } - - for(var i in objTypeDef){ + + for(var i in objTypeDef){ if(objTypeDef.hasOwnProperty(i)){ var value = instance[i]; // skip _not_ specified properties @@ -257,4 +270,4 @@ exports.mustBeValid = function(result){ } return exports; -}); +})); diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/package.json index b77d8b34664b20..f2de2d65f7ae1e 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/package.json +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/package.json @@ -2,44 +2,48 @@ "_args": [ [ { - "raw": "json-schema@0.2.2", + "raw": "json-schema@0.2.3", "scope": null, "escapedName": "json-schema", "name": "json-schema", - "rawSpec": "0.2.2", - "spec": "0.2.2", + "rawSpec": "0.2.3", + "spec": "0.2.3", "type": "version" }, "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim" ] ], - "_from": "json-schema@0.2.2", - "_id": "json-schema@0.2.2", + "_from": "json-schema@0.2.3", + "_id": "json-schema@0.2.3", "_inCache": true, - "_installable": true, "_location": "/request/http-signature/jsprim/json-schema", + "_nodeVersion": "6.1.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/json-schema-0.2.3.tgz_1473699189380_0.7420965158380568" + }, "_npmUser": { "name": "kriszyp", "email": "kriszyp@gmail.com" }, - "_npmVersion": "1.1.59", + "_npmVersion": "3.8.9", "_phantomChildren": {}, "_requested": { - "raw": "json-schema@0.2.2", + "raw": "json-schema@0.2.3", "scope": null, "escapedName": "json-schema", "name": "json-schema", - "rawSpec": "0.2.2", - "spec": "0.2.2", + "rawSpec": "0.2.3", + "spec": "0.2.3", "type": "version" }, "_requiredBy": [ "/request/http-signature/jsprim" ], - "_resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.2.tgz", - "_shasum": "50354f19f603917c695f70b85afa77c3b0f23506", + "_resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "_shasum": "b480c892e59a2f05954ce727bd3f2a4e882f9e13", "_shrinkwrap": null, - "_spec": "json-schema@0.2.2", + "_spec": "json-schema@0.2.3", "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim", "author": { "name": "Kris Zyp" @@ -56,9 +60,10 @@ "lib": "./lib" }, "dist": { - "shasum": "50354f19f603917c695f70b85afa77c3b0f23506", - "tarball": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.2.tgz" + "shasum": "b480c892e59a2f05954ce727bd3f2a4e882f9e13", + "tarball": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz" }, + "gitHead": "07ae2c618b5f581dbc108e065f4f95dcf0a1d85f", "homepage": "https://github.com/kriszyp/json-schema#readme", "keywords": [ "json", @@ -83,7 +88,7 @@ ], "name": "json-schema", "optionalDependencies": {}, - "readme": "JSON Schema is a repository for the JSON Schema specification, reference schemas and a CommonJS implementation of JSON Schema (not the only JavaScript implementation of JSON Schema, JSV is another excellent JavaScript validator).\r\n\r\nCode is licensed under the AFL or BSD license as part of the Persevere \r\nproject which is administered under the Dojo foundation,\r\nand all contributions require a Dojo CLA.", + "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git+ssh://git@github.com/kriszyp/json-schema.git" @@ -91,5 +96,5 @@ "scripts": { "test": "echo TESTS DISABLED vows --spec test/*.js" }, - "version": "0.2.2" + "version": "0.2.3" } diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/package.json index e7c32411843366..974d4af4236c75 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/package.json +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/package.json @@ -14,20 +14,19 @@ ] ], "_from": "jsprim@>=1.2.2 <2.0.0", - "_id": "jsprim@1.3.0", + "_id": "jsprim@1.3.1", "_inCache": true, - "_installable": true, "_location": "/request/http-signature/jsprim", "_nodeVersion": "0.12.7", "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/jsprim-1.3.0.tgz_1466708163640_0.5282344303559512" + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/jsprim-1.3.1.tgz_1473725209917_0.5387293708045036" }, "_npmUser": { "name": "dap", "email": "dap@cs.brown.edu" }, - "_npmVersion": "2.11.3", + "_npmVersion": "2.15.9", "_phantomChildren": {}, "_requested": { "raw": "jsprim@^1.2.2", @@ -41,8 +40,8 @@ "_requiredBy": [ "/request/http-signature" ], - "_resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.0.tgz", - "_shasum": "ce2e1bef835204b4f3099928c602f8b6ae615650", + "_resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.1.tgz", + "_shasum": "2a7256f70412a29ee3670aaca625994c4dcff252", "_shrinkwrap": null, "_spec": "jsprim@^1.2.2", "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature", @@ -51,20 +50,20 @@ }, "dependencies": { "extsprintf": "1.0.2", - "json-schema": "0.2.2", + "json-schema": "0.2.3", "verror": "1.3.6" }, "description": "utilities for primitive JavaScript types", "devDependencies": {}, "directories": {}, "dist": { - "shasum": "ce2e1bef835204b4f3099928c602f8b6ae615650", - "tarball": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.0.tgz" + "shasum": "2a7256f70412a29ee3670aaca625994c4dcff252", + "tarball": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.1.tgz" }, "engines": [ "node >=0.6.0" ], - "gitHead": "694edcb22e2291c21f6c2a23907bf02e1edbfdf4", + "gitHead": "825aba45c6cff4340c18cdae363ccb5bdf840bd7", "homepage": "https://github.com/davepacheco/node-jsprim#readme", "license": "MIT", "main": "./lib/jsprim.js", @@ -82,5 +81,5 @@ "url": "git://github.com/davepacheco/node-jsprim.git" }, "scripts": {}, - "version": "1.3.0" + "version": "1.3.1" } diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv index a1205a45d5431f..444045a5e8a8a0 100755 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv @@ -149,6 +149,12 @@ if (require.main === module) { } catch (e) { if (e.name === 'KeyEncryptedError') { getPassword(function (err, pw) { + if (err) { + console.log('sshpk-conv: ' + + err.name + ': ' + + err.message); + process.exit(1); + } parseOpts.passphrase = pw; processKey(); }); diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pem.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pem.js index 5318b35165336d..c254e4e804c6f6 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pem.js +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pem.js @@ -107,9 +107,9 @@ function read(buf, options, forceType) { /* The new OpenSSH internal format abuses PEM headers */ if (alg && alg.toLowerCase() === 'openssh') - return (sshpriv.readSSHPrivate(type, buf)); + return (sshpriv.readSSHPrivate(type, buf, options)); if (alg && alg.toLowerCase() === 'ssh2') - return (rfc4253.readType(type, buf)); + return (rfc4253.readType(type, buf, options)); var der = new asn1.BerReader(buf); der.originalInput = input; diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/ssh-private.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/ssh-private.js index bfbdab527f9b82..2fcf71990c4725 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/ssh-private.js +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/ssh-private.js @@ -17,6 +17,9 @@ var PrivateKey = require('../private-key'); var pem = require('./pem'); var rfc4253 = require('./rfc4253'); var SSHBuffer = require('../ssh-buffer'); +var errors = require('../errors'); + +var bcrypt; function read(buf, options) { return (pem.read(buf, options)); @@ -24,7 +27,7 @@ function read(buf, options) { var MAGIC = 'openssh-key-v1'; -function readSSHPrivate(type, buf) { +function readSSHPrivate(type, buf, options) { buf = new SSHBuffer({buffer: buf}); var magic = buf.readCString(); @@ -32,16 +35,7 @@ function readSSHPrivate(type, buf) { var cipher = buf.readString(); var kdf = buf.readString(); - - /* We only support unencrypted keys. */ - if (cipher !== 'none' || kdf !== 'none') { - throw (new Error('OpenSSH-format key is encrypted ' + - '(password-protected). Please use the SSH agent ' + - 'or decrypt the key.')); - } - - /* Skip over kdfoptions. */ - buf.readString(); + var kdfOpts = buf.readBuffer(); var nkeys = buf.readInt(); if (nkeys !== 1) { @@ -59,11 +53,74 @@ function readSSHPrivate(type, buf) { var privKeyBlob = buf.readBuffer(); assert.ok(buf.atEnd(), 'excess bytes left after key'); + var kdfOptsBuf = new SSHBuffer({ buffer: kdfOpts }); + switch (kdf) { + case 'none': + if (cipher !== 'none') { + throw (new Error('OpenSSH-format key uses KDF "none" ' + + 'but specifies a cipher other than "none"')); + } + break; + case 'bcrypt': + var salt = kdfOptsBuf.readBuffer(); + var rounds = kdfOptsBuf.readInt(); + var cinf = utils.opensshCipherInfo(cipher); + if (bcrypt === undefined) { + bcrypt = require('bcrypt-pbkdf'); + } + + if (typeof (options.passphrase) === 'string') { + options.passphrase = new Buffer(options.passphrase, + 'utf-8'); + } + if (!Buffer.isBuffer(options.passphrase)) { + throw (new errors.KeyEncryptedError( + options.filename, 'OpenSSH')); + } + + var pass = new Uint8Array(options.passphrase); + var salti = new Uint8Array(salt); + /* Use the pbkdf to derive both the key and the IV. */ + var out = new Uint8Array(cinf.keySize + cinf.blockSize); + var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length, + out, out.length, rounds); + if (res !== 0) { + throw (new Error('bcrypt_pbkdf function returned ' + + 'failure, parameters invalid')); + } + out = new Buffer(out); + var ckey = out.slice(0, cinf.keySize); + var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize); + var cipherStream = crypto.createDecipheriv(cinf.opensslName, + ckey, iv); + cipherStream.setAutoPadding(false); + var chunk, chunks = []; + cipherStream.once('error', function (e) { + if (e.toString().indexOf('bad decrypt') !== -1) { + throw (new Error('Incorrect passphrase ' + + 'supplied, could not decrypt key')); + } + throw (e); + }); + cipherStream.write(privKeyBlob); + cipherStream.end(); + while ((chunk = cipherStream.read()) !== null) + chunks.push(chunk); + privKeyBlob = Buffer.concat(chunks); + break; + default: + throw (new Error( + 'OpenSSH-format key uses unknown KDF "' + kdf + '"')); + } + buf = new SSHBuffer({buffer: privKeyBlob}); var checkInt1 = buf.readInt(); var checkInt2 = buf.readInt(); - assert.strictEqual(checkInt1, checkInt2, 'checkints do not match'); + if (checkInt1 !== checkInt2) { + throw (new Error('Incorrect passphrase supplied, could not ' + + 'decrypt key')); + } var ret = {}; var key = rfc4253.readInternal(ret, 'private', buf.remainder()); @@ -83,6 +140,26 @@ function write(key, options) { else pubKey = key; + var cipher = 'none'; + var kdf = 'none'; + var kdfopts = new Buffer(0); + var cinf = { blockSize: 8 }; + var passphrase; + if (options !== undefined) { + passphrase = options.passphrase; + if (typeof (passphrase) === 'string') + passphrase = new Buffer(passphrase, 'utf-8'); + if (passphrase !== undefined) { + assert.buffer(passphrase, 'options.passphrase'); + assert.optionalString(options.cipher, 'options.cipher'); + cipher = options.cipher; + if (cipher === undefined) + cipher = 'aes128-ctr'; + cinf = utils.opensshCipherInfo(cipher); + kdf = 'bcrypt'; + } + } + var privBuf; if (PrivateKey.isPrivateKey(key)) { privBuf = new SSHBuffer({}); @@ -93,22 +170,68 @@ function write(key, options) { privBuf.writeString(key.comment || ''); var n = 1; - while (privBuf._offset % 8 !== 0) + while (privBuf._offset % cinf.blockSize !== 0) privBuf.writeChar(n++); + privBuf = privBuf.toBuffer(); + } + + switch (kdf) { + case 'none': + break; + case 'bcrypt': + var salt = crypto.randomBytes(16); + var rounds = 16; + var kdfssh = new SSHBuffer({}); + kdfssh.writeBuffer(salt); + kdfssh.writeInt(rounds); + kdfopts = kdfssh.toBuffer(); + + if (bcrypt === undefined) { + bcrypt = require('bcrypt-pbkdf'); + } + var pass = new Uint8Array(passphrase); + var salti = new Uint8Array(salt); + /* Use the pbkdf to derive both the key and the IV. */ + var out = new Uint8Array(cinf.keySize + cinf.blockSize); + var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length, + out, out.length, rounds); + if (res !== 0) { + throw (new Error('bcrypt_pbkdf function returned ' + + 'failure, parameters invalid')); + } + out = new Buffer(out); + var ckey = out.slice(0, cinf.keySize); + var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize); + + var cipherStream = crypto.createCipheriv(cinf.opensslName, + ckey, iv); + cipherStream.setAutoPadding(false); + var chunk, chunks = []; + cipherStream.once('error', function (e) { + throw (e); + }); + cipherStream.write(privBuf); + cipherStream.end(); + while ((chunk = cipherStream.read()) !== null) + chunks.push(chunk); + privBuf = Buffer.concat(chunks); + break; + default: + throw (new Error('Unsupported kdf ' + kdf)); } var buf = new SSHBuffer({}); buf.writeCString(MAGIC); - buf.writeString('none'); /* cipher */ - buf.writeString('none'); /* kdf */ - buf.writeBuffer(new Buffer(0)); /* kdfoptions */ + buf.writeString(cipher); /* cipher */ + buf.writeString(kdf); /* kdf */ + buf.writeBuffer(kdfopts); /* kdfoptions */ buf.writeInt(1); /* nkeys */ buf.writeBuffer(pubKey.toBuffer('rfc4253')); if (privBuf) - buf.writeBuffer(privBuf.toBuffer()); + buf.writeBuffer(privBuf); buf = buf.toBuffer(); diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/utils.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/utils.js index d57245cc16b41d..466634c00ecbd7 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/utils.js +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/utils.js @@ -9,7 +9,8 @@ module.exports = { countZeros: countZeros, assertCompatible: assertCompatible, isCompatible: isCompatible, - opensslKeyDeriv: opensslKeyDeriv + opensslKeyDeriv: opensslKeyDeriv, + opensshCipherInfo: opensshCipherInfo }; var assert = require('assert-plus'); @@ -244,3 +245,44 @@ function addRSAMissing(key) { key.parts.push(key.part.dmodq); } } + +function opensshCipherInfo(cipher) { + var inf = {}; + switch (cipher) { + case '3des-cbc': + inf.keySize = 24; + inf.blockSize = 8; + inf.opensslName = 'des-ede3-cbc'; + break; + case 'blowfish-cbc': + inf.keySize = 16; + inf.blockSize = 8; + inf.opensslName = 'bf-cbc'; + break; + case 'aes128-cbc': + case 'aes128-ctr': + case 'aes128-gcm@openssh.com': + inf.keySize = 16; + inf.blockSize = 16; + inf.opensslName = 'aes-128-' + cipher.slice(7, 10); + break; + case 'aes192-cbc': + case 'aes192-ctr': + case 'aes192-gcm@openssh.com': + inf.keySize = 24; + inf.blockSize = 16; + inf.opensslName = 'aes-192-' + cipher.slice(7, 10); + break; + case 'aes256-cbc': + case 'aes256-ctr': + case 'aes256-gcm@openssh.com': + inf.keySize = 32; + inf.blockSize = 16; + inf.opensslName = 'aes-256-' + cipher.slice(7, 10); + break; + default: + throw (new Error( + 'Unsupported openssl cipher "' + cipher + '"')); + } + return (inf); +} diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf/README.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf/README.md new file mode 100644 index 00000000000000..12018090bb18f4 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf/README.md @@ -0,0 +1,39 @@ +Port of the OpenBSD `bcrypt_pbkdf` function to pure Javascript. `npm`-ified +version of [Devi Mandiri's port] +(https://github.com/devi/tmp/blob/master/js/bcrypt_pbkdf.js), +with some minor performance improvements. The code is copied verbatim (and +un-styled) from Devi's work. + +This product includes software developed by Niels Provos. + +## API + +### `bcrypt_pbkdf.pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds)` + +Derive a cryptographic key of arbitrary length from a given password and salt, +using the OpenBSD `bcrypt_pbkdf` function. This is a combination of Blowfish and +SHA-512. + +See [this article](http://www.tedunangst.com/flak/post/bcrypt-pbkdf) for +further information. + +Parameters: + + * `pass`, a Uint8Array of length `passlen` + * `passlen`, an integer Number + * `salt`, a Uint8Array of length `saltlen` + * `saltlen`, an integer Number + * `key`, a Uint8Array of length `keylen`, will be filled with output + * `keylen`, an integer Number + * `rounds`, an integer Number, number of rounds of the PBKDF to run + +### `bcrypt_pbkdf.hash(sha2pass, sha2salt, out)` + +Calculate a Blowfish hash, given SHA2-512 output of a password and salt. Used as +part of the inner round function in the PBKDF. + +Parameters: + + * `sha2pass`, a Uint8Array of length 64 + * `sha2salt`, a Uint8Array of length 64 + * `out`, a Uint8Array of length 32, will be filled with output diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf/index.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf/index.js new file mode 100644 index 00000000000000..ea29aa967cbc8e --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf/index.js @@ -0,0 +1,559 @@ +'use strict'; + +var crypto_hash_sha512 = require('tweetnacl').lowlevel.crypto_hash; + +/* + * This file is a 1:1 port from the OpenBSD blowfish.c and bcrypt_pbkdf.c. As a + * result, it retains the original copyright and license. The two files are + * under slightly different (but compatible) licenses, and are here combined in + * one file. + * + * Credit for the actual porting work goes to: + * Devi Mandiri + */ + +/* + * The Blowfish portions are under the following license: + * + * Blowfish block cipher for OpenBSD + * Copyright 1997 Niels Provos + * All rights reserved. + * + * Implementation advice by David Mazieres . + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Niels Provos. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * The bcrypt_pbkdf portions are under the following license: + * + * Copyright (c) 2013 Ted Unangst + * + * Permission to use, copy, modify, and 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. + */ + +/* + * Performance improvements (Javascript-specific): + * + * Copyright 2016, Joyent Inc + * Author: Alex Wilson + * + * Permission to use, copy, modify, and 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. + */ + +// Ported from OpenBSD bcrypt_pbkdf.c v1.9 + +var BLF_J = 0; + +var Blowfish = function() { + this.S = [ + new Uint32Array([ + 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, + 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, + 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, + 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, + 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, + 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, + 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, + 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e, + 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60, + 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, + 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, + 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a, + 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, + 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677, + 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, + 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, + 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88, + 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239, + 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, + 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0, + 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, + 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, + 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88, + 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe, + 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, + 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, + 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b, + 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, + 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba, + 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463, + 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, + 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09, + 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, + 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, + 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279, + 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, + 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, + 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82, + 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db, + 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, + 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, + 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, + 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, + 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8, + 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4, + 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, + 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, + 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c, + 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, + 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1, + 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, + 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, + 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477, + 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf, + 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, + 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, + 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa, + 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, + 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41, + 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, + 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, + 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, + 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, + 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a]), + new Uint32Array([ + 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, + 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, + 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, + 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, + 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, + 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, + 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, + 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1, + 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, + 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, + 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff, + 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, + 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, + 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7, + 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, + 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, + 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, + 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, + 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, + 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87, + 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, + 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, + 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16, + 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, + 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, + 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509, + 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, + 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, + 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f, + 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, + 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, + 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, + 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, + 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, + 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802, + 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, + 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, + 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf, + 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, + 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e, + 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50, + 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, + 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, + 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281, + 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, + 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, + 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, + 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, + 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, + 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0, + 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, + 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, + 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, + 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, + 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, + 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061, + 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, + 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e, + 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735, + 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, + 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, + 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, + 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, + 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7]), + new Uint32Array([ + 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, + 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, + 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, + 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, + 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, + 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504, + 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, + 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, + 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, + 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6, + 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, + 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b, + 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, + 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, + 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, + 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b, + 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, + 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, + 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, + 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, + 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17, + 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, + 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, + 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115, + 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, + 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, + 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, + 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, + 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, + 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d, + 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, + 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, + 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, + 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb, + 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, + 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c, + 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, + 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, + 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a, + 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, + 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, + 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc, + 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, + 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, + 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, + 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9, + 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, + 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, + 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, + 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, + 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, + 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169, + 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, + 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027, + 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, + 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, + 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634, + 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, + 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, + 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, + 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, + 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, + 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, + 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0]), + new Uint32Array([ + 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, + 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe, + 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, + 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, + 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, + 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6, + 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, + 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22, + 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, + 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, + 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9, + 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59, + 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, + 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, + 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, + 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, + 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b, + 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28, + 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, + 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd, + 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, + 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, + 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb, + 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, + 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, + 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32, + 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680, + 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, + 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, + 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, + 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, + 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47, + 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370, + 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, + 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84, + 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048, + 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, + 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd, + 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, + 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, + 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38, + 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f, + 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, + 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, + 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1, + 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, + 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964, + 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e, + 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, + 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, + 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f, + 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, + 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02, + 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, + 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, + 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a, + 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, + 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, + 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, + 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060, + 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, + 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, + 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, + 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6]) + ]; + this.P = new Uint32Array([ + 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, + 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, + 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c, + 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, + 0x9216d5d9, 0x8979fb1b]); +}; + +function F(S, x8, i) { + return (((S[0][x8[i+3]] + + S[1][x8[i+2]]) ^ + S[2][x8[i+1]]) + + S[3][x8[i]]); +}; + +Blowfish.prototype.encipher = function(x, x8) { + if (x8 === undefined) { + x8 = new Uint8Array(x.buffer); + if (x.byteOffset !== 0) + x8 = x8.subarray(x.byteOffset); + } + x[0] ^= this.P[0]; + for (var i = 1; i < 16; i += 2) { + x[1] ^= F(this.S, x8, 0) ^ this.P[i]; + x[0] ^= F(this.S, x8, 4) ^ this.P[i+1]; + } + var t = x[0]; + x[0] = x[1] ^ this.P[17]; + x[1] = t; +}; + +Blowfish.prototype.decipher = function(x) { + var x8 = new Uint8Array(x.buffer); + if (x.byteOffset !== 0) + x8 = x8.subarray(x.byteOffset); + x[0] ^= this.P[17]; + for (var i = 16; i > 0; i -= 2) { + x[1] ^= F(this.S, x8, 0) ^ this.P[i]; + x[0] ^= F(this.S, x8, 4) ^ this.P[i-1]; + } + var t = x[0]; + x[0] = x[1] ^ this.P[0]; + x[1] = t; +}; + +function stream2word(data, databytes){ + var i, temp = 0; + for (i = 0; i < 4; i++, BLF_J++) { + if (BLF_J >= databytes) BLF_J = 0; + temp = (temp << 8) | data[BLF_J]; + } + return temp; +}; + +Blowfish.prototype.expand0state = function(key, keybytes) { + var d = new Uint32Array(2), i, k; + var d8 = new Uint8Array(d.buffer); + + for (i = 0, BLF_J = 0; i < 18; i++) { + this.P[i] ^= stream2word(key, keybytes); + } + BLF_J = 0; + + for (i = 0; i < 18; i += 2) { + this.encipher(d, d8); + this.P[i] = d[0]; + this.P[i+1] = d[1]; + } + + for (i = 0; i < 4; i++) { + for (k = 0; k < 256; k += 2) { + this.encipher(d, d8); + this.S[i][k] = d[0]; + this.S[i][k+1] = d[1]; + } + } +}; + +Blowfish.prototype.expandstate = function(data, databytes, key, keybytes) { + var d = new Uint32Array(2), i, k; + + for (i = 0, BLF_J = 0; i < 18; i++) { + this.P[i] ^= stream2word(key, keybytes); + } + + for (i = 0, BLF_J = 0; i < 18; i += 2) { + d[0] ^= stream2word(data, databytes); + d[1] ^= stream2word(data, databytes); + this.encipher(d); + this.P[i] = d[0]; + this.P[i+1] = d[1]; + } + + for (i = 0; i < 4; i++) { + for (k = 0; k < 256; k += 2) { + d[0] ^= stream2word(data, databytes); + d[1] ^= stream2word(data, databytes); + this.encipher(d); + this.S[i][k] = d[0]; + this.S[i][k+1] = d[1]; + } + } + BLF_J = 0; +}; + +Blowfish.prototype.enc = function(data, blocks) { + for (var i = 0; i < blocks; i++) { + this.encipher(data.subarray(i*2)); + } +}; + +Blowfish.prototype.dec = function(data, blocks) { + for (var i = 0; i < blocks; i++) { + this.decipher(data.subarray(i*2)); + } +}; + +var BCRYPT_BLOCKS = 8, + BCRYPT_HASHSIZE = 32; + +function bcrypt_hash(sha2pass, sha2salt, out) { + var state = new Blowfish(), + cdata = new Uint32Array(BCRYPT_BLOCKS), i, + ciphertext = new Uint8Array([79,120,121,99,104,114,111,109,97,116,105, + 99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109, + 105,116,101]); //"OxychromaticBlowfishSwatDynamite" + + state.expandstate(sha2salt, 64, sha2pass, 64); + for (i = 0; i < 64; i++) { + state.expand0state(sha2salt, 64); + state.expand0state(sha2pass, 64); + } + + for (i = 0; i < BCRYPT_BLOCKS; i++) + cdata[i] = stream2word(ciphertext, ciphertext.byteLength); + for (i = 0; i < 64; i++) + state.enc(cdata, cdata.byteLength / 8); + + for (i = 0; i < BCRYPT_BLOCKS; i++) { + out[4*i+3] = cdata[i] >>> 24; + out[4*i+2] = cdata[i] >>> 16; + out[4*i+1] = cdata[i] >>> 8; + out[4*i+0] = cdata[i]; + } +}; + +function bcrypt_pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds) { + var sha2pass = new Uint8Array(64), + sha2salt = new Uint8Array(64), + out = new Uint8Array(BCRYPT_HASHSIZE), + tmpout = new Uint8Array(BCRYPT_HASHSIZE), + countsalt = new Uint8Array(saltlen+4), + i, j, amt, stride, dest, count, + origkeylen = keylen; + + if (rounds < 1) + return -1; + if (passlen === 0 || saltlen === 0 || keylen === 0 || + keylen > (out.byteLength * out.byteLength) || saltlen > (1<<20)) + return -1; + + stride = Math.floor((keylen + out.byteLength - 1) / out.byteLength); + amt = Math.floor((keylen + stride - 1) / stride); + + for (i = 0; i < saltlen; i++) + countsalt[i] = salt[i]; + + crypto_hash_sha512(sha2pass, pass, passlen); + + for (count = 1; keylen > 0; count++) { + countsalt[saltlen+0] = count >>> 24; + countsalt[saltlen+1] = count >>> 16; + countsalt[saltlen+2] = count >>> 8; + countsalt[saltlen+3] = count; + + crypto_hash_sha512(sha2salt, countsalt, saltlen + 4); + bcrypt_hash(sha2pass, sha2salt, tmpout); + for (i = out.byteLength; i--;) + out[i] = tmpout[i]; + + for (i = 1; i < rounds; i++) { + crypto_hash_sha512(sha2salt, tmpout, tmpout.byteLength); + bcrypt_hash(sha2pass, sha2salt, tmpout); + for (j = 0; j < out.byteLength; j++) + out[j] ^= tmpout[j]; + } + + amt = Math.min(amt, keylen); + for (i = 0; i < amt; i++) { + dest = i * stride + (count - 1); + if (dest >= origkeylen) + break; + key[dest] = out[i]; + } + keylen -= i; + } + + return 0; +}; + +module.exports = { + BLOCKS: BCRYPT_BLOCKS, + HASHSIZE: BCRYPT_HASHSIZE, + hash: bcrypt_hash, + pbkdf: bcrypt_pbkdf +}; diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf/package.json new file mode 100644 index 00000000000000..fc8efaac7c49c3 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf/package.json @@ -0,0 +1,72 @@ +{ + "_args": [ + [ + { + "raw": "bcrypt-pbkdf@^1.0.0", + "scope": null, + "escapedName": "bcrypt-pbkdf", + "name": "bcrypt-pbkdf", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk" + ] + ], + "_from": "bcrypt-pbkdf@>=1.0.0 <2.0.0", + "_id": "bcrypt-pbkdf@1.0.0", + "_inCache": true, + "_location": "/request/http-signature/sshpk/bcrypt-pbkdf", + "_nodeVersion": "0.12.15", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/bcrypt-pbkdf-1.0.0.tgz_1471381825814_0.06877309852279723" + }, + "_npmUser": { + "name": "arekinath", + "email": "alex@cooperi.net" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "bcrypt-pbkdf@^1.0.0", + "scope": null, + "escapedName": "bcrypt-pbkdf", + "name": "bcrypt-pbkdf", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/request/http-signature/sshpk" + ], + "_resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz", + "_shasum": "3ca76b85241c7170bf7d9703e7b9aa74630040d4", + "_shrinkwrap": null, + "_spec": "bcrypt-pbkdf@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk", + "dependencies": { + "tweetnacl": "^0.14.3" + }, + "description": "Port of the OpenBSD bcrypt_pbkdf function to pure JS", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "3ca76b85241c7170bf7d9703e7b9aa74630040d4", + "tarball": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz" + }, + "gitHead": "e88be37d3cd25395b4aa496ac468b33671368be6", + "license": "BSD-4-Clause", + "main": "index.js", + "maintainers": [ + { + "name": "arekinath", + "email": "alex@cooperi.net" + } + ], + "name": "bcrypt-pbkdf", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "scripts": {}, + "version": "1.0.0" +} diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/CHANGELOG.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/CHANGELOG.md index 77c69bd5ee45be..9debcb42f2e992 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/CHANGELOG.md +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/CHANGELOG.md @@ -2,6 +2,59 @@ TweetNaCl.js Changelog ====================== +v0.14.1 +------- + +No code changes, just tweaked packaging and added COPYING.txt. + + +v0.14.0 +------- + +* **Breaking change!** All functions from `nacl.util` have been removed. These + functions are no longer available: + + nacl.util.decodeUTF8 + nacl.util.encodeUTF8 + nacl.util.decodeBase64 + nacl.util.encodeBase64 + + If want to continue using them, you can include + package: + + + + + or + + var nacl = require('tweetnacl'); + nacl.util = require('tweetnacl-util'); + + However it is recommended to use better packages that have wider + compatibility and better performance. Functions from `nacl.util` were never + intended to be robust solution for string conversion and were included for + convenience: cryptography library is not the right place for them. + + Currently calling these functions will throw error pointing to + `tweetnacl-util-js` (in the next version this error message will be removed). + +* Improved detection of available random number generators, making it possible + to use `nacl.randomBytes` and related functions in Web Workers without + changes. + +* Changes to testing (see README). + + +v0.13.3 +------- + +No code changes. + +* Reverted license field in package.json to "Public domain". + +* Fixed typo in README. + + v0.13.2 ------- diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt new file mode 100644 index 00000000000000..c2bd1e5b7e81ab --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt @@ -0,0 +1,9 @@ +Public Domain + +The person who associated a work with this deed has dedicated the work to the +public domain by waiving all of his or her rights to the work worldwide under +copyright law, including all related and neighboring rights, to the extent +allowed by law. + +You can copy, modify, distribute and perform the work, even for commercial +purposes, all without asking permission. diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md index 11bd3472c258d1..c80bbed8d8da15 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md @@ -7,7 +7,7 @@ to JavaScript for modern browsers and Node.js. Public domain. [![Build Status](https://travis-ci.org/dchest/tweetnacl-js.svg?branch=master) ](https://travis-ci.org/dchest/tweetnacl-js) -[Demo](https://dchest.github.io/tweetnacl-js/) +Demo: **:warning: Beta version. The library is stable and API is frozen, however it has not been independently reviewed. If you can help reviewing it, please @@ -26,8 +26,6 @@ Documentation * [Hashing](#hashing) * [Random bytes generation](#random-bytes-generation) * [Constant-time comparison](#constant-time-comparison) - * [Utilities](#utilities) -* [Examples](#examples) * [System requirements](#system-requirements) * [Development and testing](#development-and-testing) * [Contributors](#contributors) @@ -67,10 +65,20 @@ or [download source code](https://github.com/dchest/tweetnacl-js/releases). Usage ------- +----- All API functions accept and return bytes as `Uint8Array`s. If you need to -encode or decode strings, use functions from `nacl.util` namespace. +encode or decode strings, use functions from + or one of the more robust codec +packages. + +In Node.js v4 and later `Buffer` objects are backed by `Uint8Array`s, so you +can freely pass them to TweetNaCl.js functions as arguments. The returned +objects are still `Uint8Array`s, so if you need `Buffer`s, you'll have to +convert them manually; make sure to convert using copying: `new Buffer(array)`, +instead of sharing: `new Buffer(array.buffer)`, because some functions return +subarrays of their buffers. + ### Public-key authenticated encryption (box) @@ -287,12 +295,6 @@ depending on the platform it runs on: * `window.msCrypto.getRandomValues` (Internet Explorer 11) * `crypto.randomBytes` (Node.js) -Note that browsers are required to throw `QuotaExceededError` exception if -requested `length` is more than 65536, so do not ask for more than 65536 bytes -in *one call* (multiple calls to get as many bytes as you like are okay: -browsers can generate infinite amount of random bytes without any bad -consequences). - If the platform doesn't provide a suitable PRNG, the following functions, which require random numbers, will throw exception: @@ -326,30 +328,6 @@ Returns `false` if either of the arguments has zero length, or arguments have different lengths, or their contents differ. -### Utilities - -Encoding/decoding functions are provided for convenience. They are correct, -however their performance and wide compatibility with uncommon runtimes is not -something that is considered important compared to the simplicity and size of -implementation. You can use third-party libraries if you need to. - -#### nacl.util.decodeUTF8(string) - -Decodes string and returns `Uint8Array` of bytes. - -#### nacl.util.encodeUTF8(array) - -Encodes `Uint8Array` or `Array` of bytes into string. - -#### nacl.util.decodeBase64(string) - -Decodes Base-64 encoded string and returns `Uint8Array` of bytes. - -#### nacl.util.encodeBase64(array) - -Encodes `Uint8Array` or `Array` of bytes into string using Base-64 encoding. - - System requirements ------------------- @@ -364,7 +342,7 @@ of: Other systems: -* Node.js (we test on 0.10 and later) +* Node.js Development and testing @@ -385,32 +363,36 @@ Tests use minified version, so make sure to rebuild it every time you change To run tests in Node.js: - $ npm test + $ npm run test-node By default all tests described here work on `nacl.min.js`. To test other versions, set environment variable `NACL_SRC` to the file name you want to test. For example, the following command will test fast minified version: - $ NACL_SRC=nacl-fast.min.js npm test + $ NACL_SRC=nacl-fast.min.js npm run test-node To run full suite of tests in Node.js, including comparing outputs of JavaScript port to outputs of the original C version: - $ npm run testall + $ npm run test-node-all To prepare tests for browsers: - $ npm run browser + $ npm run build-test-browser and then open `test/browser/test.html` (or `test/browser/test-fast.html`) to run them. -To run headless browser tests with `testling`: +To run headless browser tests with `tape-run` (powered by Electron): - $ npm run testling + $ npm run test-browser (If you get `Error: spawn ENOENT`, install *xvfb*: `sudo apt-get install xvfb`.) +To run tests in both Node and Electron: + + $ npm test + ### Benchmarking To run benchmarks in Node.js: diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.js index 6c4995848cc42c..5e4562fe89a1ab 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.js +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.js @@ -745,7 +745,7 @@ poly1305.prototype.finish = function(mac, macpos) { } g[9] -= (1 << 13); - mask = (g[9] >>> ((2 * 8) - 1)) - 1; + mask = (c ^ 1) - 1; for (i = 0; i < 10; i++) g[i] &= mask; mask = ~mask; for (i = 0; i < 10; i++) this.h[i] = (this.h[i] & mask) | g[i]; @@ -2157,39 +2157,13 @@ function cleanup(arr) { for (var i = 0; i < arr.length; i++) arr[i] = 0; } -nacl.util = {}; - -nacl.util.decodeUTF8 = function(s) { - var i, d = unescape(encodeURIComponent(s)), b = new Uint8Array(d.length); - for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i); - return b; -}; - -nacl.util.encodeUTF8 = function(arr) { - var i, s = []; - for (i = 0; i < arr.length; i++) s.push(String.fromCharCode(arr[i])); - return decodeURIComponent(escape(s.join(''))); -}; - -nacl.util.encodeBase64 = function(arr) { - if (typeof btoa === 'undefined') { - return (new Buffer(arr)).toString('base64'); - } else { - var i, s = [], len = arr.length; - for (i = 0; i < len; i++) s.push(String.fromCharCode(arr[i])); - return btoa(s.join('')); - } -}; - -nacl.util.decodeBase64 = function(s) { - if (typeof atob === 'undefined') { - return new Uint8Array(Array.prototype.slice.call(new Buffer(s, 'base64'), 0)); - } else { - var i, d = atob(s), b = new Uint8Array(d.length); - for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i); - return b; - } -}; +// TODO: Completely remove this in v0.15. +if (!nacl.util) { + nacl.util = {}; + nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() { + throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js'); + }; +} nacl.randomBytes = function(n) { var b = new Uint8Array(n); @@ -2386,26 +2360,22 @@ nacl.setPRNG = function(fn) { (function() { // Initialize PRNG if environment provides CSPRNG. // If not, methods calling randombytes will throw. - var crypto; - if (typeof window !== 'undefined') { - // Browser. - if (window.crypto && window.crypto.getRandomValues) { - crypto = window.crypto; // Standard - } else if (window.msCrypto && window.msCrypto.getRandomValues) { - crypto = window.msCrypto; // Internet Explorer 11+ - } - if (crypto) { - nacl.setPRNG(function(x, n) { - var i, v = new Uint8Array(n); - crypto.getRandomValues(v); - for (i = 0; i < n; i++) x[i] = v[i]; - cleanup(v); - }); - } + var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null; + if (crypto && crypto.getRandomValues) { + // Browsers. + var QUOTA = 65536; + nacl.setPRNG(function(x, n) { + var i, v = new Uint8Array(n); + for (i = 0; i < n; i += QUOTA) { + crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA))); + } + for (i = 0; i < n; i++) x[i] = v[i]; + cleanup(v); + }); } else if (typeof require !== 'undefined') { // Node.js. crypto = require('crypto'); - if (crypto) { + if (crypto && crypto.randomBytes) { nacl.setPRNG(function(x, n) { var i, v = crypto.randomBytes(n); for (i = 0; i < n; i++) x[i] = v[i]; @@ -2415,4 +2385,4 @@ nacl.setPRNG = function(fn) { } })(); -})(typeof module !== 'undefined' && module.exports ? module.exports : (window.nacl = window.nacl || {})); +})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {})); diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.min.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.min.js index 7072c2af4435bd..624fbbe91e71fc 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.min.js +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.min.js @@ -1,2 +1,2 @@ -!function(r){"use strict";function t(r,t,n,e){r[t]=n>>24&255,r[t+1]=n>>16&255,r[t+2]=n>>8&255,r[t+3]=255&n,r[t+4]=e>>24&255,r[t+5]=e>>16&255,r[t+6]=e>>8&255,r[t+7]=255&e}function n(r,t,n,e,o){var i,h=0;for(i=0;o>i;i++)h|=r[t+i]^n[e+i];return(1&h-1>>>8)-1}function e(r,t,e,o){return n(r,t,e,o,16)}function o(r,t,e,o){return n(r,t,e,o,32)}function i(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,v=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,b=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,d=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,_=i,U=h,E=a,x=f,M=s,m=u,B=c,S=y,K=l,T=w,Y=p,k=g,L=v,C=b,R=d,z=A,P=0;20>P;P+=2)o=_+L|0,M^=o<<7|o>>>25,o=M+_|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,_^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,C^=o<<9|o>>>23,o=C+T|0,U^=o<<13|o>>>19,o=U+C|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=z+k|0,x^=o<<7|o>>>25,o=x+z|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,z^=o<<18|o>>>14,o=_+x|0,U^=o<<7|o>>>25,o=U+_|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,_^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=z+R|0,L^=o<<7|o>>>25,o=L+z|0,C^=o<<9|o>>>23,o=C+L|0,R^=o<<13|o>>>19,o=R+C|0,z^=o<<18|o>>>14;_=_+i|0,U=U+h|0,E=E+a|0,x=x+f|0,M=M+s|0,m=m+u|0,B=B+c|0,S=S+y|0,K=K+l|0,T=T+w|0,Y=Y+p|0,k=k+g|0,L=L+v|0,C=C+b|0,R=R+d|0,z=z+A|0,r[0]=_>>>0&255,r[1]=_>>>8&255,r[2]=_>>>16&255,r[3]=_>>>24&255,r[4]=U>>>0&255,r[5]=U>>>8&255,r[6]=U>>>16&255,r[7]=U>>>24&255,r[8]=E>>>0&255,r[9]=E>>>8&255,r[10]=E>>>16&255,r[11]=E>>>24&255,r[12]=x>>>0&255,r[13]=x>>>8&255,r[14]=x>>>16&255,r[15]=x>>>24&255,r[16]=M>>>0&255,r[17]=M>>>8&255,r[18]=M>>>16&255,r[19]=M>>>24&255,r[20]=m>>>0&255,r[21]=m>>>8&255,r[22]=m>>>16&255,r[23]=m>>>24&255,r[24]=B>>>0&255,r[25]=B>>>8&255,r[26]=B>>>16&255,r[27]=B>>>24&255,r[28]=S>>>0&255,r[29]=S>>>8&255,r[30]=S>>>16&255,r[31]=S>>>24&255,r[32]=K>>>0&255,r[33]=K>>>8&255,r[34]=K>>>16&255,r[35]=K>>>24&255,r[36]=T>>>0&255,r[37]=T>>>8&255,r[38]=T>>>16&255,r[39]=T>>>24&255,r[40]=Y>>>0&255,r[41]=Y>>>8&255,r[42]=Y>>>16&255,r[43]=Y>>>24&255,r[44]=k>>>0&255,r[45]=k>>>8&255,r[46]=k>>>16&255,r[47]=k>>>24&255,r[48]=L>>>0&255,r[49]=L>>>8&255,r[50]=L>>>16&255,r[51]=L>>>24&255,r[52]=C>>>0&255,r[53]=C>>>8&255,r[54]=C>>>16&255,r[55]=C>>>24&255,r[56]=R>>>0&255,r[57]=R>>>8&255,r[58]=R>>>16&255,r[59]=R>>>24&255,r[60]=z>>>0&255,r[61]=z>>>8&255,r[62]=z>>>16&255,r[63]=z>>>24&255}function h(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,v=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,b=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,d=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,_=i,U=h,E=a,x=f,M=s,m=u,B=c,S=y,K=l,T=w,Y=p,k=g,L=v,C=b,R=d,z=A,P=0;20>P;P+=2)o=_+L|0,M^=o<<7|o>>>25,o=M+_|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,_^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,C^=o<<9|o>>>23,o=C+T|0,U^=o<<13|o>>>19,o=U+C|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=z+k|0,x^=o<<7|o>>>25,o=x+z|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,z^=o<<18|o>>>14,o=_+x|0,U^=o<<7|o>>>25,o=U+_|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,_^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=z+R|0,L^=o<<7|o>>>25,o=L+z|0,C^=o<<9|o>>>23,o=C+L|0,R^=o<<13|o>>>19,o=R+C|0,z^=o<<18|o>>>14;r[0]=_>>>0&255,r[1]=_>>>8&255,r[2]=_>>>16&255,r[3]=_>>>24&255,r[4]=m>>>0&255,r[5]=m>>>8&255,r[6]=m>>>16&255,r[7]=m>>>24&255,r[8]=Y>>>0&255,r[9]=Y>>>8&255,r[10]=Y>>>16&255,r[11]=Y>>>24&255,r[12]=z>>>0&255,r[13]=z>>>8&255,r[14]=z>>>16&255,r[15]=z>>>24&255,r[16]=B>>>0&255,r[17]=B>>>8&255,r[18]=B>>>16&255,r[19]=B>>>24&255,r[20]=S>>>0&255,r[21]=S>>>8&255,r[22]=S>>>16&255,r[23]=S>>>24&255,r[24]=K>>>0&255,r[25]=K>>>8&255,r[26]=K>>>16&255,r[27]=K>>>24&255,r[28]=T>>>0&255,r[29]=T>>>8&255,r[30]=T>>>16&255,r[31]=T>>>24&255}function a(r,t,n,e){i(r,t,n,e)}function f(r,t,n,e){h(r,t,n,e)}function s(r,t,n,e,o,i,h){var f,s,u=new Uint8Array(16),c=new Uint8Array(64);for(s=0;16>s;s++)u[s]=0;for(s=0;8>s;s++)u[s]=i[s];for(;o>=64;){for(a(c,u,h,cr),s=0;64>s;s++)r[t+s]=n[e+s]^c[s];for(f=1,s=8;16>s;s++)f=f+(255&u[s])|0,u[s]=255&f,f>>>=8;o-=64,t+=64,e+=64}if(o>0)for(a(c,u,h,cr),s=0;o>s;s++)r[t+s]=n[e+s]^c[s];return 0}function u(r,t,n,e,o){var i,h,f=new Uint8Array(16),s=new Uint8Array(64);for(h=0;16>h;h++)f[h]=0;for(h=0;8>h;h++)f[h]=e[h];for(;n>=64;){for(a(s,f,o,cr),h=0;64>h;h++)r[t+h]=s[h];for(i=1,h=8;16>h;h++)i=i+(255&f[h])|0,f[h]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(a(s,f,o,cr),h=0;n>h;h++)r[t+h]=s[h];return 0}function c(r,t,n,e,o){var i=new Uint8Array(32);f(i,e,o,cr);for(var h=new Uint8Array(8),a=0;8>a;a++)h[a]=e[a+16];return u(r,t,n,h,i)}function y(r,t,n,e,o,i,h){var a=new Uint8Array(32);f(a,i,h,cr);for(var u=new Uint8Array(8),c=0;8>c;c++)u[c]=i[c+16];return s(r,t,n,e,o,u,a)}function l(r,t,n,e,o,i){var h=new yr(i);return h.update(n,e,o),h.finish(r,t),0}function w(r,t,n,o,i,h){var a=new Uint8Array(16);return l(a,0,n,o,i,h),e(r,t,a,0)}function p(r,t,n,e,o){var i;if(32>n)return-1;for(y(r,0,t,0,n,e,o),l(r,16,r,32,n-32,r),i=0;16>i;i++)r[i]=0;return 0}function g(r,t,n,e,o){var i,h=new Uint8Array(32);if(32>n)return-1;if(c(h,0,32,e,o),0!==w(t,16,t,32,n-32,h))return-1;for(y(r,0,t,0,n,e,o),i=0;32>i;i++)r[i]=0;return 0}function v(r,t){var n;for(n=0;16>n;n++)r[n]=0|t[n]}function b(r){var t,n,e=1;for(t=0;16>t;t++)n=r[t]+e+65535,e=Math.floor(n/65536),r[t]=n-65536*e;r[0]+=e-1+37*(e-1)}function d(r,t,n){for(var e,o=~(n-1),i=0;16>i;i++)e=o&(r[i]^t[i]),r[i]^=e,t[i]^=e}function A(r,t){var n,e,o,i=$(),h=$();for(n=0;16>n;n++)h[n]=t[n];for(b(h),b(h),b(h),e=0;2>e;e++){for(i[0]=h[0]-65517,n=1;15>n;n++)i[n]=h[n]-65535-(i[n-1]>>16&1),i[n-1]&=65535;i[15]=h[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,d(h,i,1-o)}for(n=0;16>n;n++)r[2*n]=255&h[n],r[2*n+1]=h[n]>>8}function _(r,t){var n=new Uint8Array(32),e=new Uint8Array(32);return A(n,r),A(e,t),o(n,0,e,0)}function U(r){var t=new Uint8Array(32);return A(t,r),1&t[0]}function E(r,t){var n;for(n=0;16>n;n++)r[n]=t[2*n]+(t[2*n+1]<<8);r[15]&=32767}function x(r,t,n){for(var e=0;16>e;e++)r[e]=t[e]+n[e]}function M(r,t,n){for(var e=0;16>e;e++)r[e]=t[e]-n[e]}function m(r,t,n){var e,o,i=0,h=0,a=0,f=0,s=0,u=0,c=0,y=0,l=0,w=0,p=0,g=0,v=0,b=0,d=0,A=0,_=0,U=0,E=0,x=0,M=0,m=0,B=0,S=0,K=0,T=0,Y=0,k=0,L=0,C=0,R=0,z=n[0],P=n[1],O=n[2],N=n[3],F=n[4],I=n[5],j=n[6],G=n[7],Z=n[8],V=n[9],q=n[10],X=n[11],D=n[12],H=n[13],J=n[14],Q=n[15];e=t[0],i+=e*z,h+=e*P,a+=e*O,f+=e*N,s+=e*F,u+=e*I,c+=e*j,y+=e*G,l+=e*Z,w+=e*V,p+=e*q,g+=e*X,v+=e*D,b+=e*H,d+=e*J,A+=e*Q,e=t[1],h+=e*z,a+=e*P,f+=e*O,s+=e*N,u+=e*F,c+=e*I,y+=e*j,l+=e*G,w+=e*Z,p+=e*V,g+=e*q,v+=e*X,b+=e*D,d+=e*H,A+=e*J,_+=e*Q,e=t[2],a+=e*z,f+=e*P,s+=e*O,u+=e*N,c+=e*F,y+=e*I,l+=e*j,w+=e*G,p+=e*Z,g+=e*V,v+=e*q,b+=e*X,d+=e*D,A+=e*H,_+=e*J,U+=e*Q,e=t[3],f+=e*z,s+=e*P,u+=e*O,c+=e*N,y+=e*F,l+=e*I,w+=e*j,p+=e*G,g+=e*Z,v+=e*V,b+=e*q,d+=e*X,A+=e*D,_+=e*H,U+=e*J,E+=e*Q,e=t[4],s+=e*z,u+=e*P,c+=e*O,y+=e*N,l+=e*F,w+=e*I,p+=e*j,g+=e*G,v+=e*Z,b+=e*V,d+=e*q,A+=e*X,_+=e*D,U+=e*H,E+=e*J,x+=e*Q,e=t[5],u+=e*z,c+=e*P,y+=e*O,l+=e*N,w+=e*F,p+=e*I,g+=e*j,v+=e*G,b+=e*Z,d+=e*V,A+=e*q,_+=e*X,U+=e*D,E+=e*H,x+=e*J,M+=e*Q,e=t[6],c+=e*z,y+=e*P,l+=e*O,w+=e*N,p+=e*F,g+=e*I,v+=e*j,b+=e*G,d+=e*Z,A+=e*V,_+=e*q,U+=e*X,E+=e*D,x+=e*H,M+=e*J,m+=e*Q,e=t[7],y+=e*z,l+=e*P,w+=e*O,p+=e*N,g+=e*F,v+=e*I,b+=e*j,d+=e*G,A+=e*Z,_+=e*V,U+=e*q,E+=e*X,x+=e*D,M+=e*H,m+=e*J,B+=e*Q,e=t[8],l+=e*z,w+=e*P,p+=e*O,g+=e*N,v+=e*F,b+=e*I,d+=e*j,A+=e*G,_+=e*Z,U+=e*V,E+=e*q,x+=e*X,M+=e*D,m+=e*H,B+=e*J,S+=e*Q,e=t[9],w+=e*z,p+=e*P,g+=e*O,v+=e*N,b+=e*F,d+=e*I,A+=e*j,_+=e*G,U+=e*Z,E+=e*V,x+=e*q,M+=e*X,m+=e*D,B+=e*H,S+=e*J,K+=e*Q,e=t[10],p+=e*z,g+=e*P,v+=e*O,b+=e*N,d+=e*F,A+=e*I,_+=e*j,U+=e*G,E+=e*Z,x+=e*V,M+=e*q,m+=e*X,B+=e*D,S+=e*H,K+=e*J,T+=e*Q,e=t[11],g+=e*z,v+=e*P,b+=e*O,d+=e*N,A+=e*F,_+=e*I,U+=e*j,E+=e*G,x+=e*Z,M+=e*V,m+=e*q,B+=e*X,S+=e*D,K+=e*H,T+=e*J,Y+=e*Q,e=t[12],v+=e*z,b+=e*P,d+=e*O,A+=e*N,_+=e*F,U+=e*I,E+=e*j,x+=e*G,M+=e*Z,m+=e*V,B+=e*q,S+=e*X,K+=e*D,T+=e*H,Y+=e*J,k+=e*Q,e=t[13],b+=e*z,d+=e*P,A+=e*O,_+=e*N,U+=e*F,E+=e*I,x+=e*j,M+=e*G,m+=e*Z,B+=e*V,S+=e*q,K+=e*X,T+=e*D,Y+=e*H,k+=e*J,L+=e*Q,e=t[14],d+=e*z,A+=e*P,_+=e*O,U+=e*N,E+=e*F,x+=e*I,M+=e*j,m+=e*G,B+=e*Z,S+=e*V,K+=e*q,T+=e*X,Y+=e*D,k+=e*H,L+=e*J,C+=e*Q,e=t[15],A+=e*z,_+=e*P,U+=e*O,E+=e*N,x+=e*F,M+=e*I,m+=e*j,B+=e*G,S+=e*Z,K+=e*V,T+=e*q,Y+=e*X,k+=e*D,L+=e*H,C+=e*J,R+=e*Q,i+=38*_,h+=38*U,a+=38*E,f+=38*x,s+=38*M,u+=38*m,c+=38*B,y+=38*S,l+=38*K,w+=38*T,p+=38*Y,g+=38*k,v+=38*L,b+=38*C,d+=38*R,o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=d+o+65535,o=Math.floor(e/65536),d=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=d+o+65535,o=Math.floor(e/65536),d=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),r[0]=i,r[1]=h,r[2]=a,r[3]=f,r[4]=s,r[5]=u,r[6]=c,r[7]=y,r[8]=l,r[9]=w,r[10]=p,r[11]=g,r[12]=v,r[13]=b,r[14]=d,r[15]=A}function B(r,t){m(r,t,t)}function S(r,t){var n,e=$();for(n=0;16>n;n++)e[n]=t[n];for(n=253;n>=0;n--)B(e,e),2!==n&&4!==n&&m(e,e,t);for(n=0;16>n;n++)r[n]=e[n]}function K(r,t){var n,e=$();for(n=0;16>n;n++)e[n]=t[n];for(n=250;n>=0;n--)B(e,e),1!==n&&m(e,e,t);for(n=0;16>n;n++)r[n]=e[n]}function T(r,t,n){var e,o,i=new Uint8Array(32),h=new Float64Array(80),a=$(),f=$(),s=$(),u=$(),c=$(),y=$();for(o=0;31>o;o++)i[o]=t[o];for(i[31]=127&t[31]|64,i[0]&=248,E(h,n),o=0;16>o;o++)f[o]=h[o],u[o]=a[o]=s[o]=0;for(a[0]=u[0]=1,o=254;o>=0;--o)e=i[o>>>3]>>>(7&o)&1,d(a,f,e),d(s,u,e),x(c,a,s),M(a,a,s),x(s,f,u),M(f,f,u),B(u,c),B(y,a),m(a,s,a),m(s,f,c),x(c,a,s),M(a,a,s),B(f,a),M(s,u,y),m(a,s,ir),x(a,a,u),m(s,s,a),m(a,u,y),m(u,f,h),B(f,c),d(a,f,e),d(s,u,e);for(o=0;16>o;o++)h[o+16]=a[o],h[o+32]=s[o],h[o+48]=f[o],h[o+64]=u[o];var l=h.subarray(32),w=h.subarray(16);return S(l,l),m(w,w,l),A(r,w),0}function Y(r,t){return T(r,t,nr)}function k(r,t){return rr(t,32),Y(r,t)}function L(r,t,n){var e=new Uint8Array(32);return T(e,n,t),f(r,tr,e,cr)}function C(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),lr(r,t,n,e,h)}function R(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),wr(r,t,n,e,h)}function z(r,t,n,e){for(var o,i,h,a,f,s,u,c,y,l,w,p,g,v,b,d,A,_,U,E,x,M,m,B,S,K,T=new Int32Array(16),Y=new Int32Array(16),k=r[0],L=r[1],C=r[2],R=r[3],z=r[4],P=r[5],O=r[6],N=r[7],F=t[0],I=t[1],j=t[2],G=t[3],Z=t[4],V=t[5],q=t[6],X=t[7],D=0;e>=128;){for(U=0;16>U;U++)E=8*U+D,T[U]=n[E+0]<<24|n[E+1]<<16|n[E+2]<<8|n[E+3],Y[U]=n[E+4]<<24|n[E+5]<<16|n[E+6]<<8|n[E+7];for(U=0;80>U;U++)if(o=k,i=L,h=C,a=R,f=z,s=P,u=O,c=N,y=F,l=I,w=j,p=G,g=Z,v=V,b=q,d=X,x=N,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(z>>>14|Z<<18)^(z>>>18|Z<<14)^(Z>>>9|z<<23),M=(Z>>>14|z<<18)^(Z>>>18|z<<14)^(z>>>9|Z<<23),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=z&P^~z&O,M=Z&V^~Z&q,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=pr[2*U],M=pr[2*U+1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=T[U%16],M=Y[U%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,A=65535&S|K<<16,_=65535&m|B<<16,x=A,M=_,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(k>>>28|F<<4)^(F>>>2|k<<30)^(F>>>7|k<<25),M=(F>>>28|k<<4)^(k>>>2|F<<30)^(k>>>7|F<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=k&L^k&C^L&C,M=F&I^F&j^I&j,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,c=65535&S|K<<16,d=65535&m|B<<16,x=a,M=p,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=A,M=_,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,a=65535&S|K<<16,p=65535&m|B<<16,L=o,C=i,R=h,z=a,P=f,O=s,N=u,k=c,I=y,j=l,G=w,Z=p,V=g,q=v,X=b,F=d,U%16===15)for(E=0;16>E;E++)x=T[E],M=Y[E],m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=T[(E+9)%16],M=Y[(E+9)%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+1)%16],_=Y[(E+1)%16],x=(A>>>1|_<<31)^(A>>>8|_<<24)^A>>>7,M=(_>>>1|A<<31)^(_>>>8|A<<24)^(_>>>7|A<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+14)%16],_=Y[(E+14)%16],x=(A>>>19|_<<13)^(_>>>29|A<<3)^A>>>6,M=(_>>>19|A<<13)^(A>>>29|_<<3)^(_>>>6|A<<26),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,T[E]=65535&S|K<<16,Y[E]=65535&m|B<<16;x=k,M=F,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[0],M=t[0],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[0]=k=65535&S|K<<16,t[0]=F=65535&m|B<<16,x=L,M=I,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[1],M=t[1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[1]=L=65535&S|K<<16,t[1]=I=65535&m|B<<16,x=C,M=j,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[2],M=t[2],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[2]=C=65535&S|K<<16,t[2]=j=65535&m|B<<16,x=R,M=G,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[3],M=t[3],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[3]=R=65535&S|K<<16,t[3]=G=65535&m|B<<16,x=z,M=Z,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[4],M=t[4],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[4]=z=65535&S|K<<16,t[4]=Z=65535&m|B<<16,x=P,M=V,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[5],M=t[5],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[5]=P=65535&S|K<<16,t[5]=V=65535&m|B<<16,x=O,M=q,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[6],M=t[6],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[6]=O=65535&S|K<<16,t[6]=q=65535&m|B<<16,x=N,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[7],M=t[7],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[7]=N=65535&S|K<<16,t[7]=X=65535&m|B<<16,D+=128,e-=128}return e}function P(r,n,e){var o,i=new Int32Array(8),h=new Int32Array(8),a=new Uint8Array(256),f=e;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,h[0]=4089235720,h[1]=2227873595,h[2]=4271175723,h[3]=1595750129,h[4]=2917565137,h[5]=725511199,h[6]=4215389547,h[7]=327033209,z(i,h,n,e),e%=128,o=0;e>o;o++)a[o]=n[f-e+o];for(a[e]=128,e=256-128*(112>e?1:0),a[e-9]=0,t(a,e-8,f/536870912|0,f<<3),z(i,h,a,e),o=0;8>o;o++)t(r,8*o,i[o],h[o]);return 0}function O(r,t){var n=$(),e=$(),o=$(),i=$(),h=$(),a=$(),f=$(),s=$(),u=$();M(n,r[1],r[0]),M(u,t[1],t[0]),m(n,n,u),x(e,r[0],r[1]),x(u,t[0],t[1]),m(e,e,u),m(o,r[3],t[3]),m(o,o,ar),m(i,r[2],t[2]),x(i,i,i),M(h,e,n),M(a,i,o),x(f,i,o),x(s,e,n),m(r[0],h,a),m(r[1],s,f),m(r[2],f,a),m(r[3],h,s)}function N(r,t,n){var e;for(e=0;4>e;e++)d(r[e],t[e],n)}function F(r,t){var n=$(),e=$(),o=$();S(o,t[2]),m(n,t[0],o),m(e,t[1],o),A(r,e),r[31]^=U(n)<<7}function I(r,t,n){var e,o;for(v(r[0],er),v(r[1],or),v(r[2],or),v(r[3],er),o=255;o>=0;--o)e=n[o/8|0]>>(7&o)&1,N(r,t,e),O(t,r),O(r,r),N(r,t,e)}function j(r,t){var n=[$(),$(),$(),$()];v(n[0],fr),v(n[1],sr),v(n[2],or),m(n[3],fr,sr),I(r,n,t)}function G(r,t,n){var e,o=new Uint8Array(64),i=[$(),$(),$(),$()];for(n||rr(t,32),P(o,t,32),o[0]&=248,o[31]&=127,o[31]|=64,j(i,o),F(r,i),e=0;32>e;e++)t[e+32]=r[e];return 0}function Z(r,t){var n,e,o,i;for(e=63;e>=32;--e){for(n=0,o=e-32,i=e-12;i>o;++o)t[o]+=n-16*t[e]*gr[o-(e-32)],n=t[o]+128>>8,t[o]-=256*n;t[o]+=n,t[e]=0}for(n=0,o=0;32>o;o++)t[o]+=n-(t[31]>>4)*gr[o],n=t[o]>>8,t[o]&=255;for(o=0;32>o;o++)t[o]-=n*gr[o];for(e=0;32>e;e++)t[e+1]+=t[e]>>8,r[e]=255&t[e]}function V(r){var t,n=new Float64Array(64);for(t=0;64>t;t++)n[t]=r[t];for(t=0;64>t;t++)r[t]=0;Z(r,n)}function q(r,t,n,e){var o,i,h=new Uint8Array(64),a=new Uint8Array(64),f=new Uint8Array(64),s=new Float64Array(64),u=[$(),$(),$(),$()];P(h,e,32),h[0]&=248,h[31]&=127,h[31]|=64;var c=n+64;for(o=0;n>o;o++)r[64+o]=t[o];for(o=0;32>o;o++)r[32+o]=h[32+o];for(P(f,r.subarray(32),n+32),V(f),j(u,f),F(r,u),o=32;64>o;o++)r[o]=e[o];for(P(a,r,n+64),V(a),o=0;64>o;o++)s[o]=0;for(o=0;32>o;o++)s[o]=f[o];for(o=0;32>o;o++)for(i=0;32>i;i++)s[o+i]+=a[o]*h[i];return Z(r.subarray(32),s),c}function X(r,t){var n=$(),e=$(),o=$(),i=$(),h=$(),a=$(),f=$();return v(r[2],or),E(r[1],t),B(o,r[1]),m(i,o,hr),M(o,o,r[2]),x(i,r[2],i),B(h,i),B(a,h),m(f,a,h),m(n,f,o),m(n,n,i),K(n,n),m(n,n,o),m(n,n,i),m(n,n,i),m(r[0],n,i),B(e,r[0]),m(e,e,i),_(e,o)&&m(r[0],r[0],ur),B(e,r[0]),m(e,e,i),_(e,o)?-1:(U(r[0])===t[31]>>7&&M(r[0],er,r[0]),m(r[3],r[0],r[1]),0)}function D(r,t,n,e){var i,h,a=new Uint8Array(32),f=new Uint8Array(64),s=[$(),$(),$(),$()],u=[$(),$(),$(),$()];if(h=-1,64>n)return-1;if(X(u,e))return-1;for(i=0;n>i;i++)r[i]=t[i];for(i=0;32>i;i++)r[i+32]=e[i];if(P(f,r,n),V(f),I(s,u,f),j(u,t.subarray(32)),O(s,u),F(a,s),n-=64,o(t,0,a,0)){for(i=0;n>i;i++)r[i]=0;return-1}for(i=0;n>i;i++)r[i]=t[i+64];return h=n}function H(r,t){if(r.length!==vr)throw new Error("bad key size");if(t.length!==br)throw new Error("bad nonce size")}function J(r,t){if(r.length!==Er)throw new Error("bad public key size");if(t.length!==xr)throw new Error("bad secret key size")}function Q(){var r,t;for(t=0;t>>13|n<<3),e=255&r[4]|(255&r[5])<<8,this.r[2]=7939&(n>>>10|e<<6),o=255&r[6]|(255&r[7])<<8,this.r[3]=8191&(e>>>7|o<<9),i=255&r[8]|(255&r[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,h=255&r[10]|(255&r[11])<<8,this.r[6]=8191&(i>>>14|h<<2),a=255&r[12]|(255&r[13])<<8,this.r[7]=8065&(h>>>11|a<<5),f=255&r[14]|(255&r[15])<<8,this.r[8]=8191&(a>>>8|f<<8),this.r[9]=f>>>5&127,this.pad[0]=255&r[16]|(255&r[17])<<8,this.pad[1]=255&r[18]|(255&r[19])<<8,this.pad[2]=255&r[20]|(255&r[21])<<8,this.pad[3]=255&r[22]|(255&r[23])<<8,this.pad[4]=255&r[24]|(255&r[25])<<8,this.pad[5]=255&r[26]|(255&r[27])<<8,this.pad[6]=255&r[28]|(255&r[29])<<8,this.pad[7]=255&r[30]|(255&r[31])<<8};yr.prototype.blocks=function(r,t,n){for(var e,o,i,h,a,f,s,u,c,y,l,w,p,g,v,b,d,A,_,U=this.fin?0:2048,E=this.h[0],x=this.h[1],M=this.h[2],m=this.h[3],B=this.h[4],S=this.h[5],K=this.h[6],T=this.h[7],Y=this.h[8],k=this.h[9],L=this.r[0],C=this.r[1],R=this.r[2],z=this.r[3],P=this.r[4],O=this.r[5],N=this.r[6],F=this.r[7],I=this.r[8],j=this.r[9];n>=16;)e=255&r[t+0]|(255&r[t+1])<<8,E+=8191&e,o=255&r[t+2]|(255&r[t+3])<<8,x+=8191&(e>>>13|o<<3),i=255&r[t+4]|(255&r[t+5])<<8,M+=8191&(o>>>10|i<<6),h=255&r[t+6]|(255&r[t+7])<<8,m+=8191&(i>>>7|h<<9),a=255&r[t+8]|(255&r[t+9])<<8,B+=8191&(h>>>4|a<<12),S+=a>>>1&8191,f=255&r[t+10]|(255&r[t+11])<<8,K+=8191&(a>>>14|f<<2),s=255&r[t+12]|(255&r[t+13])<<8,T+=8191&(f>>>11|s<<5),u=255&r[t+14]|(255&r[t+15])<<8,Y+=8191&(s>>>8|u<<8),k+=u>>>5|U,c=0,y=c,y+=E*L,y+=5*x*j,y+=5*M*I,y+=5*m*F,y+=5*B*N,c=y>>>13,y&=8191,y+=5*S*O,y+=5*K*P,y+=5*T*z,y+=5*Y*R,y+=5*k*C,c+=y>>>13,y&=8191,l=c,l+=E*C,l+=x*L,l+=5*M*j,l+=5*m*I,l+=5*B*F,c=l>>>13,l&=8191,l+=5*S*N,l+=5*K*O,l+=5*T*P,l+=5*Y*z,l+=5*k*R,c+=l>>>13,l&=8191,w=c,w+=E*R,w+=x*C,w+=M*L,w+=5*m*j,w+=5*B*I,c=w>>>13,w&=8191,w+=5*S*F,w+=5*K*N,w+=5*T*O,w+=5*Y*P,w+=5*k*z,c+=w>>>13,w&=8191,p=c,p+=E*z,p+=x*R,p+=M*C,p+=m*L,p+=5*B*j,c=p>>>13,p&=8191,p+=5*S*I,p+=5*K*F,p+=5*T*N,p+=5*Y*O,p+=5*k*P,c+=p>>>13,p&=8191,g=c,g+=E*P,g+=x*z,g+=M*R,g+=m*C,g+=B*L,c=g>>>13,g&=8191,g+=5*S*j,g+=5*K*I,g+=5*T*F,g+=5*Y*N,g+=5*k*O,c+=g>>>13,g&=8191,v=c,v+=E*O,v+=x*P,v+=M*z,v+=m*R,v+=B*C,c=v>>>13,v&=8191,v+=S*L,v+=5*K*j,v+=5*T*I,v+=5*Y*F,v+=5*k*N,c+=v>>>13,v&=8191,b=c,b+=E*N,b+=x*O,b+=M*P,b+=m*z,b+=B*R,c=b>>>13,b&=8191,b+=S*C,b+=K*L,b+=5*T*j,b+=5*Y*I,b+=5*k*F,c+=b>>>13,b&=8191,d=c,d+=E*F,d+=x*N,d+=M*O,d+=m*P,d+=B*z,c=d>>>13,d&=8191,d+=S*R,d+=K*C,d+=T*L,d+=5*Y*j,d+=5*k*I,c+=d>>>13,d&=8191,A=c,A+=E*I,A+=x*F,A+=M*N,A+=m*O,A+=B*P,c=A>>>13,A&=8191,A+=S*z,A+=K*R,A+=T*C,A+=Y*L,A+=5*k*j,c+=A>>>13,A&=8191,_=c,_+=E*j,_+=x*I,_+=M*F,_+=m*N,_+=B*O,c=_>>>13,_&=8191,_+=S*P,_+=K*z,_+=T*R,_+=Y*C,_+=k*L,c+=_>>>13,_&=8191,c=(c<<2)+c|0,c=c+y|0,y=8191&c,c>>>=13,l+=c,E=y,x=l,M=w,m=p,B=g,S=v,K=b,T=d,Y=A,k=_,t+=16,n-=16;this.h[0]=E,this.h[1]=x,this.h[2]=M,this.h[3]=m,this.h[4]=B,this.h[5]=S,this.h[6]=K,this.h[7]=T,this.h[8]=Y,this.h[9]=k},yr.prototype.finish=function(r,t){var n,e,o,i,h=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;16>i;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;10>i;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,h[0]=this.h[0]+5,n=h[0]>>>13,h[0]&=8191,i=1;10>i;i++)h[i]=this.h[i]+n,n=h[i]>>>13,h[i]&=8191;for(h[9]-=8192,e=(h[9]>>>15)-1,i=0;10>i;i++)h[i]&=e;for(e=~e,i=0;10>i;i++)this.h[i]=this.h[i]&e|h[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;8>i;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;r[t+0]=this.h[0]>>>0&255,r[t+1]=this.h[0]>>>8&255,r[t+2]=this.h[1]>>>0&255,r[t+3]=this.h[1]>>>8&255,r[t+4]=this.h[2]>>>0&255,r[t+5]=this.h[2]>>>8&255,r[t+6]=this.h[3]>>>0&255,r[t+7]=this.h[3]>>>8&255,r[t+8]=this.h[4]>>>0&255,r[t+9]=this.h[4]>>>8&255,r[t+10]=this.h[5]>>>0&255,r[t+11]=this.h[5]>>>8&255,r[t+12]=this.h[6]>>>0&255,r[t+13]=this.h[6]>>>8&255,r[t+14]=this.h[7]>>>0&255,r[t+15]=this.h[7]>>>8&255},yr.prototype.update=function(r,t,n){var e,o;if(this.leftover){for(o=16-this.leftover,o>n&&(o=n),e=0;o>e;e++)this.buffer[this.leftover+e]=r[t+e];if(n-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(o=n-n%16,this.blocks(r,t,o),t+=o,n-=o),n){for(e=0;n>e;e++)this.buffer[this.leftover+e]=r[t+e];this.leftover+=n}};var lr=p,wr=g,pr=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],gr=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),vr=32,br=24,dr=32,Ar=16,_r=32,Ur=32,Er=32,xr=32,Mr=32,mr=br,Br=dr,Sr=Ar,Kr=64,Tr=32,Yr=64,kr=32,Lr=64;r.lowlevel={crypto_core_hsalsa20:f,crypto_stream_xor:y,crypto_stream:c,crypto_stream_salsa20_xor:s,crypto_stream_salsa20:u,crypto_onetimeauth:l,crypto_onetimeauth_verify:w,crypto_verify_16:e,crypto_verify_32:o,crypto_secretbox:p,crypto_secretbox_open:g,crypto_scalarmult:T,crypto_scalarmult_base:Y,crypto_box_beforenm:L,crypto_box_afternm:lr,crypto_box:C,crypto_box_open:R,crypto_box_keypair:k,crypto_hash:P,crypto_sign:q,crypto_sign_keypair:G,crypto_sign_open:D,crypto_secretbox_KEYBYTES:vr,crypto_secretbox_NONCEBYTES:br,crypto_secretbox_ZEROBYTES:dr,crypto_secretbox_BOXZEROBYTES:Ar,crypto_scalarmult_BYTES:_r,crypto_scalarmult_SCALARBYTES:Ur,crypto_box_PUBLICKEYBYTES:Er,crypto_box_SECRETKEYBYTES:xr,crypto_box_BEFORENMBYTES:Mr,crypto_box_NONCEBYTES:mr,crypto_box_ZEROBYTES:Br,crypto_box_BOXZEROBYTES:Sr,crypto_sign_BYTES:Kr,crypto_sign_PUBLICKEYBYTES:Tr,crypto_sign_SECRETKEYBYTES:Yr,crypto_sign_SEEDBYTES:kr,crypto_hash_BYTES:Lr},r.util={},r.util.decodeUTF8=function(r){var t,n=unescape(encodeURIComponent(r)),e=new Uint8Array(n.length);for(t=0;tt;t++)n.push(String.fromCharCode(r[t]));return btoa(n.join(""))},r.util.decodeBase64=function(r){if("undefined"==typeof atob)return new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0));var t,n=atob(r),e=new Uint8Array(n.length);for(t=0;te)return null;for(var o=new Uint8Array(e),i=0;ie;e++)o[e]=t[e];for(e=0;e=0},r.sign.keyPair=function(){var r=new Uint8Array(Tr),t=new Uint8Array(Yr);return G(r,t),{publicKey:r,secretKey:t}},r.sign.keyPair.fromSecretKey=function(r){if(Q(r),r.length!==Yr)throw new Error("bad secret key size");for(var t=new Uint8Array(Tr),n=0;ne;e++)n[e]=r[e];return G(t,n,!0),{publicKey:t,secretKey:n}},r.sign.publicKeyLength=Tr,r.sign.secretKeyLength=Yr,r.sign.seedLength=kr,r.sign.signatureLength=Kr,r.hash=function(r){Q(r);var t=new Uint8Array(Lr);return P(t,r,r.length),t},r.hash.hashLength=Lr,r.verify=function(r,t){return Q(r,t),0===r.length||0===t.length?!1:r.length!==t.length?!1:0===n(r,0,t,0,r.length)?!0:!1},r.setPRNG=function(r){rr=r},function(){var t;"undefined"!=typeof window?(window.crypto&&window.crypto.getRandomValues?t=window.crypto:window.msCrypto&&window.msCrypto.getRandomValues&&(t=window.msCrypto),t&&r.setPRNG(function(r,n){var e,o=new Uint8Array(n);for(t.getRandomValues(o),e=0;n>e;e++)r[e]=o[e];W(o)})):"undefined"!=typeof require&&(t=require("crypto"),t&&r.setPRNG(function(r,n){var e,o=t.randomBytes(n);for(e=0;n>e;e++)r[e]=o[e];W(o)}))}()}("undefined"!=typeof module&&module.exports?module.exports:window.nacl=window.nacl||{}); \ No newline at end of file +!function(r){"use strict";function t(r,t,n,e){r[t]=n>>24&255,r[t+1]=n>>16&255,r[t+2]=n>>8&255,r[t+3]=255&n,r[t+4]=e>>24&255,r[t+5]=e>>16&255,r[t+6]=e>>8&255,r[t+7]=255&e}function n(r,t,n,e,o){var i,h=0;for(i=0;o>i;i++)h|=r[t+i]^n[e+i];return(1&h-1>>>8)-1}function e(r,t,e,o){return n(r,t,e,o,16)}function o(r,t,e,o){return n(r,t,e,o,32)}function i(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,g=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,_=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,d=i,U=h,E=a,x=f,M=s,m=u,B=c,S=y,K=l,T=w,Y=p,k=v,L=b,z=g,R=_,P=A,O=0;20>O;O+=2)o=d+L|0,M^=o<<7|o>>>25,o=M+d|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,d^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,z^=o<<9|o>>>23,o=z+T|0,U^=o<<13|o>>>19,o=U+z|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=P+k|0,x^=o<<7|o>>>25,o=x+P|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,P^=o<<18|o>>>14,o=d+x|0,U^=o<<7|o>>>25,o=U+d|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,d^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=P+R|0,L^=o<<7|o>>>25,o=L+P|0,z^=o<<9|o>>>23,o=z+L|0,R^=o<<13|o>>>19,o=R+z|0,P^=o<<18|o>>>14;d=d+i|0,U=U+h|0,E=E+a|0,x=x+f|0,M=M+s|0,m=m+u|0,B=B+c|0,S=S+y|0,K=K+l|0,T=T+w|0,Y=Y+p|0,k=k+v|0,L=L+b|0,z=z+g|0,R=R+_|0,P=P+A|0,r[0]=d>>>0&255,r[1]=d>>>8&255,r[2]=d>>>16&255,r[3]=d>>>24&255,r[4]=U>>>0&255,r[5]=U>>>8&255,r[6]=U>>>16&255,r[7]=U>>>24&255,r[8]=E>>>0&255,r[9]=E>>>8&255,r[10]=E>>>16&255,r[11]=E>>>24&255,r[12]=x>>>0&255,r[13]=x>>>8&255,r[14]=x>>>16&255,r[15]=x>>>24&255,r[16]=M>>>0&255,r[17]=M>>>8&255,r[18]=M>>>16&255,r[19]=M>>>24&255,r[20]=m>>>0&255,r[21]=m>>>8&255,r[22]=m>>>16&255,r[23]=m>>>24&255,r[24]=B>>>0&255,r[25]=B>>>8&255,r[26]=B>>>16&255,r[27]=B>>>24&255,r[28]=S>>>0&255,r[29]=S>>>8&255,r[30]=S>>>16&255,r[31]=S>>>24&255,r[32]=K>>>0&255,r[33]=K>>>8&255,r[34]=K>>>16&255,r[35]=K>>>24&255,r[36]=T>>>0&255,r[37]=T>>>8&255,r[38]=T>>>16&255,r[39]=T>>>24&255,r[40]=Y>>>0&255,r[41]=Y>>>8&255,r[42]=Y>>>16&255,r[43]=Y>>>24&255,r[44]=k>>>0&255,r[45]=k>>>8&255,r[46]=k>>>16&255,r[47]=k>>>24&255,r[48]=L>>>0&255,r[49]=L>>>8&255,r[50]=L>>>16&255,r[51]=L>>>24&255,r[52]=z>>>0&255,r[53]=z>>>8&255,r[54]=z>>>16&255,r[55]=z>>>24&255,r[56]=R>>>0&255,r[57]=R>>>8&255,r[58]=R>>>16&255,r[59]=R>>>24&255,r[60]=P>>>0&255,r[61]=P>>>8&255,r[62]=P>>>16&255,r[63]=P>>>24&255}function h(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,g=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,_=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,d=i,U=h,E=a,x=f,M=s,m=u,B=c,S=y,K=l,T=w,Y=p,k=v,L=b,z=g,R=_,P=A,O=0;20>O;O+=2)o=d+L|0,M^=o<<7|o>>>25,o=M+d|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,d^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,z^=o<<9|o>>>23,o=z+T|0,U^=o<<13|o>>>19,o=U+z|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=P+k|0,x^=o<<7|o>>>25,o=x+P|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,P^=o<<18|o>>>14,o=d+x|0,U^=o<<7|o>>>25,o=U+d|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,d^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=P+R|0,L^=o<<7|o>>>25,o=L+P|0,z^=o<<9|o>>>23,o=z+L|0,R^=o<<13|o>>>19,o=R+z|0,P^=o<<18|o>>>14;r[0]=d>>>0&255,r[1]=d>>>8&255,r[2]=d>>>16&255,r[3]=d>>>24&255,r[4]=m>>>0&255,r[5]=m>>>8&255,r[6]=m>>>16&255,r[7]=m>>>24&255,r[8]=Y>>>0&255,r[9]=Y>>>8&255,r[10]=Y>>>16&255,r[11]=Y>>>24&255,r[12]=P>>>0&255,r[13]=P>>>8&255,r[14]=P>>>16&255,r[15]=P>>>24&255,r[16]=B>>>0&255,r[17]=B>>>8&255,r[18]=B>>>16&255,r[19]=B>>>24&255,r[20]=S>>>0&255,r[21]=S>>>8&255,r[22]=S>>>16&255,r[23]=S>>>24&255,r[24]=K>>>0&255,r[25]=K>>>8&255,r[26]=K>>>16&255,r[27]=K>>>24&255,r[28]=T>>>0&255,r[29]=T>>>8&255,r[30]=T>>>16&255,r[31]=T>>>24&255}function a(r,t,n,e){i(r,t,n,e)}function f(r,t,n,e){h(r,t,n,e)}function s(r,t,n,e,o,i,h){var f,s,u=new Uint8Array(16),c=new Uint8Array(64);for(s=0;16>s;s++)u[s]=0;for(s=0;8>s;s++)u[s]=i[s];for(;o>=64;){for(a(c,u,h,cr),s=0;64>s;s++)r[t+s]=n[e+s]^c[s];for(f=1,s=8;16>s;s++)f=f+(255&u[s])|0,u[s]=255&f,f>>>=8;o-=64,t+=64,e+=64}if(o>0)for(a(c,u,h,cr),s=0;o>s;s++)r[t+s]=n[e+s]^c[s];return 0}function u(r,t,n,e,o){var i,h,f=new Uint8Array(16),s=new Uint8Array(64);for(h=0;16>h;h++)f[h]=0;for(h=0;8>h;h++)f[h]=e[h];for(;n>=64;){for(a(s,f,o,cr),h=0;64>h;h++)r[t+h]=s[h];for(i=1,h=8;16>h;h++)i=i+(255&f[h])|0,f[h]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(a(s,f,o,cr),h=0;n>h;h++)r[t+h]=s[h];return 0}function c(r,t,n,e,o){var i=new Uint8Array(32);f(i,e,o,cr);for(var h=new Uint8Array(8),a=0;8>a;a++)h[a]=e[a+16];return u(r,t,n,h,i)}function y(r,t,n,e,o,i,h){var a=new Uint8Array(32);f(a,i,h,cr);for(var u=new Uint8Array(8),c=0;8>c;c++)u[c]=i[c+16];return s(r,t,n,e,o,u,a)}function l(r,t,n,e,o,i){var h=new yr(i);return h.update(n,e,o),h.finish(r,t),0}function w(r,t,n,o,i,h){var a=new Uint8Array(16);return l(a,0,n,o,i,h),e(r,t,a,0)}function p(r,t,n,e,o){var i;if(32>n)return-1;for(y(r,0,t,0,n,e,o),l(r,16,r,32,n-32,r),i=0;16>i;i++)r[i]=0;return 0}function v(r,t,n,e,o){var i,h=new Uint8Array(32);if(32>n)return-1;if(c(h,0,32,e,o),0!==w(t,16,t,32,n-32,h))return-1;for(y(r,0,t,0,n,e,o),i=0;32>i;i++)r[i]=0;return 0}function b(r,t){var n;for(n=0;16>n;n++)r[n]=0|t[n]}function g(r){var t,n,e=1;for(t=0;16>t;t++)n=r[t]+e+65535,e=Math.floor(n/65536),r[t]=n-65536*e;r[0]+=e-1+37*(e-1)}function _(r,t,n){for(var e,o=~(n-1),i=0;16>i;i++)e=o&(r[i]^t[i]),r[i]^=e,t[i]^=e}function A(r,t){var n,e,o,i=$(),h=$();for(n=0;16>n;n++)h[n]=t[n];for(g(h),g(h),g(h),e=0;2>e;e++){for(i[0]=h[0]-65517,n=1;15>n;n++)i[n]=h[n]-65535-(i[n-1]>>16&1),i[n-1]&=65535;i[15]=h[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,_(h,i,1-o)}for(n=0;16>n;n++)r[2*n]=255&h[n],r[2*n+1]=h[n]>>8}function d(r,t){var n=new Uint8Array(32),e=new Uint8Array(32);return A(n,r),A(e,t),o(n,0,e,0)}function U(r){var t=new Uint8Array(32);return A(t,r),1&t[0]}function E(r,t){var n;for(n=0;16>n;n++)r[n]=t[2*n]+(t[2*n+1]<<8);r[15]&=32767}function x(r,t,n){for(var e=0;16>e;e++)r[e]=t[e]+n[e]}function M(r,t,n){for(var e=0;16>e;e++)r[e]=t[e]-n[e]}function m(r,t,n){var e,o,i=0,h=0,a=0,f=0,s=0,u=0,c=0,y=0,l=0,w=0,p=0,v=0,b=0,g=0,_=0,A=0,d=0,U=0,E=0,x=0,M=0,m=0,B=0,S=0,K=0,T=0,Y=0,k=0,L=0,z=0,R=0,P=n[0],O=n[1],N=n[2],C=n[3],F=n[4],I=n[5],G=n[6],Z=n[7],j=n[8],q=n[9],V=n[10],X=n[11],D=n[12],H=n[13],J=n[14],Q=n[15];e=t[0],i+=e*P,h+=e*O,a+=e*N,f+=e*C,s+=e*F,u+=e*I,c+=e*G,y+=e*Z,l+=e*j,w+=e*q,p+=e*V,v+=e*X,b+=e*D,g+=e*H,_+=e*J,A+=e*Q,e=t[1],h+=e*P,a+=e*O,f+=e*N,s+=e*C,u+=e*F,c+=e*I,y+=e*G,l+=e*Z,w+=e*j,p+=e*q,v+=e*V,b+=e*X,g+=e*D,_+=e*H,A+=e*J,d+=e*Q,e=t[2],a+=e*P,f+=e*O,s+=e*N,u+=e*C,c+=e*F,y+=e*I,l+=e*G,w+=e*Z,p+=e*j,v+=e*q,b+=e*V,g+=e*X,_+=e*D,A+=e*H,d+=e*J,U+=e*Q,e=t[3],f+=e*P,s+=e*O,u+=e*N,c+=e*C,y+=e*F,l+=e*I,w+=e*G,p+=e*Z,v+=e*j,b+=e*q,g+=e*V,_+=e*X,A+=e*D,d+=e*H,U+=e*J,E+=e*Q,e=t[4],s+=e*P,u+=e*O,c+=e*N,y+=e*C,l+=e*F,w+=e*I,p+=e*G,v+=e*Z,b+=e*j,g+=e*q,_+=e*V,A+=e*X,d+=e*D,U+=e*H,E+=e*J,x+=e*Q,e=t[5],u+=e*P,c+=e*O,y+=e*N,l+=e*C,w+=e*F,p+=e*I,v+=e*G,b+=e*Z,g+=e*j,_+=e*q,A+=e*V,d+=e*X,U+=e*D,E+=e*H,x+=e*J,M+=e*Q,e=t[6],c+=e*P,y+=e*O,l+=e*N,w+=e*C,p+=e*F,v+=e*I,b+=e*G,g+=e*Z,_+=e*j,A+=e*q,d+=e*V,U+=e*X,E+=e*D,x+=e*H,M+=e*J,m+=e*Q,e=t[7],y+=e*P,l+=e*O,w+=e*N,p+=e*C,v+=e*F,b+=e*I,g+=e*G,_+=e*Z,A+=e*j,d+=e*q,U+=e*V,E+=e*X,x+=e*D,M+=e*H,m+=e*J,B+=e*Q,e=t[8],l+=e*P,w+=e*O,p+=e*N,v+=e*C,b+=e*F,g+=e*I,_+=e*G,A+=e*Z,d+=e*j,U+=e*q,E+=e*V,x+=e*X,M+=e*D,m+=e*H,B+=e*J,S+=e*Q,e=t[9],w+=e*P,p+=e*O,v+=e*N,b+=e*C,g+=e*F,_+=e*I,A+=e*G,d+=e*Z,U+=e*j,E+=e*q,x+=e*V,M+=e*X,m+=e*D,B+=e*H,S+=e*J,K+=e*Q,e=t[10],p+=e*P,v+=e*O,b+=e*N,g+=e*C,_+=e*F,A+=e*I,d+=e*G,U+=e*Z,E+=e*j,x+=e*q,M+=e*V,m+=e*X,B+=e*D,S+=e*H,K+=e*J,T+=e*Q,e=t[11],v+=e*P,b+=e*O,g+=e*N,_+=e*C,A+=e*F,d+=e*I,U+=e*G,E+=e*Z,x+=e*j,M+=e*q,m+=e*V,B+=e*X,S+=e*D,K+=e*H,T+=e*J,Y+=e*Q,e=t[12],b+=e*P,g+=e*O,_+=e*N,A+=e*C,d+=e*F,U+=e*I,E+=e*G,x+=e*Z,M+=e*j,m+=e*q,B+=e*V,S+=e*X,K+=e*D,T+=e*H,Y+=e*J,k+=e*Q,e=t[13],g+=e*P,_+=e*O,A+=e*N,d+=e*C,U+=e*F,E+=e*I,x+=e*G,M+=e*Z,m+=e*j,B+=e*q,S+=e*V,K+=e*X,T+=e*D,Y+=e*H,k+=e*J,L+=e*Q,e=t[14],_+=e*P,A+=e*O,d+=e*N,U+=e*C,E+=e*F,x+=e*I,M+=e*G,m+=e*Z,B+=e*j,S+=e*q,K+=e*V,T+=e*X,Y+=e*D,k+=e*H,L+=e*J,z+=e*Q,e=t[15],A+=e*P,d+=e*O,U+=e*N,E+=e*C,x+=e*F,M+=e*I,m+=e*G,B+=e*Z,S+=e*j,K+=e*q,T+=e*V,Y+=e*X,k+=e*D,L+=e*H,z+=e*J,R+=e*Q,i+=38*d,h+=38*U,a+=38*E,f+=38*x,s+=38*M,u+=38*m,c+=38*B,y+=38*S,l+=38*K,w+=38*T,p+=38*Y,v+=38*k,b+=38*L,g+=38*z,_+=38*R,o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=_+o+65535,o=Math.floor(e/65536),_=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=_+o+65535,o=Math.floor(e/65536),_=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),r[0]=i,r[1]=h,r[2]=a,r[3]=f,r[4]=s,r[5]=u,r[6]=c,r[7]=y,r[8]=l,r[9]=w,r[10]=p,r[11]=v,r[12]=b,r[13]=g,r[14]=_,r[15]=A}function B(r,t){m(r,t,t)}function S(r,t){var n,e=$();for(n=0;16>n;n++)e[n]=t[n];for(n=253;n>=0;n--)B(e,e),2!==n&&4!==n&&m(e,e,t);for(n=0;16>n;n++)r[n]=e[n]}function K(r,t){var n,e=$();for(n=0;16>n;n++)e[n]=t[n];for(n=250;n>=0;n--)B(e,e),1!==n&&m(e,e,t);for(n=0;16>n;n++)r[n]=e[n]}function T(r,t,n){var e,o,i=new Uint8Array(32),h=new Float64Array(80),a=$(),f=$(),s=$(),u=$(),c=$(),y=$();for(o=0;31>o;o++)i[o]=t[o];for(i[31]=127&t[31]|64,i[0]&=248,E(h,n),o=0;16>o;o++)f[o]=h[o],u[o]=a[o]=s[o]=0;for(a[0]=u[0]=1,o=254;o>=0;--o)e=i[o>>>3]>>>(7&o)&1,_(a,f,e),_(s,u,e),x(c,a,s),M(a,a,s),x(s,f,u),M(f,f,u),B(u,c),B(y,a),m(a,s,a),m(s,f,c),x(c,a,s),M(a,a,s),B(f,a),M(s,u,y),m(a,s,ir),x(a,a,u),m(s,s,a),m(a,u,y),m(u,f,h),B(f,c),_(a,f,e),_(s,u,e);for(o=0;16>o;o++)h[o+16]=a[o],h[o+32]=s[o],h[o+48]=f[o],h[o+64]=u[o];var l=h.subarray(32),w=h.subarray(16);return S(l,l),m(w,w,l),A(r,w),0}function Y(r,t){return T(r,t,nr)}function k(r,t){return rr(t,32),Y(r,t)}function L(r,t,n){var e=new Uint8Array(32);return T(e,n,t),f(r,tr,e,cr)}function z(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),lr(r,t,n,e,h)}function R(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),wr(r,t,n,e,h)}function P(r,t,n,e){for(var o,i,h,a,f,s,u,c,y,l,w,p,v,b,g,_,A,d,U,E,x,M,m,B,S,K,T=new Int32Array(16),Y=new Int32Array(16),k=r[0],L=r[1],z=r[2],R=r[3],P=r[4],O=r[5],N=r[6],C=r[7],F=t[0],I=t[1],G=t[2],Z=t[3],j=t[4],q=t[5],V=t[6],X=t[7],D=0;e>=128;){for(U=0;16>U;U++)E=8*U+D,T[U]=n[E+0]<<24|n[E+1]<<16|n[E+2]<<8|n[E+3],Y[U]=n[E+4]<<24|n[E+5]<<16|n[E+6]<<8|n[E+7];for(U=0;80>U;U++)if(o=k,i=L,h=z,a=R,f=P,s=O,u=N,c=C,y=F,l=I,w=G,p=Z,v=j,b=q,g=V,_=X,x=C,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(P>>>14|j<<18)^(P>>>18|j<<14)^(j>>>9|P<<23),M=(j>>>14|P<<18)^(j>>>18|P<<14)^(P>>>9|j<<23),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=P&O^~P&N,M=j&q^~j&V,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=pr[2*U],M=pr[2*U+1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=T[U%16],M=Y[U%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,A=65535&S|K<<16,d=65535&m|B<<16,x=A,M=d,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(k>>>28|F<<4)^(F>>>2|k<<30)^(F>>>7|k<<25),M=(F>>>28|k<<4)^(k>>>2|F<<30)^(k>>>7|F<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=k&L^k&z^L&z,M=F&I^F&G^I&G,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,c=65535&S|K<<16,_=65535&m|B<<16,x=a,M=p,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=A,M=d,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,a=65535&S|K<<16,p=65535&m|B<<16,L=o,z=i,R=h,P=a,O=f,N=s,C=u,k=c,I=y,G=l,Z=w,j=p,q=v,V=b,X=g,F=_,U%16===15)for(E=0;16>E;E++)x=T[E],M=Y[E],m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=T[(E+9)%16],M=Y[(E+9)%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+1)%16],d=Y[(E+1)%16],x=(A>>>1|d<<31)^(A>>>8|d<<24)^A>>>7,M=(d>>>1|A<<31)^(d>>>8|A<<24)^(d>>>7|A<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+14)%16],d=Y[(E+14)%16],x=(A>>>19|d<<13)^(d>>>29|A<<3)^A>>>6,M=(d>>>19|A<<13)^(A>>>29|d<<3)^(d>>>6|A<<26),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,T[E]=65535&S|K<<16,Y[E]=65535&m|B<<16;x=k,M=F,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[0],M=t[0],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[0]=k=65535&S|K<<16,t[0]=F=65535&m|B<<16,x=L,M=I,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[1],M=t[1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[1]=L=65535&S|K<<16,t[1]=I=65535&m|B<<16,x=z,M=G,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[2],M=t[2],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[2]=z=65535&S|K<<16,t[2]=G=65535&m|B<<16,x=R,M=Z,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[3],M=t[3],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[3]=R=65535&S|K<<16,t[3]=Z=65535&m|B<<16,x=P,M=j,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[4],M=t[4],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[4]=P=65535&S|K<<16,t[4]=j=65535&m|B<<16,x=O,M=q,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[5],M=t[5],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[5]=O=65535&S|K<<16,t[5]=q=65535&m|B<<16,x=N,M=V,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[6],M=t[6],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[6]=N=65535&S|K<<16,t[6]=V=65535&m|B<<16,x=C,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[7],M=t[7],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[7]=C=65535&S|K<<16,t[7]=X=65535&m|B<<16,D+=128,e-=128}return e}function O(r,n,e){var o,i=new Int32Array(8),h=new Int32Array(8),a=new Uint8Array(256),f=e;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,h[0]=4089235720,h[1]=2227873595,h[2]=4271175723,h[3]=1595750129,h[4]=2917565137,h[5]=725511199,h[6]=4215389547,h[7]=327033209,P(i,h,n,e),e%=128,o=0;e>o;o++)a[o]=n[f-e+o];for(a[e]=128,e=256-128*(112>e?1:0),a[e-9]=0,t(a,e-8,f/536870912|0,f<<3),P(i,h,a,e),o=0;8>o;o++)t(r,8*o,i[o],h[o]);return 0}function N(r,t){var n=$(),e=$(),o=$(),i=$(),h=$(),a=$(),f=$(),s=$(),u=$();M(n,r[1],r[0]),M(u,t[1],t[0]),m(n,n,u),x(e,r[0],r[1]),x(u,t[0],t[1]),m(e,e,u),m(o,r[3],t[3]),m(o,o,ar),m(i,r[2],t[2]),x(i,i,i),M(h,e,n),M(a,i,o),x(f,i,o),x(s,e,n),m(r[0],h,a),m(r[1],s,f),m(r[2],f,a),m(r[3],h,s)}function C(r,t,n){var e;for(e=0;4>e;e++)_(r[e],t[e],n)}function F(r,t){var n=$(),e=$(),o=$();S(o,t[2]),m(n,t[0],o),m(e,t[1],o),A(r,e),r[31]^=U(n)<<7}function I(r,t,n){var e,o;for(b(r[0],er),b(r[1],or),b(r[2],or),b(r[3],er),o=255;o>=0;--o)e=n[o/8|0]>>(7&o)&1,C(r,t,e),N(t,r),N(r,r),C(r,t,e)}function G(r,t){var n=[$(),$(),$(),$()];b(n[0],fr),b(n[1],sr),b(n[2],or),m(n[3],fr,sr),I(r,n,t)}function Z(r,t,n){var e,o=new Uint8Array(64),i=[$(),$(),$(),$()];for(n||rr(t,32),O(o,t,32),o[0]&=248,o[31]&=127,o[31]|=64,G(i,o),F(r,i),e=0;32>e;e++)t[e+32]=r[e];return 0}function j(r,t){var n,e,o,i;for(e=63;e>=32;--e){for(n=0,o=e-32,i=e-12;i>o;++o)t[o]+=n-16*t[e]*vr[o-(e-32)],n=t[o]+128>>8,t[o]-=256*n;t[o]+=n,t[e]=0}for(n=0,o=0;32>o;o++)t[o]+=n-(t[31]>>4)*vr[o],n=t[o]>>8,t[o]&=255;for(o=0;32>o;o++)t[o]-=n*vr[o];for(e=0;32>e;e++)t[e+1]+=t[e]>>8,r[e]=255&t[e]}function q(r){var t,n=new Float64Array(64);for(t=0;64>t;t++)n[t]=r[t];for(t=0;64>t;t++)r[t]=0;j(r,n)}function V(r,t,n,e){var o,i,h=new Uint8Array(64),a=new Uint8Array(64),f=new Uint8Array(64),s=new Float64Array(64),u=[$(),$(),$(),$()];O(h,e,32),h[0]&=248,h[31]&=127,h[31]|=64;var c=n+64;for(o=0;n>o;o++)r[64+o]=t[o];for(o=0;32>o;o++)r[32+o]=h[32+o];for(O(f,r.subarray(32),n+32),q(f),G(u,f),F(r,u),o=32;64>o;o++)r[o]=e[o];for(O(a,r,n+64),q(a),o=0;64>o;o++)s[o]=0;for(o=0;32>o;o++)s[o]=f[o];for(o=0;32>o;o++)for(i=0;32>i;i++)s[o+i]+=a[o]*h[i];return j(r.subarray(32),s),c}function X(r,t){var n=$(),e=$(),o=$(),i=$(),h=$(),a=$(),f=$();return b(r[2],or),E(r[1],t),B(o,r[1]),m(i,o,hr),M(o,o,r[2]),x(i,r[2],i),B(h,i),B(a,h),m(f,a,h),m(n,f,o),m(n,n,i),K(n,n),m(n,n,o),m(n,n,i),m(n,n,i),m(r[0],n,i),B(e,r[0]),m(e,e,i),d(e,o)&&m(r[0],r[0],ur),B(e,r[0]),m(e,e,i),d(e,o)?-1:(U(r[0])===t[31]>>7&&M(r[0],er,r[0]),m(r[3],r[0],r[1]),0)}function D(r,t,n,e){var i,h,a=new Uint8Array(32),f=new Uint8Array(64),s=[$(),$(),$(),$()],u=[$(),$(),$(),$()];if(h=-1,64>n)return-1;if(X(u,e))return-1;for(i=0;n>i;i++)r[i]=t[i];for(i=0;32>i;i++)r[i+32]=e[i];if(O(f,r,n),q(f),I(s,u,f),G(u,t.subarray(32)),N(s,u),F(a,s),n-=64,o(t,0,a,0)){for(i=0;n>i;i++)r[i]=0;return-1}for(i=0;n>i;i++)r[i]=t[i+64];return h=n}function H(r,t){if(r.length!==br)throw new Error("bad key size");if(t.length!==gr)throw new Error("bad nonce size")}function J(r,t){if(r.length!==Er)throw new Error("bad public key size");if(t.length!==xr)throw new Error("bad secret key size")}function Q(){var r,t;for(t=0;t>>13|n<<3),e=255&r[4]|(255&r[5])<<8,this.r[2]=7939&(n>>>10|e<<6),o=255&r[6]|(255&r[7])<<8,this.r[3]=8191&(e>>>7|o<<9),i=255&r[8]|(255&r[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,h=255&r[10]|(255&r[11])<<8,this.r[6]=8191&(i>>>14|h<<2),a=255&r[12]|(255&r[13])<<8,this.r[7]=8065&(h>>>11|a<<5),f=255&r[14]|(255&r[15])<<8,this.r[8]=8191&(a>>>8|f<<8),this.r[9]=f>>>5&127,this.pad[0]=255&r[16]|(255&r[17])<<8,this.pad[1]=255&r[18]|(255&r[19])<<8,this.pad[2]=255&r[20]|(255&r[21])<<8,this.pad[3]=255&r[22]|(255&r[23])<<8,this.pad[4]=255&r[24]|(255&r[25])<<8,this.pad[5]=255&r[26]|(255&r[27])<<8,this.pad[6]=255&r[28]|(255&r[29])<<8,this.pad[7]=255&r[30]|(255&r[31])<<8};yr.prototype.blocks=function(r,t,n){for(var e,o,i,h,a,f,s,u,c,y,l,w,p,v,b,g,_,A,d,U=this.fin?0:2048,E=this.h[0],x=this.h[1],M=this.h[2],m=this.h[3],B=this.h[4],S=this.h[5],K=this.h[6],T=this.h[7],Y=this.h[8],k=this.h[9],L=this.r[0],z=this.r[1],R=this.r[2],P=this.r[3],O=this.r[4],N=this.r[5],C=this.r[6],F=this.r[7],I=this.r[8],G=this.r[9];n>=16;)e=255&r[t+0]|(255&r[t+1])<<8,E+=8191&e,o=255&r[t+2]|(255&r[t+3])<<8,x+=8191&(e>>>13|o<<3),i=255&r[t+4]|(255&r[t+5])<<8,M+=8191&(o>>>10|i<<6),h=255&r[t+6]|(255&r[t+7])<<8,m+=8191&(i>>>7|h<<9),a=255&r[t+8]|(255&r[t+9])<<8,B+=8191&(h>>>4|a<<12),S+=a>>>1&8191,f=255&r[t+10]|(255&r[t+11])<<8,K+=8191&(a>>>14|f<<2),s=255&r[t+12]|(255&r[t+13])<<8,T+=8191&(f>>>11|s<<5),u=255&r[t+14]|(255&r[t+15])<<8,Y+=8191&(s>>>8|u<<8),k+=u>>>5|U,c=0,y=c,y+=E*L,y+=x*(5*G),y+=M*(5*I),y+=m*(5*F),y+=B*(5*C),c=y>>>13,y&=8191,y+=S*(5*N),y+=K*(5*O),y+=T*(5*P),y+=Y*(5*R),y+=k*(5*z),c+=y>>>13,y&=8191,l=c,l+=E*z,l+=x*L,l+=M*(5*G),l+=m*(5*I),l+=B*(5*F),c=l>>>13,l&=8191,l+=S*(5*C),l+=K*(5*N),l+=T*(5*O),l+=Y*(5*P),l+=k*(5*R),c+=l>>>13,l&=8191,w=c,w+=E*R,w+=x*z,w+=M*L,w+=m*(5*G),w+=B*(5*I),c=w>>>13,w&=8191,w+=S*(5*F),w+=K*(5*C),w+=T*(5*N),w+=Y*(5*O),w+=k*(5*P),c+=w>>>13,w&=8191,p=c,p+=E*P,p+=x*R,p+=M*z,p+=m*L,p+=B*(5*G),c=p>>>13,p&=8191,p+=S*(5*I),p+=K*(5*F),p+=T*(5*C),p+=Y*(5*N),p+=k*(5*O),c+=p>>>13,p&=8191,v=c,v+=E*O,v+=x*P,v+=M*R,v+=m*z,v+=B*L,c=v>>>13,v&=8191,v+=S*(5*G),v+=K*(5*I),v+=T*(5*F),v+=Y*(5*C),v+=k*(5*N),c+=v>>>13,v&=8191,b=c,b+=E*N,b+=x*O,b+=M*P,b+=m*R,b+=B*z,c=b>>>13,b&=8191,b+=S*L,b+=K*(5*G),b+=T*(5*I),b+=Y*(5*F),b+=k*(5*C),c+=b>>>13,b&=8191,g=c,g+=E*C,g+=x*N,g+=M*O,g+=m*P,g+=B*R,c=g>>>13,g&=8191,g+=S*z,g+=K*L,g+=T*(5*G),g+=Y*(5*I),g+=k*(5*F),c+=g>>>13,g&=8191,_=c,_+=E*F,_+=x*C,_+=M*N,_+=m*O,_+=B*P,c=_>>>13,_&=8191,_+=S*R,_+=K*z,_+=T*L,_+=Y*(5*G),_+=k*(5*I),c+=_>>>13,_&=8191,A=c,A+=E*I,A+=x*F,A+=M*C,A+=m*N,A+=B*O,c=A>>>13,A&=8191,A+=S*P,A+=K*R,A+=T*z,A+=Y*L,A+=k*(5*G),c+=A>>>13,A&=8191,d=c,d+=E*G,d+=x*I,d+=M*F,d+=m*C,d+=B*N,c=d>>>13,d&=8191,d+=S*O,d+=K*P,d+=T*R,d+=Y*z,d+=k*L,c+=d>>>13,d&=8191,c=(c<<2)+c|0,c=c+y|0,y=8191&c,c>>>=13,l+=c,E=y,x=l,M=w,m=p,B=v,S=b,K=g,T=_,Y=A,k=d,t+=16,n-=16;this.h[0]=E,this.h[1]=x,this.h[2]=M,this.h[3]=m,this.h[4]=B,this.h[5]=S,this.h[6]=K,this.h[7]=T,this.h[8]=Y,this.h[9]=k},yr.prototype.finish=function(r,t){var n,e,o,i,h=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;16>i;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;10>i;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,h[0]=this.h[0]+5,n=h[0]>>>13,h[0]&=8191,i=1;10>i;i++)h[i]=this.h[i]+n,n=h[i]>>>13,h[i]&=8191;for(h[9]-=8192,e=(1^n)-1,i=0;10>i;i++)h[i]&=e;for(e=~e,i=0;10>i;i++)this.h[i]=this.h[i]&e|h[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;8>i;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;r[t+0]=this.h[0]>>>0&255,r[t+1]=this.h[0]>>>8&255,r[t+2]=this.h[1]>>>0&255,r[t+3]=this.h[1]>>>8&255,r[t+4]=this.h[2]>>>0&255,r[t+5]=this.h[2]>>>8&255,r[t+6]=this.h[3]>>>0&255,r[t+7]=this.h[3]>>>8&255,r[t+8]=this.h[4]>>>0&255,r[t+9]=this.h[4]>>>8&255,r[t+10]=this.h[5]>>>0&255,r[t+11]=this.h[5]>>>8&255,r[t+12]=this.h[6]>>>0&255,r[t+13]=this.h[6]>>>8&255,r[t+14]=this.h[7]>>>0&255,r[t+15]=this.h[7]>>>8&255},yr.prototype.update=function(r,t,n){var e,o;if(this.leftover){for(o=16-this.leftover,o>n&&(o=n),e=0;o>e;e++)this.buffer[this.leftover+e]=r[t+e];if(n-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(o=n-n%16,this.blocks(r,t,o),t+=o,n-=o),n){for(e=0;n>e;e++)this.buffer[this.leftover+e]=r[t+e];this.leftover+=n}};var lr=p,wr=v,pr=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],vr=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),br=32,gr=24,_r=32,Ar=16,dr=32,Ur=32,Er=32,xr=32,Mr=32,mr=gr,Br=_r,Sr=Ar,Kr=64,Tr=32,Yr=64,kr=32,Lr=64;r.lowlevel={crypto_core_hsalsa20:f,crypto_stream_xor:y,crypto_stream:c,crypto_stream_salsa20_xor:s,crypto_stream_salsa20:u,crypto_onetimeauth:l,crypto_onetimeauth_verify:w,crypto_verify_16:e,crypto_verify_32:o,crypto_secretbox:p,crypto_secretbox_open:v,crypto_scalarmult:T,crypto_scalarmult_base:Y,crypto_box_beforenm:L,crypto_box_afternm:lr,crypto_box:z,crypto_box_open:R,crypto_box_keypair:k,crypto_hash:O,crypto_sign:V,crypto_sign_keypair:Z,crypto_sign_open:D,crypto_secretbox_KEYBYTES:br,crypto_secretbox_NONCEBYTES:gr,crypto_secretbox_ZEROBYTES:_r,crypto_secretbox_BOXZEROBYTES:Ar,crypto_scalarmult_BYTES:dr,crypto_scalarmult_SCALARBYTES:Ur,crypto_box_PUBLICKEYBYTES:Er,crypto_box_SECRETKEYBYTES:xr,crypto_box_BEFORENMBYTES:Mr,crypto_box_NONCEBYTES:mr,crypto_box_ZEROBYTES:Br,crypto_box_BOXZEROBYTES:Sr,crypto_sign_BYTES:Kr,crypto_sign_PUBLICKEYBYTES:Tr,crypto_sign_SECRETKEYBYTES:Yr,crypto_sign_SEEDBYTES:kr,crypto_hash_BYTES:Lr},r.util||(r.util={},r.util.decodeUTF8=r.util.encodeUTF8=r.util.encodeBase64=r.util.decodeBase64=function(){throw new Error("nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js")}),r.randomBytes=function(r){var t=new Uint8Array(r);return rr(t,r),t},r.secretbox=function(r,t,n){Q(r,t,n),H(n,t);for(var e=new Uint8Array(_r+r.length),o=new Uint8Array(e.length),i=0;ie)return null;for(var o=new Uint8Array(e),i=0;ie;e++)o[e]=t[e];for(e=0;e=0},r.sign.keyPair=function(){var r=new Uint8Array(Tr),t=new Uint8Array(Yr);return Z(r,t),{publicKey:r,secretKey:t}},r.sign.keyPair.fromSecretKey=function(r){if(Q(r),r.length!==Yr)throw new Error("bad secret key size");for(var t=new Uint8Array(Tr),n=0;ne;e++)n[e]=r[e];return Z(t,n,!0),{publicKey:t,secretKey:n}},r.sign.publicKeyLength=Tr,r.sign.secretKeyLength=Yr,r.sign.seedLength=kr,r.sign.signatureLength=Kr,r.hash=function(r){Q(r);var t=new Uint8Array(Lr);return O(t,r,r.length),t},r.hash.hashLength=Lr,r.verify=function(r,t){return Q(r,t), +0===r.length||0===t.length?!1:r.length!==t.length?!1:0===n(r,0,t,0,r.length)?!0:!1},r.setPRNG=function(r){rr=r},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(t&&t.getRandomValues){var n=65536;r.setPRNG(function(r,e){var o,i=new Uint8Array(e);for(o=0;e>o;o+=n)t.getRandomValues(i.subarray(o,o+Math.min(e-o,n)));for(o=0;e>o;o++)r[o]=i[o];W(i)})}else"undefined"!=typeof require&&(t=require("crypto"),t&&t.randomBytes&&r.setPRNG(function(r,n){var e,o=t.randomBytes(n);for(e=0;n>e;e++)r[e]=o[e];W(o)}))}()}("undefined"!=typeof module&&module.exports?module.exports:self.nacl=self.nacl||{}); \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.js index b8edbbee692cdf..f72dd78d12550f 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.js +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.js @@ -944,39 +944,13 @@ function cleanup(arr) { for (var i = 0; i < arr.length; i++) arr[i] = 0; } -nacl.util = {}; - -nacl.util.decodeUTF8 = function(s) { - var i, d = unescape(encodeURIComponent(s)), b = new Uint8Array(d.length); - for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i); - return b; -}; - -nacl.util.encodeUTF8 = function(arr) { - var i, s = []; - for (i = 0; i < arr.length; i++) s.push(String.fromCharCode(arr[i])); - return decodeURIComponent(escape(s.join(''))); -}; - -nacl.util.encodeBase64 = function(arr) { - if (typeof btoa === 'undefined') { - return (new Buffer(arr)).toString('base64'); - } else { - var i, s = [], len = arr.length; - for (i = 0; i < len; i++) s.push(String.fromCharCode(arr[i])); - return btoa(s.join('')); - } -}; - -nacl.util.decodeBase64 = function(s) { - if (typeof atob === 'undefined') { - return new Uint8Array(Array.prototype.slice.call(new Buffer(s, 'base64'), 0)); - } else { - var i, d = atob(s), b = new Uint8Array(d.length); - for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i); - return b; - } -}; +// TODO: Completely remove this in v0.15. +if (!nacl.util) { + nacl.util = {}; + nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() { + throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js'); + }; +} nacl.randomBytes = function(n) { var b = new Uint8Array(n); @@ -1173,26 +1147,22 @@ nacl.setPRNG = function(fn) { (function() { // Initialize PRNG if environment provides CSPRNG. // If not, methods calling randombytes will throw. - var crypto; - if (typeof window !== 'undefined') { - // Browser. - if (window.crypto && window.crypto.getRandomValues) { - crypto = window.crypto; // Standard - } else if (window.msCrypto && window.msCrypto.getRandomValues) { - crypto = window.msCrypto; // Internet Explorer 11+ - } - if (crypto) { - nacl.setPRNG(function(x, n) { - var i, v = new Uint8Array(n); - crypto.getRandomValues(v); - for (i = 0; i < n; i++) x[i] = v[i]; - cleanup(v); - }); - } + var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null; + if (crypto && crypto.getRandomValues) { + // Browsers. + var QUOTA = 65536; + nacl.setPRNG(function(x, n) { + var i, v = new Uint8Array(n); + for (i = 0; i < n; i += QUOTA) { + crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA))); + } + for (i = 0; i < n; i++) x[i] = v[i]; + cleanup(v); + }); } else if (typeof require !== 'undefined') { // Node.js. crypto = require('crypto'); - if (crypto) { + if (crypto && crypto.randomBytes) { nacl.setPRNG(function(x, n) { var i, v = crypto.randomBytes(n); for (i = 0; i < n; i++) x[i] = v[i]; @@ -1202,4 +1172,4 @@ nacl.setPRNG = function(fn) { } })(); -})(typeof module !== 'undefined' && module.exports ? module.exports : (window.nacl = window.nacl || {})); +})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {})); diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.min.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.min.js index 95d869502e4b0d..eed3854153ec05 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.min.js +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.min.js @@ -1 +1 @@ -!function(r){"use strict";function n(r,n){return r<>>32-n}function e(r,n){var e=255&r[n+3];return e=e<<8|255&r[n+2],e=e<<8|255&r[n+1],e<<8|255&r[n+0]}function t(r,n){var e=r[n]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3],t=r[n+4]<<24|r[n+5]<<16|r[n+6]<<8|r[n+7];return new lr(e,t)}function o(r,n,e){var t;for(t=0;4>t;t++)r[n+t]=255&e,e>>>=8}function i(r,n,e){r[n]=e.hi>>24&255,r[n+1]=e.hi>>16&255,r[n+2]=e.hi>>8&255,r[n+3]=255&e.hi,r[n+4]=e.lo>>24&255,r[n+5]=e.lo>>16&255,r[n+6]=e.lo>>8&255,r[n+7]=255&e.lo}function a(r,n,e,t,o){var i,a=0;for(i=0;o>i;i++)a|=r[n+i]^e[t+i];return(1&a-1>>>8)-1}function f(r,n,e,t){return a(r,n,e,t,16)}function u(r,n,e,t){return a(r,n,e,t,32)}function c(r,t,i,a,f){var u,c,w,y=new Uint32Array(16),s=new Uint32Array(16),l=new Uint32Array(16),h=new Uint32Array(4);for(u=0;4>u;u++)s[5*u]=e(a,4*u),s[1+u]=e(i,4*u),s[6+u]=e(t,4*u),s[11+u]=e(i,16+4*u);for(u=0;16>u;u++)l[u]=s[u];for(u=0;20>u;u++){for(c=0;4>c;c++){for(w=0;4>w;w++)h[w]=s[(5*c+4*w)%16];for(h[1]^=n(h[0]+h[3]|0,7),h[2]^=n(h[1]+h[0]|0,9),h[3]^=n(h[2]+h[1]|0,13),h[0]^=n(h[3]+h[2]|0,18),w=0;4>w;w++)y[4*c+(c+w)%4]=h[w]}for(w=0;16>w;w++)s[w]=y[w]}if(f){for(u=0;16>u;u++)s[u]=s[u]+l[u]|0;for(u=0;4>u;u++)s[5*u]=s[5*u]-e(a,4*u)|0,s[6+u]=s[6+u]-e(t,4*u)|0;for(u=0;4>u;u++)o(r,4*u,s[5*u]),o(r,16+4*u,s[6+u])}else for(u=0;16>u;u++)o(r,4*u,s[u]+l[u]|0)}function w(r,n,e,t){return c(r,n,e,t,!1),0}function y(r,n,e,t){return c(r,n,e,t,!0),0}function s(r,n,e,t,o,i,a){var f,u,c=new Uint8Array(16),y=new Uint8Array(64);if(!o)return 0;for(u=0;16>u;u++)c[u]=0;for(u=0;8>u;u++)c[u]=i[u];for(;o>=64;){for(w(y,c,a,Br),u=0;64>u;u++)r[n+u]=(e?e[t+u]:0)^y[u];for(f=1,u=8;16>u;u++)f=f+(255&c[u])|0,c[u]=255&f,f>>>=8;o-=64,n+=64,e&&(t+=64)}if(o>0)for(w(y,c,a,Br),u=0;o>u;u++)r[n+u]=(e?e[t+u]:0)^y[u];return 0}function l(r,n,e,t,o){return s(r,n,null,0,e,t,o)}function h(r,n,e,t,o){var i=new Uint8Array(32);return y(i,t,o,Br),l(r,n,e,t.subarray(16),i)}function g(r,n,e,t,o,i,a){var f=new Uint8Array(32);return y(f,i,a,Br),s(r,n,e,t,o,i.subarray(16),f)}function p(r,n){var e,t=0;for(e=0;17>e;e++)t=t+(r[e]+n[e]|0)|0,r[e]=255&t,t>>>=8}function v(r,n,e,t,o,i){var a,f,u,c,w=new Uint32Array(17),y=new Uint32Array(17),s=new Uint32Array(17),l=new Uint32Array(17),h=new Uint32Array(17);for(u=0;17>u;u++)y[u]=s[u]=0;for(u=0;16>u;u++)y[u]=i[u];for(y[3]&=15,y[4]&=252,y[7]&=15,y[8]&=252,y[11]&=15,y[12]&=252,y[15]&=15;o>0;){for(u=0;17>u;u++)l[u]=0;for(u=0;16>u&&o>u;++u)l[u]=e[t+u];for(l[u]=1,t+=u,o-=u,p(s,l),f=0;17>f;f++)for(w[f]=0,u=0;17>u;u++)w[f]=w[f]+s[u]*(f>=u?y[f-u]:320*y[f+17-u]|0)|0|0;for(f=0;17>f;f++)s[f]=w[f];for(c=0,u=0;16>u;u++)c=c+s[u]|0,s[u]=255&c,c>>>=8;for(c=c+s[16]|0,s[16]=3&c,c=5*(c>>>2)|0,u=0;16>u;u++)c=c+s[u]|0,s[u]=255&c,c>>>=8;c=c+s[16]|0,s[16]=c}for(u=0;17>u;u++)h[u]=s[u];for(p(s,Sr),a=0|-(s[16]>>>7),u=0;17>u;u++)s[u]^=a&(h[u]^s[u]);for(u=0;16>u;u++)l[u]=i[u+16];for(l[16]=0,p(s,l),u=0;16>u;u++)r[n+u]=s[u];return 0}function b(r,n,e,t,o,i){var a=new Uint8Array(16);return v(a,0,e,t,o,i),f(r,n,a,0)}function A(r,n,e,t,o){var i;if(32>e)return-1;for(g(r,0,n,0,e,t,o),v(r,16,r,32,e-32,r),i=0;16>i;i++)r[i]=0;return 0}function U(r,n,e,t,o){var i,a=new Uint8Array(32);if(32>e)return-1;if(h(a,0,32,t,o),0!==b(n,16,n,32,e-32,a))return-1;for(g(r,0,n,0,e,t,o),i=0;32>i;i++)r[i]=0;return 0}function _(r,n){var e;for(e=0;16>e;e++)r[e]=0|n[e]}function d(r){var n,e;for(e=0;16>e;e++)r[e]+=65536,n=Math.floor(r[e]/65536),r[(e+1)*(15>e?1:0)]+=n-1+37*(n-1)*(15===e?1:0),r[e]-=65536*n}function E(r,n,e){for(var t,o=~(e-1),i=0;16>i;i++)t=o&(r[i]^n[i]),r[i]^=t,n[i]^=t}function x(r,n){var e,t,o,i=hr(),a=hr();for(e=0;16>e;e++)a[e]=n[e];for(d(a),d(a),d(a),t=0;2>t;t++){for(i[0]=a[0]-65517,e=1;15>e;e++)i[e]=a[e]-65535-(i[e-1]>>16&1),i[e-1]&=65535;i[15]=a[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,E(a,i,1-o)}for(e=0;16>e;e++)r[2*e]=255&a[e],r[2*e+1]=a[e]>>8}function m(r,n){var e=new Uint8Array(32),t=new Uint8Array(32);return x(e,r),x(t,n),u(e,0,t,0)}function B(r){var n=new Uint8Array(32);return x(n,r),1&n[0]}function S(r,n){var e;for(e=0;16>e;e++)r[e]=n[2*e]+(n[2*e+1]<<8);r[15]&=32767}function K(r,n,e){var t;for(t=0;16>t;t++)r[t]=n[t]+e[t]|0}function T(r,n,e){var t;for(t=0;16>t;t++)r[t]=n[t]-e[t]|0}function Y(r,n,e){var t,o,i=new Float64Array(31);for(t=0;31>t;t++)i[t]=0;for(t=0;16>t;t++)for(o=0;16>o;o++)i[t+o]+=n[t]*e[o];for(t=0;15>t;t++)i[t]+=38*i[t+16];for(t=0;16>t;t++)r[t]=i[t];d(r),d(r)}function L(r,n){Y(r,n,n)}function C(r,n){var e,t=hr();for(e=0;16>e;e++)t[e]=n[e];for(e=253;e>=0;e--)L(t,t),2!==e&&4!==e&&Y(t,t,n);for(e=0;16>e;e++)r[e]=t[e]}function R(r,n){var e,t=hr();for(e=0;16>e;e++)t[e]=n[e];for(e=250;e>=0;e--)L(t,t),1!==e&&Y(t,t,n);for(e=0;16>e;e++)r[e]=t[e]}function k(r,n,e){var t,o,i=new Uint8Array(32),a=new Float64Array(80),f=hr(),u=hr(),c=hr(),w=hr(),y=hr(),s=hr();for(o=0;31>o;o++)i[o]=n[o];for(i[31]=127&n[31]|64,i[0]&=248,S(a,e),o=0;16>o;o++)u[o]=a[o],w[o]=f[o]=c[o]=0;for(f[0]=w[0]=1,o=254;o>=0;--o)t=i[o>>>3]>>>(7&o)&1,E(f,u,t),E(c,w,t),K(y,f,c),T(f,f,c),K(c,u,w),T(u,u,w),L(w,y),L(s,f),Y(f,c,f),Y(c,u,y),K(y,f,c),T(f,f,c),L(u,f),T(c,w,s),Y(f,c,Ur),K(f,f,w),Y(c,c,f),Y(f,w,s),Y(w,u,a),L(u,y),E(f,u,t),E(c,w,t);for(o=0;16>o;o++)a[o+16]=f[o],a[o+32]=c[o],a[o+48]=u[o],a[o+64]=w[o];var l=a.subarray(32),h=a.subarray(16);return C(l,l),Y(h,h,l),x(r,h),0}function z(r,n){return k(r,n,vr)}function P(r,n){return gr(n,32),z(r,n)}function O(r,n,e){var t=new Uint8Array(32);return k(t,e,n),y(r,pr,t,Br)}function F(r,n,e,t,o,i){var a=new Uint8Array(32);return O(a,o,i),Kr(r,n,e,t,a)}function N(r,n,e,t,o,i){var a=new Uint8Array(32);return O(a,o,i),Tr(r,n,e,t,a)}function M(){var r,n,e,t=0,o=0,i=0,a=0,f=65535;for(e=0;e>>16,i+=n&f,a+=n>>>16;return o+=t>>>16,i+=o>>>16,a+=i>>>16,new lr(i&f|a<<16,t&f|o<<16)}function j(r,n){return new lr(r.hi>>>n,r.lo>>>n|r.hi<<32-n)}function G(){var r,n=0,e=0;for(r=0;rn?(e=r.hi>>>n|r.lo<>>n|r.hi<n&&(e=r.lo>>>n|r.hi<>>n|r.lo<a;a++)u[a]=w[a]=t(r,8*a);for(var s=0;e>=128;){for(a=0;16>a;a++)y[a]=t(n,8*a+s);for(a=0;80>a;a++){for(f=0;8>f;f++)c[f]=w[f];for(o=M(w[7],X(w[4]),Z(w[4],w[5],w[6]),Yr[a],y[a%16]),c[7]=M(o,q(w[0]),V(w[0],w[1],w[2])),c[3]=M(c[3],o),f=0;8>f;f++)w[(f+1)%8]=c[f];if(a%16===15)for(f=0;16>f;f++)y[f]=M(y[f],y[(f+9)%16],D(y[(f+1)%16]),H(y[(f+14)%16]))}for(a=0;8>a;a++)w[a]=M(w[a],u[a]),u[a]=w[a];s+=128,e-=128}for(a=0;8>a;a++)i(r,8*a,u[a]);return e}function Q(r,n,e){var t,o=new Uint8Array(64),a=new Uint8Array(256),f=e;for(t=0;64>t;t++)o[t]=Lr[t];for(J(o,n,e),e%=128,t=0;256>t;t++)a[t]=0;for(t=0;e>t;t++)a[t]=n[f-e+t];for(a[e]=128,e=256-128*(112>e?1:0),a[e-9]=0,i(a,e-8,new lr(f/536870912|0,f<<3)),J(o,a,e),t=0;64>t;t++)r[t]=o[t];return 0}function W(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr(),c=hr(),w=hr();T(e,r[1],r[0]),T(w,n[1],n[0]),Y(e,e,w),K(t,r[0],r[1]),K(w,n[0],n[1]),Y(t,t,w),Y(o,r[3],n[3]),Y(o,o,dr),Y(i,r[2],n[2]),K(i,i,i),T(a,t,e),T(f,i,o),K(u,i,o),K(c,t,e),Y(r[0],a,f),Y(r[1],c,u),Y(r[2],u,f),Y(r[3],a,c)}function $(r,n,e){var t;for(t=0;4>t;t++)E(r[t],n[t],e)}function rr(r,n){var e=hr(),t=hr(),o=hr();C(o,n[2]),Y(e,n[0],o),Y(t,n[1],o),x(r,t),r[31]^=B(e)<<7}function nr(r,n,e){var t,o;for(_(r[0],br),_(r[1],Ar),_(r[2],Ar),_(r[3],br),o=255;o>=0;--o)t=e[o/8|0]>>(7&o)&1,$(r,n,t),W(n,r),W(r,r),$(r,n,t)}function er(r,n){var e=[hr(),hr(),hr(),hr()];_(e[0],Er),_(e[1],xr),_(e[2],Ar),Y(e[3],Er,xr),nr(r,e,n)}function tr(r,n,e){var t,o=new Uint8Array(64),i=[hr(),hr(),hr(),hr()];for(e||gr(n,32),Q(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,er(i,o),rr(r,i),t=0;32>t;t++)n[t+32]=r[t];return 0}function or(r,n){var e,t,o,i;for(t=63;t>=32;--t){for(e=0,o=t-32,i=t-12;i>o;++o)n[o]+=e-16*n[t]*Cr[o-(t-32)],e=n[o]+128>>8,n[o]-=256*e;n[o]+=e,n[t]=0}for(e=0,o=0;32>o;o++)n[o]+=e-(n[31]>>4)*Cr[o],e=n[o]>>8,n[o]&=255;for(o=0;32>o;o++)n[o]-=e*Cr[o];for(t=0;32>t;t++)n[t+1]+=n[t]>>8,r[t]=255&n[t]}function ir(r){var n,e=new Float64Array(64);for(n=0;64>n;n++)e[n]=r[n];for(n=0;64>n;n++)r[n]=0;or(r,e)}function ar(r,n,e,t){var o,i,a=new Uint8Array(64),f=new Uint8Array(64),u=new Uint8Array(64),c=new Float64Array(64),w=[hr(),hr(),hr(),hr()];Q(a,t,32),a[0]&=248,a[31]&=127,a[31]|=64;var y=e+64;for(o=0;e>o;o++)r[64+o]=n[o];for(o=0;32>o;o++)r[32+o]=a[32+o];for(Q(u,r.subarray(32),e+32),ir(u),er(w,u),rr(r,w),o=32;64>o;o++)r[o]=t[o];for(Q(f,r,e+64),ir(f),o=0;64>o;o++)c[o]=0;for(o=0;32>o;o++)c[o]=u[o];for(o=0;32>o;o++)for(i=0;32>i;i++)c[o+i]+=f[o]*a[i];return or(r.subarray(32),c),y}function fr(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr();return _(r[2],Ar),S(r[1],n),L(o,r[1]),Y(i,o,_r),T(o,o,r[2]),K(i,r[2],i),L(a,i),L(f,a),Y(u,f,a),Y(e,u,o),Y(e,e,i),R(e,e),Y(e,e,o),Y(e,e,i),Y(e,e,i),Y(r[0],e,i),L(t,r[0]),Y(t,t,i),m(t,o)&&Y(r[0],r[0],mr),L(t,r[0]),Y(t,t,i),m(t,o)?-1:(B(r[0])===n[31]>>7&&T(r[0],br,r[0]),Y(r[3],r[0],r[1]),0)}function ur(r,n,e,t){var o,i,a=new Uint8Array(32),f=new Uint8Array(64),c=[hr(),hr(),hr(),hr()],w=[hr(),hr(),hr(),hr()];if(i=-1,64>e)return-1;if(fr(w,t))return-1;for(o=0;e>o;o++)r[o]=n[o];for(o=0;32>o;o++)r[o+32]=t[o];if(Q(f,r,e),ir(f),nr(c,w,f),er(w,n.subarray(32)),W(c,w),rr(a,c),e-=64,u(n,0,a,0)){for(o=0;e>o;o++)r[o]=0;return-1}for(o=0;e>o;o++)r[o]=n[o+64];return i=e}function cr(r,n){if(r.length!==Rr)throw new Error("bad key size");if(n.length!==kr)throw new Error("bad nonce size")}function wr(r,n){if(r.length!==Nr)throw new Error("bad public key size");if(n.length!==Mr)throw new Error("bad secret key size")}function yr(){var r,n;for(n=0;nn;n++)e.push(String.fromCharCode(r[n]));return btoa(e.join(""))},r.util.decodeBase64=function(r){if("undefined"==typeof atob)return new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0));var n,e=atob(r),t=new Uint8Array(e.length);for(n=0;nt)return null;for(var o=new Uint8Array(t),i=0;it;t++)o[t]=n[t];for(t=0;t=0},r.sign.keyPair=function(){var r=new Uint8Array(qr),n=new Uint8Array(Xr);return tr(r,n),{publicKey:r,secretKey:n}},r.sign.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Xr)throw new Error("bad secret key size");for(var n=new Uint8Array(qr),e=0;et;t++)e[t]=r[t];return tr(n,e,!0),{publicKey:n,secretKey:e}},r.sign.publicKeyLength=qr,r.sign.secretKeyLength=Xr,r.sign.seedLength=Dr,r.sign.signatureLength=Vr,r.hash=function(r){yr(r);var n=new Uint8Array(Hr);return Q(n,r,r.length),n},r.hash.hashLength=Hr,r.verify=function(r,n){return yr(r,n),0===r.length||0===n.length?!1:r.length!==n.length?!1:0===a(r,0,n,0,r.length)?!0:!1},r.setPRNG=function(r){gr=r},function(){var n;"undefined"!=typeof window?(window.crypto&&window.crypto.getRandomValues?n=window.crypto:window.msCrypto&&window.msCrypto.getRandomValues&&(n=window.msCrypto),n&&r.setPRNG(function(r,e){var t,o=new Uint8Array(e);for(n.getRandomValues(o),t=0;e>t;t++)r[t]=o[t];sr(o)})):"undefined"!=typeof require&&(n=require("crypto"),n&&r.setPRNG(function(r,e){var t,o=n.randomBytes(e);for(t=0;e>t;t++)r[t]=o[t];sr(o)}))}()}("undefined"!=typeof module&&module.exports?module.exports:window.nacl=window.nacl||{}); \ No newline at end of file +!function(r){"use strict";function n(r,n){return r<>>32-n}function e(r,n){var e=255&r[n+3];return e=e<<8|255&r[n+2],e=e<<8|255&r[n+1],e<<8|255&r[n+0]}function t(r,n){var e=r[n]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3],t=r[n+4]<<24|r[n+5]<<16|r[n+6]<<8|r[n+7];return new lr(e,t)}function o(r,n,e){var t;for(t=0;4>t;t++)r[n+t]=255&e,e>>>=8}function i(r,n,e){r[n]=e.hi>>24&255,r[n+1]=e.hi>>16&255,r[n+2]=e.hi>>8&255,r[n+3]=255&e.hi,r[n+4]=e.lo>>24&255,r[n+5]=e.lo>>16&255,r[n+6]=e.lo>>8&255,r[n+7]=255&e.lo}function a(r,n,e,t,o){var i,a=0;for(i=0;o>i;i++)a|=r[n+i]^e[t+i];return(1&a-1>>>8)-1}function f(r,n,e,t){return a(r,n,e,t,16)}function u(r,n,e,t){return a(r,n,e,t,32)}function c(r,t,i,a,f){var u,c,w,y=new Uint32Array(16),s=new Uint32Array(16),l=new Uint32Array(16),h=new Uint32Array(4);for(u=0;4>u;u++)s[5*u]=e(a,4*u),s[1+u]=e(i,4*u),s[6+u]=e(t,4*u),s[11+u]=e(i,16+4*u);for(u=0;16>u;u++)l[u]=s[u];for(u=0;20>u;u++){for(c=0;4>c;c++){for(w=0;4>w;w++)h[w]=s[(5*c+4*w)%16];for(h[1]^=n(h[0]+h[3]|0,7),h[2]^=n(h[1]+h[0]|0,9),h[3]^=n(h[2]+h[1]|0,13),h[0]^=n(h[3]+h[2]|0,18),w=0;4>w;w++)y[4*c+(c+w)%4]=h[w]}for(w=0;16>w;w++)s[w]=y[w]}if(f){for(u=0;16>u;u++)s[u]=s[u]+l[u]|0;for(u=0;4>u;u++)s[5*u]=s[5*u]-e(a,4*u)|0,s[6+u]=s[6+u]-e(t,4*u)|0;for(u=0;4>u;u++)o(r,4*u,s[5*u]),o(r,16+4*u,s[6+u])}else for(u=0;16>u;u++)o(r,4*u,s[u]+l[u]|0)}function w(r,n,e,t){return c(r,n,e,t,!1),0}function y(r,n,e,t){return c(r,n,e,t,!0),0}function s(r,n,e,t,o,i,a){var f,u,c=new Uint8Array(16),y=new Uint8Array(64);if(!o)return 0;for(u=0;16>u;u++)c[u]=0;for(u=0;8>u;u++)c[u]=i[u];for(;o>=64;){for(w(y,c,a,Br),u=0;64>u;u++)r[n+u]=(e?e[t+u]:0)^y[u];for(f=1,u=8;16>u;u++)f=f+(255&c[u])|0,c[u]=255&f,f>>>=8;o-=64,n+=64,e&&(t+=64)}if(o>0)for(w(y,c,a,Br),u=0;o>u;u++)r[n+u]=(e?e[t+u]:0)^y[u];return 0}function l(r,n,e,t,o){return s(r,n,null,0,e,t,o)}function h(r,n,e,t,o){var i=new Uint8Array(32);return y(i,t,o,Br),l(r,n,e,t.subarray(16),i)}function g(r,n,e,t,o,i,a){var f=new Uint8Array(32);return y(f,i,a,Br),s(r,n,e,t,o,i.subarray(16),f)}function v(r,n){var e,t=0;for(e=0;17>e;e++)t=t+(r[e]+n[e]|0)|0,r[e]=255&t,t>>>=8}function b(r,n,e,t,o,i){var a,f,u,c,w=new Uint32Array(17),y=new Uint32Array(17),s=new Uint32Array(17),l=new Uint32Array(17),h=new Uint32Array(17);for(u=0;17>u;u++)y[u]=s[u]=0;for(u=0;16>u;u++)y[u]=i[u];for(y[3]&=15,y[4]&=252,y[7]&=15,y[8]&=252,y[11]&=15,y[12]&=252,y[15]&=15;o>0;){for(u=0;17>u;u++)l[u]=0;for(u=0;16>u&&o>u;++u)l[u]=e[t+u];for(l[u]=1,t+=u,o-=u,v(s,l),f=0;17>f;f++)for(w[f]=0,u=0;17>u;u++)w[f]=w[f]+s[u]*(f>=u?y[f-u]:320*y[f+17-u]|0)|0|0;for(f=0;17>f;f++)s[f]=w[f];for(c=0,u=0;16>u;u++)c=c+s[u]|0,s[u]=255&c,c>>>=8;for(c=c+s[16]|0,s[16]=3&c,c=5*(c>>>2)|0,u=0;16>u;u++)c=c+s[u]|0,s[u]=255&c,c>>>=8;c=c+s[16]|0,s[16]=c}for(u=0;17>u;u++)h[u]=s[u];for(v(s,Sr),a=0|-(s[16]>>>7),u=0;17>u;u++)s[u]^=a&(h[u]^s[u]);for(u=0;16>u;u++)l[u]=i[u+16];for(l[16]=0,v(s,l),u=0;16>u;u++)r[n+u]=s[u];return 0}function p(r,n,e,t,o,i){var a=new Uint8Array(16);return b(a,0,e,t,o,i),f(r,n,a,0)}function _(r,n,e,t,o){var i;if(32>e)return-1;for(g(r,0,n,0,e,t,o),b(r,16,r,32,e-32,r),i=0;16>i;i++)r[i]=0;return 0}function A(r,n,e,t,o){var i,a=new Uint8Array(32);if(32>e)return-1;if(h(a,0,32,t,o),0!==p(n,16,n,32,e-32,a))return-1;for(g(r,0,n,0,e,t,o),i=0;32>i;i++)r[i]=0;return 0}function U(r,n){var e;for(e=0;16>e;e++)r[e]=0|n[e]}function E(r){var n,e;for(e=0;16>e;e++)r[e]+=65536,n=Math.floor(r[e]/65536),r[(e+1)*(15>e?1:0)]+=n-1+37*(n-1)*(15===e?1:0),r[e]-=65536*n}function d(r,n,e){for(var t,o=~(e-1),i=0;16>i;i++)t=o&(r[i]^n[i]),r[i]^=t,n[i]^=t}function x(r,n){var e,t,o,i=hr(),a=hr();for(e=0;16>e;e++)a[e]=n[e];for(E(a),E(a),E(a),t=0;2>t;t++){for(i[0]=a[0]-65517,e=1;15>e;e++)i[e]=a[e]-65535-(i[e-1]>>16&1),i[e-1]&=65535;i[15]=a[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,d(a,i,1-o)}for(e=0;16>e;e++)r[2*e]=255&a[e],r[2*e+1]=a[e]>>8}function m(r,n){var e=new Uint8Array(32),t=new Uint8Array(32);return x(e,r),x(t,n),u(e,0,t,0)}function B(r){var n=new Uint8Array(32);return x(n,r),1&n[0]}function S(r,n){var e;for(e=0;16>e;e++)r[e]=n[2*e]+(n[2*e+1]<<8);r[15]&=32767}function K(r,n,e){var t;for(t=0;16>t;t++)r[t]=n[t]+e[t]|0}function T(r,n,e){var t;for(t=0;16>t;t++)r[t]=n[t]-e[t]|0}function Y(r,n,e){var t,o,i=new Float64Array(31);for(t=0;31>t;t++)i[t]=0;for(t=0;16>t;t++)for(o=0;16>o;o++)i[t+o]+=n[t]*e[o];for(t=0;15>t;t++)i[t]+=38*i[t+16];for(t=0;16>t;t++)r[t]=i[t];E(r),E(r)}function L(r,n){Y(r,n,n)}function k(r,n){var e,t=hr();for(e=0;16>e;e++)t[e]=n[e];for(e=253;e>=0;e--)L(t,t),2!==e&&4!==e&&Y(t,t,n);for(e=0;16>e;e++)r[e]=t[e]}function z(r,n){var e,t=hr();for(e=0;16>e;e++)t[e]=n[e];for(e=250;e>=0;e--)L(t,t),1!==e&&Y(t,t,n);for(e=0;16>e;e++)r[e]=t[e]}function R(r,n,e){var t,o,i=new Uint8Array(32),a=new Float64Array(80),f=hr(),u=hr(),c=hr(),w=hr(),y=hr(),s=hr();for(o=0;31>o;o++)i[o]=n[o];for(i[31]=127&n[31]|64,i[0]&=248,S(a,e),o=0;16>o;o++)u[o]=a[o],w[o]=f[o]=c[o]=0;for(f[0]=w[0]=1,o=254;o>=0;--o)t=i[o>>>3]>>>(7&o)&1,d(f,u,t),d(c,w,t),K(y,f,c),T(f,f,c),K(c,u,w),T(u,u,w),L(w,y),L(s,f),Y(f,c,f),Y(c,u,y),K(y,f,c),T(f,f,c),L(u,f),T(c,w,s),Y(f,c,Ar),K(f,f,w),Y(c,c,f),Y(f,w,s),Y(w,u,a),L(u,y),d(f,u,t),d(c,w,t);for(o=0;16>o;o++)a[o+16]=f[o],a[o+32]=c[o],a[o+48]=u[o],a[o+64]=w[o];var l=a.subarray(32),h=a.subarray(16);return k(l,l),Y(h,h,l),x(r,h),0}function P(r,n){return R(r,n,br)}function O(r,n){return gr(n,32),P(r,n)}function F(r,n,e){var t=new Uint8Array(32);return R(t,e,n),y(r,vr,t,Br)}function N(r,n,e,t,o,i){var a=new Uint8Array(32);return F(a,o,i),Kr(r,n,e,t,a)}function C(r,n,e,t,o,i){var a=new Uint8Array(32);return F(a,o,i),Tr(r,n,e,t,a)}function M(){var r,n,e,t=0,o=0,i=0,a=0,f=65535;for(e=0;e>>16,i+=n&f,a+=n>>>16;return o+=t>>>16,i+=o>>>16,a+=i>>>16,new lr(i&f|a<<16,t&f|o<<16)}function G(r,n){return new lr(r.hi>>>n,r.lo>>>n|r.hi<<32-n)}function Z(){var r,n=0,e=0;for(r=0;rn?(e=r.hi>>>n|r.lo<>>n|r.hi<n&&(e=r.lo>>>n|r.hi<>>n|r.lo<a;a++)u[a]=w[a]=t(r,8*a);for(var s=0;e>=128;){for(a=0;16>a;a++)y[a]=t(n,8*a+s);for(a=0;80>a;a++){for(f=0;8>f;f++)c[f]=w[f];for(o=M(w[7],X(w[4]),q(w[4],w[5],w[6]),Yr[a],y[a%16]),c[7]=M(o,V(w[0]),I(w[0],w[1],w[2])),c[3]=M(c[3],o),f=0;8>f;f++)w[(f+1)%8]=c[f];if(a%16===15)for(f=0;16>f;f++)y[f]=M(y[f],y[(f+9)%16],D(y[(f+1)%16]),H(y[(f+14)%16]))}for(a=0;8>a;a++)w[a]=M(w[a],u[a]),u[a]=w[a];s+=128,e-=128}for(a=0;8>a;a++)i(r,8*a,u[a]);return e}function Q(r,n,e){var t,o=new Uint8Array(64),a=new Uint8Array(256),f=e;for(t=0;64>t;t++)o[t]=Lr[t];for(J(o,n,e),e%=128,t=0;256>t;t++)a[t]=0;for(t=0;e>t;t++)a[t]=n[f-e+t];for(a[e]=128,e=256-128*(112>e?1:0),a[e-9]=0,i(a,e-8,new lr(f/536870912|0,f<<3)),J(o,a,e),t=0;64>t;t++)r[t]=o[t];return 0}function W(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr(),c=hr(),w=hr();T(e,r[1],r[0]),T(w,n[1],n[0]),Y(e,e,w),K(t,r[0],r[1]),K(w,n[0],n[1]),Y(t,t,w),Y(o,r[3],n[3]),Y(o,o,Er),Y(i,r[2],n[2]),K(i,i,i),T(a,t,e),T(f,i,o),K(u,i,o),K(c,t,e),Y(r[0],a,f),Y(r[1],c,u),Y(r[2],u,f),Y(r[3],a,c)}function $(r,n,e){var t;for(t=0;4>t;t++)d(r[t],n[t],e)}function rr(r,n){var e=hr(),t=hr(),o=hr();k(o,n[2]),Y(e,n[0],o),Y(t,n[1],o),x(r,t),r[31]^=B(e)<<7}function nr(r,n,e){var t,o;for(U(r[0],pr),U(r[1],_r),U(r[2],_r),U(r[3],pr),o=255;o>=0;--o)t=e[o/8|0]>>(7&o)&1,$(r,n,t),W(n,r),W(r,r),$(r,n,t)}function er(r,n){var e=[hr(),hr(),hr(),hr()];U(e[0],dr),U(e[1],xr),U(e[2],_r),Y(e[3],dr,xr),nr(r,e,n)}function tr(r,n,e){var t,o=new Uint8Array(64),i=[hr(),hr(),hr(),hr()];for(e||gr(n,32),Q(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,er(i,o),rr(r,i),t=0;32>t;t++)n[t+32]=r[t];return 0}function or(r,n){var e,t,o,i;for(t=63;t>=32;--t){for(e=0,o=t-32,i=t-12;i>o;++o)n[o]+=e-16*n[t]*kr[o-(t-32)],e=n[o]+128>>8,n[o]-=256*e;n[o]+=e,n[t]=0}for(e=0,o=0;32>o;o++)n[o]+=e-(n[31]>>4)*kr[o],e=n[o]>>8,n[o]&=255;for(o=0;32>o;o++)n[o]-=e*kr[o];for(t=0;32>t;t++)n[t+1]+=n[t]>>8,r[t]=255&n[t]}function ir(r){var n,e=new Float64Array(64);for(n=0;64>n;n++)e[n]=r[n];for(n=0;64>n;n++)r[n]=0;or(r,e)}function ar(r,n,e,t){var o,i,a=new Uint8Array(64),f=new Uint8Array(64),u=new Uint8Array(64),c=new Float64Array(64),w=[hr(),hr(),hr(),hr()];Q(a,t,32),a[0]&=248,a[31]&=127,a[31]|=64;var y=e+64;for(o=0;e>o;o++)r[64+o]=n[o];for(o=0;32>o;o++)r[32+o]=a[32+o];for(Q(u,r.subarray(32),e+32),ir(u),er(w,u),rr(r,w),o=32;64>o;o++)r[o]=t[o];for(Q(f,r,e+64),ir(f),o=0;64>o;o++)c[o]=0;for(o=0;32>o;o++)c[o]=u[o];for(o=0;32>o;o++)for(i=0;32>i;i++)c[o+i]+=f[o]*a[i];return or(r.subarray(32),c),y}function fr(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr();return U(r[2],_r),S(r[1],n),L(o,r[1]),Y(i,o,Ur),T(o,o,r[2]),K(i,r[2],i),L(a,i),L(f,a),Y(u,f,a),Y(e,u,o),Y(e,e,i),z(e,e),Y(e,e,o),Y(e,e,i),Y(e,e,i),Y(r[0],e,i),L(t,r[0]),Y(t,t,i),m(t,o)&&Y(r[0],r[0],mr),L(t,r[0]),Y(t,t,i),m(t,o)?-1:(B(r[0])===n[31]>>7&&T(r[0],pr,r[0]),Y(r[3],r[0],r[1]),0)}function ur(r,n,e,t){var o,i,a=new Uint8Array(32),f=new Uint8Array(64),c=[hr(),hr(),hr(),hr()],w=[hr(),hr(),hr(),hr()];if(i=-1,64>e)return-1;if(fr(w,t))return-1;for(o=0;e>o;o++)r[o]=n[o];for(o=0;32>o;o++)r[o+32]=t[o];if(Q(f,r,e),ir(f),nr(c,w,f),er(w,n.subarray(32)),W(c,w),rr(a,c),e-=64,u(n,0,a,0)){for(o=0;e>o;o++)r[o]=0;return-1}for(o=0;e>o;o++)r[o]=n[o+64];return i=e}function cr(r,n){if(r.length!==zr)throw new Error("bad key size");if(n.length!==Rr)throw new Error("bad nonce size")}function wr(r,n){if(r.length!==Cr)throw new Error("bad public key size");if(n.length!==Mr)throw new Error("bad secret key size")}function yr(){var r,n;for(n=0;nt)return null;for(var o=new Uint8Array(t),i=0;it;t++)o[t]=n[t];for(t=0;t=0},r.sign.keyPair=function(){var r=new Uint8Array(Vr),n=new Uint8Array(Xr);return tr(r,n),{publicKey:r,secretKey:n}},r.sign.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Xr)throw new Error("bad secret key size");for(var n=new Uint8Array(Vr),e=0;et;t++)e[t]=r[t];return tr(n,e,!0),{publicKey:n,secretKey:e}},r.sign.publicKeyLength=Vr,r.sign.secretKeyLength=Xr,r.sign.seedLength=Dr,r.sign.signatureLength=Ir,r.hash=function(r){yr(r);var n=new Uint8Array(Hr);return Q(n,r,r.length),n},r.hash.hashLength=Hr,r.verify=function(r,n){return yr(r,n),0===r.length||0===n.length?!1:r.length!==n.length?!1:0===a(r,0,n,0,r.length)?!0:!1},r.setPRNG=function(r){gr=r},function(){var n="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(n&&n.getRandomValues){var e=65536;r.setPRNG(function(r,t){var o,i=new Uint8Array(t);for(o=0;t>o;o+=e)n.getRandomValues(i.subarray(o,o+Math.min(t-o,e)));for(o=0;t>o;o++)r[o]=i[o];sr(i)})}else"undefined"!=typeof require&&(n=require("crypto"),n&&n.randomBytes&&r.setPRNG(function(r,e){var t,o=n.randomBytes(e);for(t=0;e>t;t++)r[t]=o[t];sr(o)}))}()}("undefined"!=typeof module&&module.exports?module.exports:self.nacl=self.nacl||{}); \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json index 147ea92c406fa1..9e31f630bca074 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json @@ -2,45 +2,49 @@ "_args": [ [ { - "raw": "tweetnacl@~0.13.0", + "raw": "tweetnacl@~0.14.0", "scope": null, "escapedName": "tweetnacl", "name": "tweetnacl", - "rawSpec": "~0.13.0", - "spec": ">=0.13.0 <0.14.0", + "rawSpec": "~0.14.0", + "spec": ">=0.14.0 <0.15.0", "type": "range" }, "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk" ] ], - "_from": "tweetnacl@>=0.13.0 <0.14.0", - "_id": "tweetnacl@0.13.3", + "_from": "tweetnacl@>=0.14.0 <0.15.0", + "_id": "tweetnacl@0.14.3", "_inCache": true, - "_installable": true, "_location": "/request/http-signature/sshpk/tweetnacl", - "_nodeVersion": "4.2.3", + "_nodeVersion": "5.6.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/tweetnacl-0.14.3.tgz_1459224951636_0.7403244483284652" + }, "_npmUser": { "name": "dchest", "email": "dmitry@codingrobots.com" }, - "_npmVersion": "2.14.7", + "_npmVersion": "3.7.3", "_phantomChildren": {}, "_requested": { - "raw": "tweetnacl@~0.13.0", + "raw": "tweetnacl@~0.14.0", "scope": null, "escapedName": "tweetnacl", "name": "tweetnacl", - "rawSpec": "~0.13.0", - "spec": ">=0.13.0 <0.14.0", + "rawSpec": "~0.14.0", + "spec": ">=0.14.0 <0.15.0", "type": "range" }, "_requiredBy": [ - "/request/http-signature/sshpk" + "/request/http-signature/sshpk", + "/request/http-signature/sshpk/bcrypt-pbkdf" ], - "_resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.3.tgz", - "_shasum": "d628b56f3bcc3d5ae74ba9d4c1a704def5ab4b56", + "_resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.3.tgz", + "_shasum": "3da382f670f25ded78d7b3d1792119bca0b7132d", "_shrinkwrap": null, - "_spec": "tweetnacl@~0.13.0", + "_spec": "tweetnacl@~0.14.0", "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk", "author": { "name": "TweetNaCl-js contributors" @@ -55,23 +59,24 @@ "dependencies": {}, "description": "Port of TweetNaCl cryptographic library to JavaScript", "devDependencies": { - "browserify": "^10.1.3", - "eslint": "^1.4.3", - "faucet": "0.0.1", + "browserify": "^13.0.0", + "eslint": "^2.2.0", + "faucet": "^0.0.1", "tap-browser-color": "^0.1.2", - "tape": "^4.0.0", - "testling": "^1.7.1", - "uglify-js": "^2.4.21" + "tape": "^4.4.0", + "tape-run": "^2.1.3", + "tweetnacl-util": "^0.13.3", + "uglify-js": "^2.6.1" }, "directories": { "test": "test" }, "dist": { - "shasum": "d628b56f3bcc3d5ae74ba9d4c1a704def5ab4b56", - "tarball": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.3.tgz" + "shasum": "3da382f670f25ded78d7b3d1792119bca0b7132d", + "tarball": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.3.tgz" }, - "gitHead": "2bb422cb707fba4a5ec9654688564a4fb861b068", - "homepage": "https://dchest.github.io/tweetnacl-js", + "gitHead": "3eb4fc544a2a1d6c0a41b98b9906288ca8b087e4", + "homepage": "https://tweetnacl.js.org", "keywords": [ "crypto", "cryptography", @@ -86,7 +91,7 @@ "salsa20", "signatures" ], - "license": "Public domain", + "license": "SEE LICENSE IN COPYING.txt", "main": "nacl-fast.js", "maintainers": [ { @@ -103,27 +108,13 @@ }, "scripts": { "bench": "node test/benchmark/bench.js", - "browser": "browserify test/browser/init.js test/*.js | uglifyjs -c -m -o test/browser/_bundle.js 2>/dev/null", - "browser-quick": "browserify test/browser/init.js test/*.quick.js | uglifyjs -c -m -o test/browser/_bundle-quick.js 2>/dev/null", "build": "uglifyjs nacl.js -c -m -o nacl.min.js && uglifyjs nacl-fast.js -c -m -o nacl-fast.min.js", - "chrome": "browserify test/browser/testling_init.js test/*.js | testling -x google-chrome | faucet", - "firefox": "browserify test/browser/testling_init.js test/*.js | testling -x firefox | faucet", + "build-test-browser": "browserify test/browser/init.js test/*.js | uglifyjs -c -m -o test/browser/_bundle.js 2>/dev/null && browserify test/browser/init.js test/*.quick.js | uglifyjs -c -m -o test/browser/_bundle-quick.js 2>/dev/null", "lint": "eslint nacl.js nacl-fast.js test/*.js test/benchmark/*.js", - "test": "tape test/*.js | faucet", - "testall": "make -C test/c && tape test/*.js test/c/*.js | faucet", - "testling": "browserify test/browser/testling_init.js test/*.js | testling | faucet" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "chrome/22..latest", - "firefox/16..latest", - "safari/latest", - "opera/11.0..latest", - "iphone/6..latest", - "ipad/6..latest", - "android-browser/latest" - ] + "test": "npm run test-node-all && npm run test-browser", + "test-browser": "NACL_SRC=${NACL_SRC:='nacl.min.js'} && npm run build-test-browser && cat $NACL_SRC test/browser/_bundle.js | tape-run | faucet", + "test-node": "tape test/*.js | faucet", + "test-node-all": "make -C test/c && tape test/*.js test/c/*.js | faucet" }, - "version": "0.13.3" + "version": "0.14.3" } diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json index 27d297637ebc2f..02ae0ac7647e07 100644 --- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json +++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json @@ -14,20 +14,19 @@ ] ], "_from": "sshpk@>=1.7.0 <2.0.0", - "_id": "sshpk@1.9.2", + "_id": "sshpk@1.10.1", "_inCache": true, - "_installable": true, "_location": "/request/http-signature/sshpk", "_nodeVersion": "0.12.15", "_npmOperationalInternal": { "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/sshpk-1.9.2.tgz_1469841656006_0.10793639998883009" + "tmp": "tmp/sshpk-1.10.1.tgz_1475095320582_0.4095200637821108" }, "_npmUser": { "name": "arekinath", "email": "alex@cooperi.net" }, - "_npmVersion": "2.15.8", + "_npmVersion": "3.10.3", "_phantomChildren": {}, "_requested": { "raw": "sshpk@^1.7.0", @@ -41,8 +40,8 @@ "_requiredBy": [ "/request/http-signature" ], - "_resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.9.2.tgz", - "_shasum": "3b41351bbad5c34ddf4bd8119937efee31a46765", + "_resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.10.1.tgz", + "_shasum": "30e1a5d329244974a1af61511339d595af6638b0", "_shrinkwrap": null, "_spec": "sshpk@^1.7.0", "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature", @@ -74,12 +73,13 @@ "dependencies": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", "dashdash": "^1.12.0", "ecc-jsbn": "~0.1.1", "getpass": "^0.1.1", "jodid25519": "^1.0.0", "jsbn": "~0.1.0", - "tweetnacl": "~0.13.0" + "tweetnacl": "~0.14.0" }, "description": "A library for finding and using SSH public keys", "devDependencies": { @@ -94,13 +94,13 @@ "man": "./man/man1" }, "dist": { - "shasum": "3b41351bbad5c34ddf4bd8119937efee31a46765", - "tarball": "https://registry.npmjs.org/sshpk/-/sshpk-1.9.2.tgz" + "shasum": "30e1a5d329244974a1af61511339d595af6638b0", + "tarball": "https://registry.npmjs.org/sshpk/-/sshpk-1.10.1.tgz" }, "engines": { "node": ">=0.10.0" }, - "gitHead": "a8b794384822a52eea5ed3b2f192a780b7909609", + "gitHead": "4212272b3889f2df155d2aa8a1a5305fe7a7d3a5", "homepage": "https://github.com/arekinath/node-sshpk#readme", "license": "MIT", "main": "lib/index.js", @@ -117,10 +117,11 @@ ], "name": "sshpk", "optionalDependencies": { + "bcrypt-pbkdf": "^1.0.0", "ecc-jsbn": "~0.1.1", "jodid25519": "^1.0.0", "jsbn": "~0.1.0", - "tweetnacl": "~0.13.0" + "tweetnacl": "~0.14.0" }, "readme": "ERROR: No README data found!", "repository": { @@ -130,5 +131,5 @@ "scripts": { "test": "tape test/*.js" }, - "version": "1.9.2" + "version": "1.10.1" } diff --git a/deps/npm/node_modules/request/node_modules/mime-types/HISTORY.md b/deps/npm/node_modules/request/node_modules/mime-types/HISTORY.md index 63bd4ea0b40ce4..8c0383a61b98f5 100644 --- a/deps/npm/node_modules/request/node_modules/mime-types/HISTORY.md +++ b/deps/npm/node_modules/request/node_modules/mime-types/HISTORY.md @@ -1,3 +1,10 @@ +2.1.12 / 2016-09-18 +=================== + + * deps: mime-db@~1.24.0 + - Add new mime types + - Add `audio/mp3` + 2.1.11 / 2016-05-01 =================== diff --git a/deps/npm/node_modules/request/node_modules/mime-types/index.js b/deps/npm/node_modules/request/node_modules/mime-types/index.js index f7008b246d1e4c..9226ca58473eed 100644 --- a/deps/npm/node_modules/request/node_modules/mime-types/index.js +++ b/deps/npm/node_modules/request/node_modules/mime-types/index.js @@ -46,7 +46,7 @@ populateMaps(exports.extensions, exports.types) * @return {boolean|string} */ -function charset(type) { +function charset (type) { if (!type || typeof type !== 'string') { return false } @@ -74,7 +74,7 @@ function charset(type) { * @return {boolean|string} */ -function contentType(str) { +function contentType (str) { // TODO: should this even be in this module? if (!str || typeof str !== 'string') { return false @@ -104,7 +104,7 @@ function contentType(str) { * @return {boolean|string} */ -function extension(type) { +function extension (type) { if (!type || typeof type !== 'string') { return false } @@ -129,7 +129,7 @@ function extension(type) { * @return {boolean|string} */ -function lookup(path) { +function lookup (path) { if (!path || typeof path !== 'string') { return false } @@ -151,11 +151,11 @@ function lookup(path) { * @private */ -function populateMaps(extensions, types) { +function populateMaps (extensions, types) { // source preference (least -> most) var preference = ['nginx', 'apache', undefined, 'iana'] - Object.keys(db).forEach(function forEachMimeType(type) { + Object.keys(db).forEach(function forEachMimeType (type) { var mime = db[type] var exts = mime.extensions @@ -174,8 +174,8 @@ function populateMaps(extensions, types) { var from = preference.indexOf(db[types[extension]].source) var to = preference.indexOf(mime.source) - if (types[extension] !== 'application/octet-stream' - && from > to || (from === to && types[extension].substr(0, 12) === 'application/')) { + if (types[extension] !== 'application/octet-stream' && + from > to || (from === to && types[extension].substr(0, 12) === 'application/')) { // skip the remapping continue } diff --git a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md index d6705ac86d114f..d4796b55eeff2b 100644 --- a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md +++ b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md @@ -1,3 +1,27 @@ +1.24.0 / 2016-09-18 +=================== + + * Add `application/clue_info+xml` + * Add `application/geo+json` + * Add `application/lgr+xml` + * Add `application/vnd.amazon.mobi8-ebook` + * Add `application/vnd.chess-pgn` + * Add `application/vnd.comicbook+zip` + * Add `application/vnd.d2l.coursepackage1p0+zip` + * Add `application/vnd.espass-espass+zip` + * Add `application/vnd.nearst.inv+json` + * Add `application/vnd.oma.lwm2m+json` + * Add `application/vnd.oma.lwm2m+tlv` + * Add `application/vnd.quarantainenet` + * Add `application/vnd.rar` + * Add `audio/mp3` + * Add `image/dicom-rle` + * Add `image/emf` + * Add `image/jls` + * Add `image/wmf` + * Add `model/gltf+json` + * Add `text/vnd.ascii-art` + 1.23.0 / 2016-05-01 =================== diff --git a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json index 0a5a8a7bba5574..63b226f9c47d94 100644 --- a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json +++ b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json @@ -173,6 +173,9 @@ "application/cfw": { "source": "iana" }, + "application/clue_info+xml": { + "source": "iana" + }, "application/cms": { "source": "iana" }, @@ -357,6 +360,10 @@ "application/framework-attributes+xml": { "source": "iana" }, + "application/geo+json": { + "source": "iana", + "compressible": true + }, "application/gml+xml": { "source": "apache", "extensions": ["gml"] @@ -511,6 +518,9 @@ "compressible": true, "extensions": ["jsonld"] }, + "application/lgr+xml": { + "source": "iana" + }, "application/link-format": { "source": "iana" }, @@ -1316,6 +1326,9 @@ "source": "apache", "extensions": ["azw"] }, + "application/vnd.amazon.mobi8-ebook": { + "source": "iana" + }, "application/vnd.americandynamics.acc": { "source": "iana", "extensions": ["acc"] @@ -1446,6 +1459,9 @@ "source": "iana", "extensions": ["cdxml"] }, + "application/vnd.chess-pgn": { + "source": "iana" + }, "application/vnd.chipnuts.karaoke-mmd": { "source": "iana", "extensions": ["mmd"] @@ -1495,6 +1511,9 @@ "source": "iana", "compressible": true }, + "application/vnd.comicbook+zip": { + "source": "iana" + }, "application/vnd.commerce-battelle": { "source": "iana" }, @@ -1578,6 +1597,9 @@ "application/vnd.cybank": { "source": "iana" }, + "application/vnd.d2l.coursepackage1p0+zip": { + "source": "iana" + }, "application/vnd.dart": { "source": "iana", "compressible": true, @@ -1798,6 +1820,9 @@ "application/vnd.ericsson.quickcall": { "source": "iana" }, + "application/vnd.espass-espass+zip": { + "source": "iana" + }, "application/vnd.eszigno3+xml": { "source": "iana", "extensions": ["es3","et3"] @@ -2809,6 +2834,10 @@ "application/vnd.ncd.reference": { "source": "iana" }, + "application/vnd.nearst.inv+json": { + "source": "iana", + "compressible": true + }, "application/vnd.nervana": { "source": "iana" }, @@ -3115,6 +3144,13 @@ "application/vnd.oma.group-usage-list+xml": { "source": "iana" }, + "application/vnd.oma.lwm2m+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+tlv": { + "source": "iana" + }, "application/vnd.oma.pal+xml": { "source": "iana" }, @@ -3540,6 +3576,9 @@ "application/vnd.qualcomm.brew-app-res": { "source": "iana" }, + "application/vnd.quarantainenet": { + "source": "iana" + }, "application/vnd.quark.quarkxpress": { "source": "iana", "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"] @@ -3598,6 +3637,9 @@ "application/vnd.rapid": { "source": "iana" }, + "application/vnd.rar": { + "source": "iana" + }, "application/vnd.realvnc.bed": { "source": "iana", "extensions": ["bed"] @@ -5062,6 +5104,10 @@ "audio/mobile-xmf": { "source": "iana" }, + "audio/mp3": { + "compressible": false, + "extensions": ["mp3"] + }, "audio/mp4": { "source": "iana", "compressible": false, @@ -5425,7 +5471,7 @@ "extensions": ["otf"] }, "image/bmp": { - "source": "apache", + "source": "iana", "compressible": true, "extensions": ["bmp"] }, @@ -5433,6 +5479,12 @@ "source": "iana", "extensions": ["cgm"] }, + "image/dicom-rle": { + "source": "iana" + }, + "image/emf": { + "source": "iana" + }, "image/fits": { "source": "iana" }, @@ -5449,6 +5501,9 @@ "source": "iana", "extensions": ["ief"] }, + "image/jls": { + "source": "iana" + }, "image/jp2": { "source": "iana" }, @@ -5619,6 +5674,9 @@ "source": "apache", "extensions": ["webp"] }, + "image/wmf": { + "source": "iana" + }, "image/x-3ds": { "source": "apache", "extensions": ["3ds"] @@ -5765,6 +5823,10 @@ "message/vnd.wfa.wsc": { "source": "iana" }, + "model/gltf+json": { + "source": "iana", + "compressible": true + }, "model/iges": { "source": "iana", "compressible": false, @@ -6092,6 +6154,9 @@ "text/vnd.abc": { "source": "iana" }, + "text/vnd.ascii-art": { + "source": "iana" + }, "text/vnd.curl": { "source": "iana", "extensions": ["curl"] diff --git a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json index 8411c5ad0e3f7c..658681becdf5cb 100644 --- a/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json +++ b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json @@ -2,49 +2,48 @@ "_args": [ [ { - "raw": "mime-db@~1.23.0", + "raw": "mime-db@~1.24.0", "scope": null, "escapedName": "mime-db", "name": "mime-db", - "rawSpec": "~1.23.0", - "spec": ">=1.23.0 <1.24.0", + "rawSpec": "~1.24.0", + "spec": ">=1.24.0 <1.25.0", "type": "range" }, "/Users/rebecca/code/npm/node_modules/request/node_modules/mime-types" ] ], - "_from": "mime-db@>=1.23.0 <1.24.0", - "_id": "mime-db@1.23.0", + "_from": "mime-db@>=1.24.0 <1.25.0", + "_id": "mime-db@1.24.0", "_inCache": true, - "_installable": true, "_location": "/request/mime-types/mime-db", - "_nodeVersion": "4.4.3", + "_nodeVersion": "4.5.0", "_npmOperationalInternal": { "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/mime-db-1.23.0.tgz_1462163798086_0.43938886746764183" + "tmp": "tmp/mime-db-1.24.0.tgz_1474198792761_0.7161959335207939" }, "_npmUser": { "name": "dougwilson", "email": "doug@somethingdoug.com" }, - "_npmVersion": "2.15.1", + "_npmVersion": "2.15.9", "_phantomChildren": {}, "_requested": { - "raw": "mime-db@~1.23.0", + "raw": "mime-db@~1.24.0", "scope": null, "escapedName": "mime-db", "name": "mime-db", - "rawSpec": "~1.23.0", - "spec": ">=1.23.0 <1.24.0", + "rawSpec": "~1.24.0", + "spec": ">=1.24.0 <1.25.0", "type": "range" }, "_requiredBy": [ "/request/mime-types" ], - "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.23.0.tgz", - "_shasum": "a31b4070adaea27d732ea333740a64d0ec9a6659", + "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.24.0.tgz", + "_shasum": "e2d13f939f0016c6e4e9ad25a8652f126c467f0c", "_shrinkwrap": null, - "_spec": "mime-db@~1.23.0", + "_spec": "mime-db@~1.24.0", "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/mime-types", "bugs": { "url": "https://github.com/jshttp/mime-db/issues" @@ -68,20 +67,20 @@ "dependencies": {}, "description": "Media Type Database", "devDependencies": { - "bluebird": "3.3.5", + "bluebird": "3.4.6", "co": "4.6.0", "cogent": "1.0.1", - "csv-parse": "1.1.0", + "csv-parse": "1.1.7", "gnode": "0.1.2", - "istanbul": "0.4.3", + "istanbul": "0.4.5", "mocha": "1.21.5", - "raw-body": "2.1.6", + "raw-body": "2.1.7", "stream-to-array": "2.3.0" }, "directories": {}, "dist": { - "shasum": "a31b4070adaea27d732ea333740a64d0ec9a6659", - "tarball": "https://registry.npmjs.org/mime-db/-/mime-db-1.23.0.tgz" + "shasum": "e2d13f939f0016c6e4e9ad25a8652f126c467f0c", + "tarball": "https://registry.npmjs.org/mime-db/-/mime-db-1.24.0.tgz" }, "engines": { "node": ">= 0.6" @@ -93,7 +92,7 @@ "db.json", "index.js" ], - "gitHead": "ba0d99fd05b3bfdc2ebcd78f858c25cb7db6af41", + "gitHead": "9dd00b34556a8cdd6f3385f09d4989298c4b86e1", "homepage": "https://github.com/jshttp/mime-db#readme", "keywords": [ "mime", @@ -130,5 +129,5 @@ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", "update": "npm run fetch && npm run build" }, - "version": "1.23.0" + "version": "1.24.0" } diff --git a/deps/npm/node_modules/request/node_modules/mime-types/package.json b/deps/npm/node_modules/request/node_modules/mime-types/package.json index dae8f5a70a0c2e..140951c792a707 100644 --- a/deps/npm/node_modules/request/node_modules/mime-types/package.json +++ b/deps/npm/node_modules/request/node_modules/mime-types/package.json @@ -14,20 +14,19 @@ ] ], "_from": "mime-types@>=2.1.7 <2.2.0", - "_id": "mime-types@2.1.11", + "_id": "mime-types@2.1.12", "_inCache": true, - "_installable": true, "_location": "/request/mime-types", - "_nodeVersion": "4.4.3", + "_nodeVersion": "4.5.0", "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/mime-types-2.1.11.tgz_1462165365027_0.7217204745393246" + "tmp": "tmp/mime-types-2.1.12.tgz_1474237415119_0.03028594213537872" }, "_npmUser": { "name": "dougwilson", "email": "doug@somethingdoug.com" }, - "_npmVersion": "2.15.1", + "_npmVersion": "2.15.9", "_phantomChildren": {}, "_requested": { "raw": "mime-types@~2.1.7", @@ -42,8 +41,8 @@ "/request", "/request/form-data" ], - "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.11.tgz", - "_shasum": "c259c471bda808a85d6cd193b430a5fae4473b3c", + "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.12.tgz", + "_shasum": "152ba256777020dd4663f54c2e7bc26381e71729", "_shrinkwrap": null, "_spec": "mime-types@~2.1.7", "_where": "/Users/rebecca/code/npm/node_modules/request", @@ -67,17 +66,21 @@ } ], "dependencies": { - "mime-db": "~1.23.0" + "mime-db": "~1.24.0" }, "description": "The ultimate javascript content-type utility.", "devDependencies": { - "istanbul": "0.4.3", + "eslint": "3.5.0", + "eslint-config-standard": "6.0.1", + "eslint-plugin-promise": "2.0.1", + "eslint-plugin-standard": "2.0.0", + "istanbul": "0.4.5", "mocha": "1.21.5" }, "directories": {}, "dist": { - "shasum": "c259c471bda808a85d6cd193b430a5fae4473b3c", - "tarball": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.11.tgz" + "shasum": "152ba256777020dd4663f54c2e7bc26381e71729", + "tarball": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.12.tgz" }, "engines": { "node": ">= 0.6" @@ -87,7 +90,7 @@ "LICENSE", "index.js" ], - "gitHead": "298ffcf490a5d6e60edea7bf7a69036df04846b1", + "gitHead": "7193a9094e2efe31da93988350bb0b32ab18b1ea", "homepage": "https://github.com/jshttp/mime-types#readme", "keywords": [ "mime", @@ -116,9 +119,10 @@ "url": "git+https://github.com/jshttp/mime-types.git" }, "scripts": { + "lint": "eslint **/*.js", "test": "mocha --reporter spec test/test.js", "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js", "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js" }, - "version": "2.1.11" + "version": "2.1.12" } diff --git a/deps/npm/node_modules/request/package.json b/deps/npm/node_modules/request/package.json index 8e1c5b8a118203..822499736605cc 100644 --- a/deps/npm/node_modules/request/package.json +++ b/deps/npm/node_modules/request/package.json @@ -2,58 +2,55 @@ "_args": [ [ { - "raw": "request@~2.74.0", + "raw": "request@2.75.0", "scope": null, "escapedName": "request", "name": "request", - "rawSpec": "~2.74.0", - "spec": ">=2.74.0 <2.75.0", - "type": "range" + "rawSpec": "2.75.0", + "spec": "2.75.0", + "type": "version" }, "/Users/rebecca/code/npm" ] ], - "_from": "request@>=2.74.0 <2.75.0", - "_id": "request@2.74.0", + "_from": "request@2.75.0", + "_id": "request@2.75.0", "_inCache": true, - "_installable": true, "_location": "/request", - "_nodeVersion": "6.2.2", + "_nodeVersion": "6.5.0", "_npmOperationalInternal": { "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/request-2.74.0.tgz_1469231082306_0.13140005595050752" + "tmp": "tmp/request-2.75.0.tgz_1474151606844_0.8052814984694123" }, "_npmUser": { "name": "simov", "email": "simeonvelichkov@gmail.com" }, - "_npmVersion": "2.15.6", + "_npmVersion": "2.15.9", "_phantomChildren": { "ansi-regex": "2.0.0", - "inherits": "2.0.1", + "inherits": "2.0.3", "strip-ansi": "3.0.1" }, "_requested": { - "raw": "request@~2.74.0", + "raw": "request@2.75.0", "scope": null, "escapedName": "request", "name": "request", - "rawSpec": "~2.74.0", - "spec": ">=2.74.0 <2.75.0", - "type": "range" + "rawSpec": "2.75.0", + "spec": "2.75.0", + "type": "version" }, "_requiredBy": [ "#USER", "/", "/node-gyp", - "/npm-registry-client", - "/npm-registry-couchapp/couchapp", - "/npm-registry-couchapp/couchapp/nano" + "/npm-registry-client" ], - "_resolved": "https://registry.npmjs.org/request/-/request-2.74.0.tgz", - "_shasum": "7693ca768bbb0ea5c8ce08c084a45efa05b892ab", + "_resolved": "https://registry.npmjs.org/request/-/request-2.75.0.tgz", + "_shasum": "d2b8268a286da13eaa5d01adf5d18cc90f657d93", "_shrinkwrap": null, - "_spec": "request@~2.74.0", + "_spec": "request@2.75.0", "_where": "/Users/rebecca/code/npm", "author": { "name": "Mikeal Rogers", @@ -70,7 +67,7 @@ "combined-stream": "~1.0.5", "extend": "~3.0.0", "forever-agent": "~0.6.1", - "form-data": "~1.0.0-rc4", + "form-data": "~2.0.0", "har-validator": "~2.0.6", "hawk": "~3.1.3", "http-signature": "~1.1.0", @@ -101,7 +98,7 @@ "karma-cli": "^1.0.0", "karma-coverage": "^1.0.0", "karma-phantomjs-launcher": "^1.0.0", - "karma-tap": "^2.0.1", + "karma-tap": "^3.0.1", "phantomjs-prebuilt": "^2.1.3", "rimraf": "^2.2.8", "server-destroy": "^1.0.1", @@ -110,13 +107,20 @@ }, "directories": {}, "dist": { - "shasum": "7693ca768bbb0ea5c8ce08c084a45efa05b892ab", - "tarball": "https://registry.npmjs.org/request/-/request-2.74.0.tgz" + "shasum": "d2b8268a286da13eaa5d01adf5d18cc90f657d93", + "tarball": "https://registry.npmjs.org/request/-/request-2.75.0.tgz" }, "engines": { "node": ">=0.8.0" }, - "gitHead": "76e82351cbc21049441b1763c6f2bbd504fa8f5a", + "gitHead": "e9f09c2832073858d6d988ba82a2895f36efa92d", + "greenkeeper": { + "ignore": [ + "eslint", + "hawk", + "har-validator" + ] + }, "homepage": "https://github.com/request/request#readme", "license": "Apache-2.0", "main": "index.js", @@ -158,5 +162,5 @@ "util", "utility" ], - "version": "2.74.0" + "version": "2.75.0" } diff --git a/deps/npm/node_modules/request/request.js b/deps/npm/node_modules/request/request.js index 8267c125375af4..96a71b6ed5efd3 100644 --- a/deps/npm/node_modules/request/request.js +++ b/deps/npm/node_modules/request/request.js @@ -958,6 +958,10 @@ Request.prototype.onRequestResponse = function (response) { }) responseContent.on('data', function (chunk) { + if (self.timing && !self.responseStarted) { + self.responseStartTime = (new Date()).getTime() + response.responseStartTime = self.responseStartTime + } self._destdata = true self.emit('data', chunk) }) diff --git a/deps/npm/node_modules/sorted-object/LICENSE.txt b/deps/npm/node_modules/sorted-object/LICENSE.txt index 4a323deb518f3a..2edd064bf5507a 100644 --- a/deps/npm/node_modules/sorted-object/LICENSE.txt +++ b/deps/npm/node_modules/sorted-object/LICENSE.txt @@ -1,3 +1,7 @@ +Dual licensed under WTFPL and MIT: + +--- + Copyright © 2014–2016 Domenic Denicola This work is free. You can redistribute it and/or modify it under the @@ -17,3 +21,27 @@ as published by Sam Hocevar. See below for more details. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. You just DO WHAT THE FUCK YOU WANT TO. + +--- + +The MIT License (MIT) + +Copyright © 2014–2016 Domenic Denicola + +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/sorted-object/README.md b/deps/npm/node_modules/sorted-object/README.md deleted file mode 100644 index d3f12a27885d6d..00000000000000 --- a/deps/npm/node_modules/sorted-object/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# Get a Version of an Object with Sorted Keys - -Although objects in JavaScript are theoretically unsorted, in practice most engines use insertion order—at least, ignoring numeric keys. This manifests itself most prominently when dealing with an object's JSON serialization. - -So, for example, you might be trying to serialize some object to a JSON file. But every time you write it, it ends up being output in a different order, depending on how you created it in the first place! This makes for some ugly diffs. - -**sorted-object** gives you the answer. Just use this package to create a version of your object with its keys sorted before serializing, and you'll get a consistent order every time. - -```js -var sortedObject = require("sorted-object"); - -var objectToSerialize = generateStuffNondeterministically(); - -// Before: -fs.writeFileSync("dest.json", JSON.stringify(objectToSerialize)); - -// After: -var sortedVersion = sortedObject(objectToSerialize); -fs.writeFileSync("dest.json", JSON.stringify(sortedVersion)); -``` diff --git a/deps/npm/node_modules/sorted-object/package.json b/deps/npm/node_modules/sorted-object/package.json index 60a8356bac177b..c4bb99f2b324e8 100644 --- a/deps/npm/node_modules/sorted-object/package.json +++ b/deps/npm/node_modules/sorted-object/package.json @@ -1,45 +1,54 @@ { "_args": [ [ - "sorted-object@latest", + { + "raw": "sorted-object@2.0.1", + "scope": null, + "escapedName": "sorted-object", + "name": "sorted-object", + "rawSpec": "2.0.1", + "spec": "2.0.1", + "type": "version" + }, "/Users/rebecca/code/npm" ] ], - "_from": "sorted-object@latest", - "_id": "sorted-object@2.0.0", + "_from": "sorted-object@2.0.1", + "_id": "sorted-object@2.0.1", "_inCache": true, - "_installable": true, "_location": "/sorted-object", - "_nodeVersion": "5.7.1", + "_nodeVersion": "6.2.2", "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/sorted-object-2.0.0.tgz_1457910693572_0.6718082851730287" + "tmp": "tmp/sorted-object-2.0.1.tgz_1473550768215_0.1242613298818469" }, "_npmUser": { - "email": "d@domenic.me", - "name": "domenic" + "name": "domenic", + "email": "d@domenic.me" }, - "_npmVersion": "3.6.0", + "_npmVersion": "3.9.5", "_phantomChildren": {}, "_requested": { - "name": "sorted-object", - "raw": "sorted-object@latest", - "rawSpec": "latest", + "raw": "sorted-object@2.0.1", "scope": null, - "spec": "latest", - "type": "tag" + "escapedName": "sorted-object", + "name": "sorted-object", + "rawSpec": "2.0.1", + "spec": "2.0.1", + "type": "version" }, "_requiredBy": [ + "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/sorted-object/-/sorted-object-2.0.0.tgz", - "_shasum": "1cfea981609047d8043807a490a9d99b317faf7f", + "_resolved": "https://registry.npmjs.org/sorted-object/-/sorted-object-2.0.1.tgz", + "_shasum": "7d631f4bd3a798a24af1dffcfbfe83337a5df5fc", "_shrinkwrap": null, - "_spec": "sorted-object@latest", + "_spec": "sorted-object@2.0.1", "_where": "/Users/rebecca/code/npm", "author": { - "email": "d@domenic.me", "name": "Domenic Denicola", + "email": "d@domenic.me", "url": "https://domenic.me/" }, "bugs": { @@ -53,25 +62,25 @@ }, "directories": {}, "dist": { - "shasum": "1cfea981609047d8043807a490a9d99b317faf7f", - "tarball": "http://registry.npmjs.org/sorted-object/-/sorted-object-2.0.0.tgz" + "shasum": "7d631f4bd3a798a24af1dffcfbfe83337a5df5fc", + "tarball": "https://registry.npmjs.org/sorted-object/-/sorted-object-2.0.1.tgz" }, "files": [ "lib/" ], - "gitHead": "3cbdde212c8ceef219fbb8fa7805bfc38b94aa90", + "gitHead": "87105deb13d4f4151b2abd1a78d27a5216e3e79d", "homepage": "https://github.com/domenic/sorted-object#readme", "keywords": [ "sort", "keys", "object" ], - "license": "WTFPL", + "license": "(WTFPL OR MIT)", "main": "lib/sorted-object.js", "maintainers": [ { - "email": "domenic@domenicdenicola.com", - "name": "domenic" + "name": "domenic", + "email": "domenic@domenicdenicola.com" } ], "name": "sorted-object", @@ -85,5 +94,5 @@ "lint": "eslint .", "test": "tape test/tests.js" }, - "version": "2.0.0" + "version": "2.0.1" } diff --git a/deps/npm/package.json b/deps/npm/package.json index 55659aab66248a..c1df08e43d4d8b 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "3.10.8", + "version": "3.10.9", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ @@ -35,19 +35,19 @@ "ansistyles": "~0.1.3", "aproba": "~1.0.4", "archy": "~1.0.0", - "asap": "~2.0.4", + "asap": "~2.0.5", "chownr": "~1.0.1", "cmd-shim": "~2.0.2", "columnify": "~1.5.4", - "config-chain": "~1.1.10", + "config-chain": "~1.1.11", "dezalgo": "~1.0.3", "editor": "~1.0.0", "fs-vacuum": "~1.2.9", "fs-write-stream-atomic": "~1.0.8", "fstream": "~1.0.10", "fstream-npm": "~1.2.0", - "glob": "~7.0.6", - "graceful-fs": "~4.1.6", + "glob": "~7.1.0", + "graceful-fs": "~4.1.9", "has-unicode": "~2.0.1", "hosted-git-info": "~2.1.5", "iferr": "~0.1.5", @@ -55,7 +55,7 @@ "inherits": "~2.0.3", "ini": "~1.3.4", "init-package-json": "~1.9.4", - "lockfile": "~1.0.1", + "lockfile": "~1.0.2", "lodash._baseuniq": "~4.6.0", "lodash.clonedeep": "~4.5.0", "lodash.union": "~4.6.0", @@ -73,9 +73,9 @@ "npm-user-validate": "~0.1.5", "npmlog": "~4.0.0", "once": "~1.4.0", - "opener": "~1.4.1", + "opener": "~1.4.2", "osenv": "~0.1.3", - "path-is-inside": "~1.0.1", + "path-is-inside": "~1.0.2", "read": "~1.0.7", "read-cmd-shim": "~1.0.1", "read-installed": "~4.0.3", @@ -83,13 +83,13 @@ "read-package-tree": "~5.1.5", "readable-stream": "~2.1.5", "realize-package-specifier": "~3.0.3", - "request": "~2.74.0", + "request": "~2.75.0", "retry": "~0.10.0", "rimraf": "~2.5.4", "semver": "~5.3.0", "sha": "~2.0.1", "slide": "~1.1.6", - "sorted-object": "~2.0.0", + "sorted-object": "~2.0.1", "strip-ansi": "~3.0.1", "tar": "~2.2.1", "text-table": "~0.2.0", @@ -195,8 +195,8 @@ "require-inject": "~1.4.0", "sprintf-js": "~1.0.3", "standard": "~6.0.8", - "tacks": "~1.2.1", - "tap": "~7.0.0" + "tacks": "~1.2.2", + "tap": "~7.1.2" }, "scripts": { "dumpconf": "env | grep npm | sort | uniq", diff --git a/deps/npm/scripts/changelog.js b/deps/npm/scripts/changelog.js index c60c6c664baea8..abbec4b4e9e17d 100644 --- a/deps/npm/scripts/changelog.js +++ b/deps/npm/scripts/changelog.js @@ -25,7 +25,7 @@ function shortname (url) { if (repo !== 'npm/npm') { return `${repo}#${id}` } else { - return `${id}` + return `#${id}` } } @@ -90,7 +90,7 @@ function main () { } else if (m = line.match(/^Credit: @(.*)/)) { if (!commit.credit) commit.credit = [] commit.credit.push(m[1]) - } else if (m = line.match(/^Fixes: (.*)/)) { + } else if (m = line.match(/^Fixes: #?(.*?)/)) { commit.fixes = m[1] } else if (m = line.match(/^Reviewed-By: @(.*)/)) { commit.reviewed = m[1] diff --git a/deps/npm/scripts/dep-update b/deps/npm/scripts/dep-update new file mode 100755 index 00000000000000..a0aaed7dbcd55a --- /dev/null +++ b/deps/npm/scripts/dep-update @@ -0,0 +1,6 @@ +#!/bin/bash +node . install --save $1@$2 &&\ +git add node_modules/$1/ package.json &&\ +git commit -m"$1@$2" &&\ +node . repo $1 &&\ +git commit --amend diff --git a/deps/npm/scripts/dev-dep-update b/deps/npm/scripts/dev-dep-update new file mode 100755 index 00000000000000..6058cce9427317 --- /dev/null +++ b/deps/npm/scripts/dev-dep-update @@ -0,0 +1,6 @@ +#!/bin/bash +node . install --save --save-dev $1@$2 &&\ +git add package.json &&\ +git commit -m"$1@$2" &&\ +node . repo $1 &&\ +git commit --amend diff --git a/deps/npm/test/tap/bitbucket-https-url-with-creds-package.js b/deps/npm/test/tap/bitbucket-https-url-with-creds-package.js index e5a4142ef3277d..7268b504004fad 100644 --- a/deps/npm/test/tap/bitbucket-https-url-with-creds-package.js +++ b/deps/npm/test/tap/bitbucket-https-url-with-creds-package.js @@ -34,10 +34,10 @@ test('bitbucket-https-url-with-creds-package', function (t) { 'child_process': { 'execFile': function (cmd, args, options, cb) { process.nextTick(function () { - if (args[0] !== 'clone') return cb(null, '', '') + if (args.indexOf('clone') === -1) return cb(null, '', '') var cloneUrl = cloneUrls.shift() if (cloneUrl) { - t.is(args[3], cloneUrl[0], cloneUrl[1]) + t.is(args[args.length - 2], cloneUrl[0], cloneUrl[1]) } else { t.fail('too many attempts to clone') } diff --git a/deps/npm/test/tap/bitbucket-https-url-with-creds.js b/deps/npm/test/tap/bitbucket-https-url-with-creds.js index 4e9d14d7e01a17..846e3ae74141e5 100644 --- a/deps/npm/test/tap/bitbucket-https-url-with-creds.js +++ b/deps/npm/test/tap/bitbucket-https-url-with-creds.js @@ -31,10 +31,10 @@ test('bitbucket-https-url-with-creds', function (t) { 'child_process': { 'execFile': function (cmd, args, options, cb) { process.nextTick(function () { - if (args[0] !== 'clone') return cb(null, '', '') + if (args.indexOf('clone') === -1) return cb(null, '', '') var cloneUrl = cloneUrls.shift() if (cloneUrl) { - t.is(args[3], cloneUrl[0], cloneUrl[1]) + t.is(args[args.length - 2], cloneUrl[0], cloneUrl[1]) } else { t.fail('too many attempts to clone') } diff --git a/deps/npm/test/tap/bitbucket-shortcut-package.js b/deps/npm/test/tap/bitbucket-shortcut-package.js index 69cfe6c2059203..37fe57950c2ea5 100644 --- a/deps/npm/test/tap/bitbucket-shortcut-package.js +++ b/deps/npm/test/tap/bitbucket-shortcut-package.js @@ -35,10 +35,10 @@ test('bitbucket-shortcut', function (t) { 'child_process': { 'execFile': function (cmd, args, options, cb) { process.nextTick(function () { - if (args[0] !== 'clone') return cb(null, '', '') + if (args.indexOf('clone') === -1) return cb(null, '', '') var cloneUrl = cloneUrls.shift() if (cloneUrl) { - t.is(args[3], cloneUrl[0], cloneUrl[1]) + t.is(args[args.length - 2], cloneUrl[0], cloneUrl[1]) } else { t.fail('too many attempts to clone') } diff --git a/deps/npm/test/tap/bitbucket-shortcut.js b/deps/npm/test/tap/bitbucket-shortcut.js index a9b60f8b56818a..a708d84972556a 100644 --- a/deps/npm/test/tap/bitbucket-shortcut.js +++ b/deps/npm/test/tap/bitbucket-shortcut.js @@ -32,10 +32,10 @@ test('bitbucket-shortcut', function (t) { 'child_process': { 'execFile': function (cmd, args, options, cb) { process.nextTick(function () { - if (args[0] !== 'clone') return cb(null, '', '') + if (args.indexOf('clone') === -1) return cb(null, '', '') var cloneUrl = cloneUrls.shift() if (cloneUrl) { - t.is(args[3], cloneUrl[0], cloneUrl[1]) + t.is(args[args.length - 2], cloneUrl[0], cloneUrl[1]) } else { t.fail('too many attempts to clone') } diff --git a/deps/npm/test/tap/gist-short-shortcut-package.js b/deps/npm/test/tap/gist-short-shortcut-package.js index 02457b4dc9e599..c15e1df7e205a6 100644 --- a/deps/npm/test/tap/gist-short-shortcut-package.js +++ b/deps/npm/test/tap/gist-short-shortcut-package.js @@ -35,10 +35,10 @@ test('gist-short-shortcut-package', function (t) { 'child_process': { 'execFile': function (cmd, args, options, cb) { process.nextTick(function () { - if (args[0] !== 'clone') return cb(null, '', '') + if (args.indexOf('clone') === -1) return cb(null, '', '') var cloneUrl = cloneUrls.shift() if (cloneUrl) { - t.is(args[3], cloneUrl[0], cloneUrl[1]) + t.is(args[args.length - 2], cloneUrl[0], cloneUrl[1]) } else { t.fail('too many attempts to clone') } diff --git a/deps/npm/test/tap/gist-short-shortcut.js b/deps/npm/test/tap/gist-short-shortcut.js index 58dcf78e8d2229..c7d217f9a9ed1e 100644 --- a/deps/npm/test/tap/gist-short-shortcut.js +++ b/deps/npm/test/tap/gist-short-shortcut.js @@ -32,10 +32,10 @@ test('gist-shortcut', function (t) { 'child_process': { 'execFile': function (cmd, args, options, cb) { process.nextTick(function () { - if (args[0] !== 'clone') return cb(null, '', '') + if (args.indexOf('clone') === -1) return cb(null, '', '') var cloneUrl = cloneUrls.shift() if (cloneUrl) { - t.is(args[3], cloneUrl[0], cloneUrl[1]) + t.is(args[args.length - 2], cloneUrl[0], cloneUrl[1]) } else { t.fail('too many attempts to clone') } diff --git a/deps/npm/test/tap/gist-shortcut-package.js b/deps/npm/test/tap/gist-shortcut-package.js index 370476ac80771f..e35ab71e840876 100644 --- a/deps/npm/test/tap/gist-shortcut-package.js +++ b/deps/npm/test/tap/gist-shortcut-package.js @@ -35,10 +35,10 @@ test('gist-shortcut-package', function (t) { 'child_process': { 'execFile': function (cmd, args, options, cb) { process.nextTick(function () { - if (args[0] !== 'clone') return cb(null, '', '') + if (args.indexOf('clone') === -1) return cb(null, '', '') var cloneUrl = cloneUrls.shift() if (cloneUrl) { - t.is(args[3], cloneUrl[0], cloneUrl[1]) + t.is(args[args.length - 2], cloneUrl[0], cloneUrl[1]) } else { t.fail('too many attempts to clone') } diff --git a/deps/npm/test/tap/gist-shortcut.js b/deps/npm/test/tap/gist-shortcut.js index e975a09b3e72c4..3b48e47009dcf2 100644 --- a/deps/npm/test/tap/gist-shortcut.js +++ b/deps/npm/test/tap/gist-shortcut.js @@ -32,10 +32,10 @@ test('gist-shortcut', function (t) { 'child_process': { 'execFile': function (cmd, args, options, cb) { process.nextTick(function () { - if (args[0] !== 'clone') return cb(null, '', '') + if (args.indexOf('clone') === -1) return cb(null, '', '') var cloneUrl = cloneUrls.shift() if (cloneUrl) { - t.is(args[3], cloneUrl[0], cloneUrl[1]) + t.is(args[args.length - 2], cloneUrl[0], cloneUrl[1]) } else { t.fail('too many attempts to clone') } diff --git a/deps/npm/test/tap/git-races.js b/deps/npm/test/tap/git-races.js index 6bbfe78bd79ca9..f275455cd04d70 100644 --- a/deps/npm/test/tap/git-races.js +++ b/deps/npm/test/tap/git-races.js @@ -60,9 +60,12 @@ function cleanup () { var npm = requireInject.installGlobally('../../lib/npm.js', { 'child_process': { 'execFile': function (cmd, args, options, cb) { + // on win 32, the following prefix is added in utils/git.js + // $ git -c core.longpaths=true clone + var i = process.platform === 'win32' ? 2 : 0 // If it's a clone we swap any requests for any of the urls we're mocking // with the path to the bare repo - if (args[0] === 'clone') { + if (args[i] === 'clone') { var m2 = args.length - 2 var m1 = args.length - 1 if (testrepos[args[m2]]) { @@ -72,7 +75,7 @@ var npm = requireInject.installGlobally('../../lib/npm.js', { execFile(cmd, args, options, cb) // here, we intercept npm validating the remote origin url on one of the // clones we've done previously and return the original url that was requested - } else if (args[0] === 'config' && args[1] === '--get' && args[2] === 'remote.origin.url') { + } else if (args[i] === 'config' && args[i + 1] === '--get' && args[i + 2] === 'remote.origin.url') { process.nextTick(function () { cb(null, testurls[options.cwd], '') }) diff --git a/deps/npm/test/tap/github-shortcut-package.js b/deps/npm/test/tap/github-shortcut-package.js index 13c6806b01c812..e1a4b306cc19c2 100644 --- a/deps/npm/test/tap/github-shortcut-package.js +++ b/deps/npm/test/tap/github-shortcut-package.js @@ -35,10 +35,10 @@ test('github-shortcut-package', function (t) { 'child_process': { 'execFile': function (cmd, args, options, cb) { process.nextTick(function () { - if (args[0] !== 'clone') return cb(null, '', '') + if (args.indexOf('clone') === -1) return cb(null, '', '') var cloneUrl = cloneUrls.shift() if (cloneUrl) { - t.is(args[3], cloneUrl[0], cloneUrl[1]) + t.is(args[args.length - 2], cloneUrl[0], cloneUrl[1]) } else { t.fail('too many attempts to clone') } diff --git a/deps/npm/test/tap/gitlab-shortcut-package.js b/deps/npm/test/tap/gitlab-shortcut-package.js index 76cd7f911bb277..335bc4d60ac78b 100644 --- a/deps/npm/test/tap/gitlab-shortcut-package.js +++ b/deps/npm/test/tap/gitlab-shortcut-package.js @@ -34,10 +34,10 @@ test('gitlab-shortcut-package', function (t) { 'child_process': { 'execFile': function (cmd, args, options, cb) { process.nextTick(function () { - if (args[0] !== 'clone') return cb(null, '', '') + if (args.indexOf('clone') === -1) return cb(null, '', '') var cloneUrl = cloneUrls.shift() if (cloneUrl) { - t.is(args[3], cloneUrl[0], cloneUrl[1]) + t.is(args[args.length - 2], cloneUrl[0], cloneUrl[1]) } else { t.fail('too many attempts to clone') } diff --git a/deps/npm/test/tap/gitlab-shortcut.js b/deps/npm/test/tap/gitlab-shortcut.js index 96da268ee03c05..dcba064bc11ce9 100644 --- a/deps/npm/test/tap/gitlab-shortcut.js +++ b/deps/npm/test/tap/gitlab-shortcut.js @@ -31,10 +31,10 @@ test('gitlab-shortcut', function (t) { 'child_process': { 'execFile': function (cmd, args, options, cb) { process.nextTick(function () { - if (args[0] !== 'clone') return cb(null, '', '') + if (args.indexOf('clone') === -1) return cb(null, '', '') var cloneUrl = cloneUrls.shift() if (cloneUrl) { - t.is(args[3], cloneUrl[0], cloneUrl[1]) + t.is(args[args.length - 2], cloneUrl[0], cloneUrl[1]) } else { t.fail('too many attempts to clone') } diff --git a/deps/npm/test/tap/install-bin-null.js b/deps/npm/test/tap/install-bin-null.js new file mode 100644 index 00000000000000..f45528a75acf45 --- /dev/null +++ b/deps/npm/test/tap/install-bin-null.js @@ -0,0 +1,91 @@ +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.join(__dirname, 'install-bin-null') + +var EXEC_OPTS = { cwd: pkg } + +var parentPkg = { + name: 'parent-package', + version: '0.0.0', + dependencies: { + 'child-package-a': 'file:./child-package-a', + 'child-package-b': 'file:./child-package-b' + } +} + +var childPkgA = { + name: 'child-package-a', + version: '0.0.0', + bin: 'index.js' +} + +var childPkgB = { + name: 'child-package-b', + version: '0.0.0', + dependencies: { + 'grandchild-package': 'file:../grandchild-package' + } +} + +var grandchildPkg = { + name: 'grandchild-package', + version: '0.0.0', + bin: null +} + +var pkgs = [childPkgA, childPkgB, grandchildPkg] + +test('the grandchild has bin:null', function (t) { + setup() + common.npm(['install'], EXEC_OPTS, function (err, code, stdout, stderr) { + t.ifErr(err, 'npm link finished without error') + t.equal(code, 0, 'exited ok') + t.ok(stdout, 'output indicating success') + t.notOk(stderr, 'no output stderr') + t.end() + }) +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} + +function setup () { + cleanup() + mkdirp.sync(pkg) + fs.writeFileSync( + path.join(pkg, 'package.json'), + JSON.stringify(parentPkg, null, 2) + ) + pkgs.forEach(function (json) { + process.chdir(mkPkg(json)) + }) + fs.writeFileSync( + path.join(pkg, childPkgA.name, 'index.js'), + '' + ) +} + +function mkPkg (json) { + var pkgPath = path.resolve(pkg, json.name) + mkdirp.sync(pkgPath) + fs.writeFileSync( + path.join(pkgPath, 'package.json'), + JSON.stringify(json, null, 2) + ) + return pkgPath +} diff --git a/deps/npm/test/tap/shrinkwrap-lifecycle-cwd.js b/deps/npm/test/tap/shrinkwrap-lifecycle-cwd.js new file mode 100644 index 00000000000000..8d5210c4048d5b --- /dev/null +++ b/deps/npm/test/tap/shrinkwrap-lifecycle-cwd.js @@ -0,0 +1,89 @@ +'use strict' +var path = require('path') +var test = require('tap').test +var mr = require('npm-registry-mock') +var Tacks = require('tacks') +var File = Tacks.File +var Dir = Tacks.Dir +var extend = Object.assign || require('util')._extend +var common = require('../common-tap.js') + +var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = path.join(basedir, 'testdir') +var cachedir = path.join(basedir, 'cache') +var globaldir = path.join(basedir, 'global') +var tmpdir = path.join(basedir, 'tmp') +var escapeArg = require('../../lib/utils/escape-arg.js') + +var conf = { + cwd: testdir, + env: extend({ + npm_config_cache: cachedir, + npm_config_tmp: tmpdir, + npm_config_prefix: globaldir, + npm_config_registry: common.registry, + npm_config_loglevel: 'warn' + }, process.env) +} + +var server +var fixture = new Tacks(Dir({ + cache: Dir(), + global: Dir(), + tmp: Dir(), + testdir: Dir({ + node_modules: Dir({}), + 'package.json': File({ + name: '13252', + version: '1.0.0', + scripts: { + // add this to the end of the command to preserve the debug log: + // || mv npm-debug.log real-debug.log + // removed for windows compat reasons + abc: escapeArg(common.nodeBin) + ' ' + escapeArg(common.bin) + ' shrinkwrap', + shrinkwrap: escapeArg(common.nodeBin) + ' scripts/shrinkwrap.js' + } + }), + scripts: Dir({ + 'shrinkwrap.js': File( + 'console.log("OK " + process.cwd())' + ) + }) + }) +})) + +function setup () { + cleanup() + fixture.create(basedir) +} + +function cleanup () { + fixture.remove(basedir) +} + +test('setup', function (t) { + setup() + mr({port: common.port, throwOnUnmatched: true}, function (err, s) { + if (err) throw err + server = s + t.done() + }) +}) + +test('shrinkwrap-lifecycle-cwd', function (t) { + common.npm(['run', 'abc'], conf, function (err, code, stdout, stderr) { + if (err) throw err + t.is(code, 0, 'command ran ok') + t.comment(stdout.trim()) + t.comment(stderr.trim()) + t.match(stdout.trim(), 'OK ' + testdir, 'got output from lifecycle script') + t.is(stderr.trim().length, 0, 'no errors') + t.done() + }) +}) + +test('cleanup', function (t) { + server.close() + cleanup() + t.done() +}) diff --git a/deps/npm/test/tap/tagged-version-matching.js b/deps/npm/test/tap/tagged-version-matching.js new file mode 100644 index 00000000000000..f7d51d90b7e122 --- /dev/null +++ b/deps/npm/test/tap/tagged-version-matching.js @@ -0,0 +1,162 @@ +'use strict' +var path = require('path') +var test = require('tap').test +var Tacks = require('tacks') +var File = Tacks.File +var Dir = Tacks.Dir +var extend = Object.assign || require('util')._extend +var common = require('../common-tap.js') + +var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = path.join(basedir, 'testdir') +var cachedir = path.join(basedir, 'cache') +var globaldir = path.join(basedir, 'global') +var tmpdir = path.join(basedir, 'tmp') + +var conf = { + cwd: testdir, + env: extend({ + npm_config_cache: cachedir, + npm_config_tmp: tmpdir, + npm_config_prefix: globaldir, + npm_config_registry: common.registry, + npm_config_loglevel: 'warn' + }, process.env) +} + +var fixture = new Tacks(Dir({ + cache: Dir(), + global: Dir(), + tmp: Dir(), + testdir: Dir({ + node_modules: Dir({ + example: Dir({ + 'package.json': File({ + _from: 'example', + _id: 'example@1.0.0', + _requested: { + raw: 'example@file:example', + scope: null, + escapedName: 'example', + name: 'example', + rawSpec: 'file:example', + type: 'directory' + }, + dependencies: { + tagdep: 'latest', + gitdep: 'npm/example-gitdep' + }, + name: 'example', + version: '1.0.0' + }) + }), + gitdep: Dir({ + 'package.json': File({ + _from: 'npm/example-gitdep', + _id: 'gitdep@1.0.0', + _requested: { + raw: 'gitdep@git://github.com/npm/example-gitdep.git#da39a3ee5e6b4b0d3255bfef95601890afd80709', + scope: null, + escapedName: 'gitdep', + name: 'gitdep', + rawSpec: 'git://github.com/npm/example-gitdep.git#da39a3ee5e6b4b0d3255bfef95601890afd80709', + spec: 'git://github.com/npm/example-gitdep.git#da39a3ee5e6b4b0d3255bfef95601890afd80709', + type: 'hosted', + hosted: { + type: 'github', + ssh: 'git@github.com:npm/example-gitdep.git#da39a3ee5e6b4b0d3255bfef95601890afd80709', + sshUrl: 'git+ssh://git@github.com/npm/example-gitdep.git#da39a3ee5e6b4b0d3255bfef95601890afd80709', + httpsUrl: 'git+https://github.com/npm/example-gitdep.git#da39a3ee5e6b4b0d3255bfef95601890afd80709', + gitUrl: 'git://github.com/npm/example-gitdep.git#da39a3ee5e6b4b0d3255bfef95601890afd80709', + shortcut: 'github:npm/example-gitdep#da39a3ee5e6b4b0d3255bfef95601890afd80709', + directUrl: 'https://raw.githubusercontent.com/npm/example-gitdep/da39a3ee5e6b4b0d3255bfef95601890afd80709/package.json' + } + }, + name: 'gitdep', + version: '1.0.0' + }) + }), + tagdep: Dir({ + 'package.json': File({ + _from: 'tagdep@latest', + _id: 'tagdep@1.0.0', + _requested: { + raw: 'tagdep@https://registry.example.com/tagdep/-/tagdep-1.0.0.tgz', + scope: null, + escapedName: 'tagdep', + name: 'tagdep', + rawSpec: 'https://registry.example.com/tagdep/-/tagdep-1.0.0.tgz', + spec: 'https://registry.example.com/tagdep/-/tagdep-1.0.0.tgz', + type: 'remote' + }, + name: 'tagdep', + version: '1.0.0' + }) + }) + }), + 'npm-shrinkwrap.json': File({ + name: 'tagged-version-matching', + version: '1.0.0', + dependencies: { + tagdep: { + version: '1.0.0', + from: 'tagdep@latest', + resolved: 'https://registry.example.com/tagdep/-/tagdep-1.0.0.tgz' + }, + example: { + version: '1.0.0', + from: 'example' + }, + gitdep: { + version: '1.0.0', + from: 'npm/example-gitdep', + resolved: 'git://github.com/npm/example-gitdep.git#da39a3ee5e6b4b0d3255bfef95601890afd80709' + } + } + }), + 'package.json': File({ + name: 'tagged-version-matching', + version: '1.0.0', + dependencies: { + example: 'file:example', + gitdep: 'npm/example-gitdep' + } + }) + }) +})) + +function setup () { + cleanup() + fixture.create(basedir) +} + +function cleanup () { + fixture.remove(basedir) +} + +test('setup', function (t) { + setup() + t.done() +}) + +test('tagged-version-matching', function (t) { + common.npm(['ls', '--json'], conf, function (err, code, stdout, stderr) { + if (err) throw err + t.is(code, 0, 'command ran ok') + if (stderr.trim()) t.comment(stderr.trim()) + var result = JSON.parse(stdout.trim()) + var problems = result.problems || [] + // Original PR: https://github.com/npm/npm/pull/13941 + // Original issue: https://github.com/npm/npm/issues/13496 + // Original issue: https://github.com/npm/npm/issues/11736 + t.is(problems.length, 0, 'no problems') + t.ok(!problems.some(function (err) { return /missing: tagdep/.test(err) }), 'tagged dependency matched ok') + t.ok(!problems.some(function (err) { return /missing: gitdep/.test(err) }), 'git dependency matched ok') + t.done() + }) +}) + +test('cleanup', function (t) { + cleanup() + t.done() +}) diff --git a/deps/npm/test/tap/upgrade-lifecycles.js b/deps/npm/test/tap/upgrade-lifecycles.js new file mode 100644 index 00000000000000..f15fe0038e1d06 --- /dev/null +++ b/deps/npm/test/tap/upgrade-lifecycles.js @@ -0,0 +1,89 @@ +'use strict' +var path = require('path') +var test = require('tap').test +var Tacks = require('tacks') +var File = Tacks.File +var Dir = Tacks.Dir +var extend = Object.assign || require('util')._extend +var common = require('../common-tap.js') + +var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = path.join(basedir, 'testdir') +var cachedir = path.join(basedir, 'cache') +var globaldir = path.join(basedir, 'global') +var tmpdir = path.join(basedir, 'tmp') + +var conf = { + cwd: testdir, + env: extend({ + npm_config_cache: cachedir, + npm_config_tmp: tmpdir, + npm_config_prefix: globaldir, + npm_config_registry: common.registry, + npm_config_loglevel: 'warn' + }, process.env) +} + +var cycler = { + name: 'cycler', + version: '1.0.0', + scripts: { + uninstall: 'echo #UNINSTALL#', + install: 'echo #INSTALL#' + } +} + +var fixture = new Tacks(Dir({ + cache: Dir(), + global: Dir(), + tmp: Dir(), + testdir: Dir({ + 'cycler': Dir({ + 'package.json': File(cycler) + }), + node_modules: Dir({ + 'cycler': Dir({ + 'package.json': File(cycler) + }) + }), + 'package.json': File({ + name: 'upgrade-lifecycles', + version: '1.0.0', + dependencies: { + 'cycler': 'file:cycler' + } + }) + }) +})) + +function setup () { + cleanup() + fixture.create(basedir) +} + +function cleanup () { + fixture.remove(basedir) +} + +test('setup', function (t) { + setup() + t.done() +}) + +test('upgrade-lifecycles', function (t) { + common.npm(['install', 'file:cycler'], conf, function (err, code, stdout, stderr) { + if (err) throw err + t.is(code, 0, 'command ran ok') + + t.comment(stdout.trim()) + t.comment(stderr.trim()) + t.match(stdout, /#INSTALL#/, 'ran install lifecycle') + t.match(stdout, /#UNINSTALL#/, 'ran uninstall lifecycle') + t.done() + }) +}) + +test('cleanup', function (t) { + cleanup() + t.done() +}) diff --git a/deps/npm/test/tap/version-sub-directory-shrinkwrap.js b/deps/npm/test/tap/version-sub-directory-shrinkwrap.js new file mode 100644 index 00000000000000..0455b62ab7536a --- /dev/null +++ b/deps/npm/test/tap/version-sub-directory-shrinkwrap.js @@ -0,0 +1,80 @@ +var common = require('../common-tap.js') +var fs = require('fs') +var path = require('path') + +var mkdirp = require('mkdirp') +var osenv = require('osenv') +var rimraf = require('rimraf') +var test = require('tap').test + +var npm = require('../../lib/npm.js') + +var pkg = path.resolve(__dirname, 'version-sub-directory') +var subDirectory = path.resolve(pkg, 'sub-directory') +var packagePath = path.resolve(pkg, 'package.json') +var shrinkwrapPath = path.resolve(pkg, 'npm-shrinkwrap.json') +var cache = path.resolve(pkg, 'cache') + +var json = { name: 'cat', version: '0.1.2' } + +test('npm version from a subdirectory', function (t) { + setup() + npmLoad() + + function npmLoad () { + npm.load({ cache: cache }, function () { + common.makeGitRepo({ + path: pkg, + added: ['package.json', 'npm-shrinkwrap.json'] + }, version) + }) + } + + function version (er, stdout, stderr) { + t.ifError(er, 'git repo initialized without issue') + t.notOk(stderr, 'no error output') + npm.config.set('sign-git-tag', false) + npm.commands.version(['patch'], checkVersion) + } + + function checkVersion (er) { + var newShrinkwrap = JSON.parse(fs.readFileSync(shrinkwrapPath)) + t.is(newShrinkwrap.version, '0.1.3', 'shrinkwrap has right version') + var newPackage = JSON.parse(fs.readFileSync(packagePath)) + t.is(newPackage.version, '0.1.3', 'package.json has right version') + var git = require('../../lib/utils/git.js') + t.ifError(er, 'version command ran without error') + git.whichAndExec( + ['log'], + { cwd: pkg, env: process.env }, + checkCommit + ) + } + + function checkCommit (er, log, stderr) { + t.ifError(er, 'git log ran without issue') + t.notOk(stderr, 'no error output') + t.ok(log.match(/0\.1\.3/g), 'commited from subdirectory') + t.end() + } +}) + +test('cleanup', function (t) { + cleanup() + t.end() +}) + +function cleanup () { + // windows fix for locked files + process.chdir(osenv.tmpdir()) + rimraf.sync(pkg) +} + +function setup () { + cleanup() + mkdirp.sync(cache) + mkdirp.sync(subDirectory) + process.chdir(subDirectory) + fs.writeFileSync(packagePath, JSON.stringify(json), 'utf8') + fs.writeFileSync(shrinkwrapPath, JSON.stringify(json), 'utf8') +} diff --git a/deps/npm/test/tap/view.js b/deps/npm/test/tap/view.js index e80031b1c2d447..371e1d922de460 100644 --- a/deps/npm/test/tap/view.js +++ b/deps/npm/test/tap/view.js @@ -11,6 +11,8 @@ var t2dir = path.resolve(tmp, 'view-local-notmine') var t3dir = path.resolve(tmp, 'view-local-mine') var mr = require('npm-registry-mock') +var server + test('setup', function (t) { mkdirp.sync(t1dir) mkdirp.sync(t2dir) @@ -29,7 +31,11 @@ test('setup', function (t) { }), 'utf8') t.pass('created fixtures') - t.end() + + mr({ port: common.port, plugin: plugin }, function (er, s) { + server = s + t.end() + }) }) function plugin (server) { @@ -84,294 +90,293 @@ test('npm view . with no package.json', function (t) { test('npm view . with no published package', function (t) { process.chdir(t3dir) - mr({ port: common.port, plugin: plugin }, function (er, s) { - common.npm([ - 'view', - '.', - '--registry=' + common.registry - ], { cwd: t3dir }, function (err, code, stdout, stderr) { - t.ifError(err, 'view command finished successfully') - t.equal(code, 1, 'exit not ok') - t.similar(stderr, /version not found/m) - s.close() - t.end() - }) + common.npm([ + 'view', + '.', + '--registry=' + common.registry + ], { cwd: t3dir }, function (err, code, stdout, stderr) { + t.ifError(err, 'view command finished successfully') + t.equal(code, 1, 'exit not ok') + t.similar(stderr, /version not found/m) + t.end() }) }) test('npm view .', function (t) { process.chdir(t2dir) - mr({ port: common.port, plugin: plugin }, function (er, s) { - common.npm([ - 'view', - '.', - '--registry=' + common.registry - ], { cwd: t2dir }, function (err, code, stdout) { - t.ifError(err, 'view command finished successfully') - t.equal(code, 0, 'exit ok') - var re = new RegExp("name: 'test-repo-url-https'") - t.similar(stdout, re) - s.close() - t.end() - }) + common.npm([ + 'view', + '.', + '--registry=' + common.registry + ], { cwd: t2dir }, function (err, code, stdout) { + t.ifError(err, 'view command finished successfully') + t.equal(code, 0, 'exit ok') + var re = new RegExp("name: 'test-repo-url-https'") + t.similar(stdout, re) + t.end() }) }) test('npm view . select fields', function (t) { process.chdir(t2dir) - mr({ port: common.port, plugin: plugin }, function (er, s) { - common.npm([ - 'view', - '.', - 'main', - '--registry=' + common.registry - ], { cwd: t2dir }, function (err, code, stdout) { - t.ifError(err, 'view command finished successfully') - t.equal(code, 0, 'exit ok') - t.equal(stdout.trim(), 'index.js', 'should print `index.js`') - s.close() - t.end() - }) + common.npm([ + 'view', + '.', + 'main', + '--registry=' + common.registry + ], { cwd: t2dir }, function (err, code, stdout) { + t.ifError(err, 'view command finished successfully') + t.equal(code, 0, 'exit ok') + t.equal(stdout.trim(), 'index.js', 'should print `index.js`') + t.end() }) }) test('npm view .@', function (t) { process.chdir(t2dir) - mr({ port: common.port, plugin: plugin }, function (er, s) { - common.npm([ - 'view', - '.@0.0.0', - 'version', - '--registry=' + common.registry - ], { cwd: t2dir }, function (err, code, stdout) { - t.ifError(err, 'view command finished successfully') - t.equal(code, 0, 'exit ok') - t.equal(stdout.trim(), '0.0.0', 'should print `0.0.0`') - s.close() - t.end() - }) + common.npm([ + 'view', + '.@0.0.0', + 'version', + '--registry=' + common.registry + ], { cwd: t2dir }, function (err, code, stdout) { + t.ifError(err, 'view command finished successfully') + t.equal(code, 0, 'exit ok') + t.equal(stdout.trim(), '0.0.0', 'should print `0.0.0`') + t.end() }) }) test('npm view .@ version --json', function (t) { process.chdir(t2dir) - mr({ port: common.port, plugin: plugin }, function (er, s) { - common.npm([ - 'view', - '.@0.0.0', - 'version', - '--json', - '--registry=' + common.registry - ], { cwd: t2dir }, function (err, code, stdout) { - t.ifError(err, 'view command finished successfully') - t.equal(code, 0, 'exit ok') - t.equal(stdout.trim(), '"0.0.0"', 'should print `"0.0.0"`') - s.close() - t.end() - }) + common.npm([ + 'view', + '.@0.0.0', + 'version', + '--json', + '--registry=' + common.registry + ], { cwd: t2dir }, function (err, code, stdout) { + t.ifError(err, 'view command finished successfully') + t.equal(code, 0, 'exit ok') + t.equal(stdout.trim(), '"0.0.0"', 'should print `"0.0.0"`') + t.end() }) }) test('npm view . --json author name version', function (t) { process.chdir(t2dir) - mr({ port: common.port, plugin: plugin }, function (er, s) { - common.npm([ - 'view', - '.', - 'author', - 'name', - 'version', - '--json', - '--registry=' + common.registry - ], { cwd: t2dir }, function (err, code, stdout) { - var expected = JSON.stringify({ - author: 'Evan Lucas ', - name: 'test-repo-url-https', - version: '0.0.1' - }, null, 2) - t.ifError(err, 'view command finished successfully') - t.equal(code, 0, 'exit ok') - t.equal(stdout.trim(), expected, 'should print ' + expected) - s.close() - t.end() - }) + common.npm([ + 'view', + '.', + 'author', + 'name', + 'version', + '--json', + '--registry=' + common.registry + ], { cwd: t2dir }, function (err, code, stdout) { + var expected = JSON.stringify({ + author: 'Evan Lucas ', + name: 'test-repo-url-https', + version: '0.0.1' + }, null, 2) + t.ifError(err, 'view command finished successfully') + t.equal(code, 0, 'exit ok') + t.equal(stdout.trim(), expected, 'should print ' + expected) + t.end() }) }) test('npm view .@ --json author name version', function (t) { process.chdir(t2dir) - mr({ port: common.port, plugin: plugin }, function (er, s) { - common.npm([ - 'view', - '.@0.0.0', - 'author', - 'name', - 'version', - '--json', - '--registry=' + common.registry - ], { cwd: t2dir }, function (err, code, stdout) { - var expected = JSON.stringify({ - author: 'Evan Lucas ', - name: 'test-repo-url-https', - version: '0.0.0' - }, null, 2) - t.ifError(err, 'view command finished successfully') - t.equal(code, 0, 'exit ok') - t.equal(stdout.trim(), expected, 'should print ' + expected) - s.close() - t.end() - }) + common.npm([ + 'view', + '.@0.0.0', + 'author', + 'name', + 'version', + '--json', + '--registry=' + common.registry + ], { cwd: t2dir }, function (err, code, stdout) { + var expected = JSON.stringify({ + author: 'Evan Lucas ', + name: 'test-repo-url-https', + version: '0.0.0' + }, null, 2) + t.ifError(err, 'view command finished successfully') + t.equal(code, 0, 'exit ok') + t.equal(stdout.trim(), expected, 'should print ' + expected) + t.end() }) }) test('npm view ', function (t) { - mr({ port: common.port, plugin: plugin }, function (er, s) { - common.npm([ - 'view', - 'underscore', - '--registry=' + common.registry - ], { cwd: t2dir }, function (err, code, stdout) { - t.ifError(err, 'view command finished successfully') - t.equal(code, 0, 'exit ok') - var re = new RegExp("name: 'underscore'") - t.similar(stdout, re, 'should have name `underscore`') - s.close() - t.end() - }) + common.npm([ + 'view', + 'underscore', + '--registry=' + common.registry + ], { cwd: t2dir }, function (err, code, stdout) { + t.ifError(err, 'view command finished successfully') + t.equal(code, 0, 'exit ok') + var re = new RegExp("name: 'underscore'") + t.similar(stdout, re, 'should have name `underscore`') + t.end() }) }) test('npm view --global', function (t) { - mr({ port: common.port, plugin: plugin }, function (er, s) { - common.npm([ - 'view', - 'underscore', - '--global', - '--registry=' + common.registry - ], { cwd: t2dir }, function (err, code, stdout) { - t.ifError(err, 'view command finished successfully') - t.equal(code, 0, 'exit ok') - var re = new RegExp("name: 'underscore'") - t.similar(stdout, re, 'should have name `underscore`') - s.close() - t.end() - }) + common.npm([ + 'view', + 'underscore', + '--global', + '--registry=' + common.registry + ], { cwd: t2dir }, function (err, code, stdout) { + t.ifError(err, 'view command finished successfully') + t.equal(code, 0, 'exit ok') + var re = new RegExp("name: 'underscore'") + t.similar(stdout, re, 'should have name `underscore`') + t.end() }) }) test('npm view @ versions', function (t) { - mr({ port: common.port, plugin: plugin }, function (er, s) { - common.npm([ - 'view', - 'underscore@^1.5.0', - 'versions', - '--registry=' + common.registry - ], { cwd: t2dir }, function (err, code, stdout) { - t.ifError(err, 'view command finished successfully') - t.equal(code, 0, 'exit ok') - var re = new RegExp('1.5.0') - t.similar(stdout, re, 'should have version `1.5.0`') - s.close() - t.end() - }) + common.npm([ + 'view', + 'underscore@^1.5.0', + 'versions', + '--registry=' + common.registry + ], { cwd: t2dir }, function (err, code, stdout) { + t.ifError(err, 'view command finished successfully') + t.equal(code, 0, 'exit ok') + var re = new RegExp('1.5.0') + t.similar(stdout, re, 'should have version `1.5.0`') + t.end() + }) +}) + +test('npm view @ version --json', function (t) { + common.npm([ + 'view', + 'underscore@~1.5.0', + 'version', + '--json', + '--registry=' + common.registry + ], { cwd: t2dir }, function (err, code, stdout) { + t.ifError(err, 'view command finished successfully') + t.equal(code, 0, 'exit ok') + t.equal(stdout.trim(), JSON.stringify([ + '1.5.0', + '1.5.1' + ], null, 2), 'should have three versions') + t.end() }) }) test('npm view --json', function (t) { t.plan(3) - mr({ port: common.port, plugin: plugin }, function (er, s) { - common.npm([ - 'view', - 'underscore', - '--json', - '--registry=' + common.registry - ], { cwd: t2dir }, function (err, code, stdout) { - t.ifError(err, 'view command finished successfully') - t.equal(code, 0, 'exit ok') - s.close() - try { - var out = JSON.parse(stdout.trim()) - t.similar(out, { - maintainers: ['jashkenas '] - }, 'should have the same maintainer') - } catch (er) { - t.fail('Unable to parse JSON') - } - }) + common.npm([ + 'view', + 'underscore', + '--json', + '--registry=' + common.registry + ], { cwd: t2dir }, function (err, code, stdout) { + t.ifError(err, 'view command finished successfully') + t.equal(code, 0, 'exit ok') + try { + var out = JSON.parse(stdout.trim()) + t.similar(out, { + maintainers: ['jashkenas '] + }, 'should have the same maintainer') + } catch (er) { + t.fail('Unable to parse JSON') + } + }) +}) + +test('npm view @', function (t) { + common.npm([ + 'view', + 'underscore@12345', + '--registry=' + common.registry + ], { cwd: t2dir }, function (err, code, stdout) { + t.ifError(err, 'view command finished successfully') + t.equal(code, 0, 'exit ok') + t.equal(stdout.trim(), '', 'should return empty') + t.end() + }) +}) + +test('npm view @ --json', function (t) { + common.npm([ + 'view', + 'underscore@12345', + '--json', + '--registry=' + common.registry + ], { cwd: t2dir }, function (err, code, stdout) { + t.ifError(err, 'view command finished successfully') + t.equal(code, 0, 'exit ok') + t.equal(stdout.trim(), '', 'should return empty') + t.end() }) }) test('npm view ', function (t) { - mr({ port: common.port, plugin: plugin }, function (er, s) { - common.npm([ - 'view', - 'underscore', - 'homepage', - '--registry=' + common.registry - ], { cwd: t2dir }, function (err, code, stdout) { - t.ifError(err, 'view command finished successfully') - t.equal(code, 0, 'exit ok') - t.equal(stdout.trim(), 'http://underscorejs.org', - 'homepage should equal `http://underscorejs.org`') - s.close() - t.end() - }) + common.npm([ + 'view', + 'underscore', + 'homepage', + '--registry=' + common.registry + ], { cwd: t2dir }, function (err, code, stdout) { + t.ifError(err, 'view command finished successfully') + t.equal(code, 0, 'exit ok') + t.equal(stdout.trim(), 'http://underscorejs.org', + 'homepage should equal `http://underscorejs.org`') + t.end() }) }) test('npm view with invalid package name', function (t) { var invalidName = 'InvalidPackage' - var obj = {} - obj['/' + invalidName] = [404, {'error': 'not found'}] - - mr({ port: common.port, mocks: { 'get': obj } }, function (er, s) { - common.npm([ - 'view', - invalidName, - '--registry=' + common.registry - ], {}, function (err, code, stdout, stderr) { - t.ifError(err, 'view command finished successfully') - t.equal(code, 1, 'exit not ok') - - t.similar(stderr, new RegExp('is not in the npm registry'), - 'Package should NOT be found') - - t.dissimilar(stderr, new RegExp('use the name yourself!'), - 'Suggestion should not be there') - - t.similar(stderr, new RegExp('name can no longer contain capital letters'), - 'Suggestion about Capital letter should be there') - - s.close() - t.end() - }) + + server.get('/' + invalidName).reply('404', {'error': 'not found'}) + common.npm([ + 'view', + invalidName, + '--registry=' + common.registry + ], {}, function (err, code, stdout, stderr) { + t.ifError(err, 'view command finished successfully') + t.equal(code, 1, 'exit not ok') + + t.similar(stderr, new RegExp('is not in the npm registry'), + 'Package should NOT be found') + + t.dissimilar(stderr, new RegExp('use the name yourself!'), + 'Suggestion should not be there') + + t.similar(stderr, new RegExp('name can no longer contain capital letters'), + 'Suggestion about Capital letter should be there') + + t.end() }) }) test('npm view with valid but non existent package name', function (t) { - mr({ port: common.port, mocks: { - 'get': { - '/valid-but-non-existent-package': [404, {'error': 'not found'}] - } - }}, function (er, s) { - common.npm([ - 'view', - 'valid-but-non-existent-package', - '--registry=' + common.registry - ], {}, function (err, code, stdout, stderr) { - t.ifError(err, 'view command finished successfully') - t.equal(code, 1, 'exit not ok') - - t.similar(stderr, - new RegExp("'valid-but-non-existent-package' is not in the npm registry\."), - 'Package should NOT be found') - - t.similar(stderr, new RegExp('use the name yourself!'), - 'Suggestion should be there') - - s.close() - t.end() - }) + server.get('/valid-but-non-existent-package').reply(404, {'error': 'not found'}) + common.npm([ + 'view', + 'valid-but-non-existent-package', + '--registry=' + common.registry + ], {}, function (err, code, stdout, stderr) { + t.ifError(err, 'view command finished successfully') + t.equal(code, 1, 'exit not ok') + + t.similar(stderr, + new RegExp("'valid-but-non-existent-package' is not in the npm registry\."), + 'Package should NOT be found') + + t.similar(stderr, new RegExp('use the name yourself!'), + 'Suggestion should be there') + + t.end() }) }) @@ -381,5 +386,6 @@ test('cleanup', function (t) { rimraf.sync(t2dir) rimraf.sync(t3dir) t.pass('cleaned up') + server.close() t.end() }) From 39b4a1ca9bdf29d7aa482ad6adbaa020b41c885c Mon Sep 17 00:00:00 2001 From: Brian White Date: Mon, 17 Oct 2016 11:12:54 -0400 Subject: [PATCH 046/145] deps: revert default gtest reporter change PR-URL: https://github.com/nodejs/node/pull/8948 Reviewed-By: Jeremiah Senkpiel Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Ben Noordhuis --- deps/gtest/src/gtest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/gtest/src/gtest.cc b/deps/gtest/src/gtest.cc index 37f22d417e2303..87b67a2230fe55 100644 --- a/deps/gtest/src/gtest.cc +++ b/deps/gtest/src/gtest.cc @@ -4435,7 +4435,7 @@ UnitTestImpl::UnitTestImpl(UnitTest* parent) #endif // Will be overridden by the flag before first use. catch_exceptions_(false) { - listeners()->SetDefaultResultPrinter(new TapUnitTestResultPrinter); + listeners()->SetDefaultResultPrinter(new PrettyUnitTestResultPrinter); } UnitTestImpl::~UnitTestImpl() { From bda45b510c10a79faab0b8b8542bf94f4a1c18d2 Mon Sep 17 00:00:00 2001 From: Cristian Cavalli Date: Wed, 2 Nov 2016 11:15:54 -0700 Subject: [PATCH 047/145] deps: backport 5c8cb16 from upstream V8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original Commit Message: [ic] Don't call LookupIterator::GetStoreTarget() when receiver is not a JSReceiver. BUG=chromium:619166,chromium:625155 Review-Url: https://codereview.chromium.org/2175273002 Cr-Commit-Position: refs/heads/master@{#38018} PR-URL: https://github.com/nodejs/node/pull/9422 Reviewed-By: bnoordhuis - Ben Noordhuis Reviewed-By: jasnell - James M Snell Reviewed-By: targos - Michaël Zasso --- deps/v8/include/v8-version.h | 2 +- deps/v8/src/lookup.h | 1 + deps/v8/src/objects.cc | 17 ++++++++++++++++- deps/v8/test/cctest/test-api-interceptors.cc | 19 +++++++++++++++++++ 4 files changed, 37 insertions(+), 2 deletions(-) diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 353e3392ad7373..993f4f20091205 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 5 #define V8_MINOR_VERSION 1 #define V8_BUILD_NUMBER 281 -#define V8_PATCH_LEVEL 85 +#define V8_PATCH_LEVEL 86 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/src/lookup.h b/deps/v8/src/lookup.h index abd073284d4a82..3fbd9b41002f92 100644 --- a/deps/v8/src/lookup.h +++ b/deps/v8/src/lookup.h @@ -179,6 +179,7 @@ class LookupIterator final BASE_EMBEDDED { Handle GetReceiver() const { return receiver_; } Handle GetStoreTarget() const { + DCHECK(receiver->IsJSObject()); if (receiver_->IsJSGlobalProxy()) { Map* map = JSGlobalProxy::cast(*receiver_)->map(); if (map->has_hidden_prototype()) { diff --git a/deps/v8/src/objects.cc b/deps/v8/src/objects.cc index 51993f3f329ca5..fa45a091b12dfc 100644 --- a/deps/v8/src/objects.cc +++ b/deps/v8/src/objects.cc @@ -4214,11 +4214,20 @@ Maybe Object::SetPropertyInternal(LookupIterator* it, return JSProxy::SetProperty(it->GetHolder(), it->GetName(), value, it->GetReceiver(), language_mode); - case LookupIterator::INTERCEPTOR: + case LookupIterator::INTERCEPTOR: { + Handle store_target_map; + if (it->GetReceiver()->IsJSObject()) { + store_target_map = handle(it->GetStoreTarget()->map(), it->isolate()); + } if (it->HolderIsReceiverOrHiddenPrototype()) { Maybe result = JSObject::SetPropertyWithInterceptor(it, should_throw, value); if (result.IsNothing() || result.FromJust()) return result; + Utils::ApiCheck(store_target_map.is_null() || + *store_target_map == it->GetStoreTarget()->map(), + it->IsElement() ? "v8::IndexedPropertySetterCallback" + : "v8::NamedPropertySetterCallback", + "Interceptor silently changed store target."); } else { Maybe maybe_attributes = JSObject::GetPropertyAttributesWithInterceptor(it); @@ -4227,10 +4236,16 @@ Maybe Object::SetPropertyInternal(LookupIterator* it, if ((maybe_attributes.FromJust() & READ_ONLY) != 0) { return WriteToReadOnlyProperty(it, value, should_throw); } + Utils::ApiCheck(store_target_map.is_null() || + *store_target_map == it->GetStoreTarget()->map(), + it->IsElement() ? "v8::IndexedPropertySetterCallback" + : "v8::NamedPropertySetterCallback", + "Interceptor silently changed store target."); *found = false; return Nothing(); } break; + } case LookupIterator::ACCESSOR: { if (it->IsReadOnly()) { diff --git a/deps/v8/test/cctest/test-api-interceptors.cc b/deps/v8/test/cctest/test-api-interceptors.cc index a1894fad1adce4..c1aa0d69269964 100644 --- a/deps/v8/test/cctest/test-api-interceptors.cc +++ b/deps/v8/test/cctest/test-api-interceptors.cc @@ -3245,6 +3245,25 @@ THREADED_TEST(Regress149912) { CompileRun("Number.prototype.__proto__ = new Bug; var x = 0; x.foo();"); } +THREADED_TEST(Regress625155) { + LocalContext context; + v8::HandleScope scope(context->GetIsolate()); + Local templ = FunctionTemplate::New(context->GetIsolate()); + AddInterceptor(templ, EmptyInterceptorGetter, EmptyInterceptorSetter); + context->Global() + ->Set(context.local(), v8_str("Bug"), + templ->GetFunction(context.local()).ToLocalChecked()) + .FromJust(); + CompileRun( + "Number.prototype.__proto__ = new Bug;" + "var x;" + "x = 0xdead;" + "x.boom = 0;" + "x = 's';" + "x.boom = 0;" + "x = 1.5;" + "x.boom = 0;"); +} THREADED_TEST(Regress125988) { v8::HandleScope scope(CcTest::isolate()); From 6f780893eb0ce6fbe5e399ab827a50e7f09e433a Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 14 Oct 2016 09:26:12 -0700 Subject: [PATCH 048/145] test: fix flaky test-child-process-fork-dgram `test-child-process-fork-dgram` is unreliable on some platforms, especially FreeBSD and AIX within the project's continuous integration testing. It has also been observed to be flaky on macos. * Confirm child has received the server before sending packets * Close the server instance on the parent or child after receiving a Refs: https://github.com/nodejs/node/pull/8697 Fixes: https://github.com/nodejs/node/issues/8949 Fixes: https://github.com/nodejs/node/issues/8271 PR-URL: https://github.com/nodejs/node/pull/9098 Reviewed-By: Santiago Gimeno --- test/parallel/parallel.status | 3 - .../parallel/test-child-process-fork-dgram.js | 99 ++++++++----------- 2 files changed, 42 insertions(+), 60 deletions(-) diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status index f02f9d07829e9c..a58d09fc156519 100644 --- a/test/parallel/parallel.status +++ b/test/parallel/parallel.status @@ -31,6 +31,3 @@ test-fs-watch-encoding : FAIL, PASS #covered by https://github.com/nodejs/node/issues/3796 # but more frequent on AIX ? test-debug-signal-cluster : PASS, FLAKY - -#covered by https://github.com/nodejs/node/issues/8271 -test-child-process-fork-dgram : PASS, FLAKY diff --git a/test/parallel/test-child-process-fork-dgram.js b/test/parallel/test-child-process-fork-dgram.js index 5a00dca06697cf..8bdf006a743e0d 100644 --- a/test/parallel/test-child-process-fork-dgram.js +++ b/test/parallel/test-child-process-fork-dgram.js @@ -4,101 +4,86 @@ * sending a fd representing a UDP socket to the child and sending messages * to this endpoint, these messages are distributed to the parent and the * child process. - * - * Because it's not really possible to predict how the messages will be - * distributed among the parent and the child processes, we keep sending - * messages until both the parent and the child received at least one - * message. The worst case scenario is when either one never receives - * a message. In this case the test runner will timeout after 60 secs - * and the test will fail. */ const common = require('../common'); -var dgram = require('dgram'); -var fork = require('child_process').fork; -var assert = require('assert'); +const dgram = require('dgram'); +const fork = require('child_process').fork; +const assert = require('assert'); if (common.isWindows) { - common.skip('Sending dgram sockets to child processes is ' + - 'not supported'); + common.skip('Sending dgram sockets to child processes is not supported'); return; } -var server; if (process.argv[2] === 'child') { - process.on('message', function removeMe(msg, clusterServer) { - if (msg === 'server') { - server = clusterServer; - - server.on('message', function() { - process.send('gotMessage'); - }); - - } else if (msg === 'stop') { - server.close(); - process.removeListener('message', removeMe); - } + let childServer; + + process.once('message', function(msg, clusterServer) { + childServer = clusterServer; + + childServer.once('message', function() { + process.send('gotMessage'); + childServer.close(); + }); + + process.send('handleReceived'); }); } else { - server = dgram.createSocket('udp4'); - var client = dgram.createSocket('udp4'); - var child = fork(__filename, ['child']); + const parentServer = dgram.createSocket('udp4'); + const client = dgram.createSocket('udp4'); + const child = fork(__filename, ['child']); - var msg = Buffer.from('Some bytes'); + const msg = Buffer.from('Some bytes'); var childGotMessage = false; var parentGotMessage = false; - server.on('message', function(msg, rinfo) { + parentServer.once('message', function(msg, rinfo) { parentGotMessage = true; + parentServer.close(); }); - server.on('listening', function() { - child.send('server', server); + parentServer.on('listening', function() { + child.send('server', parentServer); - child.once('message', function(msg) { + child.on('message', function(msg) { if (msg === 'gotMessage') { childGotMessage = true; + } else if (msg = 'handlReceived') { + sendMessages(); } }); - - sendMessages(); }); - var sendMessages = function() { - var timer = setInterval(function() { - client.send( - msg, - 0, - msg.length, - server.address().port, - '127.0.0.1', - function(err) { - if (err) throw err; - } - ); + const sendMessages = function() { + const serverPort = parentServer.address().port; + const timer = setInterval(function() { /* * Both the parent and the child got at least one message, * test passed, clean up everyting. */ if (parentGotMessage && childGotMessage) { clearInterval(timer); - shutdown(); + client.close(); + } else { + client.send( + msg, + 0, + msg.length, + serverPort, + '127.0.0.1', + function(err) { + if (err) throw err; + } + ); } - }, 1); }; - var shutdown = function() { - child.send('stop'); - - server.close(); - client.close(); - }; - - server.bind(0, '127.0.0.1'); + parentServer.bind(0, '127.0.0.1'); process.once('exit', function() { assert(parentGotMessage); From 02f7e3aca3f11d23daa4359206becbf312652ddd Mon Sep 17 00:00:00 2001 From: larissayvette Date: Wed, 12 Oct 2016 16:53:02 +0100 Subject: [PATCH 049/145] test: checking if error constructor is assert.AssertionError PR-URL: https://github.com/nodejs/node/pull/9119 Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott --- test/parallel/test-debug-agent.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-debug-agent.js b/test/parallel/test-debug-agent.js index 0bb5d7f9be25df..d65029e5855b26 100644 --- a/test/parallel/test-debug-agent.js +++ b/test/parallel/test-debug-agent.js @@ -1,6 +1,12 @@ 'use strict'; require('../common'); const assert = require('assert'); +const debug = require('_debug_agent'); -assert.throws(() => { require('_debug_agent').start(); }, - assert.AssertionError); +assert.throws( + () => { debug.start(); }, + function(err) { + return (err instanceof assert.AssertionError && + err.message === 'Debugger agent running without bindings!'); + } +); From 88cd4cfcb089d26c68dc13d64b13df3049366cdb Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Mon, 17 Oct 2016 18:53:40 +0200 Subject: [PATCH 050/145] test: rename target to exports for consistency The doc/api/addons.md document contains examples of Addon Initialization functions that take a parameter named exports. This also matches the name used in node.cc when calling: mp->nm_register_func(exports, module, mp->nm_priv); Currently, a number of the tests name this same parameter target. This commit renames target to exports for consistency. PR-URL: https://github.com/nodejs/node/pull/9135 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- test/addons/at-exit/binding.cc | 4 ++-- test/addons/buffer-free-callback/binding.cc | 6 +++--- test/addons/hello-world/binding.cc | 4 ++-- test/addons/load-long-path/binding.cc | 4 ++-- test/addons/make-callback-recurse/binding.cc | 4 ++-- test/addons/make-callback/binding.cc | 4 ++-- test/addons/null-buffer-neuter/binding.cc | 4 ++-- test/addons/parse-encoding/binding.cc | 4 ++-- test/addons/repl-domain-abort/binding.cc | 4 ++-- test/addons/stringbytes-external-exceed-max/binding.cc | 4 ++-- test/addons/symlinked-module/binding.cc | 4 ++-- 11 files changed, 23 insertions(+), 23 deletions(-) diff --git a/test/addons/at-exit/binding.cc b/test/addons/at-exit/binding.cc index 5210de298b8b39..8f9d0b461c767e 100644 --- a/test/addons/at-exit/binding.cc +++ b/test/addons/at-exit/binding.cc @@ -33,8 +33,8 @@ static void sanity_check(void) { assert(at_exit_cb2_called == 2); } -void init(Local target) { - AtExit(at_exit_cb1, target->CreationContext()->GetIsolate()); +void init(Local exports) { + AtExit(at_exit_cb1, exports->GetIsolate()); AtExit(at_exit_cb2, cookie); AtExit(at_exit_cb2, cookie); atexit(sanity_check); diff --git a/test/addons/buffer-free-callback/binding.cc b/test/addons/buffer-free-callback/binding.cc index a72386fdd627ab..5c95f594e74fb7 100644 --- a/test/addons/buffer-free-callback/binding.cc +++ b/test/addons/buffer-free-callback/binding.cc @@ -36,9 +36,9 @@ void Check(const v8::FunctionCallbackInfo& args) { assert(alive > 0); } -void init(v8::Local target) { - NODE_SET_METHOD(target, "alloc", Alloc); - NODE_SET_METHOD(target, "check", Check); +void init(v8::Local exports) { + NODE_SET_METHOD(exports, "alloc", Alloc); + NODE_SET_METHOD(exports, "check", Check); } NODE_MODULE(binding, init); diff --git a/test/addons/hello-world/binding.cc b/test/addons/hello-world/binding.cc index b21f87d0fd5f4b..8a8145f01618d2 100644 --- a/test/addons/hello-world/binding.cc +++ b/test/addons/hello-world/binding.cc @@ -7,8 +7,8 @@ void Method(const v8::FunctionCallbackInfo& args) { args.GetReturnValue().Set(v8::String::NewFromUtf8(isolate, "world")); } -void init(v8::Local target) { - NODE_SET_METHOD(target, "hello", Method); +void init(v8::Local exports) { + NODE_SET_METHOD(exports, "hello", Method); } NODE_MODULE(binding, init); diff --git a/test/addons/load-long-path/binding.cc b/test/addons/load-long-path/binding.cc index cdf9904e3f8d47..1cdcb4c200f488 100644 --- a/test/addons/load-long-path/binding.cc +++ b/test/addons/load-long-path/binding.cc @@ -6,8 +6,8 @@ void Method(const v8::FunctionCallbackInfo& args) { args.GetReturnValue().Set(v8::String::NewFromUtf8(isolate, "world")); } -void init(v8::Local target) { - NODE_SET_METHOD(target, "hello", Method); +void init(v8::Local exports) { + NODE_SET_METHOD(exports, "hello", Method); } NODE_MODULE(binding, init); diff --git a/test/addons/make-callback-recurse/binding.cc b/test/addons/make-callback-recurse/binding.cc index 3e3a1464930477..4ca5426f9ec28f 100644 --- a/test/addons/make-callback-recurse/binding.cc +++ b/test/addons/make-callback-recurse/binding.cc @@ -22,8 +22,8 @@ void MakeCallback(const FunctionCallbackInfo& args) { node::MakeCallback(isolate, recv, method, 0, nullptr); } -void Initialize(Local target) { - NODE_SET_METHOD(target, "makeCallback", MakeCallback); +void Initialize(Local exports) { + NODE_SET_METHOD(exports, "makeCallback", MakeCallback); } } // namespace diff --git a/test/addons/make-callback/binding.cc b/test/addons/make-callback/binding.cc index 8970e9fb1af76c..3b56c385ecdd00 100644 --- a/test/addons/make-callback/binding.cc +++ b/test/addons/make-callback/binding.cc @@ -30,8 +30,8 @@ void MakeCallback(const v8::FunctionCallbackInfo& args) { args.GetReturnValue().Set(result); } -void Initialize(v8::Local target) { - NODE_SET_METHOD(target, "makeCallback", MakeCallback); +void Initialize(v8::Local exports) { + NODE_SET_METHOD(exports, "makeCallback", MakeCallback); } } // namespace diff --git a/test/addons/null-buffer-neuter/binding.cc b/test/addons/null-buffer-neuter/binding.cc index 532e22883383dd..d0f26d4cc50222 100644 --- a/test/addons/null-buffer-neuter/binding.cc +++ b/test/addons/null-buffer-neuter/binding.cc @@ -34,8 +34,8 @@ void Run(const v8::FunctionCallbackInfo& args) { assert(alive == 0); } -void init(v8::Local target) { - NODE_SET_METHOD(target, "run", Run); +void init(v8::Local exports) { + NODE_SET_METHOD(exports, "run", Run); } NODE_MODULE(binding, init); diff --git a/test/addons/parse-encoding/binding.cc b/test/addons/parse-encoding/binding.cc index 0a31569e039691..5c56d97fc6ac98 100644 --- a/test/addons/parse-encoding/binding.cc +++ b/test/addons/parse-encoding/binding.cc @@ -29,8 +29,8 @@ void ParseEncoding(const v8::FunctionCallbackInfo& args) { args.GetReturnValue().Set(encoding_string); } -void Initialize(v8::Local target) { - NODE_SET_METHOD(target, "parseEncoding", ParseEncoding); +void Initialize(v8::Local exports) { + NODE_SET_METHOD(exports, "parseEncoding", ParseEncoding); } } // anonymous namespace diff --git a/test/addons/repl-domain-abort/binding.cc b/test/addons/repl-domain-abort/binding.cc index 7d9b6e5513c9a6..e7415c317fc89f 100644 --- a/test/addons/repl-domain-abort/binding.cc +++ b/test/addons/repl-domain-abort/binding.cc @@ -19,8 +19,8 @@ void Method(const FunctionCallbackInfo& args) { NULL); } -void init(Local target) { - NODE_SET_METHOD(target, "method", Method); +void init(Local exports) { + NODE_SET_METHOD(exports, "method", Method); } NODE_MODULE(binding, init); diff --git a/test/addons/stringbytes-external-exceed-max/binding.cc b/test/addons/stringbytes-external-exceed-max/binding.cc index 65390852c2d2dd..03fa29f2737e0a 100644 --- a/test/addons/stringbytes-external-exceed-max/binding.cc +++ b/test/addons/stringbytes-external-exceed-max/binding.cc @@ -17,8 +17,8 @@ void EnsureAllocation(const v8::FunctionCallbackInfo &args) { args.GetReturnValue().Set(success); } -void init(v8::Local target) { - NODE_SET_METHOD(target, "ensureAllocation", EnsureAllocation); +void init(v8::Local exports) { + NODE_SET_METHOD(exports, "ensureAllocation", EnsureAllocation); } NODE_MODULE(binding, init); diff --git a/test/addons/symlinked-module/binding.cc b/test/addons/symlinked-module/binding.cc index cdf9904e3f8d47..1cdcb4c200f488 100644 --- a/test/addons/symlinked-module/binding.cc +++ b/test/addons/symlinked-module/binding.cc @@ -6,8 +6,8 @@ void Method(const v8::FunctionCallbackInfo& args) { args.GetReturnValue().Set(v8::String::NewFromUtf8(isolate, "world")); } -void init(v8::Local target) { - NODE_SET_METHOD(target, "hello", Method); +void init(v8::Local exports) { + NODE_SET_METHOD(exports, "hello", Method); } NODE_MODULE(binding, init); From 7b75cb9e5aa02b2ec486eb1e61e7feb14bde49d7 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 15 Oct 2016 15:02:43 -0700 Subject: [PATCH 051/145] test,lib,benchmark: match function names In most cases, named functions match the variable or property to which they are being assigned. That also seems to be the practice in a series of PRs currently being evaluated that name currently-anonymous functions. This change applies that rule to instances in the code base that don't comply with that practice. This will be enforceable with a lint rule once we upgrade to ESLint 3.8.0. PR-URL: https://github.com/nodejs/node/pull/9113 Reviewed-By: James M Snell Reviewed-By: Franziska Hinkelmann --- benchmark/buffers/buffer-swap.js | 2 +- lib/_stream_wrap.js | 4 ++-- lib/_stream_writable.js | 2 +- lib/_tls_legacy.js | 6 +++--- lib/_tls_wrap.js | 6 +++--- lib/domain.js | 2 +- lib/fs.js | 2 +- lib/net.js | 2 +- lib/repl.js | 2 +- test/parallel/test-child-process-spawn-typeerror.js | 2 +- test/parallel/test-http-client-readable.js | 4 ++-- test/parallel/test-repl-persistent-history.js | 2 +- test/parallel/test-repl-tab-complete.js | 4 ++-- test/pummel/test-tls-server-large-request.js | 2 +- 14 files changed, 21 insertions(+), 21 deletions(-) diff --git a/benchmark/buffers/buffer-swap.js b/benchmark/buffers/buffer-swap.js index 0793c77c8fcb80..c6d7db470bc69a 100644 --- a/benchmark/buffers/buffer-swap.js +++ b/benchmark/buffers/buffer-swap.js @@ -44,7 +44,7 @@ Buffer.prototype.htonl = function htonl() { return this; }; -Buffer.prototype.htonll = function htonl() { +Buffer.prototype.htonll = function htonll() { if (this.length % 8 !== 0) throw new RangeError(); for (var i = 0; i < this.length; i += 8) { diff --git a/lib/_stream_wrap.js b/lib/_stream_wrap.js index 7eb3008484b2aa..fbc32965980e96 100644 --- a/lib/_stream_wrap.js +++ b/lib/_stream_wrap.js @@ -159,7 +159,7 @@ function QueueItem(type, req) { this.next = this; } -StreamWrap.prototype._enqueue = function enqueue(type, req) { +StreamWrap.prototype._enqueue = function _enqueue(type, req) { const item = new QueueItem(type, req); if (this._list === null) { this._list = item; @@ -174,7 +174,7 @@ StreamWrap.prototype._enqueue = function enqueue(type, req) { return item; }; -StreamWrap.prototype._dequeue = function dequeue(item) { +StreamWrap.prototype._dequeue = function _dequeue(item) { assert(item instanceof QueueItem); var next = item.next; diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js index 575c56cdd7c712..d96c7da66d6b07 100644 --- a/lib/_stream_writable.js +++ b/lib/_stream_writable.js @@ -117,7 +117,7 @@ function WritableState(options, stream) { this.corkedRequestsFree = new CorkedRequest(this); } -WritableState.prototype.getBuffer = function writableStateGetBuffer() { +WritableState.prototype.getBuffer = function getBuffer() { var current = this.bufferedRequest; var out = []; while (current) { diff --git a/lib/_tls_legacy.js b/lib/_tls_legacy.js index b064b245d65a1b..f974b0cfc05575 100644 --- a/lib/_tls_legacy.js +++ b/lib/_tls_legacy.js @@ -139,7 +139,7 @@ CryptoStream.prototype.init = function init() { }; -CryptoStream.prototype._write = function write(data, encoding, cb) { +CryptoStream.prototype._write = function _write(data, encoding, cb) { assert(this._pending === null); // Black-hole data @@ -220,7 +220,7 @@ CryptoStream.prototype._write = function write(data, encoding, cb) { }; -CryptoStream.prototype._writePending = function writePending() { +CryptoStream.prototype._writePending = function _writePending() { const data = this._pending; const encoding = this._pendingEncoding; const cb = this._pendingCallback; @@ -232,7 +232,7 @@ CryptoStream.prototype._writePending = function writePending() { }; -CryptoStream.prototype._read = function read(size) { +CryptoStream.prototype._read = function _read(size) { // XXX: EOF?! if (!this.pair.ssl) return this.push(null); diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index b8a793345f29a5..b36b90c54ca233 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -304,7 +304,7 @@ proxiedMethods.forEach(function(name) { }; }); -tls_wrap.TLSWrap.prototype.close = function closeProxy(cb) { +tls_wrap.TLSWrap.prototype.close = function close(cb) { if (this.owner) this.owner.ssl = null; @@ -340,10 +340,10 @@ TLSSocket.prototype._wrapHandle = function(wrap) { res._secureContext = context; res.reading = handle.reading; Object.defineProperty(handle, 'reading', { - get: function readingGetter() { + get: function get() { return res.reading; }, - set: function readingSetter(value) { + set: function set(value) { res.reading = value; } }); diff --git a/lib/domain.js b/lib/domain.js index d6958b2c30c7e4..c241d0fe072298 100644 --- a/lib/domain.js +++ b/lib/domain.js @@ -58,7 +58,7 @@ Domain.prototype._disposed = undefined; // Called by process._fatalException in case an error was thrown. -Domain.prototype._errorHandler = function errorHandler(er) { +Domain.prototype._errorHandler = function _errorHandler(er) { var caught = false; // ignore errors on disposed domains. diff --git a/lib/fs.js b/lib/fs.js index cb99fcf8211391..fd088d97caa144 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -825,7 +825,7 @@ fs.truncate = function(path, len, callback) { fs.open(path, 'r+', function(er, fd) { if (er) return callback(er); var req = new FSReqWrap(); - req.oncomplete = function ftruncateCb(er) { + req.oncomplete = function oncomplete(er) { fs.close(fd, function(er2) { callback(er || er2); }); diff --git a/lib/net.js b/lib/net.js index bc531158057c26..616c299b12c240 100644 --- a/lib/net.js +++ b/lib/net.js @@ -195,7 +195,7 @@ function Socket(options) { } util.inherits(Socket, stream.Duplex); -Socket.prototype._unrefTimer = function unrefTimer() { +Socket.prototype._unrefTimer = function _unrefTimer() { for (var s = this; s !== null; s = s._parent) timers._unrefActive(s); }; diff --git a/lib/repl.js b/lib/repl.js index 4bc3e643bb7063..9568b6914cb9d4 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -664,7 +664,7 @@ exports.start = function(prompt, return repl; }; -REPLServer.prototype.close = function replClose() { +REPLServer.prototype.close = function close() { if (this.terminal && this._flushing && !this._closingOnFlush) { this._closingOnFlush = true; this.once('flushHistory', () => diff --git a/test/parallel/test-child-process-spawn-typeerror.js b/test/parallel/test-child-process-spawn-typeerror.js index aa89c6cc396577..b6eac63c4eb048 100644 --- a/test/parallel/test-child-process-spawn-typeerror.js +++ b/test/parallel/test-child-process-spawn-typeerror.js @@ -57,7 +57,7 @@ assert.throws(function() { // Argument types for combinatorics const a = []; const o = {}; -const c = function callback() {}; +const c = function c() {}; const s = 'string'; const u = undefined; const n = null; diff --git a/test/parallel/test-http-client-readable.js b/test/parallel/test-http-client-readable.js index c035132eb0decc..3c50dc74f1fccf 100644 --- a/test/parallel/test-http-client-readable.js +++ b/test/parallel/test-http-client-readable.js @@ -15,7 +15,7 @@ FakeAgent.prototype.createConnection = function createConnection() { var s = new Duplex(); var once = false; - s._read = function read() { + s._read = function _read() { if (once) return this.push(null); once = true; @@ -27,7 +27,7 @@ FakeAgent.prototype.createConnection = function createConnection() { }; // Blackhole - s._write = function write(data, enc, cb) { + s._write = function _write(data, enc, cb) { cb(); }; diff --git a/test/parallel/test-repl-persistent-history.js b/test/parallel/test-repl-persistent-history.js index 08ad7e965429d2..2cdc1ab19c32c1 100644 --- a/test/parallel/test-repl-persistent-history.js +++ b/test/parallel/test-repl-persistent-history.js @@ -166,7 +166,7 @@ const tests = [ expected: [prompt, replFailedRead, prompt, replDisabled, prompt] }, { // Make sure this is always the last test, since we change os.homedir() - before: function mockHomedirFailure() { + before: function before() { // Mock os.homedir() failure os.homedir = function() { throw new Error('os.homedir() failure'); diff --git a/test/parallel/test-repl-tab-complete.js b/test/parallel/test-repl-tab-complete.js index 4ff4371875c8c2..e8fc5b1863caa3 100644 --- a/test/parallel/test-repl-tab-complete.js +++ b/test/parallel/test-repl-tab-complete.js @@ -291,7 +291,7 @@ const testCustomCompleterSyncMode = repl.start({ prompt: '', input: putIn, output: putIn, - completer: function completerSyncMode(line) { + completer: function completer(line) { const hits = customCompletions.filter((c) => { return c.indexOf(line) === 0; }); @@ -323,7 +323,7 @@ const testCustomCompleterAsyncMode = repl.start({ prompt: '', input: putIn, output: putIn, - completer: function completerAsyncMode(line, callback) { + completer: function completer(line, callback) { const hits = customCompletions.filter((c) => { return c.indexOf(line) === 0; }); diff --git a/test/pummel/test-tls-server-large-request.js b/test/pummel/test-tls-server-large-request.js index c4d7a6095ae8cb..66d700ae4bc6a9 100644 --- a/test/pummel/test-tls-server-large-request.js +++ b/test/pummel/test-tls-server-large-request.js @@ -25,7 +25,7 @@ function Mediator() { } util.inherits(Mediator, stream.Writable); -Mediator.prototype._write = function write(data, enc, cb) { +Mediator.prototype._write = function _write(data, enc, cb) { this.buf += data; setTimeout(cb, 0); From 5c42d98bbd37214f7420caa7b2e35fee5a7b5abc Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 18 Oct 2016 11:25:02 -0700 Subject: [PATCH 052/145] test: remove duplicate required module `common` is required twice in test-setproctitle.js. Remove one of the instances. Other refactoring: * var -> const and let * assert.equal -> assert.strictEqual * assert.notEqual -> assert.notStrickEqual * string concatenation -> template string * use of assert.ifError() instead of asserting error is null PR-URL: https://github.com/nodejs/node/pull/9169 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- test/parallel/test-setproctitle.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/test/parallel/test-setproctitle.js b/test/parallel/test-setproctitle.js index 4d096b1941865f..9dd603bfdc3327 100644 --- a/test/parallel/test-setproctitle.js +++ b/test/parallel/test-setproctitle.js @@ -2,34 +2,33 @@ // Original test written by Jakub Lekstan const common = require('../common'); -require('../common'); // FIXME add sunos support if (!(common.isFreeBSD || common.isOSX || common.isLinux)) { console.log(`1..0 # Skipped: Unsupported platform [${process.platform}]`); return; } -var assert = require('assert'); -var exec = require('child_process').exec; -var path = require('path'); +const assert = require('assert'); +const exec = require('child_process').exec; +const path = require('path'); // The title shouldn't be too long; libuv's uv_set_process_title() out of // security considerations no longer overwrites envp, only argv, so the // maximum title length is possibly quite short. -var title = 'testme'; +let title = 'testme'; -assert.notEqual(process.title, title); +assert.notStrictEqual(process.title, title); process.title = title; -assert.equal(process.title, title); +assert.strictEqual(process.title, title); -exec('ps -p ' + process.pid + ' -o args=', function(error, stdout, stderr) { - assert.equal(error, null); - assert.equal(stderr, ''); +exec(`ps -p ${process.pid} -o args=`, function callback(error, stdout, stderr) { + assert.ifError(error); + assert.strictEqual(stderr, ''); // freebsd always add ' (procname)' to the process title if (common.isFreeBSD) title += ` (${path.basename(process.execPath)})`; // omitting trailing whitespace and \n - assert.equal(stdout.replace(/\s+$/, ''), title); + assert.strictEqual(stdout.replace(/\s+$/, ''), title); }); From 9077f63dcfac622f7ecc1012e3a2e7a4d8bed854 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 19 Oct 2016 14:27:02 -0700 Subject: [PATCH 053/145] tools: replace custom lint rule for getter/setter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace custom `no-definegetter-definesetter` lint rule with ESLint's built-in `no-restricted-properties`. Refs: https://github.com/nodejs/node/pull/9112#pullrequestreview-4378536 PR-URL: https://github.com/nodejs/node/pull/9194 Reviewed-By: Teddy Katz Reviewed-By: Roman Reiss Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Michaël Zasso Reviewed-By: Luigi Pinca Reviewed-By: Sakthipriyan Vairamani --- .eslintrc | 7 +++- .../no-definegetter-definesetter.js | 32 ------------------- 2 files changed, 6 insertions(+), 33 deletions(-) delete mode 100644 tools/eslint-rules/no-definegetter-definesetter.js diff --git a/.eslintrc b/.eslintrc index 6e483a13b7d6c5..262717980f3a48 100644 --- a/.eslintrc +++ b/.eslintrc @@ -63,6 +63,12 @@ rules: object: assert, property: deepEqual, message: Please use assert.deepStrictEqual(). + }, { + property: __defineGetter__, + message: __defineGetter__ is deprecated. + }, { + property: __defineSetter__, + message: __defineSetter__ is deprecated. }] # Stylistic Issues @@ -112,7 +118,6 @@ rules: align-multiline-assignment: 2 assert-fail-single-argument: 2 new-with-error: [2, Error, RangeError, TypeError, SyntaxError, ReferenceError] - no-definegetter-definesetter: 2 # Global scoped method and vars globals: diff --git a/tools/eslint-rules/no-definegetter-definesetter.js b/tools/eslint-rules/no-definegetter-definesetter.js deleted file mode 100644 index 3de010f47f203c..00000000000000 --- a/tools/eslint-rules/no-definegetter-definesetter.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @fileoverview Rule to flag usage of __defineGetter__ and __defineSetter__ - * @author Rich Trott - */ - -'use strict'; - -//------------------------------------------------------------------------------ -// Rule Definition -//------------------------------------------------------------------------------ - -module.exports = { - create: function(context) { - const disallowed = ['__defineGetter__', '__defineSetter__']; - - return { - MemberExpression: function(node) { - var prop; - if (node.property) { - if (node.property.type === 'Identifier' && !node.computed) { - prop = node.property.name; - } else if (node.property.type === 'Literal') { - prop = node.property.value; - } - if (disallowed.includes(prop)) { - context.report(node, `The ${prop} property is deprecated.`); - } - } - } - }; - } -}; From 53de0c258fb46f08b58e18f59fa516c20a6ab3f0 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Tue, 27 Sep 2016 18:57:46 -0400 Subject: [PATCH 054/145] doc: improve header styling for API docs Sizes were mostly decided by using http://type-scale.com/ with the 1.250 "Major Third" scaling. PR-URL: https://github.com/nodejs/node/pull/8811 Reviewed-By: Roman Reiss Reviewed-By: Luigi Pinca Reviewed-By: Prince John Wesley Reviewed-By: Rod Vagg Reviewed-By: Phillip Johnsen --- doc/api_assets/style.css | 58 ++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/doc/api_assets/style.css b/doc/api_assets/style.css index 5db5473e0bd5b7..1e82464cc93b79 100644 --- a/doc/api_assets/style.css +++ b/doc/api_assets/style.css @@ -15,6 +15,31 @@ body { background: #fff; } +h1, h2, h3, h4 { + margin: .8em 0 .5em; + line-height: 1.2; +} + +h5, h6 { + margin: 1em 0 .8em; + line-height: 1.2; +} + +h1 { + margin-top: 0; + font-size: 2.441em; +} + +h2 {font-size: 1.953em;} + +h3 {font-size: 1.563em;} + +h4 {font-size: 1.25em;} + +h5 {font-size: 1em;} + +h6 {font-size: .8em;} + pre, tt, code, .pre, span.type, a.type { font-family: Monaco, Consolas, "Lucida Console", monospace; } @@ -127,7 +152,7 @@ abbr { p { position: relative; text-rendering: optimizeLegibility; - margin: 0 0 1em 0; + margin: 0 0 1.125em 0; line-height: 1.5em; } @@ -180,10 +205,10 @@ h1, h2, h3, h4, h5, h6 { text-rendering: optimizeLegibility; font-weight: 700; position: relative; - margin-bottom: .5em; } header h1 { + font-size: 2em; line-height: 2em; margin: 0; } @@ -198,30 +223,15 @@ header h1 { background-color: #ccc; } -#toc + h1 { - margin-top: 1em; - padding-top: 0; -} - -h2 { - font-size: 1.5em; - margin: 1em 0 .5em; -} - h2 + h2 { margin: 0 0 .5em; } -h3 { - font-size: 1em; - margin: 1.5em 0 .5em; -} - h3 + h3 { margin: 0 0 .5em; } -h2, h3, h4 { +h2, h3, h4, h5 { position: relative; padding-right: 40px; } @@ -244,16 +254,6 @@ h1 span a, h2 span a, h3 span a, h4 span a { font-weight: bold; } -h5 { - font-size: 1.125em; - line-height: 1.4em; -} - -h6 { - font-size: 1em; - line-height: 1.4667em; -} - pre, tt, code { line-height: 1.5em; margin: 0; padding: 0; @@ -353,7 +353,7 @@ hr { margin-bottom: 0; } -p tt, p code, li code { +tt, code { font-size: .9em; color: #040404; background-color: #f2f2f2; From ce2d434ab646551c9935d70e469f9d016f4643a4 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 19 Oct 2016 15:57:00 -0700 Subject: [PATCH 055/145] test: remove arbitrary timer `test-dgram-send-callback-buffer-length` was timing out (via the 200ms timeout in the code) on FreeBSD in CI. The 200ms timeout is arbitrary and not necessary. Remove it. PR-URL: https://github.com/nodejs/node/pull/9197 Reviewed-By: Colin Ihrig Reviewed-By: Santiago Gimeno Reviewed-By: James M Snell Reviewed-By: Luigi Pinca --- test/parallel/test-dgram-send-callback-buffer-length.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/test/parallel/test-dgram-send-callback-buffer-length.js b/test/parallel/test-dgram-send-callback-buffer-length.js index b44393898331ed..76af0e14635be0 100644 --- a/test/parallel/test-dgram-send-callback-buffer-length.js +++ b/test/parallel/test-dgram-send-callback-buffer-length.js @@ -6,18 +6,13 @@ const assert = require('assert'); const dgram = require('dgram'); const client = dgram.createSocket('udp4'); -const timer = setTimeout(function() { - throw new Error('Timeout'); -}, common.platformTimeout(200)); - const buf = Buffer.allocUnsafe(256); const offset = 20; const len = buf.length - offset; const messageSent = common.mustCall(function messageSent(err, bytes) { - assert.notEqual(bytes, buf.length); - assert.equal(bytes, buf.length - offset); - clearTimeout(timer); + assert.notStrictEqual(bytes, buf.length); + assert.strictEqual(bytes, buf.length - offset); client.close(); }); From ae73ecbe3fa93223be9675451b54d3cf15447581 Mon Sep 17 00:00:00 2001 From: Josh Gavant Date: Wed, 19 Oct 2016 13:48:31 -0700 Subject: [PATCH 056/145] doc: add 2016-10-19 CTC meeting minutes PR-URL: https://github.com/nodejs/node/pull/9193 Reviewed-By: Rich Trott Reviewed-By: Michael Dawson Reviewed-By: James M Snell --- doc/ctc-meetings/2016-10-19.md | 202 +++++++++++++++++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 doc/ctc-meetings/2016-10-19.md diff --git a/doc/ctc-meetings/2016-10-19.md b/doc/ctc-meetings/2016-10-19.md new file mode 100644 index 00000000000000..8fbaa1dfa906d6 --- /dev/null +++ b/doc/ctc-meetings/2016-10-19.md @@ -0,0 +1,202 @@ +# Node Foundation CTC Meeting 2016-10-19 + +## Links + +* **Audio Recording**: TBP +* **GitHub Issue**: [#9143](https://github.com/nodejs/node/issues/9143) +* **Minutes Google Doc**: +* _Previous Minutes Google Doc: _ + +## Present + +* Bradley Meck @bmeck (observer/GoDaddy/TC39) +* Colin Ihrig @cjihrig (CTC) +* Evan Lucas @evanlucas (CTC) +* James M Snell @jasnell (CTC) +* Josh Gavant @joshgav (observer/Microsoft) +* Michael Dawson @mhdawson (CTC) +* Julien Gilli @misterdjules (CTC) +* Mikeal Rogers @mikeal (observer/Node.js Foundation) +* Brian White @mscdex (CTC) +* Ali Ijaz Sheikh @ofrobots (CTC) +* Jenn Turner @renrutnnej (observer/Node.js Foundation) +* Steven R. Loomis @srl295 (observer) +* Sakthipriyan Vairamani @thefourtheye (observer) +* Trevor Norris @trevnorris (CTC) +* Rich Trott @Trott (CTC) + +## Standup + +* Bradley Meck @bmeck (observer/GoDaddy/TC39) + * Vacation, work on import changes for ES spec +* Colin Ihrig @cjihrig (CTC) + * Reviewed issues and PRs. Revisited an old PR. +* Evan Lucas @evanlucas (CTC) + * cut v6.8.1 release + * opened small doc PR + * issue/pr review +* James M Snell @jasnell (CTC) + * Preparing v7.0.0 release + * HTTP/2 implementation + * PRs +* Josh Gavant @joshgav (observer/Microsoft) + * PR’s to improve user experience with new debugger + * investigating how to integrate guides with API docs + * off this week +* Michael Dawson @mhdawson (CTC) + * couple days vacation + * Added code coverage nightly job and PR for doc + * misc issue review/comment/lands + * Some Abi stable node discussion/work + * A number of benchmarking issues to look at +* Julien Gilli @misterdjules (CTC) + * nothing too significant +* Mikeal Rogers @mikeal (observer/Node.js Foundation) + * Putting together bugeting stuff +* Brian White @mscdex (CTC) + * Continued work on improving string encoding/decoding + performance. + * Commented on issues, reviewed PRs. +* Ali Ijaz Sheikh @ofrobots (CTC) + * Some V8 backport triage. Not much else notable. +* Jenn Turner @renrutnnej (observer/Node.js Foundation) + * Just observing, no update +* Steven R. Loomis @srl295 (observer) + * ICU 58 going GA end of week so will submit PR to update - [#7844](https://github.com/nodejs/node/issues/7844) + * Backported break iterator fix to v4.x [#9008](https://github.com/nodejs/node/pull/9008) +* Sakthipriyan Vairamani @thefourtheye (observer) + * mostly PR reviews +* Trevor Norris @trevnorris (CTC) + * Worked with Matt Loring, proposed promise hooks api is + sufficient combined with debugger API. +* Rich Trott @Trott (CTC) + * Outreachy + * flaky tests + * linting tools and rules + +--- + +## Agenda + +Extracted from **ctc-agenda** labelled issues and pull requests from the **nodejs org** prior to the meeting. + +### nodejs/node + +* doc: add ctc-review label information [#9072](https://github.com/nodejs/node/pull/9072) @Trott +* http: improve invalid character in header error message [#9010](https://github.com/nodejs/node/pull/9010) @evanlucas +* net: multiple listen() events fail silently [#8419](https://github.com/nodejs/node/pull/8419) @jasnell + +### nodejs/TSC + +* Consider folding TSC into CTC [#146](https://github.com/nodejs/TSC/issues/146) @rvagg + + +--- + +## Previous Meeting Review + +### nodejs/node + +* governance: expand use of CTC issue tracker [#8945](https://github.com/nodejs/node/pull/8945) + + * Finalize through GitHub discussions. + * Consider `ctc-review` label (#9072). + +* doc: add supported platforms list [#8922](https://github.com/nodejs/node/pull/8922) + + * Complete, remove from agenda. + +* net: multiple listen() events fail silently [#8419](https://github.com/nodejs/node/pull/8419) + + * Back to GitHub for further discussion. + +### nodejs/TSC + +* Consider folding TSC into CTC [#146](https://github.com/nodejs/TSC/issues/146) + +--- + +## Minutes + +### doc: add ctc-review label information [#9072](https://github.com/nodejs/node/pull/9072) @Trott + +@trott: Has landed. If any objections speak now. Goal is more resolutions within tracker, less in meetings. + +--- + +### http: improve invalid character in header error message [#9010](https://github.com/nodejs/node/pull/9010) @evanlucas + +@evanlucas: Concerns about this leading to an information leak, because header name is displayed. + +Would like to land this for v7. Would have to be merged today. + +@trott: Question is if people are uncomfortable moving forward now before information from @Chalker is available. + +@mhdawson: Seems there are already some hits (problems). + +@evanlucas: Package `http-node` had problems, seems they copied `_http_outgoing.js`. + +@evanlucas: Perhaps we can just add a debug message, that would not be semver-major. + +@mhdawson: Seems better to do that than introduce a semver-major change this late. + +@evanlucas: That seems fine, as long as we can get the needed info. + +@trott: So land the debug message now, perhaps land standard output in v8.x. + +**Next steps**: + +* Create new PR with debug-based message, defer including in stderr/stdout till v8.x. + +--- + +### net: multiple listen() events fail silently [#8419](https://github.com/nodejs/node/pull/8419) @jasnell + +@jasnell: Question is whether to land in v7.x. If so please take it up today! + +--- + +### Consider folding TSC into CTC [#146](https://github.com/nodejs/TSC/issues/146) @rvagg + +@trott: Mainly to bring this to people’s attention, continue conversation in tracker. + +--- + +### Info text in `--inspect` output [#8978](https://github.com/nodejs/node/pull/8978) + +@joshgav: Should we land this for v7.x? + +@trott: Is this a semver-major change? + +@jasnell: No, especially cause this is an experimental feature. + +@evanlucas: I’d prefer to wait till Chrome automatically lists Node.js targets via chrome://inspect, which is 55. + +@ofrobots: No urgency to land this change now and it will make it harder to get started. + +@mhdawson: Agreed, no urgency to land this before v7.x. + +@joshgav: So I’ll update PR to include generic URL but not remove the chrome-devtools URL for now. + +**Next steps**: + +* Josh to update PR to still include chrome-devtools URL. +* Consider removing chrome-devtools URL when 55 is released (early December). + +--- + +## Q/A on public channels + + +--- + +## Upcoming Meetings + +* CTC: 2016-10-26, 9am Pacific +* TSC: 2016-10-20, 1pm Pacific +* Build: 2016-10-24 (?) +* Diagnostics: first week of November +* Benchmarking: +* LTS: +* Post-Mortem: +* API: From 2a9fc7ccd36b769b16fa7195d2f1e1dabb177628 Mon Sep 17 00:00:00 2001 From: Josh Gavant Date: Thu, 27 Oct 2016 13:26:17 -0700 Subject: [PATCH 057/145] doc: add 2016-09-28 CTC meeting minutes PR-URL: https://github.com/nodejs/node/pull/9325 Reviewed-By: James M Snell Reviewed-By: Rich Trott --- doc/ctc-meetings/2016-09-28.md | 302 +++++++++++++++++++++++++++++++++ 1 file changed, 302 insertions(+) create mode 100644 doc/ctc-meetings/2016-09-28.md diff --git a/doc/ctc-meetings/2016-09-28.md b/doc/ctc-meetings/2016-09-28.md new file mode 100644 index 00000000000000..81f4fb4482f840 --- /dev/null +++ b/doc/ctc-meetings/2016-09-28.md @@ -0,0 +1,302 @@ +# Node Foundation CTC Meeting 2016-09-28 + +## Links + +* **Audio Recording**: TBP +* **GitHub Issue**: [#8802](https://github.com/nodejs/node/issues/8802) +* **Minutes Google Doc**: +* _Previous Minutes Google Doc_: + + +## Present + +* Anna Henningsen @addaleax (CTC) +* Сковорода Никита Андреевич @ChALkeR (CTC) +* Colin Ihrig @cjihrig (CTC) +* Evan Lucas @evanlucas (CTC) +* Jeremiah Senkpiel @Fishrock123 (CTC) +* Tracy Hinds @hackygolucky (observer/Node.js Foundation) +* Josh Gavant @joshgav (observer/Microsoft) +* Michael Dawson @mhdawson (CTC) +* Ali Ijaz Sheikh @ofrobots (CTC) +* Jenn Turner @renrutnnej (observer/Node.js Foundation) +* Rod Vagg @rvagg (CTC) +* Seth Thompson @s3ththompson (observer/Google) +* Myles Borins @TheAlphaNerd (CTC) +* Trevor Norris @trevnorris (CTC) +* Rich Trott @Trott (CTC) + + +## Standup + +* Anna Henningsen @addaleax (CTC) + * The usual, issues and PR reviews +* Сковорода Никита Андреевич @ChALkeR (CTC) + * Some issue and PR comments and reviews as usual. + * Some more work on docs linting. +* Colin Ihrig @cjihrig (CTC) + * Reviewing issues and PRs. + * Evan Lucas @evanlucas (CTC) + * v6.7.0 release + * More work on types eps +* Jeremiah Senkpiel @Fishrock123 (CTC) + * Issue / PR Review … general stuff + * Working towards ES Modules prototype implementations with Chris Dickinson +* Tracy Hinds @hackygolucky (observer/Node.js Foundation) + * getting the Outreachy info on website +* Josh Gavant @joshgav (observer/Microsoft) + * helping bring in some new MS contributors + * scheduled diag meeting for next week +* Michael Dawson @mhdawson (CTC) + * Finishing off PPC migration + * Fixing AIX issues when building from node-private + * Some work on ABI-stable node + * Misc PR review/lands + * Keeping up with issues + * Post-mortem nodereport review +* Brian White @mscdex (CTC) + * Worked on various performance improvements in node core + * Reviewed PRs, commented on issues +* Ali Ijaz Sheikh @ofrobots (CTC) + * Looking at node+V8 (5.5) integration build failures that seem related to recent parser improvements + * Investigating performance with the new interpreter + * Working with @matthewloring on FFI +* Jenn Turner @renrutnnej (observer/Node.js Foundation) + * No update, just observing +* Rod Vagg @rvagg (CTC) + * Security releases, supposed to be on vacation +* Seth Thompson @s3ththompson (observer/Google) + * async/await landed in V8 Tip of Tree. on track to ship with V8 5.5 + * expect a doc from V8 language team on promise hook API to allow microtask introspection in the near future +* Myles Borins @TheAlphaNerd (CTC) + * issue / pr review + * helping with security release + * backporting inspector + * auditing v4 backlog + * really have to get to that tap reporter + * coming up with outreachy mentor project +* Trevor Norris @trevnorris (CTC) + * AsyncHooks +* Rich Trott @Trott (CTC) + * mentoring more first-time contributors (via Node Todo) + * doc, test PRs + * ramping up a tiny bit on Build WG stuff, but just a tiny bit + + +## Agenda + +Extracted from **ctc-agenda** labelled issues and pull requests from the **nodejs org** prior to the meeting. + +### nodejs/CTC + +* Scheduling Meetings [#14](https://github.com/nodejs/CTC/issues/14) + +### nodejs/node + +* meta: update NODE_MODULE_VERSION to 51 [#8808](https://github.com/nodejs/node/pull/8808) +* General v7.0.0 / v6 LTS Planning / Discussion + + +## Previous Meeting Review + +* deps: update V8 to 5.4 [#8317](https://github.com/nodejs/node/pull/8317) +* Scheduling Meetings [#14](https://github.com/nodejs/CTC/issues/14) +* Decide on what problem points for ES Modules we care about the most. [#15](https://github.com/nodejs/CTC/issues/15) + + +## Minutes + +### Scheduling Meetings [ctc#14](https://github.com/nodejs/CTC/issues/14) + +@trott: This is a status report. Initial proposal was to dive in and start rotating meetings. Some were on board, some were concerned. Nikita started Google spreadsheet to figure things out. + +One proposal is to move back one hour (12pm Pacific) which would be a mild improvement for Ben and Nikita. + +Input received from NA and EU but not Asia and Australia. Once we have that information we can figure out what might work. + +--- + +### meta: update NODE_MODULE_VERSION to 51 [#8808](https://github.com/nodejs/node/pull/8808) + +`process.versions.modules` == 48 for v6.7.0. + +Set in build script, we bump this number for each semver-minor. We’d update to 49, but Electron has been bumping in between, so we need to go to 51. + +@thealphanerd: Had a way to do this in the past, but never landed a version of V8 on master [before a release]. So those using master cannot rely on this check. + +Proposal is to add this to master now and v7.x when released. But should we wait to bump till the actual release? + +@rvagg: If you’re using master, it’s been a bit “buyer beware” in the past. + +@thealphanerd: Node-pre-gyp uses the module version number to determine whether to pull the pre-built binary or to rebuild. So that’s causing problems. + +@ofrobots: Is there a disadvantage to doing this now? + +@rvagg: Doesn’t seem to be. + +@joshgav: Any concern that we’d have to bump again at v7.x release? + +@rvagg: We’ll just bump again. + +@addaleax: We should watch what Electron is doing cause they pull in every V8 version. + +@trevnorris: Could it happen that newer version of V8 has a lower module version number? + +@trott: if module version mapped to V8 version we could always be in sync. + +@ofrobots: Problem is that ABI is more than just V8. Also, we’re moving to a VM-neutral API/ABI in the future and that will remove the relationship to a V8 version. + +@rvagg: We should coordinate with Electron and draw from the same pool of numbers. + +@ofrobots: A good point for a bump would be when we bring a new V8 into master. + +@rvagg: This would make testing those nightlies easier. + +@trevnorris: Sounds to me that we can’t map reliably map a version of Node to a version of V8. So pulling from the same pool as Electron might be misleading to developers. If the number in Electron doesn’t match a Node version there would be a conflict. + +@rvagg: People are tracking which module versions map to what, so they could follow this too. + +@trevnorris: Maybe we can give Electron the minor numbers. + +@rvagg: NW.js also had a similar issue. + +@thealphanerd: Electron bumped to 5.1 in an ABI-breaking way, so we have two versions of Node ABIs out there, cause they needed to stay closer to Chromium. + +@rvagg: They don’t need to keep up with the latest version of V8. + +@thealphanerd: Let’s talk offline. + +@rvagg: Back to GitHub? Or do we need to decide now? + +@thealphanerd : PR has a lot of LGTMs, would like to see this land today or tomorrow so we can unbreak master. + +@ofrobots: Two points - one, what to do now; two, what to do going forward? + +Ali and Myles will work on a policy going forward. + +@rvagg: Might belong in LTS repo as we’ve been doing a lot of versioning stuff there. + +**Next steps**: + +* If there are objections raise them in the issue, otherwise ready to merge. + +--- + +### General v7.0.0 / v6 LTS Planning / Discussion + +@Fishrock123: Make sure all are in the loop. + +Throw v0.10 in too since it’s end of life at end of October. + +@rvagg: LTS map says *first* of October. Some people expect that cause the docs say that. + +@Fishrock123: We discussed keeping it alive till end of December like v0.12, cause that’s when OpenSSL is EOL’ed. + +@mhdawson: If the doc says Oct 1 what’s the downside to sticking with that? + +@rvagg: We may have communicated Oct 31 through some channels, so some people may expect that. + +Or perhaps when v7.x is first released. + +Having said that, it’s been >2 years, so people have had time to migrate. + +@rvagg: Originally 0.12 was slated for EOL in April 2017, we moved it back because of the OpenSSL issue. + +@Fishrock123: Official LTS policy is target date is when the next release/LTS is cut. That’s usually midway through month. + +@rvagg: Push to LTS WG to resolve ASAP. + +@rvagg: James pushing another beta later this week or early next week. + +@Fishrock123: v7.x is now on semver-major freeze. + +@rvagg: There are some semver-major commits in master which aren’t in v7 release. + +@Fishrock123: Might still need to update? Might have been left out by James intentionally? + +@thealphanerd: Not a ton of semver-major things on master. There are the V8 upgrades (patches), and a move of a method to fs/internal. + +Big one is npm@4 coming through the pipeline 1-2 weeks before Node release, should we include that. + +@rvagg: npm@3 had problems originally so we delayed. Should we do the same for npm@4? + +@addaleax: I’d feel comfortable with landing it. Kat said they aren’t concerned if 4 is included now or not. + +@Fishrock123: Things which are deprecated in v4 will still be deprecated (not removed) in v5, so we could bump all the way to v5 in a later release. + +@rvagg: We don’t have to synchronize all these dates to one, we can be flexible if needed. + +@thealphanerd: If we have a date other than late October it might be a good idea to offer a date. + +@ofrobots: Tentatively Oct 18 is the target stable date for V8 5.4. As tentative as usual, not clear till the last moment. Low chance that V8 will be moving a lot around Oct 18. Haven’t seen this date slip by more than 1-2 days. Very low chance that V8 will destablizie us. + +@thealphanerd: Oct 25 as a tentative date for v7.x? + +@rvagg: Ali and Seth, what’s the risk of setting that date now? + +@ofrobots: Close to Oct 18 I can highlight any potential risk. + +@rvagg: Let’s say that - 25th is tentative date, we’ll communicate if there’s any change. Any objections? (No.) + +That will also be the day we switch v6 to LTS. + +@thealphanerd: Doing release of v6 LTS earlier might be helpful so we have that out of the way for potential v7 issues. + +@rvagg: Discussion on this will move to LTS WG. Join the LTS WG on Monday to discuss. + +@thealphanerd: Could use someone to be responsible for v6 LTS, please volunteer. + +@rvagg: It’s been helpful to have a single person for v4 LTS, but we need to find a model that scales in the future. + +@Fishrock123: Would be helpful to schedule LTS a week earlier to avoid problems. + +--- + +### Supported platforms proposal from Build WG [#488](https://github.com/nodejs/build/issues/488) + +Current proposal: + +@trott should make a CTC agenda item next week? + +@rvagg: Give input on that issue before it comes to CTC. Build WG must review and sign off on as well. + +@rvagg: Some discussion about tiers, this affects OS vendors. + +--- + +### Other + +@thealphanerd: Node.js is going to be working with Outreachy project to help people from underrepresented groups get involved. + +We need projects for these people to work on in 3 months. If you can think of good parts of the project to assign… would love to hear your suggestions. + +@rvagg: GitHub thread? + +@hackygolucky: I’ll create a new one and ping @nodejs/collaborators. + +@rvagg: Are we getting a satisfactory response on the call for mentors? + +@hackygolucky: 5 primary mentors and a number of supplementals. 4 sponsors, which means we can accept 4 mentees. + +@rvagg: If someone wants to be a supplemental is that still open? + +@hackygolucky: Thread is still open: https://github.com/nodejs/education/issues/7 + +--- + +## Q/A on public channels + +None. + +--- + +## Upcoming Meetings + +* CTC: 2016-10-05 +* TSC: 2016-10-06 +* Build: 2016-10-11 +* Diagnostics: 2016-10-05, 12pm Pacific +* Benchmarking: +* LTS: 2016-10-03 +* Post-Mortem: +* API: From 925a51b6a54f0d77da4d8d75b466f4eeafe93991 Mon Sep 17 00:00:00 2001 From: Josh Gavant Date: Thu, 27 Oct 2016 13:18:08 -0700 Subject: [PATCH 058/145] doc: add 2016-10-05 CTC meeting minutes PR-URL: https://github.com/nodejs/node/pull/9326 Reviewed-By: James M Snell Reviewed-By: Rich Trott --- doc/ctc-meetings/2016-10-05.md | 311 +++++++++++++++++++++++++++++++++ 1 file changed, 311 insertions(+) create mode 100644 doc/ctc-meetings/2016-10-05.md diff --git a/doc/ctc-meetings/2016-10-05.md b/doc/ctc-meetings/2016-10-05.md new file mode 100644 index 00000000000000..1db805e235aabd --- /dev/null +++ b/doc/ctc-meetings/2016-10-05.md @@ -0,0 +1,311 @@ +# Node Foundation CTC Meeting 2016-10-05 + +## Links + +* **Audio Recording**: TBP +* **GitHub Issue**: [#8915](https://github.com/nodejs/node/issues/8915) +* **Minutes Google Doc**: +* _Previous Minutes Google Doc_: + + +## Present + +* Anna Henningsen @addaleax (CTC) +* Bradley Meck @bmeck (observer/GoDaddy/TC39) +* Colin Ihrig @cjihrig (CTC) +* Evan Lucas @evanlucas (CTC) +* Jeremiah Senkpiel @Fishrock123 (CTC) +* Tracy Hinds @hackygolucky (observer/Node.js Foundation) +* Michael Dawson @mhdawson (CTC) +* Julien Gilli @misterdjules (CTC) +* Mikeal Rogers @mikeal (observer/Node.js Foundation) +* Jenn Turner @renrutnnej (observer/Node.js Foundation) +* Rod Vagg @rvagg (CTC) +* Seth Thompson @s3ththompson (observer/Google) +* Myles Borins @TheAlphaNerd (CTC) +* Sakthipriyan Vairamani @thefourtheye (observer) +* Trevor Norris @trevnorris (CTC) +* Rich Trott @Trott (CTC) +* Josh Gavant @joshgav (observer/Microsoft) + + +## Standup + +* Anna Henningsen @addaleax (CTC) + * Nothing noteworthy +* Bradley Meck @bmeck (observer/GoDaddy/TC39) + * Went to TC39, got late linking and re-linking fully discussed + * Working on live named imports talks and spec changes +* Colin Ihrig @cjihrig (CTC) + * Reviewing of issues and PRs. +* Evan Lucas @evanlucas (CTC) + * Worked a little on improving the commit linter + * Submitted a PR improving process.nextTick perf by 10-20% in some cases +* Jeremiah Senkpiel @Fishrock123 (CTC) + * merged existsSync undeprecation + * other PRs & Issues +* Tracy Hinds @hackygolucky (observer/Node.js Foundation) + * Outreachy application drive, issue open in the CTC repo + * Met last week to talk about code & lean @ Austin event +* Michael Dawson @mhdawson (CTC) + * Miscellaneous PR review + * fix a v8 test issue + * ABI Stable API meeting, reviews, discussion + * Closed out PPC migration +* Julien Gilli @misterdjules (CTC) + * Investigated SmartOS-specific issues. +* Mikeal Rogers @mikeal (observer/Node.js Foundation) + * Working on new budget for 2017 for the NF + * @ TC39 last week, very productive, looking for a way to be involved longer-term +* Brian White @mscdex (CTC) + * Continued work on various optimizations in core + * Submitted a few misc. cleanup PRs + * Reviewed PRs, commented on issues +* Jenn Turner @renrutnnej (observer/Node.js Foundation) + * No update, observing +* Rod Vagg @rvagg (CTC) + * Little build of build, little bit of LTS, little bit of NF work +* Seth Thompson @s3ththompson (observer/Google) + * async await on track to ship + * V8 inspector work ongoing +* Steven R Loomis @srl295 (observer/IBM/ICU) + * Regrets for today (and out next week) - ICU 58 will be out in a couple of weeks and will have an updated PR at that time… +* Myles Borins @TheAlphaNerd (CTC) + * v4.x backporting + * define outreachy project + * fix regressions in citgm + * work on new communication plan for LTS dates +* Sakthipriyan Vairamani @thefourtheye (observer) + * was sick for much of the week, so not much to report +* Trevor Norris @trevnorris (CTC) + * Fix performance regressions from async hooks + * Almost finished bringing PR compliant with EP. Soon tests and proper API documentation will follow. + * Engaged with the V8 team regarding the MicrotaskQueue API (https://bugs.chromium.org/p/v8/issues/detail?id=4643#c19) +* Rich Trott @Trott (CTC) + * CTC meeting rotation proposal + * 2FA for Collaborators + * miscellaneous issue tracker/commit activity +* Josh Gavant @joshgav (observer) + * time away + * diagnostics WG meeting + + +## Agenda + +Extracted from **ctc-agenda** labelled issues and pull requests from the **nodejs org** prior to the meeting. + +### nodejs/node + +* doc: add supported platforms list [#8922](https://github.com/nodejs/node/pull/8922) +* Intl: Consider deprecating Intl.v8BreakIterator [#8865](https://github.com/nodejs/node/issues/8865) +* net: multiple listen() events fail silently [#8419](https://github.com/nodejs/node/pull/8419) + +### nodejs/CTC + +* Scheduling Meetings [#14](https://github.com/nodejs/CTC/issues/14) + + +## Previous Meeting Review + +* Scheduling Meetings [#14](https://github.com/nodejs/CTC/issues/14) +* meta: update NODE_MODULE_VERSION to 51 [#8808](https://github.com/nodejs/node/pull/8808) + * If there are objections raise them in the issue, otherwise ready to merge. +* General v7.0.0 / v6 LTS Planning / Discussion + + +## Minutes + +### doc: add supported platforms list [#8922](https://github.com/nodejs/node/pull/8922) + +@johanbergstrom put this together in collaboration with libuv and v8 teams. + +@rvagg: Has everyone reviewed that would like to? + +We rely on a few dependencies that make us who we are — most importantly V8 and libuv. We therefore need to adopt their supported platforms and potentially add to their lists based on test and/or release coverage. + +@trott: Do we mean that we support whatever they support? + +@Fishrock123: Could be clarified. Intent is that we must start with what they offer and anything additional falls to us (Node). + +@rvagg: Our supported platform list is narrower than that of libuv and v8. + +@?: It should say we’re a subset due to the constraints. + +@rvagg: Removing that might be the way to go. + +Any objections to list as it stands? + +Applies to v6, probably the same for v7. Will need to be changed for v4. + +If there are concerns, raise in issue. + +**Next steps**: + +* Raise any concerns in issue. + +--- + +### Intl: Consider deprecating Intl.v8BreakIterator [#8865](https://github.com/nodejs/node/issues/8865) + +Want to move to a different API: `Intl.Segmentor`, so want to deprecate this one. + +@mikeal: We need to discourage community from using this API so we can move to a more standards-compliant implementation. + +@rvagg: We expose this API because V8 exposes it. + +@bmeck: APIs exposed by V8 can be removed… + +@rvagg: New API is before TC-39, could take a while. Also, what is the timeframe for removal? + +Is it possible this will be removed in 5.5 or 5.6, which may land in Node v7.x, in which case it would be a breaking change we’d have to polyfill. + +Or will it be removed later and we can include it in Node v8.x. + +@mikeal: V8 (Daniel) wants to remove this as soon as possible, but depends on TC-39. + +@bmeck: Also some small percentage of web uses this so not able to completely remove yet anyway. + +@seththompson: We wait till stage 3 at TC-39 to implement. As far as removing v8BreakIterator, we don’t necessarily rely on usage. + +Will investigate this further with Daniel. + +@rvagg: No problem with removing it, but need a signal as to when it will be removed. + +@seththompson: Dan is out of office through next week. + +**Next steps**: + +* Continue discussion in GitHub. + +--- + +### net: multiple listen() events fail silently [#8419](https://github.com/nodejs/node/pull/8419) + +see also: + +@jasnell added this item, would be a semver-major change, can it be landed in v7. + +@rvagg: Adds error message when `.listen()` is called twice, EADDRINUSE. + +@addaleax: (#8294)[https://github.com/nodejs/node/pull/8294] documented that .listen() twice restarts the server. Does that conflict with this? + +@Fishrock123: When `close()` is called it resets the listen listener to `false`. + +@rvagg: Is this the only way to close? + +@addaleax: Might be… + +@rvagg: Will keep on agenda for James to discuss. + +@Fishrock123: Is anyone opposed to this? + +@evanlucas: Have we tested against the ecosystem? + +No, but it’s a poor usage anyway. + +@trott: delay until next week when James is here. + +@trevnorris: If you run this twice on the same server object, it overwrites the `_handle` property, orphaning the original handle. + +@mhdawson: Do they get a new handle to use? + +@trott: Put this into the issue. + +**Next steps**: + +* Discuss again next week. + +--- + +### Scheduling Meetings [#14](https://github.com/nodejs/CTC/issues/14) + +@trott: All possibilities are bad. Choosing the best of bad options. Hope to give proposed schedule a shot for 4 weeks and then evaluate. Or should we shoot this down and move on? + +@rvagg: To start next week, Oct 12? + +@trott: Yes. + +@rvagg: Any objections to next week: UTC 4:00pm, US Pacific 9am, US East 12 noon. + +Better for Europe and India. + +No. + +Next steps: + +* Do next week at new time. + +--- + +### General v7.0.0 / v6 LTS Planning / Discussion + +LTS group agreed to put out v6 LTS week of 10/17. + +Week after would be v7 final. + +@thealphanerd: We should do a release the week before v6 LTS to include all semver-minor changes we want in. + +@Fishrock123 will manage this release next week (10/10). + +@rvagg will manage v6 LTS the week after (10/17). + +@rvagg: What is status on V8 5.4 for 10/18? + +@seththompson: @ofrobots to confirm, no known problems. + +@rvagg: Still looking for someone to handle backports and releases for v6 LTS. + +@Fishrock123: We could switch Myles to v6 and someone else can pick up v4. + +@thealphanerd: As long as v4 is still “active” we have to go through everything. Some discussion of how to automate process. + +There will be more backports to v6, but also that stuff will be a lot clearer, if it can be backported. + +Would be good to come up with a better process for how things end up in staging. Instead of getting everything in there in the last minute. + +@Fishrock123: I disagree that if v4 is active it needs to have the same amount of activity all the way through. There has been an understanding that it would get more and more difficult to backport features, focus only on backporting security fixes. + +@thealphanerd: I found non-trivial number of items which would’ve been missed by automation. + +I’m a little bit uncomfortable with not auditing everything. Things that would get missed are more important than they sometimes seem. + +Myles, Evan, and Jeremiah to discuss tooling to help make auditing less work. + +@rvagg: Need to resolve Intl.v8BreakIterator for v7 - if we need to deprecate or remove it would be good to do so now. + +@SethThompson: Plan is to not deprecate anything until Intl.Segmentor reaches more conclusiveness in TC-39. But team would be fine if Node deprecates sooner. + +Current open issues for v7: https://github.com/nodejs/node/milestone/15 + +@rvagg: We won’t have OpenSSL 1.1.0 in Node in the near future, but it may be possible to compile against it. This isn’t a blocker for v7, doesn’t require semver-major. + +@rvagg: Should we ship another version of 0.10 with npm updated to include updated license? Comment in LTS WG. + +--- + +## Q/A on public channels + +Alex: Can we get a comment on stability of v6 at this point? + +@rvagg: We’ll have a standard v6 release next Tuesday, and the following Tuesday we’ll drop to LTS and stability push will start. Expect it to be as stable as the v4 releases. + +If you’re planning to move to v6 LTS, it’s worth testing now. + +@Fishrock123: Not many new features in next week’s v6.x.x release. Some regressions early in v6 lifecycle, none now. + +@evanlucas: Regression in inspector. + +@rvagg: Inspector is still marked experimental for now. That may change in the v6 lifetime. But for now it shouldn’t be treated as stable as the other features. + +--- + +## Upcoming Meetings + +* CTC: 2016-10-12, 9am Pacific +* TSC: 2016-10-06, 1pm Pacific +* Build: 2016-10-11 +* Diagnostics: first week of November +* Benchmarking: +* LTS: 2016-10-17 +* Post-Mortem: +* API: From 4c4b0f7a0ed7aa9177215988463e2aca7204f419 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 28 Oct 2016 15:37:48 -0700 Subject: [PATCH 059/145] doc: add 2016-10-26 CTC meeting minutes PR-URL: https://github.com/nodejs/node/pull/9348 Reviewed-By: James M Snell --- doc/ctc-meetings/2016-10-26.md | 151 +++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 doc/ctc-meetings/2016-10-26.md diff --git a/doc/ctc-meetings/2016-10-26.md b/doc/ctc-meetings/2016-10-26.md new file mode 100644 index 00000000000000..ed8f8fee78a1bf --- /dev/null +++ b/doc/ctc-meetings/2016-10-26.md @@ -0,0 +1,151 @@ +# Node Foundation CTC Meeting 2016-10-26 + +## Links + +* **Audio Recording**: TBP +* **GitHub Issue**: +[#9261](https://github.com/nodejs/node/issues/9261) +* **Minutes Google Doc**: +* _Previous Minutes Google Doc: _ + + +## Present + +* Anna Henningsen @addaleax (CTC) +* Bradley Meck @bmeck (observer/GoDaddy/TC39) +* Ben Noordhuis @bnoordhuis (CTC) +* Сковорода Никита Андреевич @ChALkeR (CTC) +* Colin Ihrig @cjihrig (CTC) +* Evan Lucas @evanlucas (CTC) +* James M Snell @jasnell (CTC) +* Brian White @mscdex (CTC) +* Ali Ijaz Sheikh @ofrobots (CTC) +* Seth Thompson @s3ththompson (observer/Google) +* Shigeki Ohtsu @shigeki (CTC) +* Sakthipriyan Vairamani @thefourtheye (observer) +* Rich Trott @Trott (CTC) + + +## Standup + +* Anna Henningsen @addaleax (CTC) + * Not much +* Bradley Meck @bmeck (observer/GoDaddy/TC39) + * Work on making inspector work w/ vm + * Minor talks w/ modules spec authors +* Ben Noordhuis @bnoordhuis (CTC) + * (Nothing reported.) +* Сковорода Никита Андреевич @ChALkeR (CTC) + * Rebuilt a new dataset from npm packages, some further work on the tooling + * Some issue/pr comments as usual + * Some ecosystem security stuff +* Colin Ihrig @cjihrig (CTC) + * Reviewing issues and PRs, opened a few PRs, libuv 1.10.0 update +* Evan Lucas @evanlucas (CTC) + * Working on getting libuv to use fsevents for file watching on OS X + * Opened small PR to fix a test that kept failing on freebsd +* James M Snell @jasnell (CTC) + * Getting v7.0.0 out the door + * PRs + * More work on HTTP/2 +* Brian White @mscdex (CTC) + * Continued working on string encoding/decoding performance. Starting to see even more promising results. + * Reviewed PRs, commented on issues +* Ali Ijaz Sheikh @ofrobots (CTC) + * Not much +* Seth Thompson @s3ththompson (observer/Google) + * V8 5.5 beta shipped with async/await +* Shigeki Ohtsu @shigeki (CTC) + * Reviewed a few PR and made a security assessments of CVE-2016-8610 for Node-v0.10 and 0.12. +* Sakthipriyan Vairamani @thefourtheye (observer) + * Held an event to help people to get their first contribution into Node.js + * Looking at V8 code base +* Rich Trott @Trott (CTC) + * Outreachy, Node Todo, Node Interactive prep + * test and tools PRs + * usual PR review/commenting + + +--- + + +## Agenda + + +Extracted from **ctc-agenda** labelled issues and pull requests from the **nodejs org** prior to the meeting. + + +### nodejs/TSC + + +* Consider folding TSC into CTC [#146](https://github.com/nodejs/TSC/issues/146) + + +### nodejs/node + + +* Debugging: name every function +[#8913]https://github.com/nodejs/node/issues/8913 + + +--- + + +## Previous Meeting Review + + +Extracted from **ctc-agenda** labelled issues and pull requests from the **nodejs org** prior to the meeting. + + +### nodejs/node + + +* doc: add ctc-review label information [#9072](https://github.com/nodejs/node/pull/9072) @Trott +* http: improve invalid character in header error message [#9010](https://github.com/nodejs/node/pull/9010) @evanlucas +* net: multiple listen() events fail silently [#8419](https://github.com/nodejs/node/pull/8419) @jasnell + + +### nodejs/TSC + + +* Consider folding TSC into CTC [#146](https://github.com/nodejs/TSC/issues/146) @rvagg + + +--- + + +## Minutes + + +### Consider folding TSC into CTC + + +Rich: Defer until Rod is here and have the conversation in the issue tracker until then? + + +James: Makes sense. Also, TSC call is tomorrow so it can be discussed then. + + +### Debugging: name every function + + +Rich: It seemed like a good idea initially, but it is not clear if it is a good thing in all cases (some +, some -). Issue is marked as good first contribution which means lots of new contributors are coming in. +Myles wanted a quick resolution, but it is not clear there is a quick resolution. Someone needs to sit down and come up with a list of cases where it would be beneficial + + +Brian: Prototype functions? + + +Rich: That is a case where it doesn't add value but doesn't hurt either. There are other cases where it does remove information. + + +Sakthipriyan: One example was fs.readFileSync.. + + +Brian: V8 may also be inferring names from a variable in cases when you do `let a = () => {...}`. Another case to take into consideration. + + +Rich: Move back to the issue tracker; remove 'good-first-contribution' label until we have documented what should/shouldn't be done. I can work with someone, or come up with documentation. + + +Floor: General agreement? Yes, general agreement. From 1b792742e8435a50080781822d48eb9ecf51e663 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Thu, 3 Nov 2016 07:41:40 +1100 Subject: [PATCH 060/145] doc: add Sakthipriyan to the CTC PR-URL: https://github.com/nodejs/node/pull/9427 Reviewed-By: Myles Borins Reviewed-By: Evan Lucas Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: Jeremiah Senkpiel Reviewed-By: Johan Bergstrom --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d15916e2ff09c5..caf0d24d48cf08 100644 --- a/README.md +++ b/README.md @@ -186,6 +186,8 @@ more information about the governance of the Node.js project, see **Shigeki Ohtsu** <ohtsu@iij.ad.jp> * [TheAlphaNerd](https://github.com/TheAlphaNerd) - **Myles Borins** <myles.borins@gmail.com> +* [thefourtheye](https://github.com/thefourtheye) - +**Sakthipriyan Vairamani** <thechargingvolcano@gmail.com> * [trevnorris](https://github.com/trevnorris) - **Trevor Norris** <trev.norris@gmail.com> * [Trott](https://github.com/Trott) - @@ -319,8 +321,6 @@ more information about the governance of the Node.js project, see **Michaël Zasso** <targos@protonmail.com> * [tellnes](https://github.com/tellnes) - **Christian Tellnes** <christian@tellnes.no> -* [thefourtheye](https://github.com/thefourtheye) - -**Sakthipriyan Vairamani** <thechargingvolcano@gmail.com> * [thekemkid](https://github.com/thekemkid) - **Glen Keane** <glenkeane.94@gmail.com> * [thlorenz](https://github.com/thlorenz) - From 4f2523697c54b36cd332de23e8193bdc56564c32 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Sat, 5 Nov 2016 15:37:36 +0100 Subject: [PATCH 061/145] doc: fix link to cli.md in vm.md Looks like the link to cli.md is missing in vm.md: https://nodejs.org/api/vm.html#vm_vm_runindebugcontext_code Added the link which can be verified by using the following commands: $ make doc $ open out/doc/api/vm.html PR-URL: https://github.com/nodejs/node/pull/9481 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- doc/api/vm.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/vm.md b/doc/api/vm.md index be3a490336b62b..a62923c2a1a317 100644 --- a/doc/api/vm.md +++ b/doc/api/vm.md @@ -297,7 +297,7 @@ console.log(Debug.findScript(process.exit).name); // 'internal/process.js' implementation and may change (or even be removed) without prior warning. The `Debug` object can also be made available using the V8-specific -`--expose_debug_as=` [command line option][cli.md]. +`--expose_debug_as=` [command line option][]. ## vm.runInNewContext(code[, sandbox][, options]) -The `process.setuid(id) method sets the user identity of the process. (See +The `process.setuid(id)` method sets the user identity of the process. (See setuid(2).) The `id` can be passed as either a numeric ID or a username string. If a username is specified, the method blocks while resolving the associated numeric ID. @@ -1720,3 +1720,5 @@ cases: [Readable]: stream.html [Child Process]: child_process.html [Cluster]: cluster.html +[`process.exitCode`]: #processexitcode-1 +[LTS]: https://github.com/nodejs/LTS/ From a46c02746acfb2ef60c6c5c28f566247dda9dd2d Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 22 Oct 2016 16:21:34 +0200 Subject: [PATCH 068/145] test: move flaky test to test/pummel Move sequential/test-crypto-timing-safe-equal-benchmarks to test/pummel because it fails for me locally quite frequently and because it takes about five or six seconds to complete, which is too long for a test in test/sequential. Fixes: https://github.com/nodejs/node/issues/8744 PR-URL: https://github.com/nodejs/node/pull/9241 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: not-an-aardvark --- .../test-crypto-timing-safe-equal-benchmarks.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/{sequential => pummel}/test-crypto-timing-safe-equal-benchmarks.js (100%) diff --git a/test/sequential/test-crypto-timing-safe-equal-benchmarks.js b/test/pummel/test-crypto-timing-safe-equal-benchmarks.js similarity index 100% rename from test/sequential/test-crypto-timing-safe-equal-benchmarks.js rename to test/pummel/test-crypto-timing-safe-equal-benchmarks.js From 18a235b9a7bad1eebc2f7a85eb99ff75696e1acd Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 22 Oct 2016 16:27:13 +0200 Subject: [PATCH 069/145] test: make flaky pummel test more reliable Increase the number of iterations from 1e4 to 1e5. Makes the test pass for me locally when previously it would fail 9 out of 10 times because the running time was not enough to smooth away the outliers. Fixes: https://github.com/nodejs/node/issues/8744 PR-URL: https://github.com/nodejs/node/pull/9241 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: not-an-aardvark --- test/pummel/test-crypto-timing-safe-equal-benchmarks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/pummel/test-crypto-timing-safe-equal-benchmarks.js b/test/pummel/test-crypto-timing-safe-equal-benchmarks.js index de46a899f263f5..5560a4a256b5fe 100644 --- a/test/pummel/test-crypto-timing-safe-equal-benchmarks.js +++ b/test/pummel/test-crypto-timing-safe-equal-benchmarks.js @@ -28,7 +28,7 @@ function runOneBenchmark(...args) { } function getTValue(compareFunc) { - const numTrials = 10000; + const numTrials = 1e5; const bufSize = 10000; // Perform benchmarks to verify that timingSafeEqual is actually timing-safe. From 1d79af65255340a1d1db234b56cce0993b171e8a Mon Sep 17 00:00:00 2001 From: Oliver Salzburg Date: Tue, 18 Oct 2016 22:02:19 +0200 Subject: [PATCH 070/145] test: case sensitivity of env variables Environment variables should be treated case-insensitive on Windows platforms and case-sensitive on UNIX platforms. This commit ensures this behavior persists. Reviewed-By: Benjamin Gruenbaum Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca PR-URL: https://github.com/nodejs/node/pull/9166 Fixes: https://github.com/nodejs/node/issues/9157 --- test/parallel/test-process-env.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-process-env.js b/test/parallel/test-process-env.js index d3b1682629a537..21898d19425ca3 100644 --- a/test/parallel/test-process-env.js +++ b/test/parallel/test-process-env.js @@ -1,6 +1,6 @@ 'use strict'; -require('../common'); +const common = require('../common'); const assert = require('assert'); // changes in environment should be visible to child processes @@ -67,3 +67,17 @@ assert.equal(3, date.getUTCHours()); assert.equal(5, date.getHours()); */ /* eslint-enable max-len */ + +// Environment variables should be case-insensitive on Windows, and +// case-sensitive on other platforms. +process.env.TEST = 'test'; +assert.strictEqual(process.env.TEST, 'test'); +// Check both mixed case and lower case, to avoid any regressions that might +// simply convert input to lower case. +if (common.isWindows) { + assert.strictEqual(process.env.test, 'test'); + assert.strictEqual(process.env.teST, 'test'); +} else { + assert.strictEqual(process.env.test, undefined); + assert.strictEqual(process.env.teST, undefined); +} From 6f212b910b7976e45add0c73d80fed9e27c73130 Mon Sep 17 00:00:00 2001 From: Oliver Salzburg Date: Tue, 18 Oct 2016 18:48:44 +0200 Subject: [PATCH 071/145] doc: mention case-insensitive env on windows On Windows OS, environment variables are case-insensitive and are treated likewise in NodeJS. This can be confusing and can lead to hard-to-debug problems when moving code from one environment to another. Reviewed-By: Benjamin Gruenbaum Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca PR-URL: https://github.com/nodejs/node/pull/9166 Fixes: https://github.com/nodejs/node/issues/9157 --- doc/api/process.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/api/process.md b/doc/api/process.md index 2ce9f5f1619267..15e0ecedc372e7 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -708,6 +708,16 @@ console.log(process.env.TEST); // => undefined ``` +On Windows operating systems, environment variables are case-insensitive. + +Example: + +```js +process.env.TEST = 1; +console.log(process.env.test); +// => 1 +``` + ## process.emitWarning(warning[, name][, ctor]) -Node.js has a simple module loading system. In Node.js, files and modules are -in one-to-one correspondence. As an example, `foo.js` loads the module -`circle.js` in the same directory. +Node.js has a simple module loading system. In Node.js, files and modules +are in one-to-one correspondence (each file is treated as a separate module). +As an example, `foo.js` loads the module `circle.js` in the same directory. The contents of `foo.js`: From ae3ce7ff602c6b29979fb49608270abb1d24df46 Mon Sep 17 00:00:00 2001 From: Olan Byrne Date: Sat, 8 Oct 2016 15:46:52 +0100 Subject: [PATCH 073/145] doc: clarify buffer toString docs. Fixes: https://github.com/nodejs/node/issues/8971 PR-URL: https://github.com/nodejs/node/pull/8984 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- doc/api/buffer.md | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 42390b6d31ba00..df0a2a357d0836 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -1811,12 +1811,13 @@ added: v0.1.90 --> * `encoding` {String} The character encoding to decode to. **Default:** `'utf8'` -* `start` {Integer} Where to start decoding. **Default:** `0` -* `end` {Integer} Where to stop decoding (not inclusive). **Default:** [`buf.length`] +* `start` {Integer} The byte offset to start decoding at. **Default:** `0` +* `end` {Integer} The byte offset to stop decoding at (not inclusive). + **Default:** [`buf.length`] * Return: {String} -Decodes `buf` to a string according to the specified character encoding in `encoding`. -`start` and `end` may be passed to decode only a subset of `buf`. +Decodes `buf` to a string according to the specified character encoding in +`encoding`. `start` and `end` may be passed to decode only a subset of `buf`. Examples: @@ -1829,19 +1830,22 @@ for (var i = 0 ; i < 26 ; i++) { } // Prints: abcdefghijklmnopqrstuvwxyz -console.log(buf.toString('ascii')); +console.log(buf1.toString('ascii')); // Prints: abcde -console.log(buf.toString('ascii', 0, 5)); +console.log(buf1.toString('ascii', 0, 5)); const buf2 = Buffer.from('tést'); -// Prints: tés -console.log(buf.toString('utf8', 0, 3)); +// Prints: 74c3a97374 +console.log(buf2.toString('hex')); + +// Prints: té +console.log(buf2.toString('utf8', 0, 3)); -// Prints: tés -console.log(buf.toString(undefined, 0, 3)); +// Prints: té +console.log(buf2.toString(undefined, 0, 3)); ``` ### buf.toJSON() From adee93962a9b928fa925b91992fe62cac038458f Mon Sep 17 00:00:00 2001 From: "Ryan Scheel (Havvy)" Date: Sat, 1 Oct 2016 00:56:16 +0000 Subject: [PATCH 074/145] doc: more realistic custom inspect example Changes the custom inspect example to a more complex object that actually uses the parameters of the custom inspect function. I specifically chose a wrapper of a value called a "Box" that inspects to "Box < inner_inspect_value >". I also want there to be documentation explaining what the code is actually doing. E.g., the padding replacement part is to make the inspected value line up properly when multi-line inputs are given. I also went with having a space between the Box's brackets and the inner value because it matches how objects work, and that should definitely be listed as a convention somewhere in here. Also, the convention to shorten only when depth is less than 0, not e.g. at 0. But I don't know how to write the documentation for that, so I'm leaving that to somebody who reads this message. Ref: https://github.com/nodejs/node/issues/8442 PR-URL: https://github.com/nodejs/node/pull/8875 Reviewed-By: Evan Lucas Reviewed-By: James M Snell Reviewed-By: Anna Henningsen --- doc/api/util.md | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/doc/api/util.md b/doc/api/util.md index 3ffefa3f87fe31..57ed7269f68b87 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -286,13 +286,31 @@ invoke and use the result of when inspecting the object: ```js const util = require('util'); -const obj = { name: 'nate' }; -obj[util.inspect.custom] = function(depth) { - return `{${this.name}}`; -}; +class Box { + constructor(value) { + this.value = value; + } -util.inspect(obj); - // "{nate}" + inspect(depth, options) { + if (depth < 0) { + return options.stylize('[Box]', 'special'); + } + + const newOptions = Object.assign({}, options, { + depth: options.depth === null ? null : options.depth - 1 + }); + + // Five space padding because that's the size of "Box< ". + const padding = ' '.repeat(5); + const inner = util.inspect(this.value, newOptions).replace(/\n/g, '\n' + padding); + return options.stylize('Box', 'special') + '< ' + inner + ' >'; + } +} + +const box = new Box(true); + +util.inspect(box); + // "Box< true >" ``` Custom `[util.inspect.custom](depth, opts)` functions typically return a string From 07d34f98b2367e475c665656620ffc26628ad4ae Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Wed, 26 Oct 2016 13:40:15 -0700 Subject: [PATCH 075/145] tools: remove dangling eslint symlink The tools/eslint/node_modules/.bin/eslint symlink was unused by node, but was present, and pointed at a non-existent file. This causes problems for tooling. Reviewed-By: Sam Roberts Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig PR-URL: https://github.com/nodejs/node/pull/9299 --- tools/eslint/node_modules/.bin/eslint | 1 - 1 file changed, 1 deletion(-) delete mode 120000 tools/eslint/node_modules/.bin/eslint diff --git a/tools/eslint/node_modules/.bin/eslint b/tools/eslint/node_modules/.bin/eslint deleted file mode 120000 index 810e4bcb32af34..00000000000000 --- a/tools/eslint/node_modules/.bin/eslint +++ /dev/null @@ -1 +0,0 @@ -../eslint/bin/eslint.js \ No newline at end of file From 210ae5607c1c0d5eb30815a1782af9e474e74259 Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Mon, 24 Oct 2016 08:53:42 -0700 Subject: [PATCH 076/145] test: prevent workers outliving parent test-child-process-pass-fd.js parent can exit with an error on failure to fork, in which case it will leak child processes. Limit child lifetime to that of parent. Fixes: https://github.com/nodejs/node/issues/9255 PR-URL: https://github.com/nodejs/node/pull/9257 Reviewed-By: Gibson Fahnestock Reviewed-By: Michael Dawson Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- test/sequential/test-child-process-pass-fd.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/sequential/test-child-process-pass-fd.js b/test/sequential/test-child-process-pass-fd.js index c1d115f9a9db29..404ae854a15953 100644 --- a/test/sequential/test-child-process-pass-fd.js +++ b/test/sequential/test-child-process-pass-fd.js @@ -39,15 +39,23 @@ if (process.argv[2] !== 'child') { process.send('handle', socket); } + // As a side-effect, listening for the message event will ref the IPC channel, + // so the child process will stay alive as long as it has a parent process/IPC + // channel. Once this is done, we can unref our client and server sockets, and + // the only thing keeping this worker alive will be IPC. This is important, + // because it means a worker with no parent will have no referenced handles, + // thus no work to do, and will exit immediately, preventing process leaks. + process.on('message', function() {}); + const server = net.createServer((c) => { process.once('message', function(msg) { assert.strictEqual(msg, 'got'); c.end('hello'); }); socketConnected(); - }); + }).unref(); server.listen(0, common.localhostIPv4, () => { const port = server.address().port; - socket = net.connect(port, common.localhostIPv4, socketConnected); + socket = net.connect(port, common.localhostIPv4, socketConnected).unref(); }); } From f64d93f1980ed7d80dbc4138ed43a51acbded188 Mon Sep 17 00:00:00 2001 From: "Italo A. Casas" Date: Mon, 26 Sep 2016 22:45:56 -0400 Subject: [PATCH 077/145] test: writable stream finished state Add a test for _writableState.finished. PR-URL: https://github.com/nodejs/node/pull/8791 Reviewed-By: Colin Ihrig Reviewed-By: Matteo Collina Related: https://github.com/nodejs/node/issues/8686 --- .../test-stream-writable-finished-state.js | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/parallel/test-stream-writable-finished-state.js diff --git a/test/parallel/test-stream-writable-finished-state.js b/test/parallel/test-stream-writable-finished-state.js new file mode 100644 index 00000000000000..b42137ed0b5d6b --- /dev/null +++ b/test/parallel/test-stream-writable-finished-state.js @@ -0,0 +1,22 @@ +'use strict'; + +const common = require('../common'); + +const assert = require('assert'); +const stream = require('stream'); + +const writable = new stream.Writable(); + +writable._write = (chunk, encoding, cb) => { + // The state finished should start in false. + assert.strictEqual(writable._writableState.finished, false); + cb(); +}; + +writable.on('finish', common.mustCall(() => { + assert.strictEqual(writable._writableState.finished, true); +})); + +writable.end('testing finished state', common.mustCall(() => { + assert.strictEqual(writable._writableState.finished, true); +})); From 7fbfb739c1589f814714a27fcc360807f10e973c Mon Sep 17 00:00:00 2001 From: "Italo A. Casas" Date: Wed, 21 Sep 2016 21:43:16 -0400 Subject: [PATCH 078/145] test: writable stream ending state Add a test for _writableState.ending, when ending becomes true, but the stream is not finished/ended yet. PR-URL: https://github.com/nodejs/node/pull/8707 Reviewed-By: Colin Ihrig Reviewed-By: Matteo Collina Related: https://github.com/nodejs/node/issues/8686 --- lib/_stream_writable.js | 1 + .../test-stream-writableState-ending.js | 34 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 test/parallel/test-stream-writableState-ending.js diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js index d96c7da66d6b07..7220252fead27b 100644 --- a/lib/_stream_writable.js +++ b/lib/_stream_writable.js @@ -43,6 +43,7 @@ function WritableState(options, stream) { // cast to ints. this.highWaterMark = ~~this.highWaterMark; + // drain event flag. this.needDrain = false; // at the start of calling end() this.ending = false; diff --git a/test/parallel/test-stream-writableState-ending.js b/test/parallel/test-stream-writableState-ending.js new file mode 100644 index 00000000000000..1e0b0bf77f1ee7 --- /dev/null +++ b/test/parallel/test-stream-writableState-ending.js @@ -0,0 +1,34 @@ +'use strict'; + +require('../common'); + +const assert = require('assert'); +const stream = require('stream'); + +const writable = new stream.Writable(); + +function testStates(ending, finished, ended) { + assert.strictEqual(writable._writableState.ending, ending); + assert.strictEqual(writable._writableState.finished, finished); + assert.strictEqual(writable._writableState.ended, ended); +} + +writable._write = (chunk, encoding, cb) => { + // ending, finished, ended start in false. + testStates(false, false, false); + cb(); +}; + +writable.on('finish', () => { + // ending, finished, ended = true. + testStates(true, true, true); +}); + +writable.end('testing function end()', () => { + // ending, finished, ended = true. + testStates(true, true, true); +}); + +// ending, ended = true. +// finished = false. +testStates(true, false, true); From b3f8f8902d52dd5dfdca9c1e5fb22e468483ef5a Mon Sep 17 00:00:00 2001 From: Eugene Ostroukhov Date: Mon, 3 Oct 2016 16:31:25 -0700 Subject: [PATCH 079/145] inspector: no URLs when the debugger is connected By convention, inspector protocol targets do not advertise connection URLs when the frontend is already connected as multiple inspector protocol connections are not supported. PR-URL: https://github.com/nodejs/node/pull/8919 Reviewed-By: Aleksey Kozyatinskiy Reviewed-By: Ben Noordhuis --- src/inspector_agent.cc | 129 ++++++++++++++--------------- test/inspector/inspector-helper.js | 9 ++ test/inspector/test-inspector.js | 9 ++ 3 files changed, 82 insertions(+), 65 deletions(-) diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index aec0bc06e32334..1cbaa92b9abcea 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -20,6 +20,8 @@ #include "libplatform/libplatform.h" +#include +#include #include #include #include @@ -53,6 +55,21 @@ void PrintDebuggerReadyMessage(int port, const std::string& id) { fflush(stderr); } +std::string MapToString(const std::map object) { + std::ostringstream json; + json << "[ {\n"; + bool first = true; + for (const auto& name_value : object) { + if (!first) + json << ",\n"; + json << " \"" << name_value.first << "\": \""; + json << name_value.second << "\""; + first = false; + } + json << "\n} ]"; + return json.str(); +} + void Escape(std::string* string) { for (char& c : *string) { c = (c == '\"' || c == '\\') ? '_' : c; @@ -74,33 +91,23 @@ void OnBufferAlloc(uv_handle_t* handle, size_t len, uv_buf_t* buf) { buf->len = len; } -void SendHttpResponse(InspectorSocket* socket, const char* response, - size_t len) { +void SendHttpResponse(InspectorSocket* socket, const std::string& response) { const char HEADERS[] = "HTTP/1.0 200 OK\r\n" "Content-Type: application/json; charset=UTF-8\r\n" "Cache-Control: no-cache\r\n" "Content-Length: %zu\r\n" "\r\n"; char header[sizeof(HEADERS) + 20]; - int header_len = snprintf(header, sizeof(header), HEADERS, len); + int header_len = snprintf(header, sizeof(header), HEADERS, response.size()); inspector_write(socket, header, header_len); - inspector_write(socket, response, len); + inspector_write(socket, response.data(), response.size()); } void SendVersionResponse(InspectorSocket* socket) { - const char VERSION_RESPONSE_TEMPLATE[] = - "[ {" - " \"Browser\": \"node.js/%s\"," - " \"Protocol-Version\": \"1.1\"," - " \"User-Agent\": \"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36" - "(KHTML, like Gecko) Chrome/45.0.2446.0 Safari/537.36\"," - " \"WebKit-Version\": \"537.36 (@198122)\"" - "} ]"; - char buffer[sizeof(VERSION_RESPONSE_TEMPLATE) + 128]; - size_t len = snprintf(buffer, sizeof(buffer), VERSION_RESPONSE_TEMPLATE, - NODE_VERSION); - ASSERT_LT(len, sizeof(buffer)); - SendHttpResponse(socket, buffer, len); + std::map response; + response["Browser"] = "node.js/" NODE_VERSION; + response["Protocol-Version"] = "1.1"; + SendHttpResponse(socket, MapToString(response)); } std::string GetProcessTitle() { @@ -114,47 +121,6 @@ std::string GetProcessTitle() { } } -void SendTargentsListResponse(InspectorSocket* socket, - const std::string& script_name_, - const std::string& script_path_, - const std::string& id, - const std::string& ws_url) { - const char LIST_RESPONSE_TEMPLATE[] = - "[ {" - " \"description\": \"node.js instance\"," - " \"devtoolsFrontendUrl\": " - "\"https://chrome-devtools-frontend.appspot.com/serve_file/" - "@" V8_INSPECTOR_REVISION - "/inspector.html?experiments=true&v8only=true" - "&ws=%s\"," - " \"faviconUrl\": \"https://nodejs.org/static/favicon.ico\"," - " \"id\": \"%s\"," - " \"title\": \"%s\"," - " \"type\": \"node\"," - " \"url\": \"%s\"," - " \"webSocketDebuggerUrl\": \"ws://%s\"" - "} ]"; - std::string title = script_name_.empty() ? GetProcessTitle() : script_name_; - - // This attribute value is a "best effort" URL that is passed as a JSON - // string. It is not guaranteed to resolve to a valid resource. - std::string url = "file://" + script_path_; - - Escape(&title); - Escape(&url); - - int buf_len = sizeof(LIST_RESPONSE_TEMPLATE) + ws_url.length() * 2 + - id.length() + title.length() + url.length(); - std::string buffer(buf_len, '\0'); - - int len = snprintf(&buffer[0], buf_len, LIST_RESPONSE_TEMPLATE, - ws_url.c_str(), id.c_str(), title.c_str(), url.c_str(), - ws_url.c_str()); - buffer.resize(len); - ASSERT_LT(len, buf_len); // Buffer should be big enough! - SendHttpResponse(socket, buffer.data(), len); -} - void SendProtocolJson(InspectorSocket* socket) { z_stream strm; strm.zalloc = Z_NULL; @@ -167,13 +133,13 @@ void SendProtocolJson(InspectorSocket* socket) { PROTOCOL_JSON[2]; strm.next_in = const_cast(PROTOCOL_JSON + 3); strm.avail_in = sizeof(PROTOCOL_JSON) - 3; - std::vector data(kDecompressedSize); + std::string data(kDecompressedSize, '\0'); strm.next_out = reinterpret_cast(&data[0]); strm.avail_out = data.size(); CHECK_EQ(Z_STREAM_END, inflate(&strm, Z_FINISH)); CHECK_EQ(0, strm.avail_out); CHECK_EQ(Z_OK, inflateEnd(&strm)); - SendHttpResponse(socket, &data[0], data.size()); + SendHttpResponse(socket, data); } const char* match_path_segment(const char* path, const char* expected) { @@ -205,6 +171,12 @@ std::string GenerateID() { return uuid; } +// std::to_string is not available on Smart OS and ARM flavours +const std::string to_string(uint64_t number) { + std::ostringstream result; + result << number; + return result.str(); +} } // namespace @@ -253,8 +225,9 @@ class AgentImpl { void PostIncomingMessage(const String16& message); void WaitForFrontendMessage(); void NotifyMessageReceived(); - bool RespondToGet(InspectorSocket* socket, const std::string& path); State ToState(State state); + void SendTargentsListResponse(InspectorSocket* socket); + bool RespondToGet(InspectorSocket* socket, const std::string& path); uv_sem_t start_sem_; ConditionVariable incoming_message_cond_; @@ -673,14 +646,41 @@ void AgentImpl::OnRemoteDataIO(InspectorSocket* socket, } } +void AgentImpl::SendTargentsListResponse(InspectorSocket* socket) { + std::map response; + response["description"] = "node.js instance"; + response["faviconUrl"] = "https://nodejs.org/static/favicon.ico"; + response["id"] = id_; + response["title"] = script_name_.empty() ? GetProcessTitle() : script_name_; + Escape(&response["title"]); + response["type"] = "node"; + // This attribute value is a "best effort" URL that is passed as a JSON + // string. It is not guaranteed to resolve to a valid resource. + response["url"] = "file://" + script_path_; + Escape(&response["url"]); + + if (!client_socket_) { + std::string address = GetWsUrl(port_, id_); + + std::ostringstream frontend_url; + frontend_url << "https://chrome-devtools-frontend.appspot.com/serve_file/@"; + frontend_url << V8_INSPECTOR_REVISION; + frontend_url << "/inspector.html?experiments=true&v8only=true&ws="; + frontend_url << address; + + response["devtoolsFrontendUrl"] += frontend_url.str(); + response["webSocketDebuggerUrl"] = "ws://" + address; + } + SendHttpResponse(socket, MapToString(response)); +} + bool AgentImpl::RespondToGet(InspectorSocket* socket, const std::string& path) { const char* command = match_path_segment(path.c_str(), "/json"); if (command == nullptr) return false; if (match_path_segment(command, "list") || command[0] == '\0') { - SendTargentsListResponse(socket, script_name_, script_path_, id_, - GetWsUrl(port_, id_)); + SendTargentsListResponse(socket); } else if (match_path_segment(command, "protocol")) { SendProtocolJson(socket); } else if (match_path_segment(command, "version")) { @@ -689,8 +689,7 @@ bool AgentImpl::RespondToGet(InspectorSocket* socket, const std::string& path) { const char* pid = match_path_segment(command, "activate"); if (pid != id_) return false; - const char TARGET_ACTIVATED[] = "Target activated"; - SendHttpResponse(socket, TARGET_ACTIVATED, sizeof(TARGET_ACTIVATED) - 1); + SendHttpResponse(socket, "Target activated"); } return true; } diff --git a/test/inspector/inspector-helper.js b/test/inspector/inspector-helper.js index 850df8718fbe7c..b78b921aebfaf7 100644 --- a/test/inspector/inspector-helper.js +++ b/test/inspector/inspector-helper.js @@ -282,6 +282,15 @@ TestSession.prototype.disconnect = function(childDone) { }); }; +TestSession.prototype.testHttpResponse = function(path, check) { + return this.enqueue((callback) => + checkHttpResponse(this.harness_.port, path, (response) => { + check.call(this, response); + callback(); + })); +}; + + const Harness = function(port, childProcess) { this.port = port; this.mainScriptPath = mainScript; diff --git a/test/inspector/test-inspector.js b/test/inspector/test-inspector.js index 0d01127d6b35d8..d2130b36b1fbe8 100644 --- a/test/inspector/test-inspector.js +++ b/test/inspector/test-inspector.js @@ -152,6 +152,14 @@ function testInspectScope(session) { ]); } +function testNoUrlsWhenConnected(session) { + session.testHttpResponse('/json/list', (response) => { + assert.strictEqual(1, response.length); + assert.ok(!response[0].hasOwnProperty('devtoolsFrontendUrl')); + assert.ok(!response[0].hasOwnProperty('webSocketDebuggerUrl')); + }); +} + function testWaitsForFrontendDisconnect(session, harness) { console.log('[test]', 'Verify node waits for the frontend to disconnect'); session.sendInspectorCommands({ 'method': 'Debugger.resume'}) @@ -165,6 +173,7 @@ function runTests(harness) { .testHttpResponse('/json/list', checkListResponse) .testHttpResponse('/json/version', assert.ok) .runFrontendSession([ + testNoUrlsWhenConnected, testBreakpointOnStart, testSetBreakpointAndResume, testInspectScope, From 1fee6c11e5071ca8de09e1c5541c2e198894508e Mon Sep 17 00:00:00 2001 From: "Italo A. Casas" Date: Mon, 26 Sep 2016 23:25:02 -0400 Subject: [PATCH 080/145] test: writable stream needDrain state Add a test for _writableState.needDrain. PR-URL: https://github.com/nodejs/node/pull/8799 Reviewed-By: Colin Ihrig Reviewed-By: Matteo Collina Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Related: https://github.com/nodejs/node/issues/8686 --- .../test-stream-writable-needdrain-state.js | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/parallel/test-stream-writable-needdrain-state.js diff --git a/test/parallel/test-stream-writable-needdrain-state.js b/test/parallel/test-stream-writable-needdrain-state.js new file mode 100644 index 00000000000000..ea5617d997d5ed --- /dev/null +++ b/test/parallel/test-stream-writable-needdrain-state.js @@ -0,0 +1,23 @@ +'use strict'; + +const common = require('../common'); +const stream = require('stream'); +const assert = require('assert'); + +const transform = new stream.Transform({ + transform: _transform, + highWaterMark: 1 +}); + +function _transform(chunk, encoding, cb) { + assert.strictEqual(transform._writableState.needDrain, true); + cb(); +} + +assert.strictEqual(transform._writableState.needDrain, false); + +transform.write('asdasd', common.mustCall(() => { + assert.strictEqual(transform._writableState.needDrain, false); +})); + +assert.strictEqual(transform._writableState.needDrain, true); From eeaadcdd6a5a9b2197e170517aaddc072e239acd Mon Sep 17 00:00:00 2001 From: "Italo A. Casas" Date: Fri, 18 Nov 2016 13:17:16 -0500 Subject: [PATCH 081/145] doc: add italoacasas to collaborators PR-URL: https://github.com/nodejs/node/pull/9677 Reviewed-By: Rich Trott Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index caf0d24d48cf08..86eef0065cd7af 100644 --- a/README.md +++ b/README.md @@ -239,6 +239,8 @@ more information about the governance of the Node.js project, see **Ilkka Myller** <ilkka.myller@nodefield.com> * [isaacs](https://github.com/isaacs) - **Isaac Z. Schlueter** <i@izs.me> +* [italoacasas](https://github.com/italoacasas) +**Italo A. Casas** <me@italoacasas.com> * [iWuzHere](https://github.com/iWuzHere) - **Imran Iqbal** <imran@imraniqbal.org> * [JacksonTian](https://github.com/JacksonTian) - From d2b0caef33009c1eb5e034cde6a7c9e4a1f4ff14 Mon Sep 17 00:00:00 2001 From: Gibson Fahnestock Date: Wed, 19 Oct 2016 15:14:14 +0100 Subject: [PATCH 082/145] doc: update CONTRIBUTING.md to address editing PRs Add more info about the contribution process after PR submission. PR-URL: https://github.com/nodejs/node/pull/9259 Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Santiago Gimeno Reviewed-By: Michael Dawson --- CONTRIBUTING.md | 65 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 120fdeaf3b0c6e..17aa305f8c7fe4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -89,6 +89,13 @@ $ git config --global user.name "J. Random User" $ git config --global user.email "j.random.user@example.com" ``` +Add and commit: + +```text +$ git add my/changed/files +$ git commit +``` + Writing good commit logs is important. A commit log should describe what changed and why. Follow these guidelines when writing one: @@ -194,10 +201,60 @@ $ git push origin my-branch Go to https://github.com/yourusername/node and select your branch. Click the 'Pull Request' button and fill out the form. -Pull requests are usually reviewed within a few days. If there are comments -to address, apply your changes in a separate commit and push that to your -branch. Post a comment in the pull request afterwards; GitHub does -not send out notifications when you add commits. +Pull requests are usually reviewed within a few days. + +### Step 7: Discuss and update + +You will probably get feedback or requests for changes to your Pull Request. +This is a big part of the submission process, so don't be disheartened! + +To make changes to an existing Pull Request, make the changes to your branch. +When you push that branch to your fork, GitHub will automatically update the +Pull Request. + +You can push more commits to your branch: + +```text +$ git add my/changed/files +$ git commit +$ git push origin my-branch +``` + +Or you can rebase against master: + +```text +$ git fetch --all +$ git rebase origin/master +$ git push --force-with-lease origin my-branch +``` + +Or you can amend the last commit (for example if you want to change the commit +log). + +```text +$ git add any/changed/files +$ git commit --amend +$ git push --force-with-lease origin my-branch +``` + +**Important:** The `git push --force-with-lease` command is one of the few ways +to delete history in git. Before you use it, make sure you understand the risks. +If in doubt, you can always ask for guidance in the Pull Request or on +[IRC in the #node-dev channel](https://webchat.freenode.net?channels=node-dev&uio=d4). + +Feel free to post a comment in the Pull Request to ping reviewers if you are +awaiting an answer on something. + + +### Step 8: Landing + +Once your Pull Request has been reviewed and approved by at least one Node.js +Collaborators (often by saying LGTM, or Looks Good To Me), and as long as +there is consensus (no objections from a Collaborator), a +Collaborator can merge the Pull Request . GitHub often shows the Pull Request as + `Closed` at this point, but don't worry. If you look at the branch you raised + your Pull Request against (probably `master`), you should see a commit with + your name on it. Congratulations and thanks for your contribution! ## Developer's Certificate of Origin 1.1 From f0a8bcc73555a3f153a94037a6c29240fdc018bc Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Sun, 23 Oct 2016 07:40:12 -0600 Subject: [PATCH 083/145] deps: back port OpenBSD fix in c-ares/c-ares MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original PR: https://github.com/c-ares/c-ares/pull/68 PR-URL: https://github.com/nodejs/node/pull/9232 Reviewed-By: James M Snell Reviewed-By: Johan Bergström Reviewed-By: Ben Noordhuis --- deps/cares/include/ares.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/cares/include/ares.h b/deps/cares/include/ares.h index cd94d4fc628cb2..c23ea3e2e0ad27 100644 --- a/deps/cares/include/ares.h +++ b/deps/cares/include/ares.h @@ -38,7 +38,7 @@ require it! */ #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ - defined(ANDROID) || defined(__ANDROID__) + defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) #include #endif #if (defined(NETWARE) && !defined(__NOVELL_LIBC__)) From b5bcd25c7b338d584adcc3584abd681131f78d75 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 19 Oct 2016 13:15:22 +0200 Subject: [PATCH 084/145] inspector: fix request path nullptr dereference Fix a nullptr dereference when an invalid path is requested. Regression introduced in commit 69fc85d ("inspector: generate UUID for debug targets"), caught by Coverity. PR-URL: https://github.com/nodejs/node/pull/9184 Reviewed-By: Ali Ijaz Sheikh Reviewed-By: Colin Ihrig Reviewed-By: Eugene Ostroukhov Reviewed-By: James M Snell --- src/inspector_agent.cc | 9 ++++++--- test/inspector/inspector-helper.js | 23 +++++++++++++++++------ test/inspector/test-inspector.js | 22 +++++++++++++++++++--- 3 files changed, 42 insertions(+), 12 deletions(-) diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index 1cbaa92b9abcea..3f3d548de4cdf6 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -681,17 +681,20 @@ bool AgentImpl::RespondToGet(InspectorSocket* socket, const std::string& path) { if (match_path_segment(command, "list") || command[0] == '\0') { SendTargentsListResponse(socket); + return true; } else if (match_path_segment(command, "protocol")) { SendProtocolJson(socket); + return true; } else if (match_path_segment(command, "version")) { SendVersionResponse(socket); - } else { - const char* pid = match_path_segment(command, "activate"); + return true; + } else if (const char* pid = match_path_segment(command, "activate")) { if (pid != id_) return false; SendHttpResponse(socket, "Target activated"); + return true; } - return true; + return false; } // static diff --git a/test/inspector/inspector-helper.js b/test/inspector/inspector-helper.js index b78b921aebfaf7..76fb33dba2be4d 100644 --- a/test/inspector/inspector-helper.js +++ b/test/inspector/inspector-helper.js @@ -86,7 +86,17 @@ function checkHttpResponse(port, path, callback) { res.setEncoding('utf8'); res .on('data', (data) => response += data.toString()) - .on('end', () => callback(JSON.parse(response))); + .on('end', () => { + let err = null; + let json = undefined; + try { + json = JSON.parse(response); + } catch (e) { + err = e; + err.response = response; + } + callback(err, json); + }); }); } @@ -284,8 +294,8 @@ TestSession.prototype.disconnect = function(childDone) { TestSession.prototype.testHttpResponse = function(path, check) { return this.enqueue((callback) => - checkHttpResponse(this.harness_.port, path, (response) => { - check.call(this, response); + checkHttpResponse(this.harness_.port, path, (err, response) => { + check.call(this, err, response); callback(); })); }; @@ -352,8 +362,8 @@ Harness.prototype.enqueue_ = function(task) { Harness.prototype.testHttpResponse = function(path, check) { return this.enqueue_((doneCallback) => { - checkHttpResponse(this.port, path, (response) => { - check.call(this, response); + checkHttpResponse(this.port, path, (err, response) => { + check.call(this, err, response); doneCallback(); }); }); @@ -393,7 +403,8 @@ Harness.prototype.wsHandshake = function(devtoolsUrl, tests, readyCallback) { Harness.prototype.runFrontendSession = function(tests) { return this.enqueue_((callback) => { - checkHttpResponse(this.port, '/json/list', (response) => { + checkHttpResponse(this.port, '/json/list', (err, response) => { + assert.ifError(err); this.wsHandshake(response[0]['webSocketDebuggerUrl'], tests, callback); }); }); diff --git a/test/inspector/test-inspector.js b/test/inspector/test-inspector.js index d2130b36b1fbe8..eba4a0fc05dac2 100644 --- a/test/inspector/test-inspector.js +++ b/test/inspector/test-inspector.js @@ -5,7 +5,8 @@ const helper = require('./inspector-helper.js'); let scopeId; -function checkListResponse(response) { +function checkListResponse(err, response) { + assert.ifError(err); assert.strictEqual(1, response.length); assert.ok(response[0]['devtoolsFrontendUrl']); assert.ok( @@ -13,6 +14,17 @@ function checkListResponse(response) { .match(/ws:\/\/localhost:\d+\/[0-9A-Fa-f]{8}-/)); } +function checkVersion(err, response) { + assert.ifError(err); + assert.ok(response); +} + +function checkBadPath(err, response) { + assert(err instanceof SyntaxError); + assert(/Unexpected token/.test(err.message)); + assert(/WebSockets request was expected/.test(err.response)); +} + function expectMainScriptSource(result) { const expected = helper.mainScriptSource(); const source = result['scriptSource']; @@ -153,7 +165,8 @@ function testInspectScope(session) { } function testNoUrlsWhenConnected(session) { - session.testHttpResponse('/json/list', (response) => { + session.testHttpResponse('/json/list', (err, response) => { + assert.ifError(err); assert.strictEqual(1, response.length); assert.ok(!response[0].hasOwnProperty('devtoolsFrontendUrl')); assert.ok(!response[0].hasOwnProperty('webSocketDebuggerUrl')); @@ -171,7 +184,10 @@ function runTests(harness) { harness .testHttpResponse('/json', checkListResponse) .testHttpResponse('/json/list', checkListResponse) - .testHttpResponse('/json/version', assert.ok) + .testHttpResponse('/json/version', checkVersion) + .testHttpResponse('/json/activate', checkBadPath) + .testHttpResponse('/json/activate/boom', checkBadPath) + .testHttpResponse('/json/badpath', checkBadPath) .runFrontendSession([ testNoUrlsWhenConnected, testBreakpointOnStart, From ef1cf6b0408e059fb7224b48c9d69c9ea2a7318a Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 19 Oct 2016 13:31:18 +0200 Subject: [PATCH 085/145] test: remove test-v8-inspector-json-protocol test Remove parallel/test-v8-inspector-json-protocol, it duplicates the test found in inspector/test-inspector. PR-URL: https://github.com/nodejs/node/pull/9184 Reviewed-By: Ali Ijaz Sheikh Reviewed-By: Colin Ihrig Reviewed-By: Eugene Ostroukhov Reviewed-By: James M Snell --- .../test-v8-inspector-json-protocol.js | 22 ------------------- 1 file changed, 22 deletions(-) delete mode 100644 test/parallel/test-v8-inspector-json-protocol.js diff --git a/test/parallel/test-v8-inspector-json-protocol.js b/test/parallel/test-v8-inspector-json-protocol.js deleted file mode 100644 index 762c4386bb906a..00000000000000 --- a/test/parallel/test-v8-inspector-json-protocol.js +++ /dev/null @@ -1,22 +0,0 @@ -// Flags: --inspect={PORT} -'use strict'; - -const common = require('../common'); -const assert = require('assert'); -const http = require('http'); - -const options = { - path: '/json/protocol', - port: common.PORT, - host: common.localhostIPv4, -}; - -http.get(options, common.mustCall((res) => { - let body = ''; - res.setEncoding('utf8'); - res.on('data', (data) => body += data); - res.on('end', common.mustCall(() => { - assert(body.length > 0); - assert.deepStrictEqual(JSON.stringify(JSON.parse(body)), body); - })); -})); From 5efb3c373a9fbda9c451a13607fc6d550e9ff717 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 28 Sep 2016 12:01:48 +0200 Subject: [PATCH 086/145] lib: fix beforeExit not working with -e Commit 93a44d5 ("src: fix deferred events not working with -e") defers evaluation of the script to the next tick. A side effect of that change is that 'beforeExit' listeners run before the actual script. 'beforeExit' is emitted when the event loop is empty but process.nextTick() does not ref the event loop. Fix that by using setImmediate(). Because it is implemented in terms of a uv_check_t handle, it interacts with the event loop properly. Fixes: https://github.com/nodejs/node/issues/8534 PR-URL: https://github.com/nodejs/node/pull/8821 Reviewed-By: Colin Ihrig --- lib/internal/bootstrap_node.js | 2 +- test/message/eval_messages.out | 28 ++++++++++++++++------------ test/message/stdin_messages.out | 28 ++++++++++++++++------------ test/parallel/test-cli-eval.js | 15 +++++++++++++++ 4 files changed, 48 insertions(+), 25 deletions(-) diff --git a/lib/internal/bootstrap_node.js b/lib/internal/bootstrap_node.js index fc3121b2432300..100b5063da1e60 100644 --- a/lib/internal/bootstrap_node.js +++ b/lib/internal/bootstrap_node.js @@ -353,7 +353,7 @@ // Defer evaluation for a tick. This is a workaround for deferred // events not firing when evaluating scripts from the command line, // see https://github.com/nodejs/node/issues/1600. - process.nextTick(function() { + setImmediate(function() { const result = module._compile(script, `${name}-wrapper`); if (process._print_eval) console.log(result); }); diff --git a/test/message/eval_messages.out b/test/message/eval_messages.out index 7fbf51f7e0f2f7..44965be374bac5 100644 --- a/test/message/eval_messages.out +++ b/test/message/eval_messages.out @@ -6,9 +6,10 @@ SyntaxError: Strict mode code may not include a with statement at Object.exports.runInThisContext (vm.js:*) at Object. ([eval]-wrapper:*:*) at Module._compile (module.js:*:*) - at bootstrap_node.js:*:* - at _combinedTickCallback (internal/process/next_tick.js:*:*) - at process._tickCallback (internal/process/next_tick.js:*:*) + at Immediate. (bootstrap_node.js:*:*) + at runCallback (timers.js:*:*) + at tryOnImmediate (timers.js:*:*) + at processImmediate [as _immediateCallback] (timers.js:*:*) 42 42 [eval]:1 @@ -20,9 +21,10 @@ Error: hello at Object.exports.runInThisContext (vm.js:*) at Object. ([eval]-wrapper:*:*) at Module._compile (module.js:*:*) - at bootstrap_node.js:*:* - at _combinedTickCallback (internal/process/next_tick.js:*:*) - at process._tickCallback (internal/process/next_tick.js:*:*) + at Immediate. (bootstrap_node.js:*:*) + at runCallback (timers.js:*:*) + at tryOnImmediate (timers.js:*:*) + at processImmediate [as _immediateCallback] (timers.js:*:*) [eval]:1 throw new Error("hello") ^ @@ -32,9 +34,10 @@ Error: hello at Object.exports.runInThisContext (vm.js:*) at Object. ([eval]-wrapper:*:*) at Module._compile (module.js:*:*) - at bootstrap_node.js:*:* - at _combinedTickCallback (internal/process/next_tick.js:*:*) - at process._tickCallback (internal/process/next_tick.js:*:*) + at Immediate. (bootstrap_node.js:*:*) + at runCallback (timers.js:*:*) + at tryOnImmediate (timers.js:*:*) + at processImmediate [as _immediateCallback] (timers.js:*:*) 100 [eval]:1 var x = 100; y = x; @@ -45,9 +48,10 @@ ReferenceError: y is not defined at Object.exports.runInThisContext (vm.js:*) at Object. ([eval]-wrapper:*:*) at Module._compile (module.js:*:*) - at bootstrap_node.js:*:* - at _combinedTickCallback (internal/process/next_tick.js:*:*) - at process._tickCallback (internal/process/next_tick.js:*:*) + at Immediate. (bootstrap_node.js:*:*) + at runCallback (timers.js:*:*) + at tryOnImmediate (timers.js:*:*) + at processImmediate [as _immediateCallback] (timers.js:*:*) [eval]:1 var ______________________________________________; throw 10 ^ diff --git a/test/message/stdin_messages.out b/test/message/stdin_messages.out index 62c43b02a8e81b..828bee92cb6f7f 100644 --- a/test/message/stdin_messages.out +++ b/test/message/stdin_messages.out @@ -7,9 +7,10 @@ SyntaxError: Strict mode code may not include a with statement at Object.exports.runInThisContext (vm.js:*) at Object. ([stdin]-wrapper:*:*) at Module._compile (module.js:*:*) - at bootstrap_node.js:*:* - at _combinedTickCallback (internal/process/next_tick.js:*:*) - at process._tickCallback (internal/process/next_tick.js:*:*) + at Immediate. (bootstrap_node.js:*:*) + at runCallback (timers.js:*:*) + at tryOnImmediate (timers.js:*:*) + at processImmediate [as _immediateCallback] (timers.js:*:*) 42 42 @@ -22,9 +23,10 @@ Error: hello at Object.exports.runInThisContext (vm.js:*) at Object. ([stdin]-wrapper:*:*) at Module._compile (module.js:*:*) - at bootstrap_node.js:*:* - at _combinedTickCallback (internal/process/next_tick.js:*:*) - at process._tickCallback (internal/process/next_tick.js:*:*) + at Immediate. (bootstrap_node.js:*:*) + at runCallback (timers.js:*:*) + at tryOnImmediate (timers.js:*:*) + at processImmediate [as _immediateCallback] (timers.js:*:*) [stdin]:1 throw new Error("hello") @@ -35,9 +37,10 @@ Error: hello at Object.exports.runInThisContext (vm.js:*) at Object. ([stdin]-wrapper:*:*) at Module._compile (module.js:*:*) - at bootstrap_node.js:*:* - at _combinedTickCallback (internal/process/next_tick.js:*:*) - at process._tickCallback (internal/process/next_tick.js:*:*) + at Immediate. (bootstrap_node.js:*:*) + at runCallback (timers.js:*:*) + at tryOnImmediate (timers.js:*:*) + at processImmediate [as _immediateCallback] (timers.js:*:*) 100 [stdin]:1 @@ -49,9 +52,10 @@ ReferenceError: y is not defined at Object.exports.runInThisContext (vm.js:*) at Object. ([stdin]-wrapper:*:*) at Module._compile (module.js:*:*) - at bootstrap_node.js:*:* - at _combinedTickCallback (internal/process/next_tick.js:*:*) - at process._tickCallback (internal/process/next_tick.js:*:*) + at Immediate. (bootstrap_node.js:*:*) + at runCallback (timers.js:*:*) + at tryOnImmediate (timers.js:*:*) + at processImmediate [as _immediateCallback] (timers.js:*:*) [stdin]:1 var ______________________________________________; throw 10 diff --git a/test/parallel/test-cli-eval.js b/test/parallel/test-cli-eval.js index f22084bc690395..3c38afd2ac4524 100644 --- a/test/parallel/test-cli-eval.js +++ b/test/parallel/test-cli-eval.js @@ -97,3 +97,18 @@ child.exec(nodejs + ` -e 'require("child_process").fork("${emptyFile}")'`, assert.equal(stdout, ''); assert.equal(stderr, ''); }); + +// Regression test for https://github.com/nodejs/node/issues/8534. +{ + const script = ` + // console.log() can revive the event loop so we must be careful + // to write from a 'beforeExit' event listener only once. + process.once("beforeExit", () => console.log("beforeExit")); + process.on("exit", () => console.log("exit")); + console.log("start"); + `; + const options = { encoding: 'utf8' }; + const proc = child.spawnSync(process.execPath, ['-e', script], options); + assert.strictEqual(proc.stderr, ''); + assert.strictEqual(proc.stdout, 'start\nbeforeExit\nexit\n'); +} From ad4cc361dd289a2769fe6ec7a41806997ac4fd0f Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 20 Oct 2016 13:45:38 -0400 Subject: [PATCH 087/145] test: add coverage for execFileSync() errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds coverage for errors returned by execFileSync() when the child process exits with a non-zero code. PR-URL: https://github.com/nodejs/node/pull/9211 Reviewed-By: Michaël Zasso Reviewed-By: Sakthipriyan Vairamani Reviewed-By: James M Snell Reviewed-By: Ben Noordhuis --- test/sequential/test-child-process-execsync.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/sequential/test-child-process-execsync.js b/test/sequential/test-child-process-execsync.js index 01d7f868845ae0..137ddbda425f2c 100644 --- a/test/sequential/test-child-process-execsync.js +++ b/test/sequential/test-child-process-execsync.js @@ -87,3 +87,19 @@ assert.strictEqual(ret, msg + '\n', execSync('exit -1', {stdio: 'ignore'}); }, /Command failed: exit -1/); } + +// Verify the execFileSync() behavior when the child exits with a non-zero code. +{ + const args = ['-e', 'process.exit(1)']; + + assert.throws(() => { + execFileSync(process.execPath, args); + }, (err) => { + const msg = `Command failed: ${process.execPath} ${args.join(' ')}`; + + assert(err instanceof Error); + assert.strictEqual(err.message.trim(), msg); + assert.strictEqual(err.status, 1); + return true; + }); +} From 653f092639e7aca9757982328af0ad9e07b1cd2e Mon Sep 17 00:00:00 2001 From: Thomas Watson Steen Date: Sat, 12 Nov 2016 12:17:52 +0900 Subject: [PATCH 088/145] doc: simplify process.memoryUsage() example code Using util.inspect doesn't change the output in this case PR-URL: https://github.com/nodejs/node/pull/9560 Reviewed-By: Myles Borins Reviewed-By: Rich Trott Reviewed-By: Roman Reiss Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen --- doc/api/process.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/api/process.md b/doc/api/process.md index 15e0ecedc372e7..89443daedab1cf 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -1136,9 +1136,7 @@ of the Node.js process measured in bytes. For example, the code: ```js -const util = require('util'); - -console.log(util.inspect(process.memoryUsage())); +console.log(process.memoryUsage()); ``` Will generate: From 0276e9e82cbdfa1d20a873a9552eb18b0f8fe2b7 Mon Sep 17 00:00:00 2001 From: "Sakthipriyan Vairamani (thefourtheye)" Date: Sat, 15 Oct 2016 00:51:46 +0530 Subject: [PATCH 089/145] buffer: coerce slice parameters consistently MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As shown in https://github.com/nodejs/node/issues/9096, the offset and end value of the `slice` call are coerced to numbers and then passed to `FastBuffer`, which internally truncates the mantissa part if the number is actually a floating point number. This actually affects the new length of the slice calculation. For example, > const original = Buffer.from('abcd'); undefined > original.slice(original.length / 3).toString() 'bc' This happens because, starting value of the slice is 4 / 3, which is 1.33 (approximately). Now, the length of the slice is calculated as the difference between the actual length of the buffer and the starting offset. So, it becomes 2.67 (4 - 1.33). Now, a new `FastBuffer` is constructed, with the following values as parameters, 1. actual buffer object, 2. starting value, which is 1.33 and 3. the length 2.67. The underlying C++ code truncates the numbers and they become 1 and 2. That is why the result is just `bc`. This patch makes sure that all the offsets are coerced to integers before any calculations are done. Fixes: https://github.com/nodejs/node/issues/9096 PR-URL: https://github.com/nodejs/node/pull/9101 Reviewed-By: James M Snell Reviewed-By: Michaël Zasso Reviewed-By: Anna Henningsen Reviewed-By: Franziska Hinkelmann Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Brian White --- lib/buffer.js | 7 +++---- test/parallel/test-buffer-slice.js | 10 ++++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/buffer.js b/lib/buffer.js index f4dfba860feaad..942fc35071b451 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -789,11 +789,10 @@ Buffer.prototype.toJSON = function() { function adjustOffset(offset, length) { - offset = +offset; - if (offset === 0 || Number.isNaN(offset)) { + offset |= 0; + if (offset === 0) { return 0; - } - if (offset < 0) { + } else if (offset < 0) { offset += length; return offset > 0 ? offset : 0; } else { diff --git a/test/parallel/test-buffer-slice.js b/test/parallel/test-buffer-slice.js index 133d056b17b0c7..e5b598e62519e7 100644 --- a/test/parallel/test-buffer-slice.js +++ b/test/parallel/test-buffer-slice.js @@ -62,3 +62,13 @@ assert.strictEqual(Buffer.alloc(0).slice(0, 1).length, 0); // slice(0,0).length === 0 assert.strictEqual(0, Buffer.from('hello').slice(0, 0).length); + +{ + // Regression tests for https://github.com/nodejs/node/issues/9096 + const buf = Buffer.from('abcd'); + assert.strictEqual(buf.slice(buf.length / 3).toString(), 'bcd'); + assert.strictEqual( + buf.slice(buf.length / 3, buf.length).toString(), + 'bcd' + ); +} From 0cffa3c87ef4f2a4056af07ee978401cda10fd1c Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 28 Oct 2016 10:35:58 -0400 Subject: [PATCH 090/145] buffer: coerce offset using Math.trunc() This is a partial revert of 14d1a8a631a58408f1e85365a5f2aaa047cc0a5f, which coerced the offset of Buffer#slice() using the | operator. This causes some edge cases to be handled incorrectly. This commit restores the old behavior, but converts offsets to integers using Math.trunc(). This commit does not revert any tests, and adds an additional regression test. Refs: https://github.com/nodejs/node/issues/9096 Refs: https://github.com/nodejs/node/pull/9101 PR-URL: https://github.com/nodejs/node/pull/9341 Reviewed-By: Sakthipriyan Vairamani Reviewed-By: James M Snell Reviewed-By: Brian White Reviewed-By: Trevor Norris --- lib/buffer.js | 6 ++++-- test/parallel/test-buffer-slice.js | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/lib/buffer.js b/lib/buffer.js index 942fc35071b451..3e745cde797aac 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -789,8 +789,10 @@ Buffer.prototype.toJSON = function() { function adjustOffset(offset, length) { - offset |= 0; - if (offset === 0) { + // Use Math.trunc() to convert offset to an integer value that can be larger + // than an Int32. Hence, don't use offset | 0 or similar techniques. + offset = Math.trunc(offset); + if (offset === 0 || Number.isNaN(offset)) { return 0; } else if (offset < 0) { offset += length; diff --git a/test/parallel/test-buffer-slice.js b/test/parallel/test-buffer-slice.js index e5b598e62519e7..076bf33fb07736 100644 --- a/test/parallel/test-buffer-slice.js +++ b/test/parallel/test-buffer-slice.js @@ -72,3 +72,30 @@ assert.strictEqual(0, Buffer.from('hello').slice(0, 0).length); 'bcd' ); } + +{ + const buf = Buffer.from('abcdefg'); + assert.strictEqual(buf.slice(-(-1 >>> 0) - 1).toString(), buf.toString()); +} + +{ + const buf = Buffer.from('abc'); + assert.strictEqual(buf.slice(-0.5).toString(), buf.toString()); +} + +{ + const buf = Buffer.from([ + 1, 29, 0, 0, 1, 143, 216, 162, 92, 254, 248, 63, 0, + 0, 0, 18, 184, 6, 0, 175, 29, 0, 8, 11, 1, 0, 0 + ]); + const chunk1 = Buffer.from([ + 1, 29, 0, 0, 1, 143, 216, 162, 92, 254, 248, 63, 0 + ]); + const chunk2 = Buffer.from([ + 0, 0, 18, 184, 6, 0, 175, 29, 0, 8, 11, 1, 0, 0 + ]); + const middle = buf.length / 2; + + assert.deepStrictEqual(buf.slice(0, middle), chunk1); + assert.deepStrictEqual(buf.slice(middle), chunk2); +} From b867294aa0749bf388caa5928abdd9bb45c94114 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 20 Oct 2016 12:34:09 -0400 Subject: [PATCH 091/145] child_process: remove unreachable execSync() code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Code coverage showed that the execSync() variable inheritStderr was never set to the default value of true. This is because the default case is hit whenever normalizeExecArgs() returns an object without an 'options' property. However, this can never be the case because normalizeExecArgs() unconditionally creates the options object. This commit removes the unreachable code. PR-URL: https://github.com/nodejs/node/pull/9209 Reviewed-By: James M Snell Reviewed-By: Michaël Zasso Reviewed-By: Luigi Pinca Reviewed-By: Sakthipriyan Vairamani --- lib/child_process.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/child_process.js b/lib/child_process.js index 5a0fd6e21ed5e4..69afdbe68d3c0a 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -512,7 +512,7 @@ exports.execFileSync = execFileSync; function execSync(command /*, options*/) { var opts = normalizeExecArgs.apply(null, arguments); - var inheritStderr = opts.options ? !opts.options.stdio : true; + var inheritStderr = !opts.options.stdio; var ret = spawnSync(opts.file, opts.options); ret.cmd = command; From e108f20d5c4bb23b71c8ed0e051b537b8a349b0f Mon Sep 17 00:00:00 2001 From: Charmander <~@charmander.me> Date: Tue, 25 Oct 2016 22:27:14 -0700 Subject: [PATCH 092/145] buffer: use correct name for custom inspect symbol 59714cb7b3918c9e4fcd94013b778078d3710705 introduced the `util.inspect.custom` symbol, but it was exported as `customInspectSymbol` by `internal/util.js` and referenced as `inspectSymbol` by `buffer.js`. PR-URL: https://github.com/nodejs/node/pull/9289 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- lib/buffer.js | 4 ++-- test/parallel/test-buffer-inspect.js | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/buffer.js b/lib/buffer.js index 3e745cde797aac..9ebeb66a268981 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -509,7 +509,7 @@ Buffer.prototype.equals = function equals(b) { // Override how buffers are presented by util.inspect(). -Buffer.prototype[internalUtil.inspectSymbol] = function inspect() { +Buffer.prototype[internalUtil.customInspectSymbol] = function inspect() { var str = ''; var max = exports.INSPECT_MAX_BYTES; if (this.length > 0) { @@ -519,7 +519,7 @@ Buffer.prototype[internalUtil.inspectSymbol] = function inspect() { } return '<' + this.constructor.name + ' ' + str + '>'; }; -Buffer.prototype.inspect = Buffer.prototype[internalUtil.inspectSymbol]; +Buffer.prototype.inspect = Buffer.prototype[internalUtil.customInspectSymbol]; Buffer.prototype.compare = function compare(target, start, diff --git a/test/parallel/test-buffer-inspect.js b/test/parallel/test-buffer-inspect.js index 4239d787ea10ba..4fed249207611b 100644 --- a/test/parallel/test-buffer-inspect.js +++ b/test/parallel/test-buffer-inspect.js @@ -34,3 +34,6 @@ assert.doesNotThrow(function() { assert.strictEqual(util.inspect(b), expected); assert.strictEqual(util.inspect(s), expected); }); + +b.inspect = undefined; +assert.strictEqual(util.inspect(b), expected); From 0fdfba8fbeb655584165deeda67f938784162439 Mon Sep 17 00:00:00 2001 From: Evan Lucas Date: Wed, 19 Oct 2016 19:27:08 -0500 Subject: [PATCH 093/145] test: fix flaky test by removing timer This fixes one of the tests that has been failing on CI on freebsd for a bit by removing an unnecessary timer. PR-URL: https://github.com/nodejs/node/pull/9199 Fixes: https://github.com/nodejs/node/issues/7929 Reviewed-By: Colin Ihrig Reviewed-By: Santiago Gimeno Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott --- test/parallel/test-dgram-send-callback-buffer.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/test/parallel/test-dgram-send-callback-buffer.js b/test/parallel/test-dgram-send-callback-buffer.js index e2966645d927ae..e0b2a581bf74aa 100644 --- a/test/parallel/test-dgram-send-callback-buffer.js +++ b/test/parallel/test-dgram-send-callback-buffer.js @@ -9,14 +9,9 @@ const client = dgram.createSocket('udp4'); const buf = Buffer.allocUnsafe(256); const onMessage = common.mustCall(function(err, bytes) { - assert.strictEqual(err, null); - assert.equal(bytes, buf.length); - clearTimeout(timer); + assert.ifError(err); + assert.strictEqual(bytes, buf.length); client.close(); }); -const timer = setTimeout(function() { - throw new Error('Timeout'); -}, common.platformTimeout(200)); - client.send(buf, common.PORT, common.localhostIPv4, onMessage); From b83b5176d4ad16102efadad1382117fa4b98510c Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 20 Oct 2016 11:38:59 -0400 Subject: [PATCH 094/145] test: add child_process.exec() timeout coverage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds coverage for the timeout option used by child_process exec() and execFile(). PR-URL: https://github.com/nodejs/node/pull/9208 Reviewed-By: Santiago Gimeno Reviewed-By: James M Snell Reviewed-By: Michaël Zasso --- .../test-child-process-exec-timeout.js | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 test/parallel/test-child-process-exec-timeout.js diff --git a/test/parallel/test-child-process-exec-timeout.js b/test/parallel/test-child-process-exec-timeout.js new file mode 100644 index 00000000000000..aef66868373e0d --- /dev/null +++ b/test/parallel/test-child-process-exec-timeout.js @@ -0,0 +1,47 @@ +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const cp = require('child_process'); + +if (process.argv[2] === 'child') { + setTimeout(() => { + // The following console statements are part of the test. + console.log('child stdout'); + console.error('child stderr'); + }, common.platformTimeout(1000)); + return; +} + +const cmd = `${process.execPath} ${__filename} child`; + +// Test the case where a timeout is set, and it expires. +cp.exec(cmd, { timeout: 1 }, common.mustCall((err, stdout, stderr) => { + assert.strictEqual(err.killed, true); + assert.strictEqual(err.code, null); + assert.strictEqual(err.signal, 'SIGTERM'); + assert.strictEqual(err.cmd, cmd); + assert.strictEqual(stdout.trim(), ''); + assert.strictEqual(stderr.trim(), ''); +})); + +// Test with a different kill signal. +cp.exec(cmd, { + timeout: 1, + killSignal: 'SIGKILL' +}, common.mustCall((err, stdout, stderr) => { + assert.strictEqual(err.killed, true); + assert.strictEqual(err.code, null); + assert.strictEqual(err.signal, 'SIGKILL'); + assert.strictEqual(err.cmd, cmd); + assert.strictEqual(stdout.trim(), ''); + assert.strictEqual(stderr.trim(), ''); +})); + +// Test the case where a timeout is set, but not expired. +cp.exec(cmd, { timeout: Math.pow(2, 30) }, + common.mustCall((err, stdout, stderr) => { + assert.ifError(err); + assert.strictEqual(stdout.trim(), 'child stdout'); + assert.strictEqual(stderr.trim(), 'child stderr'); + }) +); From 89eb175c897b5dc34ef23e959ae8ddedcf3563ff Mon Sep 17 00:00:00 2001 From: Brian White Date: Sun, 23 Oct 2016 04:08:18 -0400 Subject: [PATCH 095/145] src: remove unused function PR-URL: https://github.com/nodejs/node/pull/9243 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Ben Noordhuis --- src/inspector_agent.cc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index 3f3d548de4cdf6..cb20bd702f37d1 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -170,13 +170,6 @@ std::string GenerateID() { buffer[7]); return uuid; } - -// std::to_string is not available on Smart OS and ARM flavours -const std::string to_string(uint64_t number) { - std::ostringstream result; - result << number; - return result.str(); -} } // namespace From 8d985c293c742d4143a527dc9f0c8a3f6b453271 Mon Sep 17 00:00:00 2001 From: Jeena Lee Date: Fri, 21 Oct 2016 15:49:35 -0700 Subject: [PATCH 096/145] test: clean up `test-child-process-exec-cwd.js` - Changed `assert.ok()` to `assert.strictEqual()`. - Changed `var` to `const` where possible. PR-URL: https://github.com/nodejs/node/pull/9231 Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Ilkka Myller --- test/parallel/test-child-process-exec-cwd.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-child-process-exec-cwd.js b/test/parallel/test-child-process-exec-cwd.js index b1a24aca761458..3b6e428a4aca65 100644 --- a/test/parallel/test-child-process-exec-cwd.js +++ b/test/parallel/test-child-process-exec-cwd.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../common'); -var assert = require('assert'); -var exec = require('child_process').exec; +const assert = require('assert'); +const exec = require('child_process').exec; var pwdcommand, dir; @@ -15,5 +15,5 @@ if (common.isWindows) { exec(pwdcommand, {cwd: dir}, common.mustCall(function(err, stdout, stderr) { assert.ifError(err); - assert.ok(stdout.indexOf(dir) == 0); + assert.strictEqual(stdout.indexOf(dir), 0); })); From 9cb236ff4519b0723300e8da6aed61662012a580 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Sat, 12 Nov 2016 16:08:59 -0500 Subject: [PATCH 097/145] tls: fix leak of WriteWrap+TLSWrap combination Writing data to TLSWrap instance during handshake will result in it being queued in `write_item_queue_`. This queue won't get cleared up until the end of the handshake. Technically, it gets cleared on `~TLSWrap` invocation, however this won't ever happen because every `WriteWrap` holds a reference to the `TLSWrap` through JS object, meaning that they are doomed to be alive for eternity. To breach this dreadful contract a knight shall embark from the `close` function to kill the dragon of memory leak with his magic spear of `destroySSL`. `destroySSL` cleans up `write_item_queue_` and frees `SSL` structure, both are good for memory usage. PR-URL: https://github.com/nodejs/node/pull/9586 Reviewed-By: Ben Noordhuis --- lib/_tls_wrap.js | 23 ++++++++++++++++++--- test/parallel/test-tls-writewrap-leak.js | 26 ++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 test/parallel/test-tls-writewrap-leak.js diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index b36b90c54ca233..96099388529c20 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -305,14 +305,31 @@ proxiedMethods.forEach(function(name) { }); tls_wrap.TLSWrap.prototype.close = function close(cb) { - if (this.owner) + let ssl; + if (this.owner) { + ssl = this.owner.ssl; this.owner.ssl = null; + } + + // Invoke `destroySSL` on close to clean up possibly pending write requests + // that may self-reference TLSWrap, leading to leak + const done = () => { + if (ssl) { + ssl.destroySSL(); + if (ssl._secureContext.singleUse) { + ssl._secureContext.context.close(); + ssl._secureContext.context = null; + } + } + if (cb) + cb(); + }; if (this._parentWrap && this._parentWrap._handle === this._parent) { - this._parentWrap.once('close', cb); + this._parentWrap.once('close', done); return this._parentWrap.destroy(); } - return this._parent.close(cb); + return this._parent.close(done); }; TLSSocket.prototype._wrapHandle = function(wrap) { diff --git a/test/parallel/test-tls-writewrap-leak.js b/test/parallel/test-tls-writewrap-leak.js new file mode 100644 index 00000000000000..cc55192229531d --- /dev/null +++ b/test/parallel/test-tls-writewrap-leak.js @@ -0,0 +1,26 @@ +'use strict'; +const common = require('../common'); + +if (!common.hasCrypto) { + common.skip('missing crypto'); + return; +} + +const assert = require('assert'); +const net = require('net'); +const tls = require('tls'); + +const server = net.createServer(common.mustCall((c) => { + c.destroy(); +})).listen(0, common.mustCall(() => { + const c = tls.connect({ port: server.address().port }); + c.on('error', () => { + // Otherwise `.write()` callback won't be invoked. + c.destroyed = false; + }); + + c.write('hello', common.mustCall((err) => { + assert.equal(err.code, 'ECANCELED'); + server.close(); + })); +})); From 627c0cb3ee27ef1f62b3eedb95e71370e6dca13c Mon Sep 17 00:00:00 2001 From: Kenneth Skovhus Date: Wed, 16 Nov 2016 19:06:15 +0100 Subject: [PATCH 098/145] doc: child_process .stdio accepts a String type Document that `execFileSync`, `execSync` and `spawnSync` also support `stdio` as an Array. PR-URL: https://github.com/nodejs/node/pull/9637 Fixes: https://github.com/nodejs/node/issues/9636 Reviewed-By: Jeremiah Senkpiel Reviewed-By: Colin Ihrig Reviewed-By: Sam Roberts Reviewed-By: James M Snell Reviewed-By: Roman Reiss --- doc/api/child_process.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/child_process.md b/doc/api/child_process.md index 5497201fcfa227..1cf30f440e5d71 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -575,7 +575,7 @@ added: v0.11.12 * `input` {String|Buffer} The value which will be passed as stdin to the spawned process - supplying this value will override `stdio[0]` - * `stdio` {Array} Child's stdio configuration. (Default: `'pipe'`) + * `stdio` {String | Array} Child's stdio configuration. (Default: `'pipe'`) - `stderr` by default will be output to the parent process' stderr unless `stdio` is specified * `env` {Object} Environment key-value pairs @@ -613,7 +613,7 @@ added: v0.11.12 * `input` {String|Buffer} The value which will be passed as stdin to the spawned process - supplying this value will override `stdio[0]` - * `stdio` {Array} Child's stdio configuration. (Default: `'pipe'`) + * `stdio` {String | Array} Child's stdio configuration. (Default: `'pipe'`) - `stderr` by default will be output to the parent process' stderr unless `stdio` is specified * `env` {Object} Environment key-value pairs @@ -657,7 +657,7 @@ added: v0.11.12 * `input` {String|Buffer} The value which will be passed as stdin to the spawned process - supplying this value will override `stdio[0]` - * `stdio` {Array} Child's stdio configuration. + * `stdio` {String | Array} Child's stdio configuration. * `env` {Object} Environment key-value pairs * `uid` {Number} Sets the user identity of the process. (See setuid(2).) * `gid` {Number} Sets the group identity of the process. (See setgid(2).) From 0c32b03bdcc5105b8eb446c3a956757e0ed725f3 Mon Sep 17 00:00:00 2001 From: BethGriggs Date: Mon, 24 Oct 2016 23:25:22 +0100 Subject: [PATCH 099/145] test: remove err timer from test-http-set-timeout Removed the errorTimer from test-http-set-timeout.js, as this timer is not necessary to test the setTimeout functionality. Also edited the console.log message on line 8 to log the correct timeout duration. Changed var to const, and added common.mustCall() to on timeout and on error callbacks. Fixes: https://github.com/nodejs/node/issues/9256 PR-URL: https://github.com/nodejs/node/pull/9264 Reviewed-By: Rich Trott Reviewed-By: James M Snell --- test/parallel/test-http-set-timeout.js | 32 +++++++++++--------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/test/parallel/test-http-set-timeout.js b/test/parallel/test-http-set-timeout.js index 08777d30d22570..e8df29e0ccdc67 100644 --- a/test/parallel/test-http-set-timeout.js +++ b/test/parallel/test-http-set-timeout.js @@ -1,32 +1,26 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); -var http = require('http'); -var net = require('net'); +const common = require('../common'); +const assert = require('assert'); +const http = require('http'); +const net = require('net'); var server = http.createServer(function(req, res) { - console.log('got request. setting 1 second timeout'); - var s = req.connection.setTimeout(500); - assert.ok(s instanceof net.Socket); - req.connection.on('timeout', function() { + console.log('got request. setting 500ms timeout'); + var socket = req.connection.setTimeout(500); + assert.ok(socket instanceof net.Socket); + req.connection.on('timeout', common.mustCall(function() { req.connection.destroy(); console.error('TIMEOUT'); server.close(); - }); + })); }); server.listen(0, function() { console.log(`Server running at http://127.0.0.1:${this.address().port}/`); - var errorTimer = setTimeout(function() { - throw new Error('Timeout was not successful'); - }, common.platformTimeout(2000)); - - var x = http.get({port: this.address().port, path: '/'}); - x.on('error', function() { - clearTimeout(errorTimer); + var request = http.get({port: this.address().port, path: '/'}); + request.on('error', common.mustCall(function() { console.log('HTTP REQUEST COMPLETE (this is good)'); - }); - x.end(); - + })); + request.end(); }); From 88e60c21241c150861247d697bd706179878bcb0 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 24 Oct 2016 22:54:30 +0200 Subject: [PATCH 100/145] test: use strict assertions in module loader test Replace calls to assert.equal() and assert.notEqual() with assert.strictEqual() and assert.strictNotEqual() respectively. PR-URL: https://github.com/nodejs/node/pull/9263 Reviewed-By: Colin Ihrig Reviewed-By: Evan Lucas Reviewed-By: James M Snell Reviewed-By: Rich Trott --- test/sequential/test-module-loading.js | 97 +++++++++++++------------- 1 file changed, 49 insertions(+), 48 deletions(-) diff --git a/test/sequential/test-module-loading.js b/test/sequential/test-module-loading.js index 2f07bf55cf9766..b32434f4d89ddb 100644 --- a/test/sequential/test-module-loading.js +++ b/test/sequential/test-module-loading.js @@ -7,20 +7,20 @@ var fs = require('fs'); console.error('load test-module-loading.js'); // assert that this is the main module. -assert.equal(require.main.id, '.', 'main module should have id of \'.\''); -assert.equal(require.main, module, 'require.main should === module'); -assert.equal(process.mainModule, module, - 'process.mainModule should === module'); +assert.strictEqual(require.main.id, '.', 'main module should have id of \'.\''); +assert.strictEqual(require.main, module, 'require.main should === module'); +assert.strictEqual(process.mainModule, module, + 'process.mainModule should === module'); // assert that it's *not* the main module in the required module. require('../fixtures/not-main-module.js'); // require a file with a request that includes the extension var a_js = require('../fixtures/a.js'); -assert.equal(42, a_js.number); +assert.strictEqual(42, a_js.number); // require a file without any extensions var foo_no_ext = require('../fixtures/foo'); -assert.equal('ok', foo_no_ext.foo); +assert.strictEqual('ok', foo_no_ext.foo); var a = require('../fixtures/a'); var c = require('../fixtures/b/c'); @@ -31,54 +31,54 @@ var d3 = require(path.join(__dirname, '../fixtures/b/d')); // Relative var d4 = require('../fixtures/b/d'); -assert.equal(false, false, 'testing the test program.'); +assert.strictEqual(false, false, 'testing the test program.'); assert.ok(a.A instanceof Function); -assert.equal('A', a.A()); +assert.strictEqual('A', a.A()); assert.ok(a.C instanceof Function); -assert.equal('C', a.C()); +assert.strictEqual('C', a.C()); assert.ok(a.D instanceof Function); -assert.equal('D', a.D()); +assert.strictEqual('D', a.D()); assert.ok(d.D instanceof Function); -assert.equal('D', d.D()); +assert.strictEqual('D', d.D()); assert.ok(d2.D instanceof Function); -assert.equal('D', d2.D()); +assert.strictEqual('D', d2.D()); assert.ok(d3.D instanceof Function); -assert.equal('D', d3.D()); +assert.strictEqual('D', d3.D()); assert.ok(d4.D instanceof Function); -assert.equal('D', d4.D()); +assert.strictEqual('D', d4.D()); assert.ok((new a.SomeClass()) instanceof c.SomeClass); console.error('test index.js modules ids and relative loading'); const one = require('../fixtures/nested-index/one'); const two = require('../fixtures/nested-index/two'); -assert.notEqual(one.hello, two.hello); +assert.notStrictEqual(one.hello, two.hello); console.error('test index.js in a folder with a trailing slash'); const three = require('../fixtures/nested-index/three'); const threeFolder = require('../fixtures/nested-index/three/'); const threeIndex = require('../fixtures/nested-index/three/index.js'); -assert.equal(threeFolder, threeIndex); -assert.notEqual(threeFolder, three); +assert.strictEqual(threeFolder, threeIndex); +assert.notStrictEqual(threeFolder, three); console.error('test package.json require() loading'); -assert.equal(require('../fixtures/packages/main').ok, 'ok', - 'Failed loading package'); -assert.equal(require('../fixtures/packages/main-index').ok, 'ok', - 'Failed loading package with index.js in main subdir'); +assert.strictEqual(require('../fixtures/packages/main').ok, 'ok', + 'Failed loading package'); +assert.strictEqual(require('../fixtures/packages/main-index').ok, 'ok', + 'Failed loading package with index.js in main subdir'); console.error('test cycles containing a .. path'); const root = require('../fixtures/cycles/root'); const foo = require('../fixtures/cycles/folder/foo'); -assert.equal(root.foo, foo); -assert.equal(root.sayHello(), root.hello); +assert.strictEqual(root.foo, foo); +assert.strictEqual(root.sayHello(), root.hello); console.error('test node_modules folders'); // asserts are in the fixtures files themselves, @@ -97,23 +97,24 @@ try { require('../fixtures/throws_error'); } catch (e) { errorThrown = true; - assert.equal('blah', e.message); + assert.strictEqual('blah', e.message); } -assert.equal(require('path').dirname(__filename), __dirname); +assert.strictEqual(require('path').dirname(__filename), __dirname); console.error('load custom file types with extensions'); require.extensions['.test'] = function(module, filename) { var content = fs.readFileSync(filename).toString(); - assert.equal('this is custom source\n', content); + assert.strictEqual('this is custom source\n', content); content = content.replace('this is custom source', 'exports.test = \'passed\''); module._compile(content, filename); }; -assert.equal(require('../fixtures/registerExt').test, 'passed'); +assert.strictEqual(require('../fixtures/registerExt').test, 'passed'); // unknown extension, load as .js -assert.equal(require('../fixtures/registerExt.hello.world').test, 'passed'); +assert.strictEqual(require('../fixtures/registerExt.hello.world').test, + 'passed'); console.error('load custom file types that return non-strings'); require.extensions['.test'] = function(module, filename) { @@ -122,16 +123,16 @@ require.extensions['.test'] = function(module, filename) { }; }; -assert.equal(require('../fixtures/registerExt2').custom, 'passed'); +assert.strictEqual(require('../fixtures/registerExt2').custom, 'passed'); -assert.equal(require('../fixtures/foo').foo, 'ok', - 'require module with no extension'); +assert.strictEqual(require('../fixtures/foo').foo, 'ok', + 'require module with no extension'); // Should not attempt to load a directory try { require('../fixtures/empty'); } catch (err) { - assert.equal(err.message, 'Cannot find module \'../fixtures/empty\''); + assert.strictEqual(err.message, 'Cannot find module \'../fixtures/empty\''); } // Check load order is as expected @@ -143,31 +144,31 @@ const msg = 'Load order incorrect.'; require.extensions['.reg'] = require.extensions['.js']; require.extensions['.reg2'] = require.extensions['.js']; -assert.equal(require(loadOrder + 'file1').file1, 'file1', msg); -assert.equal(require(loadOrder + 'file2').file2, 'file2.js', msg); +assert.strictEqual(require(loadOrder + 'file1').file1, 'file1', msg); +assert.strictEqual(require(loadOrder + 'file2').file2, 'file2.js', msg); try { require(loadOrder + 'file3'); } catch (e) { // Not a real .node module, but we know we require'd the right thing. assert.ok(e.message.replace(/\\/g, '/').match(/file3\.node/)); } -assert.equal(require(loadOrder + 'file4').file4, 'file4.reg', msg); -assert.equal(require(loadOrder + 'file5').file5, 'file5.reg2', msg); -assert.equal(require(loadOrder + 'file6').file6, 'file6/index.js', msg); +assert.strictEqual(require(loadOrder + 'file4').file4, 'file4.reg', msg); +assert.strictEqual(require(loadOrder + 'file5').file5, 'file5.reg2', msg); +assert.strictEqual(require(loadOrder + 'file6').file6, 'file6/index.js', msg); try { require(loadOrder + 'file7'); } catch (e) { assert.ok(e.message.replace(/\\/g, '/').match(/file7\/index\.node/)); } -assert.equal(require(loadOrder + 'file8').file8, 'file8/index.reg', msg); -assert.equal(require(loadOrder + 'file9').file9, 'file9/index.reg2', msg); +assert.strictEqual(require(loadOrder + 'file8').file8, 'file8/index.reg', msg); +assert.strictEqual(require(loadOrder + 'file9').file9, 'file9/index.reg2', msg); // make sure that module.require() is the same as // doing require() inside of that module. var parent = require('../fixtures/module-require/parent/'); var child = require('../fixtures/module-require/child/'); -assert.equal(child.loaded, parent.loaded); +assert.strictEqual(child.loaded, parent.loaded); // #1357 Loading JSON files with require() @@ -256,29 +257,29 @@ assert.throws(function() { process.on('exit', function() { assert.ok(a.A instanceof Function); - assert.equal('A done', a.A()); + assert.strictEqual('A done', a.A()); assert.ok(a.C instanceof Function); - assert.equal('C done', a.C()); + assert.strictEqual('C done', a.C()); assert.ok(a.D instanceof Function); - assert.equal('D done', a.D()); + assert.strictEqual('D done', a.D()); assert.ok(d.D instanceof Function); - assert.equal('D done', d.D()); + assert.strictEqual('D done', d.D()); assert.ok(d2.D instanceof Function); - assert.equal('D done', d2.D()); + assert.strictEqual('D done', d2.D()); - assert.equal(true, errorThrown); + assert.strictEqual(true, errorThrown); console.log('exit'); }); // #1440 Loading files with a byte order marker. -assert.equal(42, require('../fixtures/utf8-bom.js')); -assert.equal(42, require('../fixtures/utf8-bom.json')); +assert.strictEqual(42, require('../fixtures/utf8-bom.js')); +assert.strictEqual(42, require('../fixtures/utf8-bom.json')); // Error on the first line of a module should // have the correct line number From 2388648beabd0387bcba039d58a71f3c8882cee1 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 23 Oct 2016 22:00:37 -0700 Subject: [PATCH 101/145] tools: make --repeat work with -j in test.py The repeat option in test.py did not work as expected if `-j` was set to more than one. Repeated tests running at the same time could share temp directories and cause test failures. This was observed with: tools/test.py -J --repeat=10 parallel/test-fs-watch-recursive By using copy.deepCopy(), the repeated tests are separate objects and not references to the same objects. Setting `thread_id` on one of them will now not change the `thread_id` on all of them. And `thread_id` is how the temp directory (and common.PORT as well) are determined. Refs: https://github.com/nodejs/node/pull/9228 PR-URL: https://github.com/nodejs/node/pull/9249 Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Gibson Fahnestock Reviewed-By: Michael Dawson Reviewed-By: James M Snell Reviewed-By: Santiago Gimeno --- tools/test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/test.py b/tools/test.py index 05cd9243449d27..6e1840b7672006 100755 --- a/tools/test.py +++ b/tools/test.py @@ -42,6 +42,7 @@ import utils import multiprocessing import errno +import copy from os.path import join, dirname, abspath, basename, isdir, exists from datetime import datetime @@ -792,7 +793,9 @@ def AddTestsToList(self, result, current_path, path, context, arch, mode): tests = self.GetConfiguration(context).ListTests(current_path, path, arch, mode) for t in tests: t.variant_flags = v - result += tests * context.repeat + result += tests + for i in range(1, context.repeat): + result += copy.deepcopy(tests) def GetTestStatus(self, context, sections, defs): self.GetConfiguration(context).GetTestStatus(sections, defs) From 1d54f07b31da7dbde967e017773d57b7c719cf5f Mon Sep 17 00:00:00 2001 From: Deverick Date: Thu, 20 Oct 2016 23:32:34 -0500 Subject: [PATCH 102/145] test: refactor /parallel/test-cluster-uncaught-exception.js to ES6 Replaces function expressions with ES6 arrow functions as well as improve the comparison operator to check if operands are of same types. PR-URL: https://github.com/nodejs/node/pull/9239 Reviewed-By: James M Snell Reviewed-By: Rich Trott --- .../test-cluster-uncaught-exception.js | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/test/parallel/test-cluster-uncaught-exception.js b/test/parallel/test-cluster-uncaught-exception.js index 1091b6fec759a1..69d0a3095e7368 100644 --- a/test/parallel/test-cluster-uncaught-exception.js +++ b/test/parallel/test-cluster-uncaught-exception.js @@ -4,26 +4,23 @@ // https://github.com/joyent/node/issues/2556 const common = require('../common'); -var assert = require('assert'); -var cluster = require('cluster'); -var fork = require('child_process').fork; +const assert = require('assert'); +const cluster = require('cluster'); +const fork = require('child_process').fork; -var MAGIC_EXIT_CODE = 42; +const MAGIC_EXIT_CODE = 42; -var isTestRunner = process.argv[2] != 'child'; +const isTestRunner = process.argv[2] !== 'child'; if (isTestRunner) { - var master = fork(__filename, ['child']); - master.on('exit', common.mustCall(function(code) { + const master = fork(__filename, ['child']); + master.on('exit', common.mustCall((code) => { assert.strictEqual(code, MAGIC_EXIT_CODE); })); } else if (cluster.isMaster) { - process.on('uncaughtException', function() { - process.nextTick(function() { - process.exit(MAGIC_EXIT_CODE); - }); - }); - + process.on('uncaughtException', common.mustCall(() => { + process.nextTick(() => process.exit(MAGIC_EXIT_CODE)); + })); cluster.fork(); throw new Error('kill master'); } else { // worker From 52a04bbfe2226570c7848da753ae0476be4e2e13 Mon Sep 17 00:00:00 2001 From: Alejandro Oviedo Garcia Date: Mon, 17 Oct 2016 14:16:04 -0300 Subject: [PATCH 103/145] util: use template strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit changes string manipulation in favor of template literals in the `util` module. PR-URL: https://github.com/nodejs/node/pull/9120 Reviewed-By: James M Snell Reviewed-By: Michaël Zasso Reviewed-By: Luigi Pinca --- lib/util.js | 52 ++++++++++++++++++++++++---------------------------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/lib/util.js b/lib/util.js index edec19bf791ce3..95c69248e07282 100644 --- a/lib/util.js +++ b/lib/util.js @@ -144,7 +144,7 @@ exports.debuglog = function(set) { debugEnviron = process.env.NODE_DEBUG || ''; set = set.toUpperCase(); if (!debugs[set]) { - if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { + if (new RegExp(`\\b${set}\\b`, 'i').test(debugEnviron)) { var pid = process.pid; debugs[set] = function() { var msg = exports.format.apply(exports, arguments); @@ -239,8 +239,8 @@ function stylizeWithColor(str, styleType) { var style = inspect.styles[styleType]; if (style) { - return '\u001b[' + inspect.colors[style][0] + 'm' + str + - '\u001b[' + inspect.colors[style][1] + 'm'; + return `\u001b[${inspect.colors[style][0]}m${str}` + + `\u001b[${inspect.colors[style][1]}m`; } else { return str; } @@ -402,8 +402,8 @@ function formatValue(ctx, value, recurseTimes) { // Some type of object without properties can be shortcutted. if (keys.length === 0) { if (typeof value === 'function') { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); + return ctx.stylize(`[Function${value.name ? `: ${value.name}` : ''}]`, + 'special'); } if (isRegExp(value)) { return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); @@ -421,19 +421,19 @@ function formatValue(ctx, value, recurseTimes) { // now check the `raw` value to handle boxed primitives if (typeof raw === 'string') { formatted = formatPrimitiveNoColor(ctx, raw); - return ctx.stylize('[String: ' + formatted + ']', 'string'); + return ctx.stylize(`[String: ${formatted}]`, 'string'); } if (typeof raw === 'symbol') { formatted = formatPrimitiveNoColor(ctx, raw); - return ctx.stylize('[Symbol: ' + formatted + ']', 'symbol'); + return ctx.stylize(`[Symbol: ${formatted}]`, 'symbol'); } if (typeof raw === 'number') { formatted = formatPrimitiveNoColor(ctx, raw); - return ctx.stylize('[Number: ' + formatted + ']', 'number'); + return ctx.stylize(`[Number: ${formatted}]`, 'number'); } if (typeof raw === 'boolean') { formatted = formatPrimitiveNoColor(ctx, raw); - return ctx.stylize('[Boolean: ' + formatted + ']', 'boolean'); + return ctx.stylize(`[Boolean: ${formatted}]`, 'boolean'); } // Fast path for ArrayBuffer and SharedArrayBuffer. // Can't do the same for DataView because it has a non-primitive @@ -535,8 +535,7 @@ function formatValue(ctx, value, recurseTimes) { // Make functions say that they are functions if (typeof value === 'function') { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; + base = ` [Function${value.name ? `: ${value.name}` : ''}]`; } // Make RegExps say that they are RegExps @@ -557,24 +556,24 @@ function formatValue(ctx, value, recurseTimes) { // Make boxed primitive Strings look like such if (typeof raw === 'string') { formatted = formatPrimitiveNoColor(ctx, raw); - base = ' ' + '[String: ' + formatted + ']'; + base = ` [String: ${formatted}]`; } // Make boxed primitive Numbers look like such if (typeof raw === 'number') { formatted = formatPrimitiveNoColor(ctx, raw); - base = ' ' + '[Number: ' + formatted + ']'; + base = ` [Number: ${formatted}]`; } // Make boxed primitive Booleans look like such if (typeof raw === 'boolean') { formatted = formatPrimitiveNoColor(ctx, raw); - base = ' ' + '[Boolean: ' + formatted + ']'; + base = ` [Boolean: ${formatted}]`; } // Add constructor name if available if (base === '' && constructor) - braces[0] = constructor.name + ' ' + braces[0]; + braces[0] = `${constructor.name} ${braces[0]}`; if (empty === true) { return braces[0] + base + braces[1]; @@ -646,7 +645,7 @@ function formatPrimitiveNoColor(ctx, value) { function formatError(value) { - return value.stack || '[' + Error.prototype.toString.call(value) + ']'; + return value.stack || `[${Error.prototype.toString.call(value)}]`; } @@ -782,9 +781,9 @@ function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { } if (!hasOwnProperty(visibleKeys, key)) { if (typeof key === 'symbol') { - name = '[' + ctx.stylize(key.toString(), 'symbol') + ']'; + name = `[${ctx.stylize(key.toString(), 'symbol')}]`; } else { - name = '[' + key + ']'; + name = `[${key}]`; } } if (!str) { @@ -822,7 +821,7 @@ function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { } } - return name + ': ' + str; + return `${name}: ${str}`; } @@ -837,13 +836,10 @@ function reduceToSingleString(output, base, braces, breakLength) { // we need to force the first item to be on the next line or the // items will not line up correctly. (base === '' && braces[0].length === 1 ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; + ` ${output.join(',\n ')} ${braces[1]}`; } - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; + return `${braces[0]}${base} ${output.join(', ')} ${braces[1]}`; } @@ -1007,7 +1003,7 @@ exports.puts = internalUtil.deprecate(function() { exports.debug = internalUtil.deprecate(function(x) { - process.stderr.write('DEBUG: ' + x + '\n'); + process.stderr.write(`DEBUG: ${x}\n`); }, 'util.debug is deprecated. Use console.error instead.'); @@ -1020,7 +1016,7 @@ exports.error = internalUtil.deprecate(function(x) { exports._errnoException = function(err, syscall, original) { var errname = uv.errname(err); - var message = syscall + ' ' + errname; + var message = `${syscall} ${errname}`; if (original) message += ' ' + original; var e = new Error(message); @@ -1038,13 +1034,13 @@ exports._exceptionWithHostPort = function(err, additional) { var details; if (port && port > 0) { - details = address + ':' + port; + details = `${address}:${port}`; } else { details = address; } if (additional) { - details += ' - Local (' + additional + ')'; + details += ` - Local (${additional})`; } var ex = exports._errnoException(err, syscall, details); ex.address = address; From ed3de0854ed0e3c148dfbcdab624f85da04db52a Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 20 Oct 2016 16:47:33 +0200 Subject: [PATCH 104/145] repl: make `key` of `repl.write()` optional always MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In `.editor` mode, `repl.write()` would have crashed when the `key` argument was not present, because the overwritten `_ttyWrite` of REPLs doesn’t check for the absence of a second argument like `readline.write()` does. Since the docs indicate that the argument is optional, add a check paralleling the one in `readline.write()`. PR-URL: https://github.com/nodejs/node/pull/9207 Reviewed-By: Prince John Wesley Reviewed-By: James M Snell --- lib/repl.js | 1 + test/parallel/test-repl-.editor.js | 21 +++++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/lib/repl.js b/lib/repl.js index 9568b6914cb9d4..a42d958d330099 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -601,6 +601,7 @@ function REPLServer(prompt, // Wrap readline tty to enable editor mode const ttyWrite = self._ttyWrite.bind(self); self._ttyWrite = (d, key) => { + key = key || {}; if (!self.editorMode || !self.terminal) { ttyWrite(d, key); return; diff --git a/test/parallel/test-repl-.editor.js b/test/parallel/test-repl-.editor.js index 556662181f7831..4077840c596376 100644 --- a/test/parallel/test-repl-.editor.js +++ b/test/parallel/test-repl-.editor.js @@ -8,16 +8,17 @@ const repl = require('repl'); // \u001b[0J - Clear screen // \u001b[3G - Moves the cursor to 3rd column const terminalCode = '\u001b[1G\u001b[0J> \u001b[3G'; +const terminalCodeRegex = new RegExp(terminalCode.replace(/\[/g, '\\['), 'g'); -function run({input, output, event}) { +function run({input, output, event, checkTerminalCodes = true}) { const stream = new common.ArrayStream(); let found = ''; stream.write = (msg) => found += msg.replace('\r', ''); - const expected = `${terminalCode}.editor\n` + - '// Entering editor mode (^D to finish, ^C to cancel)\n' + - `${input}${output}\n${terminalCode}`; + let expected = `${terminalCode}.editor\n` + + '// Entering editor mode (^D to finish, ^C to cancel)\n' + + `${input}${output}\n${terminalCode}`; const replServer = repl.start({ prompt: '> ', @@ -31,6 +32,12 @@ function run({input, output, event}) { stream.emit('data', input); replServer.write('', event); replServer.close(); + + if (!checkTerminalCodes) { + found = found.replace(terminalCodeRegex, '').replace(/\n/g, ''); + expected = expected.replace(terminalCodeRegex, '').replace(/\n/g, ''); + } + assert.strictEqual(found, expected); } @@ -54,6 +61,12 @@ const tests = [ input: ' var i = 1;\ni + 3', output: '\n4', event: {ctrl: true, name: 'd'} + }, + { + input: '', + output: '', + checkTerminalCodes: false, + event: null, } ]; From 58b60fc79de641c741a65abfb7d035488ace95a5 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 20 Oct 2016 16:57:40 +0200 Subject: [PATCH 105/145] =?UTF-8?q?repl:=20don=E2=80=99t=20write=20to=20in?= =?UTF-8?q?put=20stream=20in=20editor=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of writing to the REPL’s input stream for the alignment spaces in `.editor` mode, let `readline` handle the spaces properly (echoing them using `_ttyWrite` and adding them to the current line buffer). Fixes: https://github.com/nodejs/node/issues/9189 PR-URL: https://github.com/nodejs/node/pull/9207 Reviewed-By: Prince John Wesley Reviewed-By: James M Snell --- lib/repl.js | 2 +- test/parallel/test-repl-.editor.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/repl.js b/lib/repl.js index a42d958d330099..c4ecced77837fc 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -476,7 +476,7 @@ function REPLServer(prompt, const matches = self._sawKeyPress ? cmd.match(/^\s+/) : null; if (matches) { const prefix = matches[0]; - self.inputStream.write(prefix); + self.write(prefix); self.line = prefix; self.cursor = prefix.length; } diff --git a/test/parallel/test-repl-.editor.js b/test/parallel/test-repl-.editor.js index 4077840c596376..678d6d5c6d94f8 100644 --- a/test/parallel/test-repl-.editor.js +++ b/test/parallel/test-repl-.editor.js @@ -75,12 +75,15 @@ tests.forEach(run); // Auto code alignment for .editor mode function testCodeAligment({input, cursor = 0, line = ''}) { const stream = new common.ArrayStream(); + const outputStream = new common.ArrayStream(); + + stream.write = () => { throw new Error('Writing not allowed!'); }; const replServer = repl.start({ prompt: '> ', terminal: true, input: stream, - output: stream, + output: outputStream, useColors: false }); From 5eeac8cc576391784ca827ed8daf66c204573553 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Thu, 7 Jul 2016 16:31:19 +1000 Subject: [PATCH 106/145] benchmark: add microbenchmarks for ES Map PR-URL: https://github.com/nodejs/node/pull/7581 Reviewed-By: James M Snell Reviewed-By: Franziska Hinkelmann --- benchmark/es/map-bench.js | 96 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 benchmark/es/map-bench.js diff --git a/benchmark/es/map-bench.js b/benchmark/es/map-bench.js new file mode 100644 index 00000000000000..574da25d53f2f2 --- /dev/null +++ b/benchmark/es/map-bench.js @@ -0,0 +1,96 @@ +'use strict'; + +const common = require('../common.js'); +const assert = require('assert'); + +const bench = common.createBenchmark(main, { + method: ['object', 'nullProtoObject', 'fakeMap', 'map'], + millions: [1] +}); + +function runObject(n) { + const m = {}; + var i = 0; + bench.start(); + for (; i < n; i++) { + m['i' + i] = i; + m['s' + i] = String(i); + assert.equal(m['i' + i], m['s' + i]); + m['i' + i] = undefined; + m['s' + i] = undefined; + } + bench.end(n / 1e6); +} + +function runNullProtoObject(n) { + const m = Object.create(null); + var i = 0; + bench.start(); + for (; i < n; i++) { + m['i' + i] = i; + m['s' + i] = String(i); + assert.equal(m['i' + i], m['s' + i]); + m['i' + i] = undefined; + m['s' + i] = undefined; + } + bench.end(n / 1e6); +} + +function fakeMap() { + const m = {}; + return { + get(key) { return m['$' + key]; }, + set(key, val) { m['$' + key] = val; }, + get size() { return Object.keys(m).length; }, + has(key) { return Object.prototype.hasOwnProperty.call(m, '$' + key); } + }; +} + +function runFakeMap(n) { + const m = fakeMap(); + var i = 0; + bench.start(); + for (; i < n; i++) { + m.set('i' + i, i); + m.set('s' + i, String(i)); + assert.equal(m.get('i' + i), m.get('s' + i)); + m.set('i' + i, undefined); + m.set('s' + i, undefined); + } + bench.end(n / 1e6); +} + +function runMap(n) { + const m = new Map(); + var i = 0; + bench.start(); + for (; i < n; i++) { + m.set('i' + i, i); + m.set('s' + i, String(i)); + assert.equal(m.get('i' + i), m.get('s' + i)); + m.set('i' + i, undefined); + m.set('s' + i, undefined); + } + bench.end(n / 1e6); +} + +function main(conf) { + const n = +conf.millions * 1e6; + + switch (conf.method) { + case 'object': + runObject(n); + break; + case 'nullProtoObject': + runNullProtoObject(n); + break; + case 'fakeMap': + runFakeMap(n); + break; + case 'map': + runMap(n); + break; + default: + throw new Error('Unexpected method'); + } +} From 4fcc2c1d3bd64df5c3e6c66f8ee2c28cad56ee3f Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 26 Oct 2016 16:50:11 -0700 Subject: [PATCH 107/145] test: run all of test-timers-blocking-callback The test has two test cases, but only the first was being run due to a small bug. This change fixes the bug. PR-URL: https://github.com/nodejs/node/pull/9305 Reviewed-By: Julien Gilli Reviewed-By: Colin Ihrig --- test/parallel/test-timers-blocking-callback.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-timers-blocking-callback.js b/test/parallel/test-timers-blocking-callback.js index aff28d1df7ef25..e4e85cddc6302d 100644 --- a/test/parallel/test-timers-blocking-callback.js +++ b/test/parallel/test-timers-blocking-callback.js @@ -56,24 +56,24 @@ function blockingCallback(callback) { common.busyLoop(TIMEOUT); timeCallbackScheduled = Timer.now(); - setTimeout(blockingCallback, TIMEOUT); + setTimeout(blockingCallback.bind(null, callback), TIMEOUT); } } -function testAddingTimerToEmptyTimersList(callback) { +const testAddingTimerToEmptyTimersList = common.mustCall(function(callback) { initTest(); // Call setTimeout just once to make sure the timers list is // empty when blockingCallback is called. setTimeout(blockingCallback.bind(null, callback), TIMEOUT); -} +}); -function testAddingTimerToNonEmptyTimersList() { +const testAddingTimerToNonEmptyTimersList = common.mustCall(function() { initTest(); // Call setTimeout twice with the same timeout to make // sure the timers list is not empty when blockingCallback is called. setTimeout(blockingCallback, TIMEOUT); setTimeout(blockingCallback, TIMEOUT); -} +}); // Run the test for the empty timers list case, and then for the non-empty // timers list one From c857586fd7d0fcf2786d0113b336e9de76f124f9 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Fri, 21 Oct 2016 17:13:42 -0600 Subject: [PATCH 108/145] build: use wxneeded on openbsd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On OpenBSD 6.0 and greater W^X is enabled by default. All executables that violate W^X need to be marked with PT_OPENBSD_WXNEEDED. In addition to this, they must be executed from a filesystem mounted with 'wxallowed'. More info on W^X: https://en.wikipedia.org/wiki/W%5EX PR-URL: https://github.com/nodejs/node/pull/9232 Reviewed-By: James M Snell Reviewed-By: Johan Bergström Reviewed-By: Ben Noordhuis --- common.gypi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common.gypi b/common.gypi index 01ab2def6e0f29..8a3179dae597f0 100644 --- a/common.gypi +++ b/common.gypi @@ -275,6 +275,9 @@ ['_type=="static_library" and OS=="solaris"', { 'standalone_static_library': 1, }], + ['OS=="openbsd"', { + 'ldflags': [ '-Wl,-z,wxneeded' ], + }], ], 'conditions': [ [ 'target_arch=="ia32"', { From 4ef7f00e2d6bec52e6c016ddd24afa31275a2d4a Mon Sep 17 00:00:00 2001 From: Gerges Beshay Date: Wed, 26 Oct 2016 17:24:45 +0000 Subject: [PATCH 109/145] test: refactor test-async-wrap-check-providers * use 'strictEqual' instead of 'equal' * use '!==' instead of '!=' PR-URL: https://github.com/nodejs/node/pull/9297 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- test/parallel/test-async-wrap-check-providers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-async-wrap-check-providers.js b/test/parallel/test-async-wrap-check-providers.js index 7d4815fda1795f..28544538f1124a 100644 --- a/test/parallel/test-async-wrap-check-providers.js +++ b/test/parallel/test-async-wrap-check-providers.js @@ -31,7 +31,7 @@ if (common.isAix) { } function init(id, provider) { - keyList = keyList.filter((e) => e != pkeys[provider]); + keyList = keyList.filter((e) => e !== pkeys[provider]); } function noop() { } @@ -114,6 +114,6 @@ process.on('exit', function() { if (keyList.length !== 0) { process._rawDebug('Not all keys have been used:'); process._rawDebug(keyList); - assert.equal(keyList.length, 0); + assert.strictEqual(keyList.length, 0); } }); From 8b2b08a636f1e7a800f6d78578405da7919aa1ba Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 26 Oct 2016 15:44:10 -0700 Subject: [PATCH 110/145] test: fix flaky test-fs-watch-recursive on OS X The test was sometimes timing out due to a race condition. In OS X, events for `fs.watch()` might only start showing up after a delay. This is a limitation of the operating system. To work around that, there was a timer in the test that delayed the writing of the file by 100ms. However, sometimes that was not enough, and so the event never fired, and the test timed out. Change the timer to an interval so that it fires repeatedly until it is picked up. This change only affects OS X. Fixes: https://github.com/nodejs/node/issues/8511 PR-URL: https://github.com/nodejs/node/pull/9303 Reviewed-By: Colin Ihrig Reviewed-By: Santiago Gimeno --- test/parallel/test-fs-watch-recursive.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-fs-watch-recursive.js b/test/parallel/test-fs-watch-recursive.js index 05dfb32178c438..97c65fccf4a1fb 100644 --- a/test/parallel/test-fs-watch-recursive.js +++ b/test/parallel/test-fs-watch-recursive.js @@ -30,14 +30,17 @@ watcher.on('change', function(event, filename) { if (filename !== relativePathOne) return; + if (common.isOSX) { + clearInterval(interval); + } watcher.close(); watcherClosed = true; }); -if (process.platform === 'darwin') { - setTimeout(function() { +if (common.isOSX) { + var interval = setInterval(function() { fs.writeFileSync(filepathOne, 'world'); - }, 100); + }, 10); } else { fs.writeFileSync(filepathOne, 'world'); } From ce05b70595be0639dd93f11913916907c43a6af7 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 26 Oct 2016 20:56:08 -0700 Subject: [PATCH 111/145] test: fix freebsd10-64 CI failures Remove unneeded timers from some tests and move others from parallel testing to sequential testing. This is to resolve test failures on freebsd10-64 on CI. The failures are all due to timers firing later than expected. Timers firing later than they are set for can happen on resource-constrained hosts and is not a bug. In general, it may be wise to put tests that depend on timing into sequential testing rather than parallel testing, as the timing can be affected by other simultaneously-running test processes. Fixes: https://github.com/nodejs/node/issues/8041 Fixes: https://github.com/nodejs/node/issues/9227 PR-URL: https://github.com/nodejs/node/pull/9317 Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: Gibson Fahnestock Reviewed-By: Julien Gilli Reviewed-By: Johan Bergstrom Reviewed-By: Santiago Gimeno --- .../test-dgram-send-callback-multi-buffer.js | 5 ----- test/parallel/test-dgram-send-multi-buffer-copy.js | 5 ----- ...ls-server-failed-handshake-emits-clienterror.js | 14 +++----------- .../test-http-client-timeout-with-data.js | 0 .../test-http-server-consumed-timeout.js | 0 .../test-timers-blocking-callback.js | 0 .../test-timers-same-timeout-wrong-list-deleted.js | 0 7 files changed, 3 insertions(+), 21 deletions(-) rename test/{parallel => sequential}/test-http-client-timeout-with-data.js (100%) rename test/{parallel => sequential}/test-http-server-consumed-timeout.js (100%) rename test/{parallel => sequential}/test-timers-blocking-callback.js (100%) rename test/{parallel => sequential}/test-timers-same-timeout-wrong-list-deleted.js (100%) diff --git a/test/parallel/test-dgram-send-callback-multi-buffer.js b/test/parallel/test-dgram-send-callback-multi-buffer.js index 3004bfe39b8203..a60d42cc45d49e 100644 --- a/test/parallel/test-dgram-send-callback-multi-buffer.js +++ b/test/parallel/test-dgram-send-callback-multi-buffer.js @@ -6,13 +6,8 @@ const dgram = require('dgram'); const client = dgram.createSocket('udp4'); -const timer = setTimeout(function() { - throw new Error('Timeout'); -}, common.platformTimeout(200)); - const messageSent = common.mustCall(function messageSent(err, bytes) { assert.equal(bytes, buf1.length + buf2.length); - clearTimeout(timer); }); const buf1 = Buffer.alloc(256, 'x'); diff --git a/test/parallel/test-dgram-send-multi-buffer-copy.js b/test/parallel/test-dgram-send-multi-buffer-copy.js index 19222dac5fbd11..0b7f003335b545 100644 --- a/test/parallel/test-dgram-send-multi-buffer-copy.js +++ b/test/parallel/test-dgram-send-multi-buffer-copy.js @@ -6,13 +6,8 @@ const dgram = require('dgram'); const client = dgram.createSocket('udp4'); -const timer = setTimeout(function() { - throw new Error('Timeout'); -}, common.platformTimeout(200)); - const onMessage = common.mustCall(function(err, bytes) { assert.equal(bytes, buf1.length + buf2.length); - clearTimeout(timer); }); const buf1 = Buffer.alloc(256, 'x'); diff --git a/test/parallel/test-tls-server-failed-handshake-emits-clienterror.js b/test/parallel/test-tls-server-failed-handshake-emits-clienterror.js index a404dc904ba7b7..bd92dc28904183 100644 --- a/test/parallel/test-tls-server-failed-handshake-emits-clienterror.js +++ b/test/parallel/test-tls-server-failed-handshake-emits-clienterror.js @@ -11,7 +11,6 @@ const assert = require('assert'); const bonkers = Buffer.alloc(1024, 42); -let tlsClientErrorEmited = false; const server = tls.createServer({}) .listen(0, function() { @@ -19,19 +18,12 @@ const server = tls.createServer({}) c.write(bonkers); }); - }).on('tlsClientError', function(e) { - tlsClientErrorEmited = true; + }).on('tlsClientError', common.mustCall(function(e) { assert.ok(e instanceof Error, 'Instance of Error should be passed to error handler'); assert.ok(e.message.match( /SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol/), 'Expecting SSL unknown protocol'); - }); -setTimeout(function() { - server.close(); - - assert.ok(tlsClientErrorEmited, - 'tlsClientError should be emited'); - -}, common.platformTimeout(200)); + server.close(); + })); diff --git a/test/parallel/test-http-client-timeout-with-data.js b/test/sequential/test-http-client-timeout-with-data.js similarity index 100% rename from test/parallel/test-http-client-timeout-with-data.js rename to test/sequential/test-http-client-timeout-with-data.js diff --git a/test/parallel/test-http-server-consumed-timeout.js b/test/sequential/test-http-server-consumed-timeout.js similarity index 100% rename from test/parallel/test-http-server-consumed-timeout.js rename to test/sequential/test-http-server-consumed-timeout.js diff --git a/test/parallel/test-timers-blocking-callback.js b/test/sequential/test-timers-blocking-callback.js similarity index 100% rename from test/parallel/test-timers-blocking-callback.js rename to test/sequential/test-timers-blocking-callback.js diff --git a/test/parallel/test-timers-same-timeout-wrong-list-deleted.js b/test/sequential/test-timers-same-timeout-wrong-list-deleted.js similarity index 100% rename from test/parallel/test-timers-same-timeout-wrong-list-deleted.js rename to test/sequential/test-timers-same-timeout-wrong-list-deleted.js From bec1ccae9979745448439815acd13762543623fb Mon Sep 17 00:00:00 2001 From: Isobel Redelmeier Date: Wed, 26 Oct 2016 19:59:32 -0700 Subject: [PATCH 112/145] test: clean up dgram-broadcast-multi-process test Use assert.strictEqual() instead of assert.equal(), === instead of ==, and const instead of var. PR-URL: https://github.com/nodejs/node/pull/9308 Reviewed-By: Rich Trott Reviewed-By: Bryan English Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- .../test-dgram-broadcast-multi-process.js | 43 +++++++++++-------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/test/internet/test-dgram-broadcast-multi-process.js b/test/internet/test-dgram-broadcast-multi-process.js index 1c39baa29741e2..c05d0cf5b9512e 100644 --- a/test/internet/test-dgram-broadcast-multi-process.js +++ b/test/internet/test-dgram-broadcast-multi-process.js @@ -20,15 +20,17 @@ if (common.inFreeBSDJail) { return; } +let bindAddress = null; + // Take the first non-internal interface as the address for binding. // Ideally, this should check for whether or not an interface is set up for // BROADCAST and favor internal/private interfaces. -get_bindAddress: for (var name in networkInterfaces) { - var interfaces = networkInterfaces[name]; - for (var i = 0; i < interfaces.length; i++) { - var localInterface = interfaces[i]; +get_bindAddress: for (const name in networkInterfaces) { + const interfaces = networkInterfaces[name]; + for (let i = 0; i < interfaces.length; i++) { + const localInterface = interfaces[i]; if (!localInterface.internal && localInterface.family === 'IPv4') { - var bindAddress = localInterface.address; + bindAddress = localInterface.address; break get_bindAddress; } } @@ -56,9 +58,9 @@ if (process.argv[2] !== 'child') { }, TIMEOUT); //launch child processes - for (var x = 0; x < listeners; x++) { + for (let x = 0; x < listeners; x++) { (function() { - var worker = fork(process.argv[1], ['child']); + const worker = fork(process.argv[1], ['child']); workers[worker.pid] = worker; worker.messagesReceived = []; @@ -68,7 +70,7 @@ if (process.argv[2] !== 'child') { // don't consider this the true death if the worker // has finished successfully // or if the exit code is 0 - if (worker.isDone || code == 0) { + if (worker.isDone || code === 0) { return; } @@ -113,12 +115,12 @@ if (process.argv[2] !== 'child') { 'messages. Will now compare.'); Object.keys(workers).forEach(function(pid) { - var worker = workers[pid]; + const worker = workers[pid]; - var count = 0; + let count = 0; worker.messagesReceived.forEach(function(buf) { - for (var i = 0; i < messages.length; ++i) { + for (let i = 0; i < messages.length; ++i) { if (buf.toString() === messages[i].toString()) { count++; break; @@ -130,8 +132,11 @@ if (process.argv[2] !== 'child') { worker.pid, count); - assert.equal(count, messages.length, - 'A worker received an invalid multicast message'); + assert.strictEqual( + count, + messages.length, + 'A worker received an invalid multicast message' + ); }); clearTimeout(timer); @@ -143,7 +148,7 @@ if (process.argv[2] !== 'child') { })(x); } - var sendSocket = dgram.createSocket({ + const sendSocket = dgram.createSocket({ type: 'udp4', reuseAddr: true }); @@ -160,7 +165,7 @@ if (process.argv[2] !== 'child') { }); sendSocket.sendNext = function() { - var buf = messages[i++]; + const buf = messages[i++]; if (!buf) { try { sendSocket.close(); } catch (e) {} @@ -186,15 +191,15 @@ if (process.argv[2] !== 'child') { function killChildren(children) { Object.keys(children).forEach(function(key) { - var child = children[key]; + const child = children[key]; child.kill(); }); } } if (process.argv[2] === 'child') { - var receivedMessages = []; - var listenSocket = dgram.createSocket({ + const receivedMessages = []; + const listenSocket = dgram.createSocket({ type: 'udp4', reuseAddr: true }); @@ -212,7 +217,7 @@ if (process.argv[2] === 'child') { process.send({message: buf.toString()}); - if (receivedMessages.length == messages.length) { + if (receivedMessages.length === messages.length) { process.nextTick(function() { listenSocket.close(); }); From 7c90d9638ab820c0110332e947a2de4485d84421 Mon Sep 17 00:00:00 2001 From: kobelb Date: Fri, 28 Oct 2016 07:27:03 -0400 Subject: [PATCH 113/145] doc: update OpenSSL links PR-URL: https://github.com/nodejs/node/pull/9338 Reviewed-By: James M Snell Reviewed-By: Sam Roberts Reviewed-By: Roman Reiss --- BUILDING.md | 2 +- doc/api/crypto.md | 12 ++++++------ doc/api/https.md | 4 ++-- doc/api/tls.md | 12 ++++++------ 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 7749574a993ee1..2fe919328edd62 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -230,7 +230,7 @@ as `deps/icu` (You'll have: `deps/icu/source/...`) NOTE: Windows is not yet supported It is possible to build Node.js with -[OpenSSL FIPS module](https://www.openssl.org/docs/fips/fipsnotes.html). +[OpenSSL FIPS module](https://www.openssl.org/docs/fipsnotes.html). **Note**: building in this way does **not** allow you to claim that the runtime is FIPS 140-2 validated. Instead you can indicate that the runtime diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 3c8ba2ae247f43..ebe247c2761e20 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -1633,20 +1633,20 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL. SSL_OP_ALL Applies multiple bug workarounds within OpenSSL. See - https://www.openssl.org/docs/manmaster/ssl/SSL_CTX_set_options.html for + https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See - https://www.openssl.org/docs/manmaster/ssl/SSL_CTX_set_options.html. + https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. SSL_OP_CIPHER_SERVER_PREFERENCE Uses the server's preferences instead of the clients when selecting a cipher. See - https://www.openssl.org/docs/manmaster/ssl/SSL_CTX_set_options.html. + https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. SSL_OP_CISCO_ANYCONNECT @@ -1949,7 +1949,7 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL. [`ecdh.generateKeys()`]: #crypto_ecdh_generatekeys_encoding_format [`ecdh.setPrivateKey()`]: #crypto_ecdh_setprivatekey_private_key_encoding [`ecdh.setPublicKey()`]: #crypto_ecdh_setpublickey_public_key_encoding -[`EVP_BytesToKey`]: https://www.openssl.org/docs/crypto/EVP_BytesToKey.html +[`EVP_BytesToKey`]: https://www.openssl.org/docs/man1.0.2/crypto/EVP_BytesToKey.html [`hash.digest()`]: #crypto_hash_digest_encoding [`hash.update()`]: #crypto_hash_update_data_input_encoding [`hmac.digest()`]: #crypto_hmac_digest_encoding @@ -1964,8 +1964,8 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL. [initialization vector]: https://en.wikipedia.org/wiki/Initialization_vector [NIST SP 800-131A]: http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar1.pdf [NIST SP 800-132]: http://csrc.nist.gov/publications/nistpubs/800-132/nist-sp800-132.pdf -[OpenSSL cipher list format]: https://www.openssl.org/docs/apps/ciphers.html#CIPHER-LIST-FORMAT -[OpenSSL's SPKAC implementation]: https://www.openssl.org/docs/apps/spkac.html +[OpenSSL cipher list format]: https://www.openssl.org/docs/man1.0.2/apps/ciphers.html#CIPHER-LIST-FORMAT +[OpenSSL's SPKAC implementation]: https://www.openssl.org/docs/man1.0.2/apps/spkac.html [publicly trusted list of CAs]: https://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt [RFC 2412]: https://www.rfc-editor.org/rfc/rfc2412.txt [RFC 3526]: https://www.rfc-editor.org/rfc/rfc3526.txt diff --git a/doc/api/https.md b/doc/api/https.md index bc0e4114c39761..3af6dedcd914e7 100644 --- a/doc/api/https.md +++ b/doc/api/https.md @@ -203,7 +203,7 @@ The following options from [`tls.connect()`][] can also be specified. However, a certificates in PEM format. If this is omitted several well known "root" CAs will be used, like VeriSign. These are used to authorize connections. - `ciphers`: A string describing the ciphers to use or exclude. Consult - for + for details on the format. - `rejectUnauthorized`: If `true`, the server certificate is verified against the list of supplied CAs. An `'error'` event is emitted if verification @@ -267,7 +267,7 @@ var req = https.request(options, (res) => { [`http.Server`]: http.html#http_class_http_server [`https.Agent`]: #https_class_https_agent [`https.request()`]: #https_https_request_options_callback -[`SSL_METHODS`]: https://www.openssl.org/docs/ssl/ssl.html#DEALING-WITH-PROTOCOL-METHODS +[`SSL_METHODS`]: https://www.openssl.org/docs/man1.0.2/ssl/ssl.html#DEALING-WITH-PROTOCOL-METHODS [`tls.connect()`]: tls.html#tls_tls_connect_options_callback [`tls.createServer()`]: tls.html#tls_tls_createserver_options_secureconnectionlistener [`url.parse()`]: url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost diff --git a/doc/api/tls.md b/doc/api/tls.md index c7daa8f181820e..6180d91b667e67 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -535,7 +535,7 @@ that first defined the cipher. For example: `{ name: 'AES256-SHA', version: 'TLSv1/SSLv3' }` See `SSL_CIPHER_get_name()` and `SSL_CIPHER_get_version()` in -https://www.openssl.org/docs/manmaster/ssl/SSL_CIPHER_get_name.html for more +https://www.openssl.org/docs/man1.0.2/ssl/SSL_CIPHER_get_name.html for more information. ### tlsSocket.getEphemeralKeyInfo() @@ -611,7 +611,7 @@ Example responses include: * `TLSv1.2` * `unknown` -See https://www.openssl.org/docs/manmaster/ssl/SSL_get_version.html for more +See https://www.openssl.org/docs/man1.0.2/ssl/SSL_get_version.html for more information. ### tlsSocket.getSession() @@ -936,7 +936,7 @@ added: v0.11.13 CRLs (Certificate Revocation List). * `ciphers` {string} A string describing the ciphers to use or exclude. Consult - + for details on the format. * `honorCipherOrder` {boolean} If `true`, when a cipher is being selected, the server's preferences will be used instead of the client preferences. @@ -1252,7 +1252,7 @@ secure_socket = tls.TLSSocket(socket, options); where `secure_socket` has the same API as `pair.cleartext`. -[OpenSSL cipher list format documentation]: https://www.openssl.org/docs/apps/ciphers.html#CIPHER-LIST-FORMAT +[OpenSSL cipher list format documentation]: https://www.openssl.org/docs/man1.0.2/apps/ciphers.html#CIPHER-LIST-FORMAT [Chrome's 'modern cryptography' setting]: https://www.chromium.org/Home/chromium-security/education/tls#TOC-Cipher-Suites [specific attacks affecting larger AES key sizes]: https://www.schneier.com/blog/archives/2009/07/another_new_aes.html [`crypto.getCurves()`]: crypto.html#crypto_crypto_getcurves @@ -1266,9 +1266,9 @@ where `secure_socket` has the same API as `pair.cleartext`. [`'secureConnection'`]: #tls_event_secureconnection [Perfect Forward Secrecy]: #tls_perfect_forward_secrecy [Stream]: stream.html#stream_stream -[SSL_METHODS]: https://www.openssl.org/docs/ssl/ssl.html#DEALING-WITH-PROTOCOL-METHODS +[SSL_METHODS]: https://www.openssl.org/docs/man1.0.2/ssl/ssl.html#DEALING-WITH-PROTOCOL-METHODS [tls.Server]: #tls_class_tls_server -[SSL_CTX_set_timeout]: https://www.openssl.org/docs/ssl/SSL_CTX_set_timeout.html +[SSL_CTX_set_timeout]: https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_timeout.html [Forward secrecy]: https://en.wikipedia.org/wiki/Perfect_forward_secrecy [DHE]: https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange [ECDHE]: https://en.wikipedia.org/wiki/Elliptic_curve_Diffie%E2%80%93Hellman From c379c29e1f9f215c1aa69edb4d945eddeac7ecb0 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 31 Oct 2016 15:59:08 +0200 Subject: [PATCH 114/145] doc: fs: fix link to mkdtemp PR-URL: https://github.com/nodejs/node/pull/9379 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Prince John Wesley Reviewed-By: Luigi Pinca Reviewed-By: Roman Reiss --- doc/api/fs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index cac42e97fab44d..2e440d76ab4066 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -2190,7 +2190,7 @@ The following constants are meant for use with the [`fs.Stats`][] object's [`fs.FSWatcher`]: #fs_class_fs_fswatcher [`fs.futimes()`]: #fs_fs_futimes_fd_atime_mtime_callback [`fs.lstat()`]: #fs_fs_lstat_path_callback -[`fs.mkdtemp()`]: #fs_fs_mkdtemp_prefix_callback +[`fs.mkdtemp()`]: #fs_fs_mkdtemp_prefix_options_callback [`fs.open()`]: #fs_fs_open_path_flags_mode_callback [`fs.read()`]: #fs_fs_read_fd_buffer_offset_length_position_callback [`fs.readFile`]: #fs_fs_readfile_file_options_callback @@ -2217,4 +2217,4 @@ The following constants are meant for use with the [`fs.Stats`][] object's [`event ports`]: http://illumos.org/man/port_create [`ReadDirectoryChangesW`]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365465%28v=vs.85%29.aspx [`AHAFS`]: https://www.ibm.com/developerworks/aix/library/au-aix_event_infrastructure/ -[Common System Errors]: errors.html#errors_common_system_errors \ No newline at end of file +[Common System Errors]: errors.html#errors_common_system_errors From c31fa2468f47fd351be9ed192916fdeecd418c77 Mon Sep 17 00:00:00 2001 From: Jesse McCarthy Date: Wed, 26 Oct 2016 08:30:07 -0400 Subject: [PATCH 115/145] doc: fix broken links to Buffer.from(string) PR-URL: https://github.com/nodejs/node/pull/9294 Reviewed-By: Colin Ihrig Reviewed-By: Prince John Wesley Reviewed-By: James M Snell Reviewed-By: Roman Reiss --- doc/api/buffer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index df0a2a357d0836..0e945db427ee88 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -2396,7 +2396,7 @@ console.log(buf); [`Buffer.from(array)`]: #buffer_class_method_buffer_from_array [`Buffer.from(arrayBuffer)`]: #buffer_class_method_buffer_from_arraybuffer_byteoffset_length [`Buffer.from(buffer)`]: #buffer_class_method_buffer_from_buffer -[`Buffer.from(string)`]: #buffer_class_method_buffer_from_str_encoding +[`Buffer.from(string)`]: #buffer_class_method_buffer_from_string_encoding [`Buffer.poolSize`]: #buffer_class_property_buffer_poolsize [`RangeError`]: errors.html#errors_class_rangeerror [`util.inspect()`]: util.html#util_util_inspect_object_options From 5e1fd2822e75d2f7c4c5576d28c3ca4702c795a7 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 28 Oct 2016 11:21:50 -0700 Subject: [PATCH 116/145] test: refactor test-http-client-readable * var -> const * remove function names where V8 inference is as good or better * add function names where there is no V8 inference * assert.equal -> strictEqual * move assertion from exit handler to response end handler PR-URL: https://github.com/nodejs/node/pull/9344 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Gibson Fahnestock Reviewed-By: Luigi Pinca --- test/parallel/test-http-client-readable.js | 32 ++++++++++------------ 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/test/parallel/test-http-client-readable.js b/test/parallel/test-http-client-readable.js index 3c50dc74f1fccf..e49181cedf63d6 100644 --- a/test/parallel/test-http-client-readable.js +++ b/test/parallel/test-http-client-readable.js @@ -1,21 +1,21 @@ 'use strict'; const common = require('../common'); -var assert = require('assert'); -var http = require('http'); -var util = require('util'); +const assert = require('assert'); +const http = require('http'); +const util = require('util'); -var Duplex = require('stream').Duplex; +const Duplex = require('stream').Duplex; function FakeAgent() { http.Agent.call(this); } util.inherits(FakeAgent, http.Agent); -FakeAgent.prototype.createConnection = function createConnection() { - var s = new Duplex(); +FakeAgent.prototype.createConnection = function() { + const s = new Duplex(); var once = false; - s._read = function _read() { + s._read = function() { if (once) return this.push(null); once = true; @@ -27,11 +27,11 @@ FakeAgent.prototype.createConnection = function createConnection() { }; // Blackhole - s._write = function _write(data, enc, cb) { + s._write = function(data, enc, cb) { cb(); }; - s.destroy = s.destroySoon = function destroy() { + s.destroy = s.destroySoon = function() { this.writable = false; }; @@ -40,17 +40,15 @@ FakeAgent.prototype.createConnection = function createConnection() { var received = ''; -var req = http.request({ +const req = http.request({ agent: new FakeAgent() -}, common.mustCall(function(res) { - res.on('data', function(chunk) { +}, common.mustCall(function requestCallback(res) { + res.on('data', function dataCallback(chunk) { received += chunk; }); - res.on('end', common.mustCall(function() {})); + res.on('end', common.mustCall(function endCallback() { + assert.strictEqual(received, 'hello world'); + })); })); req.end(); - -process.on('exit', function() { - assert.equal(received, 'hello world'); -}); From a178abfae615de4b06de3e0e9956bd0aa242416c Mon Sep 17 00:00:00 2001 From: jedireza Date: Sat, 29 Oct 2016 15:54:27 -0700 Subject: [PATCH 117/145] lib: change == to === in linkedlist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also removed a TODO comment that is no longer viable and left a note about the potentially confusing property naming convention for future readers. PR-URL: https://github.com/nodejs/node/pull/9362 Reviewed-By: Rich Trott Reviewed-By: Brian White Reviewed-By: Bryan English Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Michaël Zasso Reviewed-By: Roman Reiss --- lib/internal/linkedlist.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/linkedlist.js b/lib/internal/linkedlist.js index 15f06c0efe8f05..40bca91de25803 100644 --- a/lib/internal/linkedlist.js +++ b/lib/internal/linkedlist.js @@ -16,7 +16,7 @@ exports.create = create; // show the most idle item function peek(list) { - if (list._idlePrev == list) return null; + if (list._idlePrev === list) return null; return list._idlePrev; } exports.peek = peek; @@ -54,7 +54,7 @@ function append(list, item) { } // items are linked with _idleNext -> (older) and _idlePrev -> (newer) - // TODO: swap the linkage to match the intuitive older items at "prev" + // Note: This linkage (next being older) may seem counter-intuitive at first. item._idleNext = list._idleNext; item._idlePrev = list; From 5d971afc04ff1e48fd972ae411e87f186f5fff5b Mon Sep 17 00:00:00 2001 From: Yangyang Liu Date: Tue, 25 Oct 2016 15:04:13 -0500 Subject: [PATCH 118/145] doc: fix outdate ninja link PR-URL: https://github.com/nodejs/node/pull/9278 Reviewed-By: Roman Reiss --- doc/guides/building-node-with-ninja.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/guides/building-node-with-ninja.md b/doc/guides/building-node-with-ninja.md index a9a3a922ed6820..027c267e2b243d 100644 --- a/doc/guides/building-node-with-ninja.md +++ b/doc/guides/building-node-with-ninja.md @@ -35,4 +35,4 @@ The above alias can be modified slightly to produce a debug build, rather than a `alias nnodedebug='./configure --ninja && ninja -C out/Debug && ln -fs out/Debug/node node_g'` -[Ninja]: https://martine.github.io/ninja/ +[Ninja]: https://ninja-build.org/ From 6908bc4ed7c22bfe2f05603572d1d33158836d08 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Fri, 28 Oct 2016 13:41:47 -0700 Subject: [PATCH 119/145] doc: add more internal links to fs.Stats object PR-URL: https://github.com/nodejs/node/pull/9345 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Roman Reiss --- doc/api/fs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index 2e440d76ab4066..4d2dd06694625e 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -877,7 +877,7 @@ added: v0.1.95 * `fd` {Integer} -Synchronous fstat(2). Returns an instance of `fs.Stats`. +Synchronous fstat(2). Returns an instance of [`fs.Stats`][]. ## fs.fsync(fd, callback)