From 8ad6845d7308f0237561e727ed6076878510cfcb Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@keylocation.sg> Date: Sat, 7 Jan 2017 22:12:55 +0100 Subject: [PATCH] Refactor function names --- src/index.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 1dcc25649f..52b5943ea6 100644 --- a/src/index.js +++ b/src/index.js @@ -29,17 +29,21 @@ npm.init(config.verbose); let basePackageJson; github.init(token, repoName, config.baseBranch, config.verbose) -.then(getPackageFile) -.then(npm.getAllDependencyUpgrades) +.then(getPackageFileContents) +.then(getAllUpgrades) .then(processUpgradesSequentially) .catch(err => { console.log('updateDependency error: ' + err); }); -function getPackageFile() { +function getPackageFileContents() { return github.getFileContents(packageFile); } +function getAllUpgrades(packageFileContents) { + return npm.getAllDependencyUpgrades(packageFileContents); +} + function processUpgradesSequentially(upgrades) { if (config.verbose) { console.log('All upgrades: ' + JSON.stringify(upgrades)); -- GitLab