aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2017-10-22 14:37:34 -0700
committerRich Trott <rtrott@gmail.com>2017-11-16 22:00:39 -0800
commit617e3e96e671ae3507d233a23d5217bab56256c5 (patch)
tree00cf1af2ac7980d8d3fb36e62cfa62d433741eb2 /doc
parent07d39a2262dac233b5f86b06ecc16484ab0f7858 (diff)
downloadandroid-node-v8-617e3e96e671ae3507d233a23d5217bab56256c5.tar.gz
android-node-v8-617e3e96e671ae3507d233a23d5217bab56256c5.tar.bz2
android-node-v8-617e3e96e671ae3507d233a23d5217bab56256c5.zip
util: runtime deprecation for custom .inspect()
Change documentation-only deprecation for custom inspection using `object.inspect` property to a runtime deprecation. This is a breaking change. Custom inspection via `object.inspect` is deprecated because there is a more robust Symbol-based alternative to `.inspect` and the custom inspection via `object.inspect` feature means that people can accidentally break `console.log()` simply by attaching a `.inspect` property to their objects. Note that since this is a deprecation, the custom inspection will still work. The breaking change is simply the printing of a warning which could alarm users, break tests or other things that might be dependent on specific output, etc. PR-URL: https://github.com/nodejs/node/pull/16393 Ref: https://github.com/nodejs/node/issues/15549 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/deprecations.md2
-rw-r--r--doc/api/util.md1
2 files changed, 2 insertions, 1 deletions
diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md
index 6cd5142193..9e386b1bd9 100644
--- a/doc/api/deprecations.md
+++ b/doc/api/deprecations.md
@@ -703,7 +703,7 @@ Type: Runtime
<a id="DEP0079"></a>
### DEP0079: Custom inspection function on Objects via .inspect()
-Type: Documentation-only
+Type: Runtime
Using a property named `inspect` on an object to specify a custom inspection
function for [`util.inspect()`][] is deprecated. Use [`util.inspect.custom`][]
diff --git a/doc/api/util.md b/doc/api/util.md
index d790319862..43f26e934d 100644
--- a/doc/api/util.md
+++ b/doc/api/util.md
@@ -112,6 +112,7 @@ environment variable. For example: `NODE_DEBUG=fs,net,tls`.
added: v0.8.0
changes:
- version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/16393
description: Deprecation warnings are only emitted once for each code.
-->