[Pkg-javascript-commits] [node-ansi-escapes] 01/04: New upstream version 3.0.0

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Wed Jan 3 11:24:11 UTC 2018


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository node-ansi-escapes.

commit 47d5dcd405517ead4ce2ae6d5755b0b4f0e1f99b
Author: Pirate Praveen <praveen at debian.org>
Date:   Wed Jan 3 16:30:37 2018 +0530

    New upstream version 3.0.0
---
 .editorconfig |  2 +-
 .gitignore    |  1 +
 .npmrc        |  1 +
 .travis.yml   |  1 +
 index.js      | 12 +++++---
 license       | 20 +++----------
 package.json  | 96 +++++++++++++++++++++++++++++------------------------------
 readme.md     | 10 +++----
 8 files changed, 68 insertions(+), 75 deletions(-)

diff --git a/.editorconfig b/.editorconfig
index 98a761d..1c6314a 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -7,6 +7,6 @@ charset = utf-8
 trim_trailing_whitespace = true
 insert_final_newline = true
 
-[{package.json,*.yml}]
+[*.yml]
 indent_style = space
 indent_size = 2
diff --git a/.gitignore b/.gitignore
index 3c3629e..239ecff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 node_modules
+yarn.lock
diff --git a/.npmrc b/.npmrc
new file mode 100644
index 0000000..43c97e7
--- /dev/null
+++ b/.npmrc
@@ -0,0 +1 @@
+package-lock=false
diff --git a/.travis.yml b/.travis.yml
index 97519af..7d69d74 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,5 @@
 language: node_js
 node_js:
+  - '8'
   - '6'
   - '4'
diff --git a/index.js b/index.js
index ebd413b..4d47b10 100644
--- a/index.js
+++ b/index.js
@@ -3,12 +3,12 @@ const x = module.exports;
 const ESC = '\u001B[';
 const isTerminalApp = process.env.TERM_PROGRAM === 'Apple_Terminal';
 
-x.cursorTo = function (x, y) {
-	if (arguments.length === 0) {
-		return ESC + 'H';
+x.cursorTo = (x, y) => {
+	if (typeof x !== 'number') {
+		throw new TypeError('The `x` argument is required');
 	}
 
-	if (arguments.length === 1) {
+	if (typeof y !== 'number') {
 		return ESC + (x + 1) + 'G';
 	}
 
@@ -16,6 +16,10 @@ x.cursorTo = function (x, y) {
 };
 
 x.cursorMove = (x, y) => {
+	if (typeof x !== 'number') {
+		throw new TypeError('The `x` argument is required');
+	}
+
 	let ret = '';
 
 	if (x < 0) {
diff --git a/license b/license
index 654d0bf..e7af2f7 100644
--- a/license
+++ b/license
@@ -1,21 +1,9 @@
-The MIT License (MIT)
+MIT License
 
 Copyright (c) Sindre Sorhus <sindresorhus at gmail.com> (sindresorhus.com)
 
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/package.json b/package.json
index fa9df55..24cb2f2 100644
--- a/package.json
+++ b/package.json
@@ -1,50 +1,50 @@
 {
-  "name": "ansi-escapes",
-  "version": "2.0.0",
-  "description": "ANSI escape codes for manipulating the terminal",
-  "license": "MIT",
-  "repository": "sindresorhus/ansi-escapes",
-  "author": {
-    "name": "Sindre Sorhus",
-    "email": "sindresorhus at gmail.com",
-    "url": "sindresorhus.com"
-  },
-  "engines": {
-    "node": ">=4"
-  },
-  "scripts": {
-    "test": "xo && ava"
-  },
-  "files": [
-    "index.js"
-  ],
-  "keywords": [
-    "ansi",
-    "terminal",
-    "console",
-    "cli",
-    "string",
-    "tty",
-    "escape",
-    "escapes",
-    "formatting",
-    "shell",
-    "xterm",
-    "log",
-    "logging",
-    "command-line",
-    "text",
-    "vt100",
-    "sequence",
-    "control",
-    "code",
-    "codes",
-    "cursor",
-    "iterm",
-    "iterm2"
-  ],
-  "devDependencies": {
-    "ava": "*",
-    "xo": "*"
-  }
+	"name": "ansi-escapes",
+	"version": "3.0.0",
+	"description": "ANSI escape codes for manipulating the terminal",
+	"license": "MIT",
+	"repository": "sindresorhus/ansi-escapes",
+	"author": {
+		"name": "Sindre Sorhus",
+		"email": "sindresorhus at gmail.com",
+		"url": "sindresorhus.com"
+	},
+	"engines": {
+		"node": ">=4"
+	},
+	"scripts": {
+		"test": "xo && ava"
+	},
+	"files": [
+		"index.js"
+	],
+	"keywords": [
+		"ansi",
+		"terminal",
+		"console",
+		"cli",
+		"string",
+		"tty",
+		"escape",
+		"escapes",
+		"formatting",
+		"shell",
+		"xterm",
+		"log",
+		"logging",
+		"command-line",
+		"text",
+		"vt100",
+		"sequence",
+		"control",
+		"code",
+		"codes",
+		"cursor",
+		"iterm",
+		"iterm2"
+	],
+	"devDependencies": {
+		"ava": "*",
+		"xo": "*"
+	}
 }
diff --git a/readme.md b/readme.md
index 21188c9..45490e9 100644
--- a/readme.md
+++ b/readme.md
@@ -6,7 +6,7 @@
 ## Install
 
 ```
-$ npm install --save ansi-escapes
+$ npm install ansi-escapes
 ```
 
 
@@ -23,12 +23,10 @@ process.stdout.write(ansiEscapes.cursorUp(2) + ansiEscapes.cursorLeft);
 
 ## API
 
-### cursorTo([x, [y]])
+### cursorTo(x, [y])
 
 Set the absolute position of the cursor. `x0` `y0` is the top left of the screen.
 
-Specify either both `x` & `y`, only `x`, or nothing.
-
 ### cursorMove(x, [y])
 
 Set the position of the cursor relative to its current position.
@@ -129,7 +127,7 @@ Output a beeping sound.
 
 Display an image.
 
-*Currently only supported on iTerm >=2.9.*
+*Currently only supported on iTerm2 >=3*
 
 See [term-img](https://github.com/sindresorhus/term-img) for a higher-level module.
 
@@ -163,7 +161,7 @@ Default: `true`
 Type: `string`<br>
 Default: `process.cwd()`
 
-[Inform iTerm](https://www.iterm2.com/documentation-escape-codes.html) of the current directory to help semantic history and enable [Cmd-clicking relative paths](https://coderwall.com/p/b7e82q/quickly-open-files-in-iterm-with-cmd-click).
+[Inform iTerm2](https://www.iterm2.com/documentation-escape-codes.html) of the current directory to help semantic history and enable [Cmd-clicking relative paths](https://coderwall.com/p/b7e82q/quickly-open-files-in-iterm-with-cmd-click).
 
 
 ## Related

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-ansi-escapes.git



More information about the Pkg-javascript-commits mailing list