terser 3.7.6 → 3.8.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/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.7.6",
7
+ "version": "3.8.1",
8
8
  "engines": {
9
9
  "node": ">=0.8.0"
10
10
  },
@@ -15,27 +15,35 @@
15
15
  ],
16
16
  "repository": "https://github.com/fabiosantoscode/terser.git",
17
17
  "main": "tools/node.js",
18
+ "browser": "dist/browser.bundle.js",
18
19
  "bin": {
19
20
  "terser": "bin/uglifyjs"
20
21
  },
21
22
  "files": [
22
23
  "bin",
23
24
  "lib",
25
+ "dist",
24
26
  "tools",
25
27
  "LICENSE"
26
28
  ],
27
29
  "dependencies": {
28
- "commander": "~2.14.1",
29
- "source-map": "~0.6.1"
30
+ "commander": "~2.16.0",
31
+ "source-map": "~0.6.1",
32
+ "source-map-support": "~0.5.6"
30
33
  },
31
34
  "devDependencies": {
32
- "acorn": "~5.4.1",
35
+ "acorn": "~5.7.1",
33
36
  "escodegen": "^1.9.1",
37
+ "eslint": "^4.19.1",
34
38
  "mocha": "~3.5.1",
39
+ "pre-commit": "^1.2.2",
35
40
  "semver": "~5.5.0"
36
41
  },
37
42
  "scripts": {
38
- "test": "node test/run-tests.js"
43
+ "test": "node test/run-tests.js",
44
+ "lint": "eslint lib",
45
+ "lint-fix": "eslint --fix lib",
46
+ "prepublish": "node bin/uglifyjs lib/utils.js lib/ast.js lib/parse.js lib/transform.js lib/scope.js lib/output.js lib/compress.js lib/sourcemap.js lib/mozilla-ast.js lib/propmangle.js lib/minify.js tools/exports.js -c defaults=false -d \"MOZ_SourceMap=require('source-map')\" --source-map \"includeSources=true,url='browser.bundle.js.map'\" -e \"exports:(typeof module != 'undefined' ? module.exports : Terser = {})\" -b ascii_only --comments /license/ -o dist/browser.bundle.js"
39
47
  },
40
48
  "keywords": [
41
49
  "uglify",
@@ -55,5 +63,26 @@
55
63
  "es2017",
56
64
  "async",
57
65
  "await"
58
- ]
66
+ ],
67
+ "eslintConfig": {
68
+ "rules": {
69
+ "quotes": [
70
+ "error",
71
+ "double",
72
+ "avoid-escape"
73
+ ],
74
+ "no-debugger": "error",
75
+ "semi": [
76
+ "error",
77
+ "always"
78
+ ],
79
+ "no-extra-semi": "error",
80
+ "no-irregular-whitespace": "error",
81
+ "space-before-blocks": [
82
+ "error",
83
+ "always"
84
+ ]
85
+ }
86
+ },
87
+ "pre-commit": "lint"
59
88
  }
@@ -1,8 +1,9 @@
1
1
  "use strict"
2
2
 
3
- var Console = require("console").Console;
3
+ var semver = require("semver");
4
4
 
5
- if (process.version.slice(0, 3) === "v10") {
5
+ if (semver.satisfies(process.version, ">=10")) {
6
+ var Console = require("console").Console;
6
7
  global.console = new Console({
7
8
  stdout: process.stdout,
8
9
  stderr: process.stderr,
package/tools/exports.js CHANGED
@@ -1,6 +1,6 @@
1
1
  exports["Dictionary"] = Dictionary;
2
- exports["TreeWalker"] = TreeWalker;
3
- exports["TreeTransformer"] = TreeTransformer;
4
2
  exports["minify"] = minify;
5
3
  exports["parse"] = parse;
6
- exports["_push_uniq"] = push_uniq;
4
+ exports["push_uniq"] = push_uniq;
5
+ exports["TreeTransformer"] = TreeTransformer;
6
+ exports["TreeWalker"] = TreeWalker;