Update dependency esbuild to v0.12.18 #638

Merged
konrad merged 1 commits from renovate/esbuild-0.x into main 2021-08-05 19:13:09 +00:00
Member

This PR contains the following updates:

Package Type Update Change
esbuild devDependencies patch 0.12.17 -> 0.12.18

Release Notes

evanw/esbuild

v0.12.18

Compare Source

  • Allow implicit ./ in CSS @import paths (#​1494)

    In the browser, the paths inside CSS @import rules are implicitly relative to the path of the current CSS style sheet. Previously esbuild used node's JS path resolution rules in CSS as well, which required a ./ or ../ prefix for a path to be considered a relative path. Paths without that prefix are considered package paths and are searched for inside node_modules instead.

    With this release, esbuild will now first try to interpret the path as a relative path and then fall back to interpreting it as a package path if nothing exists at that relative path. This feature was originally added in version 0.7.18 but only worked for CSS url() tokens. In this release it now also works for @import rules.

    This feature was contributed by @​pd4d10.

  • Fix lowering of nullish coalescing assignment edge case (#​1493)

    This release fixes a bug where lowering of the ??= nullish coalescing assignment operator failed when the target environment supported nullish coalescing and private class fields but not nullish coalescing assignment. An example target environment with this specific feature support matrix combination is node 14.8. This edge case is now lowered correctly:

    // Original code
    class A {
      #a;
      f() {
        this.#a ??= 1;
      }
    }
    
    // Old output (with --target=node14.8)
    panic: Unexpected expression of type *js_ast.EPrivateIdentifier
    
    // New output (with --target=node14.8)
    class A {
      #a;
      f() {
        this.#a ?? (this.#a = 1);
      }
    }
    
  • Fix public fields being inserted before super() call (#​1497)

    The helper function that esbuild uses to emulate the new public class field syntax can potentially be inserted into the class constructor before the super() call. That is problematic because the helper function makes use of this, and this must only be used after the super() call. This release fixes a case where this happens when minification is enabled:

    // Original code
    class A extends B {
      x;
      constructor() {
        f();
        super();
      }
    }
    
    // Old output (with --minify-syntax --target=es6)
    class A extends B {
      constructor() {
        __publicField(this, "x");
        f(), super();
      }
    }
    
    // New output (with --minify-syntax --target=es6)
    class A extends B {
      constructor() {
        f();
        super();
        __publicField(this, "x");
      }
    }
    
  • Fix lowering of static private methods in class expressions (#​1498)

    Previously static private methods were lowered incorrectly when present in class expressions. The class expression itself was missing in the output due to an oversight (variable shadowing). This issue has been fixed:

    // Original code
    (class {
      static #x() {}
    });
    
    // Old output (with --target=es6)
    var _x, _a, x_fn;
    __privateAdd(_a, _x), _x = new WeakSet(), x_fn = function() {
    }, __privateAdd(_a, _x), _a;
    
    // New output (with --target=es6)
    var _x, _a, x_fn;
    _a = class {
    }, _x = new WeakSet(), x_fn = function() {
    }, __privateAdd(_a, _x), _a;
    

Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

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.12.17` -> `0.12.18`](https://renovatebot.com/diffs/npm/esbuild/0.12.17/0.12.18) | --- ### Release Notes <details> <summary>evanw/esbuild</summary> ### [`v0.12.18`](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md#&#8203;01218) [Compare Source](https://github.com/evanw/esbuild/compare/v0.12.17...v0.12.18) - Allow implicit `./` in CSS `@import` paths ([#&#8203;1494](https://github.com/evanw/esbuild/pull/1494)) In the browser, the paths inside CSS `@import` rules are implicitly relative to the path of the current CSS style sheet. Previously esbuild used node's JS path resolution rules in CSS as well, which required a `./` or `../` prefix for a path to be considered a relative path. Paths without that prefix are considered package paths and are searched for inside `node_modules` instead. With this release, esbuild will now first try to interpret the path as a relative path and then fall back to interpreting it as a package path if nothing exists at that relative path. This feature was originally added in version 0.7.18 but only worked for CSS `url()` tokens. In this release it now also works for `@import` rules. This feature was contributed by [@&#8203;pd4d10](https://github.com/pd4d10). - Fix lowering of nullish coalescing assignment edge case ([#&#8203;1493](https://github.com/evanw/esbuild/issues/1493)) This release fixes a bug where lowering of the `??=` nullish coalescing assignment operator failed when the target environment supported nullish coalescing and private class fields but not nullish coalescing assignment. An example target environment with this specific feature support matrix combination is node 14.8. This edge case is now lowered correctly: ```js // Original code class A { #a; f() { this.#a ??= 1; } } // Old output (with --target=node14.8) panic: Unexpected expression of type *js_ast.EPrivateIdentifier // New output (with --target=node14.8) class A { #a; f() { this.#a ?? (this.#a = 1); } } ``` - Fix public fields being inserted before `super()` call ([#&#8203;1497](https://github.com/evanw/esbuild/issues/1497)) The helper function that esbuild uses to emulate the new public class field syntax can potentially be inserted into the class constructor before the `super()` call. That is problematic because the helper function makes use of `this`, and `this` must only be used after the `super()` call. This release fixes a case where this happens when minification is enabled: ```js // Original code class A extends B { x; constructor() { f(); super(); } } // Old output (with --minify-syntax --target=es6) class A extends B { constructor() { __publicField(this, "x"); f(), super(); } } // New output (with --minify-syntax --target=es6) class A extends B { constructor() { f(); super(); __publicField(this, "x"); } } ``` - Fix lowering of static private methods in class expressions ([#&#8203;1498](https://github.com/evanw/esbuild/issues/1498)) Previously static private methods were lowered incorrectly when present in class expressions. The class expression itself was missing in the output due to an oversight (variable shadowing). This issue has been fixed: ```js // Original code (class { static #x() {} }); // Old output (with --target=es6) var _x, _a, x_fn; __privateAdd(_a, _x), _x = new WeakSet(), x_fn = function() { }, __privateAdd(_a, _x), _a; // New output (with --target=es6) var _x, _a, x_fn; _a = class { }, _x = new WeakSet(), x_fn = function() { }, __privateAdd(_a, _x), _a; ``` </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **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 added the
dependencies
label 2021-08-05 06:01:38 +00:00
renovate force-pushed renovate/esbuild-0.x from 582424bfd3 to 882d275d28 2021-08-05 15:01:24 +00:00 Compare
renovate force-pushed renovate/esbuild-0.x from 882d275d28 to 83f2bc8057 2021-08-05 18:02:03 +00:00 Compare
konrad merged commit 4a8773d806 into main 2021-08-05 19:13:09 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.