|
10 | 10 |
|
11 | 11 | Previously using these selectors with esbuild would generate a warning. That warning has been removed in this release for these cases.
|
12 | 12 |
|
| 13 | +* Improve tree-shaking of `try` statements in dead code ([#4224](https://github.com/evanw/esbuild/issues/4224)) |
| 14 | + |
| 15 | + With this release, esbuild will now remove certain `try` statements if esbuild considers them to be within dead code (i.e. code that is known to not ever be evaluated). For example: |
| 16 | + |
| 17 | + ```js |
| 18 | + // Original code |
| 19 | + return 'foo' |
| 20 | + try { return 'bar' } catch {} |
| 21 | + |
| 22 | + // Old output (with --minify) |
| 23 | + return"foo";try{return"bar"}catch{} |
| 24 | + |
| 25 | + // New output (with --minify) |
| 26 | + return"foo"; |
| 27 | + ``` |
| 28 | + |
13 | 29 | * Consider negated bigints to have no side effects
|
14 | 30 |
|
15 | 31 | While esbuild currently considers `1`, `-1`, and `1n` to all have no side effects, it didn't previously consider `-1n` to have no side effects. This is because esbuild does constant folding with numbers but not bigints. However, it meant that unused negative bigint constants were not tree-shaken. With this release, esbuild will now consider these expressions to also be side-effect free:
|
|
33 | 49 |
|
34 | 50 | This should have no effect on existing code as this version change does not change Go's operating system support. It may remove certain false positive reports (specifically CVE-2025-4673 and CVE-2025-22874) from vulnerability scanners that only detect which version of the Go compiler esbuild uses.
|
35 | 51 |
|
| 52 | +* Experimental support for esbuild on OpenHarmony ([#4212](https://github.com/evanw/esbuild/pull/4212)) |
| 53 | + |
| 54 | + With this release, esbuild now publishes the [`@esbuild/openharmony-arm64`](https://www.npmjs.com/package/@esbuild/openharmony-arm64) npm package for [OpenHarmony](https://en.wikipedia.org/wiki/OpenHarmony). It contains a WebAssembly binary instead of a native binary because Go doesn't currently support OpenHarmony. Node does support it, however, so in theory esbuild should now work on OpenHarmony through WebAssembly. This change was contributed by [@hqzing](https://github.com/hqzing). |
| 55 | + |
36 | 56 | ## 0.25.5
|
37 | 57 |
|
38 | 58 | * Fix a regression with `browser` in `package.json` ([#4187](https://github.com/evanw/esbuild/issues/4187))
|
|
281 | 301 | }
|
282 | 302 | ```
|
283 | 303 |
|
284 |
| -* Improve tree-shaking of `try` statements in dead code ([#4224](https://github.com/evanw/esbuild/issues/4224)) |
285 |
| -
|
286 |
| - With this release, esbuild will now remove certain `try` statements if esbuild considers them to be within dead code (i.e. code that is known to not ever be evaluated). For example: |
287 |
| -
|
288 |
| - ```js |
289 |
| - // Original code |
290 |
| - return 'foo' |
291 |
| - try { return 'bar' } catch {} |
292 |
| - |
293 |
| - // Old output (with --minify) |
294 |
| - return"foo";try{return"bar"}catch{} |
295 |
| - |
296 |
| - // New output (with --minify) |
297 |
| - return"foo"; |
298 |
| - ``` |
299 |
| -
|
300 | 304 | * Update Go from 1.23.5 to 1.23.7 ([#4076](https://github.com/evanw/esbuild/issues/4076), [#4077](https://github.com/evanw/esbuild/pull/4077))
|
301 | 305 |
|
302 | 306 | This should have no effect on existing code as this version change does not change Go's operating system support. It may remove certain reports from vulnerability scanners that detect which version of the Go compiler esbuild uses.
|
303 | 307 |
|
304 | 308 | This PR was contributed by [@MikeWillCook](https://github.com/MikeWillCook).
|
305 | 309 |
|
306 |
| -* Experimental support for esbuild on OpenHarmony ([#4212](https://github.com/evanw/esbuild/pull/4212)) |
307 |
| -
|
308 |
| - With this release, esbuild now publishes the [`@esbuild/openharmony-arm64`](https://www.npmjs.com/package/@esbuild/openharmony-arm64) npm package for [OpenHarmony](https://en.wikipedia.org/wiki/OpenHarmony). It contains a WebAssembly binary instead of a native binary because Go doesn't currently support OpenHarmony. Node does support it, however, so in theory esbuild should now work on OpenHarmony through WebAssembly. This change was contributed by [@hqzing](https://github.com/hqzing). |
309 |
| -
|
310 | 310 | ## 0.25.0
|
311 | 311 |
|
312 | 312 | **This release deliberately contains backwards-incompatible changes.** To avoid automatically picking up releases like this, you should either be pinning the exact version of `esbuild` in your `package.json` file (recommended) or be using a version range syntax that only accepts patch upgrades such as `^0.24.0` or `~0.24.0`. See npm's documentation about [semver](https://docs.npmjs.com/cli/v6/using-npm/semver/) for more information.
|
|
0 commit comments