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

Build(deps-dev): Bump esbuild from 0.14.29 to 0.14.30 #12581

Merged
merged 1 commit into from Apr 2, 2022

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Apr 2, 2022

Bumps esbuild from 0.14.29 to 0.14.30.

Release notes

Sourced from esbuild's releases.

v0.14.30

  • Change the context of TypeScript parameter decorators (#2147)

    While TypeScript parameter decorators are expressions, they are not evaluated where they exist in the code. They are moved to after the class declaration and evaluated there instead. Specifically this TypeScript code:

    class Class {
      method(@decorator() arg) {}
    }

    becomes this JavaScript code:

    class Class {
      method(arg) {}
    }
    __decorate([
      __param(0, decorator())
    ], Class.prototype, "method", null);

    This has several consequences:

    • Whether await is allowed inside a decorator expression or not depends on whether the class declaration itself is in an async context or not. With this release, you can now use await inside a decorator expression when the class declaration is either inside an async function or is at the top-level of an ES module and top-level await is supported. Note that the TypeScript compiler currently has a bug regarding this edge case: microsoft/TypeScript#48509.

      // Using "await" inside a decorator expression is now allowed
      async function fn(foo: Promise<any>) {
        class Class {
          method(@decorator(await foo) arg) {}
        }
        return Class
      }

      Also while TypeScript currently allows await to be used like this in async functions, it doesn't currently allow yield to be used like this in generator functions. It's not yet clear whether this behavior with yield is a bug or by design, so I haven't made any changes to esbuild's handling of yield inside decorator expressions in this release.

    • Since the scope of a decorator expression is the scope enclosing the class declaration, they cannot access private identifiers. Previously this was incorrectly allowed but with this release, esbuild no longer allows this. Note that the TypeScript compiler currently has a bug regarding this edge case: microsoft/TypeScript#48515.

      // Using private names inside a decorator expression is no longer allowed
      class Class {
        static #priv = 123
        method(@decorator(Class.#priv) arg) {}
      }
    • Since the scope of a decorator expression is the scope enclosing the class declaration, identifiers inside parameter decorator expressions should never be resolved to a parameter of the enclosing method. Previously this could happen, which was a bug with esbuild. This bug no longer happens in this release.

... (truncated)

Changelog

Sourced from esbuild's changelog.

0.14.30

  • Change the context of TypeScript parameter decorators (#2147)

    While TypeScript parameter decorators are expressions, they are not evaluated where they exist in the code. They are moved to after the class declaration and evaluated there instead. Specifically this TypeScript code:

    class Class {
      method(@decorator() arg) {}
    }

    becomes this JavaScript code:

    class Class {
      method(arg) {}
    }
    __decorate([
      __param(0, decorator())
    ], Class.prototype, "method", null);

    This has several consequences:

    • Whether await is allowed inside a decorator expression or not depends on whether the class declaration itself is in an async context or not. With this release, you can now use await inside a decorator expression when the class declaration is either inside an async function or is at the top-level of an ES module and top-level await is supported. Note that the TypeScript compiler currently has a bug regarding this edge case: microsoft/TypeScript#48509.

      // Using "await" inside a decorator expression is now allowed
      async function fn(foo: Promise<any>) {
        class Class {
          method(@decorator(await foo) arg) {}
        }
        return Class
      }

      Also while TypeScript currently allows await to be used like this in async functions, it doesn't currently allow yield to be used like this in generator functions. It's not yet clear whether this behavior with yield is a bug or by design, so I haven't made any changes to esbuild's handling of yield inside decorator expressions in this release.

    • Since the scope of a decorator expression is the scope enclosing the class declaration, they cannot access private identifiers. Previously this was incorrectly allowed but with this release, esbuild no longer allows this. Note that the TypeScript compiler currently has a bug regarding this edge case: microsoft/TypeScript#48515.

      // Using private names inside a decorator expression is no longer allowed
      class Class {
        static #priv = 123
        method(@decorator(Class.#priv) arg) {}
      }
    • Since the scope of a decorator expression is the scope enclosing the class declaration, identifiers inside parameter decorator expressions should never be resolved to a parameter of the enclosing method. Previously this could happen, which was a bug with esbuild. This bug no longer happens in this release.

... (truncated)

Commits
  • e568c4e publish 0.14.30 to npm
  • c1fbfd0 changelog: containing => contained
  • f4c6b54 fix another super class lowering edge case
  • ae23f41 test coverage for potential default export failure
  • c9e2fdb fix some generated temporary use counts
  • e16cde0 async method + super + object + loop test coverage
  • 8b236f3 internal: always pass the class name reference
  • d8ec066 rename shouldLowerSuperPropertyAccess
  • 02a794e always generate the class body shadow symbol
  • 0c9ced5 fix an obscure super property access edge case
  • Additional commits viewable in compare view

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 will merge this PR once CI passes on it, as requested by @fisker.


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)

@dependabot dependabot bot added javascript Pull requests that update Javascript code scope:dependency Issues that cannot be solved inside Prettier itself, and must be fixed in a dependency labels Apr 2, 2022
@fisker
Copy link
Member

fisker commented Apr 2, 2022

@dependabot squash and merge

Bumps [esbuild](https://github.com/evanw/esbuild) from 0.14.29 to 0.14.30.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](evanw/esbuild@v0.14.29...v0.14.30)

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

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/esbuild-0.14.30 branch from 83ae461 to 55d4723 Compare April 2, 2022 07:05
@dependabot dependabot bot merged commit 445d870 into main Apr 2, 2022
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/esbuild-0.14.30 branch April 2, 2022 08:42
medikoo pushed a commit to medikoo/prettier-elastic that referenced this pull request Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code scope:dependency Issues that cannot be solved inside Prettier itself, and must be fixed in a dependency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant