Skip to content

Commit

Permalink
Merge pull request #198 from caub/1.1
Browse files Browse the repository at this point in the history
Update version to 1.1.0
  • Loading branch information
gangstead committed Nov 7, 2020
2 parents 8d5495c + 88c403e commit c071b85
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
30 changes: 16 additions & 14 deletions lib/prompt.js
Expand Up @@ -86,22 +86,24 @@ prompt.start = function (options) {
prompt.delimiter = options.delimiter || prompt.delimiter;
prompt.colors = options.colors || prompt.colors;

if (process.platform !== 'win32' && !options.noHandleSIGINT) {
// windows falls apart trying to deal with SIGINT
process.on('SIGINT', function () {
stdout.write('\n');
process.exit(1);
});
} else {
// listen for the "Ctrl+C" key combination and trigger process event.
// See https://stackoverflow.com/questions/10021373/what-is-the-windows-equivalent-of-process-onsigint-in-node-js
stdin.on('keypress', function(char, key) {
if (key && key.ctrl && key.name == 'c') {
if (!options.noHandleSIGINT) {
if (process.platform !== 'win32') {
// windows falls apart trying to deal with SIGINT
process.on('SIGINT', function () {
stdout.write('\n');
process.emit("SIGINT");
process.exit(1);
}
});
});
} else {
// listen for the "Ctrl+C" key combination and trigger process event.
// See https://stackoverflow.com/questions/10021373/what-is-the-windows-equivalent-of-process-onsigint-in-node-js
stdin.on('keypress', function(char, key) {
if (key && key.ctrl && key.name == 'c') {
stdout.write('\n');
process.emit("SIGINT");
process.exit(1);
}
});
}
}

prompt.emit('start');
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "prompt",
"version": "1.0.0",
"version": "1.1.0",
"description": "A beautiful command-line prompt for node.js",
"author": "Nodejitsu Inc. <info@nodejitsu.com>",
"maintainers": [
Expand Down

4 comments on commit c071b85

@DominusKelvin
Copy link

Choose a reason for hiding this comment

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

@caub do we have a possible ETA for the NPM release please?

@caub
Copy link
Contributor

@caub caub commented on c071b85 Dec 21, 2020

Choose a reason for hiding this comment

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

@navarroaxel
Copy link

Choose a reason for hiding this comment

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

Hi @caub please create the git tag for this release.

@caub
Copy link
Contributor

@caub caub commented on c071b85 Dec 29, 2020

Choose a reason for hiding this comment

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

Please sign in to comment.