Previously esbuild was unable to parse the following valid TypeScript code:
let tuple: (...[e1, e2, ...es]: any) => any
This release includes support for parsing code like this.
Fix TypeScript code translation for certain computed declare class fields (#2914)
In TypeScript, the key of a computed declare class field should only be preserved if there are no decorators for that field. Previously esbuild always preserved the key, but esbuild will now remove the key to match the output of the TypeScript compiler:
// Original code
declare function dec(a: any, b: any): any
declare const removeMe: unique symbol
declare const keepMe: unique symbol
class X {
declare [removeMe]: any
@dec declare [keepMe]: any
}
// Old output
var _a;
class X {
}
removeMe, _a = keepMe;
__decorateClass([
dec
], X.prototype, _a, 2);
// New output
var _a;
class X {
}
_a = keepMe;
__decorateClass([
dec
], X.prototype, _a, 2);
Fix a crash with path resolution error generation (#2913)
In certain situations, a module containing an invalid import path could previously cause esbuild to crash when it attempts to generate a more helpful error message. This crash has been fixed.
Previously esbuild was unable to parse the following valid TypeScript code:
let tuple: (...[e1, e2, ...es]: any) => any
This release includes support for parsing code like this.
Fix TypeScript code translation for certain computed declare class fields (#2914)
In TypeScript, the key of a computed declare class field should only be preserved if there are no decorators for that field. Previously esbuild always preserved the key, but esbuild will now remove the key to match the output of the TypeScript compiler:
// Original code
declare function dec(a: any, b: any): any
declare const removeMe: unique symbol
declare const keepMe: unique symbol
class X {
declare [removeMe]: any
@dec declare [keepMe]: any
}
// Old output
var _a;
class X {
}
removeMe, _a = keepMe;
__decorateClass([
dec
], X.prototype, _a, 2);
// New output
var _a;
class X {
}
_a = keepMe;
__decorateClass([
dec
], X.prototype, _a, 2);
Fix a crash with path resolution error generation (#2913)
In certain situations, a module containing an invalid import path could previously cause esbuild to crash when it attempts to generate a more helpful error message. This crash has been fixed.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
⚠️ Dependabot is rebasing this PR ⚠️
Rebasing might not happen immediately, so don't worry if this takes some time.
Note: if you make any changes to this PR yourself, they will take precedence over the rebase.
Bumps esbuild from 0.17.8 to 0.17.9.
Release notes
Sourced from esbuild's releases.
Changelog
Sourced from esbuild's changelog.
Commits
3765e88
publish 0.17.9 to npm42d3b2f
fix #2937: parse rest bindings in TypeScript typesd8b028f
adjust test output for #2914631a563
fix #2909: preserve comments for omitted AST nodes429d073
fix #2914: do not emit computeddeclare
fields29d5a9b
fix #2913: crash in ProbeResolvePackageAsRelativeDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)