[Pkg-javascript-commits] [node-bluebird] 03/05: New upstream version 3.5.0+dfsg1

Ross Gammon ross-guest at moszumanska.debian.org
Sun Oct 1 15:34:18 UTC 2017


This is an automated email from the git hooks/post-receive script.

ross-guest pushed a commit to branch master
in repository node-bluebird.

commit 75b7f31f99dba534fb9c3866986255d8da84ca64
Author: Ross Gammon <rosco2 at ubuntu.com>
Date:   Sat Apr 29 19:16:04 2017 +0200

    New upstream version 3.5.0+dfsg1
---
 .jshintrc                              |   1 +
 LICENSE                                |   2 +-
 README.md                              |   2 +-
 bower.json                             |   2 +-
 docs/_config.yml                       |   2 +-
 docs/_layouts/default.html             |   2 +-
 docs/docs/api-reference.md             |   1 +
 docs/docs/api/disposer.md              |   8 +-
 docs/docs/api/operationalerror.md      |   4 +-
 docs/docs/api/progression-migration.md |   2 +-
 docs/docs/api/promise.config.md        |   2 +-
 docs/docs/api/promise.coroutine.md     |  12 +--
 docs/docs/api/promise.each.md          |   5 +-
 docs/docs/api/return.md                |   4 +-
 docs/docs/api/tap.md                   |   4 +-
 docs/docs/api/tapcatch.md              | 128 ++++++++++++++++++++++++++++++++
 docs/docs/async-dialogs.md             |   8 +-
 docs/docs/benchmarks.md                | 116 ++++++++++++++---------------
 docs/docs/changelog.md                 |  24 ++++++
 docs/docs/warning-explanations.md      |   2 +-
 docs/img/README.txt                    |   1 +
 docs/img/libbblog_v3.png               | Bin 0 -> 12834 bytes
 package.json                           |   3 +-
 src/async.js                           |   6 --
 src/constants.js                       |   1 +
 src/debuggability.js                   |   5 +-
 src/finally.js                         |  39 +++++++++-
 src/generators.js                      |   2 +-
 src/promise.js                         |  22 +++---
 src/promise_array.js                   |   1 +
 src/props.js                           |   2 +-
 src/queue.js                           |  17 -----
 src/schedule.js                        |   8 +-
 src/util.js                            |   8 +-
 test/mocha/cancel.js                   |  18 ++++-
 test/mocha/generator.js                |  40 +++++++---
 test/mocha/props.js                    |   7 ++
 test/mocha/tapCatch.js                 | 130 +++++++++++++++++++++++++++++++++
 test/mocha/using.js                    |   5 --
 tools/build.js                         |   4 +-
 tools/job-runner/job-runner.js         |   2 +-
 tools/mocha_runner.js                  |   4 +-
 tools/utils.js                         |   2 -
 43 files changed, 498 insertions(+), 160 deletions(-)

diff --git a/.jshintrc b/.jshintrc
index 50a1202..a1c8ee4 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -118,6 +118,7 @@
         "RESOLVE_OBJECT": false,
         "RESOLVE_FOREVER_PENDING": false,
         "RESOLVE_CALL_METHOD": false,
+        "RESOLVE_MAP": false,
         "QUEUE_MAX_CAPACITY": false,
         "QUEUE_MIN_CAPACITY": false,
         "FROM_PREVIOUS_EVENT": false,
diff --git a/LICENSE b/LICENSE
index 4182a1e..ae732d5 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
 The MIT License (MIT)
 
-Copyright (c) 2013-2015 Petka Antonov
+Copyright (c) 2013-2017 Petka Antonov
 
 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/README.md b/README.md
index 3772161..b7e02b1 100644
--- a/README.md
+++ b/README.md
@@ -29,7 +29,7 @@ Thanks to BrowserStack for providing us with a free account which lets us suppor
 
 The MIT License (MIT)
 
-Copyright (c) 2013-2016 Petka Antonov
+Copyright (c) 2013-2017 Petka Antonov
 
 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/bower.json b/bower.json
