elysia
1.4.32 · 11 Nov 2026MIT2.2M / weekRepositorynpmAtom feed
1.4.32 is the newest release of 1.x.
In short
12 new4 faster1 fixed31 changed
Security
4 advisories affect 1.3.0; 1.4.29 fixes them
- Highelysia has Inefficient Algorithmic Complexity and Interpretation ConflictGHSA-9643-4qgh-g8mx · 23 Sep 2026Fixed in 1.4.29
- HighElysia has a string URL format ReDoSGHSA-f45g-68q3-5w8x · 10 Mar 2026Fixed in 1.4.26
- HighElysia affected by arbitrary code injection through cookie configGHSA-8vch-m3f4-q8jf · 9 Dec 2025Fixed in 1.4.18
- ModerateElysia Cookie Value Prototype PollutionGHSA-8hq9-phh3-p2wp · 17 Mar 2026Fixed in 1.4.27
Release note
Full release note on Elysia blog: Elysia 1.3 and Scientific Witchery.
Named after the song Ga1ahad and Scientific Witchery by Mili.
This release doesn't come with shiny new features.
It's about refinement to make things better to the point that we consider it as "magic".
Feature:
Add
exactMirrorAdd
systemRouterconfigstandalone ValidatorAdd
Elysia.Reffor referencing schema with autocompletion instead oft.RefSupport Ref inside inline schema
Add sucrose cache
New validation
t.Form,t.NoValidateUse
file-typeto check file typeAdd
INVALID_FILE_TYPEerrorAdd
sanitizeoptions
Improvement:
encodeSchemanow stable and enabled by defaultOptimize types
Reduce redundant type check when using Encode
Optimize isAsync
Unwrap Definition['typebox'] by default to prevent unnecessary UnwrapTypeModule call
Elysia.form can now be type check
Refactor type-system
Refactor
_typesinto~TypesUsing aot compilation to check for custom Elysia type, eg. Numeric
Refactor
app.router.static, and move static router code generation to compile phaseOptimize memory usage on
add,_use, and some utility functionsImprove start up time on multiple route
Dynamically create cookie validator as needed in compilation process
Reduce object cloning
Optimize start index for finding delimiter of a content type header
Promise can now be a static response
ParseErrornow keeps stack traceRefactor
parseQueryandparseQueryFromURLAdd
configoptions tomountRecompile automatically after async modules is mounted
Support macro on when hook has function
Support resolve macro on ws
Add support to return web API's File from handler
Skip non-numeric status codes in response schema validation
Cookie does not sign when an error is thrown
Bug fix:
Responsereturned fromonErroris using octet streamUnintentional memory allocation when using
mergeObjectArrayHandle empty space on Date query
Change:
Only provide
c.requestto mapResponse whenmaybeStreamis trueUse plain object for
routeTreeinstead ofMapRemove
compressHistoryHookanddecompressHistoryHookWebstandard handler now return
text/plainif not on BunUse non const value for
decorateunless explicitly specifiedElysia.mountnow setdetail.hide = trueby default
Breaking Change:
Remove
as('plugin')in favor ofas('scoped')Remove root
indexfor Eden TreatyRemove
websocketfromElysiaAdapterRemove
inference.request
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.