terser 5.0.0 → 5.3.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.
- package/CHANGELOG.md +23 -0
- package/LICENSE +1 -1
- package/README.md +2 -6
- package/dist/bundle.min.js +2538 -97
- package/dist/bundle.min.js.map +1 -1
- package/lib/ast.js +28 -4
- package/lib/compress/index.js +179 -66
- package/lib/equivalent-to.js +3 -0
- package/lib/minify.js +5 -1
- package/lib/mozilla-ast.js +40 -3
- package/lib/output.js +18 -3
- package/lib/parse.js +107 -15
- package/lib/size.js +15 -4
- package/package.json +3 -2
- package/tools/domprops.js +2152 -1
- package/tools/terser.d.ts +2 -3
package/tools/terser.d.ts
CHANGED
@@ -98,7 +98,7 @@ export interface FormatOptions {
|
|
98
98
|
ascii_only?: boolean;
|
99
99
|
beautify?: boolean;
|
100
100
|
braces?: boolean;
|
101
|
-
comments?: boolean | 'all' | 'some' | RegExp | ( (node:
|
101
|
+
comments?: boolean | 'all' | 'some' | RegExp | ( (node: any, comment: {
|
102
102
|
value: string,
|
103
103
|
type: 'comment1' | 'comment2' | 'comment3' | 'comment4',
|
104
104
|
pos: number,
|
@@ -151,7 +151,6 @@ export interface MinifyOptions {
|
|
151
151
|
}
|
152
152
|
|
153
153
|
export interface MinifyOutput {
|
154
|
-
ast?: AST_Node;
|
155
154
|
code?: string;
|
156
155
|
map?: RawSourceMap | string;
|
157
156
|
}
|
@@ -165,4 +164,4 @@ export interface SourceMapOptions {
|
|
165
164
|
url?: string | 'inline';
|
166
165
|
}
|
167
166
|
|
168
|
-
export
|
167
|
+
export function minify(files: string | string[] | { [file: string]: string }, options?: MinifyOptions): Promise<MinifyOutput>;
|