You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched existing issues to ensure the bug has not already been reported
Fastify version
4.24.3
Plugin version
5.2.0
Node.js version
18.16.1
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
Debian 10
Description
Deprecation for use with reply. context :
[FSTDEP019] FastifyDeprecation: reply.context property access is deprecated. Please use "reply.routeOptions.config" or "reply.routeOptions.schema" instead for accessing Route settings. The "reply.context" will be removed in fastify@5.
in index.js : line 23 if (reply.context.config.serializers) { // keep route level cache in config to prevent messing with global cache reply.context.config.serializers.cache = Object.assign({}, reply.context.config.serializers.cache) reply.serializer.serializerManager = SerializerManager.expand({ serializers: reply.context.config.serializers, cache: reply.context.config.serializers.cache }, globalSerializerManager) }
Steps to Reproduce
Launch any example will output the warning on each request
Expected Behavior
No deprecation warning
The text was updated successfully, but these errors were encountered:
)
* Issue: #99
Replaced reply.context with request.routeOptions.config as recommended in the deprcation warning.
* updated version number reflecting that a minor change was made that doesn't changed the exposed functionality
* Update package.json
Signed-off-by: Joel Driver <driverjb09@gmail.com>
---------
Signed-off-by: Joel Driver <driverjb09@gmail.com>
Prerequisites
Fastify version
4.24.3
Plugin version
5.2.0
Node.js version
18.16.1
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
Debian 10
Description
Deprecation for use with reply. context :
[FSTDEP019] FastifyDeprecation: reply.context property access is deprecated. Please use "reply.routeOptions.config" or "reply.routeOptions.schema" instead for accessing Route settings. The "reply.context" will be removed in
fastify@5
.in index.js : line 23
if (reply.context.config.serializers) { // keep route level cache in config to prevent messing with global cache reply.context.config.serializers.cache = Object.assign({}, reply.context.config.serializers.cache) reply.serializer.serializerManager = SerializerManager.expand({ serializers: reply.context.config.serializers, cache: reply.context.config.serializers.cache }, globalSerializerManager) }
Steps to Reproduce
Launch any example will output the warning on each request
Expected Behavior
No deprecation warning
The text was updated successfully, but these errors were encountered: