You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vpx: watch reports for vpx --watch, and vpx watch on oxc-node's watcher #3141
Follow-up to #2936. vpx --watch is Node.js watch mode with the script loader. It restarts when an imported file changes, but not in two common cases, which tsx watch misses as well:
A tsconfig edit, such as a new paths mapping.
A file an import is waiting for, created after the first run (import "./later.js", then later.ts is added).
It also has none of tsx watch's options: include and exclude globs, clearing the screen, rerunning on Enter, a kill timeout, or polling for Docker, WSL, and network drives.
Dependency reports. With enable_watch_report on, the binding records the tsconfig files it reads and the paths a failed resolve looked for. @oxc-node/core's loader sends them as { "watch:import": [url] } over IPC, the message Node.js's own watcher already reads, so node --watch restarts on them.
oxnode watch. A tsx-style watcher, about 2,500 lines of TypeScript on Node.js built-ins.
Plan
Reports for vpx --watch. Forward enable_watch_report and take_watch_dependencies in packages/cli/binding/src/oxc_node.rs. Port the relay into vpx's loader: the preload reports on the in-thread path, and the off-thread hooks send through a channel to the main thread. It is on only when WATCH_REPORT_DEPENDENCIES is set. vpx --watch then restarts on tsconfig edits and created files, with no new process.
Signal ack. Port the child's side of OXNODE_SIGNAL_ACK into the preload, so the watcher does not deliver Ctrl+C twice when it runs in a pipe or the background.
Activity
docs(vpx): bring the RFC up to date