Skip to content

Releases: tdewolff/minify

v2.9.14

15 Mar 13:41
Compare
Choose a tag to compare
  • cmd: create missing directories for symlinks, see #385
  • cmd: preserve file permissions, see #385
  • cmd: wait 0.1 seconds before processing watched file change, fixes #372
  • cmd: watch now works with file input and output (not just dirs), see #372
  • cmd: fix watch functionality for unknown file extension even if --type set, fix watch when src is not a dir; see #372
  • cmd: follow symlinks by default, new -p options will copy symlinks without following them, fixes #385
  • cmd: use io/fs and demand Go1.16, see #388
  • JS: add &&= ||= ??= operators, see #380
  • JS: add support for class field definitions, fixes #380
  • JS: fix recursion limit in string merging, fixes #382
  • CSS: don't remove dimension for zero values inside functions like var and calc, fixes #371
  • SVG: don't minify extremely long path data (OSS-Fuzz)
  • HTML: keep space after empty <i></i>, fixes #390

v2.9.13

15 Feb 19:59
Compare
Choose a tag to compare
  • JS: fix bugs related to the 'use strict' directive prologues at the beginning of functions and modules, fixes #376
  • JS: export statement's function name must remain for non-default declarations, fixes #375
  • CSS: prevent quasi-infinite recursion in background's append, from OSSFuzz

v2.9.12

07 Feb 13:53
Compare
Choose a tag to compare
  • JS: write final ) in ()=>({}), fixes #369
  • JS: keep debugger statements, fixes #370
  • JS: support ellipsis operator anywhere in arguments, fixes #373
  • JS: limit recursion in string merges, from OSSFuzz

v2.9.11

20 Jan 12:36
Compare
Choose a tag to compare
  • cmd: require --bundle for concatenation when the input is a directory, see #348
  • CSS: improve performance on background positions (from OSS-Fuzz)
  • HTML: don't trim whitespace on all attribute values (in value and placeholder it's significant), see #351
  • HTML: keep value on translate=no, see #352
  • HTML: support SSI tags, see #353
  • HTML: add option KeepComments to keep all comments, see #366
  • JS: fix endless loop in certain if-else combinations; minify more or/and/conditional expressions that start with a group (from OSS-Fuzz)
  • JS: fix import/export with one item, fixes #354
  • JS: escape </script> in strings, fixes #355
  • JS: keep parens in arrow functions for BindingArray and BindingObject, fixes #358
  • JS: enclose entire expression in parenthesis if it starts with an object literal, fixes #359
  • JS: prevent slowdown for if-else with if in body (from OSS-Fuzz)
  • JS: fix errors messages that contain % symbols
  • JS: put limits to the number of levels in statements and in expressions (from OSS-Fuzz)
  • JS: fix declarations with the same name as in the for initializer, see tdewolff/parse#69
  • JS: fix var declarations not adding their usage in all the scopes between its block scope and the function scope
  • SVG: keep width and height attributes on <svg>, fixes #367
  • XML: keep ampersand and less-than escaped, see #362

v2.9.10

23 Oct 17:49
Compare
Choose a tag to compare
  • JS: put variable declarations after "use strict", fixes #343
  • JS: don't convert hexadecimal representations in strings from 0x80 upwards unless it's UTF-8, fixes #341
  • JS: don't merge var declarations after for statement into for initializer, fixes #346
  • JS: add parenthesis when necessary to if condition when converting to conditional expression, fixes #347

v2.9.9

16 Oct 13:12
Compare
Choose a tag to compare
  • Improve error contexts when the file contains unicode characters
  • HTML: revert change in v2.9.5 that removed spaces between attributes, fixes #342
  • JS: fix bug that converted (function(){})() to !function(){}() which modifies the return value, fixes #340

v2.9.8

15 Oct 23:01
Compare
Choose a tag to compare
  • Fix 1e-10 which was invalidly converted to .e-9 (this only applied to 1e-10, 1e-100, etc and not to other numbers such as 1e-11 or 1e-9), fixes #339
  • JS: remove the use of the nullish operator ?? which is not supported by IE, Android+Firefox, and Android+Opera, fixes #338
  • JS: fix bug in merging var declarations, where partial merges resulted in duplicate assignments

v2.9.7

01 Oct 21:35
Compare
Choose a tag to compare
  • cmd: add JS options
  • JS: remove unassigned bindings in for statement initializer when it cannot be merged with variable declaration
  • JS: use Precision option in minifying numbers
  • SVG: fix bugs in skipping foreignObject tags

v2.9.6

01 Oct 00:24
Compare
Choose a tag to compare
  • JS: add var decl as undeclared in block scopes between the current scope and the function scope, fixes #334
  • JS: fix overwriting next statement in if-else => if-if conversion, fixes #335

v2.9.5

23 Sep 16:52
Compare
Choose a tag to compare
  • cmd: minify input even if extension is unknown but type/mimetype is given
  • CSS: fix timeout in property with many commas
  • CSS: convert RGBA to transparent only if the color is fully transparent black (and not any other transparent color), fixes #332
  • CSS: fix crash when rgb/rgba functions have less than three arguments
  • CSS: fix box-shadow value none conversion to 0 0 as they are not equivalent, fixes #332
  • HTML: remove space between attributes when after a quoted value
  • HTML: keep empty title and lang attributes, fixes #331
  • JS: merge variable declarations even if one has an ObjectPattern
  • JS: remove trailing commas in BindingArray (except when Rest ellipsis is set)
  • JS: add parenthesis around object literal in arrow function body, fixes #333