@node-minify/uglify-es 6.4.0 → 7.1.0

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.
Files changed (2) hide show
  1. package/lib/uglify-es.js +1 -11
  2. package/package.json +4 -4
package/lib/uglify-es.js CHANGED
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  var _uglifyEs = _interopRequireDefault(require("uglify-es"));
4
-
5
4
  var _utils = require("@node-minify/utils");
6
-
7
5
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8
-
9
6
  /*!
10
7
  * node-minify
11
8
  * Copyright(c) 2011-2022 Rodolphe Stoclin
@@ -34,15 +31,12 @@ const minifyUglifyES = ({
34
31
  [settings.options.sourceMap.filename]: content
35
32
  };
36
33
  }
37
-
38
34
  const contentMinified = _uglifyEs.default.minify(content, settings.options);
39
-
40
35
  if (contentMinified.error) {
41
36
  if (callback) {
42
37
  return callback(contentMinified.error);
43
38
  }
44
39
  }
45
-
46
40
  if (contentMinified.map && settings.options.sourceMap) {
47
41
  _utils.utils.writeFile({
48
42
  file: `${settings.output}.map`,
@@ -50,7 +44,6 @@ const minifyUglifyES = ({
50
44
  index
51
45
  });
52
46
  }
53
-
54
47
  if (!settings.content) {
55
48
  _utils.utils.writeFile({
56
49
  file: settings.output,
@@ -58,16 +51,13 @@ const minifyUglifyES = ({
58
51
  index
59
52
  });
60
53
  }
61
-
62
54
  if (callback) {
63
55
  return callback(null, contentMinified.code);
64
56
  }
65
-
66
57
  return contentMinified.code;
67
58
  };
59
+
68
60
  /**
69
61
  * Expose `minifyUglifyES()`.
70
62
  */
71
-
72
-
73
63
  module.exports = minifyUglifyES;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-minify/uglify-es",
3
- "version": "6.4.0",
3
+ "version": "7.1.0",
4
4
  "description": "uglify-es plugin for @node-minify",
5
5
  "keywords": [
6
6
  "compressor",
@@ -13,7 +13,7 @@
13
13
  "license": "MIT",
14
14
  "main": "lib/uglify-es.js",
15
15
  "engines": {
16
- "node": ">=12.0.0"
16
+ "node": ">=14.0.0"
17
17
  },
18
18
  "directories": {
19
19
  "lib": "lib",
@@ -33,8 +33,8 @@
33
33
  "url": "https://github.com/srod/node-minify/issues"
34
34
  },
35
35
  "dependencies": {
36
- "@node-minify/utils": "^6.4.0",
36
+ "@node-minify/utils": "^7.1.0",
37
37
  "uglify-es": "3.3.9"
38
38
  },
39
- "gitHead": "d529747a661487597e9be510d3d9e2df1bc0f556"
39
+ "gitHead": "94cef2d5d653c3bddc3e603b4e25c135b0b6f4b3"
40
40
  }