source: imaps-frontend/node_modules/terser/CHANGELOG.md

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

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