From 4d65f5ddb1a6b25467315651afd0c61ce1525571 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sat, 23 Jul 2016 15:53:37 -0700 Subject: [PATCH] Travis CI: Upgrade to Node.js v6 (#386) Also adjust Commander initialization to explicitly name our command, which prevents a crash within commander within our CLI unit tests under Node.js 6. --- .travis.yml | 2 +- src/cli.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3f5ea78..c1474c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ { "sudo": false, "language": "node_js", - "node_js": ["5"], + "node_js": ["6"], "before_install": [ "travis_retry pip install -r test-infra/requirements.txt --user", "rvm install 2.2", diff --git a/src/cli.js b/src/cli.js index c74d544..545b5b1 100644 --- a/src/cli.js +++ b/src/cli.js @@ -4,13 +4,13 @@ var Deferred = require('bluebird'); var chalk = require('chalk'); -var program = require('commander'); +var commander = require('commander'); var readFile = Deferred.promisify(require('fs').readFile); var glob = Deferred.promisify(require('glob')); var bootlint = require('./bootlint'); module.exports = function () { - program + var program = (new commander.Command('bootlint')) .version(require('../package.json').version) .description('Lint the HTML of Bootstrap projects') .usage('[options] [files...]')