This codemod renames addHandler
to addApiHandler
as required in Netlify SDK v0.8.1.
Before
import { NetlifyIntegration } from '@netlify/sdk';const integration = new NetlifyIntegration();integration.addHandler('some-function', async (event, context) => {});
After
import { NetlifyIntegration } from '@netlify/sdk';const integration = new NetlifyIntegration();integration.addApiHandler('some-function', async (event, context) => {});
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community