summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2017-03-11 12:18:53 -0800
committerJames M Snell <jasnell@gmail.com>2017-04-19 09:15:50 -0700
commita16b570f8c1283db81b85ff78ce73608a4265f61 (patch)
treebc1dd9d23003dfb32d81b8aadb7d36302e703f0b /doc
parentd3dedb7223c54e77e7fa58c899070eaa4c3b2503 (diff)
downloadandroid-node-v8-a16b570f8c1283db81b85ff78ce73608a4265f61.tar.gz
android-node-v8-a16b570f8c1283db81b85ff78ce73608a4265f61.tar.bz2
android-node-v8-a16b570f8c1283db81b85ff78ce73608a4265f61.zip
src: add --pending-deprecation and NODE_PENDING_DEPRECATION
Command line flag and environment variable that can be used to indicate that pending deprecations should be emitted. PR-URL: https://github.com/nodejs/node/pull/11968 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/cli.md28
-rw-r--r--doc/node.18
2 files changed, 36 insertions, 0 deletions
diff --git a/doc/api/cli.md b/doc/api/cli.md
index 8e5915d5f9..e003d38fe2 100644
--- a/doc/api/cli.md
+++ b/doc/api/cli.md
@@ -137,6 +137,20 @@ added: v0.11.14
Throw errors for deprecations.
+### `--pending-deprecation`
+<!-- YAML
+added: REPLACEME
+-->
+
+Emit pending deprecation warnings.
+
+*Note*: Pending deprecations are generally identical to a runtime deprecation
+with the notable exception that they are turned *off* by default and will not
+be emitted unless either the `--pending-deprecation` command line flag, or the
+`NODE_PENDING_DEPRECATION=1` environment variable, is set. Pending deprecations
+are used to provide a kind of selective "early warning" mechanism that
+developers may leverage to detect deprecated API usage.
+
### `--no-warnings`
<!-- YAML
added: v6.0.0
@@ -383,6 +397,20 @@ added: v7.5.0
When set to `1`, process warnings are silenced.
+### `NODE_PENDING_DEPRECATION=1`
+<!-- YAML
+added: REPLACEME
+-->
+
+When set to `1`, emit pending deprecation warnings.
+
+*Note*: Pending deprecations are generally identical to a runtime deprecation
+with the notable exception that they are turned *off* by default and will not
+be emitted unless either the `--pending-deprecation` command line flag, or the
+`NODE_PENDING_DEPRECATION=1` environment variable, is set. Pending deprecations
+are used to provide a kind of selective "early warning" mechanism that
+developers may leverage to detect deprecated API usage.
+
### `NODE_PRESERVE_SYMLINKS=1`
<!-- YAML
added: v7.1.0
diff --git a/doc/node.1 b/doc/node.1
index e4d46b792e..3dff0a7829 100644
--- a/doc/node.1
+++ b/doc/node.1
@@ -116,6 +116,10 @@ Print stack traces for deprecations.
Throw errors for deprecations.
.TP
+.BR \-\-pending\-deprecation
+Emit pending deprecation warnings.
+
+.TP
.BR \-\-no\-warnings
Silence all process warnings (including deprecations).
@@ -260,6 +264,10 @@ When set to \fI1\fR, process warnings are silenced.
\':\'\-separated list of directories prefixed to the module search path.
.TP
+.BR NODE_PENDING_DEPRECATION = \fI1\fR
+When set to \fI1\fR, emit pending deprecation warnings.
+
+.TP
.BR NODE_REPL_HISTORY =\fIfile\fR
Path to the file used to store the persistent REPL history. The default path
is \fB~/.node_repl_history\fR, which is overridden by this variable. Setting the