This release deliberately contains backwards-incompatible changes. To avoid automatically picking up releases like this, you should either be pinning the exact version of esbuild in your package.json file (recommended) or be using a version range syntax that only accepts patch upgrades such as ^0.19.0 or ~0.19.0. See npm's documentation about semver for more information.
This time there is only one breaking change, and it only matters for people using Deno. Deno tests that use esbuild will now fail unless you make the change described below.
Work around API deprecations in Deno 1.40.x (#3609, #3611)
Deno 1.40.0 was just released and introduced run-time warnings about certain APIs that esbuild uses. With this release, esbuild will work around these run-time warnings by using newer APIs if they are present and falling back to the original APIs otherwise. This should avoid the warnings without breaking compatibility with older versions of Deno.
Unfortunately, doing this introduces a breaking change. The newer child process APIs lack a way to synchronously terminate esbuild's child process, so calling esbuild.stop() from within a Deno test is no longer sufficient to prevent Deno from failing a test that uses esbuild's API (Deno fails tests that create a child process without killing it before the test ends). To work around this, esbuild's stop() function has been changed to return a promise, and you now have to change esbuild.stop() to await esbuild.stop() in all of your Deno tests.
Reorder implicit file extensions within node_modules (#3341, #3608)
In version 0.18.0, esbuild changed the behavior of implicit file extensions within node_modules directories (i.e. in published packages) to prefer .js over .ts even when the --resolve-extensions= order prefers .ts over .js (which it does by default). However, doing that also accidentally made esbuild prefer .css over .ts, which caused problems for people that published packages containing both TypeScript and CSS in files with the same name.
With this release, esbuild will reorder TypeScript file extensions immediately after the last JavaScript file extensions in the implicit file extension order instead of putting them at the end of the order. Specifically the default implicit file extension order is .tsx,.ts,.jsx,.js,.css,.json which used to become .jsx,.js,.css,.json,.tsx,.ts in node_modules directories. With this release it will now become .jsx,.js,.tsx,.ts,.css,.json instead.
Why even rewrite the implicit file extension order at all? One reason is because the .js file is more likely to behave correctly than the .ts file. The behavior of the .ts file may depend on tsconfig.json and the tsconfig.json file may not even be published, or may use extends to refer to a base tsconfig.json file that wasn't published. People can get into this situation when they forget to add all .ts files to their .npmignore file before publishing to npm. Picking .js over .ts helps make it more likely that resulting bundle will behave correctly.
v0.19.12
The "preserve" JSX mode now preserves JSX text verbatim (#3605)
The JSX specification deliberately doesn't specify how JSX text is supposed to be interpreted and there is no canonical way to interpret JSX text. Two most popular interpretations are Babel and TypeScript. Yes they are different (esbuild deliberately follows TypeScript by the way).
Previously esbuild normalized text to the TypeScript interpretation when the "preserve" JSX mode is active. However, "preserve" should arguably reproduce the original JSX text verbatim so that whatever JSX transform runs after esbuild is free to interpret it however it wants. So with this release, esbuild will now pass JSX text through unmodified:
// Original code
let el =
<a href={'/'} title=''"'> some text
{foo}
more text </a>
// Old output (with --loader=jsx --jsx=preserve)
let el = <a href="/" title={'"}>
{" some text"}
{foo}
{"more text "}
</a>;
// New output (with --loader=jsx --jsx=preserve)
let el = <a href={"/"} title=''"'> some text
{foo}
more text </a>;
Allow JSX elements as JSX attribute values
JSX has an obscure feature where you can use JSX elements in attribute position without surrounding them with {...}. It looks like this:
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)
}
#45231a32b61e - Add a DEV_MODE error to catch duplicate attribute bindings that otherwise create silent errors.
#448557b00630 - Add "browser" export condition entrypoints to any package.json files with "node"
export conditions. This fixes Node test runners emulating browser environments that were incorrectly loading the
"node" entrypoints instead of the browser code.
#4515dca963f7 - Fix a memory leak when patching directive constructors for SSR.
lit@3.1.2
Patch Changes
#45231a32b61e - Add a DEV_MODE error to catch duplicate attribute bindings that otherwise create silent errors.
#448557b00630 - Add "browser" export condition entrypoints to any package.json files with "node"
export conditions. This fixes Node test runners emulating browser environments that were incorrectly loading the
"node" entrypoints instead of the browser code.
#45231a32b61e - Add a DEV_MODE error to catch duplicate attribute bindings that otherwise create silent errors.
#448557b00630 - Add "browser" export condition entrypoints to any package.json files with "node"
export conditions. This fixes Node test runners emulating browser environments that were incorrectly loading the
"node" entrypoints instead of the browser code.
This is a prerelease version to test our ability to release.
Other than removing or updating dependencies, it contains no intended user-facing changes.
Bumps the dev-deps group with 11 updates:
2.4.3
2.4.4
0.1.10
0.1.11
0.14.54
0.20.0
8.54.0
8.56.0
2.29.0
2.29.1
14.0.0
14.0.1
2.2.5
2.3.0
3.1.0
3.1.2
10.2.0
10.3.0
10.0.4
10.0.6
5.2.2
5.3.3
Updates
@types/chroma-js
from 2.4.3 to 2.4.4Commits
Updates
@types/resize-observer-browser
from 0.1.10 to 0.1.11Commits
Updates
esbuild
from 0.14.54 to 0.20.0Release notes
Sourced from esbuild's releases.
... (truncated)
Changelog
Sourced from esbuild's changelog.
... (truncated)
Commits
2af5ccf
publish 0.20.0 to npm0bccf08
fix esbuild/deno-esbuild#5931f87d
work around api deprecations in deno 1.40.x (#3609) (#3611)22a9cf5
fix #3341, fix #3608: sort.ts
right after.js
f8ec300
runnpm pkg fix
as suggested by the npm clid7fd1ad
publish 0.19.12 to npme04a690
fix #3605: print the original JSX AST unmodifiedf571399
allow jsx elements as jsx attribute valuesa652e73
runmake update-compat-table
35c0d65
fix #3574: ts type parser bug with infer + extendsUpdates
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
globby
from 14.0.0 to 14.0.1Release notes
Sourced from globby's releases.
Commits
b0d7330
14.0.1a85078e
Meta tweaksaf5d139
FixexpandDirectories.extension
option (#263)3a28601
Fix read permission error on ignore files search (#259)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
lit
from 3.1.0 to 3.1.2Release notes
Sourced from lit's releases.
Changelog
Sourced from lit's changelog.
Commits
b4e3c0e
Version Packages (#4532)5c8b142
Version Packages (#4482)Updates
mocha
from 10.2.0 to 10.3.0Release notes
Sourced from mocha's releases.
... (truncated)
Changelog
Sourced from mocha's changelog.
Commits
a886829
chore: fix link in pull request template (#5091)53a4baf
chore: remove unnecessary canvas dependency (#5069)1ebff45
chore: inline nyan reporter's write function (#5056)8812413
fix: add alt text to Built with Netlify badge (#5068)645469e
docs: touchups to labels and a template title post-revamp (#5050)9f99178
docs: overhaul contributing and maintenance docs for end-of-year 2023 (#5038)eca4fec
docs: fix return jsdoc type oftitlePath
(#4886)060f77d
docs: use mocha.js instead of mocha in the example run (#4927)4b60c1a
docs: fix fragment ID for yargs.jsextends
docs (#4918)b41e985
chore: remove stale workflow (#5029)Maintainer changes
This version was pushed to npm by joshuakgoldberg, a new releaser for mocha since your current version.
Updates
@types/mocha
from 10.0.4 to 10.0.6Commits
Updates
typescript
from 5.2.2 to 5.3.3Release notes
Sourced from typescript's releases.
Superseded by #175.