Replace the APIs Fastify 5 removed
ProprietaryReplace reply.getResponseTime() with reply.elapsedTime, request.connection with request.socket, request.routeConfig, routeSchema, routerPath and routerMethod with the matching request.routeOptions property, and reply.redirect(statusCode, url) with reply.redirect(url, statusCode). Only files that import or require fastify change, and only on the first two parameters of a function when they are named request or req, then reply or res.
org. openrewrite. nodejs. migrate. fastify. ReplaceRemovedFastifyApismod run . --recipe= org. openrewrite. nodejs. migrate. fastify. ReplaceRemovedFastifyApisInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.