Skip to content

Commit 418ffb0

Browse files
committed
[compiler][snap] Fixes to relative path resolution; compile subcommand (facebook#35688)
More snap improvements for use with agents: * `yarn snap compile [--debug] <path>` for compiling any file, optionally with debug logs * `yarn snap minimize <path>` now accepts path as a positional param for consistency w 'compile' command * Both compile/minimize commands properly handle paths relative to the compiler/ directory. When using `yarn snap` the current working directory is compiler/packages/snap, but you're generally running it from the compiler directory so this matches expectations of callers better. DiffTrain build for [3ce1316](facebook@3ce1316)
1 parent 095b956 commit 418ffb0

23 files changed

+950
-875
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-748ee74e-20260203
1+
19.3.0-native-fb-3ce1316b-20260203

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<<a1b6a956357197f1bc71193893712e51>>
10+
* @generated SignedSource<<3487d852182486ee4790db561444fad8>>
1111
*/
1212

1313
"use strict";
@@ -410,5 +410,5 @@ __DEV__ &&
410410
exports.useFormStatus = function () {
411411
return resolveDispatcher().useHostTransitionStatus();
412412
};
413-
exports.version = "19.3.0-native-fb-748ee74e-20260203";
413+
exports.version = "19.3.0-native-fb-3ce1316b-20260203";
414414
})();

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<<d087059f0e35520728185318aa41a718>>
10+
* @generated SignedSource<<bd43c45b8b43b2eb0019e54820f20010>>
1111
*/
1212

