Skip to content
This repository was archived by the owner on Oct 3, 2026. It is now read-only.

Releases: mdrv/wsx-w20260117

v1.2.0 - Comprehensive Test Suite

Choose a tag to compare

@mdrv mdrv released this 17 Jan 14:52

v1.2.0 - Comprehensive Test Suite

🎉 What's New

This release adds a comprehensive test suite with 169 passing tests, providing robust coverage of all library functionality.

📊 Test Coverage

  • 169 total tests (1436% increase from 11 baseline tests)
  • Client Tests (40): Reconnection logic, typed requests, validation
  • Server Tests (23): Request handlers, responses, Elysia integration
  • Shared Tests (70): Protocol, serialization, schemas, utilities
  • Integration Tests (18): Connection flows, reconnection scenarios, messaging
  • E2E Tests (13): Real-world ping-pong and authentication workflows

🛠️ Test Infrastructure

New test utilities in tests/utils/:

  • Test fixtures and sample data
  • Async helpers (waitFor, delay, MessageCollector)
  • Custom assertions for WebSocket testing
  • Mock server for client testing
  • Test client for server testing

📚 Documentation

  • New comprehensive Testing Guide
  • Examples for unit, integration, and E2E testing
  • Best practices and patterns
  • Coverage reporting and debugging tips

✅ Quality Assurance

All 169 tests verified passing:
```bash
bun test

169 pass

0 fail

516 expect() calls

```

🔗 Links

Installation

```bash
bun add @mdrv/wsx
```

Full Changelog: v1.1.1...v1.2.0

v1.1.1 - Pagefind Search and Dark Mode

Choose a tag to compare

@mdrv mdrv released this 17 Jan 12:16

🎉 New Features

🔍 Pagefind Search Integration

  • Full-text search across all 13 documentation pages
  • Search UI prominently displayed in main content area
  • Automated indexing on build (909 words indexed)
  • Fast, client-side search with no backend required
  • Highlighted search results with excerpts

🌙 Dark Mode Support

  • Theme toggle button in header (sun/moon icons)
  • Persistent theme preference via localStorage
  • Comprehensive dark mode styling across all components
  • CSS custom properties for consistent theming
  • No flash of unstyled content on page load
  • Dark mode support for Pagefind search UI

📱 Mobile Navigation Improvements

  • Enhanced hamburger button visibility on all pages
  • Auto-close mobile menu when clicking navigation links
  • Improved mobile accessibility and user experience

🔧 Technical Details

  • Pagefind v1.4.0 integrated into build pipeline
  • CSS custom properties system for theming
  • Theme initialization script prevents FOUC
  • All components updated: Header, Footer, Navigation, DocsLayout
  • Build script: astro build && pagefind --site dist

📝 Documentation

📦 Installation

bun add @mdrv/wsx zod cbor-x elysia

📚 Documentation

Visit the updated documentation site with search and dark mode: https://mdrv.github.io/wsx/


Full Changelog: v1.1.0...v1.1.1

v1.1.0: Documentation Site

Choose a tag to compare

@mdrv mdrv released this 17 Jan 11:48

📚 Documentation Site Release

Complete documentation site now live at https://mdrv.github.io/wsx/

What's New

📖 13 Comprehensive Pages:

  • Home page with features and quick example
  • Quick Start guide with step-by-step instructions
  • Complete API Reference (Client, Server, Shared)
  • In-depth Guides (Events, Request/Response, Reconnection, Validation)
  • Examples index with links to working code
  • Migration guide from v000 to v001

🎨 Custom Theme:

  • Built with Astro + Panda CSS
  • Responsive design with sidebar navigation
  • Syntax-highlighted code blocks
  • Clean, minimal design focused on readability

🚀 Deployment:

Documentation Highlights

API Reference:

  • createClient() - Complete client API with all methods and options
  • createElysiaWS() - Server API with request/response handlers
  • defineEvents() - Event schema definition with Zod

Guides:

  • Event Definition - Schema patterns, type inference, best practices
  • Request/Response - RPC pattern, error handling, concurrent requests
  • Auto-Reconnection - Exponential backoff, message queuing
  • Validation - Runtime Zod validation on both sides

Examples:

  • Ping-Pong - Basic request/response
  • Chat Application - Multi-user chat with rooms
  • Authentication - Protected endpoints

Links

Installation

bun add @mdrv/wsx zod cbor-x elysia

Full Changelog: v1.0.0...v1.1.0

v1.0.0

Choose a tag to compare

@mdrv mdrv released this 17 Jan 11:14

@mdrv/wsx v1.0.0

Type-safe WebSocket library with Zod validation for Elysia and browser clients.

Features

  • ✅ End-to-end type safety with TypeScript
  • ✅ Zod validation for all messages
  • ✅ Auto-reconnection with exponential backoff
  • ✅ Request/response pattern over WebSocket
  • ✅ CBOR serialization (JSON also available)
  • ✅ First-class Elysia framework support

Installation

bun add @mdrv/wsx zod cbor-x elysia

See README.md for usage examples.