Comparing version 1.6.1-beta.1 to 1.7.0
# Postman UVM Changelog | ||
#### Unreleased | ||
#### 1.7.0 (May 31, 3017) | ||
* removed dispatch of `disconnect` event when .disconnect() is called | ||
* add ability to remove all events when only event name is provided to `bridge.off` | ||
@@ -5,0 +6,0 @@ |
@@ -19,5 +19,3 @@ var _ = require('lodash'), | ||
E = '', | ||
DISPATCH_INTERFACE_FN = '_dispatch', | ||
ERROR_EVENT = 'error', | ||
DISCONNECT_EVENT = 'disconnect', | ||
DISPATCHQUEUE_EVENT = 'dispatchQueued', | ||
@@ -114,7 +112,2 @@ DISCONNECT_ERROR_MESSAGE = 'uvm: cannot disconnect, communication bridge is broken', | ||
disconnect: function () { | ||
// send disponse event if possible | ||
// @todo: this does not work where event dispatch is highly async (like in browser message passing) | ||
try { this.hasOwnProperty(DISPATCH_INTERFACE_FN) && this._dispatch(DISCONNECT_EVENT); } | ||
catch (e) { } // eslint-disable-line no-empty | ||
try { this._disconnect.apply(this, arguments); } | ||
@@ -121,0 +114,0 @@ catch (e) { this.emit(ERROR_EVENT, e); } |
{ | ||
"name": "uvm", | ||
"version": "1.6.1-beta.1", | ||
"version": "1.7.0", | ||
"description": "Universal Virtual Machine for Node and Browser", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -142,19 +142,3 @@ var async = require('async'), | ||
}); | ||
(isNode ? it : it.skip)('must trigger disconnection event before disconnecting in node', function (done) { | ||
uvm.spawn({ | ||
bootCode: ` | ||
bridge.on('disconnect', function () { | ||
bridge.dispatch('disconnect.ack'); | ||
}); | ||
` | ||
}, function (err, context) { | ||
expect(err).not.be.an('object'); | ||
context.on('error', done); | ||
context.on('disconnect.ack', done); | ||
context.disconnect(); | ||
}); | ||
}); | ||
}); | ||
}); |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
116809
1908