From d7bfa02a5443fee5521dd0b447dbbf8248128b62 Mon Sep 17 00:00:00 2001 From: William Chargin Date: Mon, 7 May 2018 10:30:56 -0700 Subject: [PATCH] Change `execDependencyGraph` export format (#216) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- config/travis.js | 2 +- src/tools/execDependencyGraph.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/travis.js b/config/travis.js index cede169..af0996b 100644 --- a/config/travis.js +++ b/config/travis.js @@ -1,6 +1,6 @@ // @flow -const execDependencyGraph = require("../src/tools/execDependencyGraph"); +const execDependencyGraph = require("../src/tools/execDependencyGraph").default; main(); diff --git a/src/tools/execDependencyGraph.js b/src/tools/execDependencyGraph.js index d642439..5b872bc 100644 --- a/src/tools/execDependencyGraph.js +++ b/src/tools/execDependencyGraph.js @@ -28,7 +28,7 @@ type OverallResult = {| |}; */ -module.exports = async function execDepgraph( +exports.default = async function execDependencyGraph( tasks /*: $ReadOnlyArray */ ) /*: Promise */ { const tasksById /*: {[TaskId]: Task} */ = {};