Note that this release enables rules to have more restrictive default options as configured in the strict and strict-type-checked configs. See #8364 for more details.
Note that this release enables rules to have more restrictive default options as configured in the strict and strict-type-checked configs. See #8364 for more details.
Support TypeScript experimental decorators on abstract class fields (#3684)
With this release, you can now use TypeScript experimental decorators on abstract class 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";
})();
This changelog documents all esbuild versions published in the year 2022 (versions 0.14.11 through 0.16.12).
0.16.12
Loader defaults to js for extensionless files (#2776)
Certain packages contain files without an extension. For example, the yargs package contains the file yargs/yargs which has no extension. Node, Webpack, and Parcel can all understand code that imports yargs/yargs because they assume that the file is JavaScript. However, esbuild was previously unable to understand this code because it relies on the file extension to tell it how to interpret the file. With this release, esbuild will now assume files without an extension are JavaScript files. This can be customized by setting the loader for "" (the empty string, representing files without an extension) to another loader. For example, if you want files without an extension to be treated as CSS instead, you can do that like this:
In addition, the "type" field in package.json files now only applies to files with an explicit .js, .jsx, .ts, or .tsx extension. Previously it was incorrectly applied by esbuild to all files that had an extension other than .mjs, .mts, .cjs, or .cts including extensionless files. So for example an extensionless file in a "type": "module" package is now treated as CommonJS instead of ESM.
0.16.11
Avoid a syntax error in the presence of direct eval (#2761)
The behavior of nested function declarations in JavaScript depends on whether the code is run in strict mode or not. It would be problematic if esbuild preserved nested function declarations in its output because then the behavior would depend on whether the output was run in strict mode or not instead of respecting the strict mode behavior of the original source code. To avoid this, esbuild transforms nested function declarations to preserve the intended behavior of the original source code regardless of whether the output is run in strict mode or not:
// Original code
if (true) {
function foo() {}
console.log(!!foo)
foo = null
console.log(!!foo)
}
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 show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the dev-deps group with 5 updates:
7.1.0
7.4.0
7.1.0
7.4.0
0.14.54
0.20.2
2.2.5
2.3.0
5.3.3
5.4.3
Updates
@typescript-eslint/eslint-plugin
from 7.1.0 to 7.4.0Release notes
Sourced from
@typescript-eslint/eslint-plugin
's releases.... (truncated)
Changelog
Sourced from
@typescript-eslint/eslint-plugin
's changelog.... (truncated)
Commits
5d24691
chore(release): publish 7.4.0029fc0b
feat(eslint-plugin): deprecate no-throw-literal and add a renamed only-throw-...2a62a40
fix(eslint-plugin): [no-unnecessary-type-assertion] avoid remove const castin...990ec22
docs: fix example of binding unbound method (#8754)a08554a
feat(eslint-plugin): [no-unnecessary-type-arguments] handle tagged templates ...2018f91
fix(eslint-plugin): [prefer-optional-chain] properly disambiguate between `bo...56358a6
fix(eslint-plugin): [prefer-optional-chain] address multipart nullish checks ...532ae8b
docs: fix typo in switch-exhaustiveness-check (#8768)e408b93
feat(eslint-plugin): [consistent-type-imports] ignore files with decorators, ...c787fe4
docs: restrict-template-expressions - remove mention of numbers being allowed...Updates
@typescript-eslint/parser
from 7.1.0 to 7.4.0Release notes
Sourced from
@typescript-eslint/parser
's releases.... (truncated)
Changelog
Sourced from
@typescript-eslint/parser
's changelog.... (truncated)
Commits
5d24691
chore(release): publish 7.4.0e408b93
feat(eslint-plugin): [consistent-type-imports] ignore files with decorators, ...5995614
chore(release): publish 7.3.14cf8ec7
chore(release): publish 7.3.0883f220
fix: correctengines.node
constraints inpackage.json
(#8671)95cf139
chore(release): publish 7.2.088b7463
chore(release): publish 7.1.1Updates
esbuild
from 0.14.54 to 0.20.2Release notes
Sourced from esbuild's releases.
... (truncated)
Changelog
Sourced from esbuild's changelog.
... (truncated)
Commits
617edda
publish 0.20.2 to npm4780075
fix #3700: json loader preserves__proto__
keys30bed2d
better errors for invalid js decorator syntax300eeb7
ts: allow non-null assertions in js decorators4d997d9
fix #3698: yarn pnp edge case withtsconfig.json
cf42954
resolver: improve some debug loggingb0765ae
fix some lintsdfa6206
fix some comments (closes #3683)ae5cc17
fix #3684:abstract
experimental decoratorsc809af0
fix #2388: allow consuming types without dom types (#3679)Updates
karma-esbuild
from 2.2.5 to 2.3.0Release notes
Sourced from karma-esbuild's releases.
Commits
cf1cb8f
2.3.02799b2b
Merge pull request #55 from handerss-tibco/esbuild-17e47863f
Fix tests58106ad
Switch to new esbuild APIs for incremental builds4f75bf3
Bump esbuild to 0.17 and update peerDependenciesMaintainer changes
This version was pushed to npm by jridgewell, a new releaser for karma-esbuild since your current version.
Updates
typescript
from 5.3.3 to 5.4.3Release notes
Sourced from typescript's releases.
... (truncated)
Commits
6ea273c
Update LKGcd06f92
🤖 Pick PR #57853 (Revert PR 56161) into release-5.4 (#57854)ca8e720
Update LKG010b188
release-5.4: Revert PR 56087 (#57850)fc7006c
Update LKGb45a418
🤖 Pick PR #57801 (Distribute mapped types over array/...) into release-5.4 (#...609560f
Bump version to 5.4.3 and LKGf42605f
🤖 Pick PR #57746 (Revert "Defer processing of nested ...) into release-5.4 (#...485c7c5
Revert "Allow (non-assert) type predicates to narrow by discriminant"… (#57795)7f11456
🤖 Pick PR #57751 (Exclude generic string-like types f...) into release-5.4 (#...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 show