| 1 |
# Changelog |
| 2 |
|
| 3 |
## 2.9.0 (2025-03-25) |
| 4 |
|
| 5 |
Fixed: |
| 6 |
|
| 7 |
* Fix compat with PCRE 10.45, e.g. on Debian 13 or Ubuntu 25, and likely PHP 8.3+. (Reedy) [T388335](https://phabricator.wikimedia.org/T388335) |
| 8 |
|
| 9 |
Added: |
| 10 |
|
| 11 |
* JavaScriptMinifier: Add support for async function as property value (Hannah Okwelum) [T386139](https://phabricator.wikimedia.org/T386139) |
| 12 |
* JavaScriptMinifier: Add support for optional catch binding (Hannah Okwelum) [T387432](https://phabricator.wikimedia.org/T387432) |
| 13 |
* Cli: Add `jsdebug` command (Timo Tijhof) |
| 14 |
|
| 15 |
Changed: |
| 16 |
|
| 17 |
* JavaScriptMinifier: Update class documentation for ES2017 support (Hannah Okwelum) [T277675](https://phabricator.wikimedia.org/T277675) |
| 18 |
|
| 19 |
## 2.8.1 (2025-02-27) |
| 20 |
|
| 21 |
Fixed: |
| 22 |
|
| 23 |
* JavaScriptMinifier: Reject "5..0" as invalid syntax (Timo Tijhof) |
| 24 |
* JavaScriptMinifier: Remove new line insertion (Hannah Okwelum) [T368204](https://phabricator.wikimedia.org/T368204) |
| 25 |
|
| 26 |
## 2.8.0 (2024-08-20) |
| 27 |
|
| 28 |
Added: |
| 29 |
|
| 30 |
* JavaScriptMinifier: Add support for ES2020 `??` nullish operator (Hannah Okwelum) [T351610](https://phabricator.wikimedia.org/T351610) |
| 31 |
* JavaScriptMinifier: Add support for ES2016 `**=` operator (Timo Tijhof) [T277675](https://phabricator.wikimedia.org/T277675) |
| 32 |
* JavaScriptMinifier: Add optional `onError` callback to `minify()` (Timo Tijhof) [T357477](https://phabricator.wikimedia.org/T357477) |
| 33 |
* Cli: Append "onError" result to minify command output (Timo Tijhof) |
| 34 |
|
| 35 |
Changed: |
| 36 |
|
| 37 |
* Raise required PHP to >= 7.4.3 (Sam Reed) |
| 38 |
|
| 39 |
Fixed: |
| 40 |
|
| 41 |
* JavaScriptMinifier: Fix treatment of `yield` in expressions (Roan Kattouw) [T371938](https://phabricator.wikimedia.org/T371938) |
| 42 |
|
| 43 |
## 2.7.0 (2023-11-14) |
| 44 |
|
| 45 |
* JavaScriptMinifier: Add basic ES2017 async-await syntax support (Hannah Okwelum) |
| 46 |
* JavaScriptMinifier: Update debug() to remove $lastType (Timo Tijhof) |
| 47 |
|
| 48 |
## 2.5.1 (2023-10-06) |
| 49 |
|
| 50 |
* Fix source map output for multi-line templates. (Tim Starling) [T348280](https://phabricator.wikimedia.org/T348280) |
| 51 |
|
| 52 |
## 2.5.0 (2023-08-11) |
| 53 |
|
| 54 |
Added: |
| 55 |
|
| 56 |
* bin: Add `css-remap` command. (Timo Tijhof) |
| 57 |
* IdentityMinifierState and JavaScriptMinifier::createIdentityMinifier(). (Tim Starling) |
| 58 |
* MinifierState::ensureNewline() |
| 59 |
* IndexMap class, for generating a combined source map |
| 60 |
|
| 61 |
## 2.4.0 (2023-03-20) |
| 62 |
|
| 63 |
Added: |
| 64 |
|
| 65 |
* JavaScriptMinifier: Add ES2016 syntax support. (Siddharth VP) [T277675](https://phabricator.wikimedia.org/T277675) |
| 66 |
|
| 67 |
Changed: |
| 68 |
|
| 69 |
* package: Require `ext-fileinfo` in composer.json. (Sam Reed) |
| 70 |
|
| 71 |
## 2.3.0 (2022-04-19) |
| 72 |
|
| 73 |
Added: |
| 74 |
|
| 75 |
* JavaScriptMinifier: Add support for source maps. (Tim Starling) [T47514](https://phabricator.wikimedia.org/T47514) |
| 76 |
Use via the `createMinifier()` and `createSourceMapState()` methods, |
| 77 |
see `/tests/data/sourcemap/combine.php` for an example. |
| 78 |
* bin: Add `jsmap-web` and `jsmap-raw` commands. (Tim Starling) |
| 79 |
|
| 80 |
Fixed: |
| 81 |
|
| 82 |
* JavaScriptMinifier: Fix handling of property on dotless number literal. (Timo Tijhof) [T303827](https://phabricator.wikimedia.org/T303827) |
| 83 |
|
| 84 |
## 2.2.6 (2021-11-18) |
| 85 |
|
| 86 |
Fixed: |
| 87 |
|
| 88 |
* JavaScriptMinifier: Correctly recognize `\` in template strings. (Roan Kattouw) [T296058](https://phabricator.wikimedia.org/T296058) |
| 89 |
|
| 90 |
## 2.2.5 (2021-10-20) |
| 91 |
|
| 92 |
Fixed: |
| 93 |
|
| 94 |
* bin: Fix `minify` CLI autoload when run from a vendor directory. (Timo Tijhof) |
| 95 |
|
| 96 |
## 2.2.4 (2021-07-28) |
| 97 |
|
| 98 |
Fixed: |
| 99 |
|
| 100 |
* JavaScriptMinifer: Recognize `...` as a single token. (Roan Kattouw) [T287526](https://phabricator.wikimedia.org/T287526) |
| 101 |
|
| 102 |
## 2.2.3 (2021-06-07) |
| 103 |
|
| 104 |
Fixed: |
| 105 |
|
| 106 |
* JavaScriptMinifer: Fix handling of `.delete` as object property. (Roan Kattouw) [T283244](https://phabricator.wikimedia.org/T283244) |
| 107 |
|
| 108 |
## 2.2.2 (2021-05-07) |
| 109 |
|
| 110 |
Fixed: |
| 111 |
|
| 112 |
* CSSMin: Fix remapping of path-only URL when base dir is server-less root. (Timo Tijhof) [T282280](https://phabricator.wikimedia.org/T282280) |
| 113 |
|
| 114 |
## 2.2.1 (2021-03-15) |
| 115 |
|
| 116 |
Fixed: |
| 117 |
|
| 118 |
* JavaScriptMinifier: Fix handling of keywords used as object properties. (Roan Kattouw) [T277161](https://phabricator.wikimedia.org/T277161) |
| 119 |
|
| 120 |
## 2.2.0 (2021-03-09) |
| 121 |
|
| 122 |
Added: |
| 123 |
|
| 124 |
* JavaScriptMinifier: Add ES6 syntax support. (Roan Kattouw) [T272882](https://phabricator.wikimedia.org/T272882) |
| 125 |
* JavaScriptMinifier: Support true/false minification in more situations. (Roan Kattouw) |
| 126 |
* bin: Add `minify` CLI. (Timo Tijhof) |
| 127 |
|
| 128 |
Changed: |
| 129 |
|
| 130 |
* JavaScriptMinifier: Improve latency through various optimisations. (Daimona Eaytoy) |
| 131 |
|
| 132 |
Fixed: |
| 133 |
|
| 134 |
* JavaScriptMinifier: Fix semicolon insertion logic for `throw new Error`. (Roan Kattouw) |
| 135 |
|
| 136 |
## 2.1.0 (2021-02-12) |
| 137 |
|
| 138 |
Added: |
| 139 |
|
| 140 |
* CSSMin: Add global class alias for `CSSMin` for MediaWiki compatibility. |
| 141 |
This is deprecated on arrival and will be removed in a future major release. |
| 142 |
|
| 143 |
## 2.0.0 (2021-02-08) |
| 144 |
|
| 145 |
This release requires PHP 7.2+, and drops support for Internet Explorer 6-10. |
| 146 |
|
| 147 |
Added: |
| 148 |
|
| 149 |
* CSSMin: Support multiple `url()` values in one rule. (Bartosz Dziewoński) |
| 150 |
* CSSMin: Support embedding of SVG files. (m4tx) |
| 151 |
|
| 152 |
Removed: |
| 153 |
|
| 154 |
* JavaScriptMinifier: Remove support for the `$statementsOnOwnLine` option. |
| 155 |
* JavaScriptMinifier: Remove support for the `$maxLineLength` option. |
| 156 |
* CSSMin: Remove data URI fallback, previously for IE 6 and IE 7 support. |
| 157 |
|
| 158 |
Changed: |
| 159 |
|
| 160 |
* CSSMin: Reduce SVG embed size by using URL-encoding instead of base64-encoding. (Bartosz Dziewoński) |
| 161 |
* CSSMin: Improve SVG compression by preserving safe literals. (Roan Kattouw, Volker E, Fomafix) |
| 162 |
|
| 163 |
Fixed: |
| 164 |
|
| 165 |
* CSSMin: Fix non-embedded URLs that are proto-relative or have query part. (Bartosz Dziewoński) [T60338](https://phabricator.wikimedia.org/T60338) |
| 166 |
* CSSMin: Avoid corruption when CSS comments contain curly braces. (Stephan Gambke) [T62077](https://phabricator.wikimedia.org/T62077) |
| 167 |
* CSSMin: Avoid corrupting parenthesis and quotes in URLs. (Timo Tijhof) [T60473](https://phabricator.wikimedia.org/T60473) |
| 168 |
* CSSMin: Skip remapping for special `url(#default#behaviorName)` values. (Julien Girault) |
| 169 |
* JavaScriptMinifier: Fix "Uninitialized offset" in string and regexp parsing. (Timo Tijhof) [T75556](https://phabricator.wikimedia.org/T75556) |
| 170 |
* JavaScriptMinifier: Fix "Uninitialized offset" in regexp char class parsing. (Timo Tijhof) [T75556](https://phabricator.wikimedia.org/T75556) |
| 171 |
* JavaScriptMinifier: Fix possible broken `return` statement after a ternary in a property value. (Timo Tijhof) [T201606](https://phabricator.wikimedia.org/T201606) |
| 172 |
|
| 173 |
## 1.0.0 (2011-11-23) |
| 174 |
|
| 175 |
Initial release, originally bundled with MediaWiki 1.19. |
| 176 |
|