mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-02 20:00:05 +02:00
update modules
This commit is contained in:
71
node_modules/terser/CHANGELOG.md
generated
vendored
71
node_modules/terser/CHANGELOG.md
generated
vendored
@@ -1,5 +1,76 @@
|
||||
# Changelog
|
||||
|
||||
## v4.8.0
|
||||
|
||||
- Support for numeric separators (`million = 1_000_000`) was added.
|
||||
- Assigning properties to a class is now assumed to be pure.
|
||||
- Fixed bug where `yield` wasn't considered a valid property key in generators.
|
||||
|
||||
## v4.7.0
|
||||
|
||||
- A bug was fixed where an arrow function would have the wrong size
|
||||
- `arguments` object is now considered safe to retrieve properties from (useful for `length`, or `0`) even when `pure_getters` is not set.
|
||||
- Fixed erroneous `const` declarations without value (which is invalid) in some corner cases when using `collapse_vars`.
|
||||
|
||||
## v4.6.13
|
||||
|
||||
- Fixed issue where ES5 object properties were being turned into ES6 object properties due to more lax unicode rules.
|
||||
- Fixed parsing of BigInt with lowercase `e` in them.
|
||||
|
||||
## v4.6.12
|
||||
|
||||
- Fixed subtree comparison code, making it see that `[1,[2, 3]]` is different from `[1, 2, [3]]`
|
||||
- Printing of unicode identifiers has been improved
|
||||
|
||||
## v4.6.11
|
||||
|
||||
- Read unused classes' properties and method keys, to figure out if they use other variables.
|
||||
- Prevent inlining into block scopes when there are name collisions
|
||||
- Functions are no longer inlined into parameter defaults, because they live in their own special scope.
|
||||
- When inlining identity functions, take into account the fact they may be used to drop `this` in function calls.
|
||||
- Nullish coalescing operator (`x ?? y`), plus basic optimization for it.
|
||||
- Template literals in binary expressions such as `+` have been further optimized
|
||||
|
||||
## v4.6.10
|
||||
|
||||
- Do not use reduce_vars when classes are present
|
||||
|
||||
## v4.6.9
|
||||
|
||||
- Check if block scopes actually exist in blocks
|
||||
|
||||
## v4.6.8
|
||||
|
||||
- Take into account "executed bits" of classes like static properties or computed keys, when checking if a class evaluation might throw or have side effects.
|
||||
|
||||
## v4.6.7
|
||||
|
||||
- Some new performance gains through a `AST_Node.size()` method which measures a node's source code length without printing it to a string first.
|
||||
- An issue with setting `--comments` to `false` in the CLI has been fixed.
|
||||
- Fixed some issues with inlining
|
||||
- `unsafe_symbols` compress option was added, which turns `Symbol("name")` into just `Symbol()`
|
||||
- Brought back compress performance improvement through the `AST_Node.equivalent_to(other)` method (which was reverted in v4.6.6).
|
||||
|
||||
## v4.6.6
|
||||
|
||||
(hotfix release)
|
||||
|
||||
- Reverted code to 4.6.4 to allow for more time to investigate an issue.
|
||||
|
||||
## v4.6.5 (REVERTED)
|
||||
|
||||
- Improved compress performance through using a new method to see if two nodes are equivalent, instead of printing them to a string.
|
||||
|
||||
## v4.6.4
|
||||
|
||||
- The `"some"` value in the `comments` output option now preserves `@lic` and other important comments when using `//`
|
||||
- `</script>` is now better escaped in regex, and in comments, when using the `inline_script` output option
|
||||
- Fixed an issue when transforming `new RegExp` into `/.../` when slashes are included in the source
|
||||
- `AST_Node.prototype.constructor` now exists, allowing for easier debugging of crashes
|
||||
- Multiple if statements with the same consequents are now collapsed
|
||||
- Typescript typings improvements
|
||||
- Optimizations while looking for surrogate pairs in strings
|
||||
|
||||
## v4.6.3
|
||||
|
||||
- Annotations such as `/*#__NOINLINE__*/` and `/*#__PURE__*/` may now be preserved using the `preserve_annotations` output option
|
||||
|
32
node_modules/terser/README.md
generated
vendored
32
node_modules/terser/README.md
generated
vendored
@@ -90,10 +90,9 @@ a double dash to prevent input files being used as option arguments:
|
||||
`reserved` List of names that should not be mangled.
|
||||
--mangle-props [options] Mangle properties/specify mangler options:
|
||||
`builtins` Mangle property names that overlaps
|
||||
with standard JavaScript globals.
|
||||
with standard JavaScript globals and DOM
|
||||
API props.
|
||||
`debug` Add debug prefix and suffix.
|
||||
`domprops` Mangle property names that overlaps
|
||||
with DOM properties.
|
||||
`keep_quoted` Only mangle unquoted properties, quoted
|
||||
properties are automatically reserved.
|
||||
`strict` disables quoted properties
|
||||
@@ -133,7 +132,7 @@ a double dash to prevent input files being used as option arguments:
|
||||
sequences.
|
||||
--config-file <file> Read `minify()` options from JSON file.
|
||||
-d, --define <expr>[=value] Global definitions.
|
||||
--ecma <version> Specify ECMAScript release: 5, 6, 7 or 8.
|
||||
--ecma <version> Specify ECMAScript release: 5, 2015, 2016, etc.
|
||||
-e, --enclose [arg[:value]] Embed output in a big function with configurable
|
||||
arguments and values.
|
||||
--ie8 Support non-standard Internet Explorer 8.
|
||||
@@ -321,12 +320,8 @@ $ terser example.js -c passes=2 -m --mangle-props regex=/_$/,reserved=[bar_]
|
||||
var x={o:3,t:1,calc:function(){return this.t+this.o},bar_:2};console.log(x.calc());
|
||||
```
|
||||
|
||||
In order for this to be of any use, we avoid mangling standard JS names by
|
||||
default (`--mangle-props builtins` to override).
|
||||
|
||||
A default exclusion file is provided in `tools/domprops.js` which should
|
||||
cover most standard JS and DOM properties defined in various browsers. Pass
|
||||
`--mangle-props domprops` to disable this feature.
|
||||
In order for this to be of any use, we avoid mangling standard JS names and DOM
|
||||
API properties by default (`--mangle-props builtins` to override).
|
||||
|
||||
A regular expression can be used to define which property names should be
|
||||
mangled. For example, `--mangle-props regex=/^_/` will only mangle property
|
||||
@@ -534,7 +529,7 @@ if (result.error) throw result.error;
|
||||
|
||||
## Minify options
|
||||
|
||||
- `ecma` (default `undefined`) - pass `5`, `2015`, `2016` or `2017` to override `parse`,
|
||||
- `ecma` (default `undefined`) - pass `5`, `2015`, `2016`, etc to override `parse`,
|
||||
`compress` and `output`'s `ecma` options.
|
||||
|
||||
- `warnings` (default `false`) — pass `true` to return compressor warnings
|
||||
@@ -611,7 +606,7 @@ if (result.error) throw result.error;
|
||||
sourceMap: {
|
||||
// source map options
|
||||
},
|
||||
ecma: 5, // specify one of: 5, 2015, 2016, 2017 or 2018
|
||||
ecma: 5, // specify one of: 5, 2015, 2016, etc.
|
||||
keep_classnames: false,
|
||||
keep_fnames: false,
|
||||
ie8: false,
|
||||
@@ -686,6 +681,10 @@ If you happen to need the source map as a raw object, set `sourceMap.asObject` t
|
||||
|
||||
## Compress options
|
||||
|
||||
- `defaults` (default: `true`) -- Pass `false` to disable most default
|
||||
enabled `compress` transforms. Useful when you only want to enable a few
|
||||
`compress` options while disabling the rest.
|
||||
|
||||
- `arrows` (default: `true`) -- Class and object literal methods are converted
|
||||
will also be converted to arrow expressions if the resultant code is shorter:
|
||||
`m(){return x}` becomes `m:()=>x`. To do this to regular ES5 functions which
|
||||
@@ -715,10 +714,6 @@ If you happen to need the source map as a raw object, set `sourceMap.asObject` t
|
||||
|
||||
- `dead_code` (default: `true`) -- remove unreachable code
|
||||
|
||||
- `defaults` (default: `true`) -- Pass `false` to disable most default
|
||||
enabled `compress` transforms. Useful when you only want to enable a few
|
||||
`compress` options while disabling the rest.
|
||||
|
||||
- `directives` (default: `true`) -- remove redundant or non-standard directives
|
||||
|
||||
- `drop_console` (default: `false`) -- Pass `true` to discard calls to
|
||||
@@ -865,6 +860,9 @@ If you happen to need the source map as a raw object, set `sourceMap.asObject` t
|
||||
- `unsafe_math` (default: `false`) -- optimize numerical expressions like
|
||||
`2 * x * 3` into `6 * x`, which may give imprecise floating point results.
|
||||
|
||||
- `unsafe_symbols` (default: `false`) -- removes keys from native Symbol
|
||||
declarations, e.g `Symbol("kDog")` becomes `Symbol()`.
|
||||
|
||||
- `unsafe_methods` (default: false) -- Converts `{ m: function(){} }` to
|
||||
`{ m(){} }`. `ecma` must be set to `6` or greater to enable this transform.
|
||||
If `unsafe_methods` is a RegExp then key/value pairs with keys matching the
|
||||
@@ -1318,6 +1316,8 @@ To allow for better optimizations, the compiler makes various assumptions:
|
||||
- Object properties can be added, removed and modified (not prevented with
|
||||
`Object.defineProperty()`, `Object.defineProperties()`, `Object.freeze()`,
|
||||
`Object.preventExtensions()` or `Object.seal()`).
|
||||
- `document.all` is not `== null`
|
||||
- Assigning properties to a class doesn't have side effects and does not throw.
|
||||
|
||||
### Build Tools and Adaptors using Terser
|
||||
|
||||
|
3
node_modules/terser/bin/terser
generated
vendored
3
node_modules/terser/bin/terser
generated
vendored
@@ -99,7 +99,7 @@ if (program.beautify) {
|
||||
}
|
||||
if (program.comments) {
|
||||
if (typeof options.output != "object") options.output = {};
|
||||
options.output.comments = typeof program.comments == "string" ? program.comments : "some";
|
||||
options.output.comments = typeof program.comments == "string" ? (program.comments == "false" ? false : program.comments) : "some";
|
||||
}
|
||||
if (program.define) {
|
||||
if (typeof options.compress != "object") options.compress = {};
|
||||
@@ -281,6 +281,7 @@ function run() {
|
||||
result.enclosed = value.block_scope.enclosed;
|
||||
}
|
||||
value.CTOR.PROPS.forEach(function(prop) {
|
||||
if (prop === "block_scope") return;
|
||||
result[prop] = value[prop];
|
||||
});
|
||||
return result;
|
||||
|
2
node_modules/terser/dist/bundle.min.js
generated
vendored
2
node_modules/terser/dist/bundle.min.js
generated
vendored
File diff suppressed because one or more lines are too long
2
node_modules/terser/dist/bundle.min.js.map
generated
vendored
2
node_modules/terser/dist/bundle.min.js.map
generated
vendored
File diff suppressed because one or more lines are too long
38
node_modules/terser/package.json
generated
vendored
38
node_modules/terser/package.json
generated
vendored
@@ -1,27 +1,27 @@
|
||||
{
|
||||
"_from": "terser@^4.6.3",
|
||||
"_id": "terser@4.6.3",
|
||||
"_from": "terser@^4.8.0",
|
||||
"_id": "terser@4.8.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-Lw+ieAXmY69d09IIc/yqeBqXpEQIpDGZqT34ui1QWXIUpR2RjbqEkT8X7Lgex19hslSqcWM5iMN2kM11eMsESQ==",
|
||||
"_integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==",
|
||||
"_location": "/terser",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "terser@^4.6.3",
|
||||
"raw": "terser@^4.8.0",
|
||||
"name": "terser",
|
||||
"escapedName": "terser",
|
||||
"rawSpec": "^4.6.3",
|
||||
"rawSpec": "^4.8.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^4.6.3"
|
||||
"fetchSpec": "^4.8.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/terser/-/terser-4.6.3.tgz",
|
||||
"_shasum": "e33aa42461ced5238d352d2df2a67f21921f8d87",
|
||||
"_spec": "terser@^4.6.3",
|
||||
"_where": "F:\\projects\\p\\minifyfromhtml",
|
||||
"_resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz",
|
||||
"_shasum": "63056343d7c70bb29f3af665865a46fe03a0df17",
|
||||
"_spec": "terser@^4.8.0",
|
||||
"_where": "D:\\Projects\\minifyfromhtml",
|
||||
"author": {
|
||||
"name": "Mihai Bazon",
|
||||
"email": "mihai.bazon@gmail.com",
|
||||
@@ -42,17 +42,17 @@
|
||||
"deprecated": false,
|
||||
"description": "JavaScript parser, mangler/compressor and beautifier toolkit for ES6+",
|
||||
"devDependencies": {
|
||||
"acorn": "^7.0.0",
|
||||
"acorn": "^7.1.1",
|
||||
"astring": "^1.4.1",
|
||||
"eslint": "^6.3.0",
|
||||
"eslump": "^2.0.0",
|
||||
"mocha": "^5.2.0",
|
||||
"mocha": "^7.1.2",
|
||||
"mochallel": "^2.0.0",
|
||||
"pre-commit": "^1.2.2",
|
||||
"rimraf": "^3.0.0",
|
||||
"rollup": "^1.20.3",
|
||||
"rollup-plugin-terser": "^5.1.1",
|
||||
"semver": "^6.3.0"
|
||||
"rollup": "2.0.6",
|
||||
"rollup-plugin-terser": "5.3.0",
|
||||
"semver": "^7.1.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
@@ -86,6 +86,12 @@
|
||||
],
|
||||
"no-debugger": "error",
|
||||
"no-undef": "error",
|
||||
"no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
"varsIgnorePattern": "^_$"
|
||||
}
|
||||
],
|
||||
"no-tabs": "error",
|
||||
"semi": [
|
||||
"error",
|
||||
@@ -156,5 +162,5 @@
|
||||
"test:mocha": "npm run build -- --configTest && node test/mocha.js"
|
||||
},
|
||||
"types": "tools/terser.d.ts",
|
||||
"version": "4.6.3"
|
||||
"version": "4.8.0"
|
||||
}
|
||||
|
7
node_modules/terser/tools/postinstall.js
generated
vendored
7
node_modules/terser/tools/postinstall.js
generated
vendored
@@ -1,7 +0,0 @@
|
||||
if (process.env.CI || process.env.ADBLOCK || process.env.DISABLE_OPENCOLLECTIVE) return;
|
||||
|
||||
console.log(
|
||||
`###########################################################
|
||||
# contribute to Terser! https://opencollective.com/terser #
|
||||
###########################################################
|
||||
`)
|
15
node_modules/terser/tools/terser.d.ts
generated
vendored
15
node_modules/terser/tools/terser.d.ts
generated
vendored
@@ -3,7 +3,7 @@
|
||||
import { RawSourceMap } from 'source-map';
|
||||
|
||||
/** @deprecated since this versions basically do not exist */
|
||||
type ECMA_UNOFFICIAL = 6 | 7 | 8 | 9;
|
||||
type ECMA_UNOFFICIAL = 6 | 7 | 8 | 9 | 10 | 11;
|
||||
|
||||
export type ECMA = 5 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | ECMA_UNOFFICIAL;
|
||||
|
||||
@@ -63,6 +63,7 @@ export interface CompressOptions {
|
||||
unsafe_comps?: boolean;
|
||||
unsafe_Function?: boolean;
|
||||
unsafe_math?: boolean;
|
||||
unsafe_symbols?: boolean;
|
||||
unsafe_methods?: boolean;
|
||||
unsafe_proto?: boolean;
|
||||
unsafe_regexp?: boolean;
|
||||
@@ -101,7 +102,13 @@ export interface OutputOptions {
|
||||
ascii_only?: boolean;
|
||||
beautify?: boolean;
|
||||
braces?: boolean;
|
||||
comments?: boolean | 'all' | 'some' | RegExp | Function;
|
||||
comments?: boolean | 'all' | 'some' | RegExp | ( (node: AST_Node, comment: {
|
||||
value: string,
|
||||
type: 'comment1' | 'comment2' | 'comment3' | 'comment4',
|
||||
pos: number,
|
||||
line: number,
|
||||
col: number,
|
||||
}) => boolean );
|
||||
ecma?: ECMA;
|
||||
ie8?: boolean;
|
||||
indent_level?: number;
|
||||
@@ -121,6 +128,7 @@ export interface OutputOptions {
|
||||
webkit?: boolean;
|
||||
width?: number;
|
||||
wrap_iife?: boolean;
|
||||
wrap_func_args?: boolean;
|
||||
}
|
||||
|
||||
export enum OutputQuoteStyle {
|
||||
@@ -156,7 +164,8 @@ export interface MinifyOutput {
|
||||
}
|
||||
|
||||
export interface SourceMapOptions {
|
||||
content?: RawSourceMap;
|
||||
/** Source map object, 'inline' or source map file content */
|
||||
content?: RawSourceMap | string;
|
||||
includeSources?: boolean;
|
||||
filename?: string;
|
||||
root?: string;
|
||||
|
Reference in New Issue
Block a user