Bug#1004471: [Pkg-javascript-devel] Bug#1004471: Update node-terser to latest upstream (node-terser 5)

2022-08-25 Thread Jonas Smedegaard
Quoting Yadd (2022-08-25 16:35:20)
> only ruby-terser is broken by terser 5 for a bad reason, upstream uses a 
> patched version of terser 5.14.
> 
> I propose to upload node-terser 5 to unstable and let Ruby Team fix 
> their package.

Thanks for the investigation - I will follow your advice :-)


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc
Description: signature


Bug#1004471: Update node-terser to latest upstream (node-terser 5)

2022-08-25 Thread Yadd

Hi,

only ruby-terser is broken by terser 5 for a bad reason, upstream uses a 
patched version of terser 5.14.


I propose to upload node-terser 5 to unstable and let Ruby Team fix 
their package.


Cheers,
Yadd



Bug#1011816: Bug#1004471: Update node-terser to latest upstream (node-terser 5)

2022-06-25 Thread Jonas Smedegaard
[ dropping randomly one of the cross-posted bugreports ]

Quoting Yadd (2022-06-25 12:13:48)
> On 25/06/2022 12:03, Jonas Smedegaard wrote:
> > Quoting Yadd (2022-06-25 09:51:05)
> >> On 30/05/2022 13:07, Jonas Smedegaard wrote:
> > Your fixing the issues is great.  The minor issue I had with it
> > was your sharing fixes for multiple issues as a single patch, making it
> > hard to follow what exactly is going on, and consequently making it hard
> > to navigate in it - i.e. adopt only some changes but not others.
> > 
> > Concretely, I am not ready to move to terser v5 yet, and this RC bug
> > does *not* require bumping to terser v5.  Your sharing a fix for this
> > issue that goes "first upgrade to terser v5, then patch that different
> > codebase like this..." made it hard for me to change that *one line*
> > really related to this bug:
> > 
> > -+if ("ecma" in opts) {
> > ++if ("ecma" in opts && opts.ecma != undefined) {
> > 
> > Let me repeat to emphasize: I truly appreciate your work triaging bugs!
> > 
> > Just please consider making "atomic changes": One git commit (or patch
> > file) per semantic change - not multiple lesser-related changes lumped
> > together.
> 
> Thanks, usually  it seems like you prefer debdiff instead of MR, that's 
> why I did this. Would you rather I make some MRs this time?

No thanks: I dislike MRs because they put the burden on the receiver to
play along with a specific model of using git indirectly via a custom
web interface (or a custom REST interface).

But the alternative to MRs is not a debdiff, but a diff.

If it takes 7 changes to fix a bug, then share that as 7 distinct
pieces, either as a git branch somewhere containing 7 commits, or as 7
unified diff patches attached to an email.


Regards,

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc
Description: signature


Bug#1004471: Update node-terser to latest upstream (node-terser 5)

2022-06-25 Thread Yadd

On 25/06/2022 12:03, Jonas Smedegaard wrote:

Quoting Yadd (2022-06-25 09:51:05)

On 30/05/2022 13:07, Jonas Smedegaard wrote:

Quoting Yadd (2022-05-30 12:05:41)

here is a debdiff (debian part only) to update terser to version 5.13.1.
This fixes also #1011816 (FTBFS)


Thanks!

It seems you are sharing that patch as a proposal, as you only pushed
some parts of it to git.

...and I disagree with some minor parts of it, so that's good: I will
take a look at it, and when I get a better sense of it reply back here
in more detail which parts I disagree with.


Hi Jonas,

did you have some time to look at this ?


Thanks for nudging - I had actually forgotten about this, but now dusted
off and finalized my work (terser v4.8 will be in unstable shortly).
Thanks again!

Your fixing the issues is great.  The minor issue I had with it
was your sharing fixes for multiple issues as a single patch, making it
hard to follow what exactly is going on, and consequently making it hard
to navigate in it - i.e. adopt only some changes but not others.

Concretely, I am not ready to move to terser v5 yet, and this RC bug
does *not* require bumping to terser v5.  Your sharing a fix for this
issue that goes "first upgrade to terser v5, then patch that different
codebase like this..." made it hard for me to change that *one line*
really related to this bug:

-+if ("ecma" in opts) {
++if ("ecma" in opts && opts.ecma != undefined) {

Let me repeat to emphasize: I truly appreciate your work triaging bugs!

Just please consider making "atomic changes": One git commit (or patch
file) per semantic change - not multiple lesser-related changes lumped
together.


Thanks, usually  it seems like you prefer debdiff instead of MR, that's 
why I did this. Would you rather I make some MRs this time?




Bug#1004471: Update node-terser to latest upstream (node-terser 5)

2022-06-25 Thread Jonas Smedegaard
Quoting Yadd (2022-06-25 09:51:05)
> On 30/05/2022 13:07, Jonas Smedegaard wrote:
> > Quoting Yadd (2022-05-30 12:05:41)
> >> here is a debdiff (debian part only) to update terser to version 5.13.1.
> >> This fixes also #1011816 (FTBFS)
> > 
> > Thanks!
> > 
> > It seems you are sharing that patch as a proposal, as you only pushed
> > some parts of it to git.
> > 
> > ...and I disagree with some minor parts of it, so that's good: I will
> > take a look at it, and when I get a better sense of it reply back here
> > in more detail which parts I disagree with.
> 
> Hi Jonas,
> 
> did you have some time to look at this ?

Thanks for nudging - I had actually forgotten about this, but now dusted
off and finalized my work (terser v4.8 will be in unstable shortly).
Thanks again!

Your fixing the issues is great.  The minor issue I had with it
was your sharing fixes for multiple issues as a single patch, making it
hard to follow what exactly is going on, and consequently making it hard
to navigate in it - i.e. adopt only some changes but not others.

Concretely, I am not ready to move to terser v5 yet, and this RC bug
does *not* require bumping to terser v5.  Your sharing a fix for this
issue that goes "first upgrade to terser v5, then patch that different
codebase like this..." made it hard for me to change that *one line*
really related to this bug:

-+if ("ecma" in opts) {
++if ("ecma" in opts && opts.ecma != undefined) {

Let me repeat to emphasize: I truly appreciate your work triaging bugs!

Just please consider making "atomic changes": One git commit (or patch
file) per semantic change - not multiple lesser-related changes lumped
together.

Kind regards,

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc
Description: signature


Bug#1004471: Update node-terser to latest upstream (node-terser 5)

2022-06-25 Thread Yadd

On 30/05/2022 13:07, Jonas Smedegaard wrote:

Quoting Yadd (2022-05-30 12:05:41)

here is a debdiff (debian part only) to update terser to version 5.13.1.
This fixes also #1011816 (FTBFS)


Thanks!

It seems you are sharing that patch as a proposal, as you only pushed
some parts of it to git.

...and I disagree with some minor parts of it, so that's good: I will
take a look at it, and when I get a better sense of it reply back here
in more detail which parts I disagree with.


Hi Jonas,

did you have some time to look at this ?



Bug#1004471: [Pkg-javascript-devel] Bug#1004471: Bug#1004471: Update node-terser to latest upstream (node-terser 5)

2022-05-31 Thread Jonas Smedegaard
Quoting Yadd (2022-05-31 14:48:19)
> On 30/05/2022 18:24, Yadd wrote:
> > On 30/05/2022 18:21, Yadd wrote:
> >> On 30/05/2022 14:37, Yadd wrote:
> >>> There is something broken with cjs/mjs. I'm going to fix that.
> >>>
> >>> Cheers,
> >>> Yadd
> >>>
> >>> Le Lundi, Mai 30, 2022 13:07 CEST, Jonas Smedegaard  
> >>> a écrit:
>  Quoting Yadd (2022-05-30 12:05:41)
> > here is a debdiff (debian part only) to update terser to version 
> > 5.13.1.
> > This fixes also #1011816 (FTBFS)
> 
>  Thanks!
> 
>  It seems you are sharing that patch as a proposal, as you only pushed
>  some parts of it to git.
> 
>  ...and I disagree with some minor parts of it, so that's good: I will
>  take a look at it, and when I get a better sense of it reply back here
>  in more detail which parts I disagree with.
> >>
> >> Hi Jonas,
> >>
> >> I fixed:
> >>   * debdiff: diff from debian/latest (still only debian/ directory)
> >>   * commonjs use
> >>
> >> Now autopkgtest passed except pure browser test (command2): webpack 
> >> produces a bundle unusable for domino test, maybe for browser...
> > 
> > "webpack produces..." => in node-source-map ["self is not defined"]
> > 
> >> I think mocha test could be added to autopkgtest now
> >>
> >> Cheers,
> >> Yadd
> 
> Hi,
> 
> all is fixed now with node-source-map 0.7.0++dfsg2+really.0.6.1-11

Thanks!

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc
Description: signature


Bug#1004471: [Pkg-javascript-devel] Bug#1004471: Bug#1004471: Update node-terser to latest upstream (node-terser 5)

2022-05-31 Thread Yadd

On 30/05/2022 18:24, Yadd wrote:

On 30/05/2022 18:21, Yadd wrote:

On 30/05/2022 14:37, Yadd wrote:

There is something broken with cjs/mjs. I'm going to fix that.

Cheers,
Yadd

Le Lundi, Mai 30, 2022 13:07 CEST, Jonas Smedegaard  
a écrit:

Quoting Yadd (2022-05-30 12:05:41)
here is a debdiff (debian part only) to update terser to version 
5.13.1.

This fixes also #1011816 (FTBFS)


Thanks!

It seems you are sharing that patch as a proposal, as you only pushed
some parts of it to git.

...and I disagree with some minor parts of it, so that's good: I will
take a look at it, and when I get a better sense of it reply back here
in more detail which parts I disagree with.


Hi Jonas,

I fixed:
  * debdiff: diff from debian/latest (still only debian/ directory)
  * commonjs use

Now autopkgtest passed except pure browser test (command2): webpack 
produces a bundle unusable for domino test, maybe for browser...


"webpack produces..." => in node-source-map ["self is not defined"]


I think mocha test could be added to autopkgtest now

Cheers,
Yadd


Hi,

all is fixed now with node-source-map 0.7.0++dfsg2+really.0.6.1-11

Cheers,
Yadd



Bug#1004471: [Pkg-javascript-devel] Bug#1004471: Update node-terser to latest upstream (node-terser 5)

2022-05-30 Thread Yadd

On 30/05/2022 18:21, Yadd wrote:

On 30/05/2022 14:37, Yadd wrote:

There is something broken with cjs/mjs. I'm going to fix that.

Cheers,
Yadd

Le Lundi, Mai 30, 2022 13:07 CEST, Jonas Smedegaard  a 
écrit:

Quoting Yadd (2022-05-30 12:05:41)
here is a debdiff (debian part only) to update terser to version 
5.13.1.

This fixes also #1011816 (FTBFS)


Thanks!

It seems you are sharing that patch as a proposal, as you only pushed
some parts of it to git.

...and I disagree with some minor parts of it, so that's good: I will
take a look at it, and when I get a better sense of it reply back here
in more detail which parts I disagree with.


Hi Jonas,

I fixed:
  * debdiff: diff from debian/latest (still only debian/ directory)
  * commonjs use

Now autopkgtest passed except pure browser test (command2): webpack 
produces a bundle unusable for domino test, maybe for browser...


"webpack produces..." => in node-source-map ["self is not defined"]


I think mocha test could be added to autopkgtest now

Cheers,
Yadd




Bug#1004471: [Pkg-javascript-devel] Bug#1004471: Update node-terser to latest upstream (node-terser 5)

2022-05-30 Thread Yadd

On 30/05/2022 14:37, Yadd wrote:

There is something broken with cjs/mjs. I'm going to fix that.

Cheers,
Yadd

Le Lundi, Mai 30, 2022 13:07 CEST, Jonas Smedegaard  a écrit:
  

Quoting Yadd (2022-05-30 12:05:41)

here is a debdiff (debian part only) to update terser to version 5.13.1.
This fixes also #1011816 (FTBFS)


Thanks!

It seems you are sharing that patch as a proposal, as you only pushed
some parts of it to git.

...and I disagree with some minor parts of it, so that's good: I will
take a look at it, and when I get a better sense of it reply back here
in more detail which parts I disagree with.


Hi Jonas,

I fixed:
 * debdiff: diff from debian/latest (still only debian/ directory)
 * commonjs use

Now autopkgtest passed except pure browser test (command2): webpack 
produces a bundle unusable for domino test, maybe for browser...


I think mocha test could be added to autopkgtest now

Cheers,
Yadddiff --git a/debian/changelog b/debian/changelog
index bf31486e..af5ba64d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,20 @@
+node-terser (5.13.1-1) UNRELEASED; urgency=medium
+
+  * Team upload
+  * Declare compliance with policy 4.6.1
+  * Fix debian/rules for parallel build (manpage needs bundle file)
+  * New upstream version 5.13.1
+  * Refresh patches
+  * Add patches to fix test
+  * Add links during build
+  * Render mocha test required
+  * Update nodejs dependency to nodejs:any
+  * Fix commander patch
+  * Use pkg-js-autopkgtest in require test because type=module
+  * Fix commonjs usage
+
+ -- Yadd   Mon, 30 May 2022 18:14:52 +0200
+
 node-terser (4.8.0-2) experimental; urgency=medium
 
   * update copyright info:
diff --git a/debian/clean b/debian/clean
index 479d4e14..51146a4a 100644
--- a/debian/clean
+++ b/debian/clean
@@ -1,5 +1,6 @@
 debian/js/
 debian-man/
 dist/bundle*
+node_modules/
 README.html
 README.txt
diff --git a/debian/control b/debian/control
index e4610eca..929149f3 100644
--- a/debian/control
+++ b/debian/control
@@ -78,7 +78,7 @@ Architecture: all
 Depends:
  node-commander (>= 7),
  node-terser (= ${source:Version}),
- nodejs,
+ nodejs:any,
  ${misc:Depends},
 Recommends:
  node-source-map-support,
diff --git a/debian/libjs-terser.links b/debian/libjs-terser.links
index 73aef070..bfd0d2ae 100644
--- a/debian/libjs-terser.links
+++ b/debian/libjs-terser.links
@@ -1 +1 @@
-usr/share/nodejs/terser/dist/bundle.min.js 
usr/share/javascript/terser/bundle.js
+usr/share/nodejs/terser/dist/bundle.min.cjs 
usr/share/javascript/terser/bundle.js
diff --git a/debian/node-terser.install b/debian/node-terser.install
index 338e037d..9fe7de5a 100644
--- a/debian/node-terser.install
+++ b/debian/node-terser.install
@@ -1,2 +1,2 @@
 package.json lib tools main.js /usr/share/nodejs/terser
-dist/bundle.min.js /usr/share/nodejs/terser/dist
+dist/bundle.min.cjs /usr/share/nodejs/terser/dist
diff --git a/debian/patches/1001_commander.patch 
b/debian/patches/1001_commander.patch
index abcf1fa5..24717184 100644
--- a/debian/patches/1001_commander.patch
+++ b/debian/patches/1001_commander.patch
@@ -4,231 +4,219 @@ Description: support node module commander release 8
  (and possibly v7 as well),
  at the expense of compatibility with older releases of commander.
 Author: Yadd 
-Last-Update: 2022-02-06
+Last-Update: 2022-05-30
 ---
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 a/bin/terser
-+++ b/bin/terser
-@@ -25,6 +25,15 @@
- program.version(info.name + " " + info.version);
- program.parseArgv = program.parse;
- program.parse = undefined;
-+var argv = [];
-+process.argv.forEach(function(arg){
-+  if(arg.match(/^-([pcmbode]+)$/)) {
-+argv = argv.concat(RegExp.$1.split('').map(s => { return '-'+s }));
-+  }
-+  else argv.push(arg);
-+});
-+process.argv = argv;
-+
- if (process.argv.includes("ast")) program.helpInformation = describe_ast;
- else if (process.argv.includes("options")) program.helpInformation = 
function() {
- var text = [];
+
+--- a/lib/cli.js
 b/lib/cli.js
+@@ -26,6 +26,15 @@
+ program.parseArgv = program.parse;
+ program.parse = undefined;
+ 
++var argv = [];
++process.argv.forEach(function(arg){
++  if(arg.match(/^-([pcmbode]+)$/)) {
++argv = argv.concat(RegExp.$1.split('').map(s => { return '-'+s }));
++  }
++  else argv.push(arg);
++});
++process.argv = argv;
++
+ if (process.argv.includes("ast")) program.helpInformation = describe_ast;
+ else if (process.argv.includes("options")) program.helpInformation = 
function() {
+ var text = [];
 @@ -62,10 +71,11 @@
- program.option("--warn", "Print warning messages.");
- program.option("--wrap ", "Embed everything as a function with 
“exports” corresponding to “name” globally.");
- program.arguments("[files...]").parseArgv(process.argv);
--if (program.configFile) {
--options = JSON.parse(read_file(program.configFile));
-+const opts = program.opts();
-+if (opts.configFile) {
-+options = 

Bug#1004471: Update node-terser to latest upstream (node-terser 5)

2022-05-30 Thread Yadd
There is something broken with cjs/mjs. I'm going to fix that.

Cheers,
Yadd

Le Lundi, Mai 30, 2022 13:07 CEST, Jonas Smedegaard  a écrit:

> Quoting Yadd (2022-05-30 12:05:41)
> > here is a debdiff (debian part only) to update terser to version 5.13.1.
> > This fixes also #1011816 (FTBFS)
>
> Thanks!
>
> It seems you are sharing that patch as a proposal, as you only pushed
> some parts of it to git.
>
> ...and I disagree with some minor parts of it, so that's good: I will
> take a look at it, and when I get a better sense of it reply back here
> in more detail which parts I disagree with.
>
>
>  - Jonas
>
> --
>  * Jonas Smedegaard - idealist & Internet-arkitekt
>  * Tlf.: +45 40843136  Website: http://dr.jones.dk/
>
>  [x] quote me freely  [ ] ask before reusing  [ ] keep private



Bug#1004471: Update node-terser to latest upstream (node-terser 5)

2022-05-30 Thread Jonas Smedegaard
Quoting Yadd (2022-05-30 12:05:41)
> here is a debdiff (debian part only) to update terser to version 5.13.1. 
> This fixes also #1011816 (FTBFS)

Thanks!

It seems you are sharing that patch as a proposal, as you only pushed
some parts of it to git.

...and I disagree with some minor parts of it, so that's good: I will
take a look at it, and when I get a better sense of it reply back here
in more detail which parts I disagree with.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc
Description: signature


Bug#1004471: Update node-terser to latest upstream (node-terser 5)

2022-05-30 Thread Yadd

Hi,

here is a debdiff (debian part only) to update terser to version 5.13.1. 
This fixes also #1011816 (FTBFS)


Cheers,
Yadddiff --git a/debian/changelog b/debian/changelog
index bf31486e..e23e2739 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+node-terser (5.13.1-1) UNRELEASED; urgency=medium
+
+  * Team upload
+  * Declare compliance with policy 4.6.1
+  * Fix debian/rules for parallel build (manpage needs bundle file)
+  * New upstream version 5.13.1
+  * Refresh patches
+  * Add patches to fix test
+  * Add links during build
+  * Render mocha test required
+
+ -- Yadd   Mon, 30 May 2022 12:03:45 +0200
+
 node-terser (4.8.0-2) experimental; urgency=medium
 
   * update copyright info:
diff --git a/debian/clean b/debian/clean
index 479d4e14..51146a4a 100644
--- a/debian/clean
+++ b/debian/clean
@@ -1,5 +1,6 @@
 debian/js/
 debian-man/
 dist/bundle*
+node_modules/
 README.html
 README.txt
diff --git a/debian/patches/1001_commander.patch 
b/debian/patches/1001_commander.patch
index abcf1fa5..fdaa927b 100644
--- a/debian/patches/1001_commander.patch
+++ b/debian/patches/1001_commander.patch
@@ -4,231 +4,220 @@ Description: support node module commander release 8
  (and possibly v7 as well),
  at the expense of compatibility with older releases of commander.
 Author: Yadd 
-Last-Update: 2022-02-06
+Last-Update: 2022-05-30
 ---
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 a/bin/terser
-+++ b/bin/terser
-@@ -25,6 +25,15 @@
- program.version(info.name + " " + info.version);
- program.parseArgv = program.parse;
- program.parse = undefined;
-+var argv = [];
-+process.argv.forEach(function(arg){
-+  if(arg.match(/^-([pcmbode]+)$/)) {
-+argv = argv.concat(RegExp.$1.split('').map(s => { return '-'+s }));
-+  }
-+  else argv.push(arg);
-+});
-+process.argv = argv;
-+
- if (process.argv.includes("ast")) program.helpInformation = describe_ast;
- else if (process.argv.includes("options")) program.helpInformation = 
function() {
- var text = [];
+
+--- a/lib/cli.js
 b/lib/cli.js
+@@ -26,6 +26,15 @@
+ program.parseArgv = program.parse;
+ program.parse = undefined;
+ 
++var argv = [];
++process.argv.forEach(function(arg){
++  if(arg.match(/^-([pcmbode]+)$/)) {
++argv = argv.concat(RegExp.$1.split('').map(s => { return '-'+s }));
++  }
++  else argv.push(arg);
++});
++process.argv = argv;
++
+ if (process.argv.includes("ast")) program.helpInformation = describe_ast;
+ else if (process.argv.includes("options")) program.helpInformation = 
function() {
+ var text = [];
 @@ -62,10 +71,11 @@
- program.option("--warn", "Print warning messages.");
- program.option("--wrap ", "Embed everything as a function with 
“exports” corresponding to “name” globally.");
- program.arguments("[files...]").parseArgv(process.argv);
--if (program.configFile) {
--options = JSON.parse(read_file(program.configFile));
-+const opts = program.opts();
-+if (opts.configFile) {
-+options = JSON.parse(read_file(opts.configFile));
- }
--if (!program.output && program.sourceMap && program.sourceMap.url != 
"inline") {
-+if (!opts.output && opts.sourceMap && opts.sourceMap.url != "inline") {
- fatal("ERROR: cannot write source map to STDOUT");
- }
- [
-@@ -79,87 +89,87 @@
- "toplevel",
- "wrap"
- ].forEach(function(name) {
--if (name in program) {
--options[name] = program[name];
-+if (name in opts) {
-+options[name] = opts[name];
+ program.option("--toplevel", "Compress and/or mangle variables in 
toplevel scope.");
+ program.option("--wrap ", "Embed everything as a function with 
“exports” corresponding to “name” globally.");
+ program.arguments("[files...]").parseArgv(process.argv);
+-if (program.configFile) {
+-options = JSON.parse(read_file(program.configFile));
++const opts = program.opts();
++if (opts.configFile) {
++options = JSON.parse(read_file(opts.configFile));
+ }
+-if (!program.output && program.sourceMap && program.sourceMap.url != 
"inline") {
++if (!opts.output && opts.sourceMap && opts.sourceMap.url != "inline") {
+ fatal("ERROR: cannot write source map to STDOUT");
+ }
+ 
+@@ -80,76 +90,76 @@
+ "toplevel",
+ "wrap"
+ ].forEach(function(name) {
+-if (name in program) {
+-options[name] = program[name];
++if (name in opts) {
++options[name] = opts[name];
+ }
+ });
+ 
+-if ("ecma" in program) {
+-if (program.ecma != (program.ecma | 0)) fatal("ERROR: ecma must be an 
integer");
+-const ecma = program.ecma | 0;
++if ("ecma" in opts && opts.ecma != undefined) {
++if (opts.ecma != (opts.ecma | 0)) fatal("ERROR: ecma must be an 
integer");
++const ecma = opts.ecma | 0;
+ if (ecma > 5 && ecma < 2015)
+ options.ecma = ecma + 2009;
+ else
+ options.ecma = ecma;
+ }

Bug#1004471: Update node-terser to latest upstream (node-terser 5)

2022-01-28 Thread Caleb Adepitan

Source: node-terser
Version: 4.8.0-1
Severity: wishlist
User: pkg-javascript-de...@alioth-lists.debian.net
Usertags: webpack5

Update node-terser to v5 which is required by terser-webpack-plugin 
embededded in the webpack package.


The current version of node-terser breaks terser-webpack-plugin and 
consequently, webpack 5 due to breaking changes in node-terser.


Thanks,
Caleb Adepitan


OpenPGP_0x8A1B2CC96775D2D7.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature