[Pkg-javascript-commits] [node-debug] 03/03: new upstream release, unbundle ms

Paolo Greppi paolog-guest at moszumanska.debian.org
Fri Nov 3 08:32:20 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-debug.

commit 419f3a8cb8328e93711ca7c74b5427c82a7b845c
Author: Paolo Greppi <paolo.greppi at libpf.com>
Date:   Fri Nov 3 09:31:21 2017 +0100

    new upstream release, unbundle ms
---
 debian/changelog                  |  11 +-
 debian/control                    |   7 +-
 debian/patches/00-bundle_ms.diff  | 547 --------------------------------------
 debian/patches/01-sinon-chai.diff |  27 --
 debian/patches/series             |   2 -
 5 files changed, 11 insertions(+), 583 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 8a903ca..925c683 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,12 @@
-node-debug (2.6.6-1) unstable; urgency=medium
+node-debug (3.1.0-1) UNRELEASED; urgency=medium
 
-  * Team upload
-
-  [ Paolo Greppi ]
   * New upstream release.
+  * Bump standards versions
+  * Unbundle node-ms and depend on it
+  * No need to patch away the build-dependency on sinon-chai since
+    node-sinon-chai is now in the archive
 
- -- Pirate Praveen <praveen at debian.org>  Thu, 22 Jun 2017 10:54:44 +0530
+ -- Paolo Greppi <paolo.greppi at libpf.com>  Fri, 03 Nov 2017 09:28:39 +0100
 
 node-debug (2.5.1-2) unstable; urgency=medium
 
diff --git a/debian/control b/debian/control
index 585ad20..c8abc68 100644
--- a/debian/control
+++ b/debian/control
@@ -7,13 +7,15 @@ Uploaders:
  Leo Iannacone <l3on at ubuntu.com>,
  Daniel Pocock <daniel at pocock.pro>,
  Paolo Greppi <paolo.greppi at libpf.com>
-Build-Depends: debhelper (>= 8~)
+Build-Depends: debhelper (>= 9)
  , dh-buildinfo
  , mocha
  , chai
  , node-sinon
+ , node-sinon-chai
+ , node-ms
  , nodejs
-Standards-Version: 3.9.8
+Standards-Version: 4.1.1
 Homepage: https://github.com/visionmedia/debug
 Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-debug.git
 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-javascript/node-debug.git
@@ -22,6 +24,7 @@ Package: node-debug
 Architecture: all
 Depends:
  ${misc:Depends}
+ , node-ms
  , nodejs
 Description: small debugging utility for Node.js
  node-debug provides a small debugging utility for Node.js modules.
