Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Snyk] Upgrade esbuild from 0.17.19 to 0.19.9 #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leonardoadame
Copy link
Owner

This PR was automatically created by Snyk using the credentials of a real user.


Snyk has created this PR to upgrade esbuild from 0.17.19 to 0.19.9.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 31 versions ahead of your current version.
  • The recommended version was released 22 days ago, on 2023-12-10.
Release notes
Package name: esbuild
  • 0.19.9 - 2023-12-10
    • Add support for transforming new CSS gradient syntax for older browsers

      The specification called CSS Images Module Level 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.

      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:

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

      /* New output (with --target=chrome99) */
      .rainbow-gradient {
      width: 100px;
      height: 100px;
      background:
      linear-gradient(
      #77ffff,
      #77ffaa 12.5%,
      #77ff80 18.75%,
      #84ff77 21.88%,
      #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%,
      #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:

      / Original code */
      .stripes {
      width: 100px;
      height: 100px;
      background: linear-gradient(#e65 33%, #ff2 33% 67%, #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%,
      #99e 67%);
      }
      .glow {
      width: 100px;
      height: 100px;
      background:
      radial-gradient(
      #ffffff 10%,
      #aaaaaa 12.81%,
      #959595 15.62%,
      #7b7b7b 21.25%,
      #5a5a5a 32.5%,
      #444444 43.75%,
      #323232 55%,
      #161616 77.5%,
      #000000);
      }

      You can see visual examples of these new syntax features by looking at esbuild's gradient transformation 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.

      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:

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

      /* New output (with --target=chrome99) */
      div {
      color: #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 (#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:

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

      This fix was contributed by @ magic-akari.

  • 0.19.8 - 2023-11-26
    • Add a treemap chart to esbuild's bundle analyzer (#2848)

      The bundler analyzer on esbuild's website (https://esbuild.github.io/analyze/) now has a treemap chart type in addition to the two existing chart types (sunburst and flame). This should be more familiar for people coming from other similar tools, as well as make better use of large screens.

    • Allow decorators after the export keyword (#104)

      Previously esbuild's decorator parser followed the original behavior of TypeScript's experimental decorators feature, which only allowed decorators to come before the export keyword. However, the upcoming JavaScript decorators feature also allows decorators to come after the export keyword. And with TypeScript 5.0, TypeScript now also allows experimental decorators to come after the export keyword too. So esbuild now allows this as well:

      // This old syntax has always been permitted:
      @decorator export class Foo {}
      @decorator export default class Foo {}

      // This new syntax is now permitted too:
      export @decorator class Foo {}
      export default @decorator class Foo {}

      In addition, esbuild's decorator parser has been rewritten to fix several subtle and likely unimportant edge cases with esbuild's parsing of exports and decorators in TypeScript (e.g. TypeScript apparently does automatic semicolon insertion after interface and export interface but not after export default interface).

    • Pretty-print decorators using the same whitespace as the original

      When printing code containing decorators, esbuild will now try to respect whether the original code contained newlines after the decorator or not. This can make generated code containing many decorators much more compact to read:

      // Original code
      class Foo {
      @a @b @c abc
      @x @y @z xyz
      }

      // Old output
      class Foo {
      @a
      @b
      @c
      abc;
      @x
      @y
      @z
      xyz;
      }

      // New output
      class Foo {
      @a @b @c abc;
      @x @y @z xyz;
      }

  • 0.19.7 - 2023-11-21
    Read more
  • 0.19.6 - 2023-11-19
    Read more
  • 0.19.5 - 2023-10-17
    Read more
  • 0.19.4 - 2023-09-28
    Read more
  • 0.19.3 - 2023-09-14
    Read more
  • 0.19.2 - 2023-08-14
    Read more
  • 0.19.1 - 2023-08-11
    Read more
  • 0.19.0 - 2023-08-08
    Read more
  • 0.18.20 - 2023-08-08
  • 0.18.19 - 2023-08-07
  • 0.18.18 - 2023-08-05
  • 0.18.17 - 2023-07-26
  • 0.18.16 - 2023-07-23
  • 0.18.15 - 2023-07-20
  • 0.18.14 - 2023-07-18
  • 0.18.13 - 2023-07-15
  • 0.18.12 - 2023-07-13
  • 0.18.11 - 2023-07-01
  • 0.18.10 - 2023-06-26
  • 0.18.9 - 2023-06-26
  • 0.18.8 - 2023-06-25
  • 0.18.7 - 2023-06-24
  • 0.18.6 - 2023-06-20
  • 0.18.5 - 2023-06-20
  • 0.18.4 - 2023-06-16
  • 0.18.3 - 2023-06-15
  • 0.18.2 - 2023-06-13
  • 0.18.1 - 2023-06-12
  • 0.18.0 - 2023-06-09
  • 0.17.19 - 2023-05-13
from esbuild GitHub release notes
Commit messages
Package name: esbuild

Compare


Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

🧐 View latest project report

🛠 Adjust upgrade PR settings

🔕 Ignore this dependency or unsubscribe from future upgrade PRs

Copy link

stackblitz bot commented Dec 31, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants