Projekt

Obecné

Profil

Stáhnout (11.6 KB) Statistiky
| Větev: | Revize:
1 3a515b92 cagy
# Changelog
2
3
## v4.6.10
4
5
 - Do not use reduce_vars when classes are present
6
7
## v4.6.9
8
9
 - Check if block scopes actually exist in blocks
10
11
## v4.6.8
12
13
 - 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.
14
15
## v4.6.7
16
17
 - 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.
18
 - An issue with setting `--comments` to `false` in the CLI has been fixed.
19
 - Fixed some issues with inlining
20
 - `unsafe_symbols` compress option was added, which turns `Symbol("name")` into just `Symbol()`
21
 - Brought back compress performance improvement through the `AST_Node.equivalent_to(other)` method (which was reverted in v4.6.6).
22
23
## v4.6.6
24
25
(hotfix release)
26
27
 - Reverted code to 4.6.4 to allow for more time to investigate an issue.
28
29
## v4.6.5 (REVERTED)
30
31
 - Improved compress performance through using a new method to see if two nodes are equivalent, instead of printing them to a string.
32
33
## v4.6.4
34
35
 - The `"some"` value in the `comments` output option now preserves `@lic` and other important comments when using `//`
36
 - `</script>` is now better escaped in regex, and in comments, when using the `inline_script` output option
37
 - Fixed an issue when transforming `new RegExp` into `/.../` when slashes are included in the source
38
 - `AST_Node.prototype.constructor` now exists, allowing for easier debugging of crashes
39
 - Multiple if statements with the same consequents are now collapsed
40
 - Typescript typings improvements
41
 - Optimizations while looking for surrogate pairs in strings
42
43
## v4.6.3
44
45
 - Annotations such as `/*#__NOINLINE__*/` and `/*#__PURE__*/` may now be preserved using the `preserve_annotations` output option
46
 - A TypeScript definition update for the `keep_quoted` output option.
47
48
## v4.6.2
49
50
 - A bug where functions were inlined into other functions with scope conflicts has been fixed.
51
 - `/*#__NOINLINE__*/` annotation fixed for more use cases where inlining happens.
52
53
## v4.6.1
54
55
 - Fixed an issue where a class is duplicated by reduce_vars when there's a recursive reference to the class.
56
57
## v4.6.0
58
59
 - Fixed issues with recursive class references.
60
 - BigInt evaluation has been prevented, stopping Terser from evaluating BigInts like it would do regular numbers.
61
 - Class property support has been added
62
63
## v4.5.1
64
65
(hotfix release)
66
67
 - Fixed issue where `() => ({})[something]` was not parenthesised correctly.
68
69
## v4.5.0
70
71
 - Inlining has been improved
72
 - An issue where keep_fnames combined with functions declared through variables was causing name shadowing has been fixed
73
 - You can now set the ES version through their year
74
 - The output option `keep_numbers` has been added, which prevents Terser from turning `1000` into `1e3` and such
75
 - Internal small optimisations and refactors
76
77
## v4.4.3
78
79
 - Number and BigInt parsing has been fixed
80
 - `/*#__INLINE__*/` annotation fixed for arrow functions with non-block bodies.
