Skip to content

Commit

Permalink
chore(deps): update dependency esbuild to ^0.19.9 (#2296)
Browse files Browse the repository at this point in the history
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [esbuild](https://togithub.com/evanw/esbuild) | [`^0.19.8` ->
`^0.19.9`](https://renovatebot.com/diffs/npm/esbuild/0.19.8/0.19.9) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/esbuild/0.19.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/esbuild/0.19.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/esbuild/0.19.8/0.19.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/esbuild/0.19.8/0.19.9?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>evanw/esbuild (esbuild)</summary>

###
[`v0.19.9`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#0199)

[Compare
Source](https://togithub.com/evanw/esbuild/compare/v0.19.8...v0.19.9)

- Add support for transforming new CSS gradient syntax for older
browsers

The specification called [CSS Images Module Level
4](https://www.w3.org/TR/css-images-4/) introduces new CSS gradient
syntax for customizing how the browser interpolates colors in between
color stops. You can now control the color space that the interpolation
happens in as well as (for "polar" color spaces) control whether hue
angle interpolation happens clockwise or counterclockwise. You can read
more about this in [Mozilla's blog post about new CSS gradient
features](https://developer.mozilla.org/en-US/blog/css-color-module-level-4/).

With this release, esbuild will now automatically transform this syntax
for older browsers in the `target` list. For example, here's a gradient
that should appear as a rainbow in a browser that supports this new
syntax:

    ```css
    /* Original code */
    .rainbow-gradient {
      width: 100px;
      height: 100px;
background: linear-gradient(in hsl longer hue, #&#8203;7ff,
#&#8203;77f);
    }

    /* New output (with --target=chrome99) */
    .rainbow-gradient {
      width: 100px;
      height: 100px;
      background:
        linear-gradient(
          #&#8203;77ffff,
          #&#8203;77ffaa 12.5%,
          #&#8203;77ff80 18.75%,
          #&#8203;84ff77 21.88%,
          #&#8203;99ff77 25%,
          #eeff77 37.5%,
          #fffb77 40.62%,
          #ffe577 43.75%,
          #ffbb77 50%,
          #ff9077 56.25%,
          #ff7b77 59.38%,
          #ff7788 62.5%,
          #ff77dd 75%,
          #ff77f2 78.12%,
          #f777ff 81.25%,
          #cc77ff 87.5%,
          #&#8203;7777ff);
    }
    ```

You can now use this syntax in your CSS source code and esbuild will
automatically convert it to an equivalent gradient for older browsers.
In addition, esbuild will now also transform "double position" and
"transition hint" syntax for older browsers as appropriate:

    ```css
    /* Original code */
    .stripes {
      width: 100px;
      height: 100px;
background: linear-gradient(#e65 33%, #ff2 33% 67%, #&#8203;99e 67%);
    }
    .glow {
      width: 100px;
      height: 100px;
      background: radial-gradient(white 10%, 20%, black);
    }

    /* New output (with --target=chrome33) */
    .stripes {
      width: 100px;
      height: 100px;
      background:
        linear-gradient(
          #e65 33%,
          #ff2 33%,
          #ff2 67%,
          #&#8203;99e 67%);
    }
    .glow {
      width: 100px;
      height: 100px;
      background:
        radial-gradient(
          #ffffff 10%,
          #aaaaaa 12.81%,
          #&#8203;959595 15.62%,
          #&#8203;7b7b7b 21.25%,
          #&#8203;5a5a5a 32.5%,
          #&#8203;444444 43.75%,
          #&#8203;323232 55%,
          #&#8203;161616 77.5%,
          #&#8203;000000);
    }
    ```

You can see visual examples of these new syntax features by looking at
[esbuild's gradient transformation
tests](https://esbuild.github.io/gradient-tests/).

If necessary, esbuild will construct a new gradient that approximates
the original gradient by recursively splitting the interval in between
color stops until the approximation error is within a small threshold.
That is why the above output CSS contains many more color stops than the
input CSS.

Note that esbuild deliberately *replaces* the original gradient with the
approximation instead of inserting the approximation before the original
gradient as a fallback. The latest version of Firefox has multiple
gradient rendering bugs (including incorrect interpolation of
partially-transparent colors and interpolating non-sRGB colors using the
incorrect color space). If esbuild didn't replace the original gradient,
then Firefox would use the original gradient instead of the fallback the
appearance would be incorrect in Firefox. In other words, the latest
version of Firefox supports modern gradient syntax but interprets it
incorrectly.

- Add support for `color()`, `lab()`, `lch()`, `oklab()`, `oklch()`, and
`hwb()` in CSS

CSS has recently added lots of new ways of specifying colors. You can
read more about this in [Chrome's blog post about CSS color
spaces](https://developer.chrome.com/docs/css-ui/high-definition-css-color-guide).

This release adds support for minifying colors that use the `color()`,
`lab()`, `lch()`, `oklab()`, `oklch()`, or `hwb()` syntax and/or
transforming these colors for browsers that don't support it yet:

    ```css
    /* Original code */
    div {
      color: hwb(90deg 20% 40%);
      background: color(display-p3 1 0 0);
    }

    /* New output (with --target=chrome99) */
    div {
      color: #&#8203;669933;
      background: #ff0f0e;
      background: color(display-p3 1 0 0);
    }
    ```

As you can see, colors outside of the sRGB color space such as
`color(display-p3 1 0 0)` are mapped back into the sRGB gamut and
inserted as a fallback for browsers that don't support the new color
syntax.

- Allow empty type parameter lists in certain cases
([#&#8203;3512](https://togithub.com/evanw/esbuild/issues/3512))

TypeScript allows interface declarations and type aliases to have empty
type parameter lists. Previously esbuild didn't handle this edge case
but with this release, esbuild will now parse this syntax:

    ```ts
    interface Foo<> {}
    type Bar<> = {}
    ```

This fix was contributed by
[@&#8203;magic-akari](https://togithub.com/magic-akari).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **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 [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/fwouts/previewjs).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44Ny4yIiwidXBkYXRlZEluVmVyIjoiMzcuODcuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
renovate[bot] committed Dec 10, 2023
1 parent 5bb71ae commit 7ad5385
Show file tree
Hide file tree
Showing 4 changed files with 140 additions and 205 deletions.
2 changes: 1 addition & 1 deletion integrations/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"chalk": "^5.3.0",
"commander": "^11.1.0",
"cross-env": "^7.0.3",
"esbuild": "^0.19.8",
"esbuild": "^0.19.9",
"nodemon": "^3.0.2",
"open": "^9.1.0",
"rimraf": "^5.0.5",
Expand Down
2 changes: 1 addition & 1 deletion integrations/intellij/daemon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"devDependencies": {
"@previewjs/daemon": "workspace:*",
"@previewjs/loader": "workspace:*",
"esbuild": "^0.19.8",
"esbuild": "^0.19.9",
"rimraf": "^5.0.5",
"typescript": "^5.3.3"
}
Expand Down
2 changes: 1 addition & 1 deletion integrations/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"@previewjs/loader": "workspace:*",
"@types/vscode": "^1.71.2",
"cross-env": "^7.0.3",
"esbuild": "^0.19.8",
"esbuild": "^0.19.9",
"exclusive-promises": "^1.0.3",
"execa": "^8.0.1",
"get-port": "^7.0.0",
Expand Down
Loading

0 comments on commit 7ad5385

Please sign in to comment.