@samitouri / QOS-React-2 / commits / 7bdd7cc2d8

Upgrade Flow to 0.220.1 (#27680)

Upgrade Flow to latest using ``` yarn add -W flow-bin flow-remove-types hermes-parser hermes-eslint ``` This also updates `createFlowConfigs.js` to get the Flow version from `package.json` to avoid needing to bump the version there in the future.

Jan Kassens committed Nov 9, 2023 at 10:53 UTC 7bdd7cc2d8aca24ea46474ee8a5a5e300109332e
4 files changed +37 -34
package.json
+4 -4
@@ -64,14 +64,14 @@
64 "eslint-plugin-react-internal": "link:./scripts/eslint-rules",
65 "fbjs-scripts": "^3.0.1",
66 "filesize": "^6.0.1",
67 - "flow-bin": "^0.219.0",
68 - "flow-remove-types": "^2.219.0",
67 + "flow-bin": "^0.220.1",
68 + "flow-remove-types": "^2.220.1",
69 "glob": "^7.1.6",
70 "glob-stream": "^6.1.0",
71 "google-closure-compiler": "^20230206.0.0",
72 "gzip-size": "^5.1.1",
73 - "hermes-eslint": "^0.17.0",
74 - "hermes-parser": "^0.17.0",
73 + "hermes-eslint": "^0.17.1",
74 + "hermes-parser": "^0.17.1",
75 "jest": "^29.4.2",
76 "jest-cli": "^29.4.2",
77 "jest-diff": "^29.4.2",
scripts/flow/config/flowconfig
+1 -1
@@ -36,4 +36,4 @@ munge_underscores=false
36 %REACT_RENDERER_FLOW_OPTIONS%
37
38 [version]
39 -^0.219.0
39 +%FLOW_VERSION%
scripts/flow/createFlowConfigs.js
+3 -1
@@ -12,6 +12,7 @@ const fs = require('fs');
12 const path = require('path');
13 const mkdirp = require('mkdirp');
14 const inlinedHostConfigs = require('../shared/inlinedHostConfigs');
15 +const flowVersion = require('../../package.json').devDependencies['flow-bin'];
16
17 const configTemplate = fs
18 .readFileSync(__dirname + '/config/flowconfig')
@@ -112,7 +113,8 @@ function writeConfig(
113 process.env.CI ? 'server.max_workers=4\n' : '',
114 )
115 .replace('%REACT_RENDERER_FLOW_OPTIONS%', moduleMappings.trim())
115 - .replace('%REACT_RENDERER_FLOW_IGNORES%', ignoredPaths.join('\n'));
116 + .replace('%REACT_RENDERER_FLOW_IGNORES%', ignoredPaths.join('\n'))
117 + .replace('%FLOW_VERSION%', flowVersion);
118
119 const disclaimer = `
120 # ---------------------------------------------------------------#
yarn.lock
+29 -28
@@ -6918,6 +6918,7 @@ eslint-plugin-no-unsanitized@3.1.2:
6918
6919 "eslint-plugin-react-internal@link:./scripts/eslint-rules":
6920 version "0.0.0"
6921 + uid ""
6922
6923 eslint-plugin-react@^6.7.1:
6924 version "6.10.3"
@@ -7877,22 +7878,22 @@ flatted@^3.1.0:
7878 resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787"
7879 integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==
7880
7880 -flow-bin@^0.219.0:
7881 - version "0.219.0"
7882 - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.219.0.tgz#193ae6551e4eccad7435b2ec0cfa455a40f38889"
7883 - integrity sha512-nX1hLdYI+mRaO5hG4acjwMni9K3KqQzt3v0pDPHKGu1lEvxEPbL3GxruFbaq8dhKR3Ntk13ptsf2krYubZ1nCw==
7881 +flow-bin@^0.220.1:
7882 + version "0.220.1"
7883 + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.220.1.tgz#637d522e43ed5c0d4319e8fe51f4e0a708e56bb1"
7884 + integrity sha512-p25Ga+f3yWG0/Nlua6jGary2ptR4vHWt6cWh6MXGLR41NFlOwtrZtDtEjLpSWgOLUphTN4tEQjqoaruU72JObg==
7885
7885 -flow-parser@^0.219.0:
7886 - version "0.219.0"
7887 - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.219.0.tgz#c8021c080d67a16eea9ee1d1e31c40d1a22bb2fb"
7888 - integrity sha512-f1RKw+2QW4HCwCQ7qw8fTrlWmQnPIHmWDYbrMhXSSAuDbQbncY63I3Y/vwgimChGF2PT4qtXusu04R3wtCh4hw==
7886 +flow-parser@^0.220.0:
7887 + version "0.220.1"
7888 + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.220.1.tgz#8302ef224e2efb549cccb69fcfb8fb8fb2346668"
7889 + integrity sha512-RoM3ARqVYvxnwtkM36RjQFzo5Z9p22jUqtuMrN8gzA/8fU6iMLFE3cXkdSFPyfHRXLU8ILH8TCtSFADk1ACPCg==
7890
7890 -flow-remove-types@^2.219.0:
7891 - version "2.219.0"
7892 - resolved "https://registry.yarnpkg.com/flow-remove-types/-/flow-remove-types-2.219.0.tgz#f349f7785e8c718b256bb8ecb1696d68675e2e86"
7893 - integrity sha512-wbY4WG+jve9pY0GsG8r5R+Wdo0PQ/HyQi/Gr8p8QIQxNyfYrRtCWICQ1kcGw60+1ufm+yKBw8bIUTv+4LYLjtA==
7891 +flow-remove-types@^2.220.1:
7892 + version "2.220.1"
7893 + resolved "https://registry.yarnpkg.com/flow-remove-types/-/flow-remove-types-2.220.1.tgz#c5c44bc40976bbfdd48ca694ec30105b0c0e0e22"
7894 + integrity sha512-XtJKOdJY1Im35z4YwKzDCbAkt62Blu+EMneigTW0BmIZ+CdDAKvkyrAOl+3Cbnw2leyuyOFnq+h2Z/7dv2nL4Q==
7895 dependencies:
7895 - flow-parser "^0.219.0"
7896 + flow-parser "^0.220.0"
7897 pirates "^3.0.2"
7898 vlq "^0.2.1"
7899
@@ -8622,26 +8623,26 @@ has@^1.0.1, has@^1.0.3:
8623 dependencies:
8624 function-bind "^1.1.1"
8625
8625 -hermes-eslint@^0.17.0:
8626 - version "0.17.0"
8627 - resolved "https://registry.yarnpkg.com/hermes-eslint/-/hermes-eslint-0.17.0.tgz#c1bbf5e2fbf04b94539d02773421a7899b438479"
8628 - integrity sha512-SecdcgQyl3ubjl7guk6jNt5BoWtHBPXu7VqfAsZUEM0r0s897/QS5FjHFIXBMGSeqQnfun+QGBGoCQjx8NRWxg==
8626 +hermes-eslint@^0.17.1:
8627 + version "0.17.1"
8628 + resolved "https://registry.yarnpkg.com/hermes-eslint/-/hermes-eslint-0.17.1.tgz#e5e43091082dc53a060e0b002324e68943104b71"
8629 + integrity sha512-g3z4L84pHKrBMRtbfifalpbNbNear0cEygAe+geCmCj1GUrqQu+RDeBZOYERHv0HOq0aDxjTZhj3m4fD/YVUwg==
8630 dependencies:
8631 esrecurse "^4.3.0"
8631 - hermes-estree "0.17.0"
8632 - hermes-parser "0.17.0"
8632 + hermes-estree "0.17.1"
8633 + hermes-parser "0.17.1"
8634
8634 -hermes-estree@0.17.0:
8635 - version "0.17.0"
8636 - resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.17.0.tgz#4b1b0d8131826178f0af79a317ceaca3723e9012"
8637 - integrity sha512-bW9+bMZqnro+0+l6dUqTJW0VaNUvs4HRHh/J7VotTGnMmhBFRIcJz6ZxrRE7xIXmK7S5bJE9qrEooSiig4N70g==
8635 +hermes-estree@0.17.1:
8636 + version "0.17.1"
8637 + resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.17.1.tgz#902806a900c185720424ffcf958027821d23c051"
8638 + integrity sha512-EdUJms+eRE40OQxysFlPr1mPpvUbbMi7uDAKlScBw8o3tQY22BZ5yx56OYyp1bVaBm+7Cjc3NQz24sJEFXkPxg==
8639
8639 -hermes-parser@0.17.0, hermes-parser@^0.17.0:
8640 - version "0.17.0"
8641 - resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.17.0.tgz#722bb8079b9081a0de4902b770d5d45dbeb380bd"
8642 - integrity sha512-2fmppmZheY1UU071EMKAzXfuUCiDXF3fmzKLuN1XmE3+njIFs3CAeKP88+FtNBUpS6pEMJv6lPXCaJGqGsrURQ==
8640 +hermes-parser@0.17.1, hermes-parser@^0.17.1:
8641 + version "0.17.1"
8642 + resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.17.1.tgz#8b5cbaff235fed28487812ad718f9c7182d0db0f"
8643 + integrity sha512-yErtFLMEL6490fFJPurNn23OI2ciGAtaUfKUg9VPdcde9CmItCjOVQkJt1Xzawv5kuRzeIx0RE2E2Q9TbIgdzA==
8644 dependencies:
8644 - hermes-estree "0.17.0"
8645 + hermes-estree "0.17.1"
8646
8647 homedir-polyfill@^1.0.0, homedir-polyfill@^1.0.1:
8648 version "1.0.3"