node/lib/internal
Anna Henningsen af32d433ee lib: account for cwd access from snapshot serialization cb
Functions registered with `addSerializeCallback()` can access and call
`process.cwd()`. b7d836e2c7 accounted for the fact that it is
necessary to reset the cwd cache after the snapshot builder script has
run, but did not account for possible accesses from serialization
callbacks. To properly account for these, add a deserialization
callback as well.

As a related drive-by fix, also mention the execution order of
callbacks in the documentation.

Refs: https://github.com/nodejs/node/pull/49684
PR-URL: https://github.com/nodejs/node/pull/51901
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-03-01 09:20:49 +01:00
..
assert
bootstrap lib: account for cwd access from snapshot serialization cb 2024-03-01 09:20:49 +01:00
child_process
cluster
console lib: create global console properties at snapshot build time 2024-02-26 13:57:09 +01:00
crypto crypto: implement crypto.hash() 2024-02-29 12:54:51 +01:00
debugger
dns dns: call handle.setServers() with a valid array 2023-11-29 09:46:34 -03:00
events
fs Revert "fs: remove workaround for esm package" 2024-02-29 12:52:55 +01:00
http2 http2: close idle connections when allowHTTP1 is true 2024-02-15 12:06:43 +01:00
legacy
main src: simplify embedder entry point execution 2024-02-27 12:10:13 +01:00
modules lib,src: extract sourceMappingURL from module 2024-02-27 12:10:14 +01:00
per_context lib: move function declaration outside of loop 2024-01-02 15:05:25 -03:00
perf perf_hooks: performance milestone time origin timestamp improvement 2024-02-29 12:54:52 +01:00
policy
process lib: add assertion for user ESM execution 2024-02-27 12:10:12 +01:00
readline
repl
source_map lib,src: extract sourceMappingURL from module 2024-02-27 12:10:14 +01:00
streams stream: fix eventNames() to not return not defined events 2024-02-29 12:54:51 +01:00
test
test_runner test_runner: serialize 'expected' and 'actual' in isolation 2024-02-29 12:54:52 +01:00
tls tls: fix order of setting cipher before setting cert and key 2023-11-23 10:15:46 +01:00
util assert,crypto: make KeyObject and CryptoKey testable for equality 2024-01-02 15:05:22 -03:00
v8
vm vm: implement isContext() directly in JS land with private symbol 2024-02-19 14:14:41 +01:00
watch_mode watch: clarify that the fileName parameter can be null 2024-01-02 15:05:28 -03:00
webstreams stream: fix cloned webstreams not being unref correctly 2024-02-15 12:05:50 +01:00
worker
abort_controller.js
assert.js
async_hooks.js
blob.js
blocklist.js
buffer.js
child_process.js
cli_table.js
constants.js
dgram.js
encoding.js stream: implement min option for ReadableStreamBYOBReader.read 2024-02-15 12:00:54 +01:00
error_serdes.js
errors.js sea: support embedding assets 2024-02-15 12:06:44 +01:00
event_target.js events: no stopPropagation call in cancelBubble 2024-02-27 12:13:41 +01:00
file.js lib,src: replace toUSVString with toWellFormed() 2023-12-04 11:15:03 +01:00
fixed_queue.js
freelist.js
freeze_intrinsics.js lib: fix use of --frozen-intrinsics with --jitless 2024-01-02 15:05:26 -03:00
heap_utils.js
histogram.js
http.js
idna.js
inspector_async_hook.js
js_stream_socket.js http2: add server handshake utility 2024-02-15 12:02:33 +01:00
linkedlist.js
mime.js util: pass invalidSubtypeIndex instead of trimmedSubtype to error 2024-01-02 15:05:26 -03:00
navigator.js
net.js
options.js
priority_queue.js
promise_hooks.js
querystring.js
readme.md
repl.js
socket_list.js
socketaddress.js
stream_base_commons.js
timers.js
trace_events_async_hooks.js
tty.js
url.js url: don't update URL immediately on update to URLSearchParams 2024-02-15 15:41:29 +01:00
util.js lib: move encodingsMap to internal/util 2024-02-29 12:54:51 +01:00
v8_prof_polyfill.js
v8_prof_processor.js
validators.js stream: implement min option for ReadableStreamBYOBReader.read 2024-02-15 12:00:54 +01:00
vm.js typings: lib/internal/vm.js 2024-02-19 14:14:43 +01:00
wasm_web_api.js
watchdog.js
webidl.js
worker.js

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.