Skip to content
This repository was archived by the owner on Oct 6, 2021. It is now read-only.

Bump esbuild from 0.11.7 to 0.12.23 - #263

Closed
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/esbuild-0.12.23
Closed

Bump esbuild from 0.11.7 to 0.12.23#263
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/esbuild-0.12.23

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 26, 2021

Copy link
Copy Markdown

Bumps esbuild from 0.11.7 to 0.12.23.

Release notes

Sourced from esbuild's releases.

v0.12.23

  • Parsing of rest arguments in certain TypeScript types (#1553)

    This release implements parsing of rest arguments inside object destructuring inside arrow functions inside TypeScript type declarations. Support for rest arguments in this specific syntax was not previously implemented. The following code was incorrectly considered a syntax error before this release, but is no longer considered a syntax error:

    type F = ({ ...rest }) => void;
  • Fix error message for watch: true and buildSync (#1552)

    Watch mode currently only works with the build API. Previously using watch mode with the buildSync API caused a confusing error message. This release explicitly disallows doing this, so the error message is now more clear.

  • Fix an minification bug with the --keep-names option (#1552)

    This release fixes a subtle bug that happens with --keep-names --minify and nested function declarations in strict mode code. It can be triggered by the following code, which was being compiled incorrectly under those flags:

    export function outer() {
      {
        function inner() {
          return Math.random();
        }
        const x = inner();
        console.log(x);
      }
    }
    outer();

    The bug was caused by an unfortunate interaction between a few of esbuild's behaviors:

    1. Function declarations inside of nested scopes behave differently in different situations, so esbuild rewrites this function declaration to a local variable initialized to a function expression instead so that it behaves the same in all situations.

      More specifically, the interpretation of such function declarations depends on whether or not it currently exists in a strict mode context:

      > (function(){ { function x(){} } return x })()
      function x() {}
      

      > (function(){ 'use strict'; { function x(){} } return x })() ❌ Uncaught ReferenceError: x is not defined

      The bundling process sometimes erases strict mode context. For example, different files may have different strict mode status but may be merged into a single file which all shares the same strict mode status. Also, files in ESM format are automatically in strict mode but a bundle output file in IIFE format may not be executed in strict mode. Transforming the nested function to a let in strict mode and a var in non-strict mode means esbuild's output will behave reliably in different environments.

    2. The "keep names" feature adds automatic calls to the built-in __name helper function to assign the original name to the .name property of the minified function object at run-time. That transforms the code into this:

      let inner = function() {

... (truncated)

Changelog

Sourced from esbuild's changelog.

0.12.23

  • Parsing of rest arguments in certain TypeScript types (#1553)

    This release implements parsing of rest arguments inside object destructuring inside arrow functions inside TypeScript type declarations. Support for rest arguments in this specific syntax was not previously implemented. The following code was incorrectly considered a syntax error before this release, but is no longer considered a syntax error:

    type F = ({ ...rest }) => void;
  • Fix error message for watch: true and buildSync (#1552)

    Watch mode currently only works with the build API. Previously using watch mode with the buildSync API caused a confusing error message. This release explicitly disallows doing this, so the error message is now more clear.

  • Fix an minification bug with the --keep-names option (#1552)

    This release fixes a subtle bug that happens with --keep-names --minify and nested function declarations in strict mode code. It can be triggered by the following code, which was being compiled incorrectly under those flags:

    export function outer() {
      {
        function inner() {
          return Math.random();
        }
        const x = inner();
        console.log(x);
      }
    }
    outer();

    The bug was caused by an unfortunate interaction between a few of esbuild's behaviors:

    1. Function declarations inside of nested scopes behave differently in different situations, so esbuild rewrites this function declaration to a local variable initialized to a function expression instead so that it behaves the same in all situations.

      More specifically, the interpretation of such function declarations depends on whether or not it currently exists in a strict mode context:

      > (function(){ { function x(){} } return x })()
      function x() {}
      

      > (function(){ 'use strict'; { function x(){} } return x })() ❌ Uncaught ReferenceError: x is not defined

      The bundling process sometimes erases strict mode context. For example, different files may have different strict mode status but may be merged into a single file which all shares the same strict mode status. Also, files in ESM format are automatically in strict mode but a bundle output file in IIFE format may not be executed in strict mode. Transforming the nested function to a let in strict mode and a var in non-strict mode means esbuild's output will behave reliably in different environments.

    2. The "keep names" feature adds automatic calls to the built-in __name helper function to assign the original name to the .name property of the minified function object at run-time. That transforms the code into this:

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [esbuild](https://github.com/evanw/esbuild) from 0.11.7 to 0.12.23.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](evanw/esbuild@v0.11.7...v0.12.23)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added the dependencies Pull requests that update a dependency file label Aug 26, 2021
@vercel

vercel Bot commented Aug 26, 2021

Copy link
Copy Markdown

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/monkatraz/mainframe/8yNnSNA36DjGRoxPSZJbh8oxTQ6g
✅ Preview: https://mainframe-git-dependabot-npmandyarnesbuild-01223-monkatraz.vercel.app

@dependabot @github

dependabot Bot commented on behalf of github Aug 30, 2021

Copy link
Copy Markdown
Author

Superseded by #265.

@dependabot dependabot Bot closed this Aug 30, 2021
@dependabot
dependabot Bot deleted the dependabot/npm_and_yarn/esbuild-0.12.23 branch August 30, 2021 12:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants