Sourced from esbuild's releases.
v0.24.2
Fix regression with
--define
andimport.meta
(#4010, #4012, #4013)The previous change in version 0.24.1 to use a more expression-like parser for
define
values to allow quoted property names introduced a regression that removed the ability to use--define:import.meta=...
. Even thoughimport
is normally a keyword that can't be used as an identifier, ES modules special-case theimport.meta
expression to behave like an identifier anyway. This change fixes the regression.This fix was contributed by
@sapphi-red
.v0.24.1
Allow
es2024
as a target intsconfig.json
(#4004)TypeScript recently added
es2024
as a compilation target, so esbuild now supports this in thetarget
field oftsconfig.json
files, such as in the following configuration file:{ "compilerOptions": { "target": "ES2024" } }
As a reminder, the only thing that esbuild uses this field for is determining whether or not to use legacy TypeScript behavior for class fields. You can read more in the documentation.
This fix was contributed by
@billyjanitsch
.Allow automatic semicolon insertion after
get
/set
This change fixes a grammar bug in the parser that incorrectly treated the following code as a syntax error:
class Foo { get *x() {} set *y() {} }
The above code will be considered valid starting with this release. This change to esbuild follows a similar change to TypeScript which will allow this syntax starting with TypeScript 5.7.
Allow quoted property names in
--define
and--pure
(#4008)The
define
andpure
API options now accept identifier expressions containing quoted property names. Previously all identifiers in the identifier expression had to be bare identifiers. This change now makes--define
and--pure
consistent with--global-name
, which already supported quoted property names. For example, the following is now possible:// The following code now transforms to "return true;\n" console.log(esbuild.transformSync( `return process.env['SOME-TEST-VAR']`, { define: { 'process.env["SOME-TEST-VAR"]': 'true' } }, ))
... (truncated)
Sourced from esbuild's changelog.
0.24.2
Fix regression with
--define
andimport.meta
(#4010, #4012, #4013)The previous change in version 0.24.1 to use a more expression-like parser for
define
values to allow quoted property names introduced a regression that removed the ability to use--define:import.meta=...
. Even thoughimport
is normally a keyword that can't be used as an identifier, ES modules special-case theimport.meta
expression to behave like an identifier anyway. This change fixes the regression.This fix was contributed by
@sapphi-red
.0.24.1
Allow
es2024
as a target intsconfig.json
(#4004)TypeScript recently added
es2024
as a compilation target, so esbuild now supports this in thetarget
field oftsconfig.json
files, such as in the following configuration file:{ "compilerOptions": { "target": "ES2024" } }
As a reminder, the only thing that esbuild uses this field for is determining whether or not to use legacy TypeScript behavior for class fields. You can read more in the documentation.
This fix was contributed by
@billyjanitsch
.Allow automatic semicolon insertion after
get
/set
This change fixes a grammar bug in the parser that incorrectly treated the following code as a syntax error:
class Foo { get *x() {} set *y() {} }
The above code will be considered valid starting with this release. This change to esbuild follows a similar change to TypeScript which will allow this syntax starting with TypeScript 5.7.
Allow quoted property names in
--define
and--pure
(#4008)The
define
andpure
API options now accept identifier expressions containing quoted property names. Previously all identifiers in the identifier expression had to be bare identifiers. This change now makes--define
and--pure
consistent with--global-name
, which already supported quoted property names. For example, the following is now possible:// The following code now transforms to "return true;\n" console.log(esbuild.transformSync( `return process.env['SOME-TEST-VAR']`, { define: { 'process.env["SOME-TEST-VAR"]': 'true' } },
... (truncated)
745abd9
publish 0.24.2 to npm79fd0b0
skip nulls in source map finalization (#4011)4b9322f
source map: avoid null entry for 0-length parts199a0d3
close #4013:
credit to @sapphi-red
for
the fix947f99f
fix #4010,
fix #4012:
import.meta
regressionde9598f
publish 0.24.1 to npm15d56ca
emit null source mappings for empty chunk content8d98f6f
fix #3985:
entryPoint
metadata for copy
loader0db1b82
fix #3998:
avoid outbase
in identifier names7236472
close #3974:
add support for netbsd on arm64