Permalink
Browse files

Merge branch 'v0.7'

  • Loading branch information...
2 parents 36bd639 + d2e6477 commit 0c55c470d7df5f85f7164b92fb7101d064b06ead @medikoo committed Apr 4, 2014
Showing with 35 additions and 11 deletions.
  1. +24 −0 CHANGES
  2. +11 −11 README.md
View
24 CHANGES
@@ -1,3 +1,27 @@
+v0.7.0 -- 2014.04.04
+Major (breaking) changes:
+* Fix error handling:
+ Up to v0.6.x promise could have been rejected only with error instance, and
+ same way they couldn't be successfully resolved with an error instance. It was
+ not an issue if we followed good practices, still it didn't match `throw`
+ behavior (any JavaScript value can be thrown). Starting from v0.7 promise can
+ be rejected and resolved with any kind of value. It's also how promises behave
+ in other implementations including upcoming ECMAScript 6 standard.
+* Assimilate foreign promises. Promises from other implemantations (including
+ native promises) are detected and assimilated for recursive resolution.
+ Addresses issue #29
+* Rename `promise.match` to `promise.spread`, this is the name under which this
+ functionality was popularized in other libraries.
+* Remove `end`, as it was replaced by `done` in v0.6.4 (`end` was kept as an
+ alias to not break current programs)
+* Move modules from `lib` to root folder
+
+Other changes:
+* Expose `resolve` and `reject` functions on deferred. It complies to
+ `Promise.resolve` and `Promise.reject`
+* Remove Makefile (it's cross-environment package)
+* Fix handling of promise arguments in promisifySync
+
v0.6.8 -- 2013.12.27
* Function version of `invokeAsync` utility (further addresses #26)
View
@@ -631,26 +631,26 @@ promise.invokeAsync('foo', 3)(function (result) {
See [promise aware version of Array's map](#map).
-#### match
+#### reduce
+
+See [promise aware version of Array's reduce](#reduce)
+
+#### some
+
+See [promise aware version of Array's some](#some)
+
+#### spread
-If promise expected value is a list that you want to match into function arguments then use `match`
+If promise expected value is a list that you want to spread into function arguments then use `spread`
```javascript
var promise = deferred([2, 3]);
-promise.match(function (a, b) {
+promise.spread(function (a, b) {
console.log(a + b); // 5
});
```
-#### reduce
-
-See [promise aware version of Array's reduce](#reduce)
-
-#### some
-
-See [promise aware version of Array's some](#some)
-
### Debugging
#### Monitoring unresolved promises

0 comments on commit 0c55c47

Please sign in to comment.