SHARDWIRE
Changelog

@shardwire/react

Release history for the @shardwire/react npm package.

This page lists releases for @shardwire/react. It versions independently from shardwire; check dependencies / peerDependencies in package.json on each release for the shardwire range and react peer.

npm: @shardwire/react · Core library history: shardwire.

0.5.2

  • Dependency bump only: updated runtime shardwire dependency range to ^2.2.0 to align with hybrid/single-process/raw updates in core.

0.5.1

  • Dependency refresh release from PR 24: updated the runtime shardwire dependency range and refreshed development dependencies; no hook API changes.

0.5.0

  • useShardwireMutation: Preferred hook for AppBridge.actions (pending state, lastResult including structured { ok: false }, lastError for throws and action failures). useShardwireAction remains an alias.
  • Capabilities: useShardwireCapabilities and useShardwireCapability read negotiated capabilities and per-event/action explanations (optional explicit AppBridge overload).
  • useShardwireEventState: Latest event payload or reducer-driven state from app.on (optional explicit AppBridge overload).
  • useShardwirePreflight: Wraps app.preflight with status, report, error, and refresh() (optional explicit AppBridge overload).
  • Testing: MockShardwireProvider, createMockShardwireAppBridge, and createMockShardwireConnection for unit tests.
  • Connection keys: Reconnect when debug or metrics callback identity changes; useShardwireConnection also reconnects when strict-startup ready inputs change (aligned with ShardwireProvider).

0.4.0

  • useShardwireListener overload: Call with one argument (props only) inside ShardwireProvider to subscribe using the context connection—no manual AppBridge / enabled: status === 'ready' boilerplate. The two-argument form useShardwireListener(app, props) is unchanged (e.g. with useShardwireConnection without a provider).
  • useShardwireAction: Typed invoke, isPending, lastResult, lastError, reset for AppBridge.actions when the connection is ready; invoke rejects while not ready.
  • useShardwireApp: Returns AppBridge | null from the provider ( null until ready).
  • useShardwireOptional: ShardwireConnection | null without throwing outside a provider (used internally so hooks follow Rules of React; advanced composition).
  • Re-exports: diagnoseShardwireApp and formatShardwireDiagnosis from shardwire/client for one-import dashboards.

0.3.2

  • Docs: npm README — Shields.io badges (version, downloads, license, Node, React peer); install and lead copy tuned for npm/GitHub. No hook API changes.

0.3.1

  • Docs: Refreshed the npm package README (accurate ShardwireProvider options and useShardwire status handling; VITE_SHARDWIRE_* env names).
  • Packaging: Added root LICENSE (MIT) alongside the published README. No hook API changes.

0.3.0

  • Breaking: Replaced useShardwireBridge, useShardwireCapabilities, and useShardwireEvent with useShardwireConnection (discriminated status + capabilities on ready), optional ShardwireProvider / useShardwire, and useShardwireListener (object argument; stable filter fingerprint).
  • DX: Connection reconnect key now covers reconnect, requestTimeoutMs, and metrics shape (not function identity). logger changes still require remount or parent key if you need a fresh bridge instance.
  • Types: Curated type re-exports from @shardwire/react for common app-bridge types.

0.2.0

  • Breaking: engines.node >=22.0.0 (matches shardwire 2.x).
  • Dependency: shardwire ^2.0.0 (see shardwire 2.0.0 changelog).

0.1.4

  • Dependency: shardwire ^1.9.3 (browser-safe request IDs; see shardwire 1.9.3 changelog).

0.1.3

  • shardwire is now a runtime dependency (^1.9.3) so npm install @shardwire/react react is enough for hook-only apps. react remains the only peer dependency.

0.1.2

  • Peer dependency: shardwire >= 1.9.2 (native WebSocket in browser app bridges; see shardwire 1.9.2 changelog).

0.1.1

  • Hooks now import shardwire/client so Vite/browser builds avoid discord.js / zlib-sync resolution errors.
  • Peer dependency: shardwire >= 1.9.1 (required for the shardwire/client export).

0.1.0

Initial public release of optional React hooks for app-side bridges.

  • useShardwireBridge, useShardwireCapabilities, and useShardwireEvent — thin hooks around connectBotBridge for dashboards and controllers.
  • Peer dependencies: react >= 18, shardwire >= 1.9.0 (neither is bundled).
  • Published from packages/react with ESM + CJS builds and TypeScript declarations.

On this page