Support TypeScript experimental decorators on abstract class fields (#3684)
With this release, you can now use TypeScript experimental decorators on abstract class fields. This was silently compiled incorrectly in esbuild 0.19.7 and below, and was an error from esbuild 0.19.8 to esbuild 0.20.1. Code such as the following should now work correctly:
// Original code
const log = (x: any, y: string) => console.log(y)
abstract class Foo { @log abstract foo: string }
new class extends Foo { foo = '' }
// Old output (with --loader=ts --tsconfig-raw={"compilerOptions":{"experimentalDecorators":true}})
const log = (x, y) => console.log(y);
class Foo {
}
new class extends Foo {
foo = "";
}();
// New output (with --loader=ts --tsconfig-raw={"compilerOptions":{"experimentalDecorators":true}})
const log = (x, y) => console.log(y);
class Foo {
}
__decorateClass([
log
], Foo.prototype, "foo", 2);
new class extends Foo {
foo = "";
}();
JSON loader now preserves __proto__ properties (#3700)
Copying JSON source code into a JavaScript file will change its meaning if a JSON object contains the __proto__ key. A literal __proto__ property in a JavaScript object literal sets the prototype of the object instead of adding a property named __proto__, while a literal __proto__ property in a JSON object literal just adds a property named __proto__. With this release, esbuild will now work around this problem by converting JSON to JavaScript with a computed property key in this case:
// Original code
import data from 'data:application/json,{"__proto__":{"fail":true}}'
if (Object.getPrototypeOf(data)?.fail) throw 'fail'
// Old output (with --bundle)
(() => {
// <data:application/json,{"proto":{"fail":true}}>
var json_proto_fail_true_default = { proto: { fail: true } };
// entry.js
if (Object.getPrototypeOf(json_proto_fail_true_default)?.fail)
throw "fail";
})();
Support TypeScript experimental decorators on abstract class fields (#3684)
With this release, you can now use TypeScript experimental decorators on abstract class fields. This was silently compiled incorrectly in esbuild 0.19.7 and below, and was an error from esbuild 0.19.8 to esbuild 0.20.1. Code such as the following should now work correctly:
// Original code
const log = (x: any, y: string) => console.log(y)
abstract class Foo { @log abstract foo: string }
new class extends Foo { foo = '' }
// Old output (with --loader=ts --tsconfig-raw={"compilerOptions":{"experimentalDecorators":true}})
const log = (x, y) => console.log(y);
class Foo {
}
new class extends Foo {
foo = "";
}();
// New output (with --loader=ts --tsconfig-raw={"compilerOptions":{"experimentalDecorators":true}})
const log = (x, y) => console.log(y);
class Foo {
}
__decorateClass([
log
], Foo.prototype, "foo", 2);
new class extends Foo {
foo = "";
}();
JSON loader now preserves __proto__ properties (#3700)
Copying JSON source code into a JavaScript file will change its meaning if a JSON object contains the __proto__ key. A literal __proto__ property in a JavaScript object literal sets the prototype of the object instead of adding a property named __proto__, while a literal __proto__ property in a JSON object literal just adds a property named __proto__. With this release, esbuild will now work around this problem by converting JSON to JavaScript with a computed property key in this case:
// Original code
import data from 'data:application/json,{"__proto__":{"fail":true}}'
if (Object.getPrototypeOf(data)?.fail) throw 'fail'
// Old output (with --bundle)
(() => {
// <data:application/json,{"proto":{"fail":true}}>
var json_proto_fail_true_default = { proto: { fail: true } };
// entry.js
if (Object.getPrototypeOf(json_proto_fail_true_default)?.fail)
throw "fail";
})();
Added: [unicorn/template-indent], (as a [special rule][unicorn/template-indent-special]). Thanks to Gürgün Dayıoğlu (@gurgunday)!
Changed: All the [formatting rules that were deprecated in ESLint 8.53.0][deprecated-8.53.0] are now excluded if you set the ESLINT_CONFIG_PRETTIER_NO_DEPRECATED environment variable.
Version 9.0.0 (2023-08-05)
Added: The CLI helper tool now works with eslint.config.js (flat config). Just like ESLint itself, the CLI tool automatically first tries eslint.config.js and then eslintrc, and you can force which one to use by setting the [ESLINT_USE_FLAT_CONFIG] environment variable. Note that the config of eslint-config-prettier has always been compatible with eslint.config.js (flat config) – it was just the CLI tool that needed updating. On top of that, the docs have been updated to mention how to use both eslint.config.js (flat config) and eslintrc, and the tests now test both config systems.
Changed: [unicode-bom] is no longer turned off. Prettier preserves the BOM if you have one, and does not add one if missing. It was wrong of eslint-config-prettier to disable that rule. If you get ESLint errors after upgrading, either add "unicode-bom": "off" to your config to disable it again, or run ESLint with --fix to fix all files according to the rule (add or remove BOM). Thanks to Nicolas Stepien (@nstepien)!
Version 8.10.0 (2023-08-03)
Added: [max-statements-per-line]. Thanks to @Zamiell!
Version 8.9.0 (2023-07-27)
Added: [vue/array-element-newline]. Thanks to @xcatliu!
Version 8.8.0 (2023-03-20)
Added: [@typescript-eslint/lines-around-comment]. Thanks to @ttionya!
Version 8.7.0 (2023-03-06)
Added: [@typescript-eslint/block-spacing]. Thanks to @ttionya!
Added: [@typescript-eslint/key-spacing]. Thanks to @ttionya!
Version 8.6.0 (2023-01-02)
Added: [vue/multiline-ternary]. Thanks to @xcatliu!
Version 8.5.0 (2022-03-02)
Added: [@typescript-eslint/space-before-blocks]. Thanks to Masafumi Koba (@ybiquitous)!
Add --default -p flag to provide a default pattern
10.2.0
Add glob cli
10.1.0
Return '.' instead of the empty string '' when the current
working directory is returned as a match.
Add posix: true option to return / delimited paths, even on
Windows.
10.0.0
No default exports, only named exports
9.3.3
Upgraded minimatch to v8, adding support for any degree of
nested extglob patterns.
9.3
Add aliases for methods. glob.sync, glob.stream,
glob.stream.sync, etc.
9.2
Support using a custom fs object, which is passed to PathScurry
add maxDepth option
add stat option
add custom Ignore support
9.1
Bring back the root option, albeit with slightly different
semantics than in v8 and before.
Support { absolute:false } option to explicitly always return
relative paths. An unset absolute setting will still return
absolute or relative paths based on whether the pattern is
absolute.
Add magicalBraces option to treat brace expansion as "magic"
in the hasMagic function.
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 all-dependencies group with 8 updates:
18.19.17
18.19.24
2.19.0
2.24.0
0.20.1
0.20.2
8.3.0
8.57.0
8.3.0
9.1.0
7.1.7
7.2.3
2.5.1
3.2.5
5.3.3
5.4.2
Updates
@types/node
from 18.19.17 to 18.19.24Commits
Updates
@vscode/vsce
from 2.19.0 to 2.24.0Commits
a080290
Revert "feat: Support for yarn workspaces (#493)" (#936)6e959ca
remove fixture files (#925)f37621d
fixes #322 (#924)3fc1a9a
publish pre-release on main ci (#923)1be75b2
feat: show targets in show command (#922)4df2693
show pre-release data in show command (#921)b18c620
rewrite video src links (#920)916fd91
feat: support --readme-path and --changelog-path (#919)302f02c
handle multi line images (#918)160d0e0
Filter data from other platforms (#912)Updates
esbuild
from 0.20.1 to 0.20.2Release notes
Sourced from esbuild's releases.
... (truncated)
Changelog
Sourced from esbuild's changelog.
... (truncated)
Commits
617edda
publish 0.20.2 to npm4780075
fix #3700: json loader preserves__proto__
keys30bed2d
better errors for invalid js decorator syntax300eeb7
ts: allow non-null assertions in js decorators4d997d9
fix #3698: yarn pnp edge case withtsconfig.json
cf42954
resolver: improve some debug loggingb0765ae
fix some lintsdfa6206
fix some comments (closes #3683)ae5cc17
fix #3684:abstract
experimental decoratorsc809af0
fix #2388: allow consuming types without dom types (#3679)Updates
eslint
from 8.3.0 to 8.57.0Release notes
Sourced from eslint's releases.
... (truncated)
Changelog
Sourced from eslint's changelog.
... (truncated)
Commits
abea3b6
8.57.01cd3f8c
Build: changelog update for 8.57.01813aec
chore: upgrade@eslint/js
@8
.57.0 (#18143)5c356bb
chore: package.json update for@eslint/js
release84922d0
docs: Show prerelease version in dropdown (#18139)1120b9b
feat: Add loadESLint() API method for v8 (#18098)5b8c363
docs: Switch to Ethical Ads (#18117)2196d97
fix: handle absolute file paths inFlatRuleTester
(#18064)f4a1fe2
test: add more tests for ignoring files and directories (#18068)69dd1d1
fix: Ensure config keys are printed for config errors (#18067)Updates
eslint-config-prettier
from 8.3.0 to 9.1.0Changelog
Sourced from eslint-config-prettier's changelog.
Commits
40c7f3d
eslint-config-prettier v9.1.04110dff
Merge pull request #271 from prettier/deprecated6d0bd92
Update tests to handle newly deprecated rules4c876b9
Move rules deprecated in ESLint 8.53.0 to the deprecated section24445c0
Use specialRule constant7827196
Group deprecated and removed rules by version48f804c
Roll back to ESLint 8.52.0 for now16f03b8
Update Prettierb06d618
Update npm packages25fc427
turn offunicorn/template-indent
(#269)Updates
glob
from 7.1.7 to 7.2.3Changelog
Sourced from glob's changelog.
... (truncated)
Commits
c3cd57a
7.2.3c663c7d
v7 should have allowWindowsEscapes:false, not truefd05f3d
7.2.26e12d20
[Refactor] use more explicitassert.ok
5e27b39
publish tag for v7 legacy backports965f939
7.2.173feafd
update minimatch, use allowWindowsEscape:true option3bfec21
7.2.0df4598a
Add fs option to allow passing virtual filesystemUpdates
prettier
from 2.5.1 to 3.2.5Release notes
Sourced from prettier's releases.
... (truncated)
Changelog
Sourced from prettier's changelog.
... (truncated)
Commits
7142cf3
Release 3.2.58cbee2e
chore(deps): update glimmer to v0.88.1 (#15991)45baee0
chore(deps): update dependency magic-string to v0.30.6 (#16022)9fb32a1
Minor refactor to property print (#15924)08f1940
Update install script for husky v9 (#16000)6d0b1d2
Update yarn to v4.1.0 (#16021)c8ba8db
chore(deps): update dependency@angular/compiler
to v17.1.2 (#16018)e2250ec
chore(deps): update typescript-eslint to v6.20.0 (#16015)02865f6
chore(deps): update dependency npm-run-all2 to v6.1.2 (#16017)014ee5d
chore(deps): update dependency hermes-parser to v0.19.0 (#16014)Maintainer changes
This version was pushed to npm by prettier-bot, a new releaser for prettier since your current version.
Updates
typescript
from 5.3.3 to 5.4.2Release notes
Sourced from typescript's releases.
Commits
42bb138
Bump version to 5.4.2 and LKG992c705
Add release pipeline to release-5.4 (#57513)db6b2a9
Bump version to 5.4.1-rc and LKGbd4f51c
Update LKG8a1f79d
Merge remote-tracking branch 'origin/main' into release-5.4d04e348
Improve apparent type of mapped types (#57122)86a1663
Update package-lock.jsonfeb57c2
Instantiate earlier inferred constraints in conditional types (#57362)91e67ff
fix(57392): using is not suggested as a keyword (#57394)29c0024
Avoid creating rest elements witherrorType
whenany
is spread (#57116)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