Skip to content

chore(deps): update devdependencies#762

Merged
ST-DDT merged 1 commit intomainfrom
renovate/devdependencies
Apr 3, 2022
Merged

chore(deps): update devdependencies#762
ST-DDT merged 1 commit intomainfrom
renovate/devdependencies

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Apr 3, 2022

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
esbuild ~0.14.29 -> ~0.14.30 age adoption passing confidence
eslint-plugin-jsdoc ~38.1.4 -> ~38.1.6 age adoption passing confidence

Release Notes

evanw/esbuild

v0.14.30

Compare Source

  • 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: Parameter decorators use incorrect async/await context, generated code has syntax error microsoft/TypeScript#48509.

      // Using "await" inside a decorator expression is now allowed
      async function fn(foo: Promise<any>) {
        class Class {
          method(@&#8203;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: Decorators broken with private fields, generated code has syntax error microsoft/TypeScript#48515.

      // Using private names inside a decorator expression is no longer allowed
      class Class {
        static #priv = 123
        method(@&#8203;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.

      // Name collisions now resolve to the outer name instead of the inner name
      let arg = 1
      class Class {
        method(@&#8203;decorator(arg) arg = 2) {}
      }

      Specifically previous versions of esbuild generated the following incorrect JavaScript (notice the use of arg2):

      let arg = 1;
      class Class {
        method(arg2 = 2) {
        }
      }
      __decorateClass([
        __decorateParam(0, decorator(arg2))
      ], Class.prototype, "method", 1);

      This release now generates the following correct JavaScript (notice the use of arg):

      let arg = 1;
      class Class {
        method(arg2 = 2) {
        }
      }
      __decorateClass([
        __decorateParam(0, decorator(arg))
      ], Class.prototype, "method", 1);
  • Fix some obscure edge cases with super property access

    This release fixes the following obscure problems with super when targeting an older JavaScript environment such as --target=es6:

    1. The compiler could previously crash when a lowered async arrow function contained a class with a field initializer that used a super property access:

      let foo = async () => class extends Object {
        bar = super.toString
      }
    2. The compiler could previously generate incorrect code when a lowered async method of a derived class contained a nested class with a computed class member involving a super property access on the derived class:

      class Base {
        foo() { return 'bar' }
      }
      class Derived extends Base {
        async foo() {
          return new class { [super.foo()] = 'success' }
        }
      }
      new Derived().foo().then(obj => console.log(obj.bar))
    3. The compiler could previously generate incorrect code when a default-exported class contained a super property access inside a lowered static private class field:

      class Foo {
        static foo = 123
      }
      export default class extends Foo {
        static #foo = super.foo
        static bar = this.#foo
      }
gajus/eslint-plugin-jsdoc

v38.1.6

Compare Source

Bug Fixes
  • no-restricted-syntax, no-missing-syntax: pass on parser's visitorKeys to esquery (f873e32)

v38.1.5

Compare Source

Bug Fixes
  • no-restricted-syntax: include comment in templates and in default error message if present (cc031b8)

Configuration

📅 Schedule: "before 2am" (UTC).

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

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • 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 requested a review from a team as a code owner April 3, 2022 00:51
@renovate renovate Bot added the c: dependencies Pull requests that adds/updates a dependency label Apr 3, 2022
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 3, 2022

Codecov Report

Merging #762 (fc7ab38) into main (4a7760b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #762   +/-   ##
=======================================
  Coverage   99.34%   99.34%           
=======================================
  Files        1922     1922           
  Lines      176479   176479           
  Branches      908      908           
=======================================
  Hits       175326   175326           
  Misses       1097     1097           
  Partials       56       56           

@ST-DDT ST-DDT requested review from a team April 3, 2022 09:55
@ST-DDT ST-DDT merged commit a946435 into main Apr 3, 2022
@ST-DDT ST-DDT deleted the renovate/devdependencies branch April 3, 2022 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: dependencies Pull requests that adds/updates a dependency

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants