Skip to content

feat(preact,preact-router,preact-ssr): support Preact 11 - #302

Merged
dangreen merged 2 commits into
mainfrom
feat/preact-11
Oct 20, 2026
Merged

dangreen merged 2 commits into
mainfrom
feat/preact-11

Conversation

@dangreen

Copy link
Copy Markdown
Member

Supersedes #273.

  • @nano_kit/preact, @nano_kit/preact-router and @nano_kit/preact-ssr support Preact 11 next to Preact 10: the peer range is ^10.0.0 || ^11.0.0. The workspace develops and tests on Preact 11.
  • Preact 11 types <a> props as a union that ties role to href, so the <a> of Link, which forwards AnchorHTMLAttributes, no longer type-checks. Its href gets a @ts-expect-error with the reason. Casting the spreads instead passes tsc but trips no-unnecessary-type-assertion, which checks each spread on its own. LinkProps stays as is, and the emitted JS is the same.
  • The Event Board example moves to Preact 11. With Preact 10 left there, the example and the workspace packages loaded two copies of Preact, and its integration tests timed out.
  • preact-render-to-string is ^6.8.1 in the catalog and in the example: Preact 11 declares >=6.7.0 as its peer. @nano_kit/preact-ssr only calls the synchronous render, so the streaming API change of 6.8 does not touch it.

Size: the All publics bundles of @nano_kit/preact (720 B gzip, 662 B brotli) and @nano_kit/preact-router (1569 B gzip, 1469 B brotli) match main to the byte: Preact stays external, and the Link fix is type-only. The documented size tables have no Preact rows, so nothing there needs a new measurement.

renovate Bot and others added 2 commits October 20, 2026 16:15
Widen the `preact` peer range to `^10.0.0 || ^11.0.0` and move the Event Board example to Preact 11. Bump `preact-render-to-string` to 6.8, as Preact 11 needs 6.7 or newer.
@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.62%. Comparing base (a444406) to head (8a95621).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #302      +/-   ##
==========================================
+ Coverage   83.60%   83.62%   +0.02%     
==========================================
  Files         228      228              
  Lines        4849     4849              
  Branches     1074     1074              
==========================================
+ Hits         4054     4055       +1     
+ Misses        554      553       -1     
  Partials      241      241              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dangreen
dangreen merged commit b05c190 into main Oct 20, 2026
11 checks passed
@dangreen
dangreen deleted the feat/preact-11 branch October 20, 2026 13:16
@github-actions github-actions Bot mentioned this pull request Oct 20, 2026
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.

1 participant