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 all non-major dependencies #16

Merged
merged 1 commit into from Jun 19, 2023
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 19, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
esbuild ^0.18.1 -> ^0.18.4 age adoption passing confidence
eslint (source) ^8.42.0 -> ^8.43.0 age adoption passing confidence
vitest ^0.32.0 -> ^0.32.2 age adoption passing confidence

Release Notes

evanw/esbuild

v0.18.4

Compare Source

  • Bundling no longer unnecessarily transforms class syntax (#​1360, #​1328, #​1524, #​2416)

    When bundling, esbuild automatically converts top-level class statements to class expressions. Previously this conversion had the unfortunate side-effect of also transforming certain other class-related syntax features to avoid correctness issues when the references to the class name within the class body. This conversion has been reworked to avoid doing this:

    // Original code
    export class Foo {
      static foo = () => Foo
    }
    
    // Old output (with --bundle)
    var _Foo = class {
    };
    var Foo = _Foo;
    __publicField(Foo, "foo", () => _Foo);
    
    // New output (with --bundle)
    var Foo = class _Foo {
      static foo = () => _Foo;
    };

    This conversion process is very complicated and has many edge cases (including interactions with static fields, static blocks, private class properties, and TypeScript experimental decorators). It should already be pretty robust but a change like this may introduce new unintentional behavior. Please report any issues with this upgrade on the esbuild bug tracker.

    You may be wondering why esbuild needs to do this at all. One reason to do this is that esbuild's bundler sometimes needs to lazily-evaluate a module. For example, a module may end up being both the target of a dynamic import() call and a static import statement. Lazy module evaluation is done by wrapping the top-level module code in a closure. To avoid a performance hit for static import statements, esbuild stores top-level exported symbols outside of the closure and references them directly instead of indirectly.

    Another reason to do this is that multiple JavaScript VMs have had and continue to have performance issues with TDZ (i.e. "temporal dead zone") checks. These checks validate that a let, or const, or class symbol isn't used before it's initialized. Here are two issues with well-known VMs:

    JavaScriptCore had a severe performance issue as their TDZ implementation had time complexity that was quadratic in the number of variables needing TDZ checks in the same scope (with the top-level scope typically being the worst offender). V8 has ongoing issues with TDZ checks being present throughout the code their JIT generates even when they have already been checked earlier in the same function or when the function in question has already been run (so the checks have already happened).

    Due to esbuild's parallel architecture, esbuild both a) needs to convert class statements into class expressions during parsing and b) doesn't yet know whether this module will need to be lazily-evaluated or not in the parser. So esbuild always does this conversion during bundling in case it's needed for correctness (and also to avoid potentially catastrophic performance issues due to bundling creating a large scope with many TDZ variables).

  • Enforce TDZ errors in computed class property keys (#​2045)

    JavaScript allows class property keys to be generated at run-time using code, like this:

    class Foo {
      static foo = 'foo'
      static [Foo.foo + '2'] = 2
    }

    Previously esbuild treated references to the containing class name within computed property keys as a reference to the partially-initialized class object. That meant code that attempted to reference properties of the class object (such as the code above) would get back undefined instead of throwing an error.

    This release rewrites references to the containing class name within computed property keys into code that always throws an error at run-time, which is how this JavaScript code is supposed to work. Code that does this will now also generate a warning. You should never write code like this, but it now should be more obvious when incorrect code like this is written.

  • Fix an issue with experimental decorators and static fields (#​2629)

    This release also fixes a bug regarding TypeScript experimental decorators and static class fields which reference the enclosing class name in their initializer. This affected top-level classes when bundling was enabled. Previously code that does this could crash because the class name wasn't initialized yet. This case should now be handled correctly:

    // Original code
    class Foo {
      @​someDecorator
      static foo = 'foo'
      static bar = Foo.foo.length
    }
    
    // Old output
    const _Foo = class {
      static foo = "foo";
      static bar = _Foo.foo.length;
    };
    let Foo = _Foo;
    __decorateClass([
      someDecorator
    ], Foo, "foo", 2);
    
    // New output
    const _Foo = class _Foo {
      static foo = "foo";
      static bar = _Foo.foo.length;
    };
    __decorateClass([
      someDecorator
    ], _Foo, "foo", 2);
    let Foo = _Foo;
  • Fix a minification regression with negative numeric properties (#​3169)

    Version 0.18.0 introduced a regression where computed properties with negative numbers were incorrectly shortened into a non-computed property when minification was enabled. This regression has been fixed:

    // Original code
    x = {
      [1]: 1,
      [-1]: -1,
      [NaN]: NaN,
      [Infinity]: Infinity,
      [-Infinity]: -Infinity,
    }
    
    // Old output (with --minify)
    x={1:1,-1:-1,NaN:NaN,1/0:1/0,-1/0:-1/0};
    
    // New output (with --minify)
    x={1:1,[-1]:-1,NaN:NaN,[1/0]:1/0,[-1/0]:-1/0};

v0.18.3

Compare Source

  • Fix a panic due to empty static class blocks (#​3161)

    This release fixes a bug where an internal invariant that was introduced in the previous release was sometimes violated, which then caused a panic. It happened when bundling code containing an empty static class block with both minification and bundling enabled.

v0.18.2

Compare Source

  • Lower static blocks when static fields are lowered (#​2800, #​2950, #​3025)

    This release fixes a bug where esbuild incorrectly did not lower static class blocks when static class fields needed to be lowered. For example, the following code should print 1 2 3 but previously printed 2 1 3 instead due to this bug:

    // Original code
    class Foo {
      static x = console.log(1)
      static { console.log(2) }
      static y = console.log(3)
    }
    
    // Old output (with --supported:class-static-field=false)
    class Foo {
      static {
        console.log(2);
      }
    }
    __publicField(Foo, "x", console.log(1));
    __publicField(Foo, "y", console.log(3));
    
    // New output (with --supported:class-static-field=false)
    class Foo {
    }
    __publicField(Foo, "x", console.log(1));
    console.log(2);
    __publicField(Foo, "y", console.log(3));
  • Use static blocks to implement --keep-names on classes (#​2389)

    This change fixes a bug where the name property could previously be incorrect within a class static context when using --keep-names. The problem was that the name property was being initialized after static blocks were run instead of before. This has been fixed by moving the name property initializer into a static block at the top of the class body:

    // Original code
    if (typeof Foo === 'undefined') {
      let Foo = class {
        static test = this.name
      }
      console.log(Foo.test)
    }
    
    // Old output (with --keep-names)
    if (typeof Foo === "undefined") {
      let Foo2 = /* @​__PURE__ */ __name(class {
        static test = this.name;
      }, "Foo");
      console.log(Foo2.test);
    }
    
    // New output (with --keep-names)
    if (typeof Foo === "undefined") {
      let Foo2 = class {
        static {
          __name(this, "Foo");
        }
        static test = this.name;
      };
      console.log(Foo2.test);
    }

    This change was somewhat involved, especially regarding what esbuild considers to be side-effect free. Some unused classes that weren't removed by tree shaking in previous versions of esbuild may now be tree-shaken. One example is classes with static private fields that are transformed by esbuild into code that doesn't use JavaScript's private field syntax. Previously esbuild's tree shaking analysis ran on the class after syntax lowering, but with this release it will run on the class before syntax lowering, meaning it should no longer be confused by class mutations resulting from automatically-generated syntax lowering code.

eslint/eslint

v8.43.0

Compare Source

Features

  • 14581ff feat: directive prologue detection and autofix condition in quotes (#​17284) (Francesco Trotta)
  • e50fac3 feat: add declaration loc to message in block-scoped-var (#​17252) (Milos Djermanovic)
  • 1b7faf0 feat: add skipJSXText option to no-irregular-whitespace rule (#​17182) (Azat S)

Bug Fixes

  • 5338b56 fix: normalize cwd passed to ESLint/FlatESLint constructor (#​17277) (Milos Djermanovic)
  • 54383e6 fix: Remove no-extra-parens autofix for potential directives (#​17022) (Francesco Trotta)

Documentation

Chores

vitest-dev/vitest

v0.32.2

Compare Source

   🐞 Bug Fixes
    View changes on GitHub

v0.32.1

Compare Source

   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

Configuration

📅 Schedule: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined).

🚦 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, check this box

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

@stackblitz
Copy link

stackblitz bot commented Jun 19, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@socket-security
Copy link

New and updated dependency changes detected. Learn more about Socket for GitHub ↗︎

🚮 Removed packages: eslint@8.42.0, vitest@0.32.0

@renovate renovate bot force-pushed the renovate/all-minor-patch branch from 566aa79 to 6df4de5 Compare June 19, 2023 02:02
@sxzz sxzz merged commit 4e922a3 into main Jun 19, 2023
6 checks passed
@sxzz sxzz deleted the renovate/all-minor-patch branch June 19, 2023 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant