This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| @typescript-eslint/eslint-plugin | ^5.17.0
-> ^5.18.0
| | | | |
| @typescript-eslint/parser | ^5.17.0
-> ^5.18.0
| | | | |
| @vue/test-utils | ^2.0.0-rc.17
-> ^2.0.0-rc.19
| | | | |
| esbuild | 0.14.29
-> 0.14.34
| | | | |
| eslint (source) | ^8.12.0
-> ^8.13.0
| | | | |
| pnpm (source) | 6.32.4
-> 6.32.6
| | | | |
| prettier (source) | ^2.6.1
-> ^2.6.2
| | | | |
| release-it | ^14.14.0
-> ^14.14.1
| | | | |
| semver | ^7.3.5
-> ^7.3.6
| | | | |
| vitest | ^0.8.1
-> ^0.9.2
| | | | |
Release Notes
typescript-eslint/typescript-eslint (@typescript-eslint/eslint-plugin)
Compare Source
Bug Fixes
- eslint-plugin: method-signature-style respect getter signature (#4777) (12dd670)
Features
- eslint-plugin: [no-shadow] ignoreOnInitialization option (#4603) (068ea9b)
- eslint-plugin: [no-this-alias] report on assignment expressions (#4718) (8329498)
typescript-eslint/typescript-eslint (@typescript-eslint/parser)
Compare Source
Note: Version bump only for package @typescript-eslint/parser
vuejs/test-utils
Compare Source
Several fixes. We will move from release candidate soon, hopefully this will be the last release candidate, unless any bugs are reported!
Features
feat: Add createStubs plugin hook
feat: support custom class component
Fixes
fix: added missing find overrides
fix: support functional component props
fix: do not match component name on getter that returns component
fix: static imports
fix: findAll root nodes when using render function
fix: stop globalProperties config leak
fix: add relative imports in wrapperLike interface
fix: add methods from baseWrapper to the wrapperLike interface
fix(type): add undefined type to attributes() for missing key #1398
fix(find): find element inside suspense with multi root elements #1397
fix(find): find and findAll should not find itself on DOM wrappers #1392
Compare Source
We are edging closer to a 2.0.0. This release contains many small fixes, mainly related to niche edge cases.
Fixes
fix: stringify symbol props in stubs (#1086)
fix: Remove methods key from mount (#1145)
Fix: Use defaultName when it exists to correctly stub async components (#1136)
fix(find): allow finding stubs by stub definition (#1113)
fix(emitted): do not track native events on multi-root components (#1121)
fix(html): ensure wrapper.html() works correctly for multi-root (#1120)
fix(find): implement proper find for multi-root components (#1116)
fix(find): do not find DOM node by ref if it is not inside element b118e9aa956a81997dc1276583c0f48c5a767387
fix(find): finding by ref may return Node, not just Element 125ea2fa6c0c757c0628f21aa1b1f60f996ca323
Other
chore(findComponent): refactor find & findComponent (fixes #716, #899)
chore(compat): Always treat legacy functional components as function bb44d9e4b92b852db7dc588c0d663f33739d41de
evanw/esbuild
Compare Source
Something went wrong with the publishing script for the previous release. Publishing again.
Compare Source
-
Fix a regression regarding super
(#2158)
This fixes a regression from the previous release regarding classes with a super class, a private member, and a static field in the scenario where the static field needs to be lowered but where private members are supported by the configured target environment. In this scenario, esbuild could incorrectly inject the instance field initializers that use this
into the constructor before the call to super()
, which is invalid. This problem has now been fixed (notice that this
is now used after super()
instead of before):
// Original code
class Foo extends Object {
static FOO;
constructor() {
super();
}
#foo;
}
// Old output (with --bundle)
var _foo;
var Foo = class extends Object {
constructor() {
__privateAdd(this, _foo, void 0);
super();
}
};
_foo = new WeakMap();
__publicField(Foo, "FOO");
// New output (with --bundle)
var _foo;
var Foo = class extends Object {
constructor() {
super();
__privateAdd(this, _foo, void 0);
}
};
_foo = new WeakMap();
__publicField(Foo, "FOO");
During parsing, esbuild scans the class and makes certain decisions about the class such as whether to lower all static fields, whether to lower each private member, or whether calls to super()
need to be tracked and adjusted. Previously esbuild made two passes through the class members to compute this information. However, with the new super()
call lowering logic added in the previous release, we now need three passes to capture the whole dependency chain for this case: 1) lowering static fields requires 2) lowering private members which requires 3) adjusting super()
calls.
The reason lowering static fields requires lowering private members is because lowering static fields moves their initializers outside of the class body, where they can't access private members anymore. Consider this code:
class Foo {
get #foo() {}
static bar = new Foo().#foo
}
We can't just lower static fields without also lowering private members, since that causes a syntax error:
class Foo {
get #foo() {}
}
Foo.bar = new Foo().#foo;
And the reason lowering private members requires adjusting super()
calls is because the injected private member initializers use this
, which is only accessible after super()
calls in the constructor.
-
Fix an issue with --keep-names
not keeping some names (#2149)
This release fixes a regression with --keep-names
from version 0.14.26. PR #2062 attempted to remove superfluous calls to the __name
helper function by omitting calls of the form __name(foo, "foo")
where the name of the symbol in the first argument is equal to the string in the second argument. This was assuming that the initializer for the symbol would automatically be assigned the expected .name
property by the JavaScript VM, which turned out to be an incorrect assumption. To fix the regression, this PR has been reverted.
The assumption is true in many cases but isn't true when the initializer is moved into another automatically-generated variable, which can sometimes be necessary during the various syntax transformations that esbuild does. For example, consider the following code:
class Foo {
static get #foo() { return Foo.name }
static get foo() { return this.#foo }
}
let Bar = Foo
Foo = { name: 'Bar' }
console.log(Foo.name, Bar.name)
This code should print Bar Foo
. With --keep-names --target=es6
that code is lowered by esbuild into the following code (omitting the helper function definitions for brevity):
var _foo, foo_get;
const _Foo = class {
static get foo() {
return __privateGet(this, _foo, foo_get);
}
};
let Foo = _Foo;
__name(Foo, "Foo");
_foo = new WeakSet();
foo_get = /* @​__PURE__ */ __name(function() {
return _Foo.name;
}, "#foo");
__privateAdd(Foo, _foo);
let Bar = Foo;
Foo = { name: "Bar" };
console.log(Foo.name, Bar.name);
The injection of the automatically-generated _Foo
variable is necessary to preserve the semantics of the captured Foo
binding for methods defined within the class body, even when the definition needs to be moved outside of the class body during code transformation. Due to a JavaScript quirk, this binding is immutable and does not change even if Foo
is later reassigned. The PR that was reverted was incorrectly removing the call to __name(Foo, "Foo")
, which turned out to be necessary after all in this case.
-
Print some large integers using hexadecimal when minifying (#2162)
When --minify
is active, esbuild will now use one fewer byte to represent certain large integers:
// Original code
x = 123456787654321;
// Old output (with --minify)
x=123456787654321;
// New output (with --minify)
x=0x704885f926b1;
This works because a hexadecimal representation can be shorter than a decimal representation starting at around 1012 and above.
This optimization made me realize that there's probably an opportunity to optimize printed numbers for smaller gzipped size instead of or in addition to just optimizing for minimal uncompressed byte count. The gzip algorithm does better with repetitive sequences, so for example 0xFFFFFFFF
is probably a better representation than 4294967295
even though the byte counts are the same. As far as I know, no JavaScript minifier does this optimization yet. I don't know enough about how gzip works to know if this is a good idea or what the right metric for this might be.
-
Add Linux ARM64 support for Deno (#2156)
This release adds Linux ARM64 support to esbuild's Deno API implementation, which allows esbuild to be used with Deno on a Raspberry Pi.
Compare Source
-
Fix super
usage in lowered private methods (#2039)
Previously esbuild failed to transform super
property accesses inside private methods in the case when private methods have to be lowered because the target environment doesn't support them. The generated code still contained the super
keyword even though the method was moved outside of the class body, which is a syntax error in JavaScript. This release fixes this transformation issue and now produces valid code:
// Original code
class Derived extends Base {
#foo() { super.foo() }
bar() { this.#foo() }
}
// Old output (with --target=es6)
var _foo, foo_fn;
class Derived extends Base {
constructor() {
super(...arguments);
__privateAdd(this, _foo);
}
bar() {
__privateMethod(this, _foo, foo_fn).call(this);
}
}
_foo = new WeakSet();
foo_fn = function() {
super.foo();
};
// New output (with --target=es6)
var _foo, foo_fn;
const _Derived = class extends Base {
constructor() {
super(...arguments);
__privateAdd(this, _foo);
}
bar() {
__privateMethod(this, _foo, foo_fn).call(this);
}
};
let Derived = _Derived;
_foo = new WeakSet();
foo_fn = function() {
__superGet(_Derived.prototype, this, "foo").call(this);
};
Because of this change, lowered super
property accesses on instances were rewritten so that they can exist outside of the class body. This rewrite affects code generation for all super
property accesses on instances including those inside lowered async
functions. The new approach is different but should be equivalent to the old approach:
// Original code
class Foo {
foo = async () => super.foo()
}
// Old output (with --target=es6)
class Foo {
constructor() {
__publicField(this, "foo", () => {
var __superGet = (key) => super[key];
return __async(this, null, function* () {
return __superGet("foo").call(this);
});
});
}
}
// New output (with --target=es6)
class Foo {
constructor() {
__publicField(this, "foo", () => __async(this, null, function* () {
return __superGet(Foo.prototype, this, "foo").call(this);
}));
}
}
-
Fix some tree-shaking bugs regarding property side effects
This release fixes some cases where side effects in computed properties were not being handled correctly. Specifically primitives and private names as properties should not be considered to have side effects, and object literals as properties should be considered to have side effects:
// Original code
let shouldRemove = { [1]: 2 }
let shouldRemove2 = class { #foo }
let shouldKeep = class { [{ toString() { sideEffect() } }] }
// Old output (with --tree-shaking=true)
let shouldRemove = { [1]: 2 };
let shouldRemove2 = class {
#foo;
};
// New output (with --tree-shaking=true)
let shouldKeep = class {
[{ toString() {
sideEffect();
} }];
};
-
Add the wasmModule
option to the initialize
JS API (#1093)
The initialize
JS API must be called when using esbuild in the browser to provide the WebAssembly module for esbuild to use. Previously the only way to do that was using the wasmURL
API option like this:
await esbuild.initialize({
wasmURL: '/node_modules/esbuild-wasm/esbuild.wasm',
})
console.log(await esbuild.transform('1+2'))
With this release, you can now also initialize esbuild using a WebAssembly.Module
instance using the wasmModule
API option instead. The example above is equivalent to the following code:
await esbuild.initialize({
wasmModule: await WebAssembly.compileStreaming(fetch('/node_modules/esbuild-wasm/esbuild.wasm'))
})
console.log(await esbuild.transform('1+2'))
This could be useful for environments where you want more control over how the WebAssembly download happens or where downloading the WebAssembly module is not possible.
Compare Source
-
Add support for parsing "optional variance annotations" from TypeScript 4.7 (#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:
type Provider<out T> = () => T;
type Consumer<in T> = (x: T) => void;
type Mapper<in T, out U> = (x: T) => U;
type Processor<in out T> = (x: T) => T;
With this release, esbuild can now parse these new type parameter modifiers. This feature was contributed by @magic-akari.
-
Improve support for super()
constructor calls in nested locations (#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:
// 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)
This release adds support for @container
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:
/* 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.
-
Avoid CSS cascade-dependent keywords in the font-family
property (#2135)
In CSS, initial
, inherit
, and unset
are 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 of which there are two: revert
and 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:
/* 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.
Compare Source
-
Change the context of TypeScript parameter decorators (#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:
class Class {
method(@​decorator() arg) {}
}
becomes this JavaScript code:
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.
// Using "await" inside a decorator expression is now allowed
async function fn(foo: Promise<any>) {
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.
// 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.
// 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
):
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
):
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
:
-
The compiler could previously crash when a lowered async
arrow function contained a class with a field initializer that used a super
property access:
let foo = async () => class extends Object {
bar = super.toString
}
-
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:
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))
-
The compiler could previously generate incorrect code when a default-exported class contained a super
property access inside a lowered static private class field:
class Foo {
static foo = 123
}
export default class extends Foo {
static #foo = super.foo
static bar = this.#foo
}
eslint/eslint
Compare Source
Features
274acbd
feat: fix no-eval logic for this
in arrow functions (#15755) (Milos Djermanovic)
Bug Fixes
97b57ae
fix: invalid operator in operator-assignment messages (#15759) (Milos Djermanovic)
Documentation
c32482e
docs: Typo in space-infix-ops docs (#15754) (kmin-jeong)
f2c2d35
docs: disambiguate types FormatterFunction
and LoadedFormatter
(#15727) (Francesco Trotta)
Chores
bb4c0d5
chore: Refactor docs to work with docs.eslint.org (#15744) (Nicholas C. Zakas)
d36f12f
chore: remove lib/init
from eslint config (#15748) (Milos Djermanovic)
a59a4e6
chore: replace trimLeft
/trimRight
with trimStart
/trimEnd
(#15750) (Milos Djermanovic)
pnpm/pnpm
Compare Source
Patch Changes
- Linked in dependencies should be considered when resolving peer dependencies #4541.
- Peer dependency should be correctly resolved from the workspace, when it is declared using a workspace protocol #4529.
Full Changelog: https://github.com/pnpm/pnpm/compare/v6.32.5...v6.32.6
Compare Source
prettier/prettier
Compare Source
diff
Fix LESS/SCSS format error (#12536 by @fisker)
// 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 by @fisker, fixes in meriyah
by @3cp)
Fixes bugs when parsing following valid code:
foo(await bar());
const regex = /.*/ms;
const element = <p>{/w/.test(s)}</p>;
class A extends B {
#privateMethod() {
super.method();
}
}
release-it/release-it
Compare Source
NOTE This is the latest release still supporting Node.js v10. Major issues reported in release-it v14 might still receive bug fixes and patch releases, but no new features.
- Update dependencies (still supporting Node.js v10) (
7018194
)
- Add note about using Inquirer.js in hooks (closes #821) (
2f10cc4
)
- Add comment re. quoting CLI hook arguments (closes #865) (
ea11a0d
)
- Also transfer
tagMatch
to release plugins (fixes #885) (0e0ad33
)
- Downgrade mock-fs and install polyfill for Promise.allSettled (to support Node v10) (
56f1ec7
)
- test: fix CI test for different Node versions (#888) (
e8a57cc
)
- chore(deps): downgrade
inquirer
from 8.2.2 to 8.2.0 to avoid dropping Node 10 support (#887) (2a9a31c
)
npm/node-semver
Compare Source
vitest-dev/vitest
Compare Source
Compare Source
Bug Fixes
Features
Compare Source
Bug Fixes
- vite-node: remove unsafe checks for inlining dependencies (#1097) (c4a25ae)
Features
Compare Source
Bug Fixes
Features
Compare Source
Bug Fixes
Features
- add commands to run tests depending on changed files (#1078) (3c965d4)
- reprint all tests, if one of the test files was deleted (#1081) (2ded624)
Compare Source
Bug Fixes
Features
Compare Source
Bug Fixes
Configuration
📅 Schedule: At any time (no schedule defined).
🚦 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 has been generated by WhiteSource Renovate. View repository job log here.