events: add once method to use promises with EventEmitter by mcollina · Pull Request #26078 · nodejs/node
mcollina
added
the
semver-minor
label
Feb 13, 2019
Trott
removed
the
tsc-agenda
label
Feb 20, 2019targos pushed a commit to targos/node that referenced this pull request
Mar 27, 2019This change adds a EventEmitter.once() method that wraps ee.once in a promise. Co-authored-by: David Mark Clements <david.mark.clements@gmail.com> PR-URL: nodejs#26078 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
targos added a commit that referenced this pull request
Mar 27, 2019Notable changes:
* events:
* Added a `once` function to use `EventEmitter` with promises
(#26078).
* tty:
* Added a `hasColors` method to `WriteStream`
(#26247).
* Added NO_COLOR and FORCE_COLOR support
(#26485).
* v8:
* Added `v8.getHeapSnapshot` and `v8.writeHeapSnapshot` to generate snapshots
in the format used by tools such as Chrome DevTools
(#26501).
* meta:
* Gireesh Punathil is now a member of the Technical Steering Committee
(#26657).
* Added ZYSzys to collaborators (#26730).
PR-URL: #26949
targos added a commit that referenced this pull request
Mar 28, 2019Notable changes:
* crypto
* Allow deriving public from private keys (Tobias Nießen)
[#26278](#26278).
* events
* Added a `once` function to use `EventEmitter` with promises
(Matteo Collina) [#26078](#26078).
* tty
* Added a `hasColors` method to `WriteStream` (Ruben Bridgewater)
[#26247](#26247).
* Added NO_COLOR and FORCE_COLOR support (Ruben Bridgewater)
[#26485](#26485).
* v8
* Added `v8.getHeapSnapshot` and `v8.writeHeapSnapshot` to generate snapshots
in the format used by tools such as Chrome DevTools (James M Snell)
[#26501](#26501).
* worker
* Added `worker.moveMessagePortToContext`. This enables using MessagePorts in
different vm.Contexts, aiding with the isolation that the vm module seeks to
provide (Anna Henningsen)
[#26497](#26497).
* C++ API
* `AddPromiseHook` is now deprecated. This API was added to fill an use case
that is served by `async_hooks`, since that has `Promise` support
(Anna Henningsen) [#26529](#26529).
* Added a `Stop` API to shut down Node.js while it is running
(Gireesh Punathil) [#21283](#21283).
* meta
* [Gireesh Punathil](https://github.com/gireeshpunathil) is now a member of
the Technical Steering Committee
[#26657](#26657).
* Added [Yongsheng Zhang](https://github.com/ZYSzys) to collaborators
[#26730](#26730).
PR-URL: #26949
targos added a commit that referenced this pull request
Mar 28, 2019Notable changes:
* crypto
* Allow deriving public from private keys (Tobias Nießen)
[#26278](#26278).
* events
* Added a `once` function to use `EventEmitter` with promises
(Matteo Collina) [#26078](#26078).
* tty
* Added a `hasColors` method to `WriteStream` (Ruben Bridgewater)
[#26247](#26247).
* Added NO_COLOR and FORCE_COLOR support (Ruben Bridgewater)
[#26485](#26485).
* v8
* Added `v8.getHeapSnapshot` and `v8.writeHeapSnapshot` to generate snapshots
in the format used by tools such as Chrome DevTools (James M Snell)
[#26501](#26501).
* worker
* Added `worker.moveMessagePortToContext`. This enables using MessagePorts in
different vm.Contexts, aiding with the isolation that the vm module seeks to
provide (Anna Henningsen)
[#26497](#26497).
* C++ API
* `AddPromiseHook` is now deprecated. This API was added to fill an use case
that is served by `async_hooks`, since that has `Promise` support
(Anna Henningsen) [#26529](#26529).
* Added a `Stop` API to shut down Node.js while it is running
(Gireesh Punathil) [#21283](#21283).
* meta
* [Gireesh Punathil](https://github.com/gireeshpunathil) is now a member of
the Technical Steering Committee
[#26657](#26657).
* Added [Yongsheng Zhang](https://github.com/ZYSzys) to collaborators
[#26730](#26730).
PR-URL: #26949
BethGriggs pushed a commit that referenced this pull request
Apr 5, 2019Notable changes:
* crypto
* Allow deriving public from private keys (Tobias Nießen)
[#26278](#26278).
* events
* Added a `once` function to use `EventEmitter` with promises
(Matteo Collina) [#26078](#26078).
* tty
* Added a `hasColors` method to `WriteStream` (Ruben Bridgewater)
[#26247](#26247).
* Added NO_COLOR and FORCE_COLOR support (Ruben Bridgewater)
[#26485](#26485).
* v8
* Added `v8.getHeapSnapshot` and `v8.writeHeapSnapshot` to generate snapshots
in the format used by tools such as Chrome DevTools (James M Snell)
[#26501](#26501).
* worker
* Added `worker.moveMessagePortToContext`. This enables using MessagePorts in
different vm.Contexts, aiding with the isolation that the vm module seeks to
provide (Anna Henningsen)
[#26497](#26497).
* C++ API
* `AddPromiseHook` is now deprecated. This API was added to fill an use case
that is served by `async_hooks`, since that has `Promise` support
(Anna Henningsen) [#26529](#26529).
* Added a `Stop` API to shut down Node.js while it is running
(Gireesh Punathil) [#21283](#21283).
* meta
* [Gireesh Punathil](https://github.com/gireeshpunathil) is now a member of
the Technical Steering Committee
[#26657](#26657).
* Added [Yongsheng Zhang](https://github.com/ZYSzys) to collaborators
[#26730](#26730).
PR-URL: #26949
BethGriggs pushed a commit that referenced this pull request
Apr 16, 2019This change adds a EventEmitter.once() method that wraps ee.once in a promise. Co-authored-by: David Mark Clements <david.mark.clements@gmail.com> PR-URL: #26078 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
BethGriggs added a commit that referenced this pull request
May 28, 2019Notable changes:
- deps:
- icu 63.1 bump (CLDR 34) (Steven R. Loomis)
[#23715](#23715)
- upgrade npm to 6.9.0 (Kat Marchán)
[#26244](#26244)
- upgrade openssl sources to 1.1.1a (Sam Roberts)
[#25381](#25381)
- upgrade to libuv 1.24.1 (cjihrig)
[#25078](#25078)
- events: add once method to use promises with EventEmitter
(Matteo Collina) [#26078](#26078)
- n-api: mark thread-safe function as stable (Gabriel Schulhof)
[#25556](#25556)
- repl: support top-level for-await-of (Shelley Vohr)
[#23841](#23841)
- zlib:
- add brotli support (Anna Henningsen)
[#24938](#24938)
PR-URL: #27514
BethGriggs added a commit that referenced this pull request
May 28, 2019Notable changes:
- **deps**:
- update ICU to 64.2 (Ujjwal Sharma)
[#27361](#27361)
- upgrade npm to 6.9.0 (Kat Marchán)
[#26244](#26244)
- upgrade openssl sources to 1.1.1b (Sam Roberts)
[#26327](#26327)
- upgrade to libuv 1.28.0 (cjihrig)
[#27241](#27241)
- **events**:
- add once method to use promises with EventEmitter (Matteo Collina)
[#26078](#26078)
- **n-api**:
- mark thread-safe function as stable (Gabriel Schulhof)
[#25556](#25556)
- **repl**:
- support top-level for-await-of (Shelley Vohr)
[#23841](#23841)
- **zlib**:
- add brotli support (Anna Henningsen)
[#24938](#24938)
PR-URL: #27514
BethGriggs added a commit that referenced this pull request
May 28, 2019Notable changes:
- **deps**:
- update ICU to 64.2 (Ujjwal Sharma)
[#27361](#27361)
- upgrade npm to 6.9.0 (Kat Marchán)
[#26244](#26244)
- upgrade openssl sources to 1.1.1b (Sam Roberts)
[#26327](#26327)
- upgrade to libuv 1.28.0 (cjihrig)
[#27241](#27241)
- **events**:
- add once method to use promises with EventEmitter (Matteo Collina)
[#26078](#26078)
- **n-api**:
- mark thread-safe function as stable (Gabriel Schulhof)
[#25556](#25556)
- **repl**:
- support top-level for-await-of (Shelley Vohr)
[#23841](#23841)
- **zlib**:
- add brotli support (Anna Henningsen)
[#24938](#24938)
PR-URL: #27514
This was referenced
May 29, 2019This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters