Correct this in field and accessor decorators (#3761)
This release changes the value of this in initializers for class field and accessor decorators from the module-level this value to the appropriate this value for the decorated element (either the class or the instance). It was previously incorrect due to lack of test coverage. Here's an example of a decorator that doesn't work without this change:
const dec = () => function() { this.bar = true }
class Foo { @dec static foo }
console.log(Foo.bar) // Should be "true"
TypeScript recently added es2023 as a compilation target, so esbuild now supports this too. There is no difference between a target of es2022 and es2023 as far as esbuild is concerned since the 2023 edition of JavaScript doesn't introduce any new syntax features.
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
}
Correct this in field and accessor decorators (#3761)
This release changes the value of this in initializers for class field and accessor decorators from the module-level this value to the appropriate this value for the decorated element (either the class or the instance). It was previously incorrect due to lack of test coverage. Here's an example of a decorator that doesn't work without this change:
const dec = () => function() { this.bar = true }
class Foo { @dec static foo }
console.log(Foo.bar) // Should be "true"
TypeScript recently added es2023 as a compilation target, so esbuild now supports this too. There is no difference between a target of es2022 and es2023 as far as esbuild is concerned since the 2023 edition of JavaScript doesn't introduce any new syntax features.
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
}
Bumps the vscode-deps group with 8 updates in the /editors/vscode directory:
20.11.28
20.12.11
7.2.0
7.8.0
7.2.0
7.8.0
2.24.0
2.26.1
0.20.2
0.21.2
8.57.0
9.2.0
16.6.2
17.6.0
0.8.3
0.9.1
Updates
@types/node
from 20.11.28 to 20.12.11Commits
Updates
@typescript-eslint/eslint-plugin
from 7.2.0 to 7.8.0Release notes
Sourced from
@typescript-eslint/eslint-plugin
's releases.... (truncated)
Changelog
Sourced from
@typescript-eslint/eslint-plugin
's changelog.... (truncated)
Commits
ee677f6
chore(release): publish 7.8.08127873
fix(eslint-plugin): [no-unused-vars] clear error report range (#8640)216d1b0
fix(eslint-plugin): [no-unsafe-return] handle union types (#9001)51d2193
fix(eslint-plugin): [consistent-type-assertions] handle tagged templates (#8993)4bed24d
fix(eslint-plugin): [prefer-optional-chain] suggests optional chaining during...b0f7aa4
fix(eslint-plugin): [no-unsafe-argument] handle tagged templates (#8746)219b841
chore: resolve lint issues on main branch (#8966)3e19436
chore(release): publish 7.7.1b2552ca
fix(eslint-plugin): [no-unnecessary-type-assertion] allow non-null assertion ...fdeba42
fix(eslint-plugin): [no-for-in-array] refine report location (#8874)Updates
@typescript-eslint/parser
from 7.2.0 to 7.8.0Release notes
Sourced from
@typescript-eslint/parser
's releases.... (truncated)
Changelog
Sourced from
@typescript-eslint/parser
's changelog.... (truncated)
Commits
ee677f6
chore(release): publish 7.8.03e19436
chore(release): publish 7.7.1e44a1a2
chore(release): publish 7.7.0e1db872
chore(release): publish 7.6.0a6ab2cb
feat: bump npm dependency ranges (#8860)a14ba9d
chore(release): publish 7.5.0ecb6b55
docs: add homepage (#8742)d5615d7
fix(parser): disallowerrorOnTypeScriptSyntacticAndSemanticIssues
(#8784)5d24691
chore(release): publish 7.4.0e408b93
feat(eslint-plugin): [consistent-type-imports] ignore files with decorators, ...Updates
@vscode/vsce
from 2.24.0 to 2.26.1Release notes
Sourced from
@vscode/vsce
's releases.... (truncated)
Commits
9316842
Merge pull request #974 from microsoft/benibenj/modest-dragonfly093d33f
Merge pull request #973 from microsoft/benibenj/hon-guineafowlc1ced1d
:lipstick:dd558a9
Remove double checkingf6eb247
:lipstick:b1bde5a
Only sanitize on windows9e06c04
:lipstick:1188664
Commit message enclose in quotes97f8b80
:lipstick:434754f
Remove unused shell-quoteUpdates
esbuild
from 0.20.2 to 0.21.2Release notes
Sourced from esbuild's releases.
... (truncated)
Changelog
Sourced from esbuild's changelog.
... (truncated)
Commits
b24180e
publish 0.21.2 to npmf82e0ad
fix #3761:this
in field and accessor decorators46ea596
fix #3762: addes2023
as an alias fores2022
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 codeUpdates
eslint
from 8.57.0 to 9.2.0Release notes
Sourced from eslint's releases.
... (truncated)
Changelog
Sourced from eslint's changelog.
... (truncated)
Commits
271e7ab
9.2.0989ac9d
Build: changelog update for 9.2.0b346605
chore: upgrade@eslint/js
@9
.2.0 (#18413)c4c18e0
chore: package.json update for@eslint/js
release284722c
chore: package.json update for eslint-config-eslint release0f5df50
docs: Update README347d44f
chore: remove eslintrc export from eslint-config-eslint (#18400)8485d76
feat:no-case-declarations
add suggestions (#18388)a498f35
feat: update Unicode letter detection in capitalized-comments rule (#18375)1579ce0
docs: update wording regarding indirect eval (#18394)Updates
eslint-plugin-n
from 16.6.2 to 17.6.0Release notes
Sourced from eslint-plugin-n's releases.
... (truncated)
Changelog
Sourced from eslint-plugin-n's changelog.
... (truncated)
Commits
a99acb7
chore(master): release 17.6.0 (#270)b454488
docs: add maintainance info (#271)c046376
feat: Add support for ignoring experemental features (#269)c3e5a19
chore(master): release 17.5.1 (#267)030f51b
fix: Add supported version to Buffer constructor (#266)c7a014c
chore(master): release 17.5.0 (#262)982a723
feat(import-target): Add resolution error reason (#264)60bf29f
ci: run test on node v221e41e7c
chore: update dependency markdownlint-cli to ^0.40.0 (#263)ecdf019
fix: remove invalid es-builtins (#258)Updates
ovsx
from 0.8.3 to 0.9.1Release notes
Sourced from ovsx's releases.