[Pkg-javascript-commits] [acorn] 01/03: Add patch to suppress use of default arguments

Julien Puydt julien.puydt at laposte.net
Tue Dec 13 16:01:08 UTC 2016


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

jpuydt-guest pushed a commit to branch master
in repository acorn.

commit a0207bf9d791f54764998f0c28e9c7b5b64044e8
Author: Julien Puydt <julien.puydt at laposte.net>
Date:   Mon Dec 12 10:42:12 2016 +0100

    Add patch to suppress use of default arguments
---
 debian/changelog                 |  6 ++++++
 debian/patches/default_arg.patch | 38 ++++++++++++++++++++++++++++++++++++++
 debian/patches/series            |  1 +
 3 files changed, 45 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index d49fa3a..0d37f04 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+acorn (4.0.3-2) UNRELEASED; urgency=medium
+
+  * Add patch to remove use of default arguments. (Closes: #847789)
+
+ -- Julien Puydt <julien.puydt at laposte.net>  Mon, 12 Dec 2016 10:39:18 +0100
+
 acorn (4.0.3-1) unstable; urgency=medium
 
   * New upstream release.
diff --git a/debian/patches/default_arg.patch b/debian/patches/default_arg.patch
new file mode 100644
index 0000000..90c2e10
--- /dev/null
+++ b/debian/patches/default_arg.patch
@@ -0,0 +1,38 @@
+Description: do not use default arguments (Debian's nodejs is too old)
+Author: Julien Puydt
+Forwarded: no
+
+--- a/src/loose/state.js
++++ b/src/loose/state.js
+@@ -4,7 +4,8 @@
+ export const pluginsLoose = {}
+ 
+ export class LooseParser {
+-  constructor(input, options = {}) {
++  constructor(input, options) {
++    if (!options) options = {};
+     this.toks = tokenizer(input, options)
+     this.options = this.toks.options
+     this.input = this.toks.input
+--- a/src/tokentype.js
++++ b/src/tokentype.js
+@@ -22,7 +22,8 @@
+ // continue jumps to that label.
+ 
+ export class TokenType {
+-  constructor(label, conf = {}) {
++  constructor(label, conf) {
++    if (!conf) conf = {};
+     this.label = label
+     this.keyword = conf.keyword
+     this.beforeExpr = !!conf.beforeExpr
+@@ -46,7 +47,8 @@
+ export const keywords = {}
+ 
+ // Succinct definitions of keyword token types
+-function kw(name, options = {}) {
++function kw(name, options) {
++  if (!options) options = {};
+   options.keyword = name
+   return keywords[name] = new TokenType(name, options)
+ }
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/acorn.git



More information about the Pkg-javascript-commits mailing list