Skip to content

upgrade: keyboard package upgrade for Solid 2.0#854

Merged
davedbase merged 2 commits into
solidjs-community:nextfrom
davedbase:update/v2/keyboard
May 14, 2026
Merged

upgrade: keyboard package upgrade for Solid 2.0#854
davedbase merged 2 commits into
solidjs-community:nextfrom
davedbase:update/v2/keyboard

Conversation

@davedbase
Copy link
Copy Markdown
Member

  • Bumped peer deps to solid-js@^2.0.0-beta.10 and @solidjs/web@^2.0.0-beta.10
  • Replaced isServer import from solid-js/web@solidjs/web
  • Removed deprecated tuple API from useKeyDownList (the [keys, { event }] destructuring form)
  • Fixed useKeyDownSequencecreateMemo second arg is now options in Solid 2.0, so prev starts as undefined; handle with prev ?? []
  • Rewrote createShortcut to use fully self-contained imperative state instead of reading reactive signals from event listeners (signal reads outside reactive computations return the pre-batch committed value in Solid 2.0, so shortcut detection and preventDefault must be synchronous/imperative)
  • Moved createKeyHold's preventDefault side effect out of createMemo into a dedicated keydown listener (memos must not have side effects in Solid 2.0)
  • Added INTERNAL_OPTIONS ({ ownedWrite: true }) to signals written inside singleton roots to satisfy the owned-scope write restriction
  • Added test/server.test.ts covering all six exported primitives under SSR conditions
  • Updated browser tests to call flush() after dispatching keyboard events (Solid 2.0 batches signal writes; flush() commits them before assertions)

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 3, 2026

🦋 Changeset detected

Latest commit: b20bdbb

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

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

@davedbase davedbase changed the base branch from main to next May 3, 2026 15:37
@davedbase davedbase added this to the Solid 2.0 Migration milestone May 3, 2026
@davedbase davedbase marked this pull request as ready for review May 8, 2026 21:24
Comment thread packages/keyboard/src/index.ts
@davedbase davedbase merged commit 0d011f3 into solidjs-community:next May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants