mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
The existing flow-ci script makes some assumptions about running inside of circleci for parallelization. This PR forks the script with very smal ll tweaks to allow for a short name to be passed in as an argument. These short names are discovered in a new GH job and then each one is passed as an argument for parallelization ghstack-source-id: dc85486388f74088c22b386b77b45996ef753f1a Pull Request resolved: https://github.com/facebook/react/pull/30026
31 lines
745 B
JavaScript
31 lines
745 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.isFlowTyped) {
|
|
await runFlow(rendererInfo.shortName, ['check']);
|
|
console.log();
|
|
}
|
|
}
|
|
|
|
check(process.argv[2]);
|