Hi,

can you check the attached patch fixes the bug? I couldn't test it properly since several of node-vinyl-fs build-deps are not available in Debian yet and I'm a bit short on time this morning for a compilation spree.


Snark on #debian-js
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)
 }
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel

Reply via email to