[Pkg-javascript-commits] [node-wrap-ansi] 03/03: New upstream release

Paolo Greppi paolog-guest at moszumanska.debian.org
Tue Sep 19 04:49:17 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-wrap-ansi.

commit 30196ac469fca6eea19c5bdf3baedfd297fc2a2f
Author: Paolo Greppi <paolo.greppi at libpf.com>
Date:   Tue Sep 19 06:16:27 2017 +0200

    New upstream release
---
 debian/changelog             |   4 +-
 debian/control               |   9 +--
 debian/patches/00-mocha.diff | 159 ++++++++++++++++++++++---------------------
 3 files changed, 90 insertions(+), 82 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 9c99090..e19bd8e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
-node-wrap-ansi (2.1.0-1) UNRELEASED; urgency=medium
+node-wrap-ansi (3.0.1-1) unstable; urgency=medium
 
   * New upstream release
 
- -- Paolo Greppi <paolo.greppi at libpf.com>  Wed, 03 May 2017 09:06:31 +0200
+ -- Paolo Greppi <paolo.greppi at libpf.com>  Tue, 19 Sep 2017 06:29:46 +0200
 
 node-wrap-ansi (2.0.0-1) unstable; urgency=low
 
diff --git a/debian/control b/debian/control
index 5492408..23ea719 100644
--- a/debian/control
+++ b/debian/control
@@ -9,9 +9,8 @@ Build-Depends:
  , nodejs
  , mocha
  , node-chalk
- , node-has-ansi,
- , node-string-width
-Standards-Version: 3.9.8
+ , node-has-ansi
+Standards-Version: 4.0.1
 Homepage: https://github.com/chalk/wrap-ansi#readme
 Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-wrap-ansi.git
 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-javascript/node-wrap-ansi.git
@@ -21,7 +20,9 @@ Architecture: all
 Depends:
  ${misc:Depends}
  , nodejs
- , node-string-width (>= 1.0.1)
+ , node-ansi-styles (>= 3.2.0)
+ , node-strip-ansi (>= 4.0.0)
+ , node-string-width (>= 2.1.1)
 Description: Wordwrap a string with ANSI escape codes
  Node.js module to wrap words of a string to the specified column
  width, taking into account the actual visual width of the contained
diff --git a/debian/patches/00-mocha.diff b/debian/patches/00-mocha.diff
index f1314bd..2223d79 100644
--- a/debian/patches/00-mocha.diff
+++ b/debian/patches/00-mocha.diff
@@ -1,83 +1,63 @@
 Description: Change from ava to mocha as test runner (ava is not yet
- available as a Debian package). Skip the xo style linter test step
- (xo is not available as a Debian package).
+ available as a Debian package).
 Forwarded: not-needed
 Author: Paolo Greppi <paolo.greppi at libpf.com>
 
