Change `execDependencyGraph` export format (#216)

Summary:
To be honest, I have no idea what exactly this does or why it’s
necessary, but if we don’t do this then it is not possible to `import`
the exported member from a Webpack-bundled script. I’ve seen this
pattern before; one day I’ll actually figure out what it does. :-)

Test Plan:
Note that `yarn travis` (success) and `yarn travis --full` (failure; no
GitHub token) both have the expected behaviors.

wchargin-branch: execdependencygraph-export
This commit is contained in:
William Chargin 2018-05-07 10:30:56 -07:00 committed by GitHub
parent 72ca52f579
commit d7bfa02a54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
// @flow // @flow
const execDependencyGraph = require("../src/tools/execDependencyGraph"); const execDependencyGraph = require("../src/tools/execDependencyGraph").default;
main(); main();

View File

@ -28,7 +28,7 @@ type OverallResult = {|
|}; |};
*/ */
module.exports = async function execDepgraph( exports.default = async function execDependencyGraph(
tasks /*: $ReadOnlyArray<Task> */ tasks /*: $ReadOnlyArray<Task> */
) /*: Promise<OverallResult> */ { ) /*: Promise<OverallResult> */ {
const tasksById /*: {[TaskId]: Task} */ = {}; const tasksById /*: {[TaskId]: Task} */ = {};