Skip to content

Merge preact v10 upstream#6

Merged
hzy merged 273 commits intohzy:lynx/v10.24.xfrom
upupming:lynx/v10.24.x
Jan 8, 2026
Merged

Merge preact v10 upstream#6
hzy merged 273 commits intohzy:lynx/v10.24.xfrom
upupming:lynx/v10.24.x

Conversation

@upupming
Copy link
Collaborator

@upupming upupming commented Jan 4, 2026

This PR merge the latest v10.x branch of https://github.com/preactjs/preact into lynx/v10.24.x

JoviDeCroock and others added 30 commits October 12, 2024 10:13
* We should not always set to hydration

* Update compat/test/browser/suspense-hydration.test.js
Screenshot 2024-10-15 at 11.13.10 AM
Support `{ handleEvent() {} }` object interface as a listener
…ype IntrinsicElements (preactjs#4546)

* style: Rearrange MathML types

* refactor: Move per-element attribute types into core

* refactor: Create new global attributes type

* refactor: Remove deprecated & non-standard webview types

* refactor: Narrow element types

* style: Formatting

* refactor: Rename & re-export AllHTMLAttributes interface

* refactor: Rename inconsistent MathML interfaces

* refactor: Narrow MathML element types

* fix: popoverTarget & popoverTargetAction types
* fix: Ensure our new property types support all intended casings

* fix: Re-add missing properties
rschristian and others added 14 commits September 1, 2025 14:19
* ci: Comment out all benches

* ci: Fix bad rebase
The `react-email/components` package needs this.
fix(compat): add `commpat/server.browser` entry
* fix: Types for scroll events

* feat: Add type for 'onScrollEndCapture' handler
* adds snap events

* types: Correct event type & backport SnapEvent DOM type

---------

Co-authored-by: Ryan Christian <rchristian@ryanchristian.dev>
preactjs#4931)

* Updates dangerouslySetInnerHTML type so future TS will accept TrustedHTML automatically

* test: Add simple type test

---------

Co-authored-by: Ryan Christian <rchristian@ryanchristian.dev>
* refactor(children): remove redundant assignment to childVNode (preactjs#4951)

* refactor(children): remove redundant assignment to childVNode

* refactor(children): use key instead of childVNode.key

---------

Co-authored-by: Ali Garajian <ali.garajian@snapppay.ir>

* refactor(diff): no need to reset props and context when creating component (preactjs#4954)

* refactor(children): remove redundant assignment to childVNode

* refactor(children): use key instead of childVNode.key

* refactor(diff): no need to reset props and context when creating component

---------

Co-authored-by: Ali Garajian <ali.garajian@snapppay.ir>

* refactor(children): remove redundant assignment to oldVNode (preactjs#4956)

Co-authored-by: Ali Garajian <ali.garajian@snapppay.ir>

* refactor(diff): set oldProps default value on declaration (preactjs#4959)

---------

Co-authored-by: Ali Garajian <50337133+ali-garajian@users.noreply.github.com>
Co-authored-by: Ali Garajian <ali.garajian@snapppay.ir>
* Fix cause where oldVNode can carry over

When we diff a list of children and in the new list an item gets added
we will diff the newly added item against the oldVNode of its previous sibling
due to the global nature of oldVNode

* Add test
@github-actions
Copy link

github-actions bot commented Jan 4, 2026

📊 Tachometer Benchmark Results

Summary

A summary of the benchmark results will show here once they finish.

Results

The full results of your benchmarks will show here once they finish.

tachometer-reporter-action v2 for CI

@upupming upupming force-pushed the lynx/v10.24.x branch 2 times, most recently from 9f28860 to bfc120c Compare January 4, 2026 09:52
@upupming upupming changed the title Update preact v10 upstream Merge preact v10 upstream Jan 4, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 4, 2026

Open in StackBlitz

npm i https://pkg.pr.new/hzy/preact@6

commit: 351d14e

@hzy hzy merged commit 398fb4a into hzy:lynx/v10.24.x Jan 8, 2026
5 checks passed
upupming added a commit to lynx-family/lynx-stack that referenced this pull request Jan 14, 2026
<!--
  Thank you for submitting a pull request!

We appreciate the time and effort you have invested in making these
changes. Please ensure that you provide enough information to allow
others to review your pull request.

Upon submission, your pull request will be automatically assigned with
reviewers.

If you want to learn more about contributing to this project, please
visit:
https://github.com/lynx-family/lynx-stack/blob/main/CONTRIBUTING.md.
-->

<!-- The AI summary below will be auto-generated - feel free to replace
it with your own. -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Bumped Preact to 10.28.x and added a changeset entry; includes a
BREAKING CHANGE note about the Preact upgrade.

* **Bug Fixes**
* Improved render stability to avoid missed re-renders and duplicated
native calls.
* Added a pre-render workaround and adjusted rendering metadata handling
to ensure required re-renders.

* **Tests**
  * Updated assertions and snapshots to match dependency behavior.
* Added keyed-replacement and lifecycle tests; converted one test to
assert warnings instead of thrown errors.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

See diff at: hzy/preact#6

## Checklist

<!--- Check and mark with an "x" -->

- [x] Tests updated (or not required).
- [ ] Documentation updated (or not required).
- [x] Changeset added, and when a BREAKING CHANGE occurs, it needs to be
clearly marked (or not required).

---------

Signed-off-by: Yiming Li <yimingli.cs@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
colinaaa pushed a commit to lynx-family/lynx-stack that referenced this pull request Jan 25, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @lynx-js/react@0.116.0

### Minor Changes

- **BREAKING CHANGE**: Bump Preact from
[10.24.0](preactjs/preact@1807173)
to
[10.28.0](preactjs/preact@f7693b7),
see diffs at [hzy/preact#6](hzy/preact#6).
([#2042](#2042))

### Patch Changes

- Add safety checks for compilation macros to prevent runtime errors
when they are undefined.
([#2110](#2110))

Replaces direct usage of `__PROFILE__`, `__MAIN_THREAD__`,
`__BACKGROUND__` with `typeof` checks.

This improves robustness by checking variable existence before access,
preventing runtime errors in environments where compilation macros are
not defined.

## @lynx-js/lynx-bundle-rslib-config@0.2.0

### Minor Changes

- Use `LAYERS` exposed by DSL plugins
([#2114](#2114))

## @lynx-js/gesture-runtime@2.1.2

### Patch Changes

- Fix an issue that `NativeGesture` does not get correct types in
callback ([#2130](#2130))

## @lynx-js/rspeedy@0.13.1

### Patch Changes

-   Updated dependencies \[]:
    -   @lynx-js/web-rsbuild-server-middleware@0.19.6

## @lynx-js/react-rsbuild-plugin@0.12.6

### Patch Changes

- Support using `pluginReactLynx` in Rslib.
([#2114](#2114))

- Updated dependencies
\[[`4cd7182`](4cd7182)]:
    -   @lynx-js/template-webpack-plugin@0.10.2
    -   @lynx-js/react-alias-rsbuild-plugin@0.12.6
    -   @lynx-js/use-sync-external-store@1.5.0
    -   @lynx-js/react-refresh-webpack-plugin@0.3.4
    -   @lynx-js/react-webpack-plugin@0.7.3
    -   @lynx-js/css-extract-webpack-plugin@0.7.0

## upgrade-rspeedy@0.13.1

### Patch Changes

- Fix the issue `rslib-runtime.js` was not published in dist folder.
([#2122](#2122))

## @lynx-js/testing-environment@0.1.10

### Patch Changes

- Fix the error "lynxTestingEnv is not defined"
([#2118](#2118))

## @lynx-js/web-constants@0.19.6

### Patch Changes

- feat: add main-thread API: \_\_QuerySelector
([#2115](#2115))

- fix: when a list-item is deleted from list, the deleted list-item is
still showed incorrectly.
([#1092](#1092))

This is because the `enqueueComponent` method does not delete the node
from the Element Tree. It is only to maintain the display node on RL,
and lynx web needs to delete the dom additionally.

- feat: support main thread invoke ui method
([#2104](#2104))

- feat: support lynx.reload()
([#2127](#2127))

- Updated dependencies
\[[`f7133c1`](f7133c1)]:
    -   @lynx-js/web-worker-rpc@0.19.6

## @lynx-js/web-core@0.19.6

### Patch Changes

- fix: avoid crash on CPUs that do not support SIMD
([#2133](#2133))

- feat: support lynx.reload()
([#2127](#2127))

- Updated dependencies
\[[`179f984`](179f984),
[`f7133c1`](f7133c1),
[`6c2b51a`](6c2b51a),
[`556fe9f`](556fe9f),
[`5b589ab`](5b589ab)]:
    -   @lynx-js/web-constants@0.19.6
    -   @lynx-js/web-mainthread-apis@0.19.6
    -   @lynx-js/web-worker-rpc@0.19.6
    -   @lynx-js/web-worker-runtime@0.19.6

## @lynx-js/web-core-wasm@0.0.1

### Patch Changes

- Updated dependencies
\[[`f7133c1`](f7133c1)]:
    -   @lynx-js/web-worker-rpc@0.19.6

## @lynx-js/web-mainthread-apis@0.19.6

### Patch Changes

- feat: add main-thread API: \_\_QuerySelector
([#2115](#2115))

- fix: when a list-item is deleted from list, the deleted list-item is
still showed incorrectly.
([#1092](#1092))

This is because the `enqueueComponent` method does not delete the node
from the Element Tree. It is only to maintain the display node on RL,
and lynx web needs to delete the dom additionally.

- feat: support main thread invoke ui method
([#2104](#2104))

- fix: mts && bts events can be binded both
([#2121](#2121))

- Updated dependencies
\[[`179f984`](179f984),
[`f7133c1`](f7133c1),
[`6c2b51a`](6c2b51a),
[`5b589ab`](5b589ab)]:
    -   @lynx-js/web-constants@0.19.6

## @lynx-js/web-worker-rpc@0.19.6

### Patch Changes

- fix: when a list-item is deleted from list, the deleted list-item is
still showed incorrectly.
([#1092](#1092))

This is because the `enqueueComponent` method does not delete the node
from the Element Tree. It is only to maintain the display node on RL,
and lynx web needs to delete the dom additionally.

## @lynx-js/web-worker-runtime@0.19.6

### Patch Changes

- feat: support lynx.reload()
([#2127](#2127))

- Updated dependencies
\[[`179f984`](179f984),
[`f7133c1`](f7133c1),
[`6c2b51a`](6c2b51a),
[`556fe9f`](556fe9f),
[`5b589ab`](5b589ab)]:
    -   @lynx-js/web-constants@0.19.6
    -   @lynx-js/web-mainthread-apis@0.19.6
    -   @lynx-js/web-worker-rpc@0.19.6

## @lynx-js/template-webpack-plugin@0.10.2

### Patch Changes

- Polyfill `lynx.requireModuleAsync` to allow cache same parallel
requests. ([#2108](#2108))

## create-rspeedy@0.13.1



## @lynx-js/react-alias-rsbuild-plugin@0.12.6



## @lynx-js/web-core-server@0.19.6



## @lynx-js/web-rsbuild-server-middleware@0.19.6

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
colinaaa pushed a commit to lynx-family/lynx-examples that referenced this pull request Mar 2, 2026
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
|
[@lynx-js/qrcode-rsbuild-plugin](https://github.com/lynx-family/lynx-stack)
([source](https://github.com/lynx-family/lynx-stack/tree/HEAD/packages/rspeedy/plugin-qrcode))
| [`0.4.3` →
`0.4.6`](https://renovatebot.com/diffs/npm/@lynx-js%2fqrcode-rsbuild-plugin/0.4.3/0.4.6)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@lynx-js%2fqrcode-rsbuild-plugin/0.4.6?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@lynx-js%2fqrcode-rsbuild-plugin/0.4.3/0.4.6?slim=true)
|
| [@lynx-js/react](https://github.com/lynx-family/lynx-stack)
([source](https://github.com/lynx-family/lynx-stack/tree/HEAD/packages/react))
| [`0.115.3` →
`0.116.4`](https://renovatebot.com/diffs/npm/@lynx-js%2freact/0.115.3/0.116.4)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@lynx-js%2freact/0.116.4?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@lynx-js%2freact/0.115.3/0.116.4?slim=true)
|
|
[@lynx-js/react-rsbuild-plugin](https://github.com/lynx-family/lynx-stack)
([source](https://github.com/lynx-family/lynx-stack/tree/HEAD/packages/rspeedy/plugin-react))
| [`0.12.4` →
`0.12.9`](https://renovatebot.com/diffs/npm/@lynx-js%2freact-rsbuild-plugin/0.12.4/0.12.9)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@lynx-js%2freact-rsbuild-plugin/0.12.9?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@lynx-js%2freact-rsbuild-plugin/0.12.4/0.12.9?slim=true)
|
| [@lynx-js/rspeedy](https://github.com/lynx-family/lynx-stack)
([source](https://github.com/lynx-family/lynx-stack/tree/HEAD/packages/rspeedy/core))
| [`0.12.5` →
`0.13.4`](https://renovatebot.com/diffs/npm/@lynx-js%2frspeedy/0.12.5/0.13.4)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@lynx-js%2frspeedy/0.13.4?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@lynx-js%2frspeedy/0.12.5/0.13.4?slim=true)
|
|
[@lynx-js/template-webpack-plugin](https://github.com/lynx-family/lynx-stack)
([source](https://github.com/lynx-family/lynx-stack/tree/HEAD/packages/webpack/template-webpack-plugin))
| [`0.10.1` →
`0.10.4`](https://renovatebot.com/diffs/npm/@lynx-js%2ftemplate-webpack-plugin/0.10.1/0.10.4)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@lynx-js%2ftemplate-webpack-plugin/0.10.4?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@lynx-js%2ftemplate-webpack-plugin/0.10.1/0.10.4?slim=true)
|
| [@lynx-js/types](https://github.com/lynx-family/lynx) |
[`3.6.0` →
`3.7.0`](https://renovatebot.com/diffs/npm/@lynx-js%2ftypes/3.6.0/3.7.0)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@lynx-js%2ftypes/3.7.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@lynx-js%2ftypes/3.6.0/3.7.0?slim=true)
|

---

### Release Notes

<details>
<summary>lynx-family/lynx-stack
(@&#8203;lynx-js/qrcode-rsbuild-plugin)</summary>

###
[`v0.4.6`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/rspeedy/plugin-qrcode/CHANGELOG.md#046)

[Compare
Source](https://github.com/lynx-family/lynx-stack/compare/@lynx-js/qrcode-rsbuild-plugin@0.4.5...@lynx-js/qrcode-rsbuild-plugin@0.4.6)

##### Patch Changes

- Print all entries with all schema URLs in non-TTY environments instead
of only showing the first entry's QR code.
([#&#8203;2227](https://github.com/lynx-family/lynx-stack/pull/2227))

###
[`v0.4.5`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/rspeedy/plugin-qrcode/CHANGELOG.md#045)

[Compare
Source](https://github.com/lynx-family/lynx-stack/compare/@lynx-js/qrcode-rsbuild-plugin@0.4.4...@lynx-js/qrcode-rsbuild-plugin@0.4.5)

##### Patch Changes

- Only register console shortcuts when running in TTY environments
([#&#8203;2202](https://github.com/lynx-family/lynx-stack/pull/2202))

###
[`v0.4.4`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/rspeedy/plugin-qrcode/CHANGELOG.md#044)

##### Patch Changes

- Bump `@clack/prompts` v1.0
([#&#8203;2171](https://github.com/lynx-family/lynx-stack/pull/2171))

</details>

<details>
<summary>lynx-family/lynx-stack (@&#8203;lynx-js/react)</summary>

###
[`v0.116.4`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/react/CHANGELOG.md#01164)

[Compare
Source](https://github.com/lynx-family/lynx-stack/compare/@lynx-js/react@0.116.3...@lynx-js/react@0.116.4)

##### Patch Changes

- Support `ReactLynx::hooks::setState` trace for function components.
([#&#8203;2198](https://github.com/lynx-family/lynx-stack/pull/2198))

- fix: properly cleanup `__DestroyLifetime` listeners and listCallbacks
in `snapshotDestroyList`.
([#&#8203;2224](https://github.com/lynx-family/lynx-stack/pull/2224))

###
[`v0.116.3`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/react/CHANGELOG.md#01163)

[Compare
Source](https://github.com/lynx-family/lynx-stack/compare/@lynx-js/react@0.116.2...@lynx-js/react@0.116.3)

##### Patch Changes

- fix: remove `lynx.createSelectorQuery` deprecated warning in
production
([#&#8203;2195](https://github.com/lynx-family/lynx-stack/pull/2195))

- Add a DEV-only guard that detects MainThread flush loops caused by
re-entrant MTS handlers.
([#&#8203;2159](https://github.com/lynx-family/lynx-stack/pull/2159))

This typically happens when a MainThread handler (e.g. event callback or
`MainThreadRef`) performs UI mutations (like `Element.setStyleProperty`,
`setStyleProperties`, `setAttribute`, or `invoke`) that synchronously
trigger a flush which re-enters the handler again.

- Avoid DEV\_ONLY\_SetSnapshotEntryName on standalone lazy bundle.
([#&#8203;2184](https://github.com/lynx-family/lynx-stack/pull/2184))

- Add alog and trace for BTS event handlers.
([#&#8203;2102](https://github.com/lynx-family/lynx-stack/pull/2102))

- fix: Main thread functions cannot access properties on `this` before
hydration completes.
([#&#8203;2194](https://github.com/lynx-family/lynx-stack/pull/2194))

  This fixes the `cannot convert to object` error.

- Remove element api calls alog by default, and only enable it when
`__ALOG_ELEMENT_API__` is defined to `true` or environment variable
`REACT_ALOG_ELEMENT_API` is set to `true`.
([#&#8203;2192](https://github.com/lynx-family/lynx-stack/pull/2192))

- fix: captured variables in main thread functions within class
components do not update correctly
([#&#8203;2197](https://github.com/lynx-family/lynx-stack/pull/2197))

###
[`v0.116.2`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/react/CHANGELOG.md#01162)

[Compare
Source](https://github.com/lynx-family/lynx-stack/compare/@lynx-js/react@0.116.1...@lynx-js/react@0.116.2)

##### Patch Changes

- Fix "TypeError: not a function" error caused by `replaceAll` not
supported in ES5.
([#&#8203;2142](https://github.com/lynx-family/lynx-stack/pull/2142))

- Bump `swc_core` v56.
([#&#8203;2154](https://github.com/lynx-family/lynx-stack/pull/2154))

- Use `disableDeprecatedWarning` option to suppress BROKEN warnings
during compilation.
([#&#8203;2157](https://github.com/lynx-family/lynx-stack/pull/2157))

1. BROKEN: `getNodeRef`/`getNodeRefFromRoot`/`createSelectorQuery` on
component instance is broken and MUST be migrated in ReactLynx 3.0,
please use ref or lynx.createSelectorQuery instead.
2. BROKEN: `getElementById` on component instance is broken and MUST be
migrated in ReactLynx 3.0, please use ref or lynx.getElementById
instead.

- Fix memory leak by clearing list callbacks when \_\_DestroyLifetime
event is triggered.
([#&#8203;2112](https://github.com/lynx-family/lynx-stack/pull/2112))

###
[`v0.116.1`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/react/CHANGELOG.md#01161)

[Compare
Source](https://github.com/lynx-family/lynx-stack/compare/@lynx-js/react@0.116.0...@lynx-js/react@0.116.1)

##### Patch Changes

- Fix the issue that lazy bundle HMR will lost CSS.
([#&#8203;2134](https://github.com/lynx-family/lynx-stack/pull/2134))

###
[`v0.116.0`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/react/CHANGELOG.md#01160)

[Compare
Source](https://github.com/lynx-family/lynx-stack/compare/@lynx-js/react@0.115.4...@lynx-js/react@0.116.0)

##### Minor Changes

- **BREAKING CHANGE**: Bump Preact from
[10.24.0](https://github.com/preactjs/preact/commit/1807173df5e18b6b1a3cd667ee2a31af37f4282b)
to
[10.28.0](https://github.com/preactjs/preact/commit/f7693b72ecb4a40c66e6e47f54e2d4edc374c9f0),
see diffs at
[hzy/preact#6](https://github.com/hzy/preact/pull/6).
([#&#8203;2042](https://github.com/lynx-family/lynx-stack/pull/2042))

##### Patch Changes

- Add safety checks for compilation macros to prevent runtime errors
when they are undefined.
([#&#8203;2110](https://github.com/lynx-family/lynx-stack/pull/2110))

Replaces direct usage of `__PROFILE__`, `__MAIN_THREAD__`,
`__BACKGROUND__` with `typeof` checks.

This improves robustness by checking variable existence before access,
preventing runtime errors in environments where compilation macros are
not defined.

###
[`v0.115.4`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/react/CHANGELOG.md#01154)

[Compare
Source](https://github.com/lynx-family/lynx-stack/compare/@lynx-js/react@0.115.3...@lynx-js/react@0.115.4)

##### Patch Changes

- fix: unable to access `MainThreadRef` in some scenarios
([#&#8203;1996](https://github.com/lynx-family/lynx-stack/pull/1996))

- Add `getComputedStyleProperty` for `MainThread.Element` to retrieve
computed style values synchronously.
([#&#8203;2005](https://github.com/lynx-family/lynx-stack/pull/2005))

  **Requires Lynx SDK >= 3.5**

  ```typescript
  function getStyle(ele: MainThread.Element) {
    'main thread';
const width = ele.getComputedStyleProperty('width'); // Returns 300px
const transformMatrix = ele.getComputedStyleProperty('transform'); //
Returns matrix(2, 0, 0, 2, 200, 400)
  }
  ```

</details>

<details>
<summary>lynx-family/lynx-stack
(@&#8203;lynx-js/react-rsbuild-plugin)</summary>

###
[`v0.12.9`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/rspeedy/plugin-react/CHANGELOG.md#0129)

[Compare
Source](https://github.com/lynx-family/lynx-stack/compare/@lynx-js/react-rsbuild-plugin@0.12.8...@lynx-js/react-rsbuild-plugin@0.12.9)

##### Patch Changes

- Add alias for `use-sync-external-store/with-selector.js` and
`use-sync-external-store/shim/with-selector.js` pointing to
[@&#8203;lynx-js/use-sync-external-store](https://github.com/lynx-js/use-sync-external-store).
([#&#8203;2200](https://github.com/lynx-family/lynx-stack/pull/2200))

- Updated dependencies
\[[`9033e2d`](https://github.com/lynx-family/lynx-stack/commit/9033e2d6c7c0c2405ecbbf73446239dd65b4a177)]:
-
[@&#8203;lynx-js/template-webpack-plugin](https://github.com/lynx-js/template-webpack-plugin)@&#8203;0.10.4
-
[@&#8203;lynx-js/react-alias-rsbuild-plugin](https://github.com/lynx-js/react-alias-rsbuild-plugin)@&#8203;0.12.9
-
[@&#8203;lynx-js/use-sync-external-store](https://github.com/lynx-js/use-sync-external-store)@&#8203;1.5.0
-
[@&#8203;lynx-js/react-refresh-webpack-plugin](https://github.com/lynx-js/react-refresh-webpack-plugin)@&#8203;0.3.4
-
[@&#8203;lynx-js/react-webpack-plugin](https://github.com/lynx-js/react-webpack-plugin)@&#8203;0.7.4
-
[@&#8203;lynx-js/css-extract-webpack-plugin](https://github.com/lynx-js/css-extract-webpack-plugin)@&#8203;0.7.0

###
[`v0.12.8`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/rspeedy/plugin-react/CHANGELOG.md#0128)

[Compare
Source](https://github.com/lynx-family/lynx-stack/compare/@lynx-js/react-rsbuild-plugin@0.12.7...@lynx-js/react-rsbuild-plugin@0.12.8)

##### Patch Changes

- Updated dependencies
\[[`4240138`](https://github.com/lynx-family/lynx-stack/commit/424013867a33c44bf1c95f6b0a80a07646ebce2b)]:
-
[@&#8203;lynx-js/react-webpack-plugin](https://github.com/lynx-js/react-webpack-plugin)@&#8203;0.7.4
-
[@&#8203;lynx-js/react-alias-rsbuild-plugin](https://github.com/lynx-js/react-alias-rsbuild-plugin)@&#8203;0.12.8
-
[@&#8203;lynx-js/use-sync-external-store](https://github.com/lynx-js/use-sync-external-store)@&#8203;1.5.0
-
[@&#8203;lynx-js/react-refresh-webpack-plugin](https://github.com/lynx-js/react-refresh-webpack-plugin)@&#8203;0.3.4
-
[@&#8203;lynx-js/template-webpack-plugin](https://github.com/lynx-js/template-webpack-plugin)@&#8203;0.10.3

###
[`v0.12.7`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/rspeedy/plugin-react/CHANGELOG.md#0127)

[Compare
Source](https://github.com/lynx-family/lynx-stack/compare/@lynx-js/react-rsbuild-plugin@0.12.6...@lynx-js/react-rsbuild-plugin@0.12.7)

##### Patch Changes

- Updated dependencies
\[[`92881e7`](https://github.com/lynx-family/lynx-stack/commit/92881e7c5553f755dc52bba526d83757bbb05da8),
[`1a5f2a1`](https://github.com/lynx-family/lynx-stack/commit/1a5f2a1fb0489edc57c1f71deba43a763bb3bbee)]:
-
[@&#8203;lynx-js/template-webpack-plugin](https://github.com/lynx-js/template-webpack-plugin)@&#8203;0.10.3
-
[@&#8203;lynx-js/css-extract-webpack-plugin](https://github.com/lynx-js/css-extract-webpack-plugin)@&#8203;0.7.0
-
[@&#8203;lynx-js/react-webpack-plugin](https://github.com/lynx-js/react-webpack-plugin)@&#8203;0.7.3
-
[@&#8203;lynx-js/react-alias-rsbuild-plugin](https://github.com/lynx-js/react-alias-rsbuild-plugin)@&#8203;0.12.7
-
[@&#8203;lynx-js/use-sync-external-store](https://github.com/lynx-js/use-sync-external-store)@&#8203;1.5.0
-
[@&#8203;lynx-js/react-refresh-webpack-plugin](https://github.com/lynx-js/react-refresh-webpack-plugin)@&#8203;0.3.4

###
[`v0.12.6`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/rspeedy/plugin-react/CHANGELOG.md#0126)

[Compare
Source](https://github.com/lynx-family/lynx-stack/compare/@lynx-js/react-rsbuild-plugin@0.12.5...@lynx-js/react-rsbuild-plugin@0.12.6)

##### Patch Changes

- Support using `pluginReactLynx` in Rslib.
([#&#8203;2114](https://github.com/lynx-family/lynx-stack/pull/2114))

- Updated dependencies
\[[`4cd7182`](https://github.com/lynx-family/lynx-stack/commit/4cd71828a073e27ac3a2f5accded53e42e663215)]:
-
[@&#8203;lynx-js/template-webpack-plugin](https://github.com/lynx-js/template-webpack-plugin)@&#8203;0.10.2
-
[@&#8203;lynx-js/react-alias-rsbuild-plugin](https://github.com/lynx-js/react-alias-rsbuild-plugin)@&#8203;0.12.6
-
[@&#8203;lynx-js/use-sync-external-store](https://github.com/lynx-js/use-sync-external-store)@&#8203;1.5.0
-
[@&#8203;lynx-js/react-refresh-webpack-plugin](https://github.com/lynx-js/react-refresh-webpack-plugin)@&#8203;0.3.4
-
[@&#8203;lynx-js/react-webpack-plugin](https://github.com/lynx-js/react-webpack-plugin)@&#8203;0.7.3
-
[@&#8203;lynx-js/css-extract-webpack-plugin](https://github.com/lynx-js/css-extract-webpack-plugin)@&#8203;0.7.0

###
[`v0.12.5`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/rspeedy/plugin-react/CHANGELOG.md#0125)

[Compare
Source](https://github.com/lynx-family/lynx-stack/compare/@lynx-js/react-rsbuild-plugin@0.12.4...@lynx-js/react-rsbuild-plugin@0.12.5)

##### Patch Changes

- Support reading config from `pluginLynxConfig`.
([#&#8203;2054](https://github.com/lynx-family/lynx-stack/pull/2054))

- Updated dependencies \[]:
-
[@&#8203;lynx-js/react-alias-rsbuild-plugin](https://github.com/lynx-js/react-alias-rsbuild-plugin)@&#8203;0.12.5
-
[@&#8203;lynx-js/use-sync-external-store](https://github.com/lynx-js/use-sync-external-store)@&#8203;1.5.0
-
[@&#8203;lynx-js/react-refresh-webpack-plugin](https://github.com/lynx-js/react-refresh-webpack-plugin)@&#8203;0.3.4
-
[@&#8203;lynx-js/react-webpack-plugin](https://github.com/lynx-js/react-webpack-plugin)@&#8203;0.7.3

</details>

<details>
<summary>lynx-family/lynx-stack (@&#8203;lynx-js/rspeedy)</summary>

###
[`v0.13.4`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/rspeedy/core/CHANGELOG.md#0134)

[Compare
Source](https://github.com/lynx-family/lynx-stack/compare/@lynx-js/rspeedy@0.13.3...@lynx-js/rspeedy@0.13.4)

##### Patch Changes

- Bump ts-blank-space v0.7.0
([#&#8203;2238](https://github.com/lynx-family/lynx-stack/pull/2238))

- Bump Rsbuild v1.7.3 with Rspack v1.7.5.
([#&#8203;2189](https://github.com/lynx-family/lynx-stack/pull/2189))

- Updated dependencies \[]:
-
[@&#8203;lynx-js/web-rsbuild-server-middleware](https://github.com/lynx-js/web-rsbuild-server-middleware)@&#8203;0.19.8

###
[`v0.13.3`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/rspeedy/core/CHANGELOG.md#0133)

[Compare
Source](https://github.com/lynx-family/lynx-stack/compare/@lynx-js/rspeedy@0.13.2...@lynx-js/rspeedy@0.13.3)

##### Patch Changes

- Updated dependencies \[]:
-
[@&#8203;lynx-js/web-rsbuild-server-middleware](https://github.com/lynx-js/web-rsbuild-server-middleware)@&#8203;0.19.7

###
[`v0.13.2`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/rspeedy/core/CHANGELOG.md#0132)

[Compare
Source](https://github.com/lynx-family/lynx-stack/compare/@lynx-js/rspeedy@0.13.1...@lynx-js/rspeedy@0.13.2)

##### Patch Changes

- Bump Rsbuild 1.7.2 with Rspack 1.7.1.
([#&#8203;2136](https://github.com/lynx-family/lynx-stack/pull/2136))

###
[`v0.13.1`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/rspeedy/core/CHANGELOG.md#0131)

[Compare
Source](https://github.com/lynx-family/lynx-stack/compare/@lynx-js/rspeedy@0.13.0...@lynx-js/rspeedy@0.13.1)

##### Patch Changes

- Updated dependencies \[]:
-
[@&#8203;lynx-js/web-rsbuild-server-middleware](https://github.com/lynx-js/web-rsbuild-server-middleware)@&#8203;0.19.6

###
[`v0.13.0`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/rspeedy/core/CHANGELOG.md#0130)

[Compare
Source](https://github.com/lynx-family/lynx-stack/compare/@lynx-js/rspeedy@0.12.5...@lynx-js/rspeedy@0.13.0)

##### Minor Changes

- Bump Rsbuild v1.7.1 with Rspack v1.7.0.
([#&#8203;2088](https://github.com/lynx-family/lynx-stack/pull/2088))

- **BREAKING CHANGE**: Remove the CLI version selector and the
`--unmanaged` flag.
([#&#8203;2093](https://github.com/lynx-family/lynx-stack/pull/2093))

Rspeedy will no longer automatically attempt to use the locally
installed version when the CLI is invoked.

  Please uninstall your globally installed version of Rspeedy:

  ```bash
  npm uninstall -g @&#8203;lynx-js/rspeedy
  ```

##### Patch Changes

- Updated dependencies \[]:
-
[@&#8203;lynx-js/web-rsbuild-server-middleware](https://github.com/lynx-js/web-rsbuild-server-middleware)@&#8203;0.19.5

</details>

<details>
<summary>lynx-family/lynx-stack
(@&#8203;lynx-js/template-webpack-plugin)</summary>

###
[`v0.10.4`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/webpack/template-webpack-plugin/CHANGELOG.md#0104)

[Compare
Source](https://github.com/lynx-family/lynx-stack/compare/@lynx-js/template-webpack-plugin@0.10.3...@lynx-js/template-webpack-plugin@0.10.4)

##### Patch Changes

- Move `cssChunksToMap` implementation from
`@lynx-js/template-webpack-plugin` to `@lynx-js/css-serializer` for
future reuse.
([#&#8203;2269](https://github.com/lynx-family/lynx-stack/pull/2269))

- Updated dependencies
\[[`9033e2d`](https://github.com/lynx-family/lynx-stack/commit/9033e2d6c7c0c2405ecbbf73446239dd65b4a177)]:
-
[@&#8203;lynx-js/css-serializer](https://github.com/lynx-js/css-serializer)@&#8203;0.1.4

###
[`v0.10.3`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/webpack/template-webpack-plugin/CHANGELOG.md#0103)

[Compare
Source](https://github.com/lynx-family/lynx-stack/compare/@lynx-js/template-webpack-plugin@0.10.2...@lynx-js/template-webpack-plugin@0.10.3)

##### Patch Changes

- Fix "Failed to load CSS update file" for lazy bundle
([#&#8203;2150](https://github.com/lynx-family/lynx-stack/pull/2150))

- Fix "TypeError: cannot read property 'call' of undefined" error of
lazy bundle HMR.
([#&#8203;2146](https://github.com/lynx-family/lynx-stack/pull/2146))

###
[`v0.10.2`](https://github.com/lynx-family/lynx-stack/blob/HEAD/packages/webpack/template-webpack-plugin/CHANGELOG.md#0102)

[Compare
Source](https://github.com/lynx-family/lynx-stack/compare/@lynx-js/template-webpack-plugin@0.10.1...@lynx-js/template-webpack-plugin@0.10.2)

##### Patch Changes

- Polyfill `lynx.requireModuleAsync` to allow cache same parallel
requests.
([#&#8203;2108](https://github.com/lynx-family/lynx-stack/pull/2108))

</details>

<details>
<summary>lynx-family/lynx (@&#8203;lynx-js/types)</summary>

###
[`v3.7.0`](https://github.com/lynx-family/lynx/compare/3.6.0...10f25875d17c1e48187e0b156ecd9b4de3fdc89e)

[Compare
Source](https://github.com/lynx-family/lynx/compare/3.6.0...10f25875d17c1e48187e0b156ecd9b4de3fdc89e)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
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](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/lynx-family/lynx-examples).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My40My4yIiwidXBkYXRlZEluVmVyIjoiNDMuNDMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiYm90OnJlbm92YXRlIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.