Commit Graph

19 Commits

Author SHA1 Message Date
Jason Zhang 8456a12459
watch: check parent and child path properly
Co-authored-by: Jake Yuesong Li <jake.yuesong@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/57425
Fixes: https://github.com/nodejs/node/issues/57422
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2025-04-06 09:48:53 +02:00
Carlos Espa b0051de23b
fs: prevent unwanted `dependencyOwners` removal
Remove files from watcher `dependencyOwners` on file change only if it
has no other owners.

Co-authored-by: Pietro Marchini <pietro.marchini94@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/55565
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-11-17 11:52:05 +01:00
Pietro Marchini dcf50f15bc
test_runner: ensure test watcher picks up new test files
PR-URL: https://github.com/nodejs/node/pull/54225
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2024-08-29 08:55:34 +00:00
jakecastelli 7125931f4c
test_runner: handle file rename and deletion under watch mode
Fixes: https://github.com/nodejs/node/issues/53113
PR-URL: https://github.com/nodejs/node/pull/53114
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
2024-06-02 08:11:30 +00:00
jakecastelli c7a63b0740
watch: fix variable naming
PR-URL: https://github.com/nodejs/node/pull/53101
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2024-05-24 05:31:05 +00:00
Matthieu Sieben c75675c726
watch: allow listening for grouped changes
PR-URL: https://github.com/nodejs/node/pull/52722
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-05-12 07:43:38 +00:00
Zack 70995bde61
watch: enable passthrough ipc in watch mode
PR-URL: https://github.com/nodejs/node/pull/50890
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-05-09 18:56:30 +00:00
atlowChemi fec7e505fc watch: use internal addAbortListener
PR-URL: https://github.com/nodejs/node/pull/52081
Refs: https://github.com/nodejs/node/pull/48596
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-03-16 09:09:00 +00:00
Moshe Atlow 257f32296d
watch: batch file restarts
Co-authored-by: Matthieu <matthieusieben@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/51992
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2024-03-09 21:55:09 +00:00
Luigi Pinca 8bb30274db
watch: clarify that the fileName parameter can be null
Add a comment to clarify that the `fileName` parameter can be `null` if
the file name cannot be determined.

PR-URL: https://github.com/nodejs/node/pull/51305
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-12-30 21:30:15 +00:00
vnc5 9db4bf40d4
watch: fix null `fileName` on windows systems
PR-URL: https://github.com/nodejs/node/pull/49891
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-12-28 20:44:44 +00:00
Deokjin Kim b3fc9173ed
lib: use internal `fileURLToPath`
For internal usage, `internal/url` should be used.

Refs: https://github.com/nodejs/node/pull/49553
PR-URL: https://github.com/nodejs/node/pull/49558
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2023-09-10 14:57:37 +00:00
Moshe Atlow 48345d0f62 watch: decrease debounce rate
PR-URL: https://github.com/nodejs/node/pull/48926
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2023-07-27 20:39:14 +00:00
Moshe Atlow b814de6d77 watch: use debounce instead of throttle
PR-URL: https://github.com/nodejs/node/pull/48926
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2023-07-27 20:39:13 +00:00
atlowChemi ccdfb37438
lib: use addAbortListener
PR-URL: https://github.com/nodejs/node/pull/48550
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2023-07-11 19:50:29 +03:00
Moshe Atlow ca71ae6549 test_runner: stop watch mode when abortSignal aborted
PR-URL: https://github.com/nodejs/node/pull/48259
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-06-02 00:28:08 +00:00
Moshe Atlow 97355c74e8
test_runner: support watch mode
PR-URL: https://github.com/nodejs/node/pull/45214
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-11-13 21:40:26 +00:00
Moshe Atlow ce16bf553f
watch: watch for missing dependencies
PR-URL: https://github.com/nodejs/node/pull/45348
Reviewed-By: Ruy Adorno <ruyadorno@google.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com>
2022-11-13 15:13:26 +00:00
Moshe Atlow beb0520af7 cli: add `--watch`
PR-URL: https://github.com/nodejs/node/pull/44366
Fixes: https://github.com/nodejs/node/issues/40429
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-09-05 12:25:09 +03:00