All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Initialization hooks for plugin ecosystem
- Option to inject Request/Reply into services
- Support for URL in autoload config
- Plugin for integration with TypeDI
- BREAKING: dropped Node.js 10 and 12, minimal required is 14 LTS
- BREAKING: moved dependency injection functionality into separate package
- BREAKING: removed CommonJS build
- BREAKING: minimal TypeScript version officially supported is 4.0
- Option to specify global prefix
- Logo is not visible on npmjs
- Experimental plugins APIs
repository.directory
field topackage.json
- Inline CJS source maps
- Provide TypeScript 3.4 compatible typings by default
- Documentation minor updates
@Destructor
decorator for services graceful shutdown
- Missed CJS files for
fastify-decorators/testing
(#113)
- Added option to specify plugins when configuring controllers/services tests
- Publish library as dual package (ES Modules + CommonJS)
FastifyInstanceWithController
interface for testing (#93)
configureControllerTest
decorateFastifyInstance
with controller property
- Huge documentation rework
- FastifyInstance not available for injection in tests
- Hooks and error handlers support for stateless controllers (ControllerType.REQUEST)
- Support for async services testing
- Hooks override in RequestHandler when hook with same name defined multiple times
- Invalid RequestHandler constructor call when it has hooks
- RequestHandler / Controller options mutation
- Bootstrap failure when async services injected with
@Inject
- Warning when install due to unsatisfied peer dependency -
fastify-plugin
- support for services that need an async setup (#58)
- Bootstrap controllers properly
- Remove a global flag from mask if presents
- Use
fastify-plugin
helper forbootstrap
- Use
import type
from TypeScript 3.8 (for TS < 3.8 users do.d.ts
downlevel)
- Avoid redundant wrapping when configuring mocks for testing
- Request handlers decorators (GET, POST, PUT etc) ignore second argument:
class Ctrl { @GET('/', { schema: { body: { type: 'string' } } }) // fastify options were ignored get() {} }
@ErrorHandler
support for request handlers@Hook
support for request handlers
- Do not register empty error handlers
- Cannot read property 'get' of undefined when using
configureControllerTest
on class with dependencies provided via@Inject
decorator.
- More strict check for
@Controller
decorator
- Possible call stack size exceeded when using autobootstrap
@ErrorHandler
decorator for error handling within controllers
- BREAKING: move to Fastify 3
package.json
was missed infastify-decorators/testing