Skip to content

Commit 2bd5456

Browse files
committed
fix: remove unused variable to fix linter (facebook#35919)
DiffTrain build for [b4a8d29](facebook@b4a8d29)
1 parent e8d87d4 commit 2bd5456

35 files changed

Lines changed: 101 additions & 95 deletions

compiled/eslint-plugin-react-hooks/index.js

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45756,7 +45756,7 @@ class Visitor extends ReactiveFunctionVisitor {
4575645756
this.prunedScopes.add(scopeBlock.scope.id);
4575745757
}
4575845758
visitInstruction(instruction, state) {
45759-
var _a, _b, _c;
45759+
var _a, _b;
4576045760
this.recordTemporaries(instruction, state);
4576145761
const value = instruction.value;
4576245762
if (value.kind === 'StoreLocal' &&
@@ -45774,15 +45774,18 @@ class Visitor extends ReactiveFunctionVisitor {
4577445774
ids.add(value.place.identifier);
4577545775
}
4577645776
if (value.kind === 'StartMemoize') {
45777-
let depsFromSource = null;
45778-
if (value.deps != null) {
45779-
depsFromSource = value.deps;
45780-
}
4578145777
CompilerError.invariant(state.manualMemoState == null, {
4578245778
reason: 'Unexpected nested StartMemoize instructions',
4578345779
description: `Bad manual memoization ids: ${(_a = state.manualMemoState) === null || _a === void 0 ? void 0 : _a.manualMemoId}, ${value.manualMemoId}`,
4578445780
loc: value.loc,
4578545781
});
45782+
if (value.hasInvalidDeps === true) {
45783+
return;
45784+
}
45785+
let depsFromSource = null;
45786+
if (value.deps != null) {
45787+
depsFromSource = value.deps;
45788+
}
4578645789
state.manualMemoState = {
4578745790
loc: instruction.loc,
4578845791
decls: new Set(),
@@ -45810,10 +45813,12 @@ class Visitor extends ReactiveFunctionVisitor {
4581045813
}
4581145814
}
4581245815
if (value.kind === 'FinishMemoize') {
45813-
CompilerError.invariant(state.manualMemoState != null &&
45814-
state.manualMemoState.manualMemoId === value.manualMemoId, {
45816+
if (state.manualMemoState == null) {
45817+
return;
45818+
}
45819+
CompilerError.invariant(state.manualMemoState.manualMemoId === value.manualMemoId, {
4581545820
reason: 'Unexpected mismatch between StartMemoize and FinishMemoize',
45816-
description: `Encountered StartMemoize id=${(_b = state.manualMemoState) === null || _b === void 0 ? void 0 : _b.manualMemoId} followed by FinishMemoize id=${value.manualMemoId}`,
45821+
description: `Encountered StartMemoize id=${state.manualMemoState.manualMemoId} followed by FinishMemoize id=${value.manualMemoId}`,
4581745822
loc: value.loc,
4581845823
});
4581945824
const reassignments = state.manualMemoState.reassignments;
@@ -45822,7 +45827,7 @@ class Visitor extends ReactiveFunctionVisitor {
4582245827
for (const { identifier, loc } of eachInstructionValueOperand(value)) {
4582345828
let decls;
4582445829
if (identifier.scope == null) {
45825-
decls = (_c = reassignments.get(identifier.declarationId)) !== null && _c !== void 0 ? _c : [identifier];
45830+
decls = (_b = reassignments.get(identifier.declarationId)) !== null && _b !== void 0 ? _b : [identifier];
4582645831
}
4582745832
else {
4582845833
decls = [identifier];
@@ -49358,6 +49363,7 @@ function validateExhaustiveDependencies(fn) {
4935849363
const diagnostic = validateDependencies(inferred, (_a = startMemo.deps) !== null && _a !== void 0 ? _a : [], reactive, startMemo.depsLoc, ErrorCategory.MemoDependencies, 'all');
4935949364
if (diagnostic != null) {
4936049365
fn.env.recordError(diagnostic);
49366+
startMemo.hasInvalidDeps = true;
4936149367
}
4936249368
}
4936349369
dependencies.clear();

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
074d96b9dd57ea748f2e869959a436695bbc88bf
1+
b4a8d298450fd1fd274445fe8554e5fc18c5e12c
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
074d96b9dd57ea748f2e869959a436695bbc88bf
1+
b4a8d298450fd1fd274445fe8554e5fc18c5e12c

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1482,7 +1482,7 @@ __DEV__ &&
14821482
exports.useTransition = function () {
14831483
return resolveDispatcher().useTransition();
14841484
};
1485-
exports.version = "19.3.0-www-classic-074d96b9-20260225";
1485+
exports.version = "19.3.0-www-classic-b4a8d298-20260226";
14861486
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
14871487
"function" ===
14881488
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
@@ -1482,7 +1482,7 @@ __DEV__ &&
14821482
exports.useTransition = function () {
14831483
return resolveDispatcher().useTransition();
14841484
};
1485-
exports.version = "19.3.0-www-modern-074d96b9-20260225";
1485+
exports.version = "19.3.0-www-modern-b4a8d298-20260226";
14861486
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
14871487
"function" ===
14881488
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-074d96b9-20260225";
613+
exports.version = "19.3.0-www-classic-b4a8d298-20260226";

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-074d96b9-20260225";
613+
exports.version = "19.3.0-www-modern-b4a8d298-20260226";

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-074d96b9-20260225";
617+
exports.version = "19.3.0-www-classic-b4a8d298-20260226";
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-074d96b9-20260225";
617+
exports.version = "19.3.0-www-modern-b4a8d298-20260226";
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
@@ -20404,10 +20404,10 @@ __DEV__ &&
2040420404
(function () {
2040520405
var internals = {
2040620406
bundleType: 1,
20407-
version: "19.3.0-www-classic-074d96b9-20260225",
20407+
version: "19.3.0-www-classic-b4a8d298-20260226",
2040820408
rendererPackageName: "react-art",
2040920409
currentDispatcherRef: ReactSharedInternals,
20410-
reconcilerVersion: "19.3.0-www-classic-074d96b9-20260225"
20410+
reconcilerVersion: "19.3.0-www-classic-b4a8d298-20260226"
2041120411
};
2041220412
internals.overrideHookState = overrideHookState;
2041320413
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -20442,7 +20442,7 @@ __DEV__ &&
2044220442
exports.Shape = Shape;
2044320443
exports.Surface = Surface;
2044420444
exports.Text = Text;
20445-
exports.version = "19.3.0-www-classic-074d96b9-20260225";
20445+
exports.version = "19.3.0-www-classic-b4a8d298-20260226";
2044620446
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
2044720447
"function" ===
2044820448
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)