Skip to content

Commit

Permalink
Move off abandoned utile dependency #213
Browse files Browse the repository at this point in the history
  • Loading branch information
mizevkon authored and caub committed Aug 24, 2021
1 parent 33febea commit fef3933
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions lib/prompt.js
Expand Up @@ -7,8 +7,7 @@

var events = require('events'),
readline = require('readline'),
utile = require('utile'),
async = utile.async,
async = require('async'),
read = require('read'),
validate = require('revalidator').validate,
winston = require('winston'),
Expand Down Expand Up @@ -396,13 +395,18 @@ prompt.confirm = function (/* msg, options, callback */) {

function confirm(target, next) {
var yes = target.yes || RX_Y,
options = utile.mixin({
options = {
description: typeof target === 'string' ? target : target.description||'yes/no',
pattern: target.pattern || RX_YN,
name: 'confirm',
message: target.message || 'yes/no'
}, opts || {});
};

for(var k in (opts || {})) {
if(opts.hasOwnProperty(k)) {
options[k] = opts[k];
}
}

prompt.get([options], function (err, result) {
next(err ? false : yes.test(result[options.name]));
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -18,10 +18,10 @@
"validation"
],
"dependencies": {
"async": "~0.9.0",

This comment has been minimized.

Copy link
@caub

caub Aug 24, 2021

Contributor

How did you choose that version? 1.x, 2.x were failing the unit test?

"colors": "^1.1.2",
"read": "1.0.x",
"revalidator": "0.1.x",
"utile": "0.3.x",
"winston": "2.x"
},
"devDependencies": {
Expand Down

1 comment on commit fef3933

@caub
Copy link
Contributor

@caub caub commented on fef3933 Aug 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

Please sign in to comment.