[Pkg-javascript-commits] [node-tap] 02/14: Add patch to use available modules instead of new ones

Jérémy Lal kapouer at moszumanska.debian.org
Mon Oct 20 00:02:32 UTC 2014


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

kapouer pushed a commit to branch master
in repository node-tap.

commit 23cc01dd45f70e4bffbc4c62b050ef4f4f9d6bbb
Author: Jérémy Lal <kapouer at melix.org>
Date:   Mon Oct 20 01:20:04 2014 +0200

    Add patch to use available modules instead of new ones
---
 debian/patches/use_available_modules.patch | 56 ++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/debian/patches/use_available_modules.patch b/debian/patches/use_available_modules.patch
new file mode 100644
index 0000000..2c54fd7
--- /dev/null
+++ b/debian/patches/use_available_modules.patch
@@ -0,0 +1,56 @@
+Description: use already packaged modules
+ ... instead of adding new ones that do the same thing
+Forwarded: not-needed, would probably get upstream angry
+Author: Jérémy Lal <kapouer at melix.org>
+Last-Update: 2014-10-20
+--- a/lib/tap-assert.js
++++ b/lib/tap-assert.js
+@@ -1,9 +1,26 @@
+ // an assert module that returns tappable data for each assertion.
+-var difflet = require('difflet')
+-  , deepEqual = require('deep-equal')
+-  , bufferEqual = require('buffer-equal')
++var diffl = require('diff')
++  , assert = require('assert')
+   , Buffer = require('buffer').Buffer
+ 
++function deepEqual(a, b) {
++  try {
++    assert.deepEqual(a, b);
++  } catch() {
++    return false;
++  }
++  return true;
++}
++
++function bufferEqual(a, b) {
++  if (!Buffer.isBuffer(a)) return false;
++  if (!Buffer.isBuffer(b)) return false;
++  if (a.length != b.length) return false;
++  for (var i=0, len=a.length; i < len; i++) {
++    if (a[i] != b[i]) return false;
++  }
++}
++
+ module.exports = assert
+ 
+ var syns = {}
+@@ -384,6 +401,8 @@
+   }})())
+ }
+ 
++
++
+ function diffString (f, w) {
+   if (w === f) return null
+   var p = 0
+@@ -395,7 +414,8 @@
+ }
+ 
+ function diffObject (f, w) {
+-  return difflet({ indent : 2, comment : true }).compare(w, f)
++  var sw = JSON.stringify(w, null, 2);
++  return diff.createPatch('', JSON.stringify(w, null, 2), JSON.stringify(f, null, 2));
+ }
+ 
+ function diff (f, w, p) {

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



More information about the Pkg-javascript-commits mailing list