node/lib
Livia Medeiros 8009cb0a78 fs: fix write methods param validation and docs
The FS docs wrongfully indicated support for passing object with an own
`toString` function property to `FileHandle.prototype.appendFile`,
`FileHandle.prototype.writeFile`, `FileHandle.prototype.write`,
`fsPromises.writeFile`, and `fs.writeSync`. This commit fixes that, and
adds some test to ensure the actual behavior is aligned with the docs.
It also fixes a bug that makes the process crash if a non-buffer object
was passed to `FileHandle.prototype.write`.

Refs: https://github.com/nodejs/node/pull/34993
PR-URL: https://github.com/nodejs/node/pull/41677
Backport-PR-URL: https://github.com/nodejs/node/pull/42631
Refs: https://github.com/nodejs/node/issues/41666
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-04-07 00:20:46 -05:00
..
assert
dns
fs
internal fs: fix write methods param validation and docs 2022-04-07 00:20:46 -05:00
path
readline
stream stream: add reduce 2022-02-07 12:33:44 -05:00
timers tools: add timers functions to the list of restricted globals 2022-02-22 11:38:55 -05:00
util
.eslintrc.yaml lib: add legacy built-in functions to primordials 2022-03-07 17:23:19 +00:00
_http_agent.js http: add default argument for Agent.prototype.getName 2022-03-07 17:41:06 +00:00
_http_client.js http: trace http client by perf_hooks 2022-03-20 23:04:31 -04:00
_http_common.js
_http_incoming.js
_http_outgoing.js http: don't write empty data on req/res end() 2021-12-13 17:14:18 -05:00
_http_server.js http: trace http client by perf_hooks 2022-03-20 23:04:31 -04:00
_stream_duplex.js
_stream_passthrough.js
_stream_readable.js
_stream_transform.js
_stream_wrap.js
_stream_writable.js
_tls_common.js tls: fix handling of x509 subject and issuer 2022-01-08 00:39:19 +00:00
_tls_wrap.js tls: avoid throw in onerror for bad TLSSocket obj 2022-02-22 11:38:52 -05:00
assert.js lib: refactor to use primordials in lib/assert.js 2022-03-20 23:04:30 -04:00
async_hooks.js lib: fix AsyncResource.bind not using 'this' from the caller by default 2022-03-20 17:30:23 -04:00
buffer.js buffer: fix atob input validation 2022-04-06 12:25:51 -05:00
child_process.js child_process: add env contents types in JSDoc 2022-04-06 12:20:13 -05:00
cluster.js
console.js
constants.js
crypto.js crypto: clarify require("crypto").getRandomValues is Node.js specific 2022-03-07 17:23:21 +00:00
dgram.js src: properly report exceptions from AddressToJS() 2022-04-06 12:20:10 -05:00
diagnostics_channel.js
dns.js net,dns: trace tcp connection and dns by perf_hooks 2022-04-06 12:20:12 -05:00
domain.js domain: pass opts to EventEmitter.init 2022-01-24 17:35:45 +00:00
events.js lib: add internal genericNodeError() function 2022-02-21 00:37:30 -05:00
fs.js fs: fix write methods param validation and docs 2022-04-07 00:20:46 -05:00
http.js
http2.js
https.js lib: update JSDoc for linting 2022-04-06 12:20:11 -05:00
inspector.js
module.js
net.js net,dns: trace tcp connection and dns by perf_hooks 2022-04-06 12:20:12 -05:00
os.js os: avoid unnecessary usage of var 2022-04-06 12:25:54 -05:00
path.js
perf_hooks.js
process.js
punycode.js
querystring.js lib: include return types in JSDoc 2021-12-13 17:14:20 -05:00
readline.js
repl.js repl: remove preview when press escape 2022-03-07 17:23:21 +00:00
stream.js stream: port more test262 tests 2022-03-07 17:31:47 +00:00
string_decoder.js string_decoder: fix crash when calling __proto__.write() 2022-03-20 17:27:04 -04:00
sys.js
timers.js timers: use ref counts to count timers 2022-01-14 16:19:46 +01:00
tls.js src: add cve reverts and associated tests 2022-01-08 00:39:44 +00:00
trace_events.js
tty.js
url.js url: trim leading and trailing C0 control chars 2022-03-20 17:27:04 -04:00
util.js
v8.js
vm.js
wasi.js
worker_threads.js
zlib.js lib: add internal genericNodeError() function 2022-02-21 00:37:30 -05:00