This codemod updates references from req.connection
to req.socket
, reflecting changes in Fastify v5's request handling.
Before
fastify.get('/route', (req, reply) => {console.log(req.connection.remoteAddress);return { hello: 'world' };});
After
fastify.get('/route', (req, reply) => {console.log(req.socket.remoteAddress);return { hello: 'world' };});
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community