typescript-eslint/typescript-eslint (@typescript-eslint/eslint-plugin)
### [`v5.17.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#5170-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5160v5170-2022-03-28)
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.16.0...v5.17.0)
##### Features
- **eslint-plugin:** \[no-unused-vars] add destructuredArrayIgnorePattern options ([#4748](https://togithub.com/typescript-eslint/typescript-eslint/issues/4748)) ([6f8db8b](https://togithub.com/typescript-eslint/typescript-eslint/commit/6f8db8b64821d280fff408c1704a9adde682ed69))
typescript-eslint/typescript-eslint (@typescript-eslint/parser)
### [`v5.17.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#5170-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5160v5170-2022-03-28)
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.16.0...v5.17.0)
**Note:** Version bump only for package [@typescript-eslint/parser](https://togithub.com/typescript-eslint/parser)
evanw/esbuild
### [`v0.14.31`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#01431)
[Compare Source](https://togithub.com/evanw/esbuild/compare/v0.14.30...v0.14.31)
- Add support for parsing "optional variance annotations" from TypeScript 4.7 ([#2102](https://togithub.com/evanw/esbuild/pull/2102))
The upcoming version of TypeScript now lets you specify `in` and/or `out` on certain type parameters (specifically only on a type alias, an interface declaration, or a class declaration). These modifiers control type paramemter covariance and contravariance:
```ts
type Provider = () => T;
type Consumer = (x: T) => void;
type Mapper = (x: T) => U;
type Processor = (x: T) => T;
```
With this release, esbuild can now parse these new type parameter modifiers. This feature was contributed by [@magic-akari](https://togithub.com/magic-akari).
- Improve support for `super()` constructor calls in nested locations ([#2134](https://togithub.com/evanw/esbuild/issues/2134))
In JavaScript, derived classes must call `super()` somewhere in the `constructor` method before being able to access `this`. Class public instance fields, class private instance fields, and TypeScript constructor parameter properties can all potentially cause code which uses `this` to be inserted into the constructor body, which must be inserted after the `super()` call. To make these insertions straightforward to implement, the TypeScript compiler doesn't allow calling `super()` somewhere other than in a root-level statement in the constructor body in these cases.
Previously esbuild's class transformations only worked correctly when `super()` was called in a root-level statement in the constructor body, just like the TypeScript compiler. But with this release, esbuild should now generate correct code as long as the call to `super()` appears anywhere in the constructor body:
```ts
// Original code
class Foo extends Bar {
constructor(public skip = false) {
if (skip) {
super(null)
return
}
super({ keys: [] })
}
}
// Old output (incorrect)
class Foo extends Bar {
constructor(skip = false) {
if (skip) {
super(null);
return;
}
super({ keys: [] });
this.skip = skip;
}
}
// New output (correct)
class Foo extends Bar {
constructor(skip = false) {
var __super = (...args) => {
super(...args);
this.skip = skip;
};
if (skip) {
__super(null);
return;
}
__super({ keys: [] });
}
}
```
- Add support for the new `@container` CSS rule ([#2127](https://togithub.com/evanw/esbuild/pull/2127))
This release adds support for [`@container`](https://drafts.csswg.org/css-contain-3/#container-rule) in CSS files. This means esbuild will now pretty-print and minify these rules better since it now better understands the internal structure of these rules:
```css
/* Original code */
@container (width <= 150px) {
#inner {
color: yellow;
}
}
/* Old output (with --minify) */
@container (width <= 150px){#inner {color: yellow;}}
/* New output (with --minify) */
@container (width <= 150px){#inner{color:#ff0}}
```
This was contributed by [@yisibl](https://togithub.com/yisibl).
- Avoid CSS cascade-dependent keywords in the `font-family` property ([#2135](https://togithub.com/evanw/esbuild/pull/2135))
In CSS, [`initial`](https://developer.mozilla.org/en-US/docs/Web/CSS/initial), [`inherit`](https://developer.mozilla.org/en-US/docs/Web/CSS/inherit), and [`unset`](https://developer.mozilla.org/en-US/docs/Web/CSS/unset) are [CSS-wide keywords](https://drafts.csswg.org/css-values-4/#css-wide-keywords) which means they have special behavior when they are specified as a property value. For example, while `font-family: 'Arial'` (as a string) and `font-family: Arial` (as an identifier) are the same, `font-family: 'inherit'` (as a string) uses the font family named `inherit` but `font-family: inherit` (as an identifier) inherits the font family from the parent element. This means esbuild must not unquote these CSS-wide keywords (and `default`, which is also reserved) during minification to avoid changing the meaning of the minified CSS.
The current draft of the new CSS Cascading and Inheritance Level 5 specification adds another concept called [cascade-dependent keywords](https://drafts.csswg.org/css-cascade-5/#defaulting-keywords) of which there are two: [`revert`](https://developer.mozilla.org/en-US/docs/Web/CSS/revert) and [`revert-layer`](https://developer.mozilla.org/en-US/docs/Web/CSS/revert-layer). This release of esbuild guards against unquoting these additional keywords as well to avoid accidentally breaking pages that use a font with the same name:
```css
/* Original code */
a { font-family: 'revert'; }
b { font-family: 'revert-layer', 'Segoe UI', serif; }
/* Old output (with --minify) */
a{font-family:revert}b{font-family:revert-layer,Segoe UI,serif}
/* New output (with --minify) */
a{font-family:"revert"}b{font-family:"revert-layer",Segoe UI,serif}
```
This fix was contributed by [@yisibl](https://togithub.com/yisibl).
### [`v0.14.30`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#01430)
[Compare Source](https://togithub.com/evanw/esbuild/compare/v0.14.29...v0.14.30)
- Change the context of TypeScript parameter decorators ([#2147](https://togithub.com/evanw/esbuild/issues/2147))
While TypeScript parameter decorators are expressions, they are not evaluated where they exist in the code. They are moved to after the class declaration and evaluated there instead. Specifically this TypeScript code:
```ts
class Class {
method(@decorator() arg) {}
}
```
becomes this JavaScript code:
```js
class Class {
method(arg) {}
}
__decorate([
__param(0, decorator())
], Class.prototype, "method", null);
```
This has several consequences:
- Whether `await` is allowed inside a decorator expression or not depends on whether the class declaration itself is in an `async` context or not. With this release, you can now use `await` inside a decorator expression when the class declaration is either inside an `async` function or is at the top-level of an ES module and top-level await is supported. Note that the TypeScript compiler currently has a bug regarding this edge case: https://github.com/microsoft/TypeScript/issues/48509.
```ts
// Using "await" inside a decorator expression is now allowed
async function fn(foo: Promise) {
class Class {
method(@decorator(await foo) arg) {}
}
return Class
}
```
Also while TypeScript currently allows `await` to be used like this in `async` functions, it doesn't currently allow `yield` to be used like this in generator functions. It's not yet clear whether this behavior with `yield` is a bug or by design, so I haven't made any changes to esbuild's handling of `yield` inside decorator expressions in this release.
- Since the scope of a decorator expression is the scope enclosing the class declaration, they cannot access private identifiers. Previously this was incorrectly allowed but with this release, esbuild no longer allows this. Note that the TypeScript compiler currently has a bug regarding this edge case: https://github.com/microsoft/TypeScript/issues/48515.
```ts
// Using private names inside a decorator expression is no longer allowed
class Class {
static #priv = 123
method(@decorator(Class.#priv) arg) {}
}
```
- Since the scope of a decorator expression is the scope enclosing the class declaration, identifiers inside parameter decorator expressions should never be resolved to a parameter of the enclosing method. Previously this could happen, which was a bug with esbuild. This bug no longer happens in this release.
```ts
// Name collisions now resolve to the outer name instead of the inner name
let arg = 1
class Class {
method(@decorator(arg) arg = 2) {}
}
```
Specifically previous versions of esbuild generated the following incorrect JavaScript (notice the use of `arg2`):
```js
let arg = 1;
class Class {
method(arg2 = 2) {
}
}
__decorateClass([
__decorateParam(0, decorator(arg2))
], Class.prototype, "method", 1);
```
This release now generates the following correct JavaScript (notice the use of `arg`):
```js
let arg = 1;
class Class {
method(arg2 = 2) {
}
}
__decorateClass([
__decorateParam(0, decorator(arg))
], Class.prototype, "method", 1);
```
- Fix some obscure edge cases with `super` property access
This release fixes the following obscure problems with `super` when targeting an older JavaScript environment such as `--target=es6`:
1. The compiler could previously crash when a lowered `async` arrow function contained a class with a field initializer that used a `super` property access:
```js
let foo = async () => class extends Object {
bar = super.toString
}
```
2. The compiler could previously generate incorrect code when a lowered `async` method of a derived class contained a nested class with a computed class member involving a `super` property access on the derived class:
```js
class Base {
foo() { return 'bar' }
}
class Derived extends Base {
async foo() {
return new class { [super.foo()] = 'success' }
}
}
new Derived().foo().then(obj => console.log(obj.bar))
```
3. The compiler could previously generate incorrect code when a default-exported class contained a `super` property access inside a lowered static private class field:
```js
class Foo {
static foo = 123
}
export default class extends Foo {
static #foo = super.foo
static bar = this.#foo
}
```
### [`v0.14.29`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#01429)
[Compare Source](https://togithub.com/evanw/esbuild/compare/v0.14.28...v0.14.29)
- Fix a minification bug with a double-nested `if` inside a label followed by `else` ([#2139](https://togithub.com/evanw/esbuild/issues/2139))
This fixes a minification bug that affects the edge case where `if` is followed by `else` and the `if` contains a label that contains a nested `if`. Normally esbuild's AST printer automatically wraps the body of a single-statement `if` in braces to avoid the "dangling else" `if`/`else` ambiguity common to C-like languages (where the `else` accidentally becomes associated with the inner `if` instead of the outer `if`). However, I was missing automatic wrapping of label statements, which did not have test coverage because they are a rarely-used feature. This release fixes the bug:
```js
// Original code
if (a)
b: {
if (c) break b
}
else if (d)
e()
// Old output (with --minify)
if(a)e:if(c)break e;else d&&e();
// New output (with --minify)
if(a){e:if(c)break e}else d&&e();
```
- Fix edge case regarding `baseUrl` and `paths` in `tsconfig.json` ([#2119](https://togithub.com/evanw/esbuild/issues/2119))
In `tsconfig.json`, TypeScript forbids non-relative values inside `paths` if `baseUrl` is not present, and esbuild does too. However, TypeScript checked this after the entire `tsconfig.json` hierarchy was parsed while esbuild incorrectly checked this immediately when parsing the file containing the `paths` map. This caused incorrect warnings to be generated for `tsconfig.json` files that specify a `baseUrl` value and that inherit a `paths` value from an `extends` clause. Now esbuild will only check for non-relative `paths` values after the entire hierarchy has been parsed to avoid generating incorrect warnings.
- Better handle errors where the esbuild binary executable is corrupted or missing ([#2129](https://togithub.com/evanw/esbuild/issues/2129))
If the esbuild binary executable is corrupted or missing, previously there was one situation where esbuild's JavaScript API could hang instead of generating an error. This release changes esbuild's library code to generate an error instead in this case.
prettier/prettier
### [`v2.6.2`](https://togithub.com/prettier/prettier/blob/HEAD/CHANGELOG.md#262)
[Compare Source](https://togithub.com/prettier/prettier/compare/2.6.1...2.6.2)
[diff](https://togithub.com/prettier/prettier/compare/2.6.1...2.6.2)
##### Fix LESS/SCSS format error ([#12536](https://togithub.com/prettier/prettier/pull/12536) by [@fisker](https://togithub.com/fisker))
```less
// Input
.background-gradient(@cut) {
background: linear-gradient(
to right,
@white 0%,
@white (@cut - 0.01%),
@portal-background @cut,
@portal-background 100%
);
}
// Prettier 2.6.1
TypeError: Cannot read properties of undefined (reading 'endOffset')
// Prettier 2.6.2
.background-gradient(@cut) {
background: linear-gradient(
to right,
@white 0%,
@white (@cut - 0.01%),
@portal-background @cut,
@portal-background 100%
);
}
```
##### Update `meriyah` to fix several bugs ([#12567](https://togithub.com/prettier/prettier/pull/12567) by [@fisker](https://togithub.com/fisker), fixes in [`meriyah`](https://togithub.com/meriyah/meriyah/) by [@3cp](https://togithub.com/3cp))
Fixes bugs when parsing following valid code:
```js
foo(await bar());
```
```js
const regex = /.*/ms;
```
```js
const element =
{/w/.test(s)}
;
```
```js
class A extends B {
#privateMethod() {
super.method();
}
}
```
egoist/tsup
### [`v5.12.4`](https://togithub.com/egoist/tsup/releases/v5.12.4)
[Compare Source](https://togithub.com/egoist/tsup/compare/v5.12.3...v5.12.4)
##### Bug Fixes
- make sure `sources` are relative path in sourcemap, closes [#603](https://togithub.com/egoist/tsup/issues/603) ([637ec28](https://togithub.com/egoist/tsup/commit/637ec281ab2f777ce310442d4434f9cd792efc60))
- reject promise with an error ([401e204](https://togithub.com/egoist/tsup/commit/401e20419baad4f096adef022be726cd1b80ec28))
### [`v5.12.3`](https://togithub.com/egoist/tsup/releases/v5.12.3)
[Compare Source](https://togithub.com/egoist/tsup/compare/v5.12.2...v5.12.3)
##### Bug Fixes
- don't treat .node.js as native node module, closes [#589](https://togithub.com/egoist/tsup/issues/589) ([e5fe1c1](https://togithub.com/egoist/tsup/commit/e5fe1c188bd4e24397d19b82e0f13f0c632dbfa6))
### [`v5.12.2`](https://togithub.com/egoist/tsup/releases/v5.12.2)
[Compare Source](https://togithub.com/egoist/tsup/compare/v5.12.1...v5.12.2)
##### Bug Fixes
- build promise resolves before types are emitted ([#597](https://togithub.com/egoist/tsup/issues/597)) ([d30f813](https://togithub.com/egoist/tsup/commit/d30f813ee752979f6f9f6aa7698766ba146c3e48))
Configuration
📅 Schedule: "before 3am on Monday" (UTC).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
â™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
[ ] If you want to rebase/retry this PR, click this checkbox.
This PR contains the following updates:
^5.16.0
->^5.17.0
^5.16.0
->^5.17.0
^0.14.28
->^0.14.31
^2.6.1
->^2.6.2
^5.12.1
->^5.12.4
Release Notes
typescript-eslint/typescript-eslint (@typescript-eslint/eslint-plugin)
### [`v5.17.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#5170-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5160v5170-2022-03-28) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.16.0...v5.17.0) ##### Features - **eslint-plugin:** \[no-unused-vars] add destructuredArrayIgnorePattern options ([#4748](https://togithub.com/typescript-eslint/typescript-eslint/issues/4748)) ([6f8db8b](https://togithub.com/typescript-eslint/typescript-eslint/commit/6f8db8b64821d280fff408c1704a9adde682ed69))typescript-eslint/typescript-eslint (@typescript-eslint/parser)
### [`v5.17.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#5170-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5160v5170-2022-03-28) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.16.0...v5.17.0) **Note:** Version bump only for package [@typescript-eslint/parser](https://togithub.com/typescript-eslint/parser)evanw/esbuild
### [`v0.14.31`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#01431) [Compare Source](https://togithub.com/evanw/esbuild/compare/v0.14.30...v0.14.31) - Add support for parsing "optional variance annotations" from TypeScript 4.7 ([#2102](https://togithub.com/evanw/esbuild/pull/2102)) The upcoming version of TypeScript now lets you specify `in` and/or `out` on certain type parameters (specifically only on a type alias, an interface declaration, or a class declaration). These modifiers control type paramemter covariance and contravariance: ```ts type Providerprettier/prettier
### [`v2.6.2`](https://togithub.com/prettier/prettier/blob/HEAD/CHANGELOG.md#262) [Compare Source](https://togithub.com/prettier/prettier/compare/2.6.1...2.6.2) [diff](https://togithub.com/prettier/prettier/compare/2.6.1...2.6.2) ##### Fix LESS/SCSS format error ([#12536](https://togithub.com/prettier/prettier/pull/12536) by [@fisker](https://togithub.com/fisker)) ```less // Input .background-gradient(@cut) { background: linear-gradient( to right, @white 0%, @white (@cut - 0.01%), @portal-background @cut, @portal-background 100% ); } // Prettier 2.6.1 TypeError: Cannot read properties of undefined (reading 'endOffset') // Prettier 2.6.2 .background-gradient(@cut) { background: linear-gradient( to right, @white 0%, @white (@cut - 0.01%), @portal-background @cut, @portal-background 100% ); } ``` ##### Update `meriyah` to fix several bugs ([#12567](https://togithub.com/prettier/prettier/pull/12567) by [@fisker](https://togithub.com/fisker), fixes in [`meriyah`](https://togithub.com/meriyah/meriyah/) by [@3cp](https://togithub.com/3cp)) Fixes bugs when parsing following valid code: ```js foo(await bar()); ``` ```js const regex = /.*/ms; ``` ```js const element ={/w/.test(s)}
; ``` ```js class A extends B { #privateMethod() { super.method(); } } ```egoist/tsup
### [`v5.12.4`](https://togithub.com/egoist/tsup/releases/v5.12.4) [Compare Source](https://togithub.com/egoist/tsup/compare/v5.12.3...v5.12.4) ##### Bug Fixes - make sure `sources` are relative path in sourcemap, closes [#603](https://togithub.com/egoist/tsup/issues/603) ([637ec28](https://togithub.com/egoist/tsup/commit/637ec281ab2f777ce310442d4434f9cd792efc60)) - reject promise with an error ([401e204](https://togithub.com/egoist/tsup/commit/401e20419baad4f096adef022be726cd1b80ec28)) ### [`v5.12.3`](https://togithub.com/egoist/tsup/releases/v5.12.3) [Compare Source](https://togithub.com/egoist/tsup/compare/v5.12.2...v5.12.3) ##### Bug Fixes - don't treat .node.js as native node module, closes [#589](https://togithub.com/egoist/tsup/issues/589) ([e5fe1c1](https://togithub.com/egoist/tsup/commit/e5fe1c188bd4e24397d19b82e0f13f0c632dbfa6)) ### [`v5.12.2`](https://togithub.com/egoist/tsup/releases/v5.12.2) [Compare Source](https://togithub.com/egoist/tsup/compare/v5.12.1...v5.12.2) ##### Bug Fixes - build promise resolves before types are emitted ([#597](https://togithub.com/egoist/tsup/issues/597)) ([d30f813](https://togithub.com/egoist/tsup/commit/d30f813ee752979f6f9f6aa7698766ba146c3e48))Configuration
📅 Schedule: "before 3am on Monday" (UTC).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
â™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by WhiteSource Renovate. View repository job log here.