0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib
Anna Henningsen 9d4ab90117
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>
2018-04-10 00:43:41 +02:00
..
fs fs: refactor stats array to be more generic 2018-04-04 15:25:59 +08:00
internal buffer: do deprecation warning outside node_modules 2018-04-10 00:43:41 +02:00
_http_agent.js tools: add 'spaced-comment' into eslint rules 2018-04-01 22:33:13 +08:00
_http_client.js http: fix request when setHost is true 2018-04-03 15:43:40 -07:00
_http_common.js tools: add 'spaced-comment' into eslint rules 2018-04-01 22:33:13 +08:00
_http_incoming.js http: do not replace .read() in IncomingMessage 2018-02-27 12:26:40 +01:00
_http_outgoing.js lib: improve error handling 2018-03-25 03:01:45 +02:00
_http_server.js test,http: fix http dump test 2018-04-07 10:03:22 +02:00
_stream_duplex.js net,stream: remove DuplexBase 2018-04-06 10:23:22 +02:00
_stream_passthrough.js
_stream_readable.js stream: 'readable' have precedence over flowing 2018-04-06 13:50:15 +02:00
_stream_transform.js stream: make virtual methods errors consistent 2018-03-12 14:24:34 +01:00
_stream_wrap.js
_stream_writable.js stream: give error message if write() cb called twice 2018-03-27 01:38:05 +01:00
_tls_common.js lib: always show ERR_INVALID_ARG_TYPE received part 2018-03-25 01:45:37 +01:00
_tls_wrap.js tls: drop NPN (next protocol negotiation) support 2018-03-27 16:22:37 +02:00
.eslintrc.yaml tools,lib: forbid native Error constructors 2018-03-21 20:15:33 +01:00
assert.js assert: ensure .rejects() disallows sync throws 2018-04-03 22:41:01 -04:00
async_hooks.js lib: always show ERR_INVALID_ARG_TYPE received part 2018-03-25 01:45:37 +01:00
buffer.js buffer: do deprecation warning outside node_modules 2018-04-10 00:43:41 +02:00
child_process.js tools: add 'spaced-comment' into eslint rules 2018-04-01 22:33:13 +08:00
cluster.js
console.js console: add table method 2018-03-30 19:41:41 -05:00
constants.js
crypto.js lib: port errors to new system 2018-03-05 19:51:30 +01:00
dgram.js errors: improve SystemError messages 2018-04-05 04:46:26 +08:00
dns.js errors: make dns errors consistent 2018-04-05 19:29:02 +02:00
domain.js tools,lib: forbid native Error constructors 2018-03-21 20:15:33 +01:00
events.js lib: always show ERR_INVALID_ARG_TYPE received part 2018-03-25 01:45:37 +01:00
fs.js fs: make ReadStream throw TypeError on NaN 2018-04-06 10:51:35 +02:00
http2.js
http.js http: support server options on createServer 2018-03-25 11:51:32 +02:00
https.js tls: drop NPN (next protocol negotiation) support 2018-03-27 16:22:37 +02:00
inspector.js inspector: migrate errors from C++ to JS 2018-03-22 08:24:31 +01:00
module.js lib: add back lib/module.js redirection 2018-03-15 20:50:35 +08:00
net.js net,stream: remove DuplexBase 2018-04-06 10:23:22 +02:00
os.js errors: improve SystemError messages 2018-04-05 04:46:26 +08:00
path.js lib: always show ERR_INVALID_ARG_TYPE received part 2018-03-25 01:45:37 +01:00
perf_hooks.js perf_hooks: simplify perf_hooks 2018-04-03 13:57:41 -07:00
process.js
punycode.js
querystring.js tools: add 'spaced-comment' into eslint rules 2018-04-01 22:33:13 +08:00
readline.js lib: port errors to new system 2018-03-05 19:51:30 +01:00
repl.js lib: restructure cjs and esm loaders 2018-03-15 20:50:35 +08:00
stream.js zlib,stream: use “official” util.types typechecks 2018-03-28 16:21:56 -07:00
string_decoder.js lib: always show ERR_INVALID_ARG_TYPE received part 2018-03-25 01:45:37 +01:00
sys.js
timers.js lib: fix a typo in lib/timers "read through" 2018-03-28 20:10:19 -07:00
tls.js tls: runtime-deprecate tls.convertNPNProtocols() 2018-03-27 16:22:37 +02:00
tty.js errors: improve SystemError messages 2018-04-05 04:46:26 +08:00
url.js tools: add 'spaced-comment' into eslint rules 2018-04-01 22:33:13 +08:00
util.js tools: add 'spaced-comment' into eslint rules 2018-04-01 22:33:13 +08:00
v8.js lib: always show ERR_INVALID_ARG_TYPE received part 2018-03-25 01:45:37 +01:00
vm.js vm: move options checks from C++ to JS 2018-04-03 17:59:22 +02:00
zlib.js zlib: use .bytesWritten instead of .bytesRead 2018-04-10 00:36:26 +02:00