81
 - Functional tests have been added, using [this repository](https://github.com/terser/terser-functional-tests).
82
 - A memory leak, where the entire AST lives on after compression, has been plugged.
83
84
## v4.4.2
85
86
 - Fixed a problem with inlining identity functions
87
88
## v4.4.1
89
90
*note:* This introduced a feature, therefore it should have been a minor release.
91
92
 - Fixed a crash when `unsafe` was enabled.
93
 - An issue has been fixed where `let` statements might be collapsed out of their scope.
94
 - Some error messages have been improved by adding quotes around variable names.
95
96
## v4.4.0
97
98
 - Added `/*#__INLINE__*/` and `/*#__NOINLINE__*/` annotations for calls. If a call has one of these, it either forces or forbids inlining.
99
100
## v4.3.11
101
102
 - Fixed a problem where `window` was considered safe to access, even though there are situations where it isn't (Node.js, workers...)
103
 - Fixed an error where `++` and `--` were considered side-effect free
104
 - `Number(x)` now needs both `unsafe` and and `unsafe_math` to be compressed into `+x` because `x` might be a `BigInt`
105
 - `keep_fnames` now correctly supports regexes when the function is in a variable declaration
106
107
## v4.3.10
108
109
 - Fixed syntax error when repeated semicolons were encountered in classes
110
 - Fixed invalid output caused by the creation of empty sequences internally
111
 - Scopes are now updated when scopes are inlined into them
112
113
## v4.3.9
114
 - Fixed issue with mangle's `keep_fnames` option, introduced when adding code to keep variable names of anonymous functions
115
116
## v4.3.8
117
118
 - Typescript typings fix
119
120
## v4.3.7
121
122
 - Parsing of regex options in the CLI (which broke in v4.3.5) was fixed.
123
 - typescript definition updates
124
125
## v4.3.6
126
127
(crash hotfix)
128
129
## v4.3.5
130
131
 - Fixed an issue with DOS line endings strings separated by `\` and a new line.
132
 - Improved fix for the output size regression related to unused references within the extends section of a class.
133
 - Variable names of anonymous functions (eg: `const x = () => { ... }` or `var func = function () {...}`) are now preserved when keep_fnames is true.
134
 - Fixed performance degradation introduced for large payloads in v4.2.0
135
136
## v4.3.4
137
138
 - Fixed a regression where the output size was increased when unused classes were referred to in the extends clause of a class.
139
 - Small typescript typings fixes.
140
 - Comments with `@preserve`, `@license`, `@cc_on` as well as comments starting with `/*!` and `/**!` are now preserved by default.
141
142
## v4.3.3
143
144
 - Fixed a problem where parsing template strings would mix up octal notation and a slash followed by a zero representing a null character.
145
 - Started accepting the name `async` in destructuring arguments with default value.
146
 - Now Terser takes into account side effects inside class `extends` clauses.
147
 - Added parens whenever there's a comment between a return statement and the returned value, to prevent issues with ASI.
148
 - Stopped using raw RegExp objects, since the spec is going to continue to evolve. This ensures Terser is able to process new, unknown RegExp flags and features. This is a breaking change in the AST node AST_RegExp.
149
150
## v4.3.2
151
152
 - Typescript typing fix
153
 - Ensure that functions can't be inlined, by reduce_vars, into places where they're accessing variables with the same name, but from somewhere else.
154
155
## v4.3.1
156
157
 - Fixed an issue from 4.3.0 where any block scope within a for loop erroneously had its parent set to the function scopee
158
 - Fixed an issue where compressing IIFEs with argument expansions would result in some parameters becoming undefined
159
 - addEventListener options argument's properties are now part of the DOM properties list.
160
161
## v4.3.0
162
163
 - Do not drop computed object keys with side effects
164
 - Functions passed to other functions in calls are now wrapped in parentheses by default, which speeds up loading most modules
165
 - Objects with computed properties are now less likely to be hoisted
166
 - Speed and memory efficiency optimizations
167
 - Fixed scoping issues with `try` and `switch`
168
169
## v4.2.1
170
171
 - Minor refactors
172
 - Fixed a bug similar to #369 in collapse_vars
173
 - Functions can no longer be inlined into a place where they're going to be compared with themselves.
174
 - reduce_funcs option is now legacy, as using reduce_vars without reduce_funcs caused some weird corner cases. As a result, it is now implied in reduce_vars and can't be turned off without turning off reduce_vars.
175
 - Bug which would cause a random stack overflow has now been fixed.
176
177
## v4.2.0
178
179
 - When the source map URL is `inline`, don't write it to a file.
180
 - Fixed output parens when a lambda literal is the tag on a tagged template string.
181
 - The `mangle.properties.undeclared` option was added. This enables the property mangler to mangle properties of variables which can be found in the name cache, but whose properties are not known to this Terser run.
182
 - The v8 bug where the toString and source representations of regexes like `RegExp("\\\n")` includes an actual newline is now fixed.
183
 - Now we're guaranteed to not have duplicate comments in the output
184
 - Domprops updates
185
186
## v4.1.4
187
188
 - Fixed a crash when inlining a function into somewhere else when it has interdependent, non-removable variables.
189
190
## v4.1.3
191
192
 - Several issues with the `reduce_vars` option were fixed.
193
 - Starting this version, we only have a dist/bundle.min.js
194
195
## v4.1.2
196
197
 - The hotfix was hotfixed
198
199
## v4.1.1
200
201
 - Fixed a bug where toplevel scopes were being mixed up with lambda scopes
202
203
## v4.1.0
204
205
 - Internal functions were replaced by `Object.assign`, `Array.prototype.some`, `Array.prototype.find` and `Array.prototype.every`.
206
 - A serious issue where some ESM-native code was broken was fixed.
207
 - Performance improvements were made.
208
 - Support for BigInt was added.
209
 - Inline efficiency was improved. Functions are now being inlined more proactively instead of being inlined only after another Compressor pass.
210
211
## v4.0.2
212
213
(Hotfix release. Reverts unmapped segments PR [#342](https://github.com/terser/terser/pull/342), which will be put back on Terser when the upstream issue is resolved)
214
215
## v4.0.1
216
217
 - Collisions between the arguments of inlined functions and names in the outer scope are now being avoided while inlining
218
 - Unmapped segments are now preserved when compressing a file which has source maps
219
 - Default values of functions are now correctly converted from Mozilla AST to Terser AST
220
 - JSON ⊂ ECMAScript spec (if you don't know what this is you don't need to)
221
 - Export AST_* classes to library users
222
 - Fixed issue with `collapse_vars` when functions are created with the same name as a variable which already exists
223
 - Added `MutationObserverInit` (Object with options for initialising a mutation observer) properties to the DOM property list
224
 - Custom `Error` subclasses are now internally used instead of old-school Error inheritance hacks.
225
 - Documentation fixes
226
 - Performance optimizations
227
228
## v4.0.0
229
230
 - **breaking change**: The `variables` property of all scopes has become a standard JavaScript `Map` as opposed to the old bespoke `Dictionary` object.
231
 - Typescript definitions were fixed
232
 - `terser --help` was fixed
233
 - The public interface was cleaned up
234
 - Fixed optimisation of `Array` and `new Array`
235
 - Added the `keep_quoted=strict` mode to mangle_props, which behaves more like Google Closure Compiler by mangling all unquoted property names, instead of reserving quoted property names automatically.
236
 - Fixed parent functions' parameters being shadowed in some cases
237
 - Allowed Terser to run in a situation where there are custom functions attached to Object.prototype
238
 - And more bug fixes, optimisations and internal changes
239
240
## v3.17.0
241
242
 - More DOM properties added to --mangle-properties's DOM property list
243
 - Closed issue where if 2 functions had the same argument name, Terser would not inline them together properly
244
 - Fixed issue with `hasOwnProperty.call`
245
 - You can now list files to minify in a Terser config file
246
 - Started replacing `new Array(<number>)` with an array literal
247
 - Started using ES6 capabilities like `Set` and the `includes` method for strings and arrays
248
249
## v3.16.1
250
251
 - Fixed issue where Terser being imported with `import` would cause it not to work due to the `__esModule` property. (PR #254 was submitted, which was nice, but since it wasn't a pure commonJS approach I decided to go with my own solution)
252
253
## v3.16.0
254
255
 - No longer leaves names like Array or Object or window as a SimpleStatement (statement which is just a single expression).
256
 - Add support for sections sourcemaps (IndexedSourceMapConsumer)
257
 - Drops node.js v4 and starts using commonJS
258
 - Is now built with rollup
259
260
## v3.15.0
261
262
 - Inlined spread syntax (`[...[1, 2, 3], 4, 5] => [1, 2, 3, 4, 5]`) in arrays and objects.
263
 - Fixed typo in compressor warning
264
 - Fixed inline source map input bug
265
 - Fixed parsing of template literals with unnecessary escapes (Like `\\a`)