source: frontend/node_modules/terser/CHANGELOG.md

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 33.8 KB
Line 
1# Changelog
2
3## v5.48.0
4
5 - Support `import source ...` and `import defer ...` (#1682)
6
7## v5.47.1
8
9 - Fix crash when using `mangle.keep_fnames` with destructuring
10
11## v5.47.0
12
13 - Add `builtins_ecma` and `builtins_pure` options
14 - Add Intl options to domprops (#1680)
15
16## v5.46.2
17
18 - `unused` option: delete computed keys of concise methods and getters/setters.
19 - `Error.cause` added to DOM properties list
20 - Don't consider `foo.bar` and `foo["bar"]` to be equivalent when property mangler is enabled with `keep_quoted=strict` option.
21
22## v5.46.1
23
24 - Fix extremely slow (seemed like a freeze) `evaluate` of method chains
25 - Parse extremely large floating-point number literals as `Infinity`
26 - Remove parens from comma expressions in computed property access (`foo[(1, 2)]`)
27
28## v5.46.0
29
30 - Add "observedAttributes" domprop (#1652)
31 - More domprops (mostly `Temporal` related) suggested in #1652
32
33## v5.45.0
34
35 - Produce `void 0` instead of `undefined`, which is more safe
36
37## v5.44.1
38
39 - fix bitwise optimization changing the result of `&&`, `||`
40 - switches: make sure `var` is extracted from a deleted default case
41
42## v5.44.0
43
44 - Support `using` and `await using` declarations (#1635)
45
46## v5.43.1
47
48 - Prevent niche optimizations that would move around block declarations
49 - Add `lhs_constants` to `CompressOptions` type (#1621)
50
51## v5.43.0
52
53 - Do not wrap callbacks in parentheses (`wrap_func_args` format option is now false by default)
54 - Do not inline functions into for loops (for performance reasons)
55
56## v5.42.0
57
58 - Improved performance in the parse step by adding a fast path for simple identifiers.
59 - Improved ESTree conversion
60
61## v5.41.0
62
63 - fixed semicolon insertion between class fields, when the field names are number literals
64 - `keep_numbers` format option now works for bigint
65 - internal: correctly mark accessors' is_generator property
66 - internal: do not read or assign quote properties without need
67 - internal: add missing equivalent_to comparison
68
69## v5.40.0
70
71 - Fix exporting AssignmentExpression (default assign pattern) to ESTree
72 - Fix ESTree output of object keys with quotes
73 - Fix handling of an ESTree empty `export {}` (#1601)
74 - Fix some `const` and `let` resulting from ESTree input (#1599)
75
76## v5.39.2
77
78 - Fix crash when parsing bare `yield` inside a template string.
79 - Update internally used acorn version requirement
80
81## v5.39.1
82
83 - Fix bitwise operations that could mix `BigInt` and `number`
84
85## v5.39.0
86
87 - Remove unnecessary `console.assert` calls (#1590)
88
89## v5.38.2
90
91 - internal: Flatten inheritance tree for object/class members
92
93## v5.38.1
94
95 - Fix inlining non-call expressions into an `optional_call?.()`
96
97## v5.38.0
98
99 - Remove `console` method-of-method calls (eg `console.log.apply()`) when `drop_console` option is used (#1585)
100 - Remove more object spreads, such as `{ ...void !0 }` (#1142)
101
102## v5.37.0
103
104 - Reserved object properties from chrome extensions (domprops)
105 - Fix semicolon insertion between a class property without a semicolon `a` and a computed class property `["prop"]`
106
107## v5.36.0
108
109 - Support import attributes `with` syntax
110
111## v5.35.0
112
113 - Ensure parent directory exists when using --output on CLI (#1530)
114
115## v5.34.1
116
117 - bump the rollup devDependency to disable CVE warnings (Terser was not affected)
118
119## v5.34.0
120
121 - internal: stop assigning properties to objects they don't belong in
122 - internal: run compress tests in parallel
123 - `drop_console`: emit an empty function if the return value of `console.METHOD(...)` may be called.
124
125## v5.33.0
126
127 - `reduce_vars` improved when dealing with hoisted function definitions (#1544)
128
129## v5.32.0
130
131 - `import("module")` can now be input and output from ESTree AST (#1557)
132 - `BigInt` literals can now be input and output from ESTree AST (#1555)
133 - `typeof` an object or array (`typeof {}` and `typeof []`) can now be statically evaluated. (#1546)
134
135## v5.31.6
136 - Retain side effects in a `case` when the expression is a sequence (comma) expression
137
138## v5.31.5
139 - Revert v5.31.4, which created mysterious issues #1548, #1549
140
141## v5.31.4 (reverted)
142 - drop_unused: drop classes which only have side effects in the `extends` part
143
144## v5.31.3
145 - drop_unused: drop unused parameters from IIFEs in some more situations.
146
147## v5.31.2
148 - drop_unused: scan variables in self-referential class declarations that contain side effects.
149 - Don't add parens to arrow function when it's the default for an argument (#1540)
150 - Update domprops (#1538)
151
152## v5.31.1
153 - Allow drop-unused to drop the whole assignment (not just the assigned name) in more situations, in order to avoid duplication of long strings.
154
155## v5.31.0
156 - Sync up property mangler exceptions with current contents of Firefox and Chrome environments
157 - Add more webcomponent properties to property mangler exceptions (#1525)
158 - Drop non-nullish constants in `...spreads` in objects (#1141)
159
160## v5.30.4
161 - Fix parsing `#private in ...` when next to other operators
162
163## v5.30.3
164 - Fix precedence of `#private in ...` operator
165
166## v5.30.2
167 - Avoid optimizations inside computed keys, because they can cause js-engine-specific bugs.
168
169## v5.30.1
170 - Removed useless `\` escapes for non-ascii characters
171 - Make modern identifier characters quoted for older environments (#1512)
172
173## v5.30.0
174 - Improve removal of classes referring to themselves
175
176## v5.29.2
177 - Make sure 'computed_props' creates string keys
178 - Take into account the evaluated size when inlining
179
180## v5.29.1
181 - fix optimisation of all-bits mask check
182
183## v5.29.0
184 - Re-releases previously reverted 5.28.0
185 - Fix crash while optimizing some bitwise ops
186 - (internal) Remove needless wrapper for from_moz (#1499)
187
188## v5.28.1
189(hotfix release)
190 - Reverts v5.28.0
191
192## v5.28.0
193 - Optimise redundant or shrinkable bitwise operations (`|`, `^`, `&`, `>>`, `<<`)
194 - Evaluate some `BigInt` math operations
195
196## v5.27.2
197 - Recognise `this` as a reference to the surrounding class in `drop_unused`. Closes #1472
198
199## v5.27.1
200 - Fixed case where `collapse_vars` inlines `await` expressions into non-async functions.
201
202## v5.27.0
203 - Created `minify_sync()` alternative to `minify()` since there's no async code left.
204
205## v5.26.0
206 - Do not take the `/*#__PURE__*/` annotation into account when the `side_effects` compress option is off.
207 - The `preserve_annotations` option now automatically opts annotation comments in, instead of requiring the `comments` option to be configured for this.
208 - Refuse to parse empty parenthesized expressions (`()`)
209
210## v5.25.0
211 - Regex properties added to reserved property mangler (#1471)
212 - `pure_new` option added to drop unused `new` expressions.
213
214## v5.24.0
215 - Improve formatting performance in V8 by keeping a small work string and a large output string
216
217## v5.23.0
218 - When top_retain will keep a variable assignment around, inline the assignee when it's shorter than the name (#1434)
219 - Remove empty class `static {}` blocks.
220
221## v5.22.0
222 - Do not `unsafe`ly shorten expressions like a?.toString() when they're conditional.
223 - Avoid running drop_unused in nodes that aren't scopes. Fixes a rare crash.
224 - When 'module' is enabled, assume strict mode when figuring out scopes.
225
226## v5.21.0
227 - Do not inline functions that would be retained in the toplevel (as this would cause code duplication).
228 - Fix precedence of arrow function and ternary operator when formatting output.
229
230## v5.20.0
231 - Passing `minify()` zero files will now throw a clean exception (#1450)
232 - `drop_console` supports passing in an array of `console.*` method names (#1445)
233 - New DOM properties from the WebGPU API have been added for use in the property mangler (#1436)
234 - Internal code simplification (#1437)
235
236## v5.19.4
237 - Prevent creating very deeply nested ternaries from a long list of `if..return`
238 - Prevent inlining classes into other functions, to avoid constructors being compared.
239
240## v5.19.3
241 - Fix side effect detection of `optional?.chains`.
242 - Add roundRect to domprops.js (#1426)
243
244## v5.19.2
245 - fix performance hit from avoiding HTML comments in the output
246
247## v5.19.1
248 - Better avoid outputting `</script>` and HTML comments.
249 - Fix unused variables in class static blocks not being dropped correctly.
250 - Fix sourcemap names of methods that are `async` or `static`
251
252## v5.19.0
253 - Allow `/*@__MANGLE_PROP__*/` annotation in `object.property`, in addition to property declarations.
254
255## v5.18.2
256 - Stop using recursion in hoisted defuns fix.
257
258## v5.18.1
259 - Fix major performance issue caused by hoisted defuns' scopes bugfix.
260
261## v5.18.0
262 - Add new `/*@__MANGLE_PROP__*/` annotation, to mark properties that should be mangled.
263
264## v5.17.7
265 - Update some dependencies
266 - Add consistent sorting for `v` RegExp flag
267 - Add `inert` DOM attribute to domprops
268
269## v5.17.6
270 - Fixes to mozilla AST input and output, for class properties, private properties and static blocks
271 - Fix outputting a shorthand property in quotes when safari10 and ecma=2015 options are enabled
272 - `configurable` and `enumerable`, used in Object.defineProperty, added to domprops (#1393)
273
274## v5.17.5
275 - Take into account the non-deferred bits of a class, such as static properties, while dropping unused code.
276
277## v5.17.4
278
279 - Fix crash when trying to negate a class (`!class{}`)
280 - Avoid outputting comments between `yield`/`await` and its argument
281 - Fix detection of left-hand-side of assignment, to avoid optimizing it like any other expression in some edge cases
282
283## v5.17.3
284
285 - Fix issue with trimming a static class property's contents accessing the class as `this`.
286
287## v5.17.2
288 - Be less conservative when detecting use-before-definition of `var` in hoisted functions.
289 - Support unusual (but perfectly valid) initializers of for-in and for-of loops.
290 - Fix issue where hoisted function would be dropped if it was after a `continue` statement
291
292## v5.17.1
293 - Fix evaluating `.length` when the source array might've been mutated
294
295## v5.17.0
296 - Drop vestigial `= undefined` default argument in IIFE calls (#1366)
297 - Evaluate known arrays' `.length` property when statically determinable
298 - Add `@__KEY__` annotation to mangle string literals (#1365)
299
300## v5.16.9
301 - Fix parentheses in output of optional chains (`a?.b`) (#1374)
302 - More documentation on source maps (#1368)
303 - New `lhs_constants` option, allowing to stop Terser from swapping comparison operands (#1361)
304
305## v5.16.8
306
307 - Become even less conservative around function definitions for `reduce_vars`
308 - Fix parsing context of `import.meta` expressions such that method calls are allowed
309
310## v5.16.6
311
312 - Become less conservative with analyzing function definitions for `reduce_vars`
313 - Parse `import.meta` as a real AST node and not an `object.property`
314
315## v5.16.5
316
317 - Correctly handle AST transform functions that mutate children arrays
318 - Don't mutate the options object passed to Terser (#1342)
319 - Do not treat BigInt like a number
320
321## v5.16.4
322
323 - Keep `(defaultArg = undefined) => ...`, because default args don't count for function length
324 - Prevent inlining variables into `?.` optional chains
325 - Avoid removing unused arguments while transforming
326 - Optimize iterating AST node lists
327 - Make sure `catch` and `finally` aren't children of `try` in the AST
328 - Use modern unicode property escapes (`\p{...}`) to parse identifiers when available
329
330## v5.16.3
331
332 - Ensure function definitions, don't assume the values of variables defined after them.
333
334## v5.16.2
335
336 - Fix sourcemaps with non-ascii characters (#1318)
337 - Support string module name and export * as (#1336)
338 - Do not move `let` out of `for` initializers, as it can change scoping
339 - Fix a corner case that would generate the invalid syntax `if (something) let x` ("let" in braceless if body)
340 - Knowledge of more native object properties (#1330)
341 - Got rid of Travis (#1323)
342 - Added semi-secret `asObject` sourcemap option to typescript defs (#1321)
343
344## v5.16.1
345
346 - Properly handle references in destructurings (`const { [reference]: val } = ...`)
347 - Allow parsing of `.#privatefield` in nested classes
348 - Do not evaluate operations that return large strings if that would make the output code larger
349 - Make `collapse_vars` handle block scope correctly
350 - Internal improvements: Typos (#1311), more tests, small-scale refactoring
351
352## v5.16.0
353
354 - Disallow private fields in object bodies (#1011)
355 - Parse `#privatefield in object` (#1279)
356 - Compress `#privatefield in object`
357
358## v5.15.1
359
360 - Fixed missing parentheses around optional chains
361 - Avoid bare `let` or `const` as the bodies of `if` statements (#1253)
362 - Small internal fixes (#1271)
363 - Avoid inlining a class twice and creating two equivalent but `!==` classes.
364
365## v5.15.0
366 - Basic support for ES2022 class static initializer blocks.
367 - Add `AudioWorkletNode` constructor options to domprops list (#1230)
368 - Make identity function inliner not inline `id(...expandedArgs)`
369
370## v5.14.2
371
372 - Security fix for RegExps that should not be evaluated (regexp DDOS)
373 - Source maps improvements (#1211)
374 - Performance improvements in long property access evaluation (#1213)
375
376## v5.14.1
377 - keep_numbers option added to TypeScript defs (#1208)
378 - Fixed parsing of nested template strings (#1204)
379
380## v5.14.0
381 - Switched to @jridgewell/source-map for sourcemap generation (#1190, #1181)
382 - Fixed source maps with non-terminated segments (#1106)
383 - Enabled typescript types to be imported from the package (#1194)
384 - Extra DOM props have been added (#1191)
385 - Delete the AST while generating code, as a means to save RAM
386
387## v5.13.1
388 - Removed self-assignments (`varname=varname`) (closes #1081)
389 - Separated inlining code (for inlining things into references, or removing IIFEs)
390 - Allow multiple identifiers with the same name in `var` destructuring (eg `var { a, a } = x`) (#1176)
391
392## v5.13.0
393
394 - All calls to eval() were removed (#1171, #1184)
395 - `source-map` was updated to 0.8.0-beta.0 (#1164)
396 - NavigatorUAData was added to domprops to avoid property mangling (#1166)
397
398## v5.12.1
399
400 - Fixed an issue with function definitions inside blocks (#1155)
401 - Fixed parens of `new` in some situations (closes #1159)
402
403## v5.12.0
404
405 - `TERSER_DEBUG_DIR` environment variable
406 - @copyright comments are now preserved with the comments="some" option (#1153)
407
408## v5.11.0
409
410 - Unicode code point escapes (`\u{abcde}`) are not emitted inside RegExp literals anymore (#1147)
411 - acorn is now a regular dependency
412
413## v5.10.0
414
415 - Massive optimization to max_line_len (#1109)
416 - Basic support for import assertions
417 - Marked ES2022 Object.hasOwn as a pure function
418 - Fix `delete optional?.property`
419 - New CI/CD pipeline with github actions (#1057)
420 - Fix reordering of switch branches (#1092), (#1084)
421 - Fix error when creating a class property called `get`
422 - Acorn dependency is now an optional peerDependency
423 - Fix mangling collision with exported variables (#1072)
424 - Fix an issue with `return someVariable = (async () => { ... })()` (#1073)
425
426## v5.9.0
427
428 - Collapsing switch cases with the same bodies (even if they're not next to each other) (#1070).
429 - Fix evaluation of optional chain expressions (#1062)
430 - Fix mangling collision in ESM exports (#1063)
431 - Fix issue with mutating function objects after a second pass (#1047)
432 - Fix for inlining object spread `{ ...obj }` (#1071)
433 - Typescript typings fix (#1069)
434
435## v5.8.0
436
437 - Fixed shadowing variables while moving code in some cases (#1065)
438 - Stop mangling computed & quoted properties when keep_quoted is enabled.
439 - Fix for mangling private getter/setter and .#private access (#1060, #1068)
440 - Array.from has a new optimization when the unsafe option is set (#737)
441 - Mangle/propmangle let you generate your own identifiers through the nth_identifier option (#1061)
442 - More optimizations to switch statements (#1044)
443
444## v5.7.2
445
446 - Fixed issues with compressing functions defined in `global_defs` option (#1036)
447 - New recipe for using Terser in gulp was added to RECIPES.md (#1035)
448 - Fixed issues with `??` and `?.` (#1045)
449 - Future reserved words such as `package` no longer require you to disable strict mode to be used as names.
450 - Refactored huge compressor file into multiple more focused files.
451 - Avoided unparenthesized `in` operator in some for loops (it breaks parsing because of for..in loops)
452 - Improved documentation (#1021, #1025)
453 - More type definitions (#1021)
454
455## v5.7.1
456
457 - Avoided collapsing assignments together if it would place a chain assignment on the left hand side, which is invalid syntax (`a?.b = c`)
458 - Removed undefined from object expansions (`{ ...void 0 }` -> `{}`)
459 - Fix crash when checking if something is nullish or undefined (#1009)
460 - Fixed comparison of private class properties (#1015)
461 - Minor performance improvements (#993)
462 - Fixed scope of function defs in strict mode (they are block scoped)
463
464## v5.7.0
465
466 - Several compile-time evaluation and inlining fixes
467 - Allow `reduce_funcs` to be disabled again.
468 - Add `spidermonkey` options to parse and format (#974)
469 - Accept `{get = "default val"}` and `{set = "default val"}` in destructuring arguments.
470 - Change package.json export map to help require.resolve (#971)
471 - Improve docs
472 - Fix `export default` of an anonymous class with `extends`
473
474## v5.6.1
475
476 - Mark assignments to the `.prototype` of a class as pure
477 - Parenthesize `await` on the left of `**` (while accepting legacy non-parenthesised input)
478 - Avoided outputting NUL bytes in optimized RegExps, to stop the output from breaking other tools
479 - Added `exports` to domprops (#939)
480 - Fixed a crash when spreading `...this`
481 - Fixed the computed size of arrow functions, which improves their inlining
482
483## v5.6.0
484
485 - Added top-level await
486 - Beautify option has been removed in #895
487 - Private properties, getters and setters have been added in #913 and some more commits
488 - Docs improvements: #896, #903, #916
489
490## v5.5.1
491
492 - Fixed object properties with unicode surrogates on safari.
493
494## v5.5.0
495
496 - Fixed crash when inlining uninitialized variable into template string.
497 - The sourcemap for dist was removed for being too large.
498
499## v5.4.0
500
501 - Logical assignment
502 - Change `let x = undefined` to just `let x`
503 - Removed some optimizations for template strings, placing them behind `unsafe` options. Reason: adding strings is not equivalent to template strings, due to valueOf differences.
504 - The AST_Token class was slimmed down in order to use less memory.
505
506## v5.3.8
507
508 - Restore node 13 support
509
510## v5.3.7
511
512Hotfix release, fixes package.json "engines" syntax
513
514## v5.3.6
515
516 - Fixed parentheses when outputting `??` mixed with `||` and `&&`
517 - Improved hygiene of the symbol generator
518
519## v5.3.5
520
521 - Avoid moving named functions into default exports.
522 - Enabled transform() for chain expressions. This allows AST transformers to reach inside chain expressions.
523
524## v5.3.4
525
526 - Fixed a crash when hoisting (with `hoist_vars`) a destructuring variable declaration
527
528## v5.3.3
529
530 - `source-map` library has been updated, bringing memory usage and CPU time improvements when reading input source maps (the SourceMapConsumer is now WASM based).
531 - The `wrap_func_args` option now also wraps arrow functions, as opposed to only function expressions.
532
533## v5.3.2
534
535 - Prevented spread operations from being expanded when the expanded array/object contains getters, setters, or array holes.
536 - Fixed _very_ slow self-recursion in some cases of removing extraneous parentheses from `+` operations.
537
538## v5.3.1
539
540 - An issue with destructuring declarations when `pure_getters` is enabled has been fixed
541 - Fixed a crash when chain expressions need to be shallowly compared
542 - Made inlining functions more conservative to make sure a function that contains a reference to itself isn't moved into a place that can create multiple instances of itself.
543
544## v5.3.0
545
546 - Fixed a crash when compressing object spreads in some cases
547 - Fixed compiletime evaluation of optional chains (caused typeof a?.b to always return "object")
548 - domprops has been updated to contain every single possible prop
549
550## v5.2.1
551
552 - The parse step now doesn't accept an `ecma` option, so that all ES code is accepted.
553 - Optional dotted chains now accept keywords, just like dotted expressions (`foo?.default`)
554
555## v5.2.0
556
557 - Optional chaining syntax is now supported.
558 - Consecutive await expressions don't have unnecessary parens
559 - Taking the variable name's length (after mangling) into consideration when deciding to inline
560
561## v5.1.0
562
563 - `import.meta` is now supported
564 - Typescript typings have been improved
565
566## v5.0.0
567
568 - `in` operator now taken into account during property mangle.
569 - Fixed infinite loop in face of a reference loop in some situations.
570 - Kept exports and imports around even if there's something which will throw before them.
571 - The main exported bundle for commonjs, dist/bundle.min.js is no longer minified.
572
573## v5.0.0-beta.0
574
575 - BREAKING: `minify()` is now async and rejects a promise instead of returning an error.
576 - BREAKING: Internal AST is no longer exposed, so that it can be improved without releasing breaking changes.
577 - BREAKING: Lowest supported node version is 10
578 - BREAKING: There are no more warnings being emitted
579 - Module is now distributed as a dual package - You can `import` and `require()` too.
580 - Inline improvements were made
581
582
583-----
584
585## v4.8.1 (backport)
586
587 - Security fix for RegExps that should not be evaluated (regexp DDOS)
588
589## v4.8.0
590
591 - Support for numeric separators (`million = 1_000_000`) was added.
592 - Assigning properties to a class is now assumed to be pure.
593 - Fixed bug where `yield` wasn't considered a valid property key in generators.
594
595## v4.7.0
596
597 - A bug was fixed where an arrow function would have the wrong size
598 - `arguments` object is now considered safe to retrieve properties from (useful for `length`, or `0`) even when `pure_getters` is not set.
599 - Fixed erroneous `const` declarations without value (which is invalid) in some corner cases when using `collapse_vars`.
600
601## v4.6.13
602
603 - Fixed issue where ES5 object properties were being turned into ES6 object properties due to more lax unicode rules.
604 - Fixed parsing of BigInt with lowercase `e` in them.
605
606## v4.6.12
607
608 - Fixed subtree comparison code, making it see that `[1,[2, 3]]` is different from `[1, 2, [3]]`
609 - Printing of unicode identifiers has been improved
610
611## v4.6.11
612
613 - Read unused classes' properties and method keys, to figure out if they use other variables.
614 - Prevent inlining into block scopes when there are name collisions
615 - Functions are no longer inlined into parameter defaults, because they live in their own special scope.
616 - When inlining identity functions, take into account the fact they may be used to drop `this` in function calls.
617 - Nullish coalescing operator (`x ?? y`), plus basic optimization for it.
618 - Template literals in binary expressions such as `+` have been further optimized
619
620## v4.6.10
621
622 - Do not use reduce_vars when classes are present
623
624## v4.6.9
625
626 - Check if block scopes actually exist in blocks
627
628## v4.6.8
629
630 - 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.
631
632## v4.6.7
633
634 - 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.
635 - An issue with setting `--comments` to `false` in the CLI has been fixed.
636 - Fixed some issues with inlining
637 - `unsafe_symbols` compress option was added, which turns `Symbol("name")` into just `Symbol()`
638 - Brought back compress performance improvement through the `AST_Node.equivalent_to(other)` method (which was reverted in v4.6.6).
639
640## v4.6.6
641
642(hotfix release)
643
644 - Reverted code to 4.6.4 to allow for more time to investigate an issue.
645
646## v4.6.5 (REVERTED)
647
648 - Improved compress performance through using a new method to see if two nodes are equivalent, instead of printing them to a string.
649
650## v4.6.4
651
652 - The `"some"` value in the `comments` output option now preserves `@lic` and other important comments when using `//`
653 - `</script>` is now better escaped in regex, and in comments, when using the `inline_script` output option
654 - Fixed an issue when transforming `new RegExp` into `/.../` when slashes are included in the source
655 - `AST_Node.prototype.constructor` now exists, allowing for easier debugging of crashes
656 - Multiple if statements with the same consequents are now collapsed
657 - Typescript typings improvements
658 - Optimizations while looking for surrogate pairs in strings
659
660## v4.6.3
661
662 - Annotations such as `/*#__NOINLINE__*/` and `/*#__PURE__*/` may now be preserved using the `preserve_annotations` output option
663 - A TypeScript definition update for the `keep_quoted` output option.
664
665## v4.6.2
666
667 - A bug where functions were inlined into other functions with scope conflicts has been fixed.
668 - `/*#__NOINLINE__*/` annotation fixed for more use cases where inlining happens.
669
670## v4.6.1
671
672 - Fixed an issue where a class is duplicated by reduce_vars when there's a recursive reference to the class.
673
674## v4.6.0
675
676 - Fixed issues with recursive class references.
677 - BigInt evaluation has been prevented, stopping Terser from evaluating BigInts like it would do regular numbers.
678 - Class property support has been added
679
680## v4.5.1
681
682(hotfix release)
683
684 - Fixed issue where `() => ({})[something]` was not parenthesised correctly.
685
686## v4.5.0
687
688 - Inlining has been improved
689 - An issue where keep_fnames combined with functions declared through variables was causing name shadowing has been fixed
690 - You can now set the ES version through their year
691 - The output option `keep_numbers` has been added, which prevents Terser from turning `1000` into `1e3` and such
692 - Internal small optimisations and refactors
693
694## v4.4.3
695
696 - Number and BigInt parsing has been fixed
697 - `/*#__INLINE__*/` annotation fixed for arrow functions with non-block bodies.
698 - Functional tests have been added, using [this repository](https://github.com/terser/terser-functional-tests).
699 - A memory leak, where the entire AST lives on after compression, has been plugged.
700
701## v4.4.2
702
703 - Fixed a problem with inlining identity functions
704
705## v4.4.1
706
707*note:* This introduced a feature, therefore it should have been a minor release.
708
709 - Fixed a crash when `unsafe` was enabled.
710 - An issue has been fixed where `let` statements might be collapsed out of their scope.
711 - Some error messages have been improved by adding quotes around variable names.
712
713## v4.4.0
714
715 - Added `/*#__INLINE__*/` and `/*#__NOINLINE__*/` annotations for calls. If a call has one of these, it either forces or forbids inlining.
716
717## v4.3.11
718
719 - Fixed a problem where `window` was considered safe to access, even though there are situations where it isn't (Node.js, workers...)
720 - Fixed an error where `++` and `--` were considered side-effect free
721 - `Number(x)` now needs both `unsafe` and and `unsafe_math` to be compressed into `+x` because `x` might be a `BigInt`
722 - `keep_fnames` now correctly supports regexes when the function is in a variable declaration
723
724## v4.3.10
725
726 - Fixed syntax error when repeated semicolons were encountered in classes
727 - Fixed invalid output caused by the creation of empty sequences internally
728 - Scopes are now updated when scopes are inlined into them
729
730## v4.3.9
731 - Fixed issue with mangle's `keep_fnames` option, introduced when adding code to keep variable names of anonymous functions
732
733## v4.3.8
734
735 - Typescript typings fix
736
737## v4.3.7
738
739 - Parsing of regex options in the CLI (which broke in v4.3.5) was fixed.
740 - typescript definition updates
741
742## v4.3.6
743
744(crash hotfix)
745
746## v4.3.5
747
748 - Fixed an issue with DOS line endings strings separated by `\` and a new line.
749 - Improved fix for the output size regression related to unused references within the extends section of a class.
750 - Variable names of anonymous functions (eg: `const x = () => { ... }` or `var func = function () {...}`) are now preserved when keep_fnames is true.
751 - Fixed performance degradation introduced for large payloads in v4.2.0
752
753## v4.3.4
754
755 - Fixed a regression where the output size was increased when unused classes were referred to in the extends clause of a class.
756 - Small typescript typings fixes.
757 - Comments with `@preserve`, `@license`, `@cc_on` as well as comments starting with `/*!` and `/**!` are now preserved by default.
758
759## v4.3.3
760
761 - Fixed a problem where parsing template strings would mix up octal notation and a slash followed by a zero representing a null character.
762 - Started accepting the name `async` in destructuring arguments with default value.
763 - Now Terser takes into account side effects inside class `extends` clauses.
764 - Added parens whenever there's a comment between a return statement and the returned value, to prevent issues with ASI.
765 - 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.
766
767## v4.3.2
768
769 - Typescript typing fix
770 - 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.
771
772## v4.3.1
773
774 - Fixed an issue from 4.3.0 where any block scope within a for loop erroneously had its parent set to the function scopee
775 - Fixed an issue where compressing IIFEs with argument expansions would result in some parameters becoming undefined
776 - addEventListener options argument's properties are now part of the DOM properties list.
777
778## v4.3.0
779
780 - Do not drop computed object keys with side effects
781 - Functions passed to other functions in calls are now wrapped in parentheses by default, which speeds up loading most modules
782 - Objects with computed properties are now less likely to be hoisted
783 - Speed and memory efficiency optimizations
784 - Fixed scoping issues with `try` and `switch`
785
786## v4.2.1
787
788 - Minor refactors
789 - Fixed a bug similar to #369 in collapse_vars
790 - Functions can no longer be inlined into a place where they're going to be compared with themselves.
791 - 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.
792 - Bug which would cause a random stack overflow has now been fixed.
793
794## v4.2.0
795
796 - When the source map URL is `inline`, don't write it to a file.
797 - Fixed output parens when a lambda literal is the tag on a tagged template string.
798 - 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.
799 - The v8 bug where the toString and source representations of regexes like `RegExp("\\\n")` includes an actual newline is now fixed.
800 - Now we're guaranteed to not have duplicate comments in the output
801 - Domprops updates
802
803## v4.1.4
804
805 - Fixed a crash when inlining a function into somewhere else when it has interdependent, non-removable variables.
806
807## v4.1.3
808
809 - Several issues with the `reduce_vars` option were fixed.
810 - Starting this version, we only have a dist/bundle.min.js
811
812## v4.1.2
813
814 - The hotfix was hotfixed
815
816## v4.1.1
817
818 - Fixed a bug where toplevel scopes were being mixed up with lambda scopes
819
820## v4.1.0
821
822 - Internal functions were replaced by `Object.assign`, `Array.prototype.some`, `Array.prototype.find` and `Array.prototype.every`.
823 - A serious issue where some ESM-native code was broken was fixed.
824 - Performance improvements were made.
825 - Support for BigInt was added.
826 - Inline efficiency was improved. Functions are now being inlined more proactively instead of being inlined only after another Compressor pass.
827
828## v4.0.2
829
830(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)
831
832## v4.0.1
833
834 - Collisions between the arguments of inlined functions and names in the outer scope are now being avoided while inlining
835 - Unmapped segments are now preserved when compressing a file which has source maps
836 - Default values of functions are now correctly converted from Mozilla AST to Terser AST
837 - JSON ⊂ ECMAScript spec (if you don't know what this is you don't need to)
838 - Export AST_* classes to library users
839 - Fixed issue with `collapse_vars` when functions are created with the same name as a variable which already exists
840 - Added `MutationObserverInit` (Object with options for initialising a mutation observer) properties to the DOM property list
841 - Custom `Error` subclasses are now internally used instead of old-school Error inheritance hacks.
842 - Documentation fixes
843 - Performance optimizations
844
845## v4.0.0
846
847 - **breaking change**: The `variables` property of all scopes has become a standard JavaScript `Map` as opposed to the old bespoke `Dictionary` object.
848 - Typescript definitions were fixed
849 - `terser --help` was fixed
850 - The public interface was cleaned up
851 - Fixed optimisation of `Array` and `new Array`
852 - 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.
853 - Fixed parent functions' parameters being shadowed in some cases
854 - Allowed Terser to run in a situation where there are custom functions attached to Object.prototype
855 - And more bug fixes, optimisations and internal changes
856
857## v3.17.0
858
859 - More DOM properties added to --mangle-properties's DOM property list
860 - Closed issue where if 2 functions had the same argument name, Terser would not inline them together properly
861 - Fixed issue with `hasOwnProperty.call`
862 - You can now list files to minify in a Terser config file
863 - Started replacing `new Array(<number>)` with an array literal
864 - Started using ES6 capabilities like `Set` and the `includes` method for strings and arrays
865
866## v3.16.1
867
868 - 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)
869
870## v3.16.0
871
872 - No longer leaves names like Array or Object or window as a SimpleStatement (statement which is just a single expression).
873 - Add support for sections sourcemaps (IndexedSourceMapConsumer)
874 - Drops node.js v4 and starts using commonJS
875 - Is now built with rollup
876
877## v3.15.0
878
879 - Inlined spread syntax (`[...[1, 2, 3], 4, 5] => [1, 2, 3, 4, 5]`) in arrays and objects.
880 - Fixed typo in compressor warning
881 - Fixed inline source map input bug
882 - Fixed parsing of template literals with unnecessary escapes (Like `\\a`)
Note: See TracBrowser for help on using the repository browser.