node/doc/api
Anna Henningsen 40565e90b4
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-02-29 20:55:00 +00:00
..
addons.md doc: cast GetInternalField() return type to v8::Value in addons.md 2023-09-07 08:51:00 +00:00
assert.md doc: updates for better json generating 2024-02-13 21:37:42 +00:00
async_context.md 2023-04-18, Version 20.0.0 (Current) 2023-04-18 13:04:39 -03:00
async_hooks.md doc: declare path on example of async_hooks.executionAsyncId() 2023-07-18 20:00:50 +00:00
buffer.md doc: fix Buffer.allocUnsafe documentation 2023-11-15 14:51:25 +01:00
child_process.md doc: remove reference to resolved child_process v8 issue 2024-01-18 18:48:45 +00:00
cli.md doc: change ExperimentalWarnings to ExperimentalWarning 2024-02-26 13:14:36 +00:00
cluster.md doc: improve the documentation of the stdio option 2023-05-30 06:10:58 +00:00
console.md doc: update to align console.table row to the left 2023-11-06 16:47:53 +00:00
corepack.md doc: update corepack.md to account for 0.20.0 changes 2023-09-16 11:52:30 +02:00
crypto.md crypto: implement crypto.hash() 2024-02-27 13:27:19 +01:00
debugger.md debugger: improve validations and documents for watch and unwatch 2023-03-13 04:29:53 +00:00
deprecations.md doc: mark isWebAssemblyCompiledModule eol 2024-01-14 12:13:28 +00:00
dgram.md doc: fix typo in dgram docs 2023-10-18 00:46:38 +00:00
diagnostics_channel.md doc: correct tracingChannel.traceCallback() 2023-12-08 21:01:23 +00:00
dns.md doc: fix dns.lookup and dnsPromises.lookup description 2024-01-30 02:20:39 +01:00
documentation.md doc: add experimental stages 2023-01-14 14:25:08 +00:00
domain.md doc: fix typos 2023-04-23 13:34:08 +00:00
embedding.md src: add detailed embedder process initialization API 2022-08-05 19:46:08 +00:00
errors.md 2024-02-14, Version 21.6.2 (Current) 2024-02-14 14:12:25 -03:00
esm.md doc: remove redundant backquote which breaks sentence 2024-02-28 10:52:11 +00:00
events.md doc: updates for better json generating 2024-02-13 21:37:42 +00:00
fs.md doc: updates for better json generating 2024-02-13 21:37:42 +00:00
globals.md doc: fix globals.md introduction 2024-02-15 08:30:44 +00:00
http2.md http2: add h2 compat support for appendHeader 2024-01-12 16:09:57 +00:00
http.md doc: updates for better json generating 2024-02-13 21:37:42 +00:00
https.md doc: get rid of unnecessary eslint-skip comments 2023-11-22 19:03:33 +00:00
index.md src: add initial support for single executable applications 2023-02-18 02:49:18 +00:00
inspector.md doc: updates for better json generating 2024-02-13 21:37:42 +00:00
intl.md doc: improve documentation about ICU data fallback 2023-09-22 13:24:23 +00:00
module.md doc: updates for better json generating 2024-02-13 21:37:42 +00:00
modules.md esm: detect ESM syntax in ambiguous JavaScript 2023-10-20 15:44:56 +00:00
n-api.md 2024-01-15, Version 21.6.0 (Current) 2024-01-15 11:50:31 -03:00
net.md doc: fix type of connectionAttempt parameter 2024-01-19 16:12:16 +00:00
os.md doc: updates for better json generating 2024-02-13 21:37:42 +00:00
packages.md doc: add note regarding --experimental-detect-module 2023-12-10 00:35:03 +01:00
path.md doc: note that path.normalize deviates from POSIX 2024-01-29 15:45:38 +00:00
perf_hooks.md doc: updates for better json generating 2024-02-13 21:37:42 +00:00
permissions.md test,doc: clarify wildcard usage 2024-02-14 14:27:34 -03:00
policy.md doc: add missing period 2023-08-10 15:37:10 +00:00
process.md doc: update guide link for Event Loop 2024-02-27 13:29:59 +00:00
punycode.md doc: format doc/api/*.md with markdown formatter 2021-10-20 11:59:11 +02:00
querystring.md doc: get rid of unnecessary eslint-skip comments 2023-11-22 19:03:33 +00:00
readline.md doc: detailed description of keystrokes Ctrl-Y and Meta-Y 2023-08-08 19:51:43 +00:00
repl.md doc: harmonize fenced code snippet flags 2023-05-21 09:36:57 +02:00
report.md doc: use "file system" instead of "filesystem" 2023-01-14 01:10:38 +00:00
single-executable-applications.md sea: update stability index 2024-02-17 18:03:26 +00:00
stream.md doc: updates for better json generating 2024-02-13 21:37:42 +00:00
string_decoder.md doc: add print results for examples in StringDecoder 2023-08-27 15:32:47 +00:00
synopsis.md doc: clarify explaination text on how to run the example 2023-10-06 13:37:31 +00:00
test.md doc: updates for better json generating 2024-02-13 21:37:42 +00:00
timers.md 2023-09-18, Version 18.18.0 'Hydrogen' (LTS) 2023-09-18 17:39:17 -04:00
tls.md doc: updates for better json generating 2024-02-13 21:37:42 +00:00
tracing.md src: trace threadpool event 2022-11-01 04:21:13 +00:00
tty.md doc: clarify tty.isRaw 2023-05-21 16:41:28 +00:00
url.md doc: updates for better json generating 2024-02-13 21:37:42 +00:00
util.md util: add styleText API to text formatting 2024-02-26 09:55:57 +00:00
v8.md lib: account for cwd access from snapshot serialization cb 2024-02-29 20:55:00 +00:00
vm.md vm: support using the default loader to handle dynamic import() 2024-02-01 11:45:42 +00:00
wasi.md 2024-01-09, Version 20.11.0 'Iron' (LTS) 2024-01-09 20:47:16 +00:00
webcrypto.md doc: updates for better json generating 2024-02-13 21:37:42 +00:00
webstreams.md stream: implement min option for ReadableStreamBYOBReader.read 2024-01-04 12:57:14 +01:00
worker_threads.md doc: updates for better json generating 2024-02-13 21:37:42 +00:00
zlib.md doc: add lint rule to enforce trailing commas 2022-11-17 13:19:12 +00:00