Skip to content

Commit c8a9a2b

Browse files
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

34 files changed

+86
-86
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
94913cbffeff60c862ef818ca62cdc329dc2fd57
1+
03613cd68c9e1d7ec5cb1eceb91f27f1935a7b8b
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
94913cbffeff60c862ef818ca62cdc329dc2fd57
1+
03613cd68c9e1d7ec5cb1eceb91f27f1935a7b8b

compiled/facebook-www/React-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1493,7 +1493,7 @@ __DEV__ &&
14931493
exports.useTransition = function () {
14941494
return resolveDispatcher().useTransition();
14951495
};
1496-
exports.version = "19.3.0-www-classic-94913cbf-20260123";
1496+
exports.version = "19.3.0-www-classic-03613cd6-20260123";
14971497
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
14981498
"function" ===
14991499
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1493,7 +1493,7 @@ __DEV__ &&
14931493
exports.useTransition = function () {
14941494
return resolveDispatcher().useTransition();
14951495
};
1496-
exports.version = "19.3.0-www-modern-94913cbf-20260123";
1496+
exports.version = "19.3.0-www-modern-03613cd6-20260123";
14971497
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
14981498
"function" ===
14991499
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,4 +610,4 @@ exports.useSyncExternalStore = function (
610610
exports.useTransition = function () {
611611
return ReactSharedInternals.H.useTransition();
612612
};
613-
exports.version = "19.3.0-www-classic-94913cbf-20260123";
613+
exports.version = "19.3.0-www-classic-03613cd6-20260123";

compiled/facebook-www/React-prod.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,4 +610,4 @@ exports.useSyncExternalStore = function (
610610
exports.useTransition = function () {
611611
return ReactSharedInternals.H.useTransition();
612612
};
613-
exports.version = "19.3.0-www-modern-94913cbf-20260123";
613+
exports.version = "19.3.0-www-modern-03613cd6-20260123";

compiled/facebook-www/React-profiling.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ exports.useSyncExternalStore = function (
614614
exports.useTransition = function () {
615615
return ReactSharedInternals.H.useTransition();
616616
};
617-
exports.version = "19.3.0-www-classic-94913cbf-20260123";
617+
exports.version = "19.3.0-www-classic-03613cd6-20260123";
618618
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
619619
"function" ===
620620
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-profiling.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ exports.useSyncExternalStore = function (
614614
exports.useTransition = function () {
615615
return ReactSharedInternals.H.useTransition();
616616
};
617-
exports.version = "19.3.0-www-modern-94913cbf-20260123";
617+
exports.version = "19.3.0-www-modern-03613cd6-20260123";
618618
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
619619
"function" ===
620620
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20491,10 +20491,10 @@ __DEV__ &&
2049120491
(function () {
2049220492
var internals = {
2049320493
bundleType: 1,
20494-
version: "19.3.0-www-classic-94913cbf-20260123",
20494+
version: "19.3.0-www-classic-03613cd6-20260123",
2049520495
rendererPackageName: "react-art",
2049620496
currentDispatcherRef: ReactSharedInternals,
20497-
reconcilerVersion: "19.3.0-www-classic-94913cbf-20260123"
20497+
reconcilerVersion: "19.3.0-www-classic-03613cd6-20260123"
2049820498
};
2049920499
internals.overrideHookState = overrideHookState;
2050020500
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -20529,7 +20529,7 @@ __DEV__ &&
2052920529
exports.Shape = Shape;
2053020530
exports.Surface = Surface;
2053120531
exports.Text = Text;
20532-
exports.version = "19.3.0-www-classic-94913cbf-20260123";
20532+
exports.version = "19.3.0-www-classic-03613cd6-20260123";
2053320533
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
2053420534
"function" ===
2053520535
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.modern.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20262,10 +20262,10 @@ __DEV__ &&
2026220262
(function () {
2026320263
var internals = {
2026420264
bundleType: 1,
20265-
version: "19.3.0-www-modern-94913cbf-20260123",
20265+
version: "19.3.0-www-modern-03613cd6-20260123",
2026620266
rendererPackageName: "react-art",
2026720267
currentDispatcherRef: ReactSharedInternals,
20268-
reconcilerVersion: "19.3.0-www-modern-94913cbf-20260123"
20268+
reconcilerVersion: "19.3.0-www-modern-03613cd6-20260123"
2026920269
};
2027020270
internals.overrideHookState = overrideHookState;
2027120271
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -20300,7 +20300,7 @@ __DEV__ &&
2030020300
exports.Shape = Shape;
2030120301
exports.Surface = Surface;
2030220302
exports.Text = Text;
20303-
exports.version = "19.3.0-www-modern-94913cbf-20260123";
20303+
exports.version = "19.3.0-www-modern-03613cd6-20260123";
2030420304
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
2030520305
"function" ===
2030620306
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)