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.18.13 to 0.19.11 #6

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

Conversation

fishylunar
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.18.13 to 0.19.11.

ℹ️ 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 19 versions ahead of your current version.
  • The recommended version was released 22 days ago, on 2023-12-29.
Release notes
Package name: esbuild
  • 0.19.11 - 2023-12-29
    • Fix TypeScript-specific class transform edge case (#3559)

      The previous release introduced an optimization that avoided transforming super() in the class constructor for TypeScript code compiled with useDefineForClassFields set to false if all class instance fields have no initializers. The rationale was that in this case, all class instance fields are omitted in the output so no changes to the constructor are needed. However, if all of this is the case and there are #private instance fields with initializers, those private instance field initializers were still being moved into the constructor. This was problematic because they were being inserted before the call to super() (since super() is now no longer transformed in that case). This release introduces an additional optimization that avoids moving the private instance field initializers into the constructor in this edge case, which generates smaller code, matches the TypeScript compiler's output more closely, and avoids this bug:

      // Original code
      class Foo extends Bar {
      #private = 1;
      public: any;
      constructor() {
      super();
      }
      }

      // Old output (with esbuild v0.19.9)
      class Foo extends Bar {
      constructor() {
      super();
      this.#private = 1;
      }
      #private;
      }

      // Old output (with esbuild v0.19.10)
      class Foo extends Bar {
      constructor() {
      this.#private = 1;
      super();
      }
      #private;
      }

      // New output
      class Foo extends Bar {
      #private = 1;
      constructor() {
      super();
      }
      }

    • Minifier: allow reording a primitive past a side-effect (#3568)

      The minifier previously allowed reordering a side-effect past a primitive, but didn't handle the case of reordering a primitive past a side-effect. This additional case is now handled:

      // Original code
      function f() {
      let x = false;
      let y = x;
      const boolean = y;
      let frag = $.template(&lt;p contenteditable="<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">boolean</span><span class="pl-kos">}</span></span>"&gt;hello world&lt;/p&gt;);
      return frag;
      }

      // Old output (with --minify)
      function f(){const e=!1;return $.template(&lt;p contenteditable="<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">e</span><span class="pl-kos">}</span></span>"&gt;hello world&lt;/p&gt;)}

      // New output (with --minify)
      function f(){return $.template('<p contenteditable="false">hello world</p>')}

    • Minifier: consider properties named using known Symbol instances to be side-effect free (#3561)

      Many things in JavaScript can have side effects including property accesses and ToString operations, so using a symbol such as Symbol.iterator as a computed property name is not obviously side-effect free. This release adds a special case for known Symbol instances so that they are considered side-effect free when used as property names. For example, this class declaration will now be considered side-effect free:

      class Foo {
        *[Symbol.iterator]() {
        }
      }
    • Provide the stop() API in node to exit esbuild's child process (#3558)

      You can now call stop() in esbuild's node API to exit esbuild's child process to reclaim the resources used. It only makes sense to do this for a long-lived node process when you know you will no longer be making any more esbuild API calls. It is not necessary to call this to allow node to exit, and it's advantageous to not call this in between calls to esbuild's API as sharing a single long-lived esbuild child process is more efficient than re-creating a new esbuild child process for every API call. This API call used to exist but was removed in version 0.9.0. This release adds it back due to a user request.

  • 0.19.10 - 2023-12-19
    Read more
  • 0.19.9 - 2023-12-10
    Read more
  • 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
    • Fix a regression in 0.19.0 regarding paths in tsconfig.json (#3354)

      The fix in esbuild version 0.19.0 to process tsconfig.json aliases before the --packages=external setting unintentionally broke an edge case in esbuild's handling of certain tsconfig.json aliases where there are multiple files with the same name in different directories. This release adjusts esbuild's behavior for this edge case so that it passes while still processing aliases before --packages=external. Please read the linked issue for more details.

    • Fix a CSS font property minification bug (#3452)

      This release fixes a bug where esbuild's CSS minifier didn't insert a space between the font size and the font family in the font CSS shorthand property in the edge case where the original source code didn't already have a space and the leading string token was shortened to an identifier:

      / Original code */
      .foo { font: 16px"Menlo"; }

      /* Old output (with --minify) */
      .foo{font:16pxMenlo}

      /* New output (with --minify) */
      .foo{font:16px Menlo}

    • Fix bundling CSS with asset names containing spaces (#3410)

      Assets referenced via CSS url() tokens may cause esbuild to generate invalid output when bundling if the file name contains spaces (e.g. url(image 2.png)). With this release, esbuild will now quote all bundled asset references in url() tokens to avoid this problem. This only affects assets loaded using the file and copy loaders.

    • Fix invalid CSS url() tokens in @ import rules (#3426)

      In the future, CSS url() tokens may contain additional stuff after the URL. This is irrelevant today as no CSS specification does this. But esbuild previously had a bug where using these tokens in an @ import rule resulted in malformed output. This bug has been fixed.

    • Fix browser + false + type: module in package.json (#3367)

      The browser field in package.json allows you to map a file to false to have it be treated as an empty file when bundling for the browser. However, if package.json contains "type": "module" then all .js files will be considered ESM, not CommonJS. Importing a named import from an empty CommonJS file gives you undefined, but importing a named export from an empty ESM file is a build error. This release changes esbuild's interpretation of these files mapped to false in this situation from ESM to CommonJS to avoid generating build errors for named imports.

    • Fix a bug in top-level await error reporting (#3400)

      Using require() on a file that contains top-level await is not allowed because require() must return synchronously and top-level await makes that impossible. You will get a build error if you try to bundle code that does this with esbuild. This release fixes a bug in esbuild's error reporting code for complex cases of this situation involving multiple levels of imports to get to the module containing the top-level await.

    • Update to Unicode 15.1.0

      The character tables that determine which characters form valid JavaScript identifiers have been updated from Unicode version 15.0.0 to the newly-released Unicode version 15.1.0. I'm not putting an example in the release notes because all of the new characters will likely just show up as little squares since fonts haven't been updated yet. But you can read https://www.unicode.org/versions/Unicode15.1.0/#Summary for more information about the changes.

      This upgrade was contributed by @ JLHwung.

  • 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
  • 0.19.0 - 2023-08-08
  • 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
from esbuild GitHub release notes
Commit messages
Package name: esbuild
  • 6ee8225 publish 0.19.11 to npm
  • f8ae3af fix #3561: treeshaking of known `Symbol` instances
  • 0811058 switch define data to flags
  • f5f8ff8 fix #3568: can reorder primitive past side-effect
  • 914f608 fix #3558: put the `stop()` api call back
  • 2aa166b fix #3559: fix recent class transform regression
  • 55e1127 publish 0.19.10 to npm
  • d968af2 fix #3511: `@ __NO_SIDE_EFFECTS__` with templates
  • 00c4ebe fix #3546: don't transform `require` glob imports
  • e1b7050 fix #3319: missing symbol usage in glob transform
  • 461ca73 add the `@ esbuild/aix-ppc64` package for ibm aix (#3550)
  • 190ca99 truncate a long url in a comment
  • 6c41900 add Safari compat data for arbitrary module namespace names (#3520)
  • f38cbe6 fix #3552: calling `stop()` now clears go timeouts
  • 7a225ff make a few code edits from some random github bot
  • aa46b2c fix some build script comments
  • de99656 mention #3551 in the release notes
  • accfb14 fix: fix panic when optional chain partially replaced with defines (#3554)
  • b76b54f run `make update-compat-table`
  • 109449e fix #3544: hack around node cjs export name bugs
  • e088f66 fix #3543: update go 1.20.10 => 1.20.12
  • 566b295 fix #3538: `super()` return: `undefined` => `this`
  • ce4f100 css gradients: remove more implied positions
  • 9edc9d4 publish 0.19.9 to npm

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

sonarcloud bot commented Jan 20, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

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