Packages

elysia

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

Your version

0.5.0

15 May 2023Where it was published

0.8.17 is the newest release of 0.5.x.

In short

1 removed4 new1 fixed11 changed

  • Removed

    Remove hook.schema to hook

Security

4 advisories affect 0.5.0; 1.4.29 fixes them

Release note

Improvement:

  • Add CommonJS support for running Elysia with Node adapter

  • Remove manual fragment mapping to speed up path extraction

  • Inline validator in composeHandler to improve performance

  • Use one time context assignment

  • Add support for lazy context injection via Static Code Analysis

  • Ensure response non nullability

  • Add unioned body validator check

  • Set default object handler to inherits

  • Using constructor.name mapping instead of instanceof to improve speed

  • Add dedicated error constructor to improve performance

  • Conditional literal fn for checking onRequest iteration

  • Improve WebSocket type

Bug fix:

  • Possible

Breaking Change:

  • Rename innerHandle to fetch

    • to migrate: rename .innerHandle to fetch

  • Rename .setModel to .model

    • to migrate: rename setModel to model

  • Removed

    Remove hook.schema to hook

    • to migrate: remove schema and curly brace schema.type:

    // from
    app.post('/', ({ body }) => body, {
        schema: {
            body: t.Object({
                username: t.String()
            })
        }
    })
    
    // to
    app.post('/', ({ body }) => body, {
        body: t.Object({
            username: t.String()
        })
    })
  • Remove mapPathnameRegex (internal)

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.