Skip to content

Commit a8f7563

Browse files
committed
[compiler][snap] Support pattern of files to test as CLI argument (facebook#35148)
I've been trying out LLM agents for compiler development, and one thing i found is that the agent naturally wants to run `yarn snap <pattern>` to test a specific fixture, and I want to be able to tell it (directly or in rules/skills) to do this in order to get the debug output from all the compiler passes. Agents can figure out our current testfilter.txt file system but that's just tedious. So here we add support for `yarn snap -p <pattern>`. If you pass in a pattern with an extension, we target that extension specifically. If you pass in a .expect.md file, we look at that specific fixture. And if the pattern doesn't have extensions, we search for `<pattern>{.js,.jsx,.ts,.tsx}`. When patterns are enabled we automatically log as in debug mode (if there is a single match), and disable watch mode. Open to feedback! DiffTrain build for [ea4899e](facebook@ea4899e)
1 parent e39ebb4 commit a8f7563

23 files changed

+452
-282
lines changed

compiled-rn/VERSION_NATIVE_FB

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19.3.0-native-fb-fb2177c1-20251114
1+
19.3.0-native-fb-ea4899e1-20251117

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<ed15ee0c9ed03c51e0581677aa7442c6>>
10+
* @generated SignedSource<<4de3b8bd9c13c1649d7f76c2b78b9cda>>
1111
*/
1212

1313
"use strict";
@@ -404,5 +404,5 @@ __DEV__ &&
404404
exports.useFormStatus = function () {
405405
return resolveDispatcher().useHostTransitionStatus();
406406
};
407-
exports.version = "19.3.0-native-fb-fb2177c1-20251114";
407+
exports.version = "19.3.0-native-fb-ea4899e1-20251117";
408408
})();

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<1c836b36755519216317db77bb7a5c2a>>
10+
* @generated SignedSource<<67811eb430936ef43bceb4cd36dfd52c>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.3.0-native-fb-fb2177c1-20251114";
206+
exports.version = "19.3.0-native-fb-ea4899e1-20251117";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<1c836b36755519216317db77bb7a5c2a>>
10+
* @generated SignedSource<<67811eb430936ef43bceb4cd36dfd52c>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.3.0-native-fb-fb2177c1-20251114";
206+
exports.version = "19.3.0-native-fb-ea4899e1-20251117";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<be01ce8f9cd2259a912bf0e9cf265291>>
10+
* @generated SignedSource<<991ef8e6678dddde99d5f8c9c44ac256>>
1111
*/
1212

1313
/*
@@ -30242,11 +30242,11 @@ __DEV__ &&
3024230242
};
3024330243
(function () {
3024430244
var isomorphicReactPackageVersion = React.version;
30245-
if ("19.3.0-native-fb-fb2177c1-20251114" !== isomorphicReactPackageVersion)
30245+
if ("19.3.0-native-fb-ea4899e1-20251117" !== isomorphicReactPackageVersion)
3024630246
throw Error(
3024730247
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
3024830248
(isomorphicReactPackageVersion +
30249-
"\n - react-dom: 19.3.0-native-fb-fb2177c1-20251114\nLearn more: https://react.dev/warnings/version-mismatch")
30249+
"\n - react-dom: 19.3.0-native-fb-ea4899e1-20251117\nLearn more: https://react.dev/warnings/version-mismatch")
3025030250
);
3025130251
})();
3025230252
("function" === typeof Map &&
@@ -30283,10 +30283,10 @@ __DEV__ &&
3028330283
!(function () {
3028430284
var internals = {
3028530285
bundleType: 1,
30286-
version: "19.3.0-native-fb-fb2177c1-20251114",
30286+
version: "19.3.0-native-fb-ea4899e1-20251117",
3028730287
rendererPackageName: "react-dom",
3028830288
currentDispatcherRef: ReactSharedInternals,
30289-
reconcilerVersion: "19.3.0-native-fb-fb2177c1-20251114"
30289+
reconcilerVersion: "19.3.0-native-fb-ea4899e1-20251117"
3029030290
};
3029130291
internals.overrideHookState = overrideHookState;
3029230292
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -30436,5 +30436,5 @@ __DEV__ &&
3043630436
listenToAllSupportedEvents(container);
3043730437
return new ReactDOMHydrationRoot(initialChildren);
3043830438
};
30439-
exports.version = "19.3.0-native-fb-fb2177c1-20251114";
30439+
exports.version = "19.3.0-native-fb-ea4899e1-20251117";
3044030440
})();

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<8bf12fd946ac703db3ff4c530b1ec43c>>
10+
* @generated SignedSource<<26ad2256932da2df3f42fc4bce5188ea>>
1111
*/
1212

