Socket
Socket
Sign inDemoInstall

@esbuild/android-arm

Package Overview
Dependencies
0
Maintainers
2
Versions
95
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
Previous1
35
10Next

0.18.12

Diff

evanw
published 0.18.11 •

evanw
published 0.18.10 •

evanw
published 0.18.9 •

Changelog

Source

0.18.9

  • Fix await using declarations inside async generator functions

    I forgot about the new await using declarations when implementing lowering for async generator functions in the previous release. This change fixes the transformation of await using declarations when they are inside lowered async generator functions:

    // Original code
    async function* foo() {
      await using x = await y
    }
    
    // Old output (with --supported:async-generator=false)
    function foo() {
      return __asyncGenerator(this, null, function* () {
        await using x = yield new __await(y);
      });
    }
    
    // New output (with --supported:async-generator=false)
    function foo() {
      return __asyncGenerator(this, null, function* () {
        var _stack = [];
        try {
          const x = __using(_stack, yield new __await(y), true);
        } catch (_) {
          var _error = _, _hasError = true;
        } finally {
          var _promise = __callDispose(_stack, _error, _hasError);
          _promise && (yield new __await(_promise));
        }
      });
    }
    
  • Insert some prefixed CSS properties when appropriate (#3122)

    With this release, esbuild will now insert prefixed CSS properties in certain cases when the target setting includes browsers that require a certain prefix. This is currently done for the following properties:

    • appearance: *; => -webkit-appearance: *; -moz-appearance: *;
    • backdrop-filter: *; => -webkit-backdrop-filter: *;
    • background-clip: text => -webkit-background-clip: text;
    • box-decoration-break: *; => -webkit-box-decoration-break: *;
    • clip-path: *; => -webkit-clip-path: *;
    • font-kerning: *; => -webkit-font-kerning: *;
    • hyphens: *; => -webkit-hyphens: *;
    • initial-letter: *; => -webkit-initial-letter: *;
    • mask-image: *; => -webkit-mask-image: *;
    • mask-origin: *; => -webkit-mask-origin: *;
    • mask-position: *; => -webkit-mask-position: *;
    • mask-repeat: *; => -webkit-mask-repeat: *;
    • mask-size: *; => -webkit-mask-size: *;
    • position: sticky; => position: -webkit-sticky;
    • print-color-adjust: *; => -webkit-print-color-adjust: *;
    • tab-size: *; => -moz-tab-size: *; -o-tab-size: *;
    • text-decoration-color: *; => -webkit-text-decoration-color: *; -moz-text-decoration-color: *;
    • text-decoration-line: *; => -webkit-text-decoration-line: *; -moz-text-decoration-line: *;
    • text-decoration-skip: *; => -webkit-text-decoration-skip: *;
    • text-emphasis-color: *; => -webkit-text-emphasis-color: *;
    • text-emphasis-position: *; => -webkit-text-emphasis-position: *;
    • text-emphasis-style: *; => -webkit-text-emphasis-style: *;
    • text-orientation: *; => -webkit-text-orientation: *;
    • text-size-adjust: *; => -webkit-text-size-adjust: *; -ms-text-size-adjust: *;
    • user-select: *; => -webkit-user-select: *; -moz-user-select: *; -ms-user-select: *;

    Here is an example:

    /* Original code */
    div {
      mask-image: url(x.png);
    }
    
    /* Old output (with --target=chrome99) */
    div {
      mask-image: url(x.png);
    }
    
    /* New output (with --target=chrome99) */
    div {
      -webkit-mask-image: url(x.png);
      mask-image: url(x.png);
    }
    

    Browser compatibility data was sourced from the tables on https://caniuse.com. Support for more CSS properties can be added in the future as appropriate.

  • Fix an obscure identifier minification bug (#2809)

    Function declarations in nested scopes behave differently depending on whether or not "use strict" is present. To avoid generating code that behaves differently depending on whether strict mode is enabled or not, esbuild transforms nested function declarations into variable declarations. However, there was a bug where the generated variable name was not being recorded as declared internally, which meant that it wasn't being renamed correctly by the minifier and could cause a name collision. This bug has been fixed:

    // Original code
    const n = ''
    for (let i of [0,1]) {
      function f () {}
    }
    
    // Old output (with --minify-identifiers --format=esm)
    const f = "";
    for (let o of [0, 1]) {
      let n = function() {
      };
      var f = n;
    }
    
    // New output (with --minify-identifiers --format=esm)
    const f = "";
    for (let o of [0, 1]) {
      let n = function() {
      };
      var t = n;
    }
    
  • Fix a bug in esbuild's compatibility table script (#3179)

    Setting esbuild's target to a specific JavaScript engine tells esbuild to use the JavaScript syntax feature compatibility data from https://kangax.github.io/compat-table/es6/ for that engine to determine which syntax features to allow. However, esbuild's script that builds this internal compatibility table had a bug that incorrectly ignores tests for engines that still have outstanding implementation bugs which were never fixed. This change fixes this bug with the script.

    The only case where this changed the information in esbuild's internal compatibility table is that the hermes target is marked as no longer supporting destructuring. This is because there is a failing destructuring-related test for Hermes on https://kangax.github.io/compat-table/es6/. If you want to use destructuring with Hermes anyway, you can pass --supported:destructuring=true to esbuild to override the hermes target and force esbuild to accept this syntax.

    This fix was contributed by @ArrayZoneYour.

evanw
published 0.18.8 •

evanw
published 0.18.7 •

evanw
published 0.18.6 •

Changelog

Source

0.18.6

  • 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);
    }
    
evanw
published 0.18.5 •

Changelog

Source

0.18.5

  • 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.

evanw
published 0.18.4 •

evanw
published 0.18.3 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc