[Pkg-javascript-commits] [node-magic-string] 05/06: Added a patch to avoid default arguments (not supported in Debian's nodejs yet)
Julien Puydt
julien.puydt at laposte.net
Wed Dec 7 07:23:29 UTC 2016
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 7ba08625235ca71a4d3e10c29f552dd825cc554d
Author: Julien Puydt <julien.puydt at laposte.net>
Date: Wed Dec 7 08:11:41 2016 +0100
Added a patch to avoid default arguments (not supported in Debian's nodejs yet)
---
debian/changelog | 2 ++
debian/patches/default_arg.patch | 45 ++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 48 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 320a066..a6750b0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ node-magic-string (0.19.0-1) UNRELEASED; urgency=medium
* New upstream release.
* Update lintian-overrides to the new test.
+ * Added a patch to avoid default arguments (not supported in Debian's
+ nodejs yet).
-- Julien Puydt <julien.puydt at laposte.net> Mon, 05 Dec 2016 10:20:21 +0100
diff --git a/debian/patches/default_arg.patch b/debian/patches/default_arg.patch
new file mode 100644
index 0000000..b28fd57
--- /dev/null
+++ b/debian/patches/default_arg.patch
@@ -0,0 +1,45 @@
+--- 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
new file mode 100644
index 0000000..618e8a4
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+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