Skip to content

Releases: adonisjs/http-server

Bug fix in the middleware pipeline flow

22 Jul 04:50
Compare
Choose a tag to compare
Pre-release

There was bug where the upstream logic of the route middleware was not triggered when route handler throws an exception. This release fixes that.

Commits

  • chore: update dependencies 15156b3
  • fix: run middleware upstream flow when route middleware or handler throws an error ec7b797
  • feat: allow status pages collection to accept a single status code 36f6960

Full Changelog: v6.8.2-9...v6.8.2-10

Add support for handling validation error messages

19 Jul 09:39
Compare
Choose a tag to compare

The ExceptionHandler class now contains special logic to handle validation errors and convert them to HTTP response using content negotiation.

The validation error message can come from any validation library as long as it has code and messages properties as per the following guidelines.

// Error code should be set
error.code = 'E_VALIDATION_ERROR'

// Error messages must be an array
error.messages = [
  {
     message: '',
     field: '',
     rule: ''
  }
]

Commits

  • test: improve assertions to work cross platform 1219602
  • chore: add missing dependency required for tests 2cd997e
  • feat(ExceptionHandler): separately hand validation error messages 76f6985
  • style: format source code ca7e409
  • chore: update dependencies 07020ce

Full Changelog: v6.8.2-8...v6.8.2-9

Add debug statements

08 Jul 09:37
Compare
Choose a tag to compare
Add debug statements Pre-release
Pre-release
  • refactor: add debug logs around registering routes eeac1bc
  • chore: update dependencies 47ca7b5

v6.8.2-7...v6.8.2-8

Full Changelog: v6.8.2-7...v6.8.2-8

Breaking change with flushHeaders method

04 Jul 07:21
Compare
Choose a tag to compare

Breaking change

  • The flushHeaders method behavior has been ported to writeHead method.
  • The flushHeaders method now loops over the headers and set them using the setHeader method.

Commits

  • docs(README): remove snyk badge and update tests badge URL 1814346
  • chore: add engines to package.json file f5b364d
  • chore: do not publish source files 97eb91f
  • chore: use @adonisjs/tooling presets for tooling config 1f6c481
  • test: refactor tests to use server factory c15c566
  • chore: upgrade japa to v3 9c4fcc0
  • refactor: improve stream response flush headers handling d011ae8
  • chore: rename vscode:test script to quick:test 5c93cbe
  • chore: update dependencies 50c6fab

Full Changelog: v6.8.2-6...v6.8.2-7

Update dependencies

17 Apr 06:08
Compare
Choose a tag to compare
Update dependencies Pre-release
Pre-release
  • chore: update dependencies f341ee5

Full Changelog: v6.8.2-5...v6.8.2-6

Upgrade to TypeScript 5

27 Mar 03:59
Compare
Choose a tag to compare
Pre-release
  • chore: publish source and generate delcaration map 5f3f896
  • docs: update License file 74a525d
  • chore: update dependencies 04fdd2a

Full Changelog: v6.8.2-4...v6.8.2-5

Add helper to parse route pattern to the router

14 Mar 08:00
Compare
Choose a tag to compare
  • feat: add method to parse route pattern into tokens e96216c

v6.8.2-3...v6.8.2-4

Full Changelog: v6.8.2-3...v6.8.2-4

Use fs/promises instead of util.promisify

14 Mar 05:42
Compare
Choose a tag to compare
  • chore: update dependencies 3e11221
  • refactor: use fs/promises instead of util.promisify (#70) 3d14a34

What's Changed

  • refactor: use fs/promises instead of util.promisify by @targos in #70

Full Changelog: v6.8.2-2...v6.8.2-3

Allow resource controller to be a class reference or a lazy import

11 Mar 11:03
Compare
Choose a tag to compare
  • feat: allow resource controller to be a class reference or lazy import 5af5846

Full Changelog: v6.8.2-1...v6.8.2-2

Replace deprecated cuid package with cuid2

11 Mar 08:14
Compare
Choose a tag to compare
  • chore: update dependencies ca438bf
  • refactor: use cuid2 package a982fb6
  • chore: update dependencies f54dd8b
  • Merge pull request #68 from adonisjs/fix/package-import a80a73c
  • fix: add missing @types/node package eba87c8

What's Changed

Full Changelog: v6.8.2-0...v6.8.2-1