chore(deps): update dependency esbuild to v0.14.26 #1670

Merged
konrad merged 1 commits from renovate/esbuild-0.x into main 2022-03-14 07:01:05 +00:00
Member

This PR contains the following updates:

Package Type Update Change
esbuild devDependencies patch 0.14.25 -> 0.14.26

Release Notes

evanw/esbuild

v0.14.26

Compare Source

  • Fix a tree shaking regression regarding var declarations (#​2080, #​2085, #​2098, #​2099)

    Version 0.14.8 of esbuild enabled removal of duplicate function declarations when minification is enabled (see #​610):

    // Original code
    function x() { return 1 }
    console.log(x())
    function x() { return 2 }
    
    // Output (with --minify-syntax)
    console.log(x());
    function x() {
      return 2;
    }
    

    This transformation is safe because function declarations are "hoisted" in JavaScript, which means they are all done first before any other code is evaluted. This means the last function declaration will overwrite all previous function declarations with the same name.

    However, this introduced an unintentional regression for var declarations in which all but the last declaration was dropped if tree-shaking was enabled. This only happens for top-level var declarations that re-declare the same variable multiple times. This regression has now been fixed:

    // Original code
    var x = 1
    console.log(x)
    var x = 2
    
    // Old output (with --tree-shaking=true)
    console.log(x);
    var x = 2;
    
    // New output (with --tree-shaking=true)
    var x = 1;
    console.log(x);
    var x = 2;
    

    This case now has test coverage.

  • Add support for parsing "instantiation expressions" from TypeScript 4.7 (#​2038)

    The upcoming version of TypeScript now lets you specify <...> type parameters on a JavaScript identifier without using a call expression:

    const ErrorMap = Map<string, Error>;  // new () => Map<string, Error>
    const errorMap = new ErrorMap();  // Map<string, Error>
    

    With this release, esbuild can now parse these new type annotations. This feature was contributed by @​g-plane.

  • Avoid new Function in esbuild's library code (#​2081)

    Some JavaScript environments such as Cloudflare Workers or Deno Deploy don't allow new Function because they disallow dynamic JavaScript evaluation. Previously esbuild's WebAssembly-based library used this to construct the WebAssembly worker function. With this release, the code is now inlined without using new Function so it will be able to run even when this restriction is in place.

  • Drop superfluous __name() calls (#​2062)

    When the --keep-names option is specified, esbuild inserts calls to a __name helper function to ensure that the .name property on function and class objects remains consistent even if the function or class name is renamed to avoid a name collision or because name minification is enabled. With this release, esbuild will now try to omit these calls to the __name helper function when the name of the function or class object was not renamed during the linking process after all:

    // Original code
    import { foo as foo1 } from 'data:text/javascript,export function foo() { return "foo1" }'
    import { foo as foo2 } from 'data:text/javascript,export function foo() { return "foo2" }'
    console.log(foo1.name, foo2.name)
    
    // Old output (with --bundle --keep-names)
    (() => {
      var __defProp = Object.defineProperty;
      var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
      function foo() {
        return "foo1";
      }
      __name(foo, "foo");
      function foo2() {
        return "foo2";
      }
      __name(foo2, "foo");
      console.log(foo.name, foo2.name);
    })();
    
    // New output (with --bundle --keep-names)
    (() => {
      var __defProp = Object.defineProperty;
      var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
      function foo() {
        return "foo1";
      }
      function foo2() {
        return "foo2";
      }
      __name(foo2, "foo");
      console.log(foo.name, foo2.name);
    })();
    

    Notice how one of the calls to __name is now no longer printed. This change was contributed by @​indutny.


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, click this checkbox.

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.14.25` -> `0.14.26`](https://renovatebot.com/diffs/npm/esbuild/0.14.25/0.14.26) | --- ### Release Notes <details> <summary>evanw/esbuild</summary> ### [`v0.14.26`](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md#&#8203;01426) [Compare Source](https://github.com/evanw/esbuild/compare/v0.14.25...v0.14.26) - Fix a tree shaking regression regarding `var` declarations ([#&#8203;2080](https://github.com/evanw/esbuild/issues/2080), [#&#8203;2085](https://github.com/evanw/esbuild/pull/2085), [#&#8203;2098](https://github.com/evanw/esbuild/issues/2098), [#&#8203;2099](https://github.com/evanw/esbuild/issues/2099)) Version 0.14.8 of esbuild enabled removal of duplicate function declarations when minification is enabled (see [#&#8203;610](https://github.com/evanw/esbuild/issues/610)): ```js // Original code function x() { return 1 } console.log(x()) function x() { return 2 } // Output (with --minify-syntax) console.log(x()); function x() { return 2; } ``` This transformation is safe because function declarations are "hoisted" in JavaScript, which means they are all done first before any other code is evaluted. This means the last function declaration will overwrite all previous function declarations with the same name. However, this introduced an unintentional regression for `var` declarations in which all but the last declaration was dropped if tree-shaking was enabled. This only happens for top-level `var` declarations that re-declare the same variable multiple times. This regression has now been fixed: ```js // Original code var x = 1 console.log(x) var x = 2 // Old output (with --tree-shaking=true) console.log(x); var x = 2; // New output (with --tree-shaking=true) var x = 1; console.log(x); var x = 2; ``` This case now has test coverage. - Add support for parsing "instantiation expressions" from TypeScript 4.7 ([#&#8203;2038](https://github.com/evanw/esbuild/pull/2038)) The upcoming version of TypeScript now lets you specify `<...>` type parameters on a JavaScript identifier without using a call expression: ```ts const ErrorMap = Map<string, Error>; // new () => Map<string, Error> const errorMap = new ErrorMap(); // Map<string, Error> ``` With this release, esbuild can now parse these new type annotations. This feature was contributed by [@&#8203;g-plane](https://github.com/g-plane). - Avoid `new Function` in esbuild's library code ([#&#8203;2081](https://github.com/evanw/esbuild/issues/2081)) Some JavaScript environments such as Cloudflare Workers or Deno Deploy don't allow `new Function` because they disallow dynamic JavaScript evaluation. Previously esbuild's WebAssembly-based library used this to construct the WebAssembly worker function. With this release, the code is now inlined without using `new Function` so it will be able to run even when this restriction is in place. - Drop superfluous `__name()` calls ([#&#8203;2062](https://github.com/evanw/esbuild/pull/2062)) When the `--keep-names` option is specified, esbuild inserts calls to a `__name` helper function to ensure that the `.name` property on function and class objects remains consistent even if the function or class name is renamed to avoid a name collision or because name minification is enabled. With this release, esbuild will now try to omit these calls to the `__name` helper function when the name of the function or class object was not renamed during the linking process after all: ```js // Original code import { foo as foo1 } from 'data:text/javascript,export function foo() { return "foo1" }' import { foo as foo2 } from 'data:text/javascript,export function foo() { return "foo2" }' console.log(foo1.name, foo2.name) // Old output (with --bundle --keep-names) (() => { var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); function foo() { return "foo1"; } __name(foo, "foo"); function foo2() { return "foo2"; } __name(foo2, "foo"); console.log(foo.name, foo2.name); })(); // New output (with --bundle --keep-names) (() => { var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); function foo() { return "foo1"; } function foo2() { return "foo2"; } __name(foo2, "foo"); console.log(foo.name, foo2.name); })(); ``` Notice how one of the calls to `__name` is now no longer printed. This change was contributed by [@&#8203;indutny](https://github.com/indutny). </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, click this checkbox. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
renovate added the
dependencies
label 2022-03-14 06:05:27 +00:00
renovate added 1 commit 2022-03-14 06:05:28 +00:00
continuous-integration/drone/pr Build is passing Details
9ae3d1e6d8
chore(deps): update dependency esbuild to v0.14.26
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://1670-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://1670-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 d29c7db4b6 into main 2022-03-14 07:01:05 +00:00
konrad deleted branch renovate/esbuild-0.x 2022-03-14 07:01:05 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.