chore(deps): update dependency esbuild to v0.14.46 #2068

Merged
konrad merged 1 commits from renovate/esbuild-0.x into main 2022-06-19 07:16:19 +00:00
Member

This PR contains the following updates:

Package Type Update Change
esbuild devDependencies patch 0.14.45 -> 0.14.46

Release Notes

evanw/esbuild

v0.14.46

Compare Source

  • Add the ability to override support for individual syntax features (#​2060, #​2290, #​2308)

    The target setting already lets you configure esbuild to restrict its output by only making use of syntax features that are known to be supported in the configured target environment. For example, setting target to chrome50 causes esbuild to automatically transform optional chain expressions into the equivalent older JavaScript and prevents you from using BigInts, among many other things. However, sometimes you may want to customize this set of unsupported syntax features at the individual feature level.

    Some examples of why you might want to do this:

    • JavaScript runtimes often do a quick implementation of newer syntax features that is slower than the equivalent older JavaScript, and you can get a speedup by telling esbuild to pretend this syntax feature isn't supported. For example, V8 has a long-standing performance bug regarding object spread that can be avoided by manually copying properties instead of using object spread syntax. Right now esbuild hard-codes this optimization if you set target to a V8-based runtime.

    • There are many less-used JavaScript runtimes in addition to the ones present in browsers, and these runtimes sometimes just decide not to implement parts of the specification, which might make sense for runtimes intended for embedded environments. For example, the developers behind Facebook's JavaScript runtime Hermes have decided to not implement classes despite it being a major JavaScript feature that was added seven years ago and that is used in virtually every large JavaScript project.

    • You may be processing esbuild's output with another tool, and you may want esbuild to transform certain features and the other tool to transform certain other features. For example, if you are using esbuild to transform files individually to ES5 but you are then feeding the output into Webpack for bundling, you may want to preserve import() expressions even though they are a syntax error in ES5.

    With this release, you can now use --supported:feature=false to force feature to be unsupported. This will cause esbuild to either rewrite code that uses the feature into older code that doesn't use the feature (if esbuild is able to), or to emit a build error (if esbuild is unable to). For example, you can use --supported:arrow=false to turn arrow functions into function expressions and --supported:bigint=false to make it an error to use a BigInt literal. You can also use --supported:feature=true to force it to be supported, which means esbuild will pass it through without transforming it. Keep in mind that this is an advanced feature. For most use cases you will probably want to just use target instead of using this.

    The full set of currently-allowed features are as follows:

    JavaScript:

    • arbitrary-module-namespace-names
    • array-spread
    • arrow
    • async-await
    • async-generator
    • bigint
    • class
    • class-field
    • class-private-accessor
    • class-private-brand-check
    • class-private-field
    • class-private-method
    • class-private-static-accessor
    • class-private-static-field
    • class-private-static-method
    • class-static-blocks
    • class-static-field
    • const-and-let
    • default-argument
    • destructuring
    • dynamic-import
    • exponent-operator
    • export-star-as
    • for-await
    • for-of
    • generator
    • hashbang
    • import-assertions
    • import-meta
    • logical-assignment
    • nested-rest-binding
    • new-target
    • node-colon-prefix-import
    • node-colon-prefix-require
    • nullish-coalescing
    • object-accessors
    • object-extensions
    • object-rest-spread
    • optional-catch-binding
    • optional-chain
    • regexp-dot-all-flag
    • regexp-lookbehind-assertions
    • regexp-match-indices
    • regexp-named-capture-groups
    • regexp-sticky-and-unicode-flags
    • regexp-unicode-property-escapes
    • rest-argument
    • template-literal
    • top-level-await
    • typeof-exotic-object-is-object
    • unicode-escapes

    CSS:

    • hex-rgba
    • rebecca-purple
    • modern-rgb-hsl
    • inset-property
    • nesting

    Since you can now specify --supported:object-rest-spread=false yourself to work around the V8 performance issue mentioned above, esbuild will no longer automatically transform all instances of object spread when targeting a V8-based JavaScript runtime going forward.

    Note that JavaScript feature transformation is very complex and allowing full customization of the set of supported syntax features could cause bugs in esbuild due to new interactions between multiple features that were never possible before. Consider this to be an experimental feature.

  • Implement extends constraints on infer type variables (#​2330)

    TypeScript 4.7 introduced the ability to write an extends constraint after an infer type variable, which looks like this:

    type FirstIfString<T> =
      T extends [infer S extends string, ...unknown[]]
        ? S
        : never;
    

    You can read the blog post for more details: https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#extends-constraints-on-infer-type-variables. Previously this was a syntax error in esbuild but with this release, esbuild can now parse this syntax correctly.

  • Allow define to match optional chain expressions (#​2324)

    Previously esbuild's define feature only matched member expressions that did not use optional chaining. With this release, esbuild will now also match those that use optional chaining:

    // Original code
    console.log(a.b, a?.b)
    
    // Old output (with --define:a.b=c)
    console.log(c, a?.b);
    
    // New output (with --define:a.b=c)
    console.log(c, c);
    

    This is for compatibility with Webpack's DefinePlugin, which behaves the same way.


Configuration

📅 Schedule: 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.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [esbuild](https://github.com/evanw/esbuild) | devDependencies | patch | [`0.14.45` -> `0.14.46`](https://renovatebot.com/diffs/npm/esbuild/0.14.45/0.14.46) | --- ### Release Notes <details> <summary>evanw/esbuild</summary> ### [`v0.14.46`](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md#&#8203;01446) [Compare Source](https://github.com/evanw/esbuild/compare/v0.14.45...v0.14.46) - Add the ability to override support for individual syntax features ([#&#8203;2060](https://github.com/evanw/esbuild/issues/2060), [#&#8203;2290](https://github.com/evanw/esbuild/issues/2290), [#&#8203;2308](https://github.com/evanw/esbuild/issues/2308)) The `target` setting already lets you configure esbuild to restrict its output by only making use of syntax features that are known to be supported in the configured target environment. For example, setting `target` to `chrome50` causes esbuild to automatically transform optional chain expressions into the equivalent older JavaScript and prevents you from using BigInts, among many other things. However, sometimes you may want to customize this set of unsupported syntax features at the individual feature level. Some examples of why you might want to do this: - JavaScript runtimes often do a quick implementation of newer syntax features that is slower than the equivalent older JavaScript, and you can get a speedup by telling esbuild to pretend this syntax feature isn't supported. For example, V8 has a [long-standing performance bug regarding object spread](https://bugs.chromium.org/p/v8/issues/detail?id=11536) that can be avoided by manually copying properties instead of using object spread syntax. Right now esbuild hard-codes this optimization if you set `target` to a V8-based runtime. - There are many less-used JavaScript runtimes in addition to the ones present in browsers, and these runtimes sometimes just decide not to implement parts of the specification, which might make sense for runtimes intended for embedded environments. For example, the developers behind Facebook's JavaScript runtime [Hermes](https://hermesengine.dev/) have decided to not implement classes despite it being a major JavaScript feature that was added seven years ago and that is used in virtually every large JavaScript project. - You may be processing esbuild's output with another tool, and you may want esbuild to transform certain features and the other tool to transform certain other features. For example, if you are using esbuild to transform files individually to ES5 but you are then feeding the output into Webpack for bundling, you may want to preserve `import()` expressions even though they are a syntax error in ES5. With this release, you can now use `--supported:feature=false` to force `feature` to be unsupported. This will cause esbuild to either rewrite code that uses the feature into older code that doesn't use the feature (if esbuild is able to), or to emit a build error (if esbuild is unable to). For example, you can use `--supported:arrow=false` to turn arrow functions into function expressions and `--supported:bigint=false` to make it an error to use a BigInt literal. You can also use `--supported:feature=true` to force it to be supported, which means esbuild will pass it through without transforming it. Keep in mind that this is an advanced feature. For most use cases you will probably want to just use `target` instead of using this. The full set of currently-allowed features are as follows: **JavaScript:** - `arbitrary-module-namespace-names` - `array-spread` - `arrow` - `async-await` - `async-generator` - `bigint` - `class` - `class-field` - `class-private-accessor` - `class-private-brand-check` - `class-private-field` - `class-private-method` - `class-private-static-accessor` - `class-private-static-field` - `class-private-static-method` - `class-static-blocks` - `class-static-field` - `const-and-let` - `default-argument` - `destructuring` - `dynamic-import` - `exponent-operator` - `export-star-as` - `for-await` - `for-of` - `generator` - `hashbang` - `import-assertions` - `import-meta` - `logical-assignment` - `nested-rest-binding` - `new-target` - `node-colon-prefix-import` - `node-colon-prefix-require` - `nullish-coalescing` - `object-accessors` - `object-extensions` - `object-rest-spread` - `optional-catch-binding` - `optional-chain` - `regexp-dot-all-flag` - `regexp-lookbehind-assertions` - `regexp-match-indices` - `regexp-named-capture-groups` - `regexp-sticky-and-unicode-flags` - `regexp-unicode-property-escapes` - `rest-argument` - `template-literal` - `top-level-await` - `typeof-exotic-object-is-object` - `unicode-escapes` **CSS:** - `hex-rgba` - `rebecca-purple` - `modern-rgb-hsl` - `inset-property` - `nesting` Since you can now specify `--supported:object-rest-spread=false` yourself to work around the V8 performance issue mentioned above, esbuild will no longer automatically transform all instances of object spread when targeting a V8-based JavaScript runtime going forward. *Note that JavaScript feature transformation is very complex and allowing full customization of the set of supported syntax features could cause bugs in esbuild due to new interactions between multiple features that were never possible before. Consider this to be an experimental feature.* - Implement `extends` constraints on `infer` type variables ([#&#8203;2330](https://github.com/evanw/esbuild/issues/2330)) TypeScript 4.7 introduced the ability to write an `extends` constraint after an `infer` type variable, which looks like this: ```ts type FirstIfString<T> = T extends [infer S extends string, ...unknown[]] ? S : never; ``` You can read the blog post for more details: https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#extends-constraints-on-infer-type-variables. Previously this was a syntax error in esbuild but with this release, esbuild can now parse this syntax correctly. - Allow `define` to match optional chain expressions ([#&#8203;2324](https://github.com/evanw/esbuild/issues/2324)) Previously esbuild's `define` feature only matched member expressions that did not use optional chaining. With this release, esbuild will now also match those that use optional chaining: ```js // Original code console.log(a.b, a?.b) // Old output (with --define:a.b=c) console.log(c, a?.b); // New output (with --define:a.b=c) console.log(c, c); ``` This is for compatibility with Webpack's [`DefinePlugin`](https://webpack.js.org/plugins/define-plugin/), which behaves the same way. </details> --- ### Configuration 📅 **Schedule**: 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. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
renovate added the
dependencies
label 2022-06-18 23:03:29 +00:00
renovate added 1 commit 2022-06-18 23:03:30 +00:00
continuous-integration/drone/pr Build is passing Details
65a2c0ca80
chore(deps): update dependency esbuild to v0.14.46
Member

Hi renovate!

Thank you for creating a PR!

I've deployed the changes of this PR on a preview environment under this URL: https://2068-renovate-esbuild-0-x--vikunja-frontend-preview.netlify.app

You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/.

Have a nice day!

Beep boop, I'm a bot.

Hi renovate! Thank you for creating a PR! I've deployed the changes of this PR on a preview environment under this URL: https://2068-renovate-esbuild-0-x--vikunja-frontend-preview.netlify.app You can use this url to view the changes live and test them out. You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/. Have a nice day! > Beep boop, I'm a bot.
konrad merged commit 94c23b9b14 into main 2022-06-19 07:16:19 +00:00
konrad deleted branch renovate/esbuild-0.x 2022-06-19 07:16:19 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.