diff --git a/debian/patches/00-bundle_ms.diff b/debian/patches/00-bundle_ms.diff
deleted file mode 100644
index 1c76b4c..0000000
--- a/debian/patches/00-bundle_ms.diff
+++ /dev/null
@@ -1,547 +0,0 @@
-Description: Bundle ms module as patch.
- It is exported by debug as "humanize".
-Author:
- Leo Iannacone <l3on at ubuntu.com>
- Paolo Greppi <paolo.greppi at libpf.com>
-Forwarded: not-needed
-
-Index: node-debug/node_modules/ms/.gitignore
-===================================================================
---- /dev/null
-+++ node-debug/node_modules/ms/.gitignore
-@@ -0,0 +1,2 @@
-+# dependencies
-+node_modules
-Index: node-debug/node_modules/ms/.travis.yml
-===================================================================
---- /dev/null
-+++ node-debug/node_modules/ms/.travis.yml
-@@ -0,0 +1,4 @@
-+{
-+  "language": "node_js",
-+  "node_js": "node"
-+}
-Index: node-debug/node_modules/ms/LICENSE.md
-===================================================================
---- /dev/null
-+++ node-debug/node_modules/ms/LICENSE.md
-@@ -0,0 +1,21 @@
-+The MIT License (MIT)
-+
-+Copyright (c) 2016 Zeit, Inc.
-+
-+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 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.
-Index: node-debug/node_modules/ms/README.md
-===================================================================
---- /dev/null
-+++ node-debug/node_modules/ms/README.md
-@@ -0,0 +1,52 @@
-+# ms
-+
-+[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms)
-+[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
-+[![Slack Channel](https://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/)
-+
-+Use this package to easily convert various time formats to milliseconds.
-+
-+## Examples
-+
-+```js
-+ms('2 days')  // 172800000
-+ms('1d')      // 86400000
-+ms('10h')     // 36000000
-+ms('2.5 hrs') // 9000000
-+ms('2h')      // 7200000
-+ms('1m')      // 60000
-+ms('5s')      // 5000
-+ms('1y')      // 31557600000
-+ms('100')     // 100
-+```
-+
-+### Convert from milliseconds
-+
-+```js
-+ms(60000)             // "1m"
-+ms(2 * 60000)         // "2m"
-+ms(ms('10 hours'))    // "10h"
-+```
-+
-+### Time format written-out
-+
-+```js
-+ms(60000, { long: true })             // "1 minute"
-+ms(2 * 60000, { long: true })         // "2 minutes"
-+ms(ms('10 hours'), { long: true })    // "10 hours"
-+```
-+
-+## Features
-+
-+- Works both in [node](https://nodejs.org) and in the browser.
-+- If a number is supplied to `ms`, a string with a unit is returned.
-+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`).
-+- If you pass a string with a number and a valid unit, the number of equivalent ms is returned.
-+
-+## Caught a bug?
-+
-+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
-+2. Link the package to the global module directory: `npm link`
-+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms!
-+
-+As always, you can run the tests using: `npm test`
-Index: node-debug/node_modules/ms/component.json
-===================================================================
---- /dev/null
-+++ node-debug/node_modules/ms/component.json
-@@ -0,0 +1,15 @@
-+{
-+  "name": "ms",
-+  "repo": "zeit/ms",
-+  "version": "0.7.1",
-+  "description": "Tiny milisecond conversion utility",
-+  "keywords": [
-+    "ms",
-+    "parse",
-+    "format"
-+  ],
-+  "scripts": [
-+    "index.js"
-+  ],
-+  "license": "MIT"
-+}
-Index: node-debug/node_modules/ms/index.js
-===================================================================
---- /dev/null
-+++ node-debug/node_modules/ms/index.js
-@@ -0,0 +1,149 @@
-+/**
-+ * Helpers.
-+ */
-+
-+var s = 1000
-+var m = s * 60
-+var h = m * 60
-+var d = h * 24
-+var y = d * 365.25
-+
-+/**
-+ * Parse or format the given `val`.
-+ *
-+ * Options:
-+ *
-+ *  - `long` verbose formatting [false]
-+ *
-+ * @param {String|Number} val
-+ * @param {Object} options
-+ * @throws {Error} throw an error if val is not a non-empty string or a number
-+ * @return {String|Number}
-+ * @api public
-+ */
-+
-+module.exports = function (val, options) {
-+  options = options || {}
-+  var type = typeof val
-+  if (type === 'string' && val.length > 0) {
-+    return parse(val)
-+  } else if (type === 'number' && isNaN(val) === false) {
-+    return options.long ?
-+			fmtLong(val) :
-+			fmtShort(val)
-+  }
-+  throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val))
-+}
-+
-+/**
-+ * Parse the given `str` and return milliseconds.
-+ *
-+ * @param {String} str
-+ * @return {Number}
-+ * @api private
-+ */
-+
-+function parse(str) {
-+  str = String(str)
-+  if (str.length > 10000) {
-+    return
-+  }
-+  var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str)
-+  if (!match) {
-+    return
-+  }
-+  var n = parseFloat(match[1])
-+  var type = (match[2] || 'ms').toLowerCase()
-+  switch (type) {
-+    case 'years':
-+    case 'year':
-+    case 'yrs':
-+    case 'yr':
-+    case 'y':
-+      return n * y
-+    case 'days':
-+    case 'day':
-+    case 'd':
-+      return n * d
-+    case 'hours':
-+    case 'hour':
-+    case 'hrs':
-+    case 'hr':
-+    case 'h':
-+      return n * h
-+    case 'minutes':
-+    case 'minute':
-+    case 'mins':
-+    case 'min':
-+    case 'm':
-+      return n * m
-+    case 'seconds':
-+    case 'second':
-+    case 'secs':
-+    case 'sec':
-+    case 's':
-+      return n * s
-+    case 'milliseconds':
-+    case 'millisecond':
-+    case 'msecs':
-+    case 'msec':
-+    case 'ms':
-+      return n
-+    default:
-+      return undefined
-+  }
-+}
-+
-+/**
-+ * Short format for `ms`.
-+ *
-+ * @param {Number} ms
-+ * @return {String}
-+ * @api private
-+ */
-+
-+function fmtShort(ms) {
-+  if (ms >= d) {
-+    return Math.round(ms / d) + 'd'
-+  }
-+  if (ms >= h) {
-+    return Math.round(ms / h) + 'h'
-+  }
-+  if (ms >= m) {
-+    return Math.round(ms / m) + 'm'
-+  }
-+  if (ms >= s) {
-+    return Math.round(ms / s) + 's'
-+  }
-+  return ms + 'ms'
-+}
-+
-+/**
-+ * Long format for `ms`.
-+ *
-+ * @param {Number} ms
-+ * @return {String}
-+ * @api private
-+ */
-+
-+function fmtLong(ms) {
-+  return plural(ms, d, 'day') ||
-+    plural(ms, h, 'hour') ||
-+    plural(ms, m, 'minute') ||
-+    plural(ms, s, 'second') ||
-+    ms + ' ms'
-+}
-+
-+/**
-+ * Pluralization helper.
-+ */
-+
-+function plural(ms, n, name) {
-+  if (ms < n) {
-+    return
-+  }
-+  if (ms < n * 1.5) {
-+    return Math.floor(ms / n) + ' ' + name
-+  }
-+  return Math.ceil(ms / n) + ' ' + name + 's'
-+}
-Index: node-debug/node_modules/ms/package.json
-===================================================================
---- /dev/null
-+++ node-debug/node_modules/ms/package.json
-@@ -0,0 +1,36 @@
-+{
-+  "name": "ms",
-+  "version": "0.7.2",
-+  "description": "Tiny milisecond conversion utility",
-+  "repository": "zeit/ms",
-+  "main": "./index",
-+  "files": [
-+    "index.js"
-+  ],
-+  "scripts": {
-+    "test": "xo && mocha test/index.js",
-+    "test-browser": "serve ./test"
-+  },
-+  "license": "MIT",
-+  "devDependencies": {
-+    "expect.js": "^0.3.1",
-+    "mocha": "^3.0.2",
-+    "serve": "^1.4.0",
-+    "xo": "^0.17.0"
-+  },
-+  "component": {
-+    "scripts": {
-+      "ms/index.js": "index.js"
-+    }
-+  },
-+  "xo": {
-+    "space": true,
-+    "semicolon": false,
-+    "envs": [
-+      "mocha"
-+    ],
-+    "rules": {
-+      "complexity": 0
-+    }
-+  }
-+}
-Index: node-debug/node_modules/ms/test/index.js
-===================================================================
---- /dev/null
-+++ node-debug/node_modules/ms/test/index.js
-@@ -0,0 +1,221 @@
-+/* eslint-disable no-undef */
-+/**
-+ * Dependencies.
-+ */
-+
-+if (typeof require !== 'undefined') {
-+  expect = require('expect.js')
-+  ms = require('../')
-+}
-+
-+// strings
-+
-+describe('ms(string)', function () {
-+  it('should not throw an error', function () {
-+    expect(function () {
-+      ms('1m')
-+    }).to.not.throwError()
-+  })
-+
-+  it('should preserve ms', function () {
-+    expect(ms('100')).to.be(100)
-+  })
-+
-+  it('should convert from m to ms', function () {
-+    expect(ms('1m')).to.be(60000)
-+  })
-+
-+  it('should convert from h to ms', function () {
-+    expect(ms('1h')).to.be(3600000)
-+  })
-+
-+  it('should convert d to ms', function () {
-+    expect(ms('2d')).to.be(172800000)
-+  })
-+
-+  it('should convert s to ms', function () {
-+    expect(ms('1s')).to.be(1000)
-+  })
-+
-+  it('should convert ms to ms', function () {
-+    expect(ms('100ms')).to.be(100)
-+  })
-+
-+  it('should work with decimals', function () {
-+    expect(ms('1.5h')).to.be(5400000)
-+  })
-+
-+  it('should work with multiple spaces', function () {
-+    expect(ms('1   s')).to.be(1000)
-+  })
-+
-+  it('should return NaN if invalid', function () {
-+    expect(isNaN(ms('☃'))).to.be(true)
-+  })
-+
-+  it('should be case-insensitive', function () {
-+    expect(ms('1.5H')).to.be(5400000)
-+  })
-+
-+  it('should work with numbers starting with .', function () {
-+    expect(ms('.5ms')).to.be(0.5)
-+  })
-+})
-+
-+// long strings
-+
-+describe('ms(long string)', function () {
-+  it('should not throw an error', function () {
-+    expect(function () {
-+      ms('53 milliseconds')
-+    }).to.not.throwError()
-+  })
-+
-+  it('should convert milliseconds to ms', function () {
-+    expect(ms('53 milliseconds')).to.be(53)
-+  })
-+
-+  it('should convert msecs to ms', function () {
-+    expect(ms('17 msecs')).to.be(17)
-+  })
-+
-+  it('should convert sec to ms', function () {
-+    expect(ms('1 sec')).to.be(1000)
-+  })
-+
-+  it('should convert from min to ms', function () {
-+    expect(ms('1 min')).to.be(60000)
-+  })
-+
-+  it('should convert from hr to ms', function () {
-+    expect(ms('1 hr')).to.be(3600000)
-+  })
-+
-+  it('should convert days to ms', function () {
-+    expect(ms('2 days')).to.be(172800000)
-+  })
-+
-+  it('should work with decimals', function () {
-+    expect(ms('1.5 hours')).to.be(5400000)
-+  })
-+})
-+
-+// numbers
-+
-+describe('ms(number, { long: true })', function () {
-+  it('should not throw an error', function () {
-+    expect(function () {
-+      ms(500, {long: true})
-+    }).to.not.throwError()
-+  })
-+
-+  it('should support milliseconds', function () {
-+    expect(ms(500, {long: true})).to.be('500 ms')
-+  })
-+
-+  it('should support seconds', function () {
-+    expect(ms(1000, {long: true})).to.be('1 second')
-+    expect(ms(1200, {long: true})).to.be('1 second')
-+    expect(ms(10000, {long: true})).to.be('10 seconds')
-+  })
-+
-+  it('should support minutes', function () {
-+    expect(ms(60 * 1000, {long: true})).to.be('1 minute')
-+    expect(ms(60 * 1200, {long: true})).to.be('1 minute')
-+    expect(ms(60 * 10000, {long: true})).to.be('10 minutes')
-+  })
-+
-+  it('should support hours', function () {
-+    expect(ms(60 * 60 * 1000, {long: true})).to.be('1 hour')
-+    expect(ms(60 * 60 * 1200, {long: true})).to.be('1 hour')
-+    expect(ms(60 * 60 * 10000, {long: true})).to.be('10 hours')
-+  })
-+
-+  it('should support days', function () {
-+    expect(ms(24 * 60 * 60 * 1000, {long: true})).to.be('1 day')
-+    expect(ms(24 * 60 * 60 * 1200, {long: true})).to.be('1 day')
-+    expect(ms(24 * 60 * 60 * 10000, {long: true})).to.be('10 days')
-+  })
-+
-+  it('should round', function () {
-+    expect(ms(234234234, {long: true})).to.be('3 days')
-+  })
-+})
-+
-+// numbers
-+
-+describe('ms(number)', function () {
-+  it('should not throw an error', function () {
-+    expect(function () {
-+      ms(500)
-+    }).to.not.throwError()
-+  })
-+
-+  it('should support milliseconds', function () {
-+    expect(ms(500)).to.be('500ms')
-+  })
-+
-+  it('should support seconds', function () {
-+    expect(ms(1000)).to.be('1s')
-+    expect(ms(10000)).to.be('10s')
-+  })
-+
-+  it('should support minutes', function () {
-+    expect(ms(60 * 1000)).to.be('1m')
-+    expect(ms(60 * 10000)).to.be('10m')
-+  })
-+
-+  it('should support hours', function () {
-+    expect(ms(60 * 60 * 1000)).to.be('1h')
-+    expect(ms(60 * 60 * 10000)).to.be('10h')
-+  })
-+
-+  it('should support days', function () {
-+    expect(ms(24 * 60 * 60 * 1000)).to.be('1d')
-+    expect(ms(24 * 60 * 60 * 10000)).to.be('10d')
-+  })
-+
-+  it('should round', function () {
-+    expect(ms(234234234)).to.be('3d')
-+  })
-+})
-+
-+// invalid inputs
-+
-+describe('ms(invalid inputs)', function () {
-+  it('should throw an error, when ms("")', function () {
-+    expect(function () {
-+      ms('')
-+    }).to.throwError()
-+  })
-+
-+  it('should throw an error, when ms(undefined)', function () {
-+    expect(function () {
-+      ms(undefined)
-+    }).to.throwError()
-+  })
-+
-+  it('should throw an error, when ms(null)', function () {
-+    expect(function () {
-+      ms(null)
-+    }).to.throwError()
-+  })
-+
-+  it('should throw an error, when ms([])', function () {
-+    expect(function () {
-+      ms([])
-+    }).to.throwError()
-+  })
-+
-+  it('should throw an error, when ms({})', function () {
-+    expect(function () {
-+      ms({})
-+    }).to.throwError()
-+  })
-+
-+  it('should throw an error, when ms(NaN)', function () {
-+    expect(function () {
-+      ms(NaN)
-+    }).to.throwError()
-+  })
-+})
diff --git a/debian/patches/01-sinon-chai.diff b/debian/patches/01-sinon-chai.diff
deleted file mode 100644
index b022fec..0000000
--- a/debian/patches/01-sinon-chai.diff
+++ /dev/null
@@ -1,27 +0,0 @@
-Description: Patch away the dependency on sinon-chai.
-Forwarded: not-needed
-Author: Paolo Greppi <paolo.greppi at libpf.com>
-
-Index: node-debug/test/debug_spec.js
-===================================================================
---- node-debug.orig/test/debug_spec.js
-+++ node-debug/test/debug_spec.js
-@@ -4,8 +4,7 @@
- var chai
-   , expect
-   , debug
--  , sinon
--  , sinonChai;
-+  , sinon;
- 
- if (typeof module !== 'undefined') {
-   chai = require('chai');
-@@ -13,8 +12,6 @@ if (typeof module !== 'undefined') {
- 
-   debug = require('../src/index');
-   sinon = require('sinon');
--  sinonChai = require("sinon-chai");
--  chai.use(sinonChai);
- }
- 
- 
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index a41a944..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,2 +0,0 @@
-00-bundle_ms.diff
-01-sinon-chai.diff

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



More information about the Pkg-javascript-commits mailing list