[Pkg-javascript-commits] [node-string-width] 05/09: update package

Paolo Greppi paolog-guest at moszumanska.debian.org
Mon Oct 30 09:48:28 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-string-width.

commit 27d262081bf474152b920a0402f60caf2d347bda
Author: Paolo Greppi <paolo.greppi at libpf.com>
Date:   Tue Sep 19 09:12:50 2017 +0200

    update package
---
 debian/changelog                     |  8 ++++
 debian/control                       |  6 +--
 debian/patches/00-mocha.diff         | 78 +++++++++++++-----------------------
 debian/patches/01-wcwidth.diff       | 26 +-----------
 debian/patches/02-test_zwj_zwnj.diff |  6 +--
 5 files changed, 44 insertions(+), 80 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 0c2b1bd..b5b50d1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+node-string-width (2.1.1-1) UNRELEASED; urgency=medium
+
+  * New upstream version
+  * Fix long description typo
+  * Bump standards version
+
+ -- Paolo Greppi <paolo.greppi at libpf.com>  Tue, 19 Sep 2017 08:46:12 +0200
+
 node-string-width (2.0.0-1) unstable; urgency=low
 
   * Initial release (Closes: #845240, #842191)
diff --git a/debian/control b/debian/control
index 6d090d6..477d006 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,7 @@ Build-Depends:
  mocha,
  node-strip-ansi,
  node-wcwidth.js
-Standards-Version: 3.9.8
+Standards-Version: 4.0.1
 Homepage: https://github.com/sindresorhus/string-width#readme
 Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-string-width.git
 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-javascript/node-string-width.git
@@ -23,8 +23,8 @@ Depends:
  , node-wcwidth.js (>= 1.0.0)
  , node-strip-ansi (>= 3.0.0)
 Description: Get the visual width of a string
- Some Unicode characters are use more or less than the normal width when
- output to the command-line.
+ Some Unicode characters use more or less than the normal width when output
+ to the command-line.
  .
  This nodejs module gets the visual width of a string i.e. the actual
  number of columns required to display it.
diff --git a/debian/patches/00-mocha.diff b/debian/patches/00-mocha.diff
index 8fd5a21..a1edfbb 100644
--- a/debian/patches/00-mocha.diff
+++ b/debian/patches/00-mocha.diff
@@ -1,19 +1,13 @@
-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).
-Forwarded: not-needed
-Author: Paolo Greppi <paolo.greppi at libpf.com>
-
 Index: node-string-width/test.js
 ===================================================================
 --- node-string-width.orig/test.js
 +++ node-string-width/test.js
-@@ -1,22 +1,21 @@
+@@ -1,26 +1,26 @@
 -import test from 'ava';
--import m from './';
-+var m = require('./');
+-import m from '.';
 +var assert = require('assert');
