Skip to content

Commit 914b3dd

Browse files
committed
Flow upgrade to 0.152
- 0.147 removes access to Object.prototype via the global object. - 0.149 removed deprecated config options ghstack-source-id: c77f9b3739796547dd2d82a549b6dc24d502af54 Pull Request resolved: facebook#25411
1 parent 64fe791 commit 914b3dd

File tree

6 files changed

+13
-9
lines changed

6 files changed

+13
-9
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"eslint-plugin-react-internal": "link:./scripts/eslint-rules",
6464
"fbjs-scripts": "1.2.0",
6565
"filesize": "^6.0.1",
66-
"flow-bin": "^0.146.0",
66+
"flow-bin": "^0.152.0",
6767
"glob": "^7.1.6",
6868
"glob-stream": "^6.1.0",
6969
"google-closure-compiler": "^20200517.0.0",

packages/react-devtools-shared/src/devtools/views/Components/KeyValue.js

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ import type {Element} from 'react-devtools-shared/src/devtools/views/Components/
3333
import type {Element as ReactElement} from 'react';
3434
import type {FrontendBridge} from 'react-devtools-shared/src/bridge';
3535

36+
const hasOwnProperty = Object.prototype.hasOwnProperty;
37+
3638
type Type = 'props' | 'state' | 'context' | 'hooks';
3739

3840
type KeyValueProps = {

packages/react-devtools-shared/src/devtools/views/utils.js

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import isArray from 'react-devtools-shared/src/isArray';
1414

1515
import type {HooksTree} from 'react-debug-tools/src/ReactDebugHooks';
1616

17+
const hasOwnProperty = Object.prototype.hasOwnProperty;
18+
1719
export function alphaSortEntries(
1820
entryA: [string, mixed],
1921
entryB: [string, mixed],

packages/react-devtools-shared/src/utils.js

+2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ import isArray from './isArray';
5656
import type {ComponentFilter, ElementType} from './types';
5757
import type {LRUCache} from 'react-devtools-shared/src/types';
5858

59+
const hasOwnProperty = Object.prototype.hasOwnProperty;
60+
5961
const cachedDisplayNames: WeakMap<Function, string> = new WeakMap();
6062

6163
// On large trees, encoding takes significant time.

scripts/flow/config/flowconfig

+1-4
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,11 @@ untyped-type-import=error
4040

4141
[options]
4242
%CI_MAX_WORKERS%
43-
esproposal.class_static_fields=enable
44-
esproposal.class_instance_fields=enable
45-
esproposal.optional_chaining=enable
4643
exact_by_default=true
4744
munge_underscores=false
4845

4946
# Substituted by createFlowConfig.js:
5047
%REACT_RENDERER_FLOW_OPTIONS%
5148

5249
[version]
53-
^0.146.0
50+
^0.152.0

yarn.lock

+5-4
Original file line numberDiff line numberDiff line change
@@ -6901,6 +6901,7 @@ [email protected]:
69016901

69026902
"eslint-plugin-react-internal@link:./scripts/eslint-rules":
69036903
version "0.0.0"
6904+
uid ""
69046905

69056906
eslint-plugin-react@^6.7.1:
69066907
version "6.10.3"
@@ -7911,10 +7912,10 @@ flatted@^2.0.0:
79117912
resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
79127913
integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==
79137914

7914-
flow-bin@^0.146.0:
7915-
version "0.146.0"
7916-
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.146.0.tgz#fafa002663a0e13bf3c08c3972dd93d68289ccc6"
7917-
integrity sha512-TP8eCwltqc7fo6ad5klgsrZ2veZIK2qM1vHf1A/cnXTStPh8hLAz1cOXmlQIFZR/7fjSMI39TS3CgF6M/HUhAw==
7915+
flow-bin@^0.152.0:
7916+
version "0.152.0"
7917+
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.152.0.tgz#6980d0cd58f59e9aefd580b11109a1d56eba46b1"
7918+
integrity sha512-b4ijbZIQovcx5l/T7VnwyBPIikj60A2qk7hKqQKVWiuftQMrUmC5ct2/0SuVvheX6ZbPdZfeyw2EHO1/n3eAmw==
79187919

79197920
79207921
version "0.13.0"

0 commit comments

Comments
 (0)