Skip to content

Fix Preact 11 support - #522

Merged
marvinhagemeister merged 6 commits into
mainfrom
fix-context-provider-detection
Aug 21, 2026
Merged

Fix Preact 11 support#522
marvinhagemeister merged 6 commits into
mainfrom
fix-context-provider-detection

Conversation

@JoviDeCroock

@JoviDeCroock JoviDeCroock commented Aug 7, 2026

Copy link
Copy Markdown
Member

Summary

  • use the VNode-based Preact 10 adapter for current Preact 11 releases
  • remove the obsolete Preact 11 adapter built for the abandoned experimental Internal node model
  • detect current context providers and core portals
  • run Signals coverage and the complete E2E suite against both Preact 10 and 11 in CI
  • declare current Preact 11 beta/RC/stable releases in the package peer range while excluding the incompatible 2022 experimental builds

Why

The existing Preact 11 adapter targets the 2022 experimental reconciler. It expects separate internal nodes, node-type flags and _internal lifecycle hooks. Current Preact 11 uses the same VNode shape and options hooks as Preact 10, so those assumptions cause most nodes to be classified as text and prevent profiling and owner tracking from working.

Sharing the working VNode adapter is both smaller and closer to Preact's current implementation than refreshing the obsolete adapter field by field.

Before this change, the Preact 11 E2E run on this branch reported 88 failures, 14 passes and 7 skips. After the change, both supported majors pass the complete suite, including restored Signals coverage and a new core portal regression test.

Validation

  • npm run format:check
  • npm run lint
  • npm run type-check
  • npm run test — 164 passed, 1 skipped
  • npm run test:e2e:10 — 109 passed, 3 skipped
  • npm run test:e2e:11 — 109 passed, 3 skipped

@JoviDeCroock JoviDeCroock changed the title Fix context provider detection without private fields Fix Preact 11 support Aug 21, 2026
@JoviDeCroock
JoviDeCroock marked this pull request as ready for review August 21, 2026 04:41

@upupming upupming left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks promising, Thanks!

@marvinhagemeister
marvinhagemeister merged commit 1029c67 into main Aug 21, 2026
1 check passed
@marvinhagemeister
marvinhagemeister deleted the fix-context-provider-detection branch August 21, 2026 07:26
upupming added a commit to lynx-family/lynx-stack that referenced this pull request Aug 21, 2026
Points the @lynx-js/preact-devtools override at the lynx-family/
preact-devtools#20 preview (upstream preactjs/preact-devtools#522
merged: released Preact 11 routes through the shared VNode adapter).
Verified on the Android emulator via lynx-devtool CLI: component tree,
find, and hooks inspection all work against a Preact 11 bundle.
upupming added a commit to lynx-family/preact-devtools that referenced this pull request Aug 21, 2026
* fix: detect context providers without private fields

* fix: support current Preact 11 internals

* fix: isolate Preact 11 portal bindings

* ci: forward retries to Playwright

* fix: exclude experimental Preact 11 renderer

* test: cover Preact 11 Suspense

Co-authored-by: Jovi De Croock <decroockjovi@gmail.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.

3 participants