node/lib/internal
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
..
assert
bootstrap process: add api to enable source-maps programmatically 2021-09-04 15:14:27 +02:00
child_process
cluster tools: add ESLint rule no-array-destructuring 2021-09-01 23:24:52 +02:00
console console: fix prototype pollution via console.table 2022-01-07 15:57:20 +00:00
crypto doc,lib: prepare for stricter multi-line array linting 2021-09-04 12:24:57 +02:00
debugger debugger: remove undefined parameter 2021-09-04 15:14:43 +02:00
dns dns: add "tries" option to Resolve options 2021-09-04 09:54:31 +02:00
fs fs: fix write methods param validation and docs 2022-05-01 16:44:20 -05:00
http2 doc,lib: prepare for stricter multi-line array linting 2021-09-04 12:24:57 +02:00
main debugger: rename internal module 2021-09-04 15:14:27 +02:00
modules esm: make process.exit() default to exit code 0 2022-01-25 08:01:02 -05:00
per_context test: add tests for bound apply variants of varargs primordials 2021-09-04 11:05:24 +02:00
policy policy: canonicalize before resolving specifiers 2021-09-04 15:14:55 +02:00
process esm: make process.exit() default to exit code 0 2022-01-25 08:01:02 -05:00
readline
repl repl: fix tla function hoisting 2021-09-04 15:14:54 +02:00
source_map process: add api to enable source-maps programmatically 2021-09-04 15:14:27 +02:00
streams stream: resume stream on drain 2022-04-27 20:43:50 -05:00
test
timers
util tools: relax max-len lint rule for template strings 2021-09-04 15:14:19 +02:00
vm
worker lib: remove use of array destructuring 2021-09-01 23:24:52 +02:00
abort_controller.js
assert.js
async_hooks.js async_hooks: eliminate native PromiseHook 2021-08-31 10:55:08 -04:00
blob.js buffer: make Blob's constructor more spec-compliant 2021-08-31 10:55:07 -04:00
blocklist.js net: allow net.BlockList to use net.SocketAddress objects 2021-08-31 10:55:02 -04:00
buffer.js buffer: add base64url encoding option 2021-08-31 10:55:05 -04:00
child_process.js child_process: queue pending messages 2022-05-01 16:44:20 -05:00
cli_table.js
constants.js
dgram.js
dtrace.js
encoding.js lib: use validateObject 2021-09-04 15:14:50 +02:00
error_serdes.js
errors.js crypto,tls: implement safe x509 GeneralName format 2022-01-07 15:56:45 +00:00
event_target.js events: allow the options argument to be null 2021-09-04 15:14:36 +02:00
fixed_queue.js
freelist.js
freeze_intrinsics.js doc,lib: prepare for stricter multi-line array linting 2021-09-04 12:24:57 +02:00
heap_utils.js
histogram.js perf_hooks: introduce createHistogram 2021-08-31 10:55:05 -04:00
http.js
idna.js
inspector_async_hook.js
js_stream_socket.js
linkedlist.js
net.js
options.js src: allow to negate boolean CLI flags 2021-09-04 09:48:00 +02:00
priority_queue.js
querystring.js doc,lib: prepare for stricter multi-line array linting 2021-09-04 12:24:57 +02:00
readme.md
repl.js
socket_list.js
socketaddress.js net: allow net.BlockList to use net.SocketAddress objects 2021-08-31 10:55:02 -04:00
stream_base_commons.js
timers.js
tls.js
trace_events_async_hooks.js lib: comment explaining special-case handling of promises 2021-08-31 10:55:08 -04:00
tty.js lib: cleanup validation 2021-09-04 15:14:51 +02:00
url.js http: decodes url.username and url.password for authorization header 2021-09-04 15:14:39 +02:00
util.js lib: use validators 2021-09-04 15:14:50 +02:00
v8_prof_polyfill.js
v8_prof_processor.js doc,lib: prepare for stricter multi-line array linting 2021-09-04 12:24:57 +02:00
validators.js lib: simplify validators 2021-09-04 15:14:52 +02:00
watchdog.js
worker.js process: add 'worker' event 2021-09-04 09:23:24 +02:00

Internal Modules

The modules in lib/internal are intended for internal use in Node.js core only, and are not accessible with require() from user modules. These modules can be changed at any time. Reliance on these modules outside of core is not supported in any way.