-
++var m = require('.');
+ 
 -test('main', t => {
 -	t.is(m('abcde'), 5);
 -	t.is(m('古池や'), 6);
@@ -21,53 +15,37 @@ Index: node-string-width/test.js
 -	t.is(m('ノード.js'), 9);
 -	t.is(m('你好'), 4);
 -	t.is(m('안녕하세요'), 10);
--	t.is(m('A\ud83c\ude00BC'), 5, 'surrogate');
--	t.is(m('\u001b[31m\u001b[39m'), 0);
+-	t.is(m('A\uD83C\uDE00BC'), 5, 'surrogate');
+-	t.is(m('\u001B[31m\u001B[39m'), 0);
 +test('main', function() {
-+	assert.equal(m('abcde'), 5);
-+	assert.equal(m('古池や'), 6);
-+	assert.equal(m('あいうabc'), 9);
-+	assert.equal(m('ノード.js'), 9);
-+	assert.equal(m('你好'), 4);
-+	assert.equal(m('안녕하세요'), 10);
-+	assert.equal(m('\u001b[31m\u001b[39m'), 0);
++	assert(m('abcde') == 5);
++	assert(m('古池や') == 6);
++	assert(m('あいうabc') == 9);
++	assert(m('ノード.js') == 9);
++	assert(m('你好') == 4);
++	assert(m('안녕하세요') == 10);
++	// assert(m('A\uD83C\uDE00BC') == 5);
++	assert(m('\u001B[31m\u001B[39m') == 0);
  });
-
+ 
 -test('ignores control characters', t => {
 -	t.is(m(String.fromCharCode(0)), 0);
 -	t.is(m(String.fromCharCode(31)), 0);
 -	t.is(m(String.fromCharCode(127)), 0);
 -	t.is(m(String.fromCharCode(134)), 0);
 -	t.is(m(String.fromCharCode(159)), 0);
--	t.is(m('\u001b'), 0);
+-	t.is(m('\u001B'), 0);
 +test('ignores control characters', function() {
-+	assert.equal(m(String.fromCharCode(0)), 0);
-+	assert.equal(m(String.fromCharCode(31)), 0);
-+	assert.equal(m(String.fromCharCode(127)), 0);
-+	assert.equal(m(String.fromCharCode(134)), 0);
-+	assert.equal(m(String.fromCharCode(159)), 0);
-+	assert.equal(m('\u001b'), 0);
++	assert(m(String.fromCharCode(0)) == 0);
++	assert(m(String.fromCharCode(31)) == 0);
++	assert(m(String.fromCharCode(127)) == 0);
++	assert(m(String.fromCharCode(134)) == 0);
++	assert(m(String.fromCharCode(159)) == 0);
++	assert(m('\u001B') == 0);
+ });
+ 
+-test('handles combining characters', t => {
+-	t.is(m('x\u0300'), 1);
++test('handles combining characters', function() {
++	assert(m('x\u0300') == 1);
  });
-Index: node-string-width/package.json
-===================================================================
---- node-string-width.orig/package.json
-+++ node-string-width/package.json
-@@ -13,7 +13,7 @@
-     "node": ">=4"
-   },
-   "scripts": {
--    "test": "xo && ava"
-+    "test": "mocha -u tdd"
-   },
-   "files": [
-     "index.js"
-@@ -49,8 +49,7 @@
-     "strip-ansi": "^3.0.0"
-   },
-   "devDependencies": {
--    "ava": "*",
--    "xo": "*"
-+    "mocha": "*"
-   },
-   "xo": {
-     "esnext": true
diff --git a/debian/patches/01-wcwidth.diff b/debian/patches/01-wcwidth.diff
index 1a84794..516fbe6 100644
--- a/debian/patches/01-wcwidth.diff
+++ b/debian/patches/01-wcwidth.diff
@@ -1,8 +1,3 @@
-Description: Replace dependency on is-fullwidth-code-point with wcwidth.js.
-Forwarded: https://github.com/sindresorhus/string-width/issues/4
-Origin: vendor, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=842191#10
-Author: Paolo Greppi <paolo.greppi at libpf.com>
-
 Index: node-string-width/index.js
 ===================================================================
 --- node-string-width.orig/index.js
@@ -15,29 +10,12 @@ Index: node-string-width/index.js
  
  module.exports = str => {
  	if (typeof str !== 'string' || str.length === 0) {
-@@ -24,11 +24,7 @@ module.exports = str => {
+@@ -29,7 +29,7 @@ module.exports = str => {
  			i++;
  		}
  
--		if (isFullwidthCodePoint(code)) {
--			width += 2;
--		} else {
--			width++;
--		}
+-		width += isFullwidthCodePoint(code) ? 2 : 1;
 +		width += wcwidth(code);
  	}
  
  	return width;
-Index: node-string-width/package.json
-===================================================================
---- node-string-width.orig/package.json
-+++ node-string-width/package.json
-@@ -45,7 +45,7 @@
-     "fixed-width"
-   ],
-   "dependencies": {
--    "is-fullwidth-code-point": "^2.0.0",
-+    "wcwidth.js": "^1.0.0",
-     "strip-ansi": "^3.0.0"
-   },
-   "devDependencies": {
diff --git a/debian/patches/02-test_zwj_zwnj.diff b/debian/patches/02-test_zwj_zwnj.diff
index 315e9d5..1620efb 100644
--- a/debian/patches/02-test_zwj_zwnj.diff
+++ b/debian/patches/02-test_zwj_zwnj.diff
@@ -2,9 +2,9 @@ Index: node-string-width/test.js
 ===================================================================
 --- node-string-width.orig/test.js
 +++ node-string-width/test.js
-@@ -19,3 +19,34 @@ test('ignores control characters', funct
- 	assert.equal(m(String.fromCharCode(159)), 0);
- 	assert.equal(m('\u001b'), 0);
+@@ -24,3 +24,34 @@ test('ignores control characters', funct
+ test('handles combining characters', function() {
+ 	assert(m('x\u0300') == 1);
  });
 +
 +test('test zero-width non-joiner (ZWNJ) unicode codepoints', function() {

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



More information about the Pkg-javascript-commits mailing list