mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
- Made each workflow's name consistent
- Rename each workflow file with consistent naming scheme
- Promote flow-ci-ghaction to flow-ci
ghstack-source-id: 490b643dcd
Pull Request resolved: https://github.com/facebook/react/pull/30037
33 lines
834 B
JavaScript
33 lines
834 B
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
process.on('unhandledRejection', err => {
|
|
throw err;
|
|
});
|
|
|
|
const runFlow = require('../flow/runFlow');
|
|
const inlinedHostConfigs = require('../shared/inlinedHostConfigs');
|
|
|
|
async function check(shortName) {
|
|
if (shortName == null) {
|
|
throw new Error('Expected an inlinedHostConfig shortName');
|
|
}
|
|
const rendererInfo = inlinedHostConfigs.find(
|
|
config => config.shortName === shortName
|
|
);
|
|
if (rendererInfo == null) {
|
|
throw new Error(`Could not find inlinedHostConfig for ${shortName}`);
|
|
}
|
|
if (rendererInfo.isFlowTyped) {
|
|
await runFlow(rendererInfo.shortName, ['check']);
|
|
}
|
|
}
|
|
|
|
check(process.argv[2]);
|