Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Update module tdewolff/minify/v2 to v2.9.12 #41

Open
wants to merge 1 commit into
base: builder
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 7, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Type Update Change
tdewolff/minify/v2 require minor v2.7.6 -> v2.9.12

Release Notes

tdewolff/minify

v2.9.12

Compare Source

  • 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

Compare Source

  • 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

Compare Source

  • 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

Compare Source

  • 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

Compare Source

  • 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

Compare Source

  • 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

Compare Source

  • 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

Compare Source

  • 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

v2.9.4

Compare Source

  • JS: don't remove braces when there are lexical declarations, fixes #​326
  • JS: don't convert lexical declarations to expressions when hoisting variables, fixes #​326
  • JS: merge variable declaration and for initializer with variable declaration

v2.9.3

Compare Source

  • CSS: minify comma-separated lists for box-shadow, background, background-repeat, background-size, and background-position properties (fixes #​322)
  • CSS/SVG: remove deprecated Decimals options in favor of Precision
  • cmd: remove --decimals options for CSS and SVG minifiers in favor of --precision
  • cmd: add --bundle option to explicitly bundle (concatenate/merge) files into one, do not asume from the -o options if it lacks a / at the end that it outputs to a file and thus needs to merge the inputs
  • cmd: directory inputs needs --recursive, previously directories would be expanded by defaults (but not their subdirectories). This matches behaviour of the cp command and will be more intuitive.
  • cmd: file inputs are copied without considering and recreating its directory path. For example, minify -o out path/to/file would output to out/path/to/file but will now output to out/file. This is the same behaviour as the cp command and will be more intuitive for users.

v2.9.2

Compare Source

  • JS: only put var declaration into for or while, and not let nor const, fixes #​325
  • JS: merge more efficiently a var declaration with a for or while statement

v2.9.1

Compare Source

  • JS: fix parsing in identifier in group expressions
  • JS: fix parsing identifiers inside arrow function body in some cases #​324
  • JS: keep all license comments at the top of the file
  • JS: minify typeof x==='undefined' to typeof x=='undefined'
  • JS: merge expressions and var declarations with for with empty initializer or with while statement converted to for
  • JS: iteratively merge if(a){return b}if(c){return d}return e chains to return a?b:c?d:e

v2.9.0

Compare Source

  • Add JS (ECMAScript 2020) minifier
  • Improve benchmark functions
  • Predefine byte-slices instead of inline for performance
  • Don't check write errors to output during minification, but check at the end only
  • Lexers/parser now require passing parse.Input instead of io.Reader
  • Rename subpackage min to minify

JS minifier overview

Features:

  • remove superfluous whitespace
  • remove superfluous semicolons
  • shorten true, false, and undefined to !0, !1 and void 0
  • rename variables and functions to shorter names (not in global scope)
  • move var declarations to the top of the global/function scope (if more than one)
  • collapse if/else statements to expressions
  • minify conditional expressions to simpler ones
  • merge sequential expression statements to one, including into return and throw
  • remove superfluous grouping in expressions
  • shorten or remove string escapes
  • convert object key or index expression from string to identifier or decimal
  • merge concatenated strings
  • rewrite numbers (binary, octal, decimal, hexadecimal) to shorter representations

It compresses files at about 25 MB/s (only minifying, not considering reading/writing files) which is (much) faster than existing minifiers. Compression rate is between 1.5 and 3.0 depending on the file (respectively, the compression file size is between 35% -- 65% of the original). Example of known files:

File Original Size Compressed Size Ratio Time Speed
ace.js 644 kB 346 kB 53.7% 34ms 19 MB/s
dot.js 5.2 kB 3.3 kB 64.9% 563µs 9.2 MB/s
jquery.js 247 kB 85 kB 34.4% 11ms 22 MB/s
jqueryui.js 470 kB 241 kB 51.3% 26ms 18 MB/s
moment.js 99 kB 35 kB 34.9% 4ms 24 MB/s

The minifier has been tested for a number of web applications including WordPress. The go-fuzz fuzzer has been used extensively in order to detect bugs, and will continue finding bugs using https://github.com/google/oss-fuzz

v2.8.0

Compare Source

WARNING for package maintainers, some files have been renamed, adjust your build scripts accordingly.

  • Use Makefile instead of GoReleaser to build releases for all architectures, use make release. This fixes the README.md file location inside the archives to be in the root of the archive
  • Release archives will no longer have the version name explicitly stated, fixes #​316
  • Remove cmd/minify/install.sh, use make install instead
  • Rename cmd/minify/minify_bash_tab_completion to cmd/minify/bash_completion
  • Rename LICENSE.md to LICENSE as it is not a Markdown file
  • Rename min subpackage to minify
  • cmd: running minify without arguments will print a more informative error message
  • cmd: bad arguments will not display cmd usage automatically

v2.7.7

Compare Source

  • cmd: fix file paths on Windows when input and output directories are equal (slash vs backslash)
  • cmd: add --cpuprofile and --memprofile options
  • cmd: fix usage of --match and --sync simultaneously, fixes #​315
  • cmd: --match applies to all filename inputs not just under directories
  • CSS: remove whitespace around custom variable value, fixes #​305
  • JSON: minify numbers, fixes #​302
  • HTML: fix slow parsing of <a> tag with many name or id attributes (OSS-Fuzz)
  • Don't replace space by + in DataURI, fixes #​314
  • Don't escape @ : ; = ? + , / $ \t \n \r in DataURIs (works for Chrome, Firefox, Opera, Edge, Safari, Yandex, and IE9, IE10, IE11)

Renovate configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by WhiteSource Renovate. View repository job log here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants