vitejs / vite-plugin-react-swc

Speed up your Vite dev server with SWC
MIT License
831 stars 54 forks source link

fix(deps): update all non-major dependencies #124

Closed renovate[bot] closed 1 year ago

renovate[bot] commented 1 year ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@generouted/react-router ^1.13.4 -> ^1.13.6 age adoption passing confidence
@swc/core (source) ^1.3.65 -> ^1.3.66 age adoption passing confidence
@types/react (source) ^18.2.12 -> ^18.2.14 age adoption passing confidence
@types/react-dom (source) ^18.2.5 -> ^18.2.6 age adoption passing confidence
esbuild ^0.18.4 -> ^0.18.9 age adoption passing confidence
pnpm (source) 8.6.2 -> 8.6.4 age adoption passing confidence
react-router-dom ^6.13.0 -> ^6.14.0 age adoption passing confidence

Release Notes

oedotme/generouted (@​generouted/react-router) ### [`v1.13.6`](https://togithub.com/oedotme/generouted/releases/tag/v1.13.6) [Compare Source](https://togithub.com/oedotme/generouted/compare/v1.13.5...v1.13.6) #### Commits - feat: improve react-router components/hooks types [`0cf3125`](https://togithub.com/oedotme/generouted/commit/0cf3125) by [@​oedotme](https://togithub.com/oedotme) **Changelog**: https://github.com/oedotme/generouted/compare/v1.13.5...v1.13.6 ### [`v1.13.5`](https://togithub.com/oedotme/generouted/releases/tag/v1.13.5) [Compare Source](https://togithub.com/oedotme/generouted/compare/v1.13.4...v1.13.5) #### Commits - feat: ensure layout ids are unique [`dd99427`](https://togithub.com/oedotme/generouted/commit/dd99427) by [@​oedotme](https://togithub.com/oedotme) closes [#​93](https://togithub.com/oedotme/generouted/issues/93) - chore: update packages [`3cc42d5`](https://togithub.com/oedotme/generouted/commit/3cc42d5) by [@​oedotme](https://togithub.com/oedotme) **Changelog**: https://github.com/oedotme/generouted/compare/v1.13.4...v1.13.5
swc-project/swc (@​swc/core) ### [`v1.3.66`](https://togithub.com/swc-project/swc/blob/HEAD/CHANGELOG.md#​1366---2023-06-20) [Compare Source](https://togithub.com/swc-project/swc/compare/v1.3.65...v1.3.66) ##### Bug Fixes - **(es)** Accept `parse` option for `minify()` ([#​7543](https://togithub.com/swc-project/swc/issues/7543)) ([1d84e95](https://togithub.com/swc-project/swc/commit/1d84e952feefc3cd50e379455bb6648b82c42256)) - **(es/compat)** Visit arrow body from optional chaining pass ([#​7549](https://togithub.com/swc-project/swc/issues/7549)) ([bc6e950](https://togithub.com/swc-project/swc/commit/bc6e95052eaf60d71c544c8a88c8440d7a2b437c)) - **(es/preset-env)** Don't log `Yield` to the console ([#​7548](https://togithub.com/swc-project/swc/issues/7548)) ([8cfc4f9](https://togithub.com/swc-project/swc/commit/8cfc4f9e9ab43a5ed25c9b600b9dd7e5790c2d1e)) - **(es/resolver)** Resolve the super class before registering a class name ([#​7550](https://togithub.com/swc-project/swc/issues/7550)) ([1d9f972](https://togithub.com/swc-project/swc/commit/1d9f972fb44e0722fce8a83090cbada81decf577)) ##### Features - **(es/codegen)** Support `preamble` ([#​7551](https://togithub.com/swc-project/swc/issues/7551)) ([6e5d8b3](https://togithub.com/swc-project/swc/commit/6e5d8b3cf1af74d614d5c073d966da543c26e302)) ##### Testing - **(es)** Add a test for a wrong issue ([#​7542](https://togithub.com/swc-project/swc/issues/7542)) ([70bc605](https://togithub.com/swc-project/swc/commit/70bc605c6769759b0e896e7e5e91bb070d719552)) - **(es)** Add one more test for a wrong issue ([#​7545](https://togithub.com/swc-project/swc/issues/7545)) ([862f095](https://togithub.com/swc-project/swc/commit/862f095e656edf6c0e86f1ad8065d8095e162cfa)) - **(plugin/runner)** Share `target` directory ([#​7544](https://togithub.com/swc-project/swc/issues/7544)) ([aa82e5f](https://togithub.com/swc-project/swc/commit/aa82e5fff3452db38599bb0bf7fef7cd72b6a09f))
evanw/esbuild (esbuild) ### [`v0.18.9`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#​0189) [Compare Source](https://togithub.com/evanw/esbuild/compare/v0.18.8...v0.18.9) - Fix `await using` declarations inside `async` generator functions I forgot about the new `await using` declarations when implementing lowering for `async` generator functions in the previous release. This change fixes the transformation of `await using` declarations when they are inside lowered `async` generator functions: ```js // Original code async function* foo() { await using x = await y } // Old output (with --supported:async-generator=false) function foo() { return __asyncGenerator(this, null, function* () { await using x = yield new __await(y); }); } // New output (with --supported:async-generator=false) function foo() { return __asyncGenerator(this, null, function* () { var _stack = []; try { const x = __using(_stack, yield new __await(y), true); } catch (_) { var _error = _, _hasError = true; } finally { var _promise = __callDispose(_stack, _error, _hasError); _promise && (yield new __await(_promise)); } }); } ``` - Insert some prefixed CSS properties when appropriate ([#​3122](https://togithub.com/evanw/esbuild/issues/3122)) With this release, esbuild will now insert prefixed CSS properties in certain cases when the `target` setting includes browsers that require a certain prefix. This is currently done for the following properties: - `appearance: *;` => `-webkit-appearance: *; -moz-appearance: *;` - `backdrop-filter: *;` => `-webkit-backdrop-filter: *;` - `background-clip: text` => `-webkit-background-clip: text;` - `box-decoration-break: *;` => `-webkit-box-decoration-break: *;` - `clip-path: *;` => `-webkit-clip-path: *;` - `font-kerning: *;` => `-webkit-font-kerning: *;` - `hyphens: *;` => `-webkit-hyphens: *;` - `initial-letter: *;` => `-webkit-initial-letter: *;` - `mask-image: *;` => `-webkit-mask-image: *;` - `mask-origin: *;` => `-webkit-mask-origin: *;` - `mask-position: *;` => `-webkit-mask-position: *;` - `mask-repeat: *;` => `-webkit-mask-repeat: *;` - `mask-size: *;` => `-webkit-mask-size: *;` - `position: sticky;` => `position: -webkit-sticky;` - `print-color-adjust: *;` => `-webkit-print-color-adjust: *;` - `tab-size: *;` => `-moz-tab-size: *; -o-tab-size: *;` - `text-decoration-color: *;` => `-webkit-text-decoration-color: *; -moz-text-decoration-color: *;` - `text-decoration-line: *;` => `-webkit-text-decoration-line: *; -moz-text-decoration-line: *;` - `text-decoration-skip: *;` => `-webkit-text-decoration-skip: *;` - `text-emphasis-color: *;` => `-webkit-text-emphasis-color: *;` - `text-emphasis-position: *;` => `-webkit-text-emphasis-position: *;` - `text-emphasis-style: *;` => `-webkit-text-emphasis-style: *;` - `text-orientation: *;` => `-webkit-text-orientation: *;` - `text-size-adjust: *;` => `-webkit-text-size-adjust: *; -ms-text-size-adjust: *;` - `user-select: *;` => `-webkit-user-select: *; -moz-user-select: *; -ms-user-select: *;` Here is an example: ```css /* Original code */ div { mask-image: url(x.png); } /* Old output (with --target=chrome99) */ div { mask-image: url(x.png); } /* New output (with --target=chrome99) */ div { -webkit-mask-image: url(x.png); mask-image: url(x.png); } ``` Browser compatibility data was sourced from the tables on https://caniuse.com. Support for more CSS properties can be added in the future as appropriate. - Fix an obscure identifier minification bug ([#​2809](https://togithub.com/evanw/esbuild/issues/2809)) Function declarations in nested scopes behave differently depending on whether or not `"use strict"` is present. To avoid generating code that behaves differently depending on whether strict mode is enabled or not, esbuild transforms nested function declarations into variable declarations. However, there was a bug where the generated variable name was not being recorded as declared internally, which meant that it wasn't being renamed correctly by the minifier and could cause a name collision. This bug has been fixed: ```js // Original code const n = '' for (let i of [0,1]) { function f () {} } // Old output (with --minify-identifiers --format=esm) const f = ""; for (let o of [0, 1]) { let n = function() { }; var f = n; } // New output (with --minify-identifiers --format=esm) const f = ""; for (let o of [0, 1]) { let n = function() { }; var t = n; } ``` - Fix a bug in esbuild's compatibility table script ([#​3179](https://togithub.com/evanw/esbuild/pull/3179)) Setting esbuild's `target` to a specific JavaScript engine tells esbuild to use the JavaScript syntax feature compatibility data from https://kangax.github.io/compat-table/es6/ for that engine to determine which syntax features to allow. However, esbuild's script that builds this internal compatibility table had a bug that incorrectly ignores tests for engines that still have outstanding implementation bugs which were never fixed. This change fixes this bug with the script. The only case where this changed the information in esbuild's internal compatibility table is that the `hermes` target is marked as no longer supporting destructuring. This is because there is a failing destructuring-related test for Hermes on https://kangax.github.io/compat-table/es6/. If you want to use destructuring with Hermes anyway, you can pass `--supported:destructuring=true` to esbuild to override the `hermes` target and force esbuild to accept this syntax. This fix was contributed by [@​ArrayZoneYour](https://togithub.com/ArrayZoneYour). ### [`v0.18.8`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#​0188) [Compare Source](https://togithub.com/evanw/esbuild/compare/v0.18.7...v0.18.8) - Implement transforming `async` generator functions ([#​2780](https://togithub.com/evanw/esbuild/issues/2780)) With this release, esbuild will now transform `async` generator functions into normal generator functions when the configured target environment doesn't support them. These functions behave similar to normal generator functions except that they use the `Symbol.asyncIterator` interface instead of the `Symbol.iterator` interface and the iteration methods return promises. Here's an example (helper functions are omitted): ```js // Original code async function* foo() { yield Promise.resolve(1) await new Promise(r => setTimeout(r, 100)) yield *[Promise.resolve(2)] } async function bar() { for await (const x of foo()) { console.log(x) } } bar() // New output (with --target=es6) function foo() { return __asyncGenerator(this, null, function* () { yield Promise.resolve(1); yield new __await(new Promise((r) => setTimeout(r, 100))); yield* __yieldStar([Promise.resolve(2)]); }); } function bar() { return __async(this, null, function* () { try { for (var iter = __forAwait(foo()), more, temp, error; more = !(temp = yield iter.next()).done; more = false) { const x = temp.value; console.log(x); } } catch (temp) { error = [temp]; } finally { try { more && (temp = iter.return) && (yield temp.call(iter)); } finally { if (error) throw error[0]; } } }); } bar(); ``` This is an older feature that was added to JavaScript in ES2018 but I didn't implement the transformation then because it's a rarely-used feature. Note that esbuild already added support for transforming `for await` loops (the other part of the [asynchronous iteration proposal](https://togithub.com/tc39/proposal-async-iteration)) a year ago, so support for asynchronous iteration should now be complete. I have never used this feature myself and code that uses this feature is hard to come by, so this transformation has not yet been tested on real-world code. If you do write code that uses this feature, please let me know if esbuild's `async` generator transformation doesn't work with your code. ### [`v0.18.7`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#​0187) [Compare Source](https://togithub.com/evanw/esbuild/compare/v0.18.6...v0.18.7) - Add support for `using` declarations in TypeScript 5.2+ ([#​3191](https://togithub.com/evanw/esbuild/issues/3191)) TypeScript 5.2 (due to be released in August of 2023) will introduce `using` declarations, which will allow you to automatically dispose of the declared resources when leaving the current scope. You can read the [TypeScript PR for this feature](https://togithub.com/microsoft/TypeScript/pull/54505) for more information. This release of esbuild adds support for transforming this syntax to target environments without support for `using` declarations (which is currently all targets other than `esnext`). Here's an example (helper functions are omitted): ```js // Original code class Foo { [Symbol.dispose]() { console.log('cleanup') } } using foo = new Foo; foo.bar(); // New output (with --target=es6) var _stack = []; try { var Foo = class { [Symbol.dispose]() { console.log("cleanup"); } }; var foo = __using(_stack, new Foo()); foo.bar(); } catch (_) { var _error = _, _hasError = true; } finally { __callDispose(_stack, _error, _hasError); } ``` The injected helper functions ensure that the method named `Symbol.dispose` is called on `new Foo` when control exits the scope. Note that as with all new JavaScript APIs, you'll need to polyfill `Symbol.dispose` if it's not present before you use it. This is not something that esbuild does for you because esbuild only handles syntax, not APIs. Polyfilling it can be done with something like this: ```js Symbol.dispose ||= Symbol('Symbol.dispose') ``` This feature also introduces `await using` declarations which are like `using` declarations but they call `await` on the disposal method (not on the initializer). Here's an example (helper functions are omitted): ```js // Original code class Foo { async [Symbol.asyncDispose]() { await new Promise(done => { setTimeout(done, 1000) }) console.log('cleanup') } } await using foo = new Foo; foo.bar(); // New output (with --target=es2022) var _stack = []; try { var Foo = class { async [Symbol.asyncDispose]() { await new Promise((done) => { setTimeout(done, 1e3); }); console.log("cleanup"); } }; var foo = __using(_stack, new Foo(), true); foo.bar(); } catch (_) { var _error = _, _hasError = true; } finally { var _promise = __callDispose(_stack, _error, _hasError); _promise && await _promise; } ``` The injected helper functions ensure that the method named `Symbol.asyncDispose` is called on `new Foo` when control exits the scope, and that the returned promise is awaited. Similarly to `Symbol.dispose`, you'll also need to polyfill `Symbol.asyncDispose` before you use it. - Add a `--line-limit=` flag to limit line length ([#​3170](https://togithub.com/evanw/esbuild/issues/3170)) Long lines are common in minified code. However, many tools and text editors can't handle long lines. This release introduces the `--line-limit=` flag to tell esbuild to wrap lines longer than the provided number of bytes. For example, `--line-limit=80` tells esbuild to insert a newline soon after a given line reaches 80 bytes in length. This setting applies to both JavaScript and CSS, and works even when minification is disabled. Note that turning this setting on will make your files bigger, as the extra newlines take up additional space in the file (even after gzip compression). ### [`v0.18.6`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#​0186) [Compare Source](https://togithub.com/evanw/esbuild/compare/v0.18.5...v0.18.6) - Fix tree-shaking of classes with decorators ([#​3164](https://togithub.com/evanw/esbuild/issues/3164)) This release fixes a bug where esbuild incorrectly allowed tree-shaking on classes with decorators. Each decorator is a function call, so classes with decorators must never be tree-shaken. This bug was a regression that was unintentionally introduced in version 0.18.2 by the change that enabled tree-shaking of lowered private fields. Previously decorators were always lowered, and esbuild always considered the automatically-generated decorator code to be a side effect. But this is no longer the case now that esbuild analyzes side effects using the AST before lowering takes place. This bug was fixed by considering any decorator a side effect. - Fix a minification bug involving function expressions ([#​3125](https://togithub.com/evanw/esbuild/issues/3125)) When minification is enabled, esbuild does limited inlining of `const` symbols at the top of a scope. This release fixes a bug where inlineable symbols were incorrectly removed assuming that they were inlined. They may not be inlined in cases where they were referenced by earlier constants in the body of a function expression. The declarations involved in these edge cases are now kept instead of being removed: ```js // Original code { const fn = () => foo const foo = 123 console.log(fn) } // Old output (with --minify-syntax) console.log((() => foo)()); // New output (with --minify-syntax) { const fn = () => foo, foo = 123; console.log(fn); } ``` ### [`v0.18.5`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#​0185) [Compare Source](https://togithub.com/evanw/esbuild/compare/v0.18.4...v0.18.5) - Implement auto accessors ([#​3009](https://togithub.com/evanw/esbuild/issues/3009)) This release implements the new auto-accessor syntax from the upcoming [JavaScript decorators proposal](https://togithub.com/tc39/proposal-decorators). The auto-accessor syntax looks like this: ```js class Foo { accessor foo; static accessor bar; } new Foo().foo = Foo.bar; ``` This syntax is not yet a part of JavaScript but it was [added to TypeScript in version 4.9](https://devblogs.microsoft.com/typescript/announcing-typescript-4-9/#auto-accessors-in-classes). More information about this feature can be found in [microsoft/TypeScript#​49705](https://togithub.com/microsoft/TypeScript/pull/49705). Auto-accessors will be transformed if the target is set to something other than `esnext`: ```js // Output (with --target=esnext) class Foo { accessor foo; static accessor bar; } new Foo().foo = Foo.bar; // Output (with --target=es2022) class Foo { #foo; get foo() { return this.#foo; } set foo(_) { this.#foo = _; } static #bar; static get bar() { return this.#bar; } static set bar(_) { this.#bar = _; } } new Foo().foo = Foo.bar; // Output (with --target=es2021) var _foo, _bar; class Foo { constructor() { __privateAdd(this, _foo, void 0); } get foo() { return __privateGet(this, _foo); } set foo(_) { __privateSet(this, _foo, _); } static get bar() { return __privateGet(this, _bar); } static set bar(_) { __privateSet(this, _bar, _); } } _foo = new WeakMap(); _bar = new WeakMap(); __privateAdd(Foo, _bar, void 0); new Foo().foo = Foo.bar; ``` You can also now use auto-accessors with esbuild's TypeScript experimental decorator transformation, which should behave the same as decorating the underlying getter/setter pair. **Please keep in mind that this syntax is not yet part of JavaScript.** This release enables auto-accessors in `.js` files with the expectation that it will be a part of JavaScript soon. However, esbuild may change or remove this feature in the future if JavaScript ends up changing or removing this feature. Use this feature with caution for now. - Pass through JavaScript decorators ([#​104](https://togithub.com/evanw/esbuild/issues/104)) In this release, esbuild now parses decorators from the upcoming [JavaScript decorators proposal](https://togithub.com/tc39/proposal-decorators) and passes them through to the output unmodified (as long as the language target is set to `esnext`). Transforming JavaScript decorators to environments that don't support them has not been implemented yet. The only decorator transform that esbuild currently implements is still the TypeScript experimental decorator transform, which only works in `.ts` files and which requires `"experimentalDecorators": true` in your `tsconfig.json` file. - Static fields with assign semantics now use static blocks if possible Setting `useDefineForClassFields` to false in TypeScript requires rewriting class fields to assignment statements. Previously this was done by removing the field from the class body and adding an assignment statement after the class declaration. However, this also caused any private fields to also be lowered by necessity (in case a field initializer uses a private symbol, either directly or indirectly). This release changes this transform to use an inline static block if it's supported, which avoids needing to lower private fields in this scenario: ```js // Original code class Test { static #foo = 123 static bar = this.#foo } // Old output (with useDefineForClassFields=false) var _foo; const _Test = class _Test { }; _foo = new WeakMap(); __privateAdd(_Test, _foo, 123); _Test.bar = __privateGet(_Test, _foo); let Test = _Test; // New output (with useDefineForClassFields=false) class Test { static #foo = 123; static { this.bar = this.#foo; } } ``` - Fix TypeScript experimental decorators combined with `--mangle-props` ([#​3177](https://togithub.com/evanw/esbuild/issues/3177)) Previously using TypeScript experimental decorators combined with the `--mangle-props` setting could result in a crash, as the experimental decorator transform was not expecting a mangled property as a class member. This release fixes the crash so you can now combine both of these features together safely.
pnpm/pnpm (pnpm) ### [`v8.6.4`](https://togithub.com/pnpm/pnpm/releases/tag/v8.6.4) [Compare Source](https://togithub.com/pnpm/pnpm/compare/v8.6.3...v8.6.4) ##### Patch Changes - In cases where both aliased and non-aliased dependencies exist to the same package, non-aliased dependencies will be used for resolving peer dependencies, addressing issue [#​6588](https://togithub.com/pnpm/pnpm/issues/6588). - Ignore the port in the URL, while searching for authentication token in the `.npmrc` file [#​6354](https://togithub.com/pnpm/pnpm/issues/6354). - Don't add the version of a local directory dependency to the lockfile. This information is not used anywhere by pnpm and is only causing more Git conflicts [#​6695](https://togithub.com/pnpm/pnpm/pull/6695). ##### Our Gold Sponsors
##### Our Silver Sponsors
### [`v8.6.3`](https://togithub.com/pnpm/pnpm/releases/tag/v8.6.3) [Compare Source](https://togithub.com/pnpm/pnpm/compare/v8.6.2...v8.6.3) ##### Patch Changes - When running a script in multiple projects, the script outputs should preserve colours [#​2148](https://togithub.com/pnpm/pnpm/issues/2148). - Don't crash when the `APPDATA` env variable is not set on Windows [#​6659](https://togithub.com/pnpm/pnpm/issues/6659). - Don't fail when a package is archived in a tarball with malformed tar headers [#​5362](https://togithub.com/pnpm/pnpm/issues/5362). - Peer dependencies of subdependencies should be installed, when `node-linker` is set to `hoisted` [#​6680](https://togithub.com/pnpm/pnpm/pull/6680). - Throw a meaningful error when applying a patch to a dependency fails. - `pnpm update --global --latest` should work [#​3779](https://togithub.com/pnpm/pnpm/issues/3779). - `pnpm license ls` should work even when there is a patched git protocol dependency [#​6595](https://togithub.com/pnpm/pnpm/issues/6595) ##### Our Gold Sponsors
##### Our Silver Sponsors
remix-run/react-router (react-router-dom) ### [`v6.14.0`](https://togithub.com/remix-run/react-router/compare/react-router-dom@6.13.0...react-router-dom@6.14.0) [Compare Source](https://togithub.com/remix-run/react-router/compare/react-router-dom@6.13.0...react-router-dom@6.14.0)

Configuration

📅 Schedule: Branch creation - "before 4am on Monday" (UTC), Automerge - 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.



This PR has been generated by Mend Renovate. View repository job log here.