[Pkg-javascript-commits] [node-magic-string] 04/06: Remove the default argument patch, now unneeded

Julien Puydt julien.puydt at laposte.net
Thu Jul 6 15:49:53 UTC 2017


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

jpuydt-guest pushed a commit to branch master
in repository node-magic-string.

commit 3bad170206c06e59b07e38e85fd55ae06eb5417d
Author: Julien Puydt <julien.puydt at laposte.net>
Date:   Thu Jul 6 17:35:09 2017 +0200

    Remove the default argument patch, now unneeded
---
 debian/changelog                 |  2 +-
 debian/patches/default_arg.patch | 49 ----------------------------------------
 debian/patches/series            |  1 -
 3 files changed, 1 insertion(+), 51 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index d98c49a..b89c877 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,6 @@
 node-magic-string (0.21.3-1) UNRELEASED; urgency=medium
 
-  * Added a DEP3 header to the patch.
+  * Removed the patch (Debian's nodejs has default arguments now).
   * New upstream release.
 
  -- Julien Puydt <julien.puydt at laposte.net>  Thu, 06 Jul 2017 17:25:53 +0200
diff --git a/debian/patches/default_arg.patch b/debian/patches/default_arg.patch
deleted file mode 100644
index 1e3cb26..0000000
--- a/debian/patches/default_arg.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Description: avoids the use of default arguments
-Author: Julien Puydt <julien.puydt at laposte.net
-Forwarded: no (Debian's nodejs is too old)
-
---- a/src/MagicString.js
-+++ b/src/MagicString.js
-@@ -12,7 +12,8 @@
- 	insertRight: false
- };
- 
--export default function MagicString ( string, options = {} ) {
-+export default function MagicString ( string, options ) {
-+        if (!options) options = {};
- 	const chunk = new Chunk( 0, string.length, string );
- 
- 	Object.defineProperties( this, {
-@@ -429,7 +430,9 @@
- 		return this.overwrite( start, end, '', false );
- 	},
- 
--	slice ( start = 0, end = this.original.length ) {
-+	slice ( start, end ) {
-+		if (!start) start = 0;
-+		if (!end) end = this.original.lengh;
- 		while ( start < 0 ) start += this.original.length;
- 		while ( end < 0 ) end += this.original.length;
- 
---- a/src/Bundle.js
-+++ b/src/Bundle.js
-@@ -6,7 +6,8 @@
- import getLocator from './utils/getLocator.js';
- import Mappings from './utils/Mappings.js';
- 
--export default function Bundle ( options = {} ) {
-+export default function Bundle ( options  ) {
-+	if (!options) options = {};
- 	this.intro = options.intro || '';
- 	this.separator = options.separator !== undefined ? options.separator : '\n';
- 
-@@ -80,7 +81,8 @@
- 		return bundle;
- 	},
- 
--	generateMap ( options = {} ) {
-+	generateMap ( options ) {
-+		if (!options) options = {};
- 		const names = [];
- 		this.sources.forEach( source => {
- 			Object.keys( source.content.storedNames ).forEach( name => {
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 618e8a4..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-default_arg.patch

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



More information about the Pkg-javascript-commits mailing list