The previous release introduced a regression with the --keep-names setting and object literals with get/set accessor methods, in which case the generated code contained syntax errors. This release fixes the regression:
// Original code
x = { get y() {} }
// Output from version 0.21.0 (with --keep-names)
x = { get y: /* @PURE */ __name(function() {
}, "y") };
// Output from this version (with --keep-names)
x = { get y() {
} };
v0.21.0
This release doesn't contain any deliberately-breaking changes. However, it contains a very complex new feature and while all of esbuild's tests pass, I would not be surprised if an important edge case turns out to be broken. So I'm releasing this as a breaking change release to avoid causing any trouble. As usual, make sure to test your code when you upgrade.
Implement the JavaScript decorators proposal (#104)
With this release, esbuild now contains an implementation of the upcoming JavaScript decorators proposal. This is the same feature that shipped in TypeScript 5.0 and has been highly-requested on esbuild's issue tracker. You can read more about them in that blog post and in this other (now slightly outdated) extensive blog post here: https://2ality.com/2022/10/javascript-decorators.html. Here's a quick example:
const log = (fn, context) => function() {
console.log(`before ${context.name}`)
const it = fn.apply(this, arguments)
console.log(`after ${context.name}`)
return it
}
// Logs "before foo", "in foo", "after foo"
Foo.foo()
Note that this feature is different than the existing "TypeScript experimental decorators" feature that esbuild already implements. It uses similar syntax but behaves very differently, and the two are not compatible (although it's sometimes possible to write decorators that work with both). TypeScript experimental decorators will still be supported by esbuild going forward as they have been around for a long time, are very widely used, and let you do certain things that are not possible with JavaScript decorators (such as decorating function parameters). By default esbuild will parse and transform JavaScript decorators, but you can tell esbuild to parse and transform TypeScript experimental decorators instead by setting "experimentalDecorators": true in your tsconfig.json file.
Probably at least half of the work for this feature went into creating a test suite that exercises many of the proposal's edge cases: https://github.com/evanw/decorator-tests. It has given me a reasonable level of confidence that esbuild's initial implementation is acceptable. However, I don't have access to a significant sample of real code that uses JavaScript decorators. If you're currently using JavaScript decorators in a real code base, please try out esbuild's implementation and let me know if anything seems off.
⚠️ WARNING ⚠️
This proposal has been in the works for a very long time (work began around 10 years ago in 2014) and it is finally getting close to becoming part of the JavaScript language. However, it's still a work in progress and isn't a part of JavaScript yet, so keep in mind that any code that uses JavaScript decorators may need to be updated as the feature continues to evolve. The decorators proposal is pretty close to its final form but it can and likely will undergo some small behavioral adjustments before it ends up becoming a part of the standard. If/when that happens, I will update esbuild's implementation to match the specification. I will not be supporting old versions of the specification.
The previous release introduced a regression with the --keep-names setting and object literals with get/set accessor methods, in which case the generated code contained syntax errors. This release fixes the regression:
// Original code
x = { get y() {} }
// Output from version 0.21.0 (with --keep-names)
x = { get y: /* @PURE */ __name(function() {
}, "y") };
// Output from this version (with --keep-names)
x = { get y() {
} };
0.21.0
This release doesn't contain any deliberately-breaking changes. However, it contains a very complex new feature and while all of esbuild's tests pass, I would not be surprised if an important edge case turns out to be broken. So I'm releasing this as a breaking change release to avoid causing any trouble. As usual, make sure to test your code when you upgrade.
Implement the JavaScript decorators proposal (#104)
With this release, esbuild now contains an implementation of the upcoming JavaScript decorators proposal. This is the same feature that shipped in TypeScript 5.0 and has been highly-requested on esbuild's issue tracker. You can read more about them in that blog post and in this other (now slightly outdated) extensive blog post here: https://2ality.com/2022/10/javascript-decorators.html. Here's a quick example:
const log = (fn, context) => function() {
console.log(`before ${context.name}`)
const it = fn.apply(this, arguments)
console.log(`after ${context.name}`)
return it
}
// Logs "before foo", "in foo", "after foo"
Foo.foo()
Note that this feature is different than the existing "TypeScript experimental decorators" feature that esbuild already implements. It uses similar syntax but behaves very differently, and the two are not compatible (although it's sometimes possible to write decorators that work with both). TypeScript experimental decorators will still be supported by esbuild going forward as they have been around for a long time, are very widely used, and let you do certain things that are not possible with JavaScript decorators (such as decorating function parameters). By default esbuild will parse and transform JavaScript decorators, but you can tell esbuild to parse and transform TypeScript experimental decorators instead by setting "experimentalDecorators": true in your tsconfig.json file.
Probably at least half of the work for this feature went into creating a test suite that exercises many of the proposal's edge cases: https://github.com/evanw/decorator-tests. It has given me a reasonable level of confidence that esbuild's initial implementation is acceptable. However, I don't have access to a significant sample of real code that uses JavaScript decorators. If you're currently using JavaScript decorators in a real code base, please try out esbuild's implementation and let me know if anything seems off.
Bumps the dev-dependencies group with 12 updates in the / directory:
1.7.0
1.7.3
13.7.3
13.8.1
0.20.2
0.21.1
7.6.0
7.6.1
16.3.1
16.5.0
4.7.2
4.9.3
18.2.0
18.3.1
18.2.79
18.3.1
18.2.0
18.3.1
18.2.25
18.3.0
5.2.8
5.2.11
18.2.0
18.3.1
Updates
@biomejs/biome
from 1.7.0 to 1.7.3Release notes
Sourced from
@biomejs/biome
's releases.... (truncated)
Changelog
Sourced from
@biomejs/biome
's changelog.... (truncated)
Commits
b9f90b7
release: v1.7.3 (#2722)cb0182e
feat(linter): implementNoUnmatchableAnbSelector
(#2706)f77ab54
feat(linter): implementuseExplicitLengthCheck
(#2631)afa5004
feat(biome_css_analyzer): noUnknownSelectorPseudoElement (#2655)150dd0e
feat(biome_css_analyzer): implement noDuplicateAtImportRules (#2658)773a735
fix(linter): fix typo in rule name.useConsistentBuiltinInstatiation
to `us...2c70d3f
release: v1.7.2 (#2651)46c378e
feat(biome_css_analyzer): noUnknownFunction (#2570)de063b4
feat(lint/useDefaultSwitchClause): add rule (#2605)b3ed181
feat(linter): ImplementuseGenericFontNames
(#2573)Updates
cypress
from 13.7.3 to 13.8.1Release notes
Sourced from cypress's releases.
Commits
52347d6
chore: release 13.8.1 (#29390)867a973
perf: support activated service worker that is not handling requests (#29349)b188ad3
chore: standardize having authors removed from package.json (#29380)45cff01
misc: ensure 'its' function type excludes null and undefined (#28872) (#28904)8db1b23
chore(deps): update dependency filesize to v10 (#29379)c5fa260
fix: added validation for timeout for query operations (#29327)05ff7df
chore: Update v8 snapshot cache (#29382)4e7e3a2
fix: websocket closed (tentative) (#29347)734968a
chore: Add experimentalMemoryManagement flag to our cy-in-cy App tests (#29359)e23460c
dependency: update dependency zod to ^3.22.5 (#29367)Updates
esbuild
from 0.20.2 to 0.21.1Release notes
Sourced from esbuild's releases.
... (truncated)
Changelog
Sourced from esbuild's changelog.
... (truncated)
Commits
e876394
publish 0.21.1 to npm4abc387
adjust decorator source map locationse7a9256
fix #3756: regression with--keep-names
33cbbea
runmake update-compat-table
c6da2c3
publish 0.21.0 to npm4bc834c
initial implementation of the decorators proposal (#3754)07cdbe0
some small adjustments to runtime library code71b3d9f
split offlowerPrivateMethod
fromlowerMethod
0861625
printer: preserve single-line status of block bodyf426153
runtime: make some helper functions more compactUpdates
semver
from 7.6.0 to 7.6.1Release notes
Sourced from semver's releases.
Changelog
Sourced from semver's changelog.
Commits
d777418
chore: release 7.6.1 (#706)988a8de
deps: uninstalllru-cache
(#709)5feeb7f
chore: postinstall for dependabot template-oss PRdd09b60
chore: bump@npmcli/template-oss
to 4.22.0c570a34
fix(linting): no-unused-varsad8ff11
fix: use internal cache implementation3fabe4d
deps: remove lru-cacheec49cdc
chore: chore: chore: postinstall for dependabot template-oss PR074156f
chore: bump@npmcli/template-oss
from 4.21.3 to 4.21.4b236c3d
chore: add benchmarks (#696)Updates
stylelint
from 16.3.1 to 16.5.0Release notes
Sourced from stylelint's releases.
Changelog
Sourced from stylelint's changelog.
Commits
fb54d13
16.5.08b4beb9
Prepare 16.5.0 (#7653)45cb671
Bump@stylelint/remark-preset
from 5.0.0 to 5.1.0 in the stylelint group (#7672)c6456b2
Bump remark-cli from 12.0.0 to 12.0.1 (#7673)b0b8173
Bump rollup from 4.16.3 to 4.17.2 (#7671)c56f714
Revert "Refactor Cosmiconfig types" (#7661)f87f784
Fixshorthand-property-no-redundant-values
false negatives for functions (#...c85f75b
Fixvalue-no-vendor-prefix
false positives/negatives (#7658)68cb920
Fixvalue-no-vendor-prefix
false negatives (#7654)d159c1b
RefactormatchesStringOrRegExp()
utility (#7651)Updates
tsx
from 4.7.2 to 4.9.3Release notes
Sourced from tsx's releases.
... (truncated)
Commits
8022fcf
fix: import implicit extensions from packages3a0ea18
fix(esm): resolve absolute paths (#544)b407435
docs: remove extraneous path from vscode usage (#539)96bc596
fix(tsImport): handle importing packages (#14)63631ac
chore(package.json): update keywords4f515ab
feat:register()
&tsImport()
viaesm/api
(#12)8eb1674
test: node 22 (#13)4c8646a
test(api): CLI usage (#11)933eb7a
refactor: remove unused source map logic (#10)625e6c3
chore(tsconfig): use module: preserveUpdates
react
from 18.2.0 to 18.3.1Release notes
Sourced from react's releases.
Changelog
Sourced from react's changelog.
Commits
f1338f8
ExportReact.act
from 18.3d6c42f7
Bump to 18.3.173bfaa1
Turn on key spread warning in jsx-runtime for everyone (#25697)c2a246e
Turn on string ref deprecation warning for everybody (not codemoddable) (#25383)2cfb474
Bump version from 18.2 to 18.3Maintainer changes
This version was pushed to npm by react-bot, a new releaser for react since your current version.
Updates
@types/react
from 18.2.79 to 18.3.1Commits
Updates
react-dom
from 18.2.0 to 18.3.1Release notes
Sourced from react-dom's releases.
Changelog
Sourced from react-dom's changelog.
Commits
d6c42f7
Bump to 18.3.18a015b6
Add deprecation warning for unmountComponentAtNodec3b2839
Add deprecation warning for findDOMNoded4ea75d
ReactDOMTestUtils deprecation warnings7548c01
DeprecaterenderToStaticNodeStream
(#28872) (#28874)5894232
Enable warning for defaultProps on function components for everyone (#25699)c2a246e
Turn on string ref deprecation warning for everybody (not codemoddable) (#25383)2cfb474
Bump version from 18.2 to 18.3Maintainer changes
This version was pushed to npm by react-bot, a new relea... _Description has been truncated_