Codemod

Automated code transforms that move a Payload project past breaking changes

Official 45,915 1.1k/wk MIT v4.0.0-internal.ff27d6e

Installation

pnpm add @payloadcms/codemod

About

Payload Codemod rewrites project code when Payload changes an API in a way that breaks existing configs. It reads the TypeScript and JavaScript sources of a project, finds outdated patterns, and updates them in place. Examples include moving deprecated field admin options into their newer form and renaming props on custom diff components. Each transform is safe to run more than once, and a dry-run mode lists the planned edits without writing files. An upgrade flow also bumps Payload packages, installs dependencies, and prints a report of anything that still needs a manual change.

Package info

Package name
@payloadcms/codemod
Latest version
4.0.0-internal.ff27d6e
Unpacked size
1.1 MB
License
MIT
Weekly downloads
1.1k
Last publish
Nov 2, 2026

More from payloadcms

View profile

Stores Payload upload files in Cloudflare R2 buckets instead of local disk

Adds a parent field and breadcrumbs to collections so documents can nest inside each other

Sends Payload server errors and selected HTTP errors to Sentry with user context

Adds an SEO tab with meta title, description, image and search preview to collections

Stores collection uploads in Vercel Blob Storage instead of local disk

Lets one Payload admin panel manage content for many separate tenants

Similar tools

More in Dev workflow

Stateful test emulator of the Payload collection REST API with seeded data

Editor support for Payload component paths, with import checks and autocomplete

Governance checks and ESLint rules for Payload project structure, access code and hooks

Manifest, linter and Payload block generator for a design system's components

Idempotent seed runner that fills a Payload database with ordered, cross-referenced content

Agent skill that enforces generated, paired Payload database migrations and gates destructive changes