mirror of
https://github.com/status-im/metro.git
synced 2025-02-04 15:24:26 +00:00
Upgrade to Flow v0.68.0
Reviewed By: gabelevi Differential Revision: D7310349 fbshipit-source-id: 70d29815dd7912704aec8a015c970be3fafeeba3
This commit is contained in:
parent
d739b3e354
commit
8dd921a5d6
@ -19,4 +19,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
|
|||||||
munge_underscores=true
|
munge_underscores=true
|
||||||
|
|
||||||
[version]
|
[version]
|
||||||
^0.67.0
|
^0.68.0
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
"eslint-plugin-prettier": "2.6.0",
|
"eslint-plugin-prettier": "2.6.0",
|
||||||
"eslint-plugin-react": "7.6.1",
|
"eslint-plugin-react": "7.6.1",
|
||||||
"eslint-plugin-relay": "0.0.21",
|
"eslint-plugin-relay": "0.0.21",
|
||||||
"flow-bin": "^0.67.1",
|
"flow-bin": "^0.68.0",
|
||||||
"glob": "^7.1.1",
|
"glob": "^7.1.1",
|
||||||
"istanbul-api": "^1.1.0",
|
"istanbul-api": "^1.1.0",
|
||||||
"istanbul-lib-coverage": "^1.0.0",
|
"istanbul-lib-coverage": "^1.0.0",
|
||||||
|
@ -113,6 +113,9 @@ class HmrServer<TClient: Client> {
|
|||||||
|
|
||||||
log({
|
log({
|
||||||
...createActionEndEntry(processingHmrChange),
|
...createActionEndEntry(processingHmrChange),
|
||||||
|
/* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an
|
||||||
|
* error found when Flow v0.68 was deployed. To see the error delete this
|
||||||
|
* comment and run Flow. */
|
||||||
outdated_modules: Array.isArray(response.body.modules)
|
outdated_modules: Array.isArray(response.body.modules)
|
||||||
? response.body.modules.length
|
? response.body.modules.length
|
||||||
: null,
|
: null,
|
||||||
|
@ -127,6 +127,9 @@ class Server {
|
|||||||
const sourceExts = options.sourceExts || defaults.sourceExts;
|
const sourceExts = options.sourceExts || defaults.sourceExts;
|
||||||
|
|
||||||
const _createModuleId =
|
const _createModuleId =
|
||||||
|
/* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an
|
||||||
|
* error found when Flow v0.68 was deployed. To see the error delete this
|
||||||
|
* comment and run Flow. */
|
||||||
options.createModuleId || defaultCreateModuleIdFactory();
|
options.createModuleId || defaultCreateModuleIdFactory();
|
||||||
|
|
||||||
this._opts = {
|
this._opts = {
|
||||||
|
@ -198,6 +198,9 @@ class TerminalReporter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_logInitializingFailed(port: number, error: Error) {
|
_logInitializingFailed(port: number, error: Error) {
|
||||||
|
/* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an
|
||||||
|
* error found when Flow v0.68 was deployed. To see the error delete this
|
||||||
|
* comment and run Flow. */
|
||||||
if (error.code === 'EADDRINUSE') {
|
if (error.code === 'EADDRINUSE') {
|
||||||
this.terminal.log(
|
this.terminal.log(
|
||||||
chalk.bgRed.bold(' ERROR '),
|
chalk.bgRed.bold(' ERROR '),
|
||||||
@ -288,6 +291,9 @@ class TerminalReporter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let message =
|
let message =
|
||||||
|
/* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an
|
||||||
|
* error found when Flow v0.68 was deployed. To see the error delete this
|
||||||
|
* comment and run Flow. */
|
||||||
error.snippet == null && error.stack != null
|
error.snippet == null && error.stack != null
|
||||||
? error.stack
|
? error.stack
|
||||||
: error.message;
|
: error.message;
|
||||||
@ -297,6 +303,9 @@ class TerminalReporter {
|
|||||||
message += ` [${error.filename}]`;
|
message += ` [${error.filename}]`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an
|
||||||
|
* error found when Flow v0.68 was deployed. To see the error delete this
|
||||||
|
* comment and run Flow. */
|
||||||
if (error.snippet != null) {
|
if (error.snippet != null) {
|
||||||
//$FlowFixMe T19379628
|
//$FlowFixMe T19379628
|
||||||
message += '\n' + error.snippet;
|
message += '\n' + error.snippet;
|
||||||
|
@ -39,6 +39,9 @@ function saveUnbundle(
|
|||||||
// we fork here depending on the platform:
|
// we fork here depending on the platform:
|
||||||
// while android is pretty good at loading individual assets, ios has a large
|
// while android is pretty good at loading individual assets, ios has a large
|
||||||
// overhead when reading hundreds pf assets from disk
|
// overhead when reading hundreds pf assets from disk
|
||||||
|
/* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an error
|
||||||
|
* found when Flow v0.68 was deployed. To see the error delete this comment
|
||||||
|
* and run Flow. */
|
||||||
return options.platform === 'android' && !options.indexedUnbundle
|
return options.platform === 'android' && !options.indexedUnbundle
|
||||||
? asAssets(bundle, options, log)
|
? asAssets(bundle, options, log)
|
||||||
: asIndexedFile(bundle, options, log);
|
: asIndexedFile(bundle, options, log);
|
||||||
|
@ -103,6 +103,9 @@ function buildBabelConfig(filename, options, plugins?: BabelPlugins = []) {
|
|||||||
|
|
||||||
config.plugins = extraPlugins.concat(config.plugins, plugins);
|
config.plugins = extraPlugins.concat(config.plugins, plugins);
|
||||||
|
|
||||||
|
/* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an error
|
||||||
|
* found when Flow v0.68 was deployed. To see the error delete this comment
|
||||||
|
* and run Flow. */
|
||||||
if (options.dev && options.hot) {
|
if (options.dev && options.hot) {
|
||||||
const hmrConfig = makeHMRConfig(options, filename);
|
const hmrConfig = makeHMRConfig(options, filename);
|
||||||
config = Object.assign({}, config, hmrConfig);
|
config = Object.assign({}, config, hmrConfig);
|
||||||
@ -120,6 +123,9 @@ type Params = {
|
|||||||
|
|
||||||
function transform({filename, options, src, plugins}: Params) {
|
function transform({filename, options, src, plugins}: Params) {
|
||||||
const OLD_BABEL_ENV = process.env.BABEL_ENV;
|
const OLD_BABEL_ENV = process.env.BABEL_ENV;
|
||||||
|
/* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an error
|
||||||
|
* found when Flow v0.68 was deployed. To see the error delete this comment
|
||||||
|
* and run Flow. */
|
||||||
process.env.BABEL_ENV = options.dev ? 'development' : 'production';
|
process.env.BABEL_ENV = options.dev ? 'development' : 'production';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -2617,9 +2617,9 @@ flat-cache@^1.2.1:
|
|||||||
graceful-fs "^4.1.2"
|
graceful-fs "^4.1.2"
|
||||||
write "^0.2.1"
|
write "^0.2.1"
|
||||||
|
|
||||||
flow-bin@^0.67.1:
|
flow-bin@^0.68.0:
|
||||||
version "0.67.1"
|
version "0.68.0"
|
||||||
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.67.1.tgz#eabb7197cce870ac9442cfd04251c7ddc30377db"
|
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.68.0.tgz#86c2d14857d306eb2e85e274f2eebf543564f623"
|
||||||
|
|
||||||
for-in@^1.0.1:
|
for-in@^1.0.1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user