Comments (4)
Its a logic error w/ our regexp, going to have to use manual things to do length matching. Current implementation will only handle one backspace at a time. Fixing.
from prompt.
Tests are now passing, but I am seeing an EventEmitter leak when running vows --spec
now:
$ vows --spec
♢ prompt
info: These node-prompt tests are interactive
info: Not following instructions will result in test failure
info: When prompted, enter: 12345 [backspace] [backspace] [enter]
prompt: password:
When using prompt the getInput() method when passed a complex property with hidden: true
✓ should respond with 123
♢ prompt
prompt: foo: prompt: test input: prompt: password: prompt: password: prompt: username: prompt: username: prompt: bad-validator: prompt: test input: prompt: riffwabbles (foobizzles): (node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace:
at ReadStream.<anonymous> (events.js:126:17)
at /Users/Charlie/Nodejitsu/node-prompt/lib/prompt.js:341:9
at EventEmitter.getInput (/Users/Charlie/Nodejitsu/node-prompt/lib/prompt.js:213:8)
at get (/Users/Charlie/Nodejitsu/node-prompt/lib/prompt.js:164:12)
at /Users/Charlie/Nodejitsu/node-prompt/node_modules/async/lib/async.js:118:13
at Object.forEachSeries (/Users/Charlie/Nodejitsu/node-prompt/node_modules/async/lib/async.js:134:9)
at EventEmitter.get (/Users/Charlie/Nodejitsu/node-prompt/lib/prompt.js:175:9)
at Object.<anonymous> (/Users/Charlie/Nodejitsu/node-prompt/test/prompt-test.js:199:22)
at run (/Users/Charlie/Nodejitsu/node-prompt/node_modules/vows/lib/vows/suite.js:130:31)
at EventEmitter.<anonymous> (/Users/Charlie/Nodejitsu/node-prompt/node_modules/vows/lib/vows/suite.js:203:40)
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace:
at ReadStream.<anonymous> (events.js:126:17)
at /Users/Charlie/Nodejitsu/node-prompt/lib/prompt.js:342:9
at EventEmitter.getInput (/Users/Charlie/Nodejitsu/node-prompt/lib/prompt.js:213:8)
at get (/Users/Charlie/Nodejitsu/node-prompt/lib/prompt.js:164:12)
at /Users/Charlie/Nodejitsu/node-prompt/node_modules/async/lib/async.js:118:13
at Object.forEachSeries (/Users/Charlie/Nodejitsu/node-prompt/node_modules/async/lib/async.js:134:9)
at EventEmitter.get (/Users/Charlie/Nodejitsu/node-prompt/lib/prompt.js:175:9)
at Object.<anonymous> (/Users/Charlie/Nodejitsu/node-prompt/test/prompt-test.js:199:22)
at run (/Users/Charlie/Nodejitsu/node-prompt/node_modules/vows/lib/vows/suite.js:130:31)
at EventEmitter.<anonymous> (/Users/Charlie/Nodejitsu/node-prompt/node_modules/vows/lib/vows/suite.js:203:40)
✗ Errored » callback not fired
in When using prompt the readLine() method
in prompt
in test/prompt-test.js
✗ Errored » callback not fired
in When using prompt the readLineHidden() method
in prompt
in test/prompt-test.js
✗ Errored » callback not fired
in When using prompt the addProperties() method
in prompt
in test/prompt-test.js
✗ Errored » callback not fired
in When using prompt the getInput() method with a simple string prompt
in prompt
in test/prompt-test.js
✗ Errored » callback not fired
in When using prompt the getInput() method with a hidden field that is not supposed to be empty and we provide valid input
in prompt
in test/prompt-test.js
✗ Errored » callback not fired
in When using prompt the getInput() method with a hidden field that is not supposed to be empty and we don't provide an input
in prompt
in test/prompt-test.js
✗ Errored » callback not fired
in When using prompt the getInput() method with a complex property prompt and a valid input
in prompt
in test/prompt-test.js
✗ Errored » callback not fired
in When using prompt the getInput() method with a complex property prompt and an invalid input
in prompt
in test/prompt-test.js
✗ Errored » callback not fired
in When using prompt the getInput() method with a complex property prompt with an invalid validator (array)
in prompt
in test/prompt-test.js
✗ Errored » callback not fired
in When using prompt the get() method with a simple string prompt that is not a property in prompt.properties
in prompt
in test/prompt-test.js
✗ Errored » callback not fired
in When using prompt the get() method with a simple string prompt that is a property name in prompt.properties with a default value
in prompt
in test/prompt-test.js
✗ Errored » 1 honored ∙ 1 errored ∙ 11 dropped
from prompt.
Wait, I think this might be my fault. Hold on
from prompt.
This was an error in the tests. The event emitter "leak" was not a leak at all. The mock tests were not correctly setting the mock stdin stream so .readLine
was called multiple times in parallel thus appearing as if it was a leak.
from prompt.
Related Issues (20)
- "Prompt" is not starting during VS Code debug session
- Long list display problem
- Please upgrade to winston 3.x to avoid licensing issue HOT 5
- Failing due to Winston dependency in Node 14 HOT 7
- .then is Not a Function HOT 1
- When will publish a new package to NPM? HOT 3
- Big space from the delimiter and the text. HOT 1
- prompt: nickname: (node:17506) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency HOT 5
- "TypeError: done is not a function" when using await HOT 5
- Number type should be validated HOT 1
- Issue when running HOT 2
- Difficult to debug error messages for an undefined response to before functions
- Option to disable property name logging in prompt HOT 7
- Capture up arrow
- Move off abandoned utile dependency HOT 1
- v0.2.6 is tagged `stable`, changelog stops at v0.2.7, but v0.3, v1.0 and v1.1 are 🤔 HOT 5
- Can't paste text into the prompt [windows]. HOT 3
- URGENT!!!! colos 1.4.x is broken! YOur dependency will get this version! HOT 3
- Doesnt work in repl HOT 3
- Should we archive this project? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prompt.