index 2c472df..d996398 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
 {
   "name": "bluebird",
-  "version": "3.4.6",
+  "version": "3.5.0",
   "homepage": "https://github.com/petkaantonov/bluebird",
   "authors": [
     "Petka Antonov <petka_antonov at hotmail.com>"
diff --git a/docs/_config.yml b/docs/_config.yml
index cd77184..1bfea4f 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -19,7 +19,7 @@ markdown: redcarpet
 redcarpet:
   extensions:
     - fenced_code_blocks
-version: 3.4.6
+version: 3.5.0
 gems:
   - jekyll-redirect-from
 destination: ../gh-pages/
diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html
index eb45b67..0807c1d 100644
--- a/docs/_layouts/default.html
+++ b/docs/_layouts/default.html
@@ -34,7 +34,7 @@
                 </button>
 
                 <a href="/" class="title">
-                    <img src="{{ "/img/logo.png" | prepend: site.baseurl }}" class="hidden-xs" />
+                    <img src="{{ "/img/libbblog_v3.png" | prepend: site.baseurl }}" class="hidden-xs" alt="bluebird logo" />
 
                     <span class="tagline">bluebird</span>
                 </a>
diff --git a/docs/docs/api-reference.md b/docs/docs/api-reference.md
index c8d13ed..778ff62 100644
--- a/docs/docs/api-reference.md
+++ b/docs/docs/api-reference.md
@@ -67,6 +67,7 @@ redirect_from: "/docs/api/index.html"
     - [Promise.coroutine.addYieldHandler](api/promise.coroutine.addyieldhandler.html)
 - [Utility](api/utility.html)
     - [.tap](api/tap.html)
+    - [.tapCatch](api/tapCatch.html)
     - [.call](api/call.html)
     - [.get](api/get.html)
     - [.return](api/return.html)
diff --git a/docs/docs/api/disposer.md b/docs/docs/api/disposer.md
index 0eea6bd..9bdcb0f 100644
--- a/docs/docs/api/disposer.md
+++ b/docs/docs/api/disposer.md
@@ -15,7 +15,7 @@ title: .disposer
 
 A meta method used to specify the disposer method that cleans up a resource when using [`Promise.using`](/docs/api/promise.using.html).
 
-Returns a Disposer object which encapsulates both the resource as well as the method to clean it up. The user can pass this object to `Promise.using` to get access to the resource when it becomes available, as well as to ensure its automatically cleaned up.
+Returns a Disposer object which encapsulates both the resource as well as the method to clean it up. The user can pass this object to `Promise.using` to get access to the resource when it becomes available, as well as to ensure it's automatically cleaned up.
 
 The second argument passed to a disposer is the result promise of the using block, which you can inspect synchronously.
 
@@ -80,7 +80,7 @@ Real example 2:
 
 ```js
 var mysql = require("mysql");
-// Uncomment if pg has not been properly promisified yet
+// Uncomment if mysql has not been properly promisified yet
 // var Promise = require("bluebird");
 // Promise.promisifyAll(mysql);
 // Promise.promisifyAll(require("mysql/lib/Connection").prototype);
@@ -103,11 +103,11 @@ module.exports = getSqlConnection;
 
 #### Note about disposers in node
 
-If a disposer method throws or returns a rejected promise, its highly likely that it failed to dispose of the resource. In that case, Bluebird has two options - it can either ignore the error and continue with program execution or throw an exception (crashing the process in node.js).
+If a disposer method throws or returns a rejected promise, it's highly likely that it failed to dispose of the resource. In that case, Bluebird has two options - it can either ignore the error and continue with program execution or throw an exception (crashing the process in node.js).
 
 In bluebird we've chosen to do the latter because resources are typically scarce. For example, if a database connection cannot be disposed of and Bluebird ignores that, the connection pool will be quickly depleted and the process will become unusable (all requests that query the database will wait forever). Since Bluebird doesn't know how to handle that, the only sensible default is to crash the process. That way, rather than getting a useless process that cannot fulfill more requests, w [...]
 
-As a result, if you anticipate thrown errors or promise rejections while disposing of the resource you should use a `try..catch` block (or Promise.try) and write the appropriate catch code to handle the errors. If its not possible to sensibly handle the error, letting the process crash is the next best option.
+As a result, if you anticipate thrown errors or promise rejections while disposing of the resource you should use a `try..catch` block (or Promise.try) and write the appropriate catch code to handle the errors. If it's not possible to sensibly handle the error, letting the process crash is the next best option.
 
 This also means that disposers should not contain code that does anything other than resource disposal. For example, you cannot write code inside a disposer to commit or rollback a transaction, because there is no mechanism for the disposer to signal a failure of the commit or rollback action without crashing the process.
 
diff --git a/docs/docs/api/operationalerror.md b/docs/docs/api/operationalerror.md
index 3705216..67936a8 100644
--- a/docs/docs/api/operationalerror.md
+++ b/docs/docs/api/operationalerror.md
@@ -14,7 +14,7 @@ new OperationalError(String message) -> OperationalError
 ```
 
 
-Represents an error is an explicit promise rejection as opposed to a thrown error. For example, if an error is errbacked by a callback API promisified through undefined or undefined
+Represents an error is an explicit promise rejection as opposed to a thrown error. For example, if an error is errbacked by a callback API promisified through [`Promise.promisify`](.) or [`Promise.promisifyAll`](.)
 and is not a typed error, it will be converted to a `OperationalError` which has the original error in the `.cause` property.
 
 `OperationalError`s are caught in [`.error`](.) handlers.
@@ -32,4 +32,4 @@ and is not a typed error, it will be converted to a `OperationalError` which has
         (document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(dsq);
     })();
 </script>
-<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
\ No newline at end of file
+<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
diff --git a/docs/docs/api/progression-migration.md b/docs/docs/api/progression-migration.md
index 3eae3fb..2e328be 100644
--- a/docs/docs/api/progression-migration.md
+++ b/docs/docs/api/progression-migration.md
@@ -56,7 +56,7 @@ function returnsPromiseWithProgress(progressHandler) {
 }
 
 returnsPromiseWithProgress(function(progress) {
-    ui.progressbar.setWidth((progress * 200) + "px"); // update with on client side
+    ui.progressbar.setWidth((progress * 200) + "px"); // update width on client side
 }).then(function(value) { // action complete
    // entire chain is complete.
 }).catch(function(e) {
diff --git a/docs/docs/api/promise.config.md b/docs/docs/api/promise.config.md
index 7be07f3..4da42dd 100644
--- a/docs/docs/api/promise.config.md
+++ b/docs/docs/api/promise.config.md
@@ -15,7 +15,7 @@ Promise.config(Object {
     longStackTraces: boolean=false,
     cancellation: boolean=false,
     monitoring: boolean=false
-} options) -> undefined;
+} options) -> Object;
 ```
 
 Configure long stack traces, warnings, monitoring and cancellation. Note that even though `false` is the default here, a development environment might be detected which automatically enables long stack traces and warnings.
diff --git a/docs/docs/api/promise.coroutine.md b/docs/docs/api/promise.coroutine.md
index 2aeafe8..ff6e712 100644
--- a/docs/docs/api/promise.coroutine.md
+++ b/docs/docs/api/promise.coroutine.md
@@ -23,15 +23,15 @@ function PingPong() {
 }
 
 PingPong.prototype.ping = Promise.coroutine(function* (val) {
-    console.log("Ping?", val)
-    yield Promise.delay(500)
-    this.pong(val+1)
+    console.log("Ping?", val);
+    yield Promise.delay(500);
+    this.pong(val+1);
 });
 
 PingPong.prototype.pong = Promise.coroutine(function* (val) {
-    console.log("Pong!", val)
+    console.log("Pong!", val);
     yield Promise.delay(500);
-    this.ping(val+1)
+    this.ping(val+1);
 });
 
 var a = new PingPong();
@@ -73,4 +73,4 @@ You are able to yield non-promise values by adding your own yield handler using
         (document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(dsq);
     })();
 </script>
-<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
\ No newline at end of file
+<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
diff --git a/docs/docs/api/promise.each.md b/docs/docs/api/promise.each.md
index ddc3ac1..d8d227d 100644
--- a/docs/docs/api/promise.each.md
+++ b/docs/docs/api/promise.each.md
@@ -19,10 +19,9 @@ Promise.each(
 
 [api/promise.each](unfinished-article)
 
-Iterate over an array, or a promise of an array, which contains promises (or a mix of promises and values) with the given `iterator` function with the signature `(value, index, length)` where `value` is the resolved value of a respective promise in the input array. Iteration happens serially. If any promise in the input array is rejected the returned promise is rejected as well.
-
-Resolves to the original array unmodified, this method is meant to be used for side effects. If the iterator function returns a promise or a thenable, then the result of the promise is awaited, before continuing with next iteration.
+Iterate over an array, or a promise of an array, which contains promises (or a mix of promises and values) with the given `iterator` function with the signature `(value, index, length)` where `value` is the resolved value of a respective promise in the input array. **Iteration happens serially**. If the iterator function returns a promise or a thenable, then the result of the promise is awaited before continuing with next iteration. If any promise in the input array is rejected, then the [...]
 
+Resolves to the original array unmodified. This method is meant to be used for side effects. 
 
 <hr>
 </markdown></div>
diff --git a/docs/docs/api/return.md b/docs/docs/api/return.md
index 60efa5d..6a8adac 100644
--- a/docs/docs/api/return.md
+++ b/docs/docs/api/return.md
@@ -49,7 +49,7 @@ var baseDir = process.argv[2] || ".";
 
 function writeFile(path, contents) {
     var fullpath = require("path").join(baseDir, path);
-    return fs.writeFileAsync(fullpath, contents).thenReturn(fullpath);
+    return fs.writeFileAsync(fullpath, contents).return(fullpath);
 }
 
 writeFile("test.txt", "this is text").then(function(fullPath) {
@@ -72,4 +72,4 @@ writeFile("test.txt", "this is text").then(function(fullPath) {
         (document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(dsq);
     })();
 </script>
-<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
\ No newline at end of file
+<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
diff --git a/docs/docs/api/tap.md b/docs/docs/api/tap.md
index 505e2c2..489cc4b 100644
--- a/docs/docs/api/tap.md
+++ b/docs/docs/api/tap.md
@@ -14,7 +14,7 @@ title: .tap
 ```
 
 
-Like [`.finally`](.) that is not called for rejections.
+Unlike [`.finally`](.) this is not called for rejections.
 
 ```js
 getUser().tap(function(user) {
@@ -60,4 +60,4 @@ doSomething()
         (document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(dsq);
     })();
 </script>
-<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
\ No newline at end of file
+<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
diff --git a/docs/docs/api/tapcatch.md b/docs/docs/api/tapcatch.md
new file mode 100644
index 0000000..079d302
--- /dev/null
+++ b/docs/docs/api/tapcatch.md
@@ -0,0 +1,128 @@
+---
+layout: api
+id: tapCatch
+title: .tapCatch
+---
+
+
+[← Back To API Reference](/docs/api-reference.html)
+<div class="api-code-section"><markdown>
+##.tapCatch
+
+
+`.tapCatch` is a convenience method for reacting to errors without handling them with promises - similar to `finally` but only called on rejections. Useful for logging errors.
+
+It comes in two variants.
+ - A tapCatch-all variant similar to [`.catch`](.) block. This variant is compatible with native promises.
+ - A filtered variant (like other non-JS languages typically have) that lets you only handle specific errors. **This variant is usually preferable**.
+
+
+### `tapCatch` all
+```js
+.tapCatch(function(any value) handler) -> Promise
+```
+
+
+Like [`.finally`](.) that is not called for fulfillments.
+
+```js
+getUser().tapCatch(function(err) {
+    return logErrorToDatabase(err);
+}).then(function(user) {
+    //user is the user from getUser(), not logErrorToDatabase()
+});
+```
+
+Common case includes adding logging to an existing promise chain:
+
+**Rate Limiting**
+```
+Promise.
+  try(logIn).
+  then(respondWithSuccess).
+  tapCatch(countFailuresForRateLimitingPurposes).
+  catch(respondWithError);
+```
+
+**Circuit Breakers**
+```
+Promise.
+  try(makeRequest).
+  then(respondWithSuccess).
+  tapCatch(adjustCircuitBreakerState).
+  catch(respondWithError);
+```
+
+**Logging**
+```
+Promise.
+  try(doAThing).
+  tapCatch(logErrorsRelatedToThatThing).
+  then(respondWithSuccess).
+  catch(respondWithError);
+```
+*Note: in browsers it is necessary to call `.tapCatch` with `console.log.bind(console)` because console methods can not be called as stand-alone functions.*
+
+### Filtered `tapCatch`
+
+
+```js
+.tapCatch(
+    class ErrorClass|function(any error),
+    function(any error) handler
+) -> Promise
+```
+```js
+.tapCatch(
+    class ErrorClass|function(any error),
+    function(any error) handler
+) -> Promise
+
+
+```
+This is an extension to [`.tapCatch`](.) to filter exceptions similarly to languages like Java or C#. Instead of manually checking `instanceof` or `.name === "SomeError"`, you may specify a number of error constructors which are eligible for this tapCatch handler. The tapCatch handler that is first met that has eligible constructors specified, is the one that will be called.
+
+Usage examples include:
+
+**Rate Limiting**
+```
+Bluebird.
+  try(logIn).
+  then(respondWithSuccess).
+  tapCatch(InvalidCredentialsError, countFailuresForRateLimitingPurposes).
+  catch(respondWithError);
+```
+
+**Circuit Breakers**
+```
+Bluebird.
+  try(makeRequest).
+  then(respondWithSuccess).
+  tapCatch(RequestError, adjustCircuitBreakerState).
+  catch(respondWithError);
+```
+
+**Logging**
+```
+Bluebird.
+  try(doAThing).
+  tapCatch(logErrorsRelatedToThatThing).
+  then(respondWithSuccess).
+  catch(respondWithError);
+```
+
+</markdown></div>
+
+<div id="disqus_thread"></div>
+<script type="text/javascript">
+    var disqus_title = ".tap";
+    var disqus_shortname = "bluebirdjs";
+    var disqus_identifier = "disqus-id-tap";
+
+    (function() {
+        var dsq = document.createElement("script"); dsq.type = "text/javascript"; dsq.async = true;
+        dsq.src = "//" + disqus_shortname + ".disqus.com/embed.js";
+        (document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(dsq);
+    })();
+</script>
+<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
diff --git a/docs/docs/async-dialogs.md b/docs/docs/async-dialogs.md
index 77c0fa6..26671ea 100644
--- a/docs/docs/async-dialogs.md
+++ b/docs/docs/async-dialogs.md
@@ -27,7 +27,7 @@ our own DOM based prompt. To begin, here is a template for a simple HTML page:
       clockTick();
       setInterval(clockTick, 1000);
       function clockTick() {
-        time.innerHTML = new Date().toLocalTimeString();
+        time.innerHTML = new Date().toLocaleTimeString();
       }
     });
   </script>
@@ -41,7 +41,7 @@ our own DOM based prompt. To begin, here is a template for a simple HTML page:
 ```
 
 `window.prompt` blocks the web page from processing while it waits for the user
-to enter in data. I has to block because the input is returned and the next
+to enter in data. It has to block because the input is returned and the next
 line of code needs that result. But for sake of this tutorial we are going to
 convert the typical conditional code into a promise API using a [promise
 constructor](api/new-promise.html).
@@ -82,7 +82,7 @@ to `promptPromise()` doesn't care. This makes a change to an *asynchronous*
 dialog a little more future proof.
 
 To drive home the synchronous nature of the `window.prompt` notice that the time
-stops ticking when the prompt dialog is displayed. Lets fix that by making our
+stops ticking when the prompt dialog is displayed. Let's fix that by making our
 own prompt. Since our dialog is just DOM manipulation the page won't be blocked
 while waiting for user input.
 
@@ -530,7 +530,7 @@ ProgressDialog.prototype.setProgress = function(percent) {
 };
 ```
 
-A common misconception is that a promises a form of callback management. This
+A common misconception is that promises are a form of callback management. This
 is not the case and is why the idea of having a progress callback is not part of
 the Promise spec. However, much like the Promise library passes in a `resolve`
 and `reject` callback when you create a new promise (`new Promise(…)`) we can do
diff --git a/docs/docs/benchmarks.md b/docs/docs/benchmarks.md
index fda2342..94b70b5 100644
--- a/docs/docs/benchmarks.md
+++ b/docs/docs/benchmarks.md
@@ -6,21 +6,22 @@ title: Benchmarks
 Benchmarks have been ran with the following versions of modules.
 
 ```
-├── async at 1.5.0
-├── babel at 5.8.29
-├── davy at 1.0.1
-├── deferred at 0.7.3
+├── async at 1.5.2
+├── babel at 5.8.35
+├── davy at 1.1.0
+├── deferred at 0.7.5
 ├── kew at 0.7.0
-├── lie at 3.0.1
-├── neo-async at 1.6.0
+├── lie at 3.0.2
+├── neo-async at 1.7.3
 ├── optimist at 0.6.1
-├── promise at 7.0.4
+├── promise at 7.1.1
 ├── q at 1.4.1
-├── rsvp at 3.1.0
-├── streamline at 1.0.7
+├── rsvp at 3.2.1
+├── streamline at 2.0.16
+├── streamline-runtime at 1.0.38
 ├── text-table at 0.2.0
-├── vow at 0.4.11
-└── when at 3.7.4
+├── vow at 0.4.12
+└── when at 3.7.7
 ```
 
 ###1\. DoxBee sequential
@@ -40,34 +41,35 @@ The implementations for this benchmark are found in [`benchmark/doxbee-sequentia
 results for 10000 parallel executions, 1 ms per I/O op
 
 file                                       time(ms)  memory(MB)
-callbacks-baseline.js                           160       44.53
-callbacks-suguru03-neo-async-waterfall.js       227       47.89
-promises-bluebird-generator.js                  247       37.76
-streamline-callbacks.js                         302       45.64
-promises-bluebird.js                            322       31.92
-promises-cujojs-when.js                         357       60.88
-promises-tildeio-rsvp.js                        419       64.88
-promises-lvivski-davy.js                        543      109.81
-callbacks-caolan-async-waterfall.js             557      102.08
-promises-then-promise.js                        609      124.34
-promises-dfilatov-vow.js                        632      138.27
-streamline-generators.js                        647       73.85
-promises-calvinmetcalf-lie.js                   661      130.81
-generators-tj-co.js                             789      137.84
-promises-ecmascript6-native.js                  847      182.71
-promises-obvious-kew.js                        1240      254.99
-promises-medikoo-deferred.js                   2053      201.29
-observables-Reactive-Extensions-RxJS.js        2430      279.24
-observables-pozadi-kefir.js                    2559      159.62
-observables-baconjs-bacon.js.js               18482      883.22
-promises-kriskowal-q.js                       23081      876.11
-observables-caolan-highland.js                28138      517.57
+callbacks-baseline.js                            87       24.27
+callbacks-suguru03-neo-async-waterfall.js       116       35.96
+promises-bluebird-generator.js                  180       38.39
+promises-bluebird.js                            209       52.41
+promises-cujojs-when.js                         287       70.73
+promises-then-promise.js                        293       78.07
+promises-tildeio-rsvp.js                        366       91.94
+callbacks-caolan-async-waterfall.js             428      103.80
+promises-dfilatov-vow.js                        491      135.49
+promises-lvivski-davy.js                        503      128.99
+generators-tj-co.js                             565      113.61
+promises-calvinmetcalf-lie.js                   567      159.27
+promises-ecmascript6-native.js                  658      157.39
+promises-obvious-kew.js                         676      213.68
+promises-medikoo-deferred.js                    850      183.01
+observables-pozadi-kefir.js                     975      188.22
+observables-Reactive-Extensions-RxJS.js        1208      265.21
+streamline-generators.js                       2216      126.47
+observables-caolan-highland.js                 4844      537.79
+promises-kriskowal-q.js                        4950      380.89
+observables-baconjs-bacon.js.js               14924      802.07
+streamline-callbacks.js                       38855      197.81
 
 Platform info:
-Linux 3.13.0-32-generic x64
-Node.JS 4.2.1
-V8 4.5.103.35
-Intel(R) Core(TM) i7-4900MQ CPU @ 2.80GHz × 8
+Linux 4.4.0-64-generic x64
+Node.JS 7.7.1
+V8 5.5.372.41
+Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz × 4
+
 ```
 
 ###2\. Parallel
@@ -86,28 +88,28 @@ The implementations for this benchmark are found in [`benchmark/madeup-parallel`
 results for 10000 parallel executions, 1 ms per I/O op
 
 file                                      time(ms)  memory(MB)
-callbacks-baseline.js                          290       49.25
-promises-bluebird.js                           382       72.45
-promises-bluebird-generator.js                 407       76.25
-callbacks-suguru03-neo-async-parallel.js       472       97.05
-promises-tildeio-rsvp.js                       597      182.07
-promises-cujojs-when.js                        610      142.19
-callbacks-caolan-async-parallel.js             804      157.11
-promises-lvivski-davy.js                      1229      262.84
-promises-calvinmetcalf-lie.js                 1301      338.68
-promises-then-promise.js                      1585      367.77
-streamline-callbacks.js                       1800      315.59
-promises-ecmascript6-native.js                1816      481.08
-promises-dfilatov-vow.js                      1980      489.30
-promises-medikoo-deferred.js                  4181      522.04
-promises-obvious-kew.js                       5473     1075.70
-streamline-generators.js                      7980      840.97
+callbacks-baseline.js                          200       71.39
+callbacks-suguru03-neo-async-parallel.js       289       89.80
+promises-bluebird.js                           390      102.95
+promises-bluebird-generator.js                 422      110.15
+callbacks-caolan-async-parallel.js             502      151.99
+promises-cujojs-when.js                        615      166.69
+promises-lvivski-davy.js                       863      282.39
+promises-then-promise.js                       942      309.98
+promises-calvinmetcalf-lie.js                 1272      367.50
+promises-tildeio-rsvp.js                      1473      397.67
+promises-ecmascript6-native.js                1575      395.60
+promises-medikoo-deferred.js                  1839      358.26
+promises-dfilatov-vow.js                      2101      551.81
+promises-obvious-kew.js                       3562      728.36
+streamline-generators.js                     14661     1097.45
+streamline-callbacks.js                      28902     1204.92
 
 Platform info:
-Linux 3.13.0-32-generic x64
-Node.JS 4.2.1
-V8 4.5.103.35
-Intel(R) Core(TM) i7-4900MQ CPU @ 2.80GHz × 8
+Linux 4.4.0-64-generic x64
+Node.JS 7.7.1
+V8 5.5.372.41
+Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz × 4
 ```
 
 ###3\. Latency benchmarks
diff --git a/docs/docs/changelog.md b/docs/docs/changelog.md
index bd8a044..b4c0f64 100644
--- a/docs/docs/changelog.md
+++ b/docs/docs/changelog.md
@@ -3,6 +3,20 @@ id: changelog
 title: Changelog
 ---
 
+## 3.4.7 (2016-12-22)
+
+- Promise config returns reference to Bluebird library
+- Updated logo
+- Benchmark fix
+- Don't drop syntaxerror context from stack traces
+- Fix environment variables sometimes causing long stack traces  to be enabled
+
+## 3.4.6 (2016-09-01)
+
+Bugfixes:
+
+- Fix [Promise.map](.) and [.map](.) not always calling the callback asynchronously \([#1148](.)\)
+
 ## 3.4.5 (2016-08-31)
 
 Bugfixes:
@@ -216,6 +230,16 @@ See [New in 3.0](new-in-bluebird-3.html).
 
 See [New in 3.0](new-in-bluebird-3.html).
 
+## 2.11.0 (2016-08-30)
+
+Features:
+
+ - feature
+
+Bugfixes:
+
+ - bugfix
+
 ## 2.10.2 (2015-10-01)
 
 Features:
diff --git a/docs/docs/warning-explanations.md b/docs/docs/warning-explanations.md
index bd808dc..dcf9055 100644
--- a/docs/docs/warning-explanations.md
+++ b/docs/docs/warning-explanations.md
@@ -76,7 +76,7 @@ If you know what you're doing and don't want to silence all warnings, you can cr
 
 ```js
 getUser().then(function(user) {
-    // Perform this in the "background" and don't care about it's result at all
+    // Perform this in the "background" and don't care about its result at all
     saveAnalytics(user);
     // return a non-undefined value to signal that we didn't forget to return
     return null;
diff --git a/docs/img/README.txt b/docs/img/README.txt
new file mode 100644
index 0000000..c96d24e
--- /dev/null
+++ b/docs/img/README.txt
@@ -0,0 +1 @@
+SVG available upon request.
diff --git a/docs/img/libbblog_v3.png b/docs/img/libbblog_v3.png
new file mode 100644
index 0000000..ce5297e
Binary files /dev/null and b/docs/img/libbblog_v3.png differ
diff --git a/package.json b/package.json
index 9ac0058..721821e 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
 {
   "name": "bluebird",
   "description": "Full featured Promises/A+ implementation with exceptionally good performance",
-  "version": "3.4.6",
+  "version": "3.5.0",
   "keywords": [
     "promise",
     "performance",
@@ -67,6 +67,7 @@
   },
   "readmeFilename": "README.md",
   "main": "./js/release/bluebird.js",
+  "webpack": "./js/release/bluebird.js",
   "browser": "./js/browser/bluebird.js",
   "files": [
     "js/browser",
diff --git a/src/async.js b/src/async.js
index 2f5a495..eec02b5 100644
--- a/src/async.js
+++ b/src/async.js
@@ -132,12 +132,6 @@ if (!util.hasDevTools) {
     };
 }
 
-Async.prototype.invokeFirst = function (fn, receiver, arg) {
-    ASSERT(arguments.length === 3);
-    this._normalQueue.unshift(fn, receiver, arg);
-    this._queueTick();
-};
-
 Async.prototype._drainQueue = function(queue) {
     while (queue.length() > 0) {
         var fn = queue.shift();
diff --git a/src/constants.js b/src/constants.js
index 6ee45bc..63ad1b3 100644
--- a/src/constants.js
+++ b/src/constants.js
@@ -82,6 +82,7 @@ CONSTANT(RESOLVE_ARRAY, -2);
 CONSTANT(RESOLVE_OBJECT, -3);
 CONSTANT(RESOLVE_FOREVER_PENDING, -4);
 CONSTANT(RESOLVE_CALL_METHOD, -5);
+CONSTANT(RESOLVE_MAP, -6);
 
 //queue.js
 CONSTANT(QUEUE_MAX_CAPACITY, (1 << 30) | 0);
diff --git a/src/debuggability.js b/src/debuggability.js
index 1a28d59..6591449 100644
--- a/src/debuggability.js
+++ b/src/debuggability.js
@@ -295,6 +295,7 @@ Promise.config = function(opts) {
             Promise.prototype._fireEvent = defaultFireEvent;
         }
     }
+    return Promise;
 };
 
 function defaultFireEvent() { return false; }
@@ -574,7 +575,7 @@ function stackFramesAsArray(error) {
         }
     }
     // Chrome and IE include the error message in the stack
-    if (i > 0) {
+    if (i > 0 && error.name != "SyntaxError") {
         stack = stack.slice(i);
     }
     return stack;
@@ -587,7 +588,7 @@ function parseStackAndMessage(error) {
                 ? stackFramesAsArray(error) : [NO_STACK_TRACE];
     return {
         message: message,
-        stack: cleanStack(stack)
+        stack: error.name == "SyntaxError" ? stack : cleanStack(stack)
     };
 }
 
diff --git a/src/finally.js b/src/finally.js
index 6521e7d..f699573 100644
--- a/src/finally.js
+++ b/src/finally.js
@@ -1,8 +1,9 @@
 "use strict";
-module.exports = function(Promise, tryConvertToPromise) {
+module.exports = function(Promise, tryConvertToPromise, NEXT_FILTER) {
 var util = require("./util");
 var CancellationError = Promise.CancellationError;
 var errorObj = util.errorObj;
+var catchFilter = require("./catch_filter")(NEXT_FILTER);
 
 function PassThroughHandlerContext(promise, type, handler) {
     this.promise = promise;
@@ -54,7 +55,9 @@ function finallyHandler(reasonOrValue) {
         var ret = this.isFinallyHandler()
             ? handler.call(promise._boundValue())
             : handler.call(promise._boundValue(), reasonOrValue);
-        if (ret !== undefined) {
+        if (ret === NEXT_FILTER) {
+            return ret;
+        } else if (ret !== undefined) {
             promise._setReturnedNonUndefined();
             var maybePromise = tryConvertToPromise(ret, promise);
             if (maybePromise instanceof Promise) {
@@ -103,9 +106,41 @@ Promise.prototype["finally"] = function (handler) {
                              finallyHandler);
 };
 
+
 Promise.prototype.tap = function (handler) {
     return this._passThrough(handler, TAP_TYPE, finallyHandler);
 };
 
+Promise.prototype.tapCatch = function (handlerOrPredicate) {
+    var len = arguments.length;
+    if(len === 1) {
+        return this._passThrough(handlerOrPredicate,
+                                 TAP_TYPE,
+                                 undefined,
+                                 finallyHandler);
+    } else {
+         var catchInstances = new Array(len - 1),
+            j = 0, i;
+        for (i = 0; i < len - 1; ++i) {
+            var item = arguments[i];
+            if (util.isObject(item)) {
+                catchInstances[j++] = item;
+            } else {
+                return Promise.reject(new TypeError(
+                    "tapCatch statement predicate: "
+                    + OBJECT_ERROR + util.classString(item)
+                ));
+            }
+        }
+        catchInstances.length = j;
+        var handler = arguments[i];
+        return this._passThrough(catchFilter(catchInstances, handler, this),
+                                 TAP_TYPE,
+                                 undefined,
+                                 finallyHandler);
+    }
+
+};
+
 return PassThroughHandlerContext;
 };
diff --git a/src/generators.js b/src/generators.js
index f066088..2e6029c 100644
--- a/src/generators.js
+++ b/src/generators.js
@@ -160,7 +160,7 @@ PromiseSpawn.prototype._continue = function (result) {
             if (maybePromise === null) {
                 this._promiseRejected(
                     new TypeError(
-                        YIELDED_NON_PROMISE_ERROR.replace("%s", value) +
+                        YIELDED_NON_PROMISE_ERROR.replace("%s", String(value)) +
                         FROM_COROUTINE_CREATED_AT +
                         this._stack.split("\n").slice(1, -7).join("\n")
                     )
diff --git a/src/promise.js b/src/promise.js
index dbef40a..b1cd220 100644
--- a/src/promise.js
+++ b/src/promise.js
@@ -53,30 +53,31 @@ var createContext = Context.create;
 var debug = require("./debuggability")(Promise, Context);
 var CapturedTrace = debug.CapturedTrace;
 var PassThroughHandlerContext =
-    require("./finally")(Promise, tryConvertToPromise);
+    require("./finally")(Promise, tryConvertToPromise, NEXT_FILTER);
 var catchFilter = require("./catch_filter")(NEXT_FILTER);
 var nodebackForPromise = require("./nodeback");
 var errorObj = util.errorObj;
 var tryCatch = util.tryCatch;
 function check(self, executor) {
+    if (self == null || self.constructor !== Promise) {
+        throw new TypeError(CONSTRUCT_ERROR_INVOCATION);
+    }
     if (typeof executor !== "function") {
         throw new TypeError(FUNCTION_ERROR + util.classString(executor));
     }
-    if (self.constructor !== Promise) {
-        throw new TypeError(CONSTRUCT_ERROR_INVOCATION);
-    }
+
 }
 
 function Promise(executor) {
+    if (executor !== INTERNAL) {
+        check(this, executor);
+    }
     this._bitField = NO_STATE;
     this._fulfillmentHandler0 = undefined;
     this._rejectionHandler0 = undefined;
     this._promise0 = undefined;
     this._receiver0 = undefined;
-    if (executor !== INTERNAL) {
-        check(this, executor);
-        this._resolveFromExecutor(executor);
-    }
+    this._resolveFromExecutor(executor);
     this._promiseCreated();
     this._fireEvent("promiseCreated", this);
 }
@@ -95,8 +96,8 @@ Promise.prototype.caught = Promise.prototype["catch"] = function (fn) {
             if (util.isObject(item)) {
                 catchInstances[j++] = item;
             } else {
-                return apiRejection(OBJECT_ERROR +
-                    "A catch statement predicate " + util.classString(item));
+                return apiRejection("Catch statement predicate: " +
+                    OBJECT_ERROR + util.classString(item));
             }
         }
         catchInstances.length = j;
@@ -504,6 +505,7 @@ function(reason, synchronous, ignoreNonErrorWarnings) {
 };
 
 Promise.prototype._resolveFromExecutor = function (executor) {
+    if (executor === INTERNAL) return;
     ASSERT(typeof executor === "function");
     var promise = this;
     this._captureStackTrace();
diff --git a/src/promise_array.js b/src/promise_array.js
index 192fa68..359a424 100644
--- a/src/promise_array.js
+++ b/src/promise_array.js
@@ -11,6 +11,7 @@ function toResolutionValue(val) {
     switch(val) {
     case RESOLVE_ARRAY: return [];
     case RESOLVE_OBJECT: return {};
+    case RESOLVE_MAP: return new Map();
     }
     ASSERT(false);
 }
diff --git a/src/props.js b/src/props.js
index 714a0e2..ccbf22e 100644
--- a/src/props.js
+++ b/src/props.js
@@ -56,7 +56,7 @@ function PropertiesPromiseArray(obj) {
     }
     this.constructor$(entries);
     this._isMap = isMap;
-    this._init$(undefined, RESOLVE_OBJECT);
+    this._init$(undefined, isMap ? RESOLVE_MAP : RESOLVE_OBJECT);
 }
 util.inherits(PropertiesPromiseArray, PromiseArray);
 
diff --git a/src/queue.js b/src/queue.js
index f802dae..15163b6 100644
--- a/src/queue.js
+++ b/src/queue.js
@@ -25,23 +25,6 @@ Queue.prototype._pushOne = function (arg) {
     this._length = length + 1;
 };
 
-Queue.prototype._unshiftOne = function(value) {
-    var capacity = this._capacity;
-    this._checkCapacity(this.length() + 1);
-    var front = this._front;
-    var i = (((( front - 1 ) &
-                    ( capacity - 1) ) ^ capacity ) - capacity );
-    this[i] = value;
-    this._front = i;
-    this._length = this.length() + 1;
-};
-
-Queue.prototype.unshift = function(fn, receiver, arg) {
-    this._unshiftOne(arg);
-    this._unshiftOne(receiver);
-    this._unshiftOne(fn);
-};
-
 Queue.prototype.push = function (fn, receiver, arg) {
     ASSERT(arguments.length === 3);
     ASSERT(typeof fn === "function");
diff --git a/src/schedule.js b/src/schedule.js
index 504b1bf..0aace9c 100644
--- a/src/schedule.js
+++ b/src/schedule.js
@@ -46,11 +46,11 @@ if (util.isNode && typeof MutationObserver === "undefined") {
 
         var scheduleToggle = function() {
             if (toggleScheduled) return;
-                toggleScheduled = true;
-                div2.classList.toggle("foo");
-            };
+            toggleScheduled = true;
+            div2.classList.toggle("foo");
+        };
 
-            return function schedule(fn) {
+        return function schedule(fn) {
             var o = new MutationObserver(function() {
                 o.disconnect();
                 fn();
diff --git a/src/util.js b/src/util.js
index 3bcc3b0..d81a9fc 100644
--- a/src/util.js
+++ b/src/util.js
@@ -321,8 +321,11 @@ if (typeof Symbol !== "undefined" && Symbol.iterator) {
 var isNode = typeof process !== "undefined" &&
         classString(process).toLowerCase() === "[object process]";
 
-function env(key, def) {
-    return isNode ? process.env[key] : def;
+var hasEnvVariables = typeof process !== "undefined" &&
+    typeof process.env !== "undefined";
+
+function env(key) {
+    return hasEnvVariables ? process.env[key] : undefined;
 }
 
 function getNativePromise() {
@@ -370,6 +373,7 @@ var ret = {
     hasDevTools: typeof chrome !== "undefined" && chrome &&
                  typeof chrome.loadTimes === "function",
     isNode: isNode,
+    hasEnvVariables: hasEnvVariables,
     env: env,
     global: globalObject,
     getNativePromise: getNativePromise,
diff --git a/test/mocha/cancel.js b/test/mocha/cancel.js
index b00352a..5444886 100644
--- a/test/mocha/cancel.js
+++ b/test/mocha/cancel.js
@@ -281,7 +281,7 @@ describe("Cancellation", function() {
         });
     });
 
-    specify("Can be used for breaking chains early", function() {
+    specify("can be used for breaking chains early", function() {
         var called = false;
         var p = Promise.resolve(1)
             .then(function(data) {
@@ -709,7 +709,21 @@ describe("Cancellation", function() {
         req.cancel();
         var resolve;
         return new Promise(function(_, __, onCancel) {resolve = arguments[0]});
-    })
+    });
+
+    specify("isCancelled() synchronously returns true after calling cancel() on pending promise", function() {
+        var promise = new Promise(function () {});
+        promise.cancel();
+        assert(promise.isCancelled());
+    });
+
+    specify("isCancelled() synchronously returns true after calling cancel() on promise created from .then()", function() {
+        var promise = new Promise(function () {});
+        var thenPromise = promise.then();
+        thenPromise.cancel();
+        assert(thenPromise.isCancelled());
+    });
+
     specify("gh-166", function() {
         var f1 = false, f2 = false, f3 = false, f4 = false;
         var a = Promise.resolve();
diff --git a/test/mocha/generator.js b/test/mocha/generator.js
index 2b05618..eac2d7c 100644
--- a/test/mocha/generator.js
+++ b/test/mocha/generator.js
@@ -82,6 +82,22 @@ describe("yielding", function() {
             assert.equal(val, 4);
         });
     });
+
+    specify("yielding a function should not call the function", function() {
+        let functionWasCalled = false;
+        return Promise.coroutine(function*(){
+            try {
+                yield (function() {functionWasCalled = true;});
+            } 
+            catch(e){
+                assert(e instanceof TypeError);
+                assert.equal(functionWasCalled, false);
+                return 4;
+            }
+        })().then(function(val){
+            assert.equal(val, 4);
+        });
+    });
 });
 
 describe("thenables", function(){
@@ -367,7 +383,7 @@ describe("Spawn", function() {
 describe("custom yield handlers", function() {
     specify("should work with timers", function() {
         var n = 0;
-        return Promise.coroutine.addYieldHandler(function(v) {
+        Promise.coroutine.addYieldHandler(function(v) {
             if (typeof v === "number") {
                 n = 1;
                 return Promise.resolve(n);
@@ -417,18 +433,18 @@ describe("custom yield handlers", function() {
         });
     });
 
-    Promise.coroutine.addYieldHandler(function(v) {
-        if (typeof v === "function") {
-            var cb;
-            var promise = Promise.fromNode(function(callback) {
-                cb = callback;
-            });
-            try { v(cb); } catch (e) { cb(e); }
-            return promise;
-        }
-    });
-
     specify("should work with thunks", function(){
+        Promise.coroutine.addYieldHandler(function(v) {
+            if (typeof v === "function") {
+                var cb;
+                var promise = Promise.fromNode(function(callback) {
+                    cb = callback;
+                });
+                try { v(cb); } catch (e) { cb(e); }
+                return promise;
+            }
+        });
+
         var thunk = function(a) {
             return function(callback) {
                 setTimeout(function(){
diff --git a/test/mocha/props.js b/test/mocha/props.js
index 8fdbfbd..585ef58 100644
--- a/test/mocha/props.js
+++ b/test/mocha/props.js
@@ -180,6 +180,7 @@ describe("Promise.props", function () {
         });
     });
 
+
     if (typeof Map !== "undefined") {
         specify("works with es6 maps", function() {
             return Promise.props(new Map([
@@ -208,6 +209,12 @@ describe("Promise.props", function () {
                 assert.strictEqual(result.get(c), 3);
             });
         });
+
+        specify("empty map should resolve to empty map", function() {
+            return Promise.props(new Map()).then(function(result) {
+                assert(result instanceof Map);
+            });
+        });
     }
 
 });
diff --git a/test/mocha/tapCatch.js b/test/mocha/tapCatch.js
new file mode 100644
index 0000000..e141ea4
--- /dev/null
+++ b/test/mocha/tapCatch.js
@@ -0,0 +1,130 @@
+"use strict";
+var assert = require("assert");
+var testUtils = require("./helpers/util.js");
+function rejection() {
+    var error = new Error("test");
+    var rejection = Promise.reject(error);
+    rejection.err = error;
+    return rejection;
+}
+
+describe("tapCatch", function () {
+
+    specify("passes through rejection reason", function() {
+        return rejection().tapCatch(function() {
+            return 3;
+        }).caught(function(value) {
+            assert.equal(value.message, "test");
+        });
+    });
+
+    specify("passes through reason after returned promise is fulfilled", function() {
+        var async = false;
+        return rejection().tapCatch(function() {
+            return new Promise(function(r) {
+                setTimeout(function(){
+                    async = true;
+                    r(3);
+                }, 1);
+            });
+        }).caught(function(value) {
+            assert(async);
+            assert.equal(value.message, "test");
+        });
+    });
+
+    specify("is not called on fulfilled promise", function() {
+        var called = false;
+        return Promise.resolve("test").tapCatch(function() {
+            called = true;
+        }).then(function(value){
+            assert(!called);
+        }, assert.fail);
+    });
+
+    specify("passes immediate rejection", function() {
+        var err = new Error();
+        return rejection().tapCatch(function() {
+            throw err;
+        }).tap(assert.fail).then(assert.fail, function(e) {
+            assert(err === e);
+        });
+    });
+
+    specify("passes eventual rejection", function() {
+        var err = new Error();
+        return rejection().tapCatch(function() {
+            return new Promise(function(_, rej) {
+                setTimeout(function(){
+                    rej(err);
+                }, 1)
+            });
+        }).tap(assert.fail).then(assert.fail, function(e) {
+            assert(err === e);
+        });
+    });
+
+    specify("passes reason", function() {
+        return rejection().tapCatch(function(a) {
+            assert(a === rejection);
+        }).then(assert.fail, function() {});
+    });
+
+    specify("Works with predicates", function() {
+        var called = false;
+        return Promise.reject(new TypeError).tapCatch(TypeError, function(a) {
+            called = true;
+            assert(err instanceof TypeError)
+        }).then(assert.fail, function(err) {
+            assert(called === true);
+            assert(err instanceof TypeError);
+        });
+    });
+    specify("Does not get called on predicates that don't match", function() {
+        var called = false;
+        return Promise.reject(new TypeError).tapCatch(ReferenceError, function(a) {
+            called = true;
+        }).then(assert.fail, function(err) {
+            assert(called === false);
+            assert(err instanceof TypeError);
+        });
+    });
+
+    specify("Supports multiple predicates", function() {
+        var calledA = false;
+        var calledB = false;
+        var calledC = false;
+
+        var promiseA = Promise.reject(new ReferenceError).tapCatch(
+            ReferenceError,
+            TypeError,
+            function (e) {
+                assert(e instanceof ReferenceError);
+                calledA = true;
+            }
+        ).catch(function () {});
+
+        var promiseB = Promise.reject(new TypeError).tapCatch(
+            ReferenceError,
+            TypeError,
+            function (e) {
+                assert(e instanceof TypeError);
+                calledB = true;
+            }
+        ).catch(function () {});
+
+        var promiseC = Promise.reject(new SyntaxError).tapCatch(
+            ReferenceError,
+            TypeError,
+            function (e) {
+                calledC = true;
+            }
+        ).catch(function () {});
+
+        return Promise.join(promiseA, promiseB, promiseC, function () {
+            assert(calledA === true);
+            assert(calledB === true);
+            assert(calledC === false);
+        });
+    })
+});
diff --git a/test/mocha/using.js b/test/mocha/using.js
index f217151..85b428d 100644
--- a/test/mocha/using.js
+++ b/test/mocha/using.js
@@ -5,7 +5,6 @@ var testUtils = require("./helpers/util.js");
 var Promise2 = require("../../js/debug/promise.js")();
 
 var using = Promise.using;
-var delay = Promise.delay;
 var error = new Error("");
 var id = 0;
 function Resource() {
@@ -97,10 +96,6 @@ function connect2() {
     return _connect2().disposer(Resource.prototype.close);
 }
 
-function connectCloseError() {
-    return _connect().disposer(Resource.prototype.closeError);
-}
-
 
 function connectError() {
     return new Promise(function(resolve, reject) {
diff --git a/tools/build.js b/tools/build.js
index 5b55c7c..6ec9b46 100644
--- a/tools/build.js
+++ b/tools/build.js
@@ -254,8 +254,8 @@ function buildBrowser(sources, dir, tmpDir, depsRequireCode, minify, npmPackage,
 
 var root = process.cwd();
 // Since rm -rf is called, better be sure...
-if (path.basename(root).toLowerCase() !== "bluebird") {
-    throw new Error("cwd must be se to bluebird project root. Cwd is currently\n\n" +
+if (path.basename(root).toLowerCase().indexOf("bluebird") !== 0) {
+    throw new Error("cwd must be set to bluebird project root. cwd is currently\n\n" +
         "         " + process.cwd() + "\n");
 }
 var dirs = {
diff --git a/tools/job-runner/job-runner.js b/tools/job-runner/job-runner.js
index 5cdd278..c8f30b2 100644
--- a/tools/job-runner/job-runner.js
+++ b/tools/job-runner/job-runner.js
@@ -142,7 +142,7 @@ var jobRunner = (function() {
                 resolve = arguments[0];
                 reject = arguments[1];
             });
-            var task = {
+            task = {
                 isolated: isolated,
                 task: {
                     code: task + "",
diff --git a/tools/mocha_runner.js b/tools/mocha_runner.js
index cf898bf..9686b97 100644
--- a/tools/mocha_runner.js
+++ b/tools/mocha_runner.js
@@ -6,7 +6,7 @@ module.exports = function mochaRun(progress) {
     function checkTimers() {
         var keys = Object.keys(timers);
         for (var i = 0; i < keys.length; ++i) {
-            key = keys[i];
+            var key = keys[i];
             var timer = timers[key];
             if (!timer) continue;
             if (currentTime >= (timer.started + timer.time)) {
@@ -127,7 +127,7 @@ module.exports = function mochaRun(progress) {
                 error = failures[0].error;
             }
             else {
-                message = "\u001b[31mSome tests failed: \u001b[m\n"
+                var message = "\u001b[31mSome tests failed: \u001b[m\n"
                 failures.forEach(function(failResult) {
                     message += "    " + failResult.name + " " + failAdvice(failResult.name) + "\n";
                 });
diff --git a/tools/utils.js b/tools/utils.js
index b23e548..d082a4f 100755
--- a/tools/utils.js
+++ b/tools/utils.js
@@ -95,7 +95,6 @@ function parseDeps(src) {
 
 var tableLogger = (function() {
     var metaKeyCodeReAnywhere = /(?:\x1b)([a-zA-Z0-9])/;
-    var metaKeyCodeRe = new RegExp('^' + metaKeyCodeReAnywhere.source + '$');
     var functionKeyCodeReAnywhere = new RegExp('(?:\x1b+)(O|N|\\[|\\[\\[)(?:' + [
       '(\\d+)(?:;(\\d+))?([~^$])',
       '(?:M([@ #!a`])(.)(.))', // mouse
@@ -108,7 +107,6 @@ var tableLogger = (function() {
     }
 
     var ROWS = 35;
-    var prevLog = new Array(ROWS);
     var log = new Array(ROWS);
     for (var i = 0; i < ROWS; ++i) log[i] = [];
     var tableOpts = {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-bluebird.git



More information about the Pkg-javascript-commits mailing list