Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
fix: 🐛 fixes scope's empty string answer issue
Browse files Browse the repository at this point in the history
When you choose an empty string as an answer the answer continues to
live and still listens to user's input while the next question is
started. This causes questions interference and possible answers
overriding. So I cloned the autocomplete-prompt package, fixed this
issue and published to NPM just to fix this particular issue.
  • Loading branch information
Alexander Bolotskov committed Dec 24, 2019
1 parent 7631798 commit 53dd466
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 42 deletions.
1 change: 0 additions & 1 deletion lib/questions/scope.js
Expand Up @@ -27,7 +27,6 @@ exports.createQuestion = (state) => {

const question = {
choices: scopes,
default: 0,
message: 'Select the scope this component affects:',
name: 'scope',
source: (_answers, input) => findScope(input, scopes),
Expand Down
8 changes: 4 additions & 4 deletions package.json
Expand Up @@ -27,7 +27,6 @@
"eslint": "eslint lib/*.js"
},
"devDependencies": {
"semantic-release": "15.13.31",
"@semantic-release/changelog": "3.0.6",
"@semantic-release/git": "7.0.18",
"@semantic-release/github": "5.5.5",
Expand All @@ -40,13 +39,14 @@
"eslint-config-mailonline": "9.0.0",
"husky": "0.14.3",
"inquirer": "6.5.2",
"inquirer-list-search-prompt": "^1.0.2",
"minimist": "1.2.0",
"mocha": "6.2.2",
"pkg": "4.4.0",
"rimraf": "3.0.0",
"semantic-release": "15.13.31",
"signale": "1.4.0",
"word-wrap": "1.2.3",
"mocha": "6.2.2",
"inquirer-autocomplete-prompt": "^1.0.1"
"word-wrap": "1.2.3"
},
"config": {
"commitizen": {
Expand Down
50 changes: 13 additions & 37 deletions yarn.lock
Expand Up @@ -1755,7 +1755,7 @@ debug@^4.0.0:
dependencies:
ms "^2.1.1"

debuglog@*, debuglog@^1.0.1:
debuglog@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"

Expand Down Expand Up @@ -3373,7 +3373,7 @@ import-modules@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/import-modules/-/import-modules-1.1.0.tgz#748db79c5cc42bb9701efab424f894e72600e9dc"

imurmurhash@*, imurmurhash@^0.1.4:
imurmurhash@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"

Expand Down Expand Up @@ -3431,6 +3431,16 @@ inline-source-map@~0.6.0:
dependencies:
source-map "~0.5.3"

inquirer-list-search-prompt@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/inquirer-list-search-prompt/-/inquirer-list-search-prompt-1.0.2.tgz#aee9d698dbca47dd7e727413fbaed5f540475c19"
integrity sha512-p2pxuhxCurxZbWkYydLaI+9f2qkSDQUB2MeIJ07jxNBqH/bkHcz7Kk78+Im/XnL1MdyHbh0KKMzjAHmeSLn7oA==
dependencies:
ansi-escapes "^3.0.0"
chalk "^2.0.0"
figures "^2.0.0"
run-async "^2.3.0"

inquirer@1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-1.2.3.tgz#4dec6f32f37ef7bb0b2ed3f1d1a5c3f545074918"
Expand Down Expand Up @@ -4325,39 +4335,17 @@ lodash._baseget@^3.0.0:
version "3.7.2"
resolved "https://registry.yarnpkg.com/lodash._baseget/-/lodash._baseget-3.7.2.tgz#1b6ae1d5facf3c25532350a13c1197cb8bb674f4"

lodash._baseindexof@*:
version "3.1.0"
resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c"

lodash._baseuniq@~4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8"
dependencies:
lodash._createset "~4.0.0"
lodash._root "~3.0.0"

lodash._bindcallback@*:
version "3.0.1"
resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"

lodash._cacheindexof@*:
version "3.0.2"
resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92"

lodash._createcache@*:
version "3.1.2"
resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093"
dependencies:
lodash._getnative "^3.0.0"

lodash._createset@~4.0.0:
version "4.0.3"
resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26"

lodash._getnative@*, lodash._getnative@^3.0.0:
version "3.9.1"
resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"

lodash._root@~3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692"
Expand Down Expand Up @@ -4419,10 +4407,6 @@ lodash.memoize@~3.0.3:
version "3.0.4"
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-3.0.4.tgz#2dcbd2c287cbc0a55cc42328bd0c736150d53e3f"

lodash.restparam@*:
version "3.6.1"
resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"

lodash.set@^4.3.2:
version "4.3.2"
resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23"
Expand Down Expand Up @@ -5428,7 +5412,6 @@ npm@^6.10.3:
cmd-shim "^3.0.3"
columnify "~1.5.4"
config-chain "^1.1.12"
debuglog "*"
detect-indent "~5.0.0"
detect-newline "^2.1.0"
dezalgo "~1.0.3"
Expand All @@ -5443,7 +5426,6 @@ npm@^6.10.3:
has-unicode "~2.0.1"
hosted-git-info "^2.8.2"
iferr "^1.0.2"
imurmurhash "*"
infer-owner "^1.0.4"
inflight "~1.0.6"
inherits "^2.0.4"
Expand All @@ -5462,14 +5444,8 @@ npm@^6.10.3:
libnpx "^10.2.0"
lock-verify "^2.1.0"
lockfile "^1.0.4"
lodash._baseindexof "*"
lodash._baseuniq "~4.6.0"
lodash._bindcallback "*"
lodash._cacheindexof "*"
lodash._createcache "*"
lodash._getnative "*"
lodash.clonedeep "~4.5.0"
lodash.restparam "*"
lodash.union "~4.6.0"
lodash.uniq "~4.5.0"
lodash.without "~4.4.0"
Expand Down Expand Up @@ -6787,7 +6763,7 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
hash-base "^3.0.0"
inherits "^2.0.1"

run-async@^2.2.0:
run-async@^2.2.0, run-async@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
dependencies:
Expand Down

0 comments on commit 53dd466

Please sign in to comment.