0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib
Tobias Nießen 5a0777776d
crypto: do not overwrite _writableState.defaultEncoding
This only affects the writable side of LazyTransform and should not
change the behavior of any LazyTransform streams (Cipher, Decipher,
Cipheriv, Decipheriv, Hash, Hmac).

If the user does not set defaultEncoding when creating a transform
stream, WritableState uses 'utf8' by default. Only LazyTransform
overwrites this with 'buffer' for strict backward compatibility. This
was necessary when crypto.DEFAULT_ENCODING still existed. Now that
DEFAULT_ENCODING has been removed, defaultEncoding is always 'buffer'.
The writable side of LazyTransform appears to treat 'utf8' and 'buffer'
in exactly the same way. Therefore, there seems to be no need to
overwrite _writableState.defaultEncoding at this point.

Nevertheless, because Node.js has failed to hide implementation details
such as _writableState from the ecosystem, we may want to consider this
a breaking change.

Refs: https://github.com/nodejs/node/pull/47182
Refs: https://github.com/nodejs/node/pull/8611
PR-URL: https://github.com/nodejs/node/pull/49140
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2023-08-27 14:12:29 +00:00
..
assert
dns
fs
inspector
internal crypto: do not overwrite _writableState.defaultEncoding 2023-08-27 14:12:29 +00:00
path
readline readline: use addAbortListener 2023-07-11 19:50:13 +03:00
stream
test test_runner: expose spec reporter as newable function 2023-08-17 18:21:14 +00:00
timers fs: use kResistStopPropagation 2023-06-24 15:52:38 +00:00
util
_http_agent.js
_http_client.js
_http_common.js http: null the joinDuplicateHeaders property on cleanup 2023-07-03 06:20:13 +00:00
_http_incoming.js
_http_outgoing.js
_http_server.js http: start connections checking interval on listen 2023-07-24 20:55:19 +00:00
_stream_duplex.js
_stream_passthrough.js
_stream_readable.js
_stream_transform.js
_stream_wrap.js
_stream_writable.js
_tls_common.js
_tls_wrap.js tls: fix bugs of double TLS 2023-08-04 10:14:18 -04:00
.eslintrc.yaml lib: add navigator.hardwareConcurrency 2023-07-04 22:55:34 +00:00
assert.js
async_hooks.js
buffer.js
child_process.js typings: update JSDoc for cwd in child_process 2023-08-08 15:32:31 +08:00
cluster.js
console.js
constants.js
crypto.js
dgram.js dgram: socket add asyncDispose 2023-07-11 21:10:27 +00:00
diagnostics_channel.js lib: implement WeakReference on top of JS WeakRef 2023-08-16 18:45:07 +02:00
dns.js
domain.js lib: implement WeakReference on top of JS WeakRef 2023-08-16 18:45:07 +02:00
events.js events: fix bug listenerCount don't compare wrapped listener 2023-07-10 06:33:51 +00:00
fs.js fs: add the options param description in openAsBlob() 2023-08-26 14:48:59 +00:00
http2.js
http.js
https.js http: start connections checking interval on listen 2023-07-24 20:55:19 +00:00
inspector.js inspector: open add SymbolDispose 2023-07-16 09:46:27 +00:00
module.js
net.js net: server add asyncDispose 2023-07-11 21:10:28 +00:00
os.js
path.js
perf_hooks.js
process.js
punycode.js
querystring.js
readline.js readline: use addAbortListener 2023-07-11 19:50:13 +03:00
repl.js
stream.js
string_decoder.js
sys.js
test.js test_runner: add initial draft for fakeTimers 2023-06-22 04:01:52 +00:00
timers.js timers: support Symbol.dispose 2023-07-05 13:39:38 +00:00
tls.js
trace_events.js
tty.js
url.js lib: remove invalid parameter to toASCII 2023-07-22 00:52:20 +00:00
util.js
v8.js
vm.js vm: store MicrotaskQueue in ContextifyContext directly 2023-08-16 20:18:46 +00:00
wasi.js
worker_threads.js
zlib.js