Skip to content

chore(preact-hotkeys): Support Preact 11 - #172

Merged
KevinVandy merged 4 commits into
mainfrom
chore/preact-11
Oct 10, 2026
Merged

KevinVandy merged 4 commits into
mainfrom
chore/preact-11

Conversation

@KevinVandy

@KevinVandy KevinVandy commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

The preact peer ranges already allow 11 (>=10.0.0). The adapter source needed no changes.

  • The preact dev dependency in the Preact packages and examples goes from ^10 to ^11.0.1, so CI now builds and tests against Preact 11. The peer ranges still allow Preact 10.
  • @tanstack/preact-store goes to ^0.13.5, with a patch changeset. 0.13.4 declared preact: ^10.0.0, so npm rejected Preact 11 even though this package's own peer range allows it (Preact 11 compatability table#6616). pnpm-workspace.yaml exempts 0.13.5 from the 24-hour release-age gate because it was published yesterday.
  • The unmount tests in useHotkey, useHotkeys and useHotkeySequences wrap unmount() in act(). Preact 11 runs useEffect cleanups after unmount, in the next effect flush, as React 18 does, so the tests checked too early. They pass on both Preact 10 and 11.
  • The preact-hotkeys-devtools unmount check moves to its own it.fails test. On Preact 11, @tanstack/devtools-utils@0.7.0 never calls the core's unmount(), which fix(devtools-utils): Unmount Preact panels on Preact 11 devtools#551 fixes. Once a fixed version is installed, the test fails, as a reminder to switch it back to it.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Compatibility

    • Updated the hotkeys package and its examples for Preact 11 compatibility.
    • Updated the Preact store requirement to a version that supports Preact 11.
  • Tests

    • Improved unmount checks for hotkey handlers and sequences to verify registrations are cleared.
    • Adjusted a devtools unmount test to account for an existing Preact 11 limitation.
  • Examples

    • Updated inline style values in the hotkeys example for consistent rendering.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 90c898e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@tanstack/preact-hotkeys Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Review in Change Stack →Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: TanStack/hotkeys/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: aeed3fc6-b3fb-4542-83f6-1e16879aaf47

📥 Commits

Reviewing files that changed from the base of the PR and between b876184 and 90c898e.


📒 Files selected for processing (1)
  • examples/preact/useHotkeys/src/index.tsx

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.



📝 Walkthrough

Walkthrough

The hotkeys package, examples, and devtools now specify Preact 11. The hotkeys package requires @tanstack/preact-store ^0.13.5. Hotkey tests wrap unmounts in Preact’s act, and a devtools unmount test is marked as an expected failure.

Changes

Preact compatibility

Layer / File(s) Summary
Update Preact dependencies and store requirement
.changeset/preact-hotkeys-preact-store-0-13-5.md, packages/preact-hotkeys/package.json, pnpm-workspace.yaml, examples/preact/*/package.json, examples/preact/useHotkeys/src/index.tsx, packages/preact-hotkeys-devtools/package.json
The hotkeys package requires @tanstack/preact-store ^0.13.5; the changeset and workspace release-age exclusion reference that version. The examples and devtools package update their Preact dependency to ^11.0.1. Two style values in the use-hotkeys example change to pixel strings.
Update Preact 11 test behavior
packages/preact-hotkeys/tests/useHotkey.test.tsx, packages/preact-hotkeys/tests/useHotkeySequences.test.tsx, packages/preact-hotkeys/tests/useHotkeys.test.tsx, packages/preact-hotkeys-devtools/tests/panel.test.ts
Three hotkey tests wrap unmount() in Preact’s act. The standalone devtools panel unmount test is marked as an expected failure, with a comment identifying the devtools-utils issue.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other


Merge Risk: ⚪ Minimal · up to 90c89

No actionable merge-blocking issue is established in the reviewed changes.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: adding Preact 11 support to preact-hotkeys.
Description check Passed The description provides detailed motivation, implementation changes, testing impact, release impact, and changeset information. It does not use the template headings or include the checklist, but the…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR








🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the keys at night,
Then wraps each unmount snug and right.
Preact hops to version eleven,
Store updates join the burrow’s haven.
Pixel margins line the way,
The rabbit thumps: “All set today!”

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

1 package(s) bumped directly, 0 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/preact-hotkeys 0.13.0 → 0.13.1 Changeset

@pkg-pr-new

pkg-pr-new Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@tanstack/alpine-hotkeys

npm i https://pkg.pr.new/@tanstack/alpine-hotkeys@172

@tanstack/angular-hotkeys

npm i https://pkg.pr.new/@tanstack/angular-hotkeys@172

@tanstack/angular-hotkeys-devtools

npm i https://pkg.pr.new/@tanstack/angular-hotkeys-devtools@172

@tanstack/ember-hotkeys

npm i https://pkg.pr.new/@tanstack/ember-hotkeys@172

@tanstack/hotkeys

npm i https://pkg.pr.new/@tanstack/hotkeys@172

@tanstack/hotkeys-devtools

npm i https://pkg.pr.new/@tanstack/hotkeys-devtools@172

@tanstack/lit-hotkeys

npm i https://pkg.pr.new/@tanstack/lit-hotkeys@172

@tanstack/octane-hotkeys

npm i https://pkg.pr.new/@tanstack/octane-hotkeys@172

@tanstack/preact-hotkeys

npm i https://pkg.pr.new/@tanstack/preact-hotkeys@172

@tanstack/preact-hotkeys-devtools

npm i https://pkg.pr.new/@tanstack/preact-hotkeys-devtools@172

@tanstack/react-hotkeys

npm i https://pkg.pr.new/@tanstack/react-hotkeys@172

@tanstack/react-hotkeys-devtools

npm i https://pkg.pr.new/@tanstack/react-hotkeys-devtools@172

@tanstack/solid-hotkeys

npm i https://pkg.pr.new/@tanstack/solid-hotkeys@172

@tanstack/solid-hotkeys-devtools

npm i https://pkg.pr.new/@tanstack/solid-hotkeys-devtools@172

@tanstack/svelte-hotkeys

npm i https://pkg.pr.new/@tanstack/svelte-hotkeys@172

@tanstack/svelte-hotkeys-devtools

npm i https://pkg.pr.new/@tanstack/svelte-hotkeys-devtools@172

@tanstack/vue-hotkeys

npm i https://pkg.pr.new/@tanstack/vue-hotkeys@172

@tanstack/vue-hotkeys-devtools

npm i https://pkg.pr.new/@tanstack/vue-hotkeys-devtools@172

commit: 90c898e

…ck types

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@KevinVandy KevinVandy changed the title chore(preact-hotkeys): Make unmount tests pass on Preact 11 chore(preact-hotkeys): Support Preact 11 Oct 10, 2026
@socket-security

socket-security Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​tanstack/​preact-store@​0.13.4 ⏵ 0.13.589 +51006995 +1100
Addedpreact@​11.0.110010010096100

View full report

@KevinVandy
KevinVandy marked this pull request as ready for review October 10, 2026 03:30
KevinVandy and others added 2 commits October 9, 2026 22:36
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@KevinVandy
KevinVandy merged commit 20acd0e into main Oct 10, 2026
9 checks passed
@KevinVandy
KevinVandy deleted the chore/preact-11 branch October 10, 2026 04:22
@github-actions github-actions Bot mentioned this pull request Oct 10, 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