@effection/channel
Advanced tools
Comparing version 0.6.6 to 0.6.7-2c8f550
# Changelog | ||
## 0.6.7 | ||
### Patch Changes | ||
- 25b68eb: Subscriptions created via `createSubscription` are chainable on both sides of the yield | ||
- Updated dependencies [25b68eb] | ||
- @effection/subscription@0.11.0 | ||
- @effection/events@0.7.8 | ||
## 0.6.6 | ||
@@ -4,0 +13,0 @@ |
@@ -14,4 +14,4 @@ 'use strict'; | ||
_proto[subscription.SymbolSubscribable] = function () { | ||
return this.subscribe(); | ||
_proto[subscription.SymbolSubscribable] = function* () { | ||
return yield this.subscribe(); | ||
}; | ||
@@ -18,0 +18,0 @@ |
@@ -1,2 +0,2 @@ | ||
"use strict";var e=require("@effection/subscription"),t=require("@effection/events"),n=require("events");exports.Channel=function(){function i(){this.bus=new n.EventEmitter}var r=i.prototype;return r[e.SymbolSubscribable]=function(){return this.subscribe()},r.setMaxListeners=function(e){this.bus.setMaxListeners(e)},r.send=function(e){this.bus.emit("event",{done:!1,value:e})},r.subscribe=function(){var n=this.bus;return e.createSubscription((function*(e){for(var i=yield t.on(n,"event");;){var r=(yield i.expect())[0];if(r.done)return r.value;e(r.value)}}))},r.close=function(){this.bus.emit("event",{done:!0,value:arguments.length<=0?void 0:arguments[0]})},i}(); | ||
"use strict";var e=require("@effection/subscription"),t=require("@effection/events"),n=require("events");exports.Channel=function(){function i(){this.bus=new n.EventEmitter}var r=i.prototype;return r[e.SymbolSubscribable]=function*(){return yield this.subscribe()},r.setMaxListeners=function(e){this.bus.setMaxListeners(e)},r.send=function(e){this.bus.emit("event",{done:!1,value:e})},r.subscribe=function(){var n=this.bus;return e.createSubscription((function*(e){for(var i=yield t.on(n,"event");;){var r=(yield i.expect())[0];if(r.done)return r.value;e(r.value)}}))},r.close=function(){this.bus.emit("event",{done:!0,value:arguments.length<=0?void 0:arguments[0]})},i}(); | ||
//# sourceMappingURL=channel.cjs.production.min.js.map |
@@ -8,4 +8,4 @@ import { Operation } from 'effection'; | ||
send(message: T): void; | ||
subscribe(): Operation<Subscription<T, TClose>>; | ||
subscribe(): import("@effection/subscription").ChainableSubscribable<unknown, any>; | ||
close(...args: TClose extends undefined ? [] : [TClose]): void; | ||
} |
@@ -12,4 +12,4 @@ import { SymbolSubscribable, createSubscription } from '@effection/subscription'; | ||
_proto[SymbolSubscribable] = function () { | ||
return this.subscribe(); | ||
_proto[SymbolSubscribable] = function* () { | ||
return yield this.subscribe(); | ||
}; | ||
@@ -16,0 +16,0 @@ |
{ | ||
"name": "@effection/channel", | ||
"version": "0.6.6", | ||
"version": "0.6.7-2c8f550", | ||
"description": "MPMC Channel implementation for effection", | ||
@@ -35,5 +35,5 @@ "main": "dist/index.js", | ||
"effection": "^0.7.0", | ||
"@effection/events": "^0.7.7", | ||
"@effection/subscription": "^0.10.0" | ||
"@effection/events": "^0.7.8", | ||
"@effection/subscription": "^0.11.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13918
+ Added@effection/subscription@0.11.1(transitive)
- Removed@effection/subscription@0.10.0(transitive)
Updated@effection/events@^0.7.8