Skip to content

Support encrypted channels with a Pusher prop on HibiraProvider (0.3.0) - #8

Merged
deflinhec merged 1 commit into
mainfrom
claude/project-thread-b781r0
Nov 8, 2026
Merged

deflinhec merged 1 commit into
mainfrom
claude/project-thread-b781r0

Conversation

@deflinhec

Copy link
Copy Markdown
Member

Requested by Danny · project thread

What does this change?

The default browser build of pusher-js has no NaCl, so subscribing to an end-to-end encrypted private-encrypted- channel failed unless you built and passed your own client. This adds a Pusher prop to HibiraProvider: pass the class from pusher-js/with-encryption and encrypted channels work, with the Hibira defaults and the provider's lifecycle kept. README gets an "Encrypted channels" section. Version 0.3.0.

How was it tested?

  • Unit test: the provider opens the connection with the class it is given and disconnects it on unmount (npm test, 40 pass), plus a type test (npm run typecheck).
  • New end-to-end test against a local pusher-server: the backend (pusher with encryptionMasterKeyBase64) triggers on a private-encrypted- channel and useEvent gets the decrypted payload. All e2e tests pass.

Checklist

  • Tests pass locally and cover the change
  • README or docs updated for any public API or behaviour change
  • No secrets, keys, tokens or personal data in code, tests or screenshots
  • Existing license and copyright notices are kept
  • Breaking changes, if any, are called out above (none: the new option is optional)

Generated by Claude Code

The default browser build of pusher-js has no NaCl, so encrypted channels
failed unless you built and passed your own client. Pass the class from
pusher-js/with-encryption instead. Adds a README section, a unit test,
a type test and an end-to-end test against a real server. Release 0.3.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SHtsCF9LUzGnmMxYox3ZKU
@deflinhec deflinhec self-assigned this Nov 8, 2026
@deflinhec
deflinhec marked this pull request as ready for review November 8, 2026 03:16
@deflinhec
deflinhec merged commit 5e7ef01 into main Nov 8, 2026
8 checks passed
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.

2 participants