Skip to content

[Snyk] Upgrade esbuild from 0.17.19 to 0.18.5 #10

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

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.18.5.

ℹ️ 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 6 versions ahead of your current version.
  • The recommended version was released 22 days ago, on 2023-06-20.
Release notes
Package name: esbuild
  • 0.18.5 - 2023-06-20
    • Implement auto accessors (#3009)

      This release implements the new auto-accessor syntax from the upcoming JavaScript decorators proposal. The auto-accessor syntax looks like this:

      class Foo {
        accessor foo;
        static accessor bar;
      }
      new Foo().foo = Foo.bar;

      This syntax is not yet a part of JavaScript but it was added to TypeScript in version 4.9. More information about this feature can be found in microsoft/TypeScript#49705. Auto-accessors will be transformed if the target is set to something other than esnext:

      // Output (with --target=esnext)
      class Foo {
      accessor foo;
      static accessor bar;
      }
      new Foo().foo = Foo.bar;

      // Output (with --target=es2022)
      class Foo {
      #foo;
      get foo() {
      return this.#foo;
      }
      set foo() {
      this.#foo =
      ;
      }
      static #bar;
      static get bar() {
      return this.#bar;
      }
      static set bar() {
      this.#bar =
      ;
      }
      }
      new Foo().foo = Foo.bar;

      // Output (with --target=es2021)
      var _foo, _bar;
      class Foo {
      constructor() {
      __privateAdd(this, _foo, void 0);
      }
      get foo() {
      return __privateGet(this, foo);
      }
      set foo(
      ) {
      __privateSet(this, foo, );
      }
      static get bar() {
      return __privateGet(this, bar);
      }
      static set bar(
      ) {
      __privateSet(this, bar, );
      }
      }
      _foo = new WeakMap();
      _bar = new WeakMap();
      __privateAdd(Foo, _bar, void 0);
      new Foo().foo = Foo.bar;

      You can also now use auto-accessors with esbuild's TypeScript experimental decorator transformation, which should behave the same as decorating the underlying getter/setter pair.

      Please keep in mind that this syntax is not yet part of JavaScript. This release enables auto-accessors in .js files with the expectation that it will be a part of JavaScript soon. However, esbuild may change or remove this feature in the future if JavaScript ends up changing or removing this feature. Use this feature with caution for now.

    • Pass through JavaScript decorators (#104)

      In this release, esbuild now parses decorators from the upcoming JavaScript decorators proposal and passes them through to the output unmodified (as long as the language target is set to esnext). Transforming JavaScript decorators to environments that don't support them has not been implemented yet. The only decorator transform that esbuild currently implements is still the TypeScript experimental decorator transform, which only works in .ts files and which requires "experimentalDecorators": true in your tsconfig.json file.

    • Static fields with assign semantics now use static blocks if possible

      Setting useDefineForClassFields to false in TypeScript requires rewriting class fields to assignment statements. Previously this was done by removing the field from the class body and adding an assignment statement after the class declaration. However, this also caused any private fields to also be lowered by necessity (in case a field initializer uses a private symbol, either directly or indirectly). This release changes this transform to use an inline static block if it's supported, which avoids needing to lower private fields in this scenario:

      // Original code
      class Test {
      static #foo = 123
      static bar = this.#foo
      }

      // Old output (with useDefineForClassFields=false)
      var _foo;
      const _Test = class _Test {
      };
      _foo = new WeakMap();
      __privateAdd(_Test, _foo, 123);
      _Test.bar = __privateGet(_Test, _foo);
      let Test = _Test;

      // New output (with useDefineForClassFields=false)
      class Test {
      static #foo = 123;
      static {
      this.bar = this.#foo;
      }
      }

    • Fix TypeScript experimental decorators combined with --mangle-props (#3177)

      Previously using TypeScript experimental decorators combined with the --mangle-props setting could result in a crash, as the experimental decorator transform was not expecting a mangled property as a class member. This release fixes the crash so you can now combine both of these features together safely.

  • 0.18.4 - 2023-06-16
    Read more
  • 0.18.3 - 2023-06-15
    • Fix a panic due to empty static class blocks (#3161)

      This release fixes a bug where an internal invariant that was introduced in the previous release was sometimes violated, which then caused a panic. It happened when bundling code containing an empty static class block with both minification and bundling enabled.

  • 0.18.2 - 2023-06-13
    Read more
  • 0.18.1 - 2023-06-12
    Read more
  • 0.18.0 - 2023-06-09
    Read more
  • 0.17.19 - 2023-05-13
    Read more
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

@bolt-new-by-stackblitz
Copy link

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

@changeset-bot
Copy link

changeset-bot bot commented Jul 11, 2023

⚠️ No Changeset found

Latest commit: 2860ef1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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