mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-04 08:04:37 +08:00
- watcher.off/removeListener of a listener that is not the last one moves the later listeners down instead of up, so the removed closure leaves the list. - The watchFile adapters for zero- and one-parameter listeners release the Stats their listener has no parameter for, and the fs.watch adapter releases the event string once a dynamic value holds it. - A one-parameter fs.watch listener whose eventType is dynamic receives a boxed string through the emitted adapter. - fs.watch, fs.watchFile and fs.unwatchFile throw ERR_INVALID_ARG_VALUE for a path holding a null byte, and a new watchFile poller throws ERR_OUT_OF_RANGE when interval is not a uint32, as Node does. Both watchFile libCalls check for the pending exception. - fs.watchFile and fs.unwatchFile have surface-manifest entries, so a fence can deny them. - The self-hosted feature records list watchFile, and the node-types fence fixture uses fs.openAsBlob in place of the now-lowered fs.watchFile. Tests: tests/corpus/fs-watch-listener-shapes.ts (listener shapes, off of a middle listener, null-byte path) with its order baseline and cost file, the validation cases in fs-watch-file-polling.ts, and tests/harness/fs-watch-leaks.test.ts, which runs both programs under LeakSanitizer in the sanitized lane.