Never miss a release that matters
AI-powered summaries of every GitHub release.
AI Summaries
Changelogs condensed into clear, actionable insights.
Always Free
Track up to 5 packages at no cost, forever.
Weekly Digest
A curated summary of every release, delivered weekly.
TL;DR
ElysiaJS now supports streaming responses with backpressure and handles Range headers for efficient file/blob delivery, improving performance for large data transfers.
New
- Streaming Responses: Implement server-sent events and real-time data updates.
- Range Headers: Enable partial content requests for files (improves download speeds).
Fixes Worth Knowing
- Dynamic imports within
.guardfunctions now correctly register routes. - HTML imports are now compatible with Bun (a JavaScript runtime).
- Error responses that return Promises are now handled correctly.
- Cookie configurations are merged, resolving potential validation issues.
Before You Upgrade
If you are using Bun, ensure your HTML imports are correctly configured to take advantage of the fix.
TL;DR
ElysiaJS 0.8 focuses on API stability and performance improvements, introducing a powerful Macro API (customizable plugin logic) and new lifecycle hooks for more control over request processing.
Breaking
afterHandleEarly Return:afterHandleno longer short-circuits the request.deriveContext Changes:deriveis now accessed viadecorator['derive']instead of directly from the context.
New
- Macro API: Enables highly customizable plugin logic with full type safety.
- New Lifecycle Hooks:
resolve(safe derive) andmapResponse(custom response transformation) offer finer-grained control. - Error Function: A new
error()function simplifies returning status codes with values, improving type inference for tools like Eden (code analysis).
Fixes Worth Knowing
- Validation errors are now returned as JSON with detailed information, improving debugging.
- Improved handling of large files (videos) with automatic
content-rangeheader addition.
Before You Upgrade
- Review any code relying on early returns within
afterHandleand adjust accordingly. - Update references
TL;DR
Elysia 0.3 introduces Elysia Fn, enabling you to directly call backend functions from the frontend with full type safety and autocompletion, significantly accelerating development.
Breaking
- OpenAPI 2.x to 3.0.3: API definitions have been updated, potentially requiring changes to existing integrations.
deriveRemoved: This feature is no longer available.- Context Store Change: Internal context storage has moved from
context.store[SYMBOL]tometa[SYMBOL].
New
- Elysia Fn: Call backend functions directly from the frontend with type safety. (Backend-to-frontend communication)
- File Uploads: Native support for file uploads via
multipart/formdatawith validation usingFileandFilestypes. - Eden Rework: Eden now offers three function types (
treaty,fn,fetch) for improved scalability and type inference.
Fixes Worth Knowing
- Improved TypeScript inference during plugin registration.
- Resolved potential build errors when using
declaration: trueintsconfig.json.