minify

Go minifiers for web formats

MIT License

Downloads
51K
Stars
3.6K
Committers
45

Bot releases are visible (Hide)

minify - v2.9.27

Published by tdewolff almost 3 years ago

  • cmd: revert "Add --sequential option to run jobs in serial"
  • cmd: don't use concurrency for single tasks
  • cmd: refactor read/write code
  • JS: rewrite variable renamer to define order of variable names, performance improvement of 3%-4%
  • JS: use average character frequency of sample of JS files for variable renaming, reduces GZIP size
minify - v2.9.26

Published by tdewolff almost 3 years ago

  • cmd: Add buffering for stdout (performance)
  • cmd: Fix bug for stdin
minify - v2.9.25

Published by tdewolff almost 3 years ago

  • cmd: add --sequential option to run jobs in serial
minify - v2.9.24

Published by tdewolff almost 3 years ago

  • JS: fix for declarations in while statements
minify - v2.9.23

Published by tdewolff almost 3 years ago

  • cmd: put syscall code in OS specific files
  • cmd: tweaks to bash_completion, see #441
  • cmd: fix input/output directory edge cases and platform-specific operators in paths, fixes #438
  • HTML: keep before , fixes #440
  • HTML: don't keep whitespace after closing block tags with KeepWhitespace, fixes #442
  • JS: fix statement list optimization when it's a list of empty statements, fixes OSSFuzz report
  • JS: add support for top-level await and for class field definitions, fixes #412
  • JS: improve variable declaration reordering, fixes #445
  • JS: fix bug for var decl rearranging; use var renaming in decision to reorder var decls
  • JS: remove unused function parameters; remove superfluous escapes in RegExp
  • JS: add NoNullishOperator options, minify using nullish operator by default
  • JS: fix bug for moving var decls and var renaming
  • JS: const statement must have initializer
  • JS: variable uses in for statement now don't interfere with declarations in for block
minify - v2.9.22

Published by tdewolff about 3 years ago

  • Update fsnotify from 1.4.9 to 1.5.1
  • cmd: support preserving mode, ownership, and timestamps; fixes #435
  • cmd: deprecate --preserveLinks
  • cmd: don't add empty newlines before error when stdout is empty still
  • HTML: trim whitespace in rel attribute, fixes #436
  • JS: fix let{e}={e} where second e cannot be a declaration when there is the possibility that it might be arguments for an arrow func
  • JS: allow line and paragraph separators in strings, fixes https://github.com/tdewolff/parse/issues/82
minify - v2.9.21

Published by tdewolff about 3 years ago

  • JS: fix grouped statement ending parenthesis for objects, fixes #429
minify - v2.9.20

Published by tdewolff about 3 years ago

  • CSS: fix @import url( early-termination and @import url( )
  • HTML: keep space after empty phrasing elements, fixes #427
  • JS: fix switch statement optimization, fixes #426
  • JS: remove if statement if if-block is empty, fixes #428
minify - v2.9.19

Published by tdewolff over 3 years ago

  • JS: fix parsing of a++==b
  • CSS: fix bug in early-terminated @import url(
minify - v2.9.18

Published by tdewolff over 3 years ago

  • Revert incorporating the parse dependency into this repository from the previous release
  • cmd: Bash completion support for zsh, fixes #421
  • JS: fix {a:b=1} when inside arrow function parameter list, fixes #422
minify - v2.9.17

Published by tdewolff over 3 years ago

  • Incorporate the parse dependency into this repository
  • cmd: fix forward/backward slash for Windows platform, fixes #403
  • JS: add space to a<!--b and a</script>/ in more instances to avoid confusion with operators, see #413
  • JS: add variable scope to switch statement
  • JS: parse async(a) as possible expression or arrow func, fixes #406
  • JS: fix lexical variable renaming for descoped, fixes #405
  • JS: fix import statement/call parsing at module level, fixes #399
  • JSON: add KeepNumbers option, fixes #400
minify - v2.9.16

Published by tdewolff over 3 years ago

  • keep minimal Go version at 1.13 (and not 1.16 which is more convenient for cmd)
  • cmd: fix regression for stdin/stdout, fixes #392
  • HTML: update error line and column for errors from other minifiers
  • CSS: KeepCSS2 (for IE11) doesn't use initial for background-color, fixes #394
  • CSS: keep integers for z-index even in functions such as calc, fixes #395
  • CSS: fix minify to initial/auto/none for flex, fixes #398
minify - v2.9.15

Published by tdewolff over 3 years ago

  • JS: accept shebang comment as first line, fixes #345
  • HTML: update fix for space after <i></i>, see #390
  • CSS: unicode-range minification, fixes #321 and closes #344
minify - v2.9.14

Published by tdewolff over 3 years ago

  • 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
minify - v2.9.13

Published by tdewolff over 3 years ago

  • 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
minify - v2.9.12

Published by tdewolff over 3 years ago

  • 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
minify - v2.9.11

Published by tdewolff over 3 years ago

  • 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 https://github.com/tdewolff/parse/issues/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
minify - v2.9.10

Published by tdewolff almost 4 years ago

  • 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
minify - v2.9.9

Published by tdewolff about 4 years ago

  • 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
minify - v2.9.8

Published by tdewolff about 4 years ago

  • 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
Package Rankings
Top 0.74% on Proxy.golang.org
Top 4.62% on Pypi.org
Top 6.62% on Alpine-edge
Top 8.91% on Alpine-v3.16
Top 9.39% on Alpine-v3.17
Top 2.74% on Alpine-v3.18
Top 3.27% on Npmjs.org
Badges
Extracted from project README
API reference Go Report Card codecov SiteGround