@bigtest/effection
Advanced tools
Comparing version 0.4.1 to 0.5.0-4561dd2
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
## 0.5.0 | ||
### Minor Changes | ||
- 3f8eafd0: Introduce changesets for simpler release management | ||
### Patch Changes | ||
- e10b9c52: upgrade mailbox implementation to use `@effection/subscription` apis, | ||
rather than the one-off internal event emitter subscription | ||
All notable changes to this project will be documented in this file. | ||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
@@ -10,4 +21,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
## [0.1.1] - 2020-04-01 | ||
### Added | ||
- Mailbox API for never missing an event (https://github.com/thefrontside/bigtest/pull/188) |
@@ -5,1 +5,2 @@ export { Deferred } from './deferred'; | ||
export { ensure } from './ensure'; | ||
export { readyResource } from './ready-resource'; |
@@ -12,2 +12,4 @@ "use strict"; | ||
exports.ensure = ensure_1.ensure; | ||
var ready_resource_1 = require("./ready-resource"); | ||
exports.readyResource = ready_resource_1.readyResource; | ||
//# sourceMappingURL=index.js.map |
@@ -67,12 +67,12 @@ "use strict"; | ||
exports.Mailbox = Mailbox; | ||
const subscription_1 = require("@effection/subscription"); | ||
function* subscribe(mailbox, source, events) { | ||
return yield effection_1.spawn(function* () { | ||
for (let name of typeof events === 'string' ? [events] : events) { | ||
yield effection_1.fork(function* () { | ||
let events = yield events_2.on(source, name); | ||
while (true) { | ||
let args = yield events.next(); | ||
mailbox.send({ event: name, args }); | ||
} | ||
let pipeline = subscription_1.Subscribable.from(events_2.on(source, name)) | ||
.map(args => ({ event: name, args })) | ||
.forEach(function* (value) { | ||
mailbox.send(value); | ||
}); | ||
yield effection_1.fork(pipeline); | ||
} | ||
@@ -79,0 +79,0 @@ }); |
{ | ||
"name": "@bigtest/effection", | ||
"version": "0.4.1", | ||
"version": "0.5.0-4561dd2", | ||
"description": "Collection of handly utilities for working with effection. May find a different home later", | ||
@@ -8,3 +8,3 @@ "main": "dist/index.js", | ||
"repository": "https://github.com/thefrontside/bigtest.git", | ||
"author": "Frontside Engineering <engineering@frontside.io>", | ||
"author": "Frontside Engineering <engineering@frontside.com>", | ||
"license": "MIT", | ||
@@ -34,3 +34,3 @@ "files": [ | ||
"dependencies": { | ||
"@effection/events": "^0.6.1", | ||
"@effection/events": "^0.7.1", | ||
"@types/node": "^13.13.4" | ||
@@ -37,0 +37,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
14804
21
206
+ Added@effection/events@0.7.9(transitive)
+ Added@effection/subscription@0.12.0(transitive)
+ Addedeffection@0.8.0(transitive)
- Removed@effection/events@0.6.1(transitive)
Updated@effection/events@^0.7.1