1313
"use strict";
@@ -209,4 +209,4 @@ exports.useFormState = function (action, initialState, permalink) {
209209
exports.useFormStatus = function () {
210210
return ReactSharedInternals.H.useHostTransitionStatus();
211211
};
212-
exports.version = "19.3.0-native-fb-748ee74e-20260203";
212+
exports.version = "19.3.0-native-fb-3ce1316b-20260203";

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<<d087059f0e35520728185318aa41a718>>
10+
* @generated SignedSource<<bd43c45b8b43b2eb0019e54820f20010>>
1111
*/
1212

1313
"use strict";
@@ -209,4 +209,4 @@ exports.useFormState = function (action, initialState, permalink) {
209209
exports.useFormStatus = function () {
210210
return ReactSharedInternals.H.useHostTransitionStatus();
211211
};
212-
exports.version = "19.3.0-native-fb-748ee74e-20260203";
212+
exports.version = "19.3.0-native-fb-3ce1316b-20260203";

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

Lines changed: 179 additions & 145 deletions
Large diffs are not rendered by default.

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

Lines changed: 44 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<bcd4a5d41ac90a0147e0cfa40a4df6b9>>
10+
* @generated SignedSource<<c6188055feb2c6b7b00ca0b45415f2a1>>
1111
*/
1212

1313
/*
@@ -7763,6 +7763,12 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) {
77637763
}
77647764
return workInProgress.child;
77657765
}
7766+
function updateContextProvider(current, workInProgress, renderLanes) {
7767+
var newProps = workInProgress.pendingProps;
7768+
pushProvider(workInProgress, workInProgress.type, newProps.value);
7769+
reconcileChildren(current, workInProgress, newProps.children, renderLanes);
7770+
return workInProgress.child;
7771+
}
77667772
function resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) {
77677773
0 === (workInProgress.mode & 1) &&
77687774
null !== current &&
@@ -7992,6 +7998,15 @@ function beginWork(current, workInProgress, renderLanes) {
79927998
renderLanes
79937999
);
79948000
break a;
8001+
} else if ($$typeof === REACT_CONTEXT_TYPE) {
8002+
workInProgress.tag = 10;
8003+
workInProgress.type = elementType;
8004+
workInProgress = updateContextProvider(
8005+
null,
8006+
workInProgress,
8007+
renderLanes
8008+
);
8009+
break a;
79958010
}
79968011
}
79978012
workInProgress = getComponentNameFromType(elementType) || elementType;
@@ -8295,17 +8310,7 @@ function beginWork(current, workInProgress, renderLanes) {
82958310
workInProgress.child
82968311
);
82978312
case 10:
8298-
return (
8299-
(elementType = workInProgress.pendingProps),
8300-
pushProvider(workInProgress, workInProgress.type, elementType.value),
8301-
reconcileChildren(
8302-
current,
8303-
workInProgress,
8304-
elementType.children,
8305-
renderLanes
8306-
),
8307-
workInProgress.child
8308-
);
8313+
return updateContextProvider(current, workInProgress, renderLanes);
83098314
case 9:
83108315
return (
83118316
($$typeof = workInProgress.type._context),
@@ -13370,20 +13375,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) {
1337013375
(nativeEventTarget[internalScrollTimer] = targetInst));
1337113376
}
1337213377
for (
13373-
var i$jscomp$inline_1639 = 0;
13374-
i$jscomp$inline_1639 < simpleEventPluginEvents.length;
13375-
i$jscomp$inline_1639++
13378+
var i$jscomp$inline_1630 = 0;
13379+
i$jscomp$inline_1630 < simpleEventPluginEvents.length;
13380+
i$jscomp$inline_1630++
1337613381
) {
13377-
var eventName$jscomp$inline_1640 =
13378-
simpleEventPluginEvents[i$jscomp$inline_1639],
13379-
domEventName$jscomp$inline_1641 =
13380-
eventName$jscomp$inline_1640.toLowerCase(),
13381-
capitalizedEvent$jscomp$inline_1642 =
13382-
eventName$jscomp$inline_1640[0].toUpperCase() +
13383-
eventName$jscomp$inline_1640.slice(1);
13382+
var eventName$jscomp$inline_1631 =
13383+
simpleEventPluginEvents[i$jscomp$inline_1630],
13384+
domEventName$jscomp$inline_1632 =
13385+
eventName$jscomp$inline_1631.toLowerCase(),
13386+
capitalizedEvent$jscomp$inline_1633 =
13387+
eventName$jscomp$inline_1631[0].toUpperCase() +
13388+
eventName$jscomp$inline_1631.slice(1);
1338413389
registerSimpleEvent(
13385-
domEventName$jscomp$inline_1641,
13386-
"on" + capitalizedEvent$jscomp$inline_1642
13390+
domEventName$jscomp$inline_1632,
13391+
"on" + capitalizedEvent$jscomp$inline_1633
1338713392
);
1338813393
}
1338913394
registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
@@ -17744,16 +17749,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1774417749
0 === i && attemptExplicitHydrationTarget(target);
1774517750
}
1774617751
};
17747-
var isomorphicReactPackageVersion$jscomp$inline_2054 = React.version;
17752+
var isomorphicReactPackageVersion$jscomp$inline_2045 = React.version;
1774817753
if (
17749-
"19.3.0-native-fb-748ee74e-20260203" !==
17750-
isomorphicReactPackageVersion$jscomp$inline_2054
17754+
"19.3.0-native-fb-3ce1316b-20260203" !==
17755+
isomorphicReactPackageVersion$jscomp$inline_2045
1775117756
)
1775217757
throw Error(
1775317758
formatProdErrorMessage(
1775417759
527,
17755-
isomorphicReactPackageVersion$jscomp$inline_2054,
17756-
"19.3.0-native-fb-748ee74e-20260203"
17760+
isomorphicReactPackageVersion$jscomp$inline_2045,
17761+
"19.3.0-native-fb-3ce1316b-20260203"
1775717762
)
1775817763
);
1775917764
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17773,24 +17778,24 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1777317778
null === componentOrElement ? null : componentOrElement.stateNode;
1777417779
return componentOrElement;
1777517780
};
17776-
var internals$jscomp$inline_2634 = {
17781+
var internals$jscomp$inline_2625 = {
1777717782
bundleType: 0,
17778-
version: "19.3.0-native-fb-748ee74e-20260203",
17783+
version: "19.3.0-native-fb-3ce1316b-20260203",
1777917784
rendererPackageName: "react-dom",
1778017785
currentDispatcherRef: ReactSharedInternals,
17781-
reconcilerVersion: "19.3.0-native-fb-748ee74e-20260203"
17786+
reconcilerVersion: "19.3.0-native-fb-3ce1316b-20260203"
1778217787
};
1778317788
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
17784-
var hook$jscomp$inline_2635 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
17789+
var hook$jscomp$inline_2626 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
1778517790
if (
17786-
!hook$jscomp$inline_2635.isDisabled &&
17787-
hook$jscomp$inline_2635.supportsFiber
17791+
!hook$jscomp$inline_2626.isDisabled &&
17792+
hook$jscomp$inline_2626.supportsFiber
1778817793
)
1778917794
try {
17790-
(rendererID = hook$jscomp$inline_2635.inject(
17791-
internals$jscomp$inline_2634
17795+
(rendererID = hook$jscomp$inline_2626.inject(
17796+
internals$jscomp$inline_2625
1779217797
)),
17793-
(injectedHook = hook$jscomp$inline_2635);
17798+
(injectedHook = hook$jscomp$inline_2626);
1779417799
} catch (err) {}
1779517800
}
1779617801
exports.createRoot = function (container, options) {
@@ -17885,4 +17890,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1788517890
listenToAllSupportedEvents(container);
1788617891
return new ReactDOMHydrationRoot(initialChildren);
1788717892
};
17888-
exports.version = "19.3.0-native-fb-748ee74e-20260203";
17893+
exports.version = "19.3.0-native-fb-3ce1316b-20260203";

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

Lines changed: 44 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<e25bc718a90052cb2eb706469d203690>>
10+
* @generated SignedSource<<c3b360b111473c0542071bdfb51dd808>>
1111
*/
1212

1313
/*
@@ -8258,6 +8258,12 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) {
82588258
}
82598259
return workInProgress.child;
82608260
}
8261+
function updateContextProvider(current, workInProgress, renderLanes) {
8262+
var newProps = workInProgress.pendingProps;
8263+
pushProvider(workInProgress, workInProgress.type, newProps.value);
8264+
reconcileChildren(current, workInProgress, newProps.children, renderLanes);
8265+
return workInProgress.child;
8266+
}
82618267
function resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) {
82628268
0 === (workInProgress.mode & 1) &&
82638269
null !== current &&
@@ -8496,6 +8502,15 @@ function beginWork(current, workInProgress, renderLanes) {
84968502
renderLanes
84978503
);
84988504
break a;
8505+
} else if ($$typeof === REACT_CONTEXT_TYPE) {
8506+
workInProgress.tag = 10;
8507+
workInProgress.type = elementType;
8508+
workInProgress = updateContextProvider(
8509+
null,
8510+
workInProgress,
8511+
renderLanes
8512+
);
8513+
break a;
84998514
}
85008515
}
85018516
workInProgress = getComponentNameFromType(elementType) || elementType;
@@ -8804,17 +8819,7 @@ function beginWork(current, workInProgress, renderLanes) {
88048819
workInProgress.child
88058820
);
88068821
case 10:
8807-
return (
8808-
(elementType = workInProgress.pendingProps),
8809-
pushProvider(workInProgress, workInProgress.type, elementType.value),
8810-
reconcileChildren(
8811-
current,
8812-
workInProgress,
8813-
elementType.children,
8814-
renderLanes
8815-
),
8816-
workInProgress.child
8817-
);
8822+
return updateContextProvider(current, workInProgress, renderLanes);
88188823
case 9:
88198824
return (
88208825
($$typeof = workInProgress.type._context),
@@ -15341,20 +15346,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) {
1534115346
(nativeEventTarget[internalScrollTimer] = targetInst));
1534215347
}
1534315348
for (
15344-
var i$jscomp$inline_1985 = 0;
15345-
i$jscomp$inline_1985 < simpleEventPluginEvents.length;
15346-
i$jscomp$inline_1985++
15349+
var i$jscomp$inline_1976 = 0;
15350+
i$jscomp$inline_1976 < simpleEventPluginEvents.length;
15351+
i$jscomp$inline_1976++
1534715352
) {
15348-
var eventName$jscomp$inline_1986 =
15349-
simpleEventPluginEvents[i$jscomp$inline_1985],
15350-
domEventName$jscomp$inline_1987 =
15351-
eventName$jscomp$inline_1986.toLowerCase(),
15352-
capitalizedEvent$jscomp$inline_1988 =
15353-
eventName$jscomp$inline_1986[0].toUpperCase() +
15354-
eventName$jscomp$inline_1986.slice(1);
15353+
var eventName$jscomp$inline_1977 =
15354+
simpleEventPluginEvents[i$jscomp$inline_1976],
15355+
domEventName$jscomp$inline_1978 =
15356+
eventName$jscomp$inline_1977.toLowerCase(),
15357+
capitalizedEvent$jscomp$inline_1979 =
15358+
eventName$jscomp$inline_1977[0].toUpperCase() +
15359+
eventName$jscomp$inline_1977.slice(1);
1535515360
registerSimpleEvent(
15356-
domEventName$jscomp$inline_1987,
15357-
"on" + capitalizedEvent$jscomp$inline_1988
15361+
domEventName$jscomp$inline_1978,
15362+
"on" + capitalizedEvent$jscomp$inline_1979
1535815363
);
1535915364
}
1536015365
registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
@@ -19733,16 +19738,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1973319738
0 === i && attemptExplicitHydrationTarget(target);
1973419739
}
1973519740
};
19736-
var isomorphicReactPackageVersion$jscomp$inline_2402 = React.version;
19741+
var isomorphicReactPackageVersion$jscomp$inline_2393 = React.version;
1973719742
if (
19738-
"19.3.0-native-fb-748ee74e-20260203" !==
19739-
isomorphicReactPackageVersion$jscomp$inline_2402
19743+
"19.3.0-native-fb-3ce1316b-20260203" !==
19744+
isomorphicReactPackageVersion$jscomp$inline_2393
1974019745
)
1974119746
throw Error(
1974219747
formatProdErrorMessage(
1974319748
527,
19744-
isomorphicReactPackageVersion$jscomp$inline_2402,
19745-
"19.3.0-native-fb-748ee74e-20260203"
19749+
isomorphicReactPackageVersion$jscomp$inline_2393,
19750+
"19.3.0-native-fb-3ce1316b-20260203"
1974619751
)
1974719752
);
1974819753
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19762,12 +19767,12 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1976219767
null === componentOrElement ? null : componentOrElement.stateNode;
1976319768
return componentOrElement;
1976419769
};
19765-
var internals$jscomp$inline_2409 = {
19770+
var internals$jscomp$inline_2400 = {
1976619771
bundleType: 0,
19767-
version: "19.3.0-native-fb-748ee74e-20260203",
19772+
version: "19.3.0-native-fb-3ce1316b-20260203",
1976819773
rendererPackageName: "react-dom",
1976919774
currentDispatcherRef: ReactSharedInternals,
19770-
reconcilerVersion: "19.3.0-native-fb-748ee74e-20260203",
19775+
reconcilerVersion: "19.3.0-native-fb-3ce1316b-20260203",
1977119776
getLaneLabelMap: function () {
1977219777
for (
1977319778
var map = new Map(), lane = 1, index$336 = 0;
@@ -19785,16 +19790,16 @@ var internals$jscomp$inline_2409 = {
1978519790
}
1978619791
};
1978719792
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
19788-
var hook$jscomp$inline_2996 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
19793+
var hook$jscomp$inline_2987 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
1978919794
if (
19790-
!hook$jscomp$inline_2996.isDisabled &&
19791-
hook$jscomp$inline_2996.supportsFiber
19795+
!hook$jscomp$inline_2987.isDisabled &&
19796+
hook$jscomp$inline_2987.supportsFiber
1979219797
)
1979319798
try {
19794-
(rendererID = hook$jscomp$inline_2996.inject(
19795-
internals$jscomp$inline_2409
19799+
(rendererID = hook$jscomp$inline_2987.inject(
19800+
internals$jscomp$inline_2400
1979619801
)),
19797-
(injectedHook = hook$jscomp$inline_2996);
19802+
(injectedHook = hook$jscomp$inline_2987);
1979819803
} catch (err) {}
1979919804
}
1980019805
exports.createRoot = function (container, options) {
@@ -19890,4 +19895,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1989019895
listenToAllSupportedEvents(container);
1989119896
return new ReactDOMHydrationRoot(initialChildren);
1989219897
};
19893-
exports.version = "19.3.0-native-fb-748ee74e-20260203";
19898+
exports.version = "19.3.0-native-fb-3ce1316b-20260203";

0 commit comments

Comments
 (0)