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

fix(deps): update dependency esbuild to v0.14.26 #4747

Merged
merged 1 commit into from
Mar 14, 2022
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 14, 2022

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
esbuild 0.14.25 -> 0.14.26 age adoption passing confidence

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

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate renovate bot added the release:chore This PR is a chore (means nothing for users) label Mar 14, 2022
@renovate renovate bot force-pushed the renovate/esbuild-0.x branch 2 times, most recently from de8c83f to bdef1e2 Compare March 14, 2022 13:12
@renovate renovate bot force-pushed the renovate/esbuild-0.x branch from bdef1e2 to 3d2f14c Compare March 14, 2022 15:40
@renovate renovate bot merged commit f5c3e34 into main Mar 14, 2022
@renovate renovate bot deleted the renovate/esbuild-0.x branch March 14, 2022 17:59
@jtoar jtoar added this to the next-release milestone Mar 14, 2022
dac09 added a commit to dac09/redwood that referenced this pull request Mar 15, 2022
…d into feat/auth-checks-smoke-test

* 'feat/auth-checks-smoke-test' of github.com:dac09/redwood:
  fix(deps): update dependency esbuild to v0.14.27 (redwoodjs#4755)
  chore(deps): update dependency cypress to v9.5.2 (redwoodjs#4754)
  chore(deps): update dependency @types/lodash to v4.14.180 (redwoodjs#4751)
  fix(deps): update typescript-eslint monorepo to v5.15.0 (redwoodjs#4752)
  fix(deps): update dependency esbuild to v0.14.26 (redwoodjs#4747)
  Setup futureExpiresDate in constructor (redwoodjs#4742)
  chore(deps): update dependency @clerk/clerk-sdk-node to v2.9.10 (redwoodjs#4746)
  fix(deps): update dependency eslint-plugin-react to v7.29.4 (redwoodjs#4745)
@thedavidprice thedavidprice modified the milestones: next-release, v0.50.0 Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:chore This PR is a chore (means nothing for users)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants