terser 3.10.7 → 3.10.8

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/dist/bundle.js CHANGED
@@ -8871,8 +8871,15 @@
8871
8871
  self = if_break_in_loop(self, compressor);
8872
8872
  }
8873
8873
  }
8874
+ function use_increment(self) {
8875
+ if (self.step instanceof AST_Assign && "+=" === self.step.operator && self.step.left instanceof AST_Symbol && "1" === self.step.right.print_to_string()) self.step = make_node(AST_UnaryPrefix, self.step, {
8876
+ operator: "++",
8877
+ expression: self.step.left
8878
+ });
8879
+ }
8874
8880
  OPT(AST_For, function(self, compressor) {
8875
8881
  if (!compressor.option("loops")) return self;
8882
+ use_increment(self);
8876
8883
  if (compressor.option("side_effects") && self.init) self.init = self.init.drop_side_effect_free(compressor);
8877
8884
  if (self.condition) {
8878
8885
  var cond = self.condition.evaluate(compressor);