Skip to content

Commit

Permalink
fix alt-checkbox, use semver to pick latest
Browse files Browse the repository at this point in the history
  • Loading branch information
dylang committed Sep 19, 2015
1 parent f3ca05c commit d412a27
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/process-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function processModule(moduleName, packageJson, options) {

return getNpmInfo(moduleName)
.then(function (data) {
var latest = data.version;
var latest = semver.maxSatisfying(data.versions, '*'); //data.version;
var versions = data.versions || [];
var packageJsonVersion = packageJson.dependencies[moduleName] ||
packageJson.devDependencies[moduleName] ||
Expand Down
5 changes: 3 additions & 2 deletions lib/prompts/alt-checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
var _ = require("lodash");
var util = require("util");
var chalk = require("chalk");
var cliCursor = require("cli-cursor");
var figures = require("figures");
var Base = require("inquirer/lib/prompts/base");
var observe = require("inquirer/lib/utils/events");
Expand Down Expand Up @@ -77,7 +78,7 @@ Prompt.prototype._run = function( cb ) {
events.spaceKey.takeUntil( validation.success ).forEach( this.onSpaceKey.bind(this) );

// Init the prompt
utils.hideCursor(this.rl);
cliCursor.hide();
this.render();

return this;
Expand Down Expand Up @@ -129,7 +130,7 @@ Prompt.prototype.onEnd = function( state ) {
this.render();

this.screen.done();
utils.showCursor(this.rl);
cliCursor.show();
this.done( state.value );
};

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"dependencies": {
"buffered-spawn": "^1.1.2",
"chalk": "^1.1.0",
"cli-cursor": "^1.0.2",
"commander": "^2.8.1",
"depcheck": "^0.4.7",
"figures": "^1.3.5",
Expand Down

0 comments on commit d412a27

Please sign in to comment.