Skip to content

Commit

Permalink
Update CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
codenirvana committed Jun 6, 2024
1 parent 60654f3 commit fb5b8eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unreleased:
new feature:
- Replaced Node VM with Worker threads
- GH-666 Replaced Node VM with Worker threads
breaking changes:
- GH-668 Dropped support for Node < v16
chores:
Expand Down
2 changes: 2 additions & 0 deletions lib/bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ module.exports = function (bridge, options, callback) {

// function to forward messages emitted
forwardEmits = (e) => {
// e.data for Web Worker (MessageEvent.data)
const { __emit_uvm, __id_uvm } = e?.data || e || /* istanbul ignore next */ {};

/* istanbul ignore next-line */
Expand Down Expand Up @@ -148,6 +149,7 @@ module.exports = function (bridge, options, callback) {

/* istanbul ignore else */
if (typeof worker.addEventListener !== 'function') {
// add event listener methods for Node.js worker
worker.addEventListener = worker.on.bind(worker);
worker.removeEventListener = worker.off.bind(worker);
}
Expand Down

0 comments on commit fb5b8eb

Please sign in to comment.