Skip to content

Releases: L2jLiga/fastify-decorators

v3.2.2

07 Sep 07:24
Compare
Choose a tag to compare

Fixed

  • Avoid redundant wrapping when configuring mocks for testing

v3.2.1

02 Sep 15:18
Compare
Choose a tag to compare

Fixed

  • Request handlers decorators (GET, POST, PUT etc) ignore second argument:
    class Ctrl {
      @GET('/', { schema: { body: { type: 'string' } } }) // fastify options were ignored
      get() {}
    }

v3.2.0

11 Aug 13:47
Compare
Choose a tag to compare

Added

  • @ErrorHandler support for request handlers
  • @Hook support for request handlers

Changed

  • Do not register empty error handlers

v3.1.1

31 Jul 15:46
Compare
Choose a tag to compare

Fixed

  • Cannot read property 'get' of undefined when using configureControllerTest on class with dependencies provided via @Inject decorator.

v3.1.0

20 Jul 12:00
Compare
Choose a tag to compare

Added

  • More strict check for @Controller decorator

Fixed

  • Possible call stack size exceeded when using autobootstrap

v3.0.0

10 Jul 04:22
Compare
Choose a tag to compare

Added

  • @ErrorHandler decorator for error handling within controllers

Changed

  • BREAKING: move to Fastify 3

Fixed

  • package.json was missed in fastify-decorators/testing

v3.0.0-1

24 Jun 17:01
5fd4645
Compare
Choose a tag to compare
v3.0.0-1 Pre-release
Pre-release

Fixed

  • package.json was missed in fastify-decorators/testing
  • wrong url in documentation

v2.0.1

24 Jun 16:47
b7b690b
Compare
Choose a tag to compare

Fixed

  • package.json was missed in fastify-decorators/testing
  • configureControllerTest does not work properly due fastify#2344

v3.0.0-0

21 Jun 07:00
9f129ff
Compare
Choose a tag to compare
v3.0.0-0 Pre-release
Pre-release

Added

  • @ErrorHandler decorator for error handling within controllers

Changed

  • BREAKING: move to Fastify 3

v2.0.0

12 Jun 05:55
aa8ac74
Compare
Choose a tag to compare

Added

  • Dependency injection
  • APIs and documentation for testing
  • New bootstrap options
    • directory, mask - common replacement for old bootsrap options
    • controllers - used to specify list of controllers to bootstrap
  • Overloads to controller and requests handlers, now they can accept string instead of configuration object
  • Controller can accept configuration in two different ways
    • As a single object describing controller configuration
    • As a string with route
  • Request handlers can accept configuration in three different ways
    • As a single object describing controller configuration
    • As a string with route
    • As a string with route and route options
  • Plugin for JetBrains IDE (WebStorm, IDEA, ...)
  • Option to skip broken modules from attempts to bootstrap

Changed

  • BREAKING CHANGE: symbols not exported anymore
  • BREAKING CHANGE: minimal supported version of node is 10.14
  • Throw human-friendly error when errors happened due initialization
  • Specify module type in package.json

Fixed

  • Correctly handle all arguments passed to handler (#9)
  • Incorrect links in the README.md when publish on NPM
  • Typos in documentation

Removed

  • controllersDirectory, controllersMask, handlersDirectory and handlersMask bootstrap options
  • AbstractController in favor of Dependency Injection
  • hooks initialization in REQUESTS controller type