1
0
mirror of https://github.com/danog/amp.git synced 2024-11-27 04:24:42 +01:00
Commit Graph

67 Commits

Author SHA1 Message Date
Aaron Piotrowski
f187d4b31a Accept React promises in rethrow, wait, timeout, pipe, and capture
Fixes #75.
2017-03-13 07:17:06 +01:00
Niklas Keller
0006c6cb56 Fix async-interop docblock leftover 2017-03-12 21:39:17 +01:00
Aaron Piotrowski
cd4328ab48 Merge branch 'react-compatibility' 2017-03-12 11:38:48 -05:00
Niklas Keller
d748855a51 Fix some risky tests 2017-03-12 17:33:46 +01:00
Aaron Piotrowski
a98fe5cdf6 Rethrow React promise rejections
Adapt React promises returned from watcher callbacks to promises so that rethrow is called on them.
2017-03-11 09:17:55 -06:00
Aaron Piotrowski
7ad10f5d7d Add support for React promises 2017-03-11 09:17:43 -06:00
Aaron Piotrowski
7ebe70e0ae Fix docblock param formatting
Callable prototypes make alignment a mess… maybe something better can be done.
2017-03-10 23:08:40 -06:00
Aaron Piotrowski
2a9d7cb97b Remove unnecessary parameter 2017-03-10 22:59:11 -06:00
Niklas Keller
0be9ae9ade Switch from AsyncInterop\Promise to Amp\Promise 2017-03-10 21:58:46 +01:00
Niklas Keller
e64bbfb9f5 Add Loop::set, auto-wrapping, fixup things 2017-03-10 21:31:57 +01:00
Aaron Piotrowski
72378e2b82 Add Amp\call() 2017-02-22 15:52:30 -06:00
Aaron Piotrowski
b72e504eab Ensure correct argument order in multi-argument lift 2017-02-09 22:34:24 -06:00
Aaron Piotrowski
3861c6b5da Simpler each and filter implementation 2017-02-09 22:17:45 -06:00
Niklas Keller
8f245fa677 Drop Amp\choose 2017-01-13 19:09:17 +01:00
Niklas Keller
ae69e92266 Update to promise 0.4.0 and event-loop 0.5.0, add humbug config 2017-01-07 13:47:45 +01:00
Aaron Piotrowski
210b6ff258 Observable → Stream 2017-01-03 19:10:27 -06:00
Aaron Piotrowski
a872f14fd4 Drop Amp\range(), add Amp\observableFromIterable() 2016-12-30 12:50:09 -06:00
Aaron Piotrowski
b5d5b8dff1 Drop loop wrapper functions 2016-12-29 16:57:08 -06:00
Aaron Piotrowski
5651240615 Update to promise spec v0.3
Dropped strict-types due to spec requiring weak types in callbacks.
2016-12-29 16:29:27 -06:00
Aaron Piotrowski
bc1ae1822c Unreference watcher in Amp\timout() 2016-12-17 08:28:19 -06:00
Aaron Piotrowski
11f1c7e7c4 Amp\lazy() → Amp\Lazy
Plus some tests!
2016-12-15 18:50:33 -06:00
Aaron Piotrowski
6e97e6630d Fix some function bugs and add more tests 2016-12-15 17:31:57 -06:00
Niklas Keller
e4d97caad7 Fix whitespace 2016-12-11 16:17:51 +01:00
Niklas Keller
2ba73e90fc Fix documentation to point to when instead of then and done 2016-12-11 16:16:12 +01:00
Niklas Keller
bd7e84a138 Improve error messages 2016-12-11 16:12:42 +01:00
Aaron Piotrowski
9927ad5b4f Awaitable → Promise 2016-11-14 13:59:21 -06:00
Aaron Piotrowski
7f5142be88 Fix map() return type 2016-09-09 18:05:01 -05:00
Aaron Piotrowski
220c969e12 Allow Amp\*() loop callbacks to return values
Asserting that the function be void if not a Generator turned out to be just annoying rather than helpful.
2016-08-29 12:40:13 -05:00
Aaron Piotrowski
44aee8de47 Restrict callback returns to void or Generator 2016-08-26 16:29:57 -05:00
Aaron Piotrowski
edf2984863 Update Observable-based functions
Some of the changes to Observables broke functions using them.
2016-08-23 13:22:24 -05:00
Aaron Piotrowski
96e1178b89 Code, docblock, and comment cleanup 2016-08-17 22:25:54 -05:00
Aaron Piotrowski
bdc26e1e8b Combine use statements 2016-08-16 13:07:51 -05:00
Aaron Piotrowski
888229d667 Use strict types 2016-08-15 23:46:26 -05:00
Aaron Piotrowski
7bc08b9a6a Replace leftover LogicExceptions exceptions with Error 2016-08-12 16:58:53 -05:00
Aaron Piotrowski
66c38e1480 Refactor Amp\coroutine()
Any function can now be passed to this function, which now returns a function returning an awaitable.
2016-08-12 14:50:44 -05:00
Aaron Piotrowski
69ec812bc0 Require PHP 7 2016-08-11 14:52:40 -05:00
Aaron Piotrowski
aa7b76e842 Add awaitable/coroutine-aware loop functions
These functions mirror the standard loop methods, but run returned Generators as coroutines and invoke rethrow() on returned awaitables.
2016-08-02 12:48:32 -05:00
Aaron Piotrowski
13908fe2e5 Add concat() function 2016-08-01 11:10:59 -05:00
Aaron Piotrowski
9055f159e7 Revert some() to v1 behavior 2016-07-31 00:31:04 -05:00
Aaron Piotrowski
c2caca9d02 Fix functions using Subscriber as Awaitable
Use PHP_INT_MAX instead of 0 for infinite interval() count.
2016-07-20 08:53:18 -05:00
Aaron Piotrowski
8e794ba1d7 Fix stream() 2016-07-19 15:24:05 -05:00
Bob Weinand
1642bf9195 s/settle/any/ which now returns [$errors, $succeeds] 2016-07-19 21:39:09 +02:00
Aaron Piotrowski
dad93a6da0 Merge branch 'observable' into v2 2016-07-18 23:29:19 -05:00
Aaron Piotrowski
b9d554dd7b Add more functions 2016-07-18 23:23:25 -05:00
Aaron Piotrowski
3f654cbd5b Initial tests plus some fixes 2016-07-12 11:20:06 -05:00
Aaron Piotrowski
60d560d70e Add $className param to capture(); other cleanup 2016-06-14 21:40:04 -05:00
Aaron Piotrowski
5715bec9e1 Refactor functions with Emitter 2016-06-02 10:43:46 -05:00
Aaron Piotrowski
57e25f9354 Simpler implementation 2016-05-29 11:46:58 -05:00
Aaron Piotrowski
4a2baa670e Subscriber model 2016-05-27 15:44:01 -05:00
Aaron Piotrowski
99eecc1a3f Refactor 2016-05-26 18:20:05 -05:00