build(deps-dev): Bump esbuild from 0.20.1 to 0.20.2
Bumps esbuild from 0.20.1 to 0.20.2.
Release notes
Sourced from esbuild's releases.
v0.20.2
Support TypeScript experimental decorators on
abstractclass fields (#3684)With this release, you can now use TypeScript experimental decorators on
abstractclass fields. This was silently compiled incorrectly in esbuild 0.19.7 and below, and was an error from esbuild 0.19.8 to esbuild 0.20.1. Code such as the following should now work correctly:// Original code const log = (x: any, y: string) => console.log(y) abstract class Foo { @log abstract foo: string } new class extends Foo { foo = '' }// Old output (with --loader=ts --tsconfig-raw={"compilerOptions":{"experimentalDecorators":true}}) const log = (x, y) => console.log(y); class Foo { } new class extends Foo { foo = ""; }();
// New output (with --loader=ts --tsconfig-raw={"compilerOptions":{"experimentalDecorators":true}}) const log = (x, y) => console.log(y); class Foo { } __decorateClass([ log ], Foo.prototype, "foo", 2); new class extends Foo { foo = ""; }();
JSON loader now preserves
__proto__properties (#3700)Copying JSON source code into a JavaScript file will change its meaning if a JSON object contains the
__proto__key. A literal__proto__property in a JavaScript object literal sets the prototype of the object instead of adding a property named__proto__, while a literal__proto__property in a JSON object literal just adds a property named__proto__. With this release, esbuild will now work around this problem by converting JSON to JavaScript with a computed property key in this case:// Original code import data from 'data:application/json,{"__proto__":{"fail":true}}' if (Object.getPrototypeOf(data)?.fail) throw 'fail'// Old output (with --bundle) (() => { // <data:application/json,{"proto":{"fail":true}}> var json_proto_fail_true_default = { proto: { fail: true } };
// entry.js if (Object.getPrototypeOf(json_proto_fail_true_default)?.fail) throw "fail"; })();
... (truncated)
Changelog
Sourced from esbuild's changelog.
0.20.2
Support TypeScript experimental decorators on
abstractclass fields (#3684)With this release, you can now use TypeScript experimental decorators on
abstractclass fields. This was silently compiled incorrectly in esbuild 0.19.7 and below, and was an error from esbuild 0.19.8 to esbuild 0.20.1. Code such as the following should now work correctly:// Original code const log = (x: any, y: string) => console.log(y) abstract class Foo { @log abstract foo: string } new class extends Foo { foo = '' }// Old output (with --loader=ts --tsconfig-raw={"compilerOptions":{"experimentalDecorators":true}}) const log = (x, y) => console.log(y); class Foo { } new class extends Foo { foo = ""; }();
// New output (with --loader=ts --tsconfig-raw={"compilerOptions":{"experimentalDecorators":true}}) const log = (x, y) => console.log(y); class Foo { } __decorateClass([ log ], Foo.prototype, "foo", 2); new class extends Foo { foo = ""; }();
JSON loader now preserves
__proto__properties (#3700)Copying JSON source code into a JavaScript file will change its meaning if a JSON object contains the
__proto__key. A literal__proto__property in a JavaScript object literal sets the prototype of the object instead of adding a property named__proto__, while a literal__proto__property in a JSON object literal just adds a property named__proto__. With this release, esbuild will now work around this problem by converting JSON to JavaScript with a computed property key in this case:// Original code import data from 'data:application/json,{"__proto__":{"fail":true}}' if (Object.getPrototypeOf(data)?.fail) throw 'fail'// Old output (with --bundle) (() => { // <data:application/json,{"proto":{"fail":true}}> var json_proto_fail_true_default = { proto: { fail: true } };
// entry.js if (Object.getPrototypeOf(json_proto_fail_true_default)?.fail) throw "fail"; })();
... (truncated)
Commits
617eddapublish 0.20.2 to npm4780075fix #3700: json loader preserves__proto__keys30bed2dbetter errors for invalid js decorator syntax300eeb7ts: allow non-null assertions in js decorators4d997d9fix #3698: yarn pnp edge case withtsconfig.jsoncf42954resolver: improve some debug loggingb0765aefix some lintsdfa6206fix some comments (closes #3683)ae5cc17fix #3684:abstractexperimental decoratorsc809af0fix #2388: allow consuming types without dom types (#3679)- Additional commits viewable in compare view
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 rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)