diff --git a/.iron-node.js b/.iron-node.js index 0444196..dc31cce 100644 --- a/.iron-node.js +++ b/.iron-node.js @@ -3,7 +3,5 @@ module.exports = { openDevToolsDetached: true, hideMainWindow: true }, - workSpaceDirectory: function () { - return __dirname; - } + workSpaceDirectory: () => __dirname }; diff --git a/lib/babel-config.js b/lib/babel-config.js index 95f40d1..c3be0dc 100644 --- a/lib/babel-config.js +++ b/lib/babel-config.js @@ -84,7 +84,7 @@ function resolveOptions(baseConfig, cache, optionsFile, verifierFile) { function build(projectDir, cacheDir, userOptions, powerAssert) { // Compute a seed based on the Node.js version and the project directory. // Dependency hashes may vary based on the Node.js version, e.g. with the - // @ava/stage-4 Babel preset. Sources and dependencies paths are absolute in + // @ava/stage-4 Babel preset. Sources and dependencies paths are absolute in // the generated module and verifier state. Those paths wouldn't necessarily // be valid if the project directory changes. const seed = md5Hex([process.versions.node, projectDir]); diff --git a/package.json b/package.json index a8e5bce..04d7624 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "clean-yaml-object": "^0.1.0", "cli-cursor": "^2.1.0", "cli-spinners": "^1.0.0", - "cli-truncate": "^0.2.0", + "cli-truncate": "^1.0.0", "co-with-promise": "^4.6.0", "code-excerpt": "^2.1.0", "common-path-prefix": "^1.0.0", @@ -162,7 +162,7 @@ "strip-bom-buf": "^1.0.0", "time-require": "^0.1.2", "unique-temp-dir": "^1.0.0", - "update-notifier": "^1.0.0" + "update-notifier": "^2.1.0" }, "devDependencies": { "babel-preset-react": "^6.5.0", @@ -170,15 +170,14 @@ "coveralls": "^2.11.4", "delay": "^1.3.0", "execa": "^0.6.0", - "flow-bin": "^0.38.0", + "flow-bin": "^0.40.0", "get-stream": "^3.0.0", "git-branch": "^0.3.0", "has-ansi": "^2.0.0", - "inquirer": "^2.0.0", + "inquirer": "^3.0.5", "is-array-sorted": "^1.0.0", "lolex": "^1.4.0", "nyc": "^10.0.0", - "pify": "^2.3.0", "proxyquire": "^1.7.4", "rimraf": "^2.5.0", "signal-exit": "^3.0.0", diff --git a/test/visual/run-visual-tests.js b/test/visual/run-visual-tests.js index 9521f7c..fa27280 100644 --- a/test/visual/run-visual-tests.js +++ b/test/visual/run-visual-tests.js @@ -4,9 +4,7 @@ const path = require('path'); const childProcess = require('child_process'); const chalk = require('chalk'); const arrify = require('arrify'); -const Promise = require('bluebird'); -const pify = require('pify'); -const inquirer = pify(require('inquirer')); +const inquirer = require('inquirer'); const cwd = path.resolve(__dirname, '../../'); @@ -26,28 +24,22 @@ function exec(args) { } function run(name, args, message, question) { - return new Promise((resolve, reject) => { - console.log(chalk.cyan(`**BEGIN ${name}**`)); - exec(args); - console.log(chalk.cyan(`**END ${name}**\n`)); - console.log(arrify(message).join('\n') + '\n'); + console.log(chalk.cyan(`**BEGIN ${name}**`)); + exec(args); + console.log(chalk.cyan(`**END ${name}**\n`)); + console.log(arrify(message).join('\n') + '\n'); - inquirer.prompt( - [{ - type: 'confirm', - name: 'confirmed', - message: question || 'Does it appear correctly', - default: false - }], - data => { - if (!data.confirmed) { - reject(new Error(arrify(args).join(' ') + ' failed')); - } - - resolve(); + return inquirer.prompt([{ + type: 'confirm', + name: 'confirmed', + message: question || 'Does it appear correctly', + default: false + }]) + .then(data => { + if (!data.confirmed) { + throw new Error(arrify(args).join(' ') + ' failed'); } - ); - }); + }); } // Thunked version of run for promise handlers