Comparing version 0.1.0 to 0.1.1
15
index.js
@@ -7,6 +7,5 @@ /** | ||
"use strict"; | ||
var _ = require("lodash"); | ||
var readline = require("readline"); | ||
var MuteStream = require("mute-stream"); | ||
var chalk = require("chalk"); | ||
var stripAnsi = require("strip-ansi"); | ||
@@ -43,4 +42,6 @@ | ||
// Fix bug with refreshLine | ||
rl._refreshLine = _.wrap(rl._refreshLine, function( func ) { | ||
func.call(rl); | ||
var _refreshLine = rl._refreshLine; | ||
rl._refreshLine = function() { | ||
_refreshLine.call(rl); | ||
var line = this._prompt + this.line; | ||
@@ -51,3 +52,3 @@ var cursorPos = this._getCursorPos(); | ||
readline.moveCursor(this.output, cursorPos.cols, 0); | ||
}); | ||
}; | ||
@@ -58,3 +59,3 @@ // Returns current cursor's position and line | ||
var strBeforeCursor = this._prompt + this.line.substring(0, this.cursor); | ||
var dispPos = this._getDisplayPos(chalk.stripColor(strBeforeCursor)); | ||
var dispPos = this._getDisplayPos(strBeforeCursor); | ||
var cols = dispPos.cols; | ||
@@ -78,3 +79,3 @@ var rows = dispPos.rows; | ||
var code; | ||
str = chalk.stripColor(str); | ||
str = stripAnsi(str); | ||
for (var i = 0, len = str.length; i < len; i++) { | ||
@@ -81,0 +82,0 @@ code = codePointAt(str, i); |
{ | ||
"name": "readline2", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Readline Façade fixing bugs and issues found in releases 0.8 and 0.10", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "mocha -R spec" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/SBoudrias/readline2.git" | ||
}, | ||
"repository": "SBoudrias/readline2", | ||
"keywords": [ | ||
@@ -17,18 +13,19 @@ "cli", | ||
"readline", | ||
"tty" | ||
"tty", | ||
"ansi" | ||
], | ||
"author": "Simon Boudrias <admin@simonboudrias.com>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/SBoudrias/readline2/issues" | ||
}, | ||
"homepage": "https://github.com/SBoudrias/readline2", | ||
"files": [ | ||
"index.js" | ||
], | ||
"dependencies": { | ||
"mute-stream": "0.0.4", | ||
"lodash": "~2.4.1", | ||
"chalk": "~0.4.0" | ||
"strip-ansi": "^2.0.1" | ||
}, | ||
"devDependencies": { | ||
"sinon": "~1.7.3" | ||
"chalk": "^0.5.1", | ||
"mocha": "^2.1.0", | ||
"sinon": "^1.7.3" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
readline2 [![Build Status](https://secure.travis-ci.org/SBoudrias/readline2.png?branch=master)](http://travis-ci.org/SBoudrias/readline2) | ||
readline2 [![Build Status](https://travis-ci.org/SBoudrias/readline2.png?branch=master)](https://travis-ci.org/SBoudrias/readline2) | ||
========= | ||
@@ -18,3 +18,3 @@ | ||
Present the same API as [node.js readline.createInterface()](http://nodejs.org/api/readline.html) | ||
Present the same API as [Node.js `readline.createInterface()`](http://nodejs.org/api/readline.html) | ||
@@ -21,0 +21,0 @@ #### Improvements |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2
6967
3
3
2
2
1
+ Addedstrip-ansi@^2.0.1
+ Addedansi-regex@1.1.1(transitive)
+ Addedstrip-ansi@2.0.1(transitive)
- Removedchalk@~0.4.0
- Removedlodash@~2.4.1
- Removedansi-styles@1.0.0(transitive)
- Removedchalk@0.4.0(transitive)
- Removedhas-color@0.1.7(transitive)
- Removedlodash@2.4.2(transitive)
- Removedstrip-ansi@0.1.1(transitive)