Fix TypeScript-specific class transform edge case (#3559)
The previous release introduced an optimization that avoided transforming super() in the class constructor for TypeScript code compiled with useDefineForClassFields set to false if all class instance fields have no initializers. The rationale was that in this case, all class instance fields are omitted in the output so no changes to the constructor are needed. However, if all of this is the case and there are #private instance fields with initializers, those private instance field initializers were still being moved into the constructor. This was problematic because they were being inserted before the call to super() (since super() is now no longer transformed in that case). This release introduces an additional optimization that avoids moving the private instance field initializers into the constructor in this edge case, which generates smaller code, matches the TypeScript compiler's output more closely, and avoids this bug:
// Original code
class Foo extends Bar {
#private = 1;
public: any;
constructor() {
super();
}
}
// Old output (with esbuild v0.19.9)
class Foo extends Bar {
constructor() {
super();
this.#private = 1;
}
#private;
}
// Old output (with esbuild v0.19.10)
class Foo extends Bar {
constructor() {
this.#private = 1;
super();
}
#private;
}
// New output
class Foo extends Bar {
#private = 1;
constructor() {
super();
}
}
Minifier: allow reording a primitive past a side-effect (#3568)
The minifier previously allowed reordering a side-effect past a primitive, but didn't handle the case of reordering a primitive past a side-effect. This additional case is now handled:
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 9 updates:
10.0.4
10.0.6
0.1.10
0.1.11
6.12.0
6.17.0
6.12.0
6.17.0
0.14.54
0.19.11
8.54.0
8.56.0
2.29.0
2.29.1
2.2.5
2.3.0
5.2.2
5.3.3
Updates
@types/mocha
from 10.0.4 to 10.0.6Commits
Updates
@types/resize-observer-browser
from 0.1.10 to 0.1.11Commits
Updates
@typescript-eslint/eslint-plugin
from 6.12.0 to 6.17.0Release notes
Sourced from
@typescript-eslint/eslint-plugin
's releases.... (truncated)
Changelog
Sourced from
@typescript-eslint/eslint-plugin
's changelog.... (truncated)
Commits
e566a5d
chore: publish v6.17.0675e987
fix(eslint-plugin): [no-restricted-imports] prevent crash whenpatterns
or ...5857356
feat(eslint-plugin): [no-floating-promises] flag result of .map(async) (#7897)6a219bd
feat(eslint-plugin): [switch-exhaustiveness-check] add an option to warn agai...5ad1b76
docs: modify examples for explicit-module-boundary-types (#7404)cde4d4d
docs(eslint-plugin): [prefer-readonly-parameter-types] fix broken code sample...7246e56
chore: publish v6.16.03182959
fix(eslint-plugin): [unbound-method] exempt all non-Promise built-in statics ...3031117
docs(eslint-plugin): enforce a heading for each rule option (#8015)b3f87fc
docs(eslint-plugin): add Deprecating Formatting Rules blog post (#8117)Updates
@typescript-eslint/parser
from 6.12.0 to 6.17.0Release notes
Sourced from
@typescript-eslint/parser
's releases.... (truncated)
Changelog
Sourced from
@typescript-eslint/parser
's changelog.... (truncated)
Commits
e566a5d
chore: publish v6.17.07246e56
chore: publish v6.16.06128a02
chore: publish v6.15.0c7d702f
chore: publish v6.14.0cc2c6d3
chore: publish v6.13.24dae083
chore: prefix all nx package scripts with npx (#7988)14f3ff0
chore: publish v6.13.139c437a
chore: publish v6.13.0Updates
esbuild
from 0.14.54 to 0.19.11Release notes
Sourced from esbuild's releases.
... (truncated)
Changelog
Sourced from esbuild's changelog.
... (truncated)
Commits
6ee8225
publish 0.19.11 to npmf8ae3af
fix #3561: treeshaking of knownSymbol
instances0811058
switch define data to flagsf5f8ff8
fix #3568: can reorder primitive past side-effect914f608
fix #3558: put thestop()
api call back2aa166b
fix #3559: fix recent class transform regression55e1127
publish 0.19.10 to npmd968af2
fix #3511:@__NO_SIDE_EFFECTS__
with templates00c4ebe
fix #3546: don't transformrequire
glob importse1b7050
fix #3319: missing symbol usage in glob transformUpdates
eslint
from 8.54.0 to 8.56.0Release notes
Sourced from eslint's releases.
Changelog
Sourced from eslint's changelog.
Commits
8e8e9f8
8.56.0085978b
Build: changelog update for 8.56.0ba6af85
chore: upgrade@eslint/js
@8
.56.0 (#17864)60a531a
chore: package.json update for@eslint/js
release0dd9704
feat: Support custom severity when reporting unused disable directives (#17212)31a7e3f
feat: fix no-restricted-properties false negatives with unknown objects (#17818)ba87a06
chore: update dependency markdownlint to ^0.32.0 (#17783)7d5e5f6
fix:TypeError: fs.exists is not a function
on read-only file system (#17846)9271d10
chore: add GitHub issue template for docs issues (#17845)70a686b
chore: Convert rule tests to FlatRuleTester (#17819)Updates
eslint-plugin-import
from 2.29.0 to 2.29.1Release notes
Sourced from eslint-plugin-import's releases.
Changelog
Sourced from eslint-plugin-import's changelog.
Commits
ee5fade
Bump to 2.29.148fec35
[Deps] updatetsconfig-paths
80aee73
[Dev Deps] updatechai
,eslint-doc-generator
,markdownlint-cli
8c83eaf
[Tests] node v21.3 has a brokenfs.writeFile
e67259e
[Fix]no-unused-modules
: support export patterns with array destructuring9fd3c42
[Tests]no-duplicates
: add passing test12f0300
[Fix]no-extraneous-dependencies
: ignoreexport type { ... } from '...'
w...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.2.2 to 5.3.3Release notes
Sourced from typescript's releases.
Commits
63717cf
Bump version to 5.3.3 and LKG4c2afa7
🤖 Pick PR #56627 (Transpile jsdoc parsing mode) into release-5.3 (#56629)ba3d2b0
🤖 Pick PR #56434 (Fix support for intersections in te...) into release-5.3 (#...f3808c4
🤖 Pick PR #56504 (Fixed an issue in boolean compariso...) into release-5.3 (#...b4fe221
Cherry-pick #56489 into release-5.3 (#56490)f750eb3
Pick #56485 into release-5.3 (#56486)27047e3
Update LKG.d09b1bf
Pick #56449 into release-5.3 (#56451)e2a5d45
Update LKG.756efd2
Fixes for release-5.3. (#56424)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