1313
/*
@@ -17702,14 +17702,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1770217702
};
1770317703
var isomorphicReactPackageVersion$jscomp$inline_2054 = React.version;
1770417704
if (
17705-
"19.3.0-native-fb-fb2177c1-20251114" !==
17705+
"19.3.0-native-fb-ea4899e1-20251117" !==
1770617706
isomorphicReactPackageVersion$jscomp$inline_2054
1770717707
)
1770817708
throw Error(
1770917709
formatProdErrorMessage(
1771017710
527,
1771117711
isomorphicReactPackageVersion$jscomp$inline_2054,
17712-
"19.3.0-native-fb-fb2177c1-20251114"
17712+
"19.3.0-native-fb-ea4899e1-20251117"
1771317713
)
1771417714
);
1771517715
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17731,10 +17731,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1773117731
};
1773217732
var internals$jscomp$inline_2636 = {
1773317733
bundleType: 0,
17734-
version: "19.3.0-native-fb-fb2177c1-20251114",
17734+
version: "19.3.0-native-fb-ea4899e1-20251117",
1773517735
rendererPackageName: "react-dom",
1773617736
currentDispatcherRef: ReactSharedInternals,
17737-
reconcilerVersion: "19.3.0-native-fb-fb2177c1-20251114"
17737+
reconcilerVersion: "19.3.0-native-fb-ea4899e1-20251117"
1773817738
};
1773917739
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1774017740
var hook$jscomp$inline_2637 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17841,4 +17841,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1784117841
listenToAllSupportedEvents(container);
1784217842
return new ReactDOMHydrationRoot(initialChildren);
1784317843
};
17844-
exports.version = "19.3.0-native-fb-fb2177c1-20251114";
17844+
exports.version = "19.3.0-native-fb-ea4899e1-20251117";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<8636e81d2dc4df723e1c26ad375e1e6d>>
10+
* @generated SignedSource<<200179dbabbec9dc20bc01340e7af433>>
1111
*/
1212

1313
/*
@@ -19828,14 +19828,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1982819828
};
1982919829
var isomorphicReactPackageVersion$jscomp$inline_2369 = React.version;
1983019830
if (
19831-
"19.3.0-native-fb-fb2177c1-20251114" !==
19831+
"19.3.0-native-fb-ea4899e1-20251117" !==
1983219832
isomorphicReactPackageVersion$jscomp$inline_2369
1983319833
)
1983419834
throw Error(
1983519835
formatProdErrorMessage(
1983619836
527,
1983719837
isomorphicReactPackageVersion$jscomp$inline_2369,
19838-
"19.3.0-native-fb-fb2177c1-20251114"
19838+
"19.3.0-native-fb-ea4899e1-20251117"
1983919839
)
1984019840
);
1984119841
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19857,10 +19857,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1985719857
};
1985819858
var internals$jscomp$inline_2376 = {
1985919859
bundleType: 0,
19860-
version: "19.3.0-native-fb-fb2177c1-20251114",
19860+
version: "19.3.0-native-fb-ea4899e1-20251117",
1986119861
rendererPackageName: "react-dom",
1986219862
currentDispatcherRef: ReactSharedInternals,
19863-
reconcilerVersion: "19.3.0-native-fb-fb2177c1-20251114",
19863+
reconcilerVersion: "19.3.0-native-fb-ea4899e1-20251117",
1986419864
getLaneLabelMap: function () {
1986519865
for (
1986619866
var map = new Map(), lane = 1, index$336 = 0;
@@ -19983,4 +19983,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1998319983
listenToAllSupportedEvents(container);
1998419984
return new ReactDOMHydrationRoot(initialChildren);
1998519985
};
19986-
exports.version = "19.3.0-native-fb-fb2177c1-20251114";
19986+
exports.version = "19.3.0-native-fb-ea4899e1-20251117";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<36b17e772e295878e21a3235cd8069ee>>
10+
* @generated SignedSource<<b3f4b11e2f72468f011f642c1f9cbdf1>>
1111
*/
1212

1313
/*
@@ -30298,11 +30298,11 @@ __DEV__ &&
3029830298
};
3029930299
(function () {
3030030300
var isomorphicReactPackageVersion = React.version;
30301-
if ("19.3.0-native-fb-fb2177c1-20251114" !== isomorphicReactPackageVersion)
30301+
if ("19.3.0-native-fb-ea4899e1-20251117" !== isomorphicReactPackageVersion)
3030230302
throw Error(
3030330303
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
3030430304
(isomorphicReactPackageVersion +
30305-
"\n - react-dom: 19.3.0-native-fb-fb2177c1-20251114\nLearn more: https://react.dev/warnings/version-mismatch")
30305+
"\n - react-dom: 19.3.0-native-fb-ea4899e1-20251117\nLearn more: https://react.dev/warnings/version-mismatch")
3030630306
);
3030730307
})();
3030830308
("function" === typeof Map &&
@@ -30339,10 +30339,10 @@ __DEV__ &&
3033930339
!(function () {
3034030340
var internals = {
3034130341
bundleType: 1,
30342-
version: "19.3.0-native-fb-fb2177c1-20251114",
30342+
version: "19.3.0-native-fb-ea4899e1-20251117",
3034330343
rendererPackageName: "react-dom",
3034430344
currentDispatcherRef: ReactSharedInternals,
30345-
reconcilerVersion: "19.3.0-native-fb-fb2177c1-20251114"
30345+
reconcilerVersion: "19.3.0-native-fb-ea4899e1-20251117"
3034630346
};
3034730347
internals.overrideHookState = overrideHookState;
3034830348
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -30808,7 +30808,7 @@ __DEV__ &&
3080830808
exports.useFormStatus = function () {
3080930809
return resolveDispatcher().useHostTransitionStatus();
3081030810
};
30811-
exports.version = "19.3.0-native-fb-fb2177c1-20251114";
30811+
exports.version = "19.3.0-native-fb-ea4899e1-20251117";
3081230812
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
3081330813
"function" ===
3081430814
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<4b318156825e656796050a6fcb05f891>>
10+
* @generated SignedSource<<785ef905b523655ad731fc7ea598a802>>
1111
*/
1212

