升级工具
🌐 Upgrade tool
Page summary:升级工具是一个 CLI 命令,它通过更新依赖并将代码修改应用到代码库中,自动将 Strapi 应用升级到新版本。
🌐 The upgrade tool is a CLI command that automatically upgrades Strapi applications to a new version by updating dependencies and applying codemods to the codebase.
升级工具帮助 Strapi 用户将其 Strapi 应用依赖和代码升级到特定版本。
🌐 The upgrade tool assists Strapi users in upgrading their Strapi application dependencies and code to a specific version.
运行升级工具会触发应用依赖的更新、安装,以及执行一系列代码修改工具(codemods) ,这些工具会根据目标版本之前引入的破坏性更改自动编辑应用代码库。
升级工具是一个 Strapi 包,可以从 CLI 运行。
🌐 The upgrade tool is a Strapi package and can be run from the CLI.
范围
🌐 Scope
虽然升级工具有助于升级应用和插件,但它并未涵盖其各个方面。
🌐 While the upgrade tool helps upgrade applications and plugins, it doesn't cover every aspect of it.
✅ 升级工具支持:
- 更新项目的依赖
- 将自动代码转换应用于现有文件
- 为项目安装或重新安装正确的依赖
❌ 升级工具不支持:
- 通过添加、删除或移动文件和目录来修改文件树
- 迁移应用的数据。这由 Strapi 数据库迁移处理
在升级工具完成执行后,强烈建议在重新运行应用或插件之前,审查所做的修改。
🌐 After the upgrade tool completes its execution, it is strongly recommended to review the modifications made before re-running the app or plugin.
版本类型
🌐 Version types
Strapi 版本号遵循 semantic versioning 约定:

- 第一个数字是主要版本号。
- 第二个数字是