-Index: node-wrap-ansi/package.json
-Index: node-wrap-ansi/package.json
-===================================================================
---- node-wrap-ansi.orig/package.json
-+++ node-wrap-ansi/package.json
-@@ -19,7 +19,7 @@
-     "node": ">=0.10.0"
-   },
-   "scripts": {
--    "test": "xo && nyc ava",
-+    "test": "mocha -u tdd",
-     "coveralls": "nyc report --reporter=text-lcov | coveralls"
-   },
-   "files": [
 Index: node-wrap-ansi/test.js
 ===================================================================
 --- node-wrap-ansi.orig/test.js
 +++ node-wrap-ansi/test.js
-@@ -1,94 +1,94 @@
+@@ -1,8 +1,8 @@
 -import test from 'ava';
 -import chalk from 'chalk';
 -import hasAnsi from 'has-ansi';
 -import stripAnsi from 'strip-ansi';
--import fn from './';
+-import m from '.';
 +var assert = require('assert');
 +var chalk = require('chalk');
 +var hasAnsi = require('has-ansi');
 +var stripAnsi = require('strip-ansi');
-+var fn = require('./');
++var m = require('.');
  
- // when "hard" is false
+ chalk.enabled = true;
  
--const fixture = 'The quick brown ' + chalk.red('fox jumped over ') + 'the lazy ' + chalk.green('dog and then ran away with the unicorn.');
--const fixture2 = '12345678\n901234567890';
--const fixture3 = '12345678\n901234567890 12345';
-+var fixture = 'The quick brown ' + chalk.red('fox jumped over ') + 'the lazy ' + chalk.green('dog and then ran away with the unicorn.');
-+var fixture2 = '12345678\n901234567890';
-+var fixture3 = '12345678\n901234567890 12345';
+@@ -14,102 +14,102 @@ const fixture3 = '12345678\n901234567890
+ const fixture4 = '12345678\n';
+ const fixture5 = '12345678\n ';
  
 -test('wraps string at 20 characters', t => {
-+test('wraps string at 20 characters', function()  {
- 	const res20 = fn(fixture, 20);
++test('wraps string at 20 characters',function()  {
+ 	const res20 = m(fixture, 20);
  
--	t.is(res20, 'The quick brown \u001b[31mfox\u001b[39m\n\u001b[31mjumped over \u001b[39mthe lazy\n\u001b[32mdog and then ran\u001b[39m\n\u001b[32maway with the\u001b[39m\n\u001b[32municorn.\u001b[39m');
+-	t.is(res20, 'The quick brown \u001B[31mfox\u001B[39m\n\u001B[31mjumped over \u001B[39mthe lazy\n\u001B[32mdog and then ran\u001B[39m\n\u001B[32maway with the\u001B[39m\n\u001B[32municorn.\u001B[39m');
 -	t.true(stripAnsi(res20).split('\n').every(x => x.length <= 20));
-+	assert(res20 === 'The quick brown \u001b[31mfox\u001b[39m\n\u001b[31mjumped over \u001b[39mthe lazy\n\u001b[32mdog and then ran\u001b[39m\n\u001b[32maway with the\u001b[39m\n\u001b[32municorn.\u001b[39m');
++	assert(res20 === 'The quick brown \u001B[31mfox\u001B[39m\n\u001B[31mjumped over \u001B[39mthe lazy\n\u001B[32mdog and then ran\u001B[39m\n\u001B[32maway with the\u001B[39m\n\u001B[32municorn.\u001B[39m');
 +	assert(stripAnsi(res20).split('\n').every(x => x.length <= 20));
  });
  
 -test('wraps string at 30 characters', t => {
-+test('wraps string at 30 characters', function()  {
- 	const res30 = fn(fixture, 30);
- 
--	t.is(res30, 'The quick brown \u001b[31mfox jumped\u001b[39m\n\u001b[31mover \u001b[39mthe lazy \u001b[32mdog and then ran\u001b[39m\n\u001b[32maway with the unicorn.\u001b[39m');
--	t.true(stripAnsi(res30).split('\n').every(function (x) {
-+	assert(res30 === 'The quick brown \u001b[31mfox jumped\u001b[39m\n\u001b[31mover \u001b[39mthe lazy \u001b[32mdog and then ran\u001b[39m\n\u001b[32maway with the unicorn.\u001b[39m');
-+	assert(stripAnsi(res30).split('\n').every(function (x) {
- 		return x.length <= 30;
- 	}));
++test('wraps string at 30 characters',function()  {
+ 	const res30 = m(fixture, 30);
+ 
+-	t.is(res30, 'The quick brown \u001B[31mfox jumped\u001B[39m\n\u001B[31mover \u001B[39mthe lazy \u001B[32mdog and then ran\u001B[39m\n\u001B[32maway with the unicorn.\u001B[39m');
+-	t.true(stripAnsi(res30).split('\n').every(x => x.length <= 30));
++	assert(res30 === 'The quick brown \u001B[31mfox jumped\u001B[39m\n\u001B[31mover \u001B[39mthe lazy \u001B[32mdog and then ran\u001B[39m\n\u001B[32maway with the unicorn.\u001B[39m');
++	assert(stripAnsi(res30).split('\n').every(x => x.length <= 30));
  });
  
 -test('does not break strings longer than "cols" characters', t => {
-+test('does not break strings longer than "cols" characters', function()  {
- 	const res5 = fn(fixture, 5, {hard: false});
++test('does not break strings longer than "cols" characters',function()  {
+ 	const res5 = m(fixture, 5, {hard: false});
  
--	t.is(res5, 'The\nquick\nbrown\n\u001b[31mfox\u001b[39m\n\u001b[31mjumped\u001b[39m\n\u001b[31mover\u001b[39m\n\u001b[31m\u001b[39mthe\nlazy\n\u001b[32mdog\u001b[39m\n\u001b[32mand\u001b[39m\n\u001b[32mthen\u001b[39m\n\u001b[32mran\u001b[39m\n\u001b[32maway\u001b[39m\n\u001b[32mwith\u001b[39m\n\u001b[32mthe\u001b[39m\n\u001b[32municorn.\u001b[39m');
+-	t.is(res5, 'The\nquick\nbrown\n\u001B[31mfox\u001B[39m\n\u001B[31mjumped\u001B[39m\n\u001B[31mover\u001B[39m\n\u001B[31m\u001B[39mthe\nlazy\n\u001B[32mdog\u001B[39m\n\u001B[32mand\u001B[39m\n\u001B[32mthen\u001B[39m\n\u001B[32mran\u001B[39m\n\u001B[32maway\u001B[39m\n\u001B[32mwith\u001B[39m\n\u001B[32mthe\u001B[39m\n\u001B[32municorn.\u001B[39m');
 -	t.true(stripAnsi(res5).split('\n').filter(x => x.length > 5).length > 0);
-+	assert(res5 === 'The\nquick\nbrown\n\u001b[31mfox\u001b[39m\n\u001b[31mjumped\u001b[39m\n\u001b[31mover\u001b[39m\n\u001b[31m\u001b[39mthe\nlazy\n\u001b[32mdog\u001b[39m\n\u001b[32mand\u001b[39m\n\u001b[32mthen\u001b[39m\n\u001b[32mran\u001b[39m\n\u001b[32maway\u001b[39m\n\u001b[32mwith\u001b[39m\n\u001b[32mthe\u001b[39m\n\u001b[32municorn.\u001b[39m');
++	assert(res5 === 'The\nquick\nbrown\n\u001B[31mfox\u001B[39m\n\u001B[31mjumped\u001B[39m\n\u001B[31mover\u001B[39m\n\u001B[31m\u001B[39mthe\nlazy\n\u001B[32mdog\u001B[39m\n\u001B[32mand\u001B[39m\n\u001B[32mthen\u001B[39m\n\u001B[32mran\u001B[39m\n\u001B[32maway\u001B[39m\n\u001B[32mwith\u001B[39m\n\u001B[32mthe\u001B[39m\n\u001B[32municorn.\u001B[39m');
 +	assert(stripAnsi(res5).split('\n').filter(x => x.length > 5).length > 0);
  });
  
 -test('handles colored string that wraps on to multiple lines', t => {
-+test('handles colored string that wraps on to multiple lines', function()  {
- 	const res = fn(chalk.green('hello world') + ' hey!', 5, {hard: false});
++test('handles colored string that wraps on to multiple lines',function()  {
+ 	const res = m(chalk.green('hello world') + ' hey!', 5, {hard: false});
  	const lines = res.split('\n');
 -	t.true(hasAnsi(lines[0]));
 -	t.true(hasAnsi(lines[1]));
@@ -88,73 +68,100 @@ Index: node-wrap-ansi/test.js
  });
  
 -test('does not prepend newline if first string is greater than "cols"', t => {
-+test('does not prepend newline if first string is greater than "cols"', function()  {
- 	const res = fn(chalk.green('hello') + '-world', 5, {hard: false});
++test('does not prepend newline if first string is greater than "cols"',function()  {
+ 	const res = m(chalk.green('hello') + '-world', 5, {hard: false});
 -	t.is(res.split('\n').length, 1);
 +	assert(res.split('\n').length === 1);
  });
  
- // when "hard" is true
+ // When "hard" is true
  
 -test('breaks strings longer than "cols" characters', t => {
-+test('breaks strings longer than "cols" characters', function()  {
- 	const res5 = fn(fixture, 5, {hard: true});
++test('breaks strings longer than "cols" characters',function()  {
+ 	const res5 = m(fixture, 5, {hard: true});
  
--	t.is(res5, 'The\nquick\nbrown\n\u001b[31mfox\u001b[39m\n\u001b[31mjumpe\u001b[39m\n\u001b[31md\u001b[39m\n\u001b[31mover\u001b[39m\n\u001b[31m\u001b[39mthe\nlazy\n\u001b[32mdog\u001b[39m\n\u001b[32mand\u001b[39m\n\u001b[32mthen\u001b[39m\n\u001b[32mran\u001b[39m\n\u001b[32maway\u001b[39m\n\u001b[32mwith\u001b[39m\n\u001b[32mthe\u001b[39m\n\u001b[32munico\u001b[39m\n\u001b[32mrn.\u001b[39m');
+-	t.is(res5, 'The\nquick\nbrown\n\u001B[31mfox\u001B[39m\n\u001B[31mjumpe\u001B[39m\n\u001B[31md\u001B[39m\n\u001B[31mover\u001B[39m\n\u001B[31m\u001B[39mthe\nlazy\n\u001B[32mdog\u001B[39m\n\u001B[32mand\u001B[39m\n\u001B[32mthen\u001B[39m\n\u001B[32mran\u001B[39m\n\u001B[32maway\u001B[39m\n\u001B[32mwith\u001B[39m\n\u001B[32mthe\u001B[39m\n\u001B[32munico\u001B[39m\n\u001B[32mrn.\u001B[39m');
 -	t.true(stripAnsi(res5).split('\n').every(x => x.length <= 5));
-+	assert(res5 === 'The\nquick\nbrown\n\u001b[31mfox\u001b[39m\n\u001b[31mjumpe\u001b[39m\n\u001b[31md\u001b[39m\n\u001b[31mover\u001b[39m\n\u001b[31m\u001b[39mthe\nlazy\n\u001b[32mdog\u001b[39m\n\u001b[32mand\u001b[39m\n\u001b[32mthen\u001b[39m\n\u001b[32mran\u001b[39m\n\u001b[32maway\u001b[39m\n\u001b[32mwith\u001b[39m\n\u001b[32mthe\u001b[39m\n\u001b[32munico\u001b[39m\n\u001b[32mrn.\u001b[39m');
++	assert(res5 === 'The\nquick\nbrown\n\u001B[31mfox\u001B[39m\n\u001B[31mjumpe\u001B[39m\n\u001B[31md\u001B[39m\n\u001B[31mover\u001B[39m\n\u001B[31m\u001B[39mthe\nlazy\n\u001B[32mdog\u001B[39m\n\u001B[32mand\u001B[39m\n\u001B[32mthen\u001B[39m\n\u001B[32mran\u001B[39m\n\u001B[32maway\u001B[39m\n\u001B[32mwith\u001B[39m\n\u001B[32mthe\u001B[39m\n\u001B[32munico\u001B[39m\n\u001B[32mrn.\u001B[39m');
 +	assert(stripAnsi(res5).split('\n').every(x => x.length <= 5));
  });
  
 -test('removes last row if it contained only ansi escape codes', t => {
-+test('removes last row if it contained only ansi escape codes', function()  {
- 	const res = fn(chalk.green('helloworld'), 2, {hard: true});
++test('removes last row if it contained only ansi escape codes',function()  {
+ 	const res = m(chalk.green('helloworld'), 2, {hard: true});
 -	t.true(stripAnsi(res).split('\n').every(x => x.length === 2));
 +	assert(stripAnsi(res).split('\n').every(x => x.length === 2));
  });
  
 -test('does not prepend newline if first word is split', t => {
-+test('does not prepend newline if first word is split', function()  {
- 	const res = fn(chalk.green('hello') + 'world', 5, {hard: true});
++test('does not prepend newline if first word is split',function()  {
+ 	const res = m(chalk.green('hello') + 'world', 5, {hard: true});
 -	t.is(res.split('\n').length, 2);
-+	assert(res.split('\n').length === 2);
++	assert(res.split('\n').length == 2);
  });
  
 -test('takes into account line returns inside input', t => {
-+test('takes into account line returns inside input', function()  {
- 	const res20 = fn(fixture2, 10, {hard: true});
++test('takes into account line returns inside input',function()  {
+ 	const res20 = m(fixture2, 10, {hard: true});
 -	t.is(res20, '12345678\n9012345678\n90');
 +	assert(res20 === '12345678\n9012345678\n90');
  });
  
 -test('word wrapping', t => {
-+test('word wrapping', function()  {
- 	const res = fn(fixture3, 15);
++test('word wrapping',function()  {
+ 	const res = m(fixture3, 15);
 -	t.is(res, '12345678\n901234567890\n12345');
 +	assert(res === '12345678\n901234567890\n12345');
  });
  
 -test('no word-wrapping', t => {
-+test('no word-wrapping', function()  {
- 	const res = fn(fixture3, 15, {wordWrap: false});
++test('no word-wrapping',function()  {
+ 	const res = m(fixture3, 15, {wordWrap: false});
 -	t.is(res, '12345678\n901234567890 12\n345');
 +	assert(res === '12345678\n901234567890 12\n345');
  
- 	const res2 = fn(fixture, 5, {wordWrap: false});
--	t.is(res2, 'The q\nuick\nbrown\nfox j\numped\nover\nthe l\nazy d\nog an\nd the\nn ran\naway\nwith\nthe u\nnicor\nn.');
-+	assert(res2 === 'The q\nuick\nbrown\nfox j\numped\nover\nthe l\nazy d\nog an\nd the\nn ran\naway\nwith\nthe u\nnicor\nn.');
+ 	const res2 = m(fixture3, 5, {wordWrap: false});
+-	t.is(res2, '12345\n678\n90123\n45678\n90 12\n345');
++	assert(res2 === '12345\n678\n90123\n45678\n90 12\n345');
+ 
+ 	const res3 = m(fixture5, 5, {wordWrap: false});
+-	t.is(res3, '12345\n678\n');
++	assert(res3 === '12345\n678\n');
+ 
+ 	const res4 = m(fixture, 5, {wordWrap: false});
+-	t.is(res4, 'The q\nuick\nbrown\n\u001B[31mfox j\u001B[39m\n\u001B[31mumped\u001B[39m\n\u001B[31mover\u001B[39m\n\u001B[31m\u001B[39mthe l\nazy \u001B[32md\u001B[39m\n\u001B[32mog an\u001B[39m\n\u001B[32md the\u001B[39m\n\u001B[32mn ran\u001B[39m\n\u001B[32maway\u001B[39m\n\u001B[32mwith\u001B[39m\n\u001B[32mthe u\u001B[39m\n\u001B[32mnicor\u001B[39m\n\u001B[32mn.\u001B[39m');
++	assert(res4 === 'The q\nuick\nbrown\n\u001B[31mfox j\u001B[39m\n\u001B[31mumped\u001B[39m\n\u001B[31mover\u001B[39m\n\u001B[31m\u001B[39mthe l\nazy \u001B[32md\u001B[39m\n\u001B[32mog an\u001B[39m\n\u001B[32md the\u001B[39m\n\u001B[32mn ran\u001B[39m\n\u001B[32maway\u001B[39m\n\u001B[32mwith\u001B[39m\n\u001B[32mthe u\u001B[39m\n\u001B[32mnicor\u001B[39m\n\u001B[32mn.\u001B[39m');
+ });
+ 
+-test('no word-wrapping and no trimming', t => {
++test('no word-wrapping and no trimming',function()  {
+ 	const res = m(fixture3, 13, {wordWrap: false, trim: false});
+-	t.is(res, '12345678\n901234567890 \n12345');
++	assert(res === '12345678\n901234567890 \n12345');
+ 
+ 	const res2 = m(fixture4, 5, {wordWrap: false, trim: false});
+-	t.is(res2, '12345\n678\n');
++	assert(res2 === '12345\n678\n');
+ 
+ 	const res3 = m(fixture5, 5, {wordWrap: false, trim: false});
+-	t.is(res3, '12345\n678\n ');
++	assert(res3 === '12345\n678\n ');
+ 
+ 	const res4 = m(fixture, 5, {wordWrap: false, trim: false});
+-	t.is(res4, 'The q\nuick \nbrown\n \u001B[31mfox \u001B[39m\njumpe\nd ove\nr \u001B[39mthe\n lazy\n \u001B[32mdog \u001B[39m\nand t\nhen r\nan aw\nay wi\nth th\ne uni\ncorn.\u001B[39m');
++	assert(res4 === 'The q\nuick \nbrown\n \u001B[31mfox \u001B[39m\njumpe\nd ove\nr \u001B[39mthe\n lazy\n \u001B[32mdog \u001B[39m\nand t\nhen r\nan aw\nay wi\nth th\ne uni\ncorn.\u001B[39m');
  });
  
- // https://github.com/chalk/wrap-ansi/issues/10
--test.failing('supports fullwidth characters', t => {
--	t.is(fn('안녕하세', 4, {hard: true}), '안녕\n하세');
-+test.skip('supports fullwidth characters', function()  {
-+	assert(fn('안녕하세', 4, {hard: true}) === '안녕\n하세');
+-test('supports fullwidth characters', t => {
+-	t.is(m('안녕하세', 4, {hard: true}), '안녕\n하세');
++test('supports fullwidth characters',function()  {
++	assert(m('안녕하세', 4, {hard: true}) === '안녕\n하세');
  });
  
- // https://github.com/chalk/wrap-ansi/issues/11
--test.failing('supports unicode surrogate pairs', t => {
--	t.is(fn('a\ud83c\ude00bc', 2, {hard: true}), 'a\n\ud83c\ude00\nbc');
-+test.skip('supports unicode surrogate pairs', function()  {
-+	assert(fn('a\ud83c\ude00bc', 2, {hard: true}) === 'a\n\ud83c\ude00\nbc');
+-test('supports unicode surrogate pairs', t => {
+-	t.is(m('a\uD83C\uDE00bc', 2, {hard: true}), 'a\n\uD83C\uDE00\nbc');
+-	t.is(m('a\uD83C\uDE00bc\uD83C\uDE00d\uD83C\uDE00', 2, {hard: true}), 'a\n\uD83C\uDE00\nbc\n\uD83C\uDE00\nd\n\uD83C\uDE00');
++test('supports unicode surrogate pairs',function()  {
++	assert(m('a\uD83C\uDE00bc', 2, {hard: true}) === 'a\n\uD83C\uDE00\nbc');
++	assert(m('a\uD83C\uDE00bc\uD83C\uDE00d\uD83C\uDE00', 2, {hard: true}) === 'a\n\uD83C\uDE00\nbc\n\uD83C\uDE00\nd\n\uD83C\uDE00');
  });

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



More information about the Pkg-javascript-commits mailing list