| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 324473c commit 8c8c97d
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3137,6 +3137,24 @@ parameter in [`fs.write()`][], [`fs.writeFile()`][], [`fs.appendFile()`][], | |||
| 3137 | 3137 | [`fs.writeFileSync()`][], and [`fs.appendFileSync()`][] is deprecated. | |
| 3138 | 3138 | Convert them to primitive strings. | |
| 3139 | 3139 | ||
| 3140 | + ### DEP0163: `channel.subscribe(onMessage)`, `channel.unsubscribe(onMessage)` | ||
| 3141 | + | ||
| 3142 | + <!-- YAML | ||
| 3143 | + changes: | ||
| 3144 | + - version: REPLACEME | ||
| 3145 | + pr-url: https://github.com/nodejs/node/pull/42714 | ||
| 3146 | + description: Documentation-only deprecation. | ||
| 3147 | + --> | ||
| 3148 | + | ||
| 3149 | + Type: Documentation-only | ||
| 3150 | + | ||
| 3151 | + These methods were deprecated because they can be used in a way which does not | ||
| 3152 | + hold the channel reference alive long enough to receive the events. | ||
| 3153 | + | ||
| 3154 | + Use [`diagnostics_channel.subscribe(name, onMessage)`][] or | ||
| 3155 | + [`diagnostics_channel.unsubscribe(name, onMessage)`][] which does the same | ||
| 3156 | + thing instead. | ||
| 3157 | + | ||
| 3140 | 3158 | [Legacy URL API]: url.md#legacy-url-api | |
| 3141 | 3159 | [NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf | |
| 3142 | 3160 | [RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3 | |
@@ -3177,6 +3195,8 @@ Convert them to primitive strings. | |||
| 3177 | 3195 | [`crypto.scrypt()`]: crypto.md#cryptoscryptpassword-salt-keylen-options-callback | |
| 3178 | 3196 | [`decipher.final()`]: crypto.md#decipherfinaloutputencoding | |
| 3179 | 3197 | [`decipher.setAuthTag()`]: crypto.md#deciphersetauthtagbuffer-encoding | |
| 3198 | + [`diagnostics_channel.subscribe(name, onMessage)`]: diagnostics_channel.md#diagnostics_channelsubscribename-onmessage | ||
| 3199 | + [`diagnostics_channel.unsubscribe(name, onMessage)`]: diagnostics_channel.md#diagnostics_channelunsubscribename-onmessage | ||
| 3180 | 3200 | [`dns.lookup()`]: dns.md#dnslookuphostname-options-callback | |
| 3181 | 3201 | [`dnsPromises.lookup()`]: dns.md#dnspromiseslookuphostname-options | |
| 3182 | 3202 | [`domain`]: domain.md | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -308,8 +308,11 @@ channel.publish({ | |||
| 308 | 308 | added: | |
| 309 | 309 | - v15.1.0 | |
| 310 | 310 | - v14.17.0 | |
| 311 | + deprecated: REPLACEME | ||
| 311 | 312 | --> | |
| 312 | 313 | ||
| 314 | + > Stability: 0 - Deprecated: Use [`diagnostics_channel.subscribe(name, onMessage)`][] | ||
| 315 | + | ||
| 313 | 316 | * `onMessage` {Function} The handler to receive channel messages | |
| 314 | 317 | * `message` {any} The message data | |
| 315 | 318 | * `name` {string|symbol} The name of the channel | |
@@ -344,6 +347,7 @@ channel.subscribe((message, name) => { | |||
| 344 | 347 | added: | |
| 345 | 348 | - v15.1.0 | |
| 346 | 349 | - v14.17.0 | |
| 350 | + deprecated: REPLACEME | ||
| 347 | 351 | changes: | |
| 348 | 352 | - version: | |
| 349 | 353 | - v17.1.0 | |
@@ -353,6 +357,8 @@ changes: | |||
| 353 | 357 | description: Added return value. Added to channels without subscribers. | |
| 354 | 358 | --> | |
| 355 | 359 | ||
| 360 | + > Stability: 0 - Deprecated: Use [`diagnostics_channel.unsubscribe(name, onMessage)`][] | ||
| 361 | + | ||
| 356 | 362 | * `onMessage` {Function} The previous subscribed handler to remove | |
| 357 | 363 | * Returns: {boolean} `true` if the handler was found, `false` otherwise. | |
| 358 | 364 | ||
@@ -424,5 +430,6 @@ Emitted when server sends a response. | |||
| 424 | 430 | ||
| 425 | 431 | [`'uncaughtException'`]: process.md#event-uncaughtexception | |
| 426 | 432 | [`channel.subscribe(onMessage)`]: #channelsubscribeonmessage | |
| 427 | - [`diagnostics_channel.subscribe(name, onMessage)`]: #diagnostics_channelunsubscribename_onmessage | ||
| 428 | 433 | [`diagnostics_channel.channel(name)`]: #diagnostics_channelchannelname | |
| 434 | + [`diagnostics_channel.subscribe(name, onMessage)`]: #diagnostics_channelsubscribename-onmessage | ||
| 435 | + [`diagnostics_channel.unsubscribe(name, onMessage)`]: #diagnostics_channelunsubscribename-onmessage | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments