Commit c8a9a2b
committed
[compiler] Improve snap usability (facebook#35537)
A whole bunch of changes to snap aimed at making it more usable for
humans and agents. Here's the new CLI interface:
```
node dist/main.js --help
Options:
--version Show version number [boolean]
--sync Run compiler in main thread (instead of using worker
threads or subprocesses). Defaults to false.
[boolean] [default: false]
--worker-threads Run compiler in worker threads (instead of
subprocesses). Defaults to true.
[boolean] [default: true]
--help Show help [boolean]
-w, --watch Run compiler in watch mode, re-running after changes
[boolean]
-u, --update Update fixtures [boolean]
-p, --pattern Optional glob pattern to filter fixtures (e.g.,
"error.*", "use-memo") [string]
-d, --debug Enable debug logging to print HIR for each pass[boolean]
```
Key changes:
* Added abbreviations for common arguments
* No more testfilter.txt! Filtering/debugging works more like Jest, see
below.
* The `--debug` flag (`-d`) controls whether to emit debug information.
In watch mode, this flag sets the initial debug value, and it can be
toggled by pressing the 'd' key while watching.
* The `--pattern` flag (`-p`) sets a filter pattern. In watch mode, this
flag sets the initial filter. It can be changed by pressing 'p' and
typing a new pattern, or pressing 'a' to switch to running all tests.
* As before, we only actually enable debugging if debug mode is enabled
_and_ there is only one test selected.
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/35537).
* facebook#35607
* facebook#35298
* facebook#35596
* facebook#35573
* facebook#35595
* facebook#35539
* __->__ facebook#35537
* facebook#35523
DiffTrain build for [03613cd](facebook@03613cd)1 parent 8f2bd3e commit c8a9a2b
File tree
34 files changed
+86
-86
lines changed- compiled/facebook-www
34 files changed
+86
-86
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1493 | 1493 | | |
1494 | 1494 | | |
1495 | 1495 | | |
1496 | | - | |
| 1496 | + | |
1497 | 1497 | | |
1498 | 1498 | | |
1499 | 1499 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1493 | 1493 | | |
1494 | 1494 | | |
1495 | 1495 | | |
1496 | | - | |
| 1496 | + | |
1497 | 1497 | | |
1498 | 1498 | | |
1499 | 1499 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
613 | | - | |
| 613 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
613 | | - | |
| 613 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
617 | | - | |
| 617 | + | |
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
617 | | - | |
| 617 | + | |
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20491 | 20491 | | |
20492 | 20492 | | |
20493 | 20493 | | |
20494 | | - | |
| 20494 | + | |
20495 | 20495 | | |
20496 | 20496 | | |
20497 | | - | |
| 20497 | + | |
20498 | 20498 | | |
20499 | 20499 | | |
20500 | 20500 | | |
| |||
20529 | 20529 | | |
20530 | 20530 | | |
20531 | 20531 | | |
20532 | | - | |
| 20532 | + | |
20533 | 20533 | | |
20534 | 20534 | | |
20535 | 20535 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20262 | 20262 | | |
20263 | 20263 | | |
20264 | 20264 | | |
20265 | | - | |
| 20265 | + | |
20266 | 20266 | | |
20267 | 20267 | | |
20268 | | - | |
| 20268 | + | |
20269 | 20269 | | |
20270 | 20270 | | |
20271 | 20271 | | |
| |||
20300 | 20300 | | |
20301 | 20301 | | |
20302 | 20302 | | |
20303 | | - | |
| 20303 | + | |
20304 | 20304 | | |
20305 | 20305 | | |
20306 | 20306 | | |
| |||
0 commit comments