
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
@strapi/codemods
Advanced tools
CLI to help you migrate your Strapi applications & plugins from v3 to v4.
Before running any commands, be sure you have initialized a git repository, the working tree is clean, you've pushed your code to GitHub, and you are on a new branch.
Usage with prompt
npx @strapi/codemods migrate
The prompt will ask you:
Application
(migrate folder structure + dependencies)Plugin
(migrate folder structure + dependencies)Dependencies
(on migrate dependencies)./
).Bypass the prompt
To bypass the prompts use one of the following commands:
Application
migrationnpx @strapi/codemods migrate:application <path>
Plugin
migrationnpx @strapi/codemods migrate:plugin <path> [pathForV4Plugin]
Note: if no
pathForV4Plugin
is provided it will be created at<path>-v4
Dependencies
migrationnpx @strapi/codemods migrate:dependencies <path>
:warning: This command will modify your source code. Be sure you have initialized a git repository, the working tree is clean, you've pushed your code to GitHub, and you are on a new branch.
npx @strapi/codemods transform
The prompt will ask two questions:
What kind of transformation you want to perform:
find
-> findMany
: Change find
method to findMany
strapi-some-package
-> @strapi/some-package
: Update strapi scoped imports
.models
-> .contentTypes
: Change model getters to content types
strapi.plugins['some-plugin']
-> strapi.plugin('some-plugin')
: Update top level plugin getters
strapi.plugin('some-plugin').controllers['some-controller']
-> strapi.plugin('some-plugin').controller('some-controller')
: Use plugin getters
Add arrow function for service export
Add strapi to bootstrap function params
Where is the file(s) or folder to transform
Enjoy 🎉
FAQs

The npm package @strapi/codemods receives a total of 239 weekly downloads. As such, @strapi/codemods popularity was classified as not popular.
We found that @strapi/codemods demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.