expo-migrate-module
将现有的Apple/Swift Expo原生模块从Expo Modules API 1.0定义DSL迁移到2.0宏API(有时称为v2),同时保留其JavaScript和TypeScript契约。适用于在现有模块中转换或逐步采用@ExpoModule、@JS、@Event、@SharedObject或@Record。不适用于创建新模块、一般Expo SDK升级或Android/Kotlin迁移。
机器翻译查看英文原文
Migrate an existing Apple/Swift Expo native module from the Expo Modules API 1.0 definition DSL to the 2.0 macro API (sometimes called v2) while preserving its JavaScript and TypeScript contract. Use when converting or incrementally adopting @ExpoModule, @JS, @Event, @SharedObject, or @Record in an existing module. Do not use for creating a new module, general Expo SDK upgrades, or Android/Kotlin migrations.
适用对象:移动应用开发。自动收录 · 待核查。
原作者说明节选
从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。
查看英文原文
原文涵盖的主题
- Migrate an Expo Module
- Prerequisite
- References
- Workflow
- 1. Establish the contract
- 2. Verify the available 2.0 surface
- 3. Apply the migration
- When a 2.0 equivalent is missing or a group fails
Migrate the Swift side of an existing Expo module without changing its observable JS API. Treat the current JS/TypeScript surface and tests as the compatibility contract. Leave Kotlin on the 1.0 DSL unless the user explicitly expands the task. Use expo 58.0.21 or newer. Earlier 58.0.x releases lack tuple conversion and the swift:check and swift:expand commands of expo-modules-cli. Older ones also lack lazy @JS properties, SharedRef subclasses in @SharedObject, static shared-object members, and .withAsync, and the oldest lack closure arguments and free-form Any return values. SDK 57 also lacks .concurrent, @Union, and module auto-discovery. Do not target either. Before editing, check the installed version (npm ls expo, or the lockfile). If it is older, stop and tell the user to upgrade first. Check the example app's own dependencies too, not only the module root. The example app is the integration surface you build and launch in step 4, so it needs the same floor. This is a floor, not a guarantee: the macro and core surface changed in almost every 58.0.x patch release, so step 2 must still verify the installed source. The macros are still experimental and undocumented: SDK 58 has no
这里只展示节选,请以完整原文和当前要求为准。
- 来源仓库
- expo/skills
- 源文件
- plugins/expo-experiments/skills/expo-migrate-module/SKILL.md
- 固定版本
- a9e5bd3fa00b4e61f632e43f85da73aee1942582
来源与内容状态
本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。
原作者:Expo Skills · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T14:01:42.010Z。
分类由名称、说明与路径规则生成,分类不代表已核实适配。
许可与权利归属
MIT。第三方内容及版权归原作者,使用条件以原文为准。
许可原文 ↗本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。
限制与注意事项
- 元数据收录不代表本站已经安装、适配、实测或进行安全审查。