diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-03-22 00:30:21 +0100 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-04-10 00:43:41 +0200 |
commit | 9d4ab9011796902a086ca12b0a18088e2fb35cd4 (patch) | |
tree | 9e8e5076a53ce845af0c9a0893d5e7482c4ad227 /doc/api/buffer.md | |
parent | e048b1552363df05d21ef3fa0054d9ab6b801df4 (diff) | |
download | android-node-v8-9d4ab9011796902a086ca12b0a18088e2fb35cd4.tar.gz android-node-v8-9d4ab9011796902a086ca12b0a18088e2fb35cd4.tar.bz2 android-node-v8-9d4ab9011796902a086ca12b0a18088e2fb35cd4.zip |
buffer: do deprecation warning outside `node_modules`
In addition to `--pending-deprecation`, emit a deprecation warning
for usage of the `Buffer()` constructor for call sites that are outside
of `node_modules`.
The goal of this is to better target developers, rather than
burdening users with an omnipresent and quickly ignored warning.
This implements the result of a TSC meeting discussion
from March 22, 2018.
PR-URL: https://github.com/nodejs/node/pull/19524
Refs: https://github.com/nodejs/node/issues/19079#issuecomment-375121443
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'doc/api/buffer.md')
-rw-r--r-- | doc/api/buffer.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 2ea989e7fe..fbd7ace6b6 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -304,6 +304,10 @@ It can be constructed in a variety of ways. <!-- YAML deprecated: v6.0.0 changes: + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/19524 + description: Calling this constructor emits a deprecation warning when + run from code outside the `node_modules` directory. - version: v7.2.1 pr-url: https://github.com/nodejs/node/pull/9529 description: Calling this constructor no longer emits a deprecation warning. @@ -328,6 +332,10 @@ const buf = new Buffer([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); added: v3.0.0 deprecated: v6.0.0 changes: + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/19524 + description: Calling this constructor emits a deprecation warning when + run from code outside the `node_modules` directory. - version: v7.2.1 pr-url: https://github.com/nodejs/node/pull/9529 description: Calling this constructor no longer emits a deprecation warning. @@ -380,6 +388,10 @@ console.log(buf); <!-- YAML deprecated: v6.0.0 changes: + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/19524 + description: Calling this constructor emits a deprecation warning when + run from code outside the `node_modules` directory. - version: v7.2.1 pr-url: https://github.com/nodejs/node/pull/9529 description: Calling this constructor no longer emits a deprecation warning. @@ -410,6 +422,10 @@ console.log(buf2.toString()); <!-- YAML deprecated: v6.0.0 changes: + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/19524 + description: Calling this constructor emits a deprecation warning when + run from code outside the `node_modules` directory. - version: v8.0.0 pr-url: https://github.com/nodejs/node/pull/12141 description: new Buffer(size) will return zero-filled memory by default. @@ -447,6 +463,10 @@ console.log(buf); <!-- YAML deprecated: v6.0.0 changes: + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/19524 + description: Calling this constructor emits a deprecation warning when + run from code outside the `node_modules` directory. - version: v7.2.1 pr-url: https://github.com/nodejs/node/pull/9529 description: Calling this constructor no longer emits a deprecation warning. |