chore(deps): update dependency esbuild to v0.13.12 #917

Merged
konrad merged 1 commits from renovate/esbuild-0.x into main 2021-10-31 09:15:57 +00:00
Member

This PR contains the following updates:

Package Type Update Change
esbuild devDependencies patch 0.13.11 -> 0.13.12

Release Notes

evanw/esbuild

v0.13.12

Compare Source

  • Implement initial support for simplifying calc() expressions in CSS (#​1607)

    This release includes basic simplification of calc() expressions in CSS when minification is enabled. The approach mainly follows the official CSS specification, which means it should behave the way browsers behave: https://www.w3.org/TR/css-values-4/#calc-func. This is a basic implementation so there are probably some calc() expressions that can be reduced by other tools but not by esbuild. This release mainly focuses on setting up the parsing infrastructure for calc() expressions to make it straightforward to implement additional simplifications in the future. Here's an example of this new functionality:

    /* Input CSS */
    div {
      width: calc(60px * 4 - 5px * 2);
      height: calc(100% / 4);
    }
    
    /* Output CSS (with --minify-syntax) */
    div {
      width: 230px;
      height: 25%;
    }
    

    Expressions that can't be fully simplified will still be partially simplified into a reduced calc() expression:

    /* Input CSS */
    div {
      width: calc(100% / 5 - 2 * 1em - 2 * 1px);
    }
    
    /* Output CSS (with --minify-syntax) */
    div {
      width: calc(20% - 2em - 2px);
    }
    

    Note that this transformation doesn't attempt to modify any expression containing a var() CSS variable reference. These variable references can contain any number of tokens so it's not safe to move forward with a simplification assuming that var() is a single token. For example, calc(2px * var(--x) * 3) is not transformed into calc(6px * var(--x)) in case var(--x) contains something like 4 + 5px (calc(2px * 4 + 5px * 3) evaluates to 23px while calc(6px * 4 + 5px) evaluates to 29px).

  • Fix a crash with a legal comment followed by an import (#​1730)

    Version 0.13.10 introduced parsing for CSS legal comments but caused a regression in the code that checks whether there are any rules that come before @import. This is not desired because browsers ignore @import rules after other non-@import rules, so esbuild warns you when you do this. However, legal comments are modeled as rules in esbuild's internal AST even though they aren't actual CSS rules, and the code that performs this check wasn't updated. This release fixes the crash.


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 Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [esbuild](https://github.com/evanw/esbuild) | devDependencies | patch | [`0.13.11` -> `0.13.12`](https://renovatebot.com/diffs/npm/esbuild/0.13.11/0.13.12) | --- ### Release Notes <details> <summary>evanw/esbuild</summary> ### [`v0.13.12`](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md#&#8203;01312) [Compare Source](https://github.com/evanw/esbuild/compare/v0.13.11...v0.13.12) - Implement initial support for simplifying `calc()` expressions in CSS ([#&#8203;1607](https://github.com/evanw/esbuild/issues/1607)) This release includes basic simplification of `calc()` expressions in CSS when minification is enabled. The approach mainly follows the official CSS specification, which means it should behave the way browsers behave: https://www.w3.org/TR/css-values-4/#calc-func. This is a basic implementation so there are probably some `calc()` expressions that can be reduced by other tools but not by esbuild. This release mainly focuses on setting up the parsing infrastructure for `calc()` expressions to make it straightforward to implement additional simplifications in the future. Here's an example of this new functionality: ```css /* Input CSS */ div { width: calc(60px * 4 - 5px * 2); height: calc(100% / 4); } /* Output CSS (with --minify-syntax) */ div { width: 230px; height: 25%; } ``` Expressions that can't be fully simplified will still be partially simplified into a reduced `calc()` expression: ```css /* Input CSS */ div { width: calc(100% / 5 - 2 * 1em - 2 * 1px); } /* Output CSS (with --minify-syntax) */ div { width: calc(20% - 2em - 2px); } ``` Note that this transformation doesn't attempt to modify any expression containing a `var()` CSS variable reference. These variable references can contain any number of tokens so it's not safe to move forward with a simplification assuming that `var()` is a single token. For example, `calc(2px * var(--x) * 3)` is not transformed into `calc(6px * var(--x))` in case `var(--x)` contains something like `4 + 5px` (`calc(2px * 4 + 5px * 3)` evaluates to `23px` while `calc(6px * 4 + 5px)` evaluates to `29px`). - Fix a crash with a legal comment followed by an import ([#&#8203;1730](https://github.com/evanw/esbuild/issues/1730)) Version 0.13.10 introduced parsing for CSS legal comments but caused a regression in the code that checks whether there are any rules that come before `@import`. This is not desired because browsers ignore `@import` rules after other non-`@import` rules, so esbuild warns you when you do this. However, legal comments are modeled as rules in esbuild's internal AST even though they aren't actual CSS rules, and the code that performs this check wasn't updated. This release fixes the crash. </details> --- ### 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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
renovate added the
dependencies
label 2021-10-31 05:02:07 +00:00
renovate added 1 commit 2021-10-31 05:02:08 +00:00
continuous-integration/drone/pr Build is passing Details
7b7c627a05
chore(deps): update dependency esbuild to v0.13.12
konrad merged commit 8bbdbe62a4 into main 2021-10-31 09:15:57 +00:00
konrad deleted branch renovate/esbuild-0.x 2021-10-31 09:15:58 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.