Skip to content

Commit b5e5694

Browse files
authored
Merge pull request #23 from BlackishGreen33/bg/upstream-chore-release-prepare-1-2-5
chore(release): prepare 1.2.5
2 parents 9943819 + 171f65c commit b5e5694

6 files changed

Lines changed: 46 additions & 13 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
历史版本更新从 README 中拆出,便于首页专注接入说明与使用导航。
44

5+
## v1.2.5 (2026-04-15)
6+
7+
- Android `manifestPlaceholders` 改为在宿主现有配置后追加,保留非冲突的已有键
8+
- Android `app/build.gradle` 注入不再依赖 `versionName` 文本锚点
9+
- iOS `AppDelegate.swift` 中的 JPush 调试日志仅在 `DEBUG` 构建启用
10+
- 移除插件内部的历史全局配置 helper,并对齐 `createRunOncePlugin` 版本元数据
11+
- 更新 prebuild、测试与本地发布流程文档
12+
513
## v1.2.4 (2026-03-27)
614

715
- 修复 `app.config.js` 配置不生效的问题

DEVELOPMENT.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ npm run lint
8484
- `utils.test.ts`:生成区段与源码定位 helper 的幂等/回收测试
8585
- `androidTransforms.test.ts`:Android 纯转换函数与 vendor 开关回收测试
8686
- `iosTransforms.test.ts``Info.plist``AppDelegate`、Bridging Header 的纯转换测试
87-
- `nativeAndroidMods.test.ts` / `nativeIos*.test.ts`:fixture 项目上的原生回归测试
87+
- `nativeAndroidMods.test.ts` / `nativeIos*.test.ts`:fixture 项目上的原生回归测试,覆盖真实 `compileModsAsync` 路径
8888

8989
### 4. 清理
9090

@@ -249,19 +249,28 @@ describe('withMyPlugin', () => {
249249
这种方式的价值在于:
250250

251251
- 能覆盖正则锚点与模板兼容性
252+
- 能覆盖宿主已有 `manifestPlaceholders`、缺少 `versionName`、非字面量 `versionName` 等真实 Gradle 边界场景
252253
- 能验证重复执行时的幂等行为
253254
- 比只检查 helper 返回值更接近真实 `expo prebuild`
254255

255256
## 发布流程
256257

257-
### 1. 更新版本
258+
发布由独立 release PR 负责,不在发布机器上额外执行 `npm version patch`。推荐流程如下:
258259

259260
```bash
260-
npm version patch # 1.0.2 -> 1.0.3
261-
npm version minor # 1.0.2 -> 1.1.0
262-
npm version major # 1.0.2 -> 2.0.0
261+
git switch main
262+
git pull --ff-only
263263
```
264264

265+
### 1. 准备 release PR
266+
267+
- 先通过拆分 commit / 堆叠 PR 合入功能改动
268+
- 在 release PR 中统一更新:
269+
- `package.json`
270+
- `plugin/src/index.ts`
271+
- `app.plugin.js`
272+
- `CHANGELOG.md`
273+
265274
### 2. 构建
266275

267276
```bash
@@ -275,12 +284,27 @@ npm test -- --runInBand
275284
npm run lint
276285
```
277286

278-
### 4. 发布
287+
### 4. 检查发布包
288+
289+
```bash
290+
npm pack
291+
```
292+
293+
### 5. 发布
279294

280295
```bash
281296
npm publish
282297
```
283298

299+
### 6. 打 tag
300+
301+
只有 `npm publish` 成功后,才在同一提交上补 tag:
302+
303+
```bash
304+
git tag v1.2.5
305+
git push origin v1.2.5
306+
```
307+
284308
## 常见问题
285309

286310
### Q: 为什么使用 TypeScript?

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ export default ({ config }: ConfigContext): ExpoConfig => {
172172
- Android `manifestPlaceholders` 优先读取环境变量或 `gradle.properties`,缺失时会回退到插件配置里的 `appKey` / `channel` / `packageName`
173173
- 如果宿主已经定义了 `manifestPlaceholders`,插件会通过 `manifestPlaceholders += [...]` 追加 JPush 字段
174174
非 JPush 的宿主键会被保留;如果宿主和插件都声明了同名的 `JPUSH_*` 键,后追加的 JPush 默认值会生效
175+
- Android `app/build.gradle` 注入不再依赖 `versionName` 所在行;缺少 `versionName` 或使用 Gradle 变量时也能稳定 `prebuild`
175176
- `vendorChannels` 决定要注入哪些厂商 SDK 与占位符;若声明某个厂商通道,就必须提供该厂商要求的必填字段
176177
- 厂商密钥仍然建议交给环境变量,避免把敏感信息直接提交到仓库
177178

@@ -350,10 +351,8 @@ mx-jpush-expo/
350351
│ │ │ └── gradleProperties.ts
351352
│ │ └── utils/
352353
│ │ ├── codeValidator.ts
353-
│ │ ├── config.ts
354354
│ │ ├── generateCode.ts
355-
│ │ ├── sourceCode.ts
356-
│ │ └── vendorChannels.ts
355+
│ │ └── sourceCode.ts
357356
│ ├── __tests__/
358357
│ │ ├── fixtures/
359358
│ │ ├── iosFixture.ts
@@ -375,6 +374,8 @@ mx-jpush-expo/
375374
- iOS `UIBackgroundModes` 改为合并写入,不再覆盖宿主已有后台模式
376375
- Swift `Bridging Header` 支持优先复用、缺失自动创建,并保持幂等
377376
- 补齐 iOS / Android fixture-based 原生回归测试
377+
- Android `manifestPlaceholders` 改为在宿主现有配置后追加,不再依赖 `versionName` 文本锚点
378+
- iOS `AppDelegate.swift` 中的 JPush 调试日志只在 `DEBUG` 构建启用
378379
- 加入 ESLint 与 CI 质量闭环
379380
- 对齐 Expo SDK 53 的版本声明与仓库开发基线
380381
- Android 敏感参数支持环境变量 / `gradle.properties` 读取,不再明文写入构建脚本

app.plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* 支持 Expo SDK 53+ 和 React Native 0.79.5+
66
*
77
* @author MuxiStudio
8-
* @version 1.2.4
8+
* @version 1.2.5
99
*
1010
* 参考文档:
1111
* - JPush 集成 Expo: https://juejin.cn/post/7423235127716659239

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mx-jpush-expo",
3-
"version": "1.2.4",
3+
"version": "1.2.5",
44
"description": "Expo 集成极光推送(JPush)一体化解决方案,支持 iOS/Android 厂商通道",
55
"main": "app.plugin.js",
66
"types": "plugin/build/index.d.ts",

plugin/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* 支持 Expo SDK 53+ 和 React Native 0.79.5+
66
*
77
* @author MuxiStudio
8-
* @version 1.2.4
8+
* @version 1.2.5
99
*
1010
* 参考文档:
1111
* - JPush 集成 Expo: https://juejin.cn/post/7423235127716659239
@@ -80,4 +80,4 @@ const withJPush: ConfigPlugin<JPushPluginProps> = (config, props) => {
8080
/**
8181
* 导出插件(使用 createRunOncePlugin 确保插件只运行一次)
8282
*/
83-
export default createRunOncePlugin(withJPush, 'mx-jpush-expo', '1.2.4');
83+
export default createRunOncePlugin(withJPush, 'mx-jpush-expo', '1.2.5');

0 commit comments

Comments
 (0)