node/lib
Livia Medeiros 75302d3dce 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
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>
Backport-PR-URL: https://github.com/nodejs/node/pull/42603
2022-05-01 16:44:20 -05:00
..
fs
internal fs: fix write methods param validation and docs 2022-05-01 16:44:20 -05:00
.eslintrc.yaml tools: add ESLint rule no-array-destructuring 2021-09-01 23:24:52 +02:00
_http_agent.js http: set lifo as the default scheduling strategy in Agent 2021-04-14 13:16:43 +02:00
_http_client.js url: expose urlToHttpOptions utility 2021-08-31 10:54:58 -04:00
_http_common.js http: clean up HttpParser correctly 2021-09-04 10:51:36 +02:00
_http_incoming.js http: explain the possibilty of refactor unused argument 2021-05-01 12:25:07 +02:00
_http_outgoing.js lib: revert primordials in a hot path 2021-06-11 09:30:23 +02:00
_http_server.js http,https: align server option of https with http 2021-09-04 10:49:50 +02:00
_stream_duplex.js stream: move to internal/streams 2020-12-02 19:22:19 +00:00
_stream_passthrough.js stream: move to internal/streams 2020-12-02 19:22:19 +00:00
_stream_readable.js stream: move to internal/streams 2020-12-02 19:22:19 +00:00
_stream_transform.js stream: move to internal/streams 2020-12-02 19:22:19 +00:00
_stream_wrap.js
_stream_writable.js stream: move to internal/streams 2020-12-02 19:22:19 +00:00
_tls_common.js tls: fix handling of x509 subject and issuer 2022-01-07 15:57:00 +00:00
_tls_wrap.js tls: allow reading data into a static buffer 2021-08-31 10:54:55 -04:00
assert.js doc,lib: prepare for stricter multi-line array linting 2021-09-04 12:24:57 +02:00
async_hooks.js async_hooks: use resource stack for AsyncLocalStorage run 2021-09-02 12:24:02 +02:00
buffer.js buffer: introduce Blob 2021-08-31 10:55:06 -04:00
child_process.js child_process: allow options.cwd receive a URL 2021-09-04 09:39:12 +02:00
cluster.js
console.js
constants.js
crypto.js crypto: make FIPS related options always available 2022-01-10 22:56:54 +00:00
dgram.js dgram: use simplified validator 2021-09-04 15:14:52 +02:00
diagnostics_channel.js lib: add unsubscribe method to non-active DC channels 2022-01-25 12:49:36 -05:00
dns.js dns: allow --dns-result-order to change default dns verbatim 2021-09-04 09:33:17 +02:00
domain.js lib: comment explaining special-case handling of promises 2021-08-31 10:55:08 -04:00
events.js lib: remove use of array destructuring 2021-09-01 23:24:52 +02:00
fs.js fs: fix write methods param validation and docs 2022-05-01 16:44:20 -05:00
http.js typings: add JSDoc typings for http 2021-05-08 12:44:44 -04:00
http2.js http2: add support for sensitive headers 2021-08-31 10:55:04 -04:00
https.js http,https: align server option of https with http 2021-09-04 10:49:50 +02:00
inspector.js inspector: refactor to use more primordials 2021-06-11 09:29:48 +02:00
module.js
net.js typings: add a few JSDoc typings for the net lib module 2021-09-04 13:05:00 +02:00
os.js lib: remove use of array destructuring 2021-09-01 23:24:52 +02:00
path.js path: inline conditions 2021-06-11 09:30:15 +02:00
perf_hooks.js doc,lib: prepare for stricter multi-line array linting 2021-09-04 12:24:57 +02:00
process.js
punycode.js
querystring.js doc,lib: prepare for stricter multi-line array linting 2021-09-04 12:24:57 +02:00
readline.js readline: allow completer to rewrite existing input 2021-09-04 12:40:45 +02:00
repl.js repl: do not include legacy getter/setter methods in completion 2021-09-04 15:14:38 +02:00
stream.js stream: fix legacy pipe error handling 2021-06-11 09:28:45 +02:00
string_decoder.js string_decoder: refactor to use more primordials 2021-06-11 09:29:46 +02:00
sys.js
timers.js typings: add JSDoc typings for timers 2021-09-04 13:02:39 +02:00
tls.js src: add cve reverts and associated tests 2022-01-07 15:57:11 +00:00
trace_events.js events: refactor to use more primordials 2021-06-11 09:29:50 +02:00
tty.js tty: refactor to avoid unsafe array iteration 2021-06-11 09:29:54 +02:00
url.js doc,lib: prepare for stricter multi-line array linting 2021-09-04 12:24:57 +02:00
util.js util: expose toUSVString 2021-09-04 10:03:29 +02:00
v8.js src: add JSDoc typings for v8 2021-09-04 12:45:45 +02:00
vm.js vm: use missing validator 2021-07-20 07:11:29 -04:00
wasi.js wasi: refactor to avoid unsafe array iteration 2021-06-11 09:29:54 +02:00
worker_threads.js worker: add setEnvironmentData/getEnvironmentData 2021-09-01 23:21:32 +02:00
zlib.js zlib: avoid converting Uint8Array instances to Buffer 2021-09-04 15:14:38 +02:00