Commit 67b4248
authored
feat(cli): add --watch flag to deno check (#34224)
Adds `--watch` support to `deno check`, so that the type checker re-runs
automatically whenever a file in the dependency graph changes. This has
been a long-standing user request — the existing workaround is to wrap
`deno check` in an external file-watching tool, which is less precise
and doesn't reuse anything across runs.
The implementation follows the same shape as `run --watch`: when the
flag is present, the check pass is run inside `file_watcher::watch_func`, and
the factory is built via `from_flags_for_watcher` so the graph loader's
`FileWatcherReporter` automatically registers every loaded module with
the watcher. No bespoke path collection is needed beyond what the module
graph already exposes.
Closes #148581 parent f1a7e4e commit 67b4248
3 files changed
Lines changed: 72 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| 205 | + | |
205 | 206 | | |
206 | 207 | | |
207 | 208 | | |
| |||
764 | 765 | | |
765 | 766 | | |
766 | 767 | | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
767 | 771 | | |
768 | 772 | | |
769 | 773 | | |
| |||
2896 | 2900 | | |
2897 | 2901 | | |
2898 | 2902 | | |
| 2903 | + | |
| 2904 | + | |
| 2905 | + | |
2899 | 2906 | | |
2900 | 2907 | | |
2901 | 2908 | | |
| |||
6792 | 6799 | | |
6793 | 6800 | | |
6794 | 6801 | | |
| 6802 | + | |
6795 | 6803 | | |
6796 | 6804 | | |
6797 | 6805 | | |
| |||
10228 | 10236 | | |
10229 | 10237 | | |
10230 | 10238 | | |
| 10239 | + | |
10231 | 10240 | | |
10232 | 10241 | | |
10233 | 10242 | | |
| |||
10244 | 10253 | | |
10245 | 10254 | | |
10246 | 10255 | | |
| 10256 | + | |
10247 | 10257 | | |
10248 | 10258 | | |
10249 | 10259 | | |
| |||
10260 | 10270 | | |
10261 | 10271 | | |
10262 | 10272 | | |
| 10273 | + | |
10263 | 10274 | | |
10264 | 10275 | | |
10265 | 10276 | | |
| |||
10276 | 10287 | | |
10277 | 10288 | | |
10278 | 10289 | | |
| 10290 | + | |
10279 | 10291 | | |
10280 | 10292 | | |
10281 | 10293 | | |
| |||
10306 | 10318 | | |
10307 | 10319 | | |
10308 | 10320 | | |
| 10321 | + | |
10309 | 10322 | | |
10310 | 10323 | | |
10311 | 10324 | | |
| |||
10335 | 10348 | | |
10336 | 10349 | | |
10337 | 10350 | | |
| 10351 | + | |
10338 | 10352 | | |
10339 | 10353 | | |
10340 | 10354 | | |
| |||
16127 | 16141 | | |
16128 | 16142 | | |
16129 | 16143 | | |
| 16144 | + | |
16130 | 16145 | | |
16131 | 16146 | | |
16132 | 16147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
20 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
21 | 48 | | |
22 | 49 | | |
23 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
494 | 523 | | |
495 | 524 | | |
496 | 525 | | |
| |||
0 commit comments