terser 4.1.1 → 4.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of terser might be problematic. Click here for more details.

package/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Changelog
2
2
 
3
- ## v4.0.1
3
+
4
+ ## v4.1.2
5
+
6
+ - The hotfix was hotfixed
7
+
8
+ ## v4.1.1
4
9
 
5
10
  - Fixed a bug where toplevel scopes were being mixed up with lambda scopes
6
11
 
package/dist/bundle.js CHANGED
@@ -9356,7 +9356,7 @@
9356
9356
  CHANGED = true;
9357
9357
  stat = stat.clone();
9358
9358
  stat.alternative = next;
9359
- statements.splice(i, 1, stat.transform(compressor));
9359
+ statements[i] = stat.transform(compressor);
9360
9360
  statements.splice(j, 1);
9361
9361
  continue;
9362
9362
  }
@@ -9370,7 +9370,7 @@
9370
9370
  stat.alternative = next || make_node(AST_Return, stat, {
9371
9371
  value: null
9372
9372
  });
9373
- statements.splice(i, 1, stat.transform(compressor));
9373
+ statements[i] = stat.transform(compressor);
9374
9374
  if (next) statements.splice(j, 1);
9375
9375
  continue;
9376
9376
  }
@@ -9394,7 +9394,7 @@
9394
9394
  })
9395
9395
  ]
9396
9396
  });
9397
- statements.splice(i, 1, stat.transform(compressor));
9397
+ statements[i] = stat.transform(compressor);
9398
9398
  statements.splice(j, 1);
9399
9399
  continue;
9400
9400
  }
@@ -11372,7 +11372,7 @@
11372
11372
  // collect only vars which don't show up in self's arguments list
11373
11373
  var defs = [];
11374
11374
  const is_lambda = self instanceof AST_Lambda;
11375
- const args_as_names = self.args_as_names();
11375
+ const args_as_names = is_lambda ? self.args_as_names() : null;
11376
11376
  vars.forEach((def, name) => {
11377
11377
  if (is_lambda && args_as_names.some((x) => x.name === def.name.name)) {
11378
11378
  vars.delete(name);