1313
/*
@@ -17713,14 +17713,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1771317713
};
1771417714
var isomorphicReactPackageVersion$jscomp$inline_2055 = React.version;
1771517715
if (
17716-
"19.3.0-native-fb-fb2177c1-20251114" !==
17716+
"19.3.0-native-fb-ea4899e1-20251117" !==
1771717717
isomorphicReactPackageVersion$jscomp$inline_2055
1771817718
)
1771917719
throw Error(
1772017720
formatProdErrorMessage(
1772117721
527,
1772217722
isomorphicReactPackageVersion$jscomp$inline_2055,
17723-
"19.3.0-native-fb-fb2177c1-20251114"
17723+
"19.3.0-native-fb-ea4899e1-20251117"
1772417724
)
1772517725
);
1772617726
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17742,10 +17742,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1774217742
};
1774317743
var internals$jscomp$inline_2639 = {
1774417744
bundleType: 0,
17745-
version: "19.3.0-native-fb-fb2177c1-20251114",
17745+
version: "19.3.0-native-fb-ea4899e1-20251117",
1774617746
rendererPackageName: "react-dom",
1774717747
currentDispatcherRef: ReactSharedInternals,
17748-
reconcilerVersion: "19.3.0-native-fb-fb2177c1-20251114"
17748+
reconcilerVersion: "19.3.0-native-fb-ea4899e1-20251117"
1774917749
};
1775017750
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1775117751
var hook$jscomp$inline_2640 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -18005,4 +18005,4 @@ exports.useFormState = function (action, initialState, permalink) {
1800518005
exports.useFormStatus = function () {
1800618006
return ReactSharedInternals.H.useHostTransitionStatus();
1800718007
};
18008-
exports.version = "19.3.0-native-fb-fb2177c1-20251114";
18008+
exports.version = "19.3.0-native-fb-ea4899e1-20251117";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<7bfca6f08ec63f2a1c8101624e371c51>>
10+
* @generated SignedSource<<165762f88d54fa99fe57b30fc0c1372d>>
1111
*/
1212

1313
/*
@@ -19843,14 +19843,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1984319843
};
1984419844
var isomorphicReactPackageVersion$jscomp$inline_2370 = React.version;
1984519845
if (
19846-
"19.3.0-native-fb-fb2177c1-20251114" !==
19846+
"19.3.0-native-fb-ea4899e1-20251117" !==
1984719847
isomorphicReactPackageVersion$jscomp$inline_2370
1984819848
)
1984919849
throw Error(
1985019850
formatProdErrorMessage(
1985119851
527,
1985219852
isomorphicReactPackageVersion$jscomp$inline_2370,
19853-
"19.3.0-native-fb-fb2177c1-20251114"
19853+
"19.3.0-native-fb-ea4899e1-20251117"
1985419854
)
1985519855
);
1985619856
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19872,10 +19872,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1987219872
};
1987319873
var internals$jscomp$inline_2377 = {
1987419874
bundleType: 0,
19875-
version: "19.3.0-native-fb-fb2177c1-20251114",
19875+
version: "19.3.0-native-fb-ea4899e1-20251117",
1987619876
rendererPackageName: "react-dom",
1987719877
currentDispatcherRef: ReactSharedInternals,
19878-
reconcilerVersion: "19.3.0-native-fb-fb2177c1-20251114",
19878+
reconcilerVersion: "19.3.0-native-fb-ea4899e1-20251117",
1987919879
getLaneLabelMap: function () {
1988019880
for (
1988119881
var map = new Map(), lane = 1, index$336 = 0;
@@ -20151,7 +20151,7 @@ exports.useFormState = function (action, initialState, permalink) {
2015120151
exports.useFormStatus = function () {
2015220152
return ReactSharedInternals.H.useHostTransitionStatus();
2015320153
};
20154-
exports.version = "19.3.0-native-fb-fb2177c1-20251114";
20154+
exports.version = "19.3.0-native-fb-ea4899e1-20251117";
2015520155
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
2015620156
"function" ===
2015720157
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)