node/test/fixtures
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
..
0-dns
apilinks
b
clustered-server
console
copy/kitchen-sink
crypto
cycles
debugger
dotenv src: support multi-line values for .env file 2024-02-15 12:05:54 +01:00
errors errors: improve hideStackFrames 2023-11-14 09:18:05 +01:00
es-module-loaders esm: fix hook name in error message 2023-12-15 15:26:22 -03:00
es-module-require-cache esm: bypass CJS loader in default load under --default-type=module 2023-11-14 09:18:00 +01:00
es-module-shadow-realm module: bootstrap module loaders in shadow realm 2023-11-23 10:15:44 +01:00
es-module-specifiers
es-module-url
es-modules src: do not treat all paths ending with node_modules as such 2024-01-02 15:05:26 -03:00
GH-7131
global
internal-modules
json-with-directory-name-module
keys tls: fix order of setting cipher before setting cert and key 2023-11-23 10:15:46 +01:00
macos-app-sandbox
module-extension-over-directory
module-load-order
module-require
module-require-symlink
nested-index
node_modules esm: fix hint on invalid module specifier 2024-01-02 15:05:26 -03:00
openssl3-conf
package-main-enoent
packages
permission test: remove common.expectsError calls for asserts 2024-02-15 12:05:52 +01:00
policy policy: use tamper-proof integrity check function 2023-10-13 18:03:19 -03:00
policy-manifest policy: handle Module.constructor and main.extensions bypass 2023-08-09 14:33:55 -03:00
postject-copy
repl-folder-extensions/foo.js
require-bin
require-empty-main
resolve-paths
sea sea: support sea.getRawAsset() 2024-02-15 12:06:44 +01:00
self_ref_module
snapshot lib: account for cwd access from snapshot serialization cb 2024-03-01 09:20:49 +01:00
source-map lib,src: extract sourceMappingURL from module 2024-02-27 12:10:14 +01:00
syntax
test-init-index
test-init-native
test-module-loading-globalpaths
test-repl-tab-completion
test-runner test_runner: serialize 'expected' and 'actual' in isolation 2024-02-29 12:54:52 +01:00
tools/checkimports
uncaught-exceptions
v8 test: migrate message v8 tests from Python to JS 2023-11-23 10:15:39 +01:00
v8-coverage
vm
wasi
watch-mode test: use tmpdir.resolve() 2023-08-21 16:41:53 +00:00
workload
wpt test,crypto: update WebCryptoAPI WPT 2024-02-15 12:05:49 +01:00
x509-escaping
.empty-hidden-repl-history-file
.empty-repl-history-file
.node_repl_history
a.js
aead-vectors.js
altdocs.md
assert-first-line.js
assert-long-line.js
async-error.js
baz.js
catch-stdout-error.js
child-process-echo-options.js
child-process-message-and-exit.js
child-process-persistent.js
child-process-spawn-node.js
child-process-stay-alive-forever.js
child_process_should_emit_error.js
cjs-module-wrap.js
cjs-module-wrapper.js
cluster-preload-test.js
cluster-preload.js
crash.wasm
crash.wat
debugger-repeat-last.js
debugger-util-regression-fixture.js
define-global.js
deprecated-userland-class.js
deprecated-userland-function.js
deprecated-userland-subclass.js
deprecated.js
destroy-stdin.js
disable-warning-worker.js src: add --disable-warning option 2023-11-29 09:46:34 -03:00
disable-warning.js src: add --disable-warning option 2023-11-29 09:46:34 -03:00
doc_inc_1.md
doc_inc_2.md
doc_with_backticks_in_headings.md
doc_with_yaml.md
document_with_cjs_and_esm_code_snippet.md
document_with_esm_and_cjs_code_snippet.md
document_with_links.md
document_with_special_heading.md
echo-close-check.js
echo.js
elipses.txt
empty-with-bom.txt
empty.cjs esm: do not call getSource when format is commonjs 2023-11-29 09:49:48 -03:00
empty.js
empty.json
empty.txt
emptyframe.http2
exit.js
experimental.json
exports-function-with-param.js
external-repl-module.js
failcounter.js
failmustcall1.js
failmustcall2.js
file-to-read-with-bom.txt
file-to-read-without-bom.txt
fixture.ini
foo
gc.js
GH-892-request.js
GH-1899-output.js
google_ssl_hello.bin
guess-hash-seed.js
icu-punycode-toascii.json
inspector-global-function.mjs
inspector-open.js
intrinsic-mutation.js
invalid.json
is-object.js
ispreloading.js
klass-with-fields.js
leakedGlobal.js
linux-perf-logger.js test: v8: Add test-linux-perf-logger test suite 2023-11-11 20:38:23 +01:00
linux-perf.js
loop.js
mime-whatwg-generated.js
mime-whatwg.js
module-loading-error.node
monkey-patch-run-main.js
net-fd-passing-receiver.js
no-wrapper.js
not-main-module.js
old-repl-history-file-faulty.json
old-repl-history-file-obj.json
openssl_fips_disabled.cnf
openssl_fips_enabled.cnf
order_of_end_tags_5873.md
out-of-bound.wasm
out-of-bound.wat
outside.txt
overwrite-config-preload-module.js
parent-process-nonpersistent-fork.js
parent-process-nonpersistent.js
path-resolve.js
path.js
person-large.jpg
person.jpg
person.jpg.br
person.jpg.gz
pkgexports.mjs
print A.js
print-10-lines.js
print-chars-from-buffer.js
print-chars.js
print-delayed.js
print-error-message.js
print-intrinsic-mutation-name.js
printA.js
printB.js
printC.js
process-exit-code-cases.js
pseudo-multimember-gzip.gz
pseudo-multimember-gzip.z
pss-vectors.json
readfile_pipe_test.txt
recursive-a.cjs esm: fix loading of CJS modules from ESM 2023-09-06 10:12:14 +00:00
recursive-b.cjs esm: fix loading of CJS modules from ESM 2023-09-06 10:12:14 +00:00
recvfd.js
registerExt.hello.world
registerExt.test
registerExt2.test
repl-load-multiline-no-trailing-newline.js
repl-load-multiline.js
repl-pretty-stack.js
repl-tab-completion-nested-repls.js
report-oom.js
require-resolve.js module: make CJS load from ESM loader 2023-08-13 04:23:05 +00:00
rsa-oaep-test-vectors.js
sample.png
sample_document.md
sea.js sea: add support for V8 bytecode-only caching 2023-07-26 10:10:35 +00:00
semicolon.js
shared-memory.wasm
shared-memory.wat
should_exit.js
simple.wasm
simple.wat
spawn_closed_stdio.py
test-error-first-line-offset.js
test-fs-readfile-error.js
test-fs-stat-sync-overflow.js
test-resolution-inspect-brk-main.ext
test-resolution-inspect-brk-resolver.js
throws_error.js
throws_error1.js
throws_error2.js
throws_error3.js
throws_error4.js
throws_error5.js
throws_error6.js
throws_error7.js
tls-connect.js
tls-session-ticket.txt
tz-version.txt deps: update timezone to 2024a 2024-02-19 14:14:40 +01:00
url-idna.js
url-searchparams.js
url-setter-tests-additional.js
url-tests-additional.js
utf8-bom-shebang-shebang.js
utf8-bom.js
utf8-bom.json
utf8-shebang-bom.js
utf8_test_text.txt test: consolidate utf8 text fixtures in tests 2023-12-04 11:15:01 +01:00
warnings.js
wasi-preview-1.js test: split wasi tests 2024-02-27 12:10:13 +01:00
worker-data.cjs
worker-data.mjs
worker-from-argv.js
worker-name.js
worker-preload.js
worker-script.mjs
worker-script.ts
x.txt
x1024.txt