Fix for an async generator edge case (#4401, #4417)
Support for transforming async generators into the equivalent state machine was added in version 0.19.0. However, the generated state machine didn't work correctly when polling async generators concurrently, such as in the following code:
Previously esbuild's output of the above code behaved incorrectly when async generators were transformed (such as with --supported:async-generator=false). The transformation should be fixed starting with this release.
Fix a regression when metafile is enabled (#4420, #4418)
This release fixes a regression introduced by the previous release. When metafile: true was enabled in esbuild's JavaScript API, builds with build errors were incorrectly throwing an error about an empty JSON string instead of an object containing the build errors.
Use define semantics for TypeScript parameter properties (#4421)
Parameter properties are a TypeScript-specific code generation feature that converts constructor parameters into class fields when they are prefixed by certain keywords. When "useDefineForClassFields": true is present in tsconfig.json, the TypeScript compiler automatically generates class field declarations for parameter properties. Previously esbuild didn't do this, but esbuild will now do this starting with this release:
// Original code
classFoo{constructor(publicx: number){}}// Old output (with --loader=ts)
classFoo{constructor(x){this.x=x;}}// New output (with --loader=ts)
classFoo{constructor(x){this.x=x;}x;}
Allow es2025 as a target in tsconfig.json (#4432)
TypeScript recently added es2025 as a compilation target, so esbuild now supports this in the target field of tsconfig.json files, such as in the following configuration file:
{"compilerOptions":{"target":"ES2025"}}
As a reminder, the only thing that esbuild uses this field for is determining whether or not to use legacy TypeScript behavior for class fields. You can read more in the documentation.
Configuration
📅Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, 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, check this box
This PR contains the following updates:
| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [esbuild](https://github.com/evanw/esbuild) | [`0.27.4` → `0.27.5`](https://renovatebot.com/diffs/npm/esbuild/0.27.4/0.27.5) |  |  |
---
### Release Notes
<details>
<summary>evanw/esbuild (esbuild)</summary>
### [`v0.27.5`](https://github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#0275)
[Compare Source](https://github.com/evanw/esbuild/compare/v0.27.4...v0.27.5)
- Fix for an async generator edge case ([#​4401](https://github.com/evanw/esbuild/issues/4401), [#​4417](https://github.com/evanw/esbuild/pull/4417))
Support for transforming async generators into the equivalent state machine was added in version 0.19.0. However, the generated state machine didn't work correctly when polling async generators concurrently, such as in the following code:
```js
async function* inner() { yield 1; yield 2 }
async function* outer() { yield* inner() }
let gen = outer()
for await (let x of [gen.next(), gen.next()]) console.log(x)
```
Previously esbuild's output of the above code behaved incorrectly when async generators were transformed (such as with `--supported:async-generator=false`). The transformation should be fixed starting with this release.
This fix was contributed by [@​2767mr](https://github.com/2767mr).
- Fix a regression when `metafile` is enabled ([#​4420](https://github.com/evanw/esbuild/issues/4420), [#​4418](https://github.com/evanw/esbuild/pull/4418))
This release fixes a regression introduced by the previous release. When `metafile: true` was enabled in esbuild's JavaScript API, builds with build errors were incorrectly throwing an error about an empty JSON string instead of an object containing the build errors.
- Use define semantics for TypeScript parameter properties ([#​4421](https://github.com/evanw/esbuild/issues/4421))
Parameter properties are a TypeScript-specific code generation feature that converts constructor parameters into class fields when they are prefixed by certain keywords. When `"useDefineForClassFields": true` is present in `tsconfig.json`, the TypeScript compiler automatically generates class field declarations for parameter properties. Previously esbuild didn't do this, but esbuild will now do this starting with this release:
```ts
// Original code
class Foo {
constructor(public x: number) {}
}
// Old output (with --loader=ts)
class Foo {
constructor(x) {
this.x = x;
}
}
// New output (with --loader=ts)
class Foo {
constructor(x) {
this.x = x;
}
x;
}
```
- Allow `es2025` as a target in `tsconfig.json` ([#​4432](https://github.com/evanw/esbuild/issues/4432))
TypeScript recently [added `es2025`](https://devblogs.microsoft.com/typescript/announcing-typescript-6-0/#es2025-option-for-target-and-lib) as a compilation target, so esbuild now supports this in the `target` field of `tsconfig.json` files, such as in the following configuration file:
```json
{
"compilerOptions": {
"target": "ES2025"
}
}
```
As a reminder, the only thing that esbuild uses this field for is determining whether or not to use legacy TypeScript behavior for class fields. You can read more in [the documentation](https://esbuild.github.io/content-types/#tsconfig-json).
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR is behind base branch, 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, check this box
---
This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My44Ni4wIiwidXBkYXRlZEluVmVyIjoiNDMuODYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR contains the following updates:
0.27.4→0.27.5Release Notes
evanw/esbuild (esbuild)
v0.27.5Compare Source
Fix for an async generator edge case (#4401, #4417)
Support for transforming async generators into the equivalent state machine was added in version 0.19.0. However, the generated state machine didn't work correctly when polling async generators concurrently, such as in the following code:
Previously esbuild's output of the above code behaved incorrectly when async generators were transformed (such as with
--supported:async-generator=false). The transformation should be fixed starting with this release.This fix was contributed by @2767mr.
Fix a regression when
metafileis enabled (#4420, #4418)This release fixes a regression introduced by the previous release. When
metafile: truewas enabled in esbuild's JavaScript API, builds with build errors were incorrectly throwing an error about an empty JSON string instead of an object containing the build errors.Use define semantics for TypeScript parameter properties (#4421)
Parameter properties are a TypeScript-specific code generation feature that converts constructor parameters into class fields when they are prefixed by certain keywords. When
"useDefineForClassFields": trueis present intsconfig.json, the TypeScript compiler automatically generates class field declarations for parameter properties. Previously esbuild didn't do this, but esbuild will now do this starting with this release:Allow
es2025as a target intsconfig.json(#4432)TypeScript recently added
es2025as a compilation target, so esbuild now supports this in thetargetfield oftsconfig.jsonfiles, such as in the following configuration file:As a reminder, the only thing that esbuild uses this field for is determining whether or not to use legacy TypeScript behavior for class fields. You can read more in the documentation.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.