-
Notifications
You must be signed in to change notification settings - Fork 24k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: This gives Frameworks more control in selecting specific tasks and integrating the return types data in their UI. For example piping `stdout` to the user or using packages like [Listr2](https://www.npmjs.com/package/listr2) to run tasks in parallel and show progress. The ordering is suggestive (but also enforced by some assertions). Frameworks are free to do what they want. The order was implicit in the previous data structure with lists of Tasks, but made it difficult to tap into each async task. I've also had to rework how we transpile the code if directly executed from the monorepo. This keeps our: - flow types valid, - allows the core-cli-utils package to be built (to generate TypeScript types and a valid npm module), and - allows direct transpiled execution as a yarn script. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D56242487
- Loading branch information
1 parent
08a6774
commit cf15e6b
Showing
15 changed files
with
222 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* 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. | ||
* | ||
* @format | ||
* @oncall react_native | ||
*/ | ||
|
||
// Should only used when called in the monorepo when we don't want to use the `yarn run build` | ||
// step to transpile to project. When used as a vanilla npm package, it should be built and | ||
// exported with `dist/index.flow.js` as main. | ||
// | ||
// The reason for this workaround is that flow-api-translator can't understand ESM and CJS style | ||
// exports in the same file. Throw in a bit of Flow in the mix and it all goes to hell. | ||
// | ||
// See packages/helloworld/cli.js for an example of how to swap this out in the monorepo. | ||
if (process.env.BUILD_EXCLUDE_BABEL_REGISTER == null) { | ||
require('../../../scripts/build/babel-register').registerForMonorepo(); | ||
} | ||
|
||
module.exports = require('./index.flow.js'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.