@farm.js/react 0.1.0-beta.27 → 0.1.0-beta.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vite.cjs +15 -7
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.mjs +15 -7
- package/dist/vite.mjs.map +1 -1
- package/package.json +2 -2
package/dist/vite.cjs
CHANGED
|
@@ -242,6 +242,14 @@ function collectStateDependencies(expression, statesByValue) {
|
|
|
242
242
|
return [...dependencies].sort((left, right) => left - right);
|
|
243
243
|
}
|
|
244
244
|
function referencesIdentifier(expression, name) {
|
|
245
|
+
let possible = false;
|
|
246
|
+
core.types.traverseFast(expression, (node) => {
|
|
247
|
+
if ((core.types.isIdentifier(node) || core.types.isJSXIdentifier(node)) && node.name === name) {
|
|
248
|
+
possible = true;
|
|
249
|
+
return core.types.traverseFast.stop;
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
if (!possible) return false;
|
|
245
253
|
let referenced = false;
|
|
246
254
|
core.traverse(expressionFile(cloneExpression(expression)), {
|
|
247
255
|
ReferencedIdentifier(path) {
|
|
@@ -1461,7 +1469,7 @@ function rewriteKeyedArrayReorderPipelineHints(root, hintedStateIndices, statesB
|
|
|
1461
1469
|
};
|
|
1462
1470
|
}
|
|
1463
1471
|
function rewriteQueuedKeyedArrayReorderMapHints(root, statesBySetter, mapUpdateIdentifier, queuedMapPipelineIdentifier, mapReorderIdentifier, reorderIdentifier, sortIdentifier, structuralReorderIdentifier, structuralSortIdentifier, allowed) {
|
|
1464
|
-
if (!allowed) return { root
|
|
1472
|
+
if (!allowed) return { root, mapCount: 0 };
|
|
1465
1473
|
const file = expressionFile(core.types.cloneNode(root, true));
|
|
1466
1474
|
let mapCount = 0;
|
|
1467
1475
|
const containsHelperCall = (updater, helperNames) => {
|
|
@@ -1557,7 +1565,7 @@ function countKeyedArrayMapPipeline(updater, mapUpdateIdentifier) {
|
|
|
1557
1565
|
function rewriteQueuedKeyedArrayMappedStructuralHints(root, statesBySetter, mapUpdateIdentifier, queuedMapPipelineIdentifier, mappedStructuralIdentifier, filterIdentifier, sliceIdentifier, allowed) {
|
|
1558
1566
|
if (!allowed) {
|
|
1559
1567
|
return {
|
|
1560
|
-
root
|
|
1568
|
+
root,
|
|
1561
1569
|
mapCount: 0,
|
|
1562
1570
|
structuralCount: 0,
|
|
1563
1571
|
stateIndices: /* @__PURE__ */ new Set()
|
|
@@ -1654,7 +1662,7 @@ function rewriteQueuedKeyedArrayMappedStructuralHints(root, statesBySetter, mapU
|
|
|
1654
1662
|
function rewriteQueuedKeyedArrayStructuralMapHints(root, statesBySetter, mapUpdateIdentifier, mapPipelineIdentifier, appendIdentifier, mappedStructuralAppendIdentifier, structuralAppendMapPipelineIdentifier, filterIdentifier, sliceIdentifier, mappedStructuralIdentifier, allowed) {
|
|
1655
1663
|
if (!allowed) {
|
|
1656
1664
|
return {
|
|
1657
|
-
root
|
|
1665
|
+
root,
|
|
1658
1666
|
mapCount: 0,
|
|
1659
1667
|
mappedStructuralAppendCount: 0,
|
|
1660
1668
|
structuralAppendMapCount: 0,
|
|
@@ -1778,7 +1786,7 @@ function rewriteQueuedKeyedArrayStructuralMapHints(root, statesBySetter, mapUpda
|
|
|
1778
1786
|
function rewriteQueuedKeyedArrayStructuralPrependMapHints(root, statesBySetter, mapUpdateIdentifier, mapPipelineIdentifier, prependIdentifier, mappedStructuralPrependIdentifier, structuralPrependMapPipelineIdentifier, filterIdentifier, sliceIdentifier, mappedStructuralIdentifier, allowed) {
|
|
1779
1787
|
if (!allowed) {
|
|
1780
1788
|
return {
|
|
1781
|
-
root
|
|
1789
|
+
root,
|
|
1782
1790
|
mapCount: 0,
|
|
1783
1791
|
mappedStructuralPrependCount: 0,
|
|
1784
1792
|
structuralPrependMapCount: 0,
|
|
@@ -1904,7 +1912,7 @@ function rewriteQueuedKeyedArrayRollingWindowMapHints(root, statesBySetter, mapU
|
|
|
1904
1912
|
return {
|
|
1905
1913
|
chainedMapCount: 0,
|
|
1906
1914
|
chainedRollingWindowCount: 0,
|
|
1907
|
-
root
|
|
1915
|
+
root,
|
|
1908
1916
|
leadingMapCount: 0,
|
|
1909
1917
|
mappedRollingWindowCount: 0,
|
|
1910
1918
|
rollingWindowCount: 0,
|
|
@@ -2062,7 +2070,7 @@ function rewriteQueuedKeyedArrayRollingWindowMapHints(root, statesBySetter, mapU
|
|
|
2062
2070
|
function rewriteQueuedKeyedArrayStructuralReorderHints(root, statesBySetter, filterIdentifier, sliceIdentifier, mapPipelineIdentifier, queuedMapPipelineIdentifier, mappedStructuralIdentifier, mapReorderIdentifier, reorderIdentifier, sortIdentifier, structuralReorderIdentifier, structuralSortIdentifier, allowed) {
|
|
2063
2071
|
if (!allowed) {
|
|
2064
2072
|
return {
|
|
2065
|
-
root
|
|
2073
|
+
root,
|
|
2066
2074
|
reorderCount: 0,
|
|
2067
2075
|
sortCount: 0,
|
|
2068
2076
|
replacedMapReorderCount: 0,
|
|
@@ -2192,7 +2200,7 @@ function rewriteQueuedKeyedArrayStructuralReorderHints(root, statesBySetter, fil
|
|
|
2192
2200
|
function rewriteQueuedKeyedArrayMapReorderHints(root, statesBySetter, mapUpdateIdentifier, queuedMapPipelineIdentifier, mapReorderIdentifier, reorderIdentifier, sortIdentifier, structuralReorderIdentifier, structuralSortIdentifier, allowed) {
|
|
2193
2201
|
if (!allowed) {
|
|
2194
2202
|
return {
|
|
2195
|
-
root
|
|
2203
|
+
root,
|
|
2196
2204
|
mapCount: 0,
|
|
2197
2205
|
mapReorderCount: 0,
|
|
2198
2206
|
mapSortCount: 0
|