terser 4.6.3 → 4.6.7

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://terser.org",
5
5
  "author": "Mihai Bazon <mihai.bazon@gmail.com> (http://lisperator.net/)",
6
6
  "license": "BSD-2-Clause",
7
- "version": "4.6.3",
7
+ "version": "4.6.7",
8
8
  "engines": {
9
9
  "node": ">=6.0.0"
10
10
  },
@@ -32,17 +32,17 @@
32
32
  "source-map-support": "~0.5.12"
33
33
  },
34
34
  "devDependencies": {
35
- "acorn": "^7.0.0",
35
+ "acorn": "^7.1.1",
36
36
  "astring": "^1.4.1",
37
37
  "eslint": "^6.3.0",
38
38
  "eslump": "^2.0.0",
39
- "mocha": "^5.2.0",
39
+ "mocha": "^7.1.0",
40
40
  "mochallel": "^2.0.0",
41
41
  "pre-commit": "^1.2.2",
42
42
  "rimraf": "^3.0.0",
43
43
  "rollup": "^1.20.3",
44
- "rollup-plugin-terser": "^5.1.1",
45
- "semver": "^6.3.0"
44
+ "rollup-plugin-terser": "^5.3.0",
45
+ "semver": "^7.1.3"
46
46
  },
47
47
  "scripts": {
48
48
  "test": "npm run build -- --configTest && node test/run-tests.js",
@@ -102,6 +102,12 @@
102
102
  ],
103
103
  "no-debugger": "error",
104
104
  "no-undef": "error",
105
+ "no-unused-vars": [
106
+ "error",
107
+ {
108
+ "varsIgnorePattern": "^_$"
109
+ }
110
+ ],
105
111
  "no-tabs": "error",
106
112
  "semi": [
107
113
  "error",
package/tools/terser.d.ts CHANGED
@@ -63,6 +63,7 @@ export interface CompressOptions {
63
63
  unsafe_comps?: boolean;
64
64
  unsafe_Function?: boolean;
65
65
  unsafe_math?: boolean;
66
+ unsafe_symbols?: boolean;
66
67
  unsafe_methods?: boolean;
67
68
  unsafe_proto?: boolean;
68
69
  unsafe_regexp?: boolean;
@@ -101,7 +102,13 @@ export interface OutputOptions {
101
102
  ascii_only?: boolean;
102
103
  beautify?: boolean;
103
104
  braces?: boolean;
104
- comments?: boolean | 'all' | 'some' | RegExp | Function;
105
+ comments?: boolean | 'all' | 'some' | RegExp | ( (node: AST_Node, comment: {
106
+ value: string,
107
+ type: 'comment1' | 'comment2' | 'comment3' | 'comment4',
108
+ pos: number,
109
+ line: number,
110
+ col: number,
111
+ }) => boolean );
105
112
  ecma?: ECMA;
106
113
  ie8?: boolean;
107
114
  indent_level?: number;
@@ -121,6 +128,7 @@ export interface OutputOptions {
121
128
  webkit?: boolean;
122
129
  width?: number;
123
130
  wrap_iife?: boolean;
131
+ wrap_func_args?: boolean;
124
132
  }
125
133
 
126
134
  export enum OutputQuoteStyle {
@@ -156,7 +164,8 @@ export interface MinifyOutput {
156
164
  }
157
165
 
158
166
  export interface SourceMapOptions {
159
- content?: RawSourceMap;
167
+ /** Source map object, 'inline' or source map file content */
168
+ content?: RawSourceMap | string;
160
169
  includeSources?: boolean;
161
170
  filename?: string;
162
171
  root?: string;