[Pkg-javascript-commits] [node-clean-yaml-object] 19/21: merge patched into master

Bastien Roucariès rouca at moszumanska.debian.org
Thu Sep 7 09:52:19 UTC 2017


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

rouca pushed a commit to branch master
in repository node-clean-yaml-object.

commit 3c6048034a29600b1563173d8b05a28c64635588
Merge: d1b160e acf9392
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Mon Aug 21 16:01:04 2017 +0200

    merge patched into master

 debian/.git-dpm                                    |  4 +-
 .../0001-Fix-for-single-element-float-arrays.patch | 57 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 index.js                                           | 11 ++++-
 test.js                                            |  5 ++
 5 files changed, 75 insertions(+), 3 deletions(-)

diff --cc debian/.git-dpm
index 0be64a9,0000000..456127c
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,8 -1,0 +1,8 @@@
 +# see git-dpm(1) from git-dpm package
- 37e3fd40076d7e6f92b9ca9a09a4cf600e6bac24
- 37e3fd40076d7e6f92b9ca9a09a4cf600e6bac24
++acf9392448a24762c8cf81e21b28f850f4dbbf76
++acf9392448a24762c8cf81e21b28f850f4dbbf76
 +37e3fd40076d7e6f92b9ca9a09a4cf600e6bac24
 +37e3fd40076d7e6f92b9ca9a09a4cf600e6bac24
 +node-clean-yaml-object_0.1.0.orig.tar.gz
 +a2f8d640c13a79a851cd5283b50a48b183343c33
 +4310
diff --cc debian/patches/0001-Fix-for-single-element-float-arrays.patch
index 0000000,0000000..00a9ac3
new file mode 100644
--- /dev/null
+++ b/debian/patches/0001-Fix-for-single-element-float-arrays.patch
@@@ -1,0 -1,0 +1,57 @@@
++From acf9392448a24762c8cf81e21b28f850f4dbbf76 Mon Sep 17 00:00:00 2001
++From: Brian Dentino <brian.dentino at gmail.com>
++Date: Tue, 13 Sep 2016 19:39:35 -0700
++Subject: Fix for single-element float arrays
++
++Fix a bug for single-element float
++
++bug: https://github.com/tapjs/clean-yaml-object/pull/8
++origin: https://github.com/tapjs/clean-yaml-object/pull/8/commits/d31e35c0a92ef05e51dfdca6f2ce35a2f89d222e
++(cherry picked from commit d31e35c0a92ef05e51dfdca6f2ce35a2f89d222e)
++---
++ index.js | 11 ++++++++++-
++ test.js  |  5 +++++
++ 2 files changed, 15 insertions(+), 1 deletion(-)
++
++diff --git a/index.js b/index.js
++index 77b0816..6ea0ae7 100644
++--- a/index.js
+++++ b/index.js
++@@ -41,7 +41,7 @@ function cleanYamlObj(object, filter, isRoot, seen) {
++ 		// Fill in any holes.  This means we lose expandos,
++ 		// but we were gonna lose those anyway.
++ 		if (isArray) {
++-			object = Array.apply(null, object);
+++			object = fillHoles(object);
++ 		}
++ 
++ 		var isError = object && typeof object === 'object' && object instanceof Error;
++@@ -90,3 +90,12 @@ function setProp(propName, source, target, seen, filter) {
++ function defaultFilter() {
++ 	return true;
++ }
+++
+++function fillHoles(arr) {
+++	var result = [];
+++	for (var i = 0; i < arr.length; i++) {
+++		result[i] = arr[i];
+++	}
+++	return result;
+++}
+++
++diff --git a/test.js b/test.js
++index de3739b..4d2a6ab 100644
++--- a/test.js
+++++ b/test.js
++@@ -32,6 +32,11 @@ test('Array holes are filled', t => {
++ 	t.same(fn(array), ['a', null, null, null, 'c']);
++ });
++ 
+++test('Arrays with a single float are safe', t => {
+++	const array = [1.5];
+++	t.same(fn(array), [1.5]);
+++});
+++
++ test.cb('Errors have their domain stripped', t => {
++ 	t.plan(2);
++ 
diff --cc debian/patches/series
index 0000000,0000000..0434db0
new file mode 100644
--- /dev/null
+++ b/debian/patches/series
@@@ -1,0 -1,0 +1,1 @@@
++0001-Fix-for-single-element-float-arrays.patch

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



More information about the Pkg-javascript-commits mailing list