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

chore(deps): update dependency esbuild to v0.18.6 #8670

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 20, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
esbuild 0.18.4 -> 0.18.6 age adoption passing confidence

Release Notes

evanw/esbuild

v0.18.6

Compare Source

  • Fix tree-shaking of classes with decorators (#​3164)

    This release fixes a bug where esbuild incorrectly allowed tree-shaking on classes with decorators. Each decorator is a function call, so classes with decorators must never be tree-shaken. This bug was a regression that was unintentionally introduced in version 0.18.2 by the change that enabled tree-shaking of lowered private fields. Previously decorators were always lowered, and esbuild always considered the automatically-generated decorator code to be a side effect. But this is no longer the case now that esbuild analyzes side effects using the AST before lowering takes place. This bug was fixed by considering any decorator a side effect.

  • Fix a minification bug involving function expressions (#​3125)

    When minification is enabled, esbuild does limited inlining of const symbols at the top of a scope. This release fixes a bug where inlineable symbols were incorrectly removed assuming that they were inlined. They may not be inlined in cases where they were referenced by earlier constants in the body of a function expression. The declarations involved in these edge cases are now kept instead of being removed:

    // Original code
    {
      const fn = () => foo
      const foo = 123
      console.log(fn)
    }
    
    // Old output (with --minify-syntax)
    console.log((() => foo)());
    
    // New output (with --minify-syntax)
    {
      const fn = () => foo, foo = 123;
      console.log(fn);
    }

v0.18.5

Compare Source

  • Implement auto accessors (#​3009)

    This release implements the new auto-accessor syntax from the upcoming JavaScript decorators proposal. The auto-accessor syntax looks like this:

    class Foo {
      accessor foo;
      static accessor bar;
    }
    new Foo().foo = Foo.bar;

    This syntax is not yet a part of JavaScript but it was added to TypeScript in version 4.9. More information about this feature can be found in microsoft/TypeScript#​49705. Auto-accessors will be transformed if the target is set to something other than esnext:

    // Output (with --target=esnext)
    class Foo {
      accessor foo;
      static accessor bar;
    }
    new Foo().foo = Foo.bar;
    
    // Output (with --target=es2022)
    class Foo {
      #foo;
      get foo() {
        return this.#foo;
      }
      set foo(_) {
        this.#foo = _;
      }
      static #bar;
      static get bar() {
        return this.#bar;
      }
      static set bar(_) {
        this.#bar = _;
      }
    }
    new Foo().foo = Foo.bar;
    
    // Output (with --target=es2021)
    var _foo, _bar;
    class Foo {
      constructor() {
        __privateAdd(this, _foo, void 0);
      }
      get foo() {
        return __privateGet(this, _foo);
      }
      set foo(_) {
        __privateSet(this, _foo, _);
      }
      static get bar() {
        return __privateGet(this, _bar);
      }
      static set bar(_) {
        __privateSet(this, _bar, _);
      }
    }
    _foo = new WeakMap();
    _bar = new WeakMap();
    __privateAdd(Foo, _bar, void 0);
    new Foo().foo = Foo.bar;

    You can also now use auto-accessors with esbuild's TypeScript experimental decorator transformation, which should behave the same as decorating the underlying getter/setter pair.

    Please keep in mind that this syntax is not yet part of JavaScript. This release enables auto-accessors in .js files with the expectation that it will be a part of JavaScript soon. However, esbuild may change or remove this feature in the future if JavaScript ends up changing or removing this feature. Use this feature with caution for now.

  • Pass through JavaScript decorators (#​104)

    In this release, esbuild now parses decorators from the upcoming JavaScript decorators proposal and passes them through to the output unmodified (as long as the language target is set to esnext). Transforming JavaScript decorators to environments that don't support them has not been implemented yet. The only decorator transform that esbuild currently implements is still the TypeScript experimental decorator transform, which only works in .ts files and which requires "experimentalDecorators": true in your tsconfig.json file.

  • Static fields with assign semantics now use static blocks if possible

    Setting useDefineForClassFields to false in TypeScript requires rewriting class fields to assignment statements. Previously this was done by removing the field from the class body and adding an assignment statement after the class declaration. However, this also caused any private fields to also be lowered by necessity (in case a field initializer uses a private symbol, either directly or indirectly). This release changes this transform to use an inline static block if it's supported, which avoids needing to lower private fields in this scenario:

    // Original code
    class Test {
      static #foo = 123
      static bar = this.#foo
    }
    
    // Old output (with useDefineForClassFields=false)
    var _foo;
    const _Test = class _Test {
    };
    _foo = new WeakMap();
    __privateAdd(_Test, _foo, 123);
    _Test.bar = __privateGet(_Test, _foo);
    let Test = _Test;
    
    // New output (with useDefineForClassFields=false)
    class Test {
      static #foo = 123;
      static {
        this.bar = this.#foo;
      }
    }
  • Fix TypeScript experimental decorators combined with --mangle-props (#​3177)

    Previously using TypeScript experimental decorators combined with the --mangle-props setting could result in a crash, as the experimental decorator transform was not expecting a mangled property as a class member. This release fixes the crash so you can now combine both of these features together safely.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - 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 these updates again.


  • If you want to rebase/retry this PR, check this box

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

@renovate renovate bot added the release:chore This PR is a chore (means nothing for users) label Jun 20, 2023
@renovate renovate bot force-pushed the renovate/esbuild-0.x branch 4 times, most recently from 97d9094 to edb5249 Compare June 20, 2023 21:15
@renovate renovate bot changed the title chore(deps): update dependency esbuild to v0.18.5 chore(deps): update dependency esbuild to v0.18.6 Jun 21, 2023
@renovate renovate bot force-pushed the renovate/esbuild-0.x branch 2 times, most recently from b75259f to 33fa1ac Compare June 21, 2023 03:17
@renovate renovate bot merged commit 3d49d67 into main Jun 21, 2023
28 checks passed
@renovate renovate bot deleted the renovate/esbuild-0.x branch June 21, 2023 11:39
@redwoodjs-bot redwoodjs-bot bot added this to the next-release milestone Jun 21, 2023
dac09 added a commit to dac09/redwood that referenced this pull request Jun 21, 2023
…redwood into codemod/replace-svg-as-components

* 'codemod/replace-svg-as-components' of github.com:dac09/redwood:
  chore(deps): update react monorepo (redwoodjs#8677)
  chore(deps): update dependency postcss to v8.4.24 (redwoodjs#8675)
  chore(deps): update dependency esbuild to v0.18.6 (redwoodjs#8670)
  chore(deps): update dependency dependency-cruiser to v13.0.4 (redwoodjs#8674)
  chore(deps): update dependency autoprefixer to v10.4.14 (redwoodjs#8668)
  chore(deps): update dependency @clerk/clerk-react to v4.20.5 (redwoodjs#8672)
  Fix typos in documentation (redwoodjs#8659)
  fix(docs): Fix & make verifyOwnership consistent (redwoodjs#8596)
  chore(deps): update dependency vite to v4.1.5 [security] (redwoodjs#8671)
  fix(deps): update dependency react-hook-form to v7.45.0 (redwoodjs#8664)
  chore(studio): update tremor to v3 (redwoodjs#8645)
  fix(deps): update dependency webpack to v5.87.0 (redwoodjs#8549)
  fix(deps): update dependency dotenv to v16.3.1 (redwoodjs#8663)
  chore(deps): update dependency @clerk/clerk-react to v4.20.4 (redwoodjs#8662)
  fix(vite): Change config for mantine and chakra to use export default (redwoodjs#8639)
  fix(deps): update storybook monorepo to v7.0.22 (redwoodjs#8652)
  Fix failing v5 codemod for DevFatalErrorPage (redwoodjs#8661)
@jtoar jtoar modified the milestones: next-release, v5.4.0 Jun 22, 2023
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.

None yet

1 participant