[Pkg-javascript-commits] [node-restore-cursor] 01/05: New upstream version 2.0.0
Paolo Greppi
paolog-guest at moszumanska.debian.org
Mon Oct 30 11:49:34 UTC 2017
This is an automated email from the git hooks/post-receive script.
paolog-guest pushed a commit to branch master
in repository node-restore-cursor.
commit c068f43ff03b2946cd9fcb50578e7b58e5d66610
Author: Paolo Greppi <paolo.greppi at libpf.com>
Date: Mon Oct 30 12:29:23 2017 +0100
New upstream version 2.0.0
---
.editorconfig | 5 +----
.gitattributes | 1 +
.jshintrc | 13 -------------
index.js | 12 ++++++------
package.json | 10 +++++-----
readme.md | 8 ++++----
6 files changed, 17 insertions(+), 32 deletions(-)
diff --git a/.editorconfig b/.editorconfig
index 86c8f59..98a761d 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -7,9 +7,6 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
-[package.json]
+[{package.json,*.yml}]
indent_style = space
indent_size = 2
-
-[*.md]
-trim_trailing_whitespace = false
diff --git a/.gitattributes b/.gitattributes
index 176a458..391f0a4 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1,2 @@
* text=auto
+*.js text eol=lf
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index 804f8af..0000000
--- a/.jshintrc
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "node": true,
- "esnext": true,
- "bitwise": true,
- "camelcase": true,
- "curly": true,
- "immed": true,
- "newcap": true,
- "noarg": true,
- "undef": true,
- "unused": "vars",
- "strict": true
-}
diff --git a/index.js b/index.js
index c3da545..2b8e009 100644
--- a/index.js
+++ b/index.js
@@ -1,9 +1,9 @@
'use strict';
-var onetime = require('onetime');
-var exitHook = require('exit-hook');
+const onetime = require('onetime');
+const signalExit = require('signal-exit');
-module.exports = onetime(function () {
- exitHook(function () {
- process.stdout.write('\u001b[?25h');
- });
+module.exports = onetime(() => {
+ signalExit(() => {
+ process.stderr.write('\u001b[?25h');
+ }, {alwaysLast: true});
});
diff --git a/package.json b/package.json
index 71af3ec..f121ed1 100644
--- a/package.json
+++ b/package.json
@@ -1,16 +1,16 @@
{
"name": "restore-cursor",
- "version": "1.0.1",
+ "version": "2.0.0",
"description": "Gracefully restore the CLI cursor on exit",
"license": "MIT",
"repository": "sindresorhus/restore-cursor",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus at gmail.com",
- "url": "http://sindresorhus.com"
+ "url": "sindresorhus.com"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=4"
},
"files": [
"index.js"
@@ -38,7 +38,7 @@
"command-line"
],
"dependencies": {
- "exit-hook": "^1.0.0",
- "onetime": "^1.0.0"
+ "onetime": "^2.0.0",
+ "signal-exit": "^3.0.2"
}
}
diff --git a/readme.md b/readme.md
index be08560..a2f5afb 100644
--- a/readme.md
+++ b/readme.md
@@ -2,12 +2,12 @@
> Gracefully restore the CLI cursor on exit
-Prevent the cursor you've hidden interactively to remain hidden if the process crashes.
+Prevent the cursor you've hidden interactively from remaining hidden if the process crashes.
## Install
-```sh
+```
$ npm install --save restore-cursor
```
@@ -15,11 +15,11 @@ $ npm install --save restore-cursor
## Usage
```js
-var restoreCursor = require('restore-cursor');
+const restoreCursor = require('restore-cursor');
restoreCursor();
```
## License
-MIT © [Sindre Sorhus](http://sindresorhus.com)
+MIT © [Sindre Sorhus](https://sindresorhus.com)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-restore-cursor.git
More information about the Pkg-javascript-commits
mailing list