terser 3.14.0-beta → 3.16.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/CHANGELOG.md +19 -0
- package/PATRONS.md +5 -0
- package/README.md +19 -26
- package/bin/uglifyjs +8 -10
- package/dist/bundle.js +21945 -0
- package/dist/bundle.js.map +1 -0
- package/dist/bundle.min.js +2 -0
- package/dist/bundle.min.js.map +1 -0
- package/package.json +22 -12
- package/tools/domprops.js +1 -1
- package/tools/node.js +3 -36
- package/lib/ast.js +0 -1260
- package/lib/compress.js +0 -6801
- package/lib/minify.js +0 -260
- package/lib/mozilla-ast.js +0 -1087
- package/lib/output.js +0 -1939
- package/lib/parse.js +0 -2986
- package/lib/propmangle.js +0 -267
- package/lib/scope.js +0 -723
- package/lib/sourcemap.js +0 -97
- package/lib/transform.js +0 -275
- package/lib/utils.js +0 -350
- package/tools/exports.js +0 -14
package/package.json
CHANGED
@@ -4,9 +4,9 @@
|
|
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
|
+
"version": "3.16.1",
|
8
8
|
"engines": {
|
9
|
-
"node": ">=0.
|
9
|
+
"node": ">=6.0.0"
|
10
10
|
},
|
11
11
|
"maintainers": [
|
12
12
|
"Fábio Santos <fabiosantosart@gmail.com>",
|
@@ -14,45 +14,51 @@
|
|
14
14
|
"Mihai Bazon <mihai.bazon@gmail.com> (http://lisperator.net/)"
|
15
15
|
],
|
16
16
|
"repository": "https://github.com/fabiosantoscode/terser.git",
|
17
|
-
"main": "dist/bundle.js",
|
17
|
+
"main": "dist/bundle.min.js",
|
18
18
|
"types": "tools/terser.d.ts",
|
19
19
|
"bin": {
|
20
20
|
"terser": "bin/uglifyjs"
|
21
21
|
},
|
22
22
|
"files": [
|
23
23
|
"bin",
|
24
|
-
"lib",
|
25
24
|
"dist",
|
26
25
|
"!dist/bundle.instrumented.js",
|
27
26
|
"tools",
|
28
|
-
"LICENSE"
|
27
|
+
"LICENSE",
|
28
|
+
"README.md",
|
29
|
+
"CHANGELOG.md",
|
30
|
+
"PATRONS.md"
|
29
31
|
],
|
30
32
|
"dependencies": {
|
31
33
|
"commander": "~2.17.1",
|
32
34
|
"source-map": "~0.6.1",
|
33
|
-
"source-map-support": "~0.5.
|
35
|
+
"source-map-support": "~0.5.9"
|
34
36
|
},
|
35
37
|
"devDependencies": {
|
36
38
|
"acorn": "^6.0.4",
|
37
39
|
"coveralls": "^3.0.2",
|
38
|
-
"
|
40
|
+
"cross-env": "^5.2.0",
|
41
|
+
"csv": "^5.1.0",
|
39
42
|
"es6-promise": "^4.2.5",
|
40
|
-
"escodegen": "^1.
|
43
|
+
"escodegen": "^1.11.0",
|
41
44
|
"eslint": "^4.19.1",
|
42
45
|
"eslump": "^2.0.0",
|
43
46
|
"istanbul": "^0.4.5",
|
44
47
|
"mocha": "^3.0.0",
|
45
|
-
"mochallel": "^1.8.
|
48
|
+
"mochallel": "^1.8.6",
|
46
49
|
"pre-commit": "^1.2.2",
|
47
|
-
"
|
50
|
+
"rimraf": "^2.6.2",
|
51
|
+
"rollup": "^1.0.1",
|
52
|
+
"semver": "~5.5.1"
|
48
53
|
},
|
49
54
|
"scripts": {
|
50
|
-
"test": "
|
55
|
+
"test": "rimraf dist/* && npm run prepare && istanbul instrument dist/bundle.min.js > dist/bundle.instrumented.js && node test/run-tests.js",
|
51
56
|
"coverage": "istanbul cover test/run-tests.js",
|
52
57
|
"coveralls": "coveralls < coverage/lcov.info",
|
53
58
|
"lint": "eslint lib",
|
54
59
|
"lint-fix": "eslint --fix lib",
|
55
|
-
"prepare": "cd dist && TERSER_NO_BUNDLE=1 ../bin/uglifyjs
|
60
|
+
"prepare": "rollup -c && cd dist && cross-env TERSER_NO_BUNDLE=1 ../bin/uglifyjs bundle.js -mc --source-map 'content=bundle.js.map,includeSources=true,url=bundle.min.js.map' -o bundle.min.js",
|
61
|
+
"postversion": "echo 'Remember to update the changelog!'"
|
56
62
|
},
|
57
63
|
"keywords": [
|
58
64
|
"uglify",
|
@@ -74,6 +80,9 @@
|
|
74
80
|
"await"
|
75
81
|
],
|
76
82
|
"eslintConfig": {
|
83
|
+
"parserOptions": {
|
84
|
+
"sourceType": "module"
|
85
|
+
},
|
77
86
|
"rules": {
|
78
87
|
"brace-style": [
|
79
88
|
"error",
|
@@ -88,6 +97,7 @@
|
|
88
97
|
"avoid-escape"
|
89
98
|
],
|
90
99
|
"no-debugger": "error",
|
100
|
+
"no-undef": "error",
|
91
101
|
"semi": [
|
92
102
|
"error",
|
93
103
|
"always"
|
package/tools/domprops.js
CHANGED
package/tools/node.js
CHANGED
@@ -1,41 +1,8 @@
|
|
1
1
|
var fs = require("fs");
|
2
2
|
|
3
|
-
var
|
4
|
-
var
|
5
|
-
|
6
|
-
"../lib/utils.js",
|
7
|
-
"../lib/ast.js",
|
8
|
-
"../lib/parse.js",
|
9
|
-
"../lib/transform.js",
|
10
|
-
"../lib/scope.js",
|
11
|
-
"../lib/output.js",
|
12
|
-
"../lib/compress.js",
|
13
|
-
"../lib/sourcemap.js",
|
14
|
-
"../lib/mozilla-ast.js",
|
15
|
-
"../lib/propmangle.js",
|
16
|
-
"../lib/minify.js",
|
17
|
-
"./exports.js",
|
18
|
-
].map(function(file){
|
19
|
-
return require.resolve(file);
|
20
|
-
});
|
21
|
-
|
22
|
-
try {
|
23
|
-
var istanbul = require("istanbul");
|
24
|
-
var instrumenter = new istanbul.Instrumenter();
|
25
|
-
} catch (ex) {}
|
26
|
-
|
27
|
-
new Function("MOZ_SourceMap", "exports", "require", function() {
|
28
|
-
var code = FILES.map(function(file) {
|
29
|
-
var contents = fs.readFileSync(file, "utf8");
|
30
|
-
if (instrumenter && global.__IS_TESTING__) return instrumenter.instrumentSync(contents, file);
|
31
|
-
return contents;
|
32
|
-
});
|
33
|
-
return code.join("\n\n");
|
34
|
-
}())(
|
35
|
-
require("source-map"),
|
36
|
-
UglifyJS,
|
37
|
-
require
|
38
|
-
);
|
3
|
+
var bundle_path = __dirname + "/../dist/bundle.js";
|
4
|
+
var UglifyJS = require(bundle_path);
|
5
|
+
module.exports = UglifyJS;
|
39
6
|
|
40
7
|
function infer_options(options) {
|
41
8
|
var result = UglifyJS.minify("", options);
|