Skip to content

Commit 9330f5e

Browse files
thefourtheyervagg
authored andcommitted
doc: make the deprecations consistent
The deprecation messages in the documentations should be in the format Stability: 0 - Deprecated: Use [alternate] instead. so that they will be consistent. PR-URL: #2450 Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 536c3d0 commit 9330f5e

8 files changed

+29
-17
lines changed

doc/api/crypto.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Example:
6767

6868
## crypto.createCredentials(details)
6969

70-
Stability: 0 - Deprecated. Use [tls.createSecureContext][] instead.
70+
Stability: 0 - Deprecated: Use [tls.createSecureContext][] instead.
7171

7272
Creates a credentials object, with the optional details being a
7373
dictionary with keys:

doc/api/events.markdown

+5-2
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ Returns the number of listeners listening to the `type` of event.
145145

146146
### Class Method: EventEmitter.listenerCount(emitter, event)
147147

148-
Return the number of listeners for a given event.
148+
Stability: 0 - Deprecated: Use [emitter.listenerCount][] instead.
149149

150-
_Note: This is deprecated. Use `emitter.listenerCount` instead._
150+
Returns the number of listeners for a given event.
151151

152152
### Event: 'newListener'
153153

@@ -186,3 +186,6 @@ constructor function. For example:
186186

187187
// Inherit functions from `EventEmitter`'s prototype
188188
util.inherits(MyEventEmitter, EventEmitter);
189+
190+
191+
[emitter.listenerCount]: #events_emitter_listenercount_type

doc/api/fs.markdown

+8-6
Original file line numberDiff line numberDiff line change
@@ -671,9 +671,7 @@ callback, and have some fallback logic if it is null.
671671

672672
## fs.exists(path, callback)
673673

674-
`fs.exists()` is **deprecated**. For supported alternatives please check out
675-
[`fs.stat`](fs.html#fs_fs_stat_path_callback) or
676-
[`fs.access`](fs.html#fs_fs_access_path_mode_callback).
674+
Stability: 0 - Deprecated: Use [fs.stat][] or [fs.access][] instead.
677675

678676
Test whether or not the given path exists by checking with the file system.
679677
Then call the `callback` argument with either true or false. Example:
@@ -697,9 +695,7 @@ and handle the error when it's not there.
697695
Synchronous version of [`fs.exists`](fs.html#fs_fs_exists_path_callback).
698696
Returns `true` if the file exists, `false` otherwise.
699697

700-
`fs.existsSync()` is **deprecated**. For supported alternatives please check
701-
out [`fs.statSync`](fs.html#fs_fs_statsync_path) or
702-
[`fs.accessSync`](fs.html#fs_fs_accesssync_path_mode).
698+
Stability: 0 - Deprecated: Use [fs.statSync][] or [fs.accessSync][] instead.
703699

704700
## fs.access(path[, mode], callback)
705701

@@ -907,3 +903,9 @@ See more details in [fs.watch](#fs_fs_watch_filename_options_listener).
907903
* `error` {Error object}
908904

909905
Emitted when an error occurs.
906+
907+
908+
[fs.stat]: #fs_fs_stat_path_callback
909+
[fs.access]: #fs_fs_access_path_mode_callback
910+
[fs.statSync]: #fs_fs_statsync_path
911+
[fs.accessSync]: #fs_fs_accesssync_path_mode

doc/api/http.markdown

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ added to the `'request'` event.
6666

6767
## http.createClient([port][, host])
6868

69-
This function is **deprecated**; please use [http.request()][] instead.
69+
Stability: 0 - Deprecated: Use [http.request][] instead.
70+
7071
Constructs a new HTTP client. `port` and `host` refer to the server to be
7172
connected to.
7273

@@ -1092,8 +1093,7 @@ client's authentication details.
10921093
[http.IncomingMessage]: #http_http_incomingmessage
10931094
[http.ServerResponse]: #http_class_http_serverresponse
10941095
[http.Server]: #http_class_http_server
1095-
[http.request()]: #http_http_request_options_callback
1096-
[http.request()]: #http_http_request_options_callback
1096+
[http.request]: #http_http_request_options_callback
10971097
[net.Server.close()]: net.html#net_server_close_callback
10981098
[net.Server.listen(path)]: net.html#net_server_listen_path_callback
10991099
[net.Server.listen(port)]: net.html#net_server_listen_port_hostname_backlog_callback

doc/api/net.markdown

+3-2
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,8 @@ with `child_process.fork()`.
281281

282282
### server.connections
283283

284-
This function is **deprecated**; please use [server.getConnections()][] instead.
284+
Stability: 0 - Deprecated: Use [server.getConnections][] instead.
285+
285286
The number of concurrent connections on the server.
286287

287288
This becomes `null` when sending a socket to a child with
@@ -623,7 +624,7 @@ Returns true if input is a version 6 IP address, otherwise returns false.
623624
['end']: #net_event_end
624625
[EventEmitter]: events.html#events_class_events_eventemitter
625626
['listening']: #net_event_listening
626-
[server.getConnections()]: #net_server_getconnections_callback
627+
[server.getConnections]: #net_server_getconnections_callback
627628
[Readable Stream]: stream.html#stream_class_stream_readable
628629
[stream.setEncoding()]: stream.html#stream_readable_setencoding_encoding
629630
[dns.lookup()]: dns.html#dns_dns_lookup_hostname_options_callback

doc/api/repl.markdown

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ By default, the REPL will persist history between `iojs` REPL sessions by saving
3535
to a `.node_repl_history` file in the user's home directory. This can be
3636
disabled by setting the environment variable `NODE_REPL_HISTORY=""`.
3737

38+
### NODE_REPL_HISTORY_FILE
39+
40+
Stability: 0 - Deprecated: Use `NODE_REPL_HISTORY` instead.
41+
3842
Previously in io.js v2.x, REPL history was controlled by using a
3943
`NODE_REPL_HISTORY_FILE` environment variable, and the history was saved in JSON
4044
format. This variable has now been deprecated, and your REPL history will

doc/api/tls.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ The number of concurrent connections on the server.
702702

703703
## Class: CryptoStream
704704

705-
Stability: 0 - Deprecated. Use tls.TLSSocket instead.
705+
Stability: 0 - Deprecated: Use [tls.TLSSocket][] instead.
706706

707707
This is an encrypted stream.
708708

doc/api/tty.markdown

+4-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ terminal.
2424

2525
## tty.setRawMode(mode)
2626

27-
Deprecated. Use `tty.ReadStream#setRawMode()`
28-
(i.e. `process.stdin.setRawMode()`) instead.
27+
Stability: 0 - Deprecated: Use [tty.ReadStream#setRawMode][] (i.e. process.stdin.setRawMode) instead.
2928

3029

3130
## Class: ReadStream
@@ -73,3 +72,6 @@ has changed.
7372
console.log('screen size has changed!');
7473
console.log(process.stdout.columns + 'x' + process.stdout.rows);
7574
});
75+
76+
77+
[tty.ReadStream#setRawMode]: #tty_rs_setrawmode_mode

0 commit comments

Comments
 (0)