Tdewolff-minify

Latest version: v2.20.37

Safety actively analyzes 685670 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 20 of 21

2.3.3

2.3.1

This release has binaries built by GoReleaser.

2.3.0

* Large performance increase by using a buffer that holds all contents, instead of a streaming buffer: 9904fe70e1c1cb5217ed45b24bf9728de3ff10c2
* Add standardized samples for benchmark tests
* Parsing errors now show line number, column and context (the content of the offending line)
* HTML: optimize `a` minification

2.2.0

This is an incremental update over v2.1.0.

Changelog:
* CSS: properly handle bad declarations
* CSS: parse custom properties
* HTML: option to keep conditional comments
* Remove Content-Length in middleware
* HTML: attribute `spellcheck` is not a boolean
* JS: improved parsing of edge cases

CLI:
* Limit maximum concurrency for opening files to 50 (default)

2.1.0

This v2.1 release added a much improved SVG minifier. Equinox has been added to distribute binaries and make installation easier, see [Equinox](https://dl.equinox.io/tdewolff/minify/stable) (which says version 2.1.5). The CLI tool has matured and various bugfixes and feature requests are in this release.

Change log:
- HTML: do not keep IE conditional comments
- HTML: do not remove CDATA tags, as CDATA is invalid HTML anyways
- HTML: option to keep document tags (`html`, `head` and `body`)
- CSS/SVG: decimal precision can be set in the options
- SVG: more advanced minification
- export `MinifierFunc`
- new `Match` function that returns the minifier function that gets matched to a mediatype
- parsers return an error when they stop before the EOF
- `ResponseWriter` and `Middleware` functionality added

Bugfixes:
- HTML: whitespace around `img` and similar inline tags preserved
- HTML: whitespace within `pre` tag properly preserved
- HTML: the `math` and `svg` tags themselves are now parsed by their respective parsers
- CSS/SVG: valid rounding and truncating of decimals
- CSS: do not lowercase all identifiers, as they may be `<custom-ident>`
- CSS: `rgba` and `hsla` now work properly
- CSS: keep certain required number dimensions
- SVG: path data for arc; sweep and large-arg flags are now treated as booleans
- JS: keep newline or semicolon before `!function(){}`
- JS: keep newline before lines that start with a string in certain instances, the original JSMin does not handle this
- JS: keep newline between `}` and string or ident

CLI:
- Add concatenation support
- Add more support for file and directory watching
- Only overwrite files when explicitly set output equal to input, previously an empty output would imply overwriting, now it means writing to `stdout` as intended

2.0.0

This v2 releases introduces passing options to minifiers. This is a feature that resulted in an API change, additionally I did some API clean up as well. This works with parse-v2.0.0.

Furthermore, performance of several components has been improved. Tests have been added and improved.

Change log:
- options have been added
- `Reader` and `Writer` functions are added
- whitespace trimming doesn't convert newline to space if it can't remove it
- bang-comments are preserved
- improved CDATA processing
- HTML URL minification

Bugfixes:
- HTML: mediatype attribute in foreign/style/script wasn't copied
- HTML/XML: don't panic on early ending end tags
- SVG: allow single quotes attributes
- SVG: keep M command character

CLI changes:
- complete refactor allowing for a variety of inputs (streams, files, directories)
- more parameters such as watching directory changes, recursive minification and options for the minifiers
- processes files in parallel

Page 20 of 21

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.