GeezerVison is showing github.com — process: deprecate multipleResolves · nodejs/node@5796c3a
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: doc/api/deprecations.md +14Lines changed: 14 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -3061,6 +3061,20 @@ This method was deprecated because it is not compatible with |
3061 | 3061 |
|
3062 | 3062 | Use [`buffer.subarray`][] which does the same thing instead. |
3063 | 3063 |
|
| 3064 | +### DEPXXXX: `process.on('multipleResolves', handler)` |
| 3065 | + |
| 3066 | +<!-- YAML |
| 3067 | +changes: |
| 3068 | + - version: REPLACEME |
| 3069 | + pr-url: https://github.com/nodejs/node/pull/41872 |
| 3070 | + description: Documentation-only deprecation. |
| 3071 | +--> |
| 3072 | + |
| 3073 | +Type: Documentation-only |
| 3074 | + |
| 3075 | +This event was deprecated because it did not work with V8 promise combinators |
| 3076 | +which diminished its usefulness. |
| 3077 | + |
3064 | 3078 | [Legacy URL API]: url.md#legacy-url-api |
3065 | 3079 | [NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf |
3066 | 3080 | [RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3 |
|
Collapse file
Copy file name to clipboardExpand all lines: doc/api/process.md +6Lines changed: 6 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -181,8 +181,11 @@ See [Advanced serialization for `child_process`][] for more details. |
181 | 181 |
|
182 | 182 | <!-- YAML |
183 | 183 | added: v10.12.0 |
| 184 | +deprecated: REPLACEME |
184 | 185 | --> |
185 | 186 |
|
| 187 | +> Stability: 0 - Deprecated |
| 188 | +
|
186 | 189 | * `type` {string} The resolution type. One of `'resolve'` or `'reject'`. |
187 | 190 | * `promise` {Promise} The promise that resolved or rejected more than once. |
188 | 191 | * `value` {any} The value with which the promise was either resolved or |
@@ -200,6 +203,9 @@ This is useful for tracking potential errors in an application while using the |
200 | 203 | the occurrence of this event does not necessarily indicate an error. For |
201 | 204 | example, [`Promise.race()`][] can trigger a `'multipleResolves'` event. |
202 | 205 |
|
| 206 | +Because of the unreliability of the event in cases like the |
| 207 | +[`Promise.race()`][] example above it has been deprecated. |
| 208 | + |
203 | 209 | ```mjs |
204 | 210 | import process from 'process'; |
205 | 211 |
|
|