terser 3.13.0 → 3.13.1

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/lib/compress.js CHANGED
@@ -2064,11 +2064,18 @@ merge(Compressor.prototype, {
2064
2064
  };
2065
2065
  if (!all(def.value.properties, diff)) break;
2066
2066
  var p = def.value.properties.filter(function (p) { return p.key === prop; })[0];
2067
- p.value = new AST_Sequence({
2068
- start: p.start,
2069
- expressions: [p.value, node.right],
2070
- end: p.end
2071
- });
2067
+ if (!p) {
2068
+ def.value.properties.push(make_node(AST_ObjectKeyVal, node, {
2069
+ key: prop,
2070
+ value: node.right
2071
+ }));
2072
+ } else {
2073
+ p.value = new AST_Sequence({
2074
+ start: p.start,
2075
+ expressions: [p.value.clone(), node.right.clone()],
2076
+ end: p.end
2077
+ });
2078
+ }
2072
2079
  exprs.shift();
2073
2080
  trimmed = true;
2074
2081
  } while (exprs.length);
package/lib/utils.js CHANGED
@@ -315,6 +315,7 @@ Dictionary.fromObject = function(obj) {
315
315
  dict._size = merge(dict._values, obj);
316
316
  return dict;
317
317
  };
318
+ exports.Dictionary = Dictionary;
318
319
 
319
320
  function HOP(obj, prop) {
320
321
  return Object.prototype.hasOwnProperty.call(obj, prop);
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "homepage": "https://github.com/fabiosantoscode/terser",
5
5
  "author": "Mihai Bazon <mihai.bazon@gmail.com> (http://lisperator.net/)",
6
6
  "license": "BSD-2-Clause",
7
- "version": "3.13.0",
7
+ "version": "3.13.1",
8
8
  "engines": {
9
9
  "node": ">=0.8.0"
10
10
  },