Skip to content

Conversation

@snyk-bot
Copy link
Contributor

@snyk-bot snyk-bot commented Jun 3, 2023

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

ℹ️ 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 1 version ahead of your current version.
  • The recommended version was released 21 days ago, on 2023-05-13.
Release notes
Package name: esbuild
  • 0.17.19 - 2023-05-13
    • Fix CSS transform bugs with nested selectors that start with a combinator (#3096)

      This release fixes several bugs regarding transforming nested CSS into non-nested CSS for older browsers. The bugs were due to lack of test coverage for nested selectors with more than one compound selector where they all start with the same combinator. Here's what some problematic cases look like before and after these fixes:

      / Original code */
      .foo {
      > &a,
      > &b {
      color: red;
      }
      }
      .bar {
      > &a,
      + &b {
      color: green;
      }
      }

      /* Old output (with --target=chrome90) */
      .foo :is(> .fooa, > .foob) {
      color: red;
      }
      .bar :is(> .bara, + .barb) {
      color: green;
      }

      /* New output (with --target=chrome90) */
      .foo > :is(a.foo, b.foo) {
      color: red;
      }
      .bar > a.bar,
      .bar + b.bar {
      color: green;
      }

    • Fix bug with TypeScript parsing of instantiation expressions followed by = (#3111)

      This release fixes esbuild's TypeScript-to-JavaScript conversion code in the case where a potential instantiation expression is followed immediately by a = token (such that the trailing > becomes a >= token). Previously esbuild considered that to still be an instantiation expression, but the official TypeScript compiler considered it to be a >= operator instead. This release changes esbuild's interpretation to match TypeScript. This edge case currently appears to be problematic for other TypeScript-to-JavaScript converters as well:

      Original code TypeScript esbuild 0.17.18 esbuild 0.17.19 Sucrase Babel
      x<y>=a<b<c>>() x<y>=a(); x=a(); x<y>=a(); x=a() Invalid left-hand side in assignment expression
    • Avoid removing unrecognized directives from the directive prologue when minifying (#3115)

      The directive prologue in JavaScript is a sequence of top-level string expressions that come before your code. The only directives that JavaScript engines currently recognize are use strict and sometimes use asm. However, the people behind React have made up their own directive for their own custom dialect of JavaScript. Previously esbuild only preserved the use strict directive when minifying, although you could still write React JavaScript with esbuild using something like --banner:js="'your directive here';". With this release, you can now put arbitrary directives in the entry point and esbuild will preserve them in its minified output:

      // Original code
      'use wtf'; console.log(123)

      // Old output (with --minify)
      console.log(123);

      // New output (with --minify)
      "use wtf";console.log(123);

      Note that this means esbuild will no longer remove certain stray top-level strings when minifying. This behavior is an intentional change because these stray top-level strings are actually part of the directive prologue, and could potentially have semantics assigned to them (as was the case with React).

    • Improved minification of binary shift operators

      With this release, esbuild's minifier will now evaluate the << and >>> operators if the resulting code would be shorter:

      // Original code
      console.log(10 << 10, 10 << 20, -123 >>> 5, -123 >>> 10);

      // Old output (with --minify)
      console.log(10<<10,10<<20,-123>>>5,-123>>>10);

      // New output (with --minify)
      console.log(10240,10<<20,-123>>>5,4194303);

  • 0.17.18 - 2023-04-22
    • Fix non-default JSON import error with export {} from (#3070)

      This release fixes a bug where esbuild incorrectly identified statements of the form export { default as x } from "y" assert { type: "json" } as a non-default import. The bug did not affect code of the form import { default as x } from ... (only code that used the export keyword).

    • Fix a crash with an invalid subpath import (#3067)

      Previously esbuild could crash when attempting to generate a friendly error message for an invalid subpath import (i.e. an import starting with #). This happened because esbuild originally only supported the exports field and the code for that error message was not updated when esbuild later added support for the imports field. This crash has been fixed.

from esbuild GitHub release notes
Commit messages
Package name: esbuild
  • d47ab43 publish 0.17.19 to npm
  • 3a81eb5 update go 1.20.3 => 1.20.4
  • 7cf5257 fix #3111: incorrect ts parsing of `x < y >= z`
  • a3fcf70 fix #3096: css transform bug with nested selectors
  • c19689a fix #3115: pass through unknown js directives
  • d686756 minify: fold more shift operations when shorter
  • 7d11ef1 fix for validation warnings

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

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

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