Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

vpx: watch reports for `vpx --watch`, and `vpx watch` on oxc-node's watcher

Offen
#3,141 0 Kommentare 1 Reaktion 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@fengmk2 arbeitet bereits daran.

Seit 20.10.2026.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

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.

oxc-node added both pieces in oxc-project/oxc-node#861, which #2936 syncs (ce22828):

  1. 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.
  2. oxnode watch. A tsx-style watcher, about 2,500 lines of TypeScript on Node.js built-ins.

Plan

  1. 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.
  2. 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.
  3. vpx watch. Run oxc-node's watcher, bundled from the vendored source, once oxc-project/oxc-node#871 gives it an entry that takes vpx's loader and name.
    • Both CLIs route vpx watch <script>: the global vpx execs Node.js with the bundled watcher, and the local bin calls it in process.
    • Add docs and snapshots, and a vp migrate rule that rewrites tsx watch to vpx watch.

Notes

  • vpx watch currently runs the binary of the npm package watch. A subcommand changes that, as tsx and oxnode did.
  • The process count matches vpx --watch, since Node.js watch mode also runs a watcher process above the script.
  • Step 1 does not depend on oxc-project/oxc-node#871 and can land first.
Vorherrschende Sprache
Rust
Sterne
6.3k
Forks
283
Ø Merge
1 T. 16 Std.
Gemergte PRs (30 T.)
214

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus voidzero-dev/vite-plus

Alle Issues in voidzero-dev/vite-plus

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.