diff --git a/src/ci.js b/src/ci.js index 96305da1..95b6da5a 100644 --- a/src/ci.js +++ b/src/ci.js @@ -2,7 +2,6 @@ const path = require('path'); const fs = require('./fs'); const yargs = require('yargs'); -const async = require('async'); const _ = require('underscore-plus'); const config = require('./apm'); @@ -70,17 +69,13 @@ but cannot be used to install new packages or dependencies.\ async run(options) { const opts = this.parseOptions(options.commandArgs); - const commands = []; - commands.push(async () => { - const npm = await config.loadNpm(); - this.npm = npm; - }); - commands.push(async () => await this.loadInstalledAtomMetadata()); - commands.push(async () => this.installModules(opts)); try { - await async.waterfall(commands); - } catch (error) { - return error; // errors as return values atm + this.npm = await config.loadNpm(); + await this.loadInstalledAtomMetadata(); + await this.installModules(opts); + } catch(err) { + return err; } + } }; diff --git a/src/dedupe.js b/src/dedupe.js index dd83be5e..c3444b89 100644 --- a/src/dedupe.js +++ b/src/dedupe.js @@ -1,7 +1,6 @@ const path = require('path'); -const async = require('async'); const _ = require('underscore-plus'); const yargs = require('yargs'); @@ -76,13 +75,11 @@ This command is experimental.\ this.createAtomDirectories(); - const commands = []; - commands.push(async () => await this.loadInstalledAtomMetadata()); - commands.push(async () => await this.dedupeModules(options)); try { - await async.waterfall(commands); - } catch (error) { - return error; //errors as return values atm + await this.loadInstalledAtomMetadata(); + await this.dedupeModules(options); + } catch(err) { + return err; } } } diff --git a/src/develop.js b/src/develop.js index 5d8b20aa..643db746 100644 --- a/src/develop.js +++ b/src/develop.js @@ -3,7 +3,6 @@ const fs = require('fs'); const path = require('path'); const _ = require('underscore-plus'); -const async = require('async'); const yargs = require('yargs'); const config = require('./apm'); @@ -64,7 +63,7 @@ cmd-shift-o to run the package out of the newly cloned repository.\ return void reject(`No repository URL found for package: ${packageName}`); } - + const message = request.getErrorMessage(body, error); return void reject(`Request for package information failed: ${message}`); }); @@ -90,7 +89,7 @@ cmd-shift-o to run the package out of the newly cloned repository.\ installDependencies(packageDirectory, options) { process.chdir(packageDirectory); const installOptions = _.clone(options); - + return new Install().run(installOptions); } @@ -117,12 +116,10 @@ cmd-shift-o to run the package out of the newly cloned repository.\ try { const repoUrl = await this.getRepositoryUrl(packageName); - const tasks = []; - tasks.push(async () => await this.cloneRepository(repoUrl, packageDirectory, options)); - tasks.push(async () => await this.installDependencies(packageDirectory, options)); - tasks.push(async () => await this.linkPackage(packageDirectory, options)); - - await async.waterfall(tasks); + + await this.cloneRepository(repoUrl, packageDirectory, options); + await this.installDependencies(packageDirectory, options); + await this.linkPackage(packageDirectory, options); } catch (error) { return error; //errors as return values atm }