chore(deps): update dependency esbuild to v0.18.2 #3597

Merged
konrad merged 1 commits from renovate/esbuild-0.x into main 2023-06-13 05:54:07 +00:00
Member

This PR contains the following updates:

Package Type Update Change
esbuild devDependencies patch 0.18.1 -> 0.18.2

Release Notes

evanw/esbuild

v0.18.2

Compare Source

  • Lower static blocks when static fields are lowered (#​2800, #​2950, #​3025)

    This release fixes a bug where esbuild incorrectly did not lower static class blocks when static class fields needed to be lowered. For example, the following code should print 1 2 3 but previously printed 2 1 3 instead due to this bug:

    // Original code
    class Foo {
      static x = console.log(1)
      static { console.log(2) }
      static y = console.log(3)
    }
    
    // Old output (with --supported:class-static-field=false)
    class Foo {
      static {
        console.log(2);
      }
    }
    __publicField(Foo, "x", console.log(1));
    __publicField(Foo, "y", console.log(3));
    
    // New output (with --supported:class-static-field=false)
    class Foo {
    }
    __publicField(Foo, "x", console.log(1));
    console.log(2);
    __publicField(Foo, "y", console.log(3));
    
  • Use static blocks to implement --keep-names on classes (#​2389)

    This change fixes a bug where the name property could previously be incorrect within a class static context when using --keep-names. The problem was that the name property was being initialized after static blocks were run instead of before. This has been fixed by moving the name property initializer into a static block at the top of the class body:

    // Original code
    if (typeof Foo === 'undefined') {
      let Foo = class {
        static test = this.name
      }
      console.log(Foo.test)
    }
    
    // Old output (with --keep-names)
    if (typeof Foo === "undefined") {
      let Foo2 = /* @​__PURE__ */ __name(class {
        static test = this.name;
      }, "Foo");
      console.log(Foo2.test);
    }
    
    // New output (with --keep-names)
    if (typeof Foo === "undefined") {
      let Foo2 = class {
        static {
          __name(this, "Foo");
        }
        static test = this.name;
      };
      console.log(Foo2.test);
    }
    

    This change was somewhat involved, especially regarding what esbuild considers to be side-effect free. Some unused classes that weren't removed by tree shaking in previous versions of esbuild may now be tree-shaken. One example is classes with static private fields that are transformed by esbuild into code that doesn't use JavaScript's private field syntax. Previously esbuild's tree shaking analysis ran on the class after syntax lowering, but with this release it will run on the class before syntax lowering, meaning it should no longer be confused by class mutations resulting from automatically-generated syntax lowering code.


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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [esbuild](https://github.com/evanw/esbuild) | devDependencies | patch | [`0.18.1` -> `0.18.2`](https://renovatebot.com/diffs/npm/esbuild/0.18.1/0.18.2) | --- ### Release Notes <details> <summary>evanw/esbuild</summary> ### [`v0.18.2`](https://github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#&#8203;0182) [Compare Source](https://github.com/evanw/esbuild/compare/v0.18.1...v0.18.2) - Lower static blocks when static fields are lowered ([#&#8203;2800](https://github.com/evanw/esbuild/issues/2800), [#&#8203;2950](https://github.com/evanw/esbuild/issues/2950), [#&#8203;3025](https://github.com/evanw/esbuild/issues/3025)) This release fixes a bug where esbuild incorrectly did not lower static class blocks when static class fields needed to be lowered. For example, the following code should print `1 2 3` but previously printed `2 1 3` instead due to this bug: ```js // Original code class Foo { static x = console.log(1) static { console.log(2) } static y = console.log(3) } // Old output (with --supported:class-static-field=false) class Foo { static { console.log(2); } } __publicField(Foo, "x", console.log(1)); __publicField(Foo, "y", console.log(3)); // New output (with --supported:class-static-field=false) class Foo { } __publicField(Foo, "x", console.log(1)); console.log(2); __publicField(Foo, "y", console.log(3)); ``` - Use static blocks to implement `--keep-names` on classes ([#&#8203;2389](https://github.com/evanw/esbuild/issues/2389)) This change fixes a bug where the `name` property could previously be incorrect within a class static context when using `--keep-names`. The problem was that the `name` property was being initialized after static blocks were run instead of before. This has been fixed by moving the `name` property initializer into a static block at the top of the class body: ```js // Original code if (typeof Foo === 'undefined') { let Foo = class { static test = this.name } console.log(Foo.test) } // Old output (with --keep-names) if (typeof Foo === "undefined") { let Foo2 = /* @&#8203;__PURE__ */ __name(class { static test = this.name; }, "Foo"); console.log(Foo2.test); } // New output (with --keep-names) if (typeof Foo === "undefined") { let Foo2 = class { static { __name(this, "Foo"); } static test = this.name; }; console.log(Foo2.test); } ``` This change was somewhat involved, especially regarding what esbuild considers to be side-effect free. Some unused classes that weren't removed by tree shaking in previous versions of esbuild may now be tree-shaken. One example is classes with static private fields that are transformed by esbuild into code that doesn't use JavaScript's private field syntax. Previously esbuild's tree shaking analysis ran on the class after syntax lowering, but with this release it will run on the class before syntax lowering, meaning it should no longer be confused by class mutations resulting from automatically-generated syntax lowering code. </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 [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4yNC42IiwidXBkYXRlZEluVmVyIjoiMzUuMjQuNiJ9-->
renovate added the
dependencies
label 2023-06-13 03:06:11 +00:00
renovate added 1 commit 2023-06-13 03:06:11 +00:00
chore(deps): update dependency esbuild to v0.18.2
All checks were successful
continuous-integration/drone/pr Build is passing
15303586ac
Member

Hi renovate!

Thank you for creating a PR!

I've deployed the changes of this PR on a preview environment under this URL: https://3597-renovate-esbuild-0-x--vikunja-frontend-preview.netlify.app

You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/.

Have a nice day!

Beep boop, I'm a bot.

Hi renovate! Thank you for creating a PR! I've deployed the changes of this PR on a preview environment under this URL: https://3597-renovate-esbuild-0-x--vikunja-frontend-preview.netlify.app You can use this url to view the changes live and test them out. You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/. Have a nice day! > Beep boop, I'm a bot.
konrad merged commit 6407644138 into main 2023-06-13 05:54:07 +00:00
konrad deleted branch renovate/esbuild-0.x 2023-06-13 05:54:07 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.