Skip to content

Releases: elysiajs/elysia

1.4.20

Choose a tag to compare

@SaltyAom SaltyAom released this 03 Jan 14:35
c163c89

What's Changed

Improvement:

  • add ModelValidator.schema for accessing raw schema
  • #1636 add subscriptions to Elysia.ws context
  • #1638 unref Sucrose gc by @akim-bow

Bug fix:

  • #1649 add null check for object properties (t.Record) by @aymaneallaoui
  • #1646 use constant-time comparison for signed cookie verification by @JNX03
  • #1639 compose: ReferenceError: "_r_r is not defined" when onError returns plain object & mapResponse exists
  • #1631 update Exact Mirror to 0.2.6
  • #1630 enforce fetch to return MaybePromise

Bug fix:

  • Elysia.models broke when referencing non typebox model

New Contributors

Full Changelog: 1.4.19...1.4.20

Fat fug

1.4.19

Choose a tag to compare

@SaltyAom SaltyAom released this 13 Dec 12:41
218c12a

What's Changed

Security:

  • reject invalid cookie signature when using cookie rotation

Improvement

Bug fix:

  • #1614 Cloudflare Worker with dynamic path
  • add set immediate fallback
  • #1597 safeParse, parse to static type
  • #1596 handle context pass to function with sub context
  • #1591, #1590 merge set.headers without duplicating Response by @truehazker
  • #1546 override group prefix type
  • #1526 default error handler doesn't work in Cloudflare Workers
  • handle group with empty prefix in type-level

New Contributors

Full Changelog: 1.4.18...1.4.19

1.4.18

Choose a tag to compare

@SaltyAom SaltyAom released this 04 Dec 09:04
07b449a

What's Changed

Security

  • use JSON.stringify over custom escape implementation

Full Changelog: 1.4.17...1.4.18

1.4.17

Choose a tag to compare

@SaltyAom SaltyAom released this 02 Dec 07:23
428b976

What's Changed

Improvement:

  • #1573 Server is always resolved to any when @types/bun is missing
  • #1568 optimize cookie value comparison using FNV-1a hash
  • #1549 Set-Cookie headers not sent when errors are thrown
  • #1579 HEAD to handle Promise value

Security:

  • cookie injection, prototype pollution, and RCE

Bug fix:

  • #1550 excess property checking
  • allow cookie.sign to be string

Change:

  • #1584 change customError property to unknown
  • #1556 prevent sending set-cookie header when cookie value is not modified
  • #1563 standard schema on websocket
  • conditional parseQuery parameter
  • conditional pass c.request to handler for streaming response
  • fix missing contentType type on parser

New Contributors

Full Changelog: 1.4.16...1.4.17

1.4.16

Choose a tag to compare

@SaltyAom SaltyAom released this 13 Nov 04:33
78f4828

What's Changed

Improvement:

  • ValidationError: add messageValue as an alias of errorValue
  • ValidationError.detail now accept optional 2nd parameter allowUnsafeValidatorDetails
  • macro: add introspect
  • prevent redundant route compilation
  • merge multiple macro resolve response

Bug fix:

  • #1543 respect toResponse() method on Error classes by @MarcelOlsen
  • #1537 websocket: ping/pong not being called
  • #1536 export ExtractErrorFromHandle by @likeon
  • #1535 skip response validation for generators and streams by @MarcelOlsen
  • #1531 typo in ElysiaTypeCustomErrorCallback: valdation to validation by @davipatricio
  • #1528 error in parsing request body validation errors with Zod
  • #1527 bracket handling in exact mirror
  • #1524 head request handler not working by @sunnylqm

New Contributors

Full Changelog: 1.4.15...1.4.16

1.4.15

Choose a tag to compare

@SaltyAom SaltyAom released this 03 Nov 07:05
36a16bd

What's changed

Bug fix:

  • 1.4.14 regression with Eden Treaty, and OpenAPI type gen

Full Changelog: 1.4.14...1.4.15

1.4.14

Choose a tag to compare

@SaltyAom SaltyAom released this 03 Nov 04:04
59b46d3

What's Changed

Feature:

  • #1520, #1522 async handlers crash on HEAD request
  • #1510 strict status response
  • #1503 add t.NumericEnum() for numeric enum query handling
  • #1450 call onAfterResponse when onError returns a value
  • remove redundant Prettify
  • prettify response for OpenAPI type gen
  • conditional apply macro context in type level
  • improve type performance in general

Change:

  • remove Prettify2, Partial2

New Contributors

Full Changelog: 1.4.13...1.4.14

1.4.13

Choose a tag to compare

@SaltyAom SaltyAom released this 23 Oct 07:21
94abb3c

What's Changed

Feature:

  • #1453 add allowUnsafeValidationDetails for disabling unsafe validation details in production mode
  • allow rapid stream in non browser mode or ELYSIA_RAPID_STREAM is set
  • afterResponse now wait for generator stream to finish
  • trace of handle, and afterResponse now wait for generator stream to finish

Bug fix:

  • #1502, #1501 afterHandle doesn't update status
  • #1500 export InvalidFileType from root
  • #1495 request server hook parameters are typed as any (Bun 1.3.0)
  • #1483 handle standard schema validators in ValidationError.all
  • #1459 fix strictPath behavior when aot: false is set
  • #1455 graceful shutdown not awaiting server.stop
  • #1499 fails when merging with t.Optional schema
  • remove encoding chunk from native static response in Bun adapter

Change:

  • make @types/bun an optional dependency

New Contributors

Full Changelog: 1.4.12...1.4.13

1.4.12

Choose a tag to compare

@SaltyAom SaltyAom released this 15 Oct 13:46
272460a

What's changed

Improvement:

  • named macro function callback
  • adjust build script

Full Changelog: 1.4.11...1.4.12

1.4.11

Choose a tag to compare

@SaltyAom SaltyAom released this 11 Oct 20:45
720eaac

What's changed

Bug fix:

  • #1469 incorrect ping, pong type signature
  • #1467 better error union handling in onError
  • #1463 responseValue is undefined in afterHandle when beforeHandle returns status
  • #1460 compressed response in mapResponse is corrupted if status !== 200
  • #1456 add response type check for stream
  • #1451 cookie validation is not running when there's no body schema
  • make file-type non optional dependency to fix default build problem

Full Changelog: 1.4.10...1.4.11