Flow upgrade to 0.185
ghstack-source-id: 8104710c96
Pull Request resolved: https://github.com/facebook/react/pull/25420
This commit is contained in:
parent
f02a5f5c79
commit
aed33a49cc
|
@ -63,7 +63,7 @@
|
||||||
"eslint-plugin-react-internal": "link:./scripts/eslint-rules",
|
"eslint-plugin-react-internal": "link:./scripts/eslint-rules",
|
||||||
"fbjs-scripts": "1.2.0",
|
"fbjs-scripts": "1.2.0",
|
||||||
"filesize": "^6.0.1",
|
"filesize": "^6.0.1",
|
||||||
"flow-bin": "^0.182.0",
|
"flow-bin": "^0.185.0",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"glob-stream": "^6.1.0",
|
"glob-stream": "^6.1.0",
|
||||||
"google-closure-compiler": "^20200517.0.0",
|
"google-closure-compiler": "^20200517.0.0",
|
||||||
|
|
|
@ -321,6 +321,7 @@ function initializeModelChunk<T>(chunk: ResolvedModelChunk<T>): void {
|
||||||
initializingChunkBlockedModel !== null &&
|
initializingChunkBlockedModel !== null &&
|
||||||
initializingChunkBlockedModel.deps > 0
|
initializingChunkBlockedModel.deps > 0
|
||||||
) {
|
) {
|
||||||
|
// $FlowFixMe[incompatible-type]: found when upgrading Flow
|
||||||
initializingChunkBlockedModel.value = value;
|
initializingChunkBlockedModel.value = value;
|
||||||
// We discovered new dependencies on modules that are not yet resolved.
|
// We discovered new dependencies on modules that are not yet resolved.
|
||||||
// We have to go the BLOCKED state until they're resolved.
|
// We have to go the BLOCKED state until they're resolved.
|
||||||
|
|
|
@ -16,7 +16,9 @@ const objectWithModifiedHasOwnProperty = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const objectWithNullProto = Object.create(null);
|
const objectWithNullProto = Object.create(null);
|
||||||
|
// $FlowFixMe[prop-missing] found when upgrading Flow
|
||||||
objectWithNullProto.foo = 'abc';
|
objectWithNullProto.foo = 'abc';
|
||||||
|
// $FlowFixMe[prop-missing] found when upgrading Flow
|
||||||
objectWithNullProto.bar = 123;
|
objectWithNullProto.bar = 123;
|
||||||
|
|
||||||
export default function EdgeCaseObjects(): React.Node {
|
export default function EdgeCaseObjects(): React.Node {
|
||||||
|
|
|
@ -528,6 +528,7 @@ function createStyleResource(
|
||||||
} else {
|
} else {
|
||||||
const hint = preloadResources.get(href);
|
const hint = preloadResources.get(href);
|
||||||
if (hint) {
|
if (hint) {
|
||||||
|
// $FlowFixMe[incompatible-type]: found when upgrading Flow
|
||||||
resource.hint = hint;
|
resource.hint = hint;
|
||||||
// If a preload for this style Resource already exists there are certain props we want to adopt
|
// If a preload for this style Resource already exists there are certain props we want to adopt
|
||||||
// on the style Resource, primarily focussed on making sure the style network pathways utilize
|
// on the style Resource, primarily focussed on making sure the style network pathways utilize
|
||||||
|
|
|
@ -117,6 +117,7 @@ export function dispatchEvent(
|
||||||
const event = {eventName: topLevelType, nativeEvent};
|
const event = {eventName: topLevelType, nativeEvent};
|
||||||
// $FlowFixMe[class-object-subtyping] found when upgrading Flow
|
// $FlowFixMe[class-object-subtyping] found when upgrading Flow
|
||||||
RawEventEmitter.emit(topLevelType, event);
|
RawEventEmitter.emit(topLevelType, event);
|
||||||
|
// $FlowFixMe[class-object-subtyping] found when upgrading Flow
|
||||||
RawEventEmitter.emit('*', event);
|
RawEventEmitter.emit('*', event);
|
||||||
|
|
||||||
// Heritage plugin event system
|
// Heritage plugin event system
|
||||||
|
|
|
@ -404,18 +404,19 @@ export function addMarkerProgressCallbackToPendingTransition(
|
||||||
) {
|
) {
|
||||||
if (enableTransitionTracing) {
|
if (enableTransitionTracing) {
|
||||||
if (currentPendingTransitionCallbacks === null) {
|
if (currentPendingTransitionCallbacks === null) {
|
||||||
currentPendingTransitionCallbacks = {
|
currentPendingTransitionCallbacks = ({
|
||||||
transitionStart: null,
|
transitionStart: null,
|
||||||
transitionProgress: null,
|
transitionProgress: null,
|
||||||
transitionComplete: null,
|
transitionComplete: null,
|
||||||
markerProgress: new Map(),
|
markerProgress: new Map(),
|
||||||
markerIncomplete: null,
|
markerIncomplete: null,
|
||||||
markerComplete: null,
|
markerComplete: null,
|
||||||
};
|
}: PendingTransitionCallbacks);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentPendingTransitionCallbacks.markerProgress === null) {
|
if (currentPendingTransitionCallbacks.markerProgress === null) {
|
||||||
// $FlowFixMe[incompatible-use] found when upgrading Flow
|
// $FlowFixMe[incompatible-use]
|
||||||
|
// $FlowFixMe[incompatible-type]
|
||||||
currentPendingTransitionCallbacks.markerProgress = new Map();
|
currentPendingTransitionCallbacks.markerProgress = new Map();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -445,6 +446,7 @@ export function addMarkerIncompleteCallbackToPendingTransition(
|
||||||
|
|
||||||
if (currentPendingTransitionCallbacks.markerIncomplete === null) {
|
if (currentPendingTransitionCallbacks.markerIncomplete === null) {
|
||||||
// $FlowFixMe[incompatible-use] found when upgrading Flow
|
// $FlowFixMe[incompatible-use] found when upgrading Flow
|
||||||
|
// $FlowFixMe[incompatible-type] found when upgrading Flow
|
||||||
currentPendingTransitionCallbacks.markerIncomplete = new Map();
|
currentPendingTransitionCallbacks.markerIncomplete = new Map();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -473,6 +475,7 @@ export function addMarkerCompleteCallbackToPendingTransition(
|
||||||
|
|
||||||
if (currentPendingTransitionCallbacks.markerComplete === null) {
|
if (currentPendingTransitionCallbacks.markerComplete === null) {
|
||||||
// $FlowFixMe[incompatible-use] found when upgrading Flow
|
// $FlowFixMe[incompatible-use] found when upgrading Flow
|
||||||
|
// $FlowFixMe[incompatible-type] found when upgrading Flow
|
||||||
currentPendingTransitionCallbacks.markerComplete = new Map();
|
currentPendingTransitionCallbacks.markerComplete = new Map();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -501,6 +504,7 @@ export function addTransitionProgressCallbackToPendingTransition(
|
||||||
|
|
||||||
if (currentPendingTransitionCallbacks.transitionProgress === null) {
|
if (currentPendingTransitionCallbacks.transitionProgress === null) {
|
||||||
// $FlowFixMe[incompatible-use] found when upgrading Flow
|
// $FlowFixMe[incompatible-use] found when upgrading Flow
|
||||||
|
// $FlowFixMe[incompatible-type] found when upgrading Flow
|
||||||
currentPendingTransitionCallbacks.transitionProgress = new Map();
|
currentPendingTransitionCallbacks.transitionProgress = new Map();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -404,18 +404,19 @@ export function addMarkerProgressCallbackToPendingTransition(
|
||||||
) {
|
) {
|
||||||
if (enableTransitionTracing) {
|
if (enableTransitionTracing) {
|
||||||
if (currentPendingTransitionCallbacks === null) {
|
if (currentPendingTransitionCallbacks === null) {
|
||||||
currentPendingTransitionCallbacks = {
|
currentPendingTransitionCallbacks = ({
|
||||||
transitionStart: null,
|
transitionStart: null,
|
||||||
transitionProgress: null,
|
transitionProgress: null,
|
||||||
transitionComplete: null,
|
transitionComplete: null,
|
||||||
markerProgress: new Map(),
|
markerProgress: new Map(),
|
||||||
markerIncomplete: null,
|
markerIncomplete: null,
|
||||||
markerComplete: null,
|
markerComplete: null,
|
||||||
};
|
}: PendingTransitionCallbacks);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentPendingTransitionCallbacks.markerProgress === null) {
|
if (currentPendingTransitionCallbacks.markerProgress === null) {
|
||||||
// $FlowFixMe[incompatible-use] found when upgrading Flow
|
// $FlowFixMe[incompatible-use]
|
||||||
|
// $FlowFixMe[incompatible-type]
|
||||||
currentPendingTransitionCallbacks.markerProgress = new Map();
|
currentPendingTransitionCallbacks.markerProgress = new Map();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -445,6 +446,7 @@ export function addMarkerIncompleteCallbackToPendingTransition(
|
||||||
|
|
||||||
if (currentPendingTransitionCallbacks.markerIncomplete === null) {
|
if (currentPendingTransitionCallbacks.markerIncomplete === null) {
|
||||||
// $FlowFixMe[incompatible-use] found when upgrading Flow
|
// $FlowFixMe[incompatible-use] found when upgrading Flow
|
||||||
|
// $FlowFixMe[incompatible-type] found when upgrading Flow
|
||||||
currentPendingTransitionCallbacks.markerIncomplete = new Map();
|
currentPendingTransitionCallbacks.markerIncomplete = new Map();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -473,6 +475,7 @@ export function addMarkerCompleteCallbackToPendingTransition(
|
||||||
|
|
||||||
if (currentPendingTransitionCallbacks.markerComplete === null) {
|
if (currentPendingTransitionCallbacks.markerComplete === null) {
|
||||||
// $FlowFixMe[incompatible-use] found when upgrading Flow
|
// $FlowFixMe[incompatible-use] found when upgrading Flow
|
||||||
|
// $FlowFixMe[incompatible-type] found when upgrading Flow
|
||||||
currentPendingTransitionCallbacks.markerComplete = new Map();
|
currentPendingTransitionCallbacks.markerComplete = new Map();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -501,6 +504,7 @@ export function addTransitionProgressCallbackToPendingTransition(
|
||||||
|
|
||||||
if (currentPendingTransitionCallbacks.transitionProgress === null) {
|
if (currentPendingTransitionCallbacks.transitionProgress === null) {
|
||||||
// $FlowFixMe[incompatible-use] found when upgrading Flow
|
// $FlowFixMe[incompatible-use] found when upgrading Flow
|
||||||
|
// $FlowFixMe[incompatible-type] found when upgrading Flow
|
||||||
currentPendingTransitionCallbacks.transitionProgress = new Map();
|
currentPendingTransitionCallbacks.transitionProgress = new Map();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,7 @@ module.exports = function register() {
|
||||||
name: '*', // Represents the whole object instead of a particular import.
|
name: '*', // Represents the whole object instead of a particular import.
|
||||||
async: false,
|
async: false,
|
||||||
};
|
};
|
||||||
|
// $FlowFixMe[incompatible-call] found when upgrading Flow
|
||||||
module.exports = new Proxy(moduleReference, proxyHandlers);
|
module.exports = new Proxy(moduleReference, proxyHandlers);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -43,9 +43,10 @@ untyped-type-import=error
|
||||||
%CI_MAX_WORKERS%
|
%CI_MAX_WORKERS%
|
||||||
exact_by_default=true
|
exact_by_default=true
|
||||||
munge_underscores=false
|
munge_underscores=false
|
||||||
|
inference_mode=classic
|
||||||
|
|
||||||
# Substituted by createFlowConfig.js:
|
# Substituted by createFlowConfig.js:
|
||||||
%REACT_RENDERER_FLOW_OPTIONS%
|
%REACT_RENDERER_FLOW_OPTIONS%
|
||||||
|
|
||||||
[version]
|
[version]
|
||||||
^0.182.0
|
^0.185.0
|
||||||
|
|
|
@ -7912,10 +7912,10 @@ flatted@^2.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
|
resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
|
||||||
integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==
|
integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==
|
||||||
|
|
||||||
flow-bin@^0.182.0:
|
flow-bin@^0.185.0:
|
||||||
version "0.182.0"
|
version "0.185.2"
|
||||||
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.182.0.tgz#1dacbd72465743670412ada015d3182deda6f966"
|
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.185.2.tgz#b45a07d45cf641198e86e47848e35f64b0688c4c"
|
||||||
integrity sha512-Ux90c2sMfoV/VVjOEFT2OHFJFnyfoIbTK/5AKAMnU4Skfru1G+FyS5YLu3XxQl0R6mpA9+rrFlPfYZq/5B+J3w==
|
integrity sha512-Vphs8Z4Qo17dzlPKe/l8M85JvGn1Tf5NV6xESZLg8p9ktdIbNUYaxnq/WBQPoESiLrGdrC2v+rfezfh3tvxkvQ==
|
||||||
|
|
||||||
fluent-syntax@0.13.0:
|
fluent-syntax@0.13.0:
|
||||||
version "0.13.0"
|
version "0.13.0"
|
||||||
|
|
Loading…
Reference in New Issue