Packages

elysia

1.4.32 · 11 Nov 2026MIT2.2M / weekRepositorynpmAtom feed

Your version

1.1.0

16 Jul 2024Where it was published

1.4.32 is the newest release of 1.x.

In short

1 removed1 deprecated6 new3 faster27 changed

  • Removed

    Remove prototype poluation from hook

  • Deprecated

    Deprecated ObjectString for parsing array

Security

4 advisories affect 1.1.0; 1.4.29 fixes them

Release note

Feature:

  • Trace v2

  • Normalization is on by default

  • Data type coercion

  • Guard as, bulk as cast

  • Response status coercion

  • Optional path parameter

  • Generator response stream

Breaking Change:

  • Parse value as string for all validators unless explicitly specified.

    • See 50a5d92, 44bf279.

    • Remove objects auto-parsing in query unless explicitly specified via query

    • Except query string as defined in RFC 3986, TLDR; query string could be either string or array of string.

  • Rename onResponse to onAfterResponse

  • Remove $passthrough in favor of toResponse

  • UnwrapRoute type now always resolve with status code

Improvement:

  • Add auto-complete for set.headers

  • Add server property

  • onError supports array function

  • Parse query object with and without schema

  • Sucrose: Improve isContextPassToFunction, and extractMainParameter stability

  • Add replaceSchemaType

  • Add route to context

  • Optimize recursive MacroToProperty type

  • Parse query array and object

  • Optimize code path for composeGeneralHandler

  • Add debug report on compiler panic

  • Reduce memory usage of route registration ~36% on large codebase

    • Reduce compilation code path

    • Remove trace inference

    • Reduce router compilation code path

    • removing route handler compilation cache (st${index}, stc${index})

  • Add undefined union to cookie in case if cookie is not present

  • Optimize response status resolve type inference

Change:

  • Deprecated

    Deprecated ObjectString for parsing array

  • Using Cookie<unknown> instead of Cookie<any> if schema is not defined

  • Removed

    Remove prototype poluation from hook

  • Remove static analysis for query name

  • Remove query replace '+' in favor removing static query analysis

  • mapResponse is now called in error event

  • Reconcilation decorator in type level

Bug fix:

  • Normalize headers accidentally use query validator check instead

  • onError missing trace symbol

  • Headers validator compilation is not cached

  • Deduplicate macro propagation

  • Websocket in nested group now work

  • Error response is not check unless successful status code is provided

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.