fix(plugin): gate iOS debug logs and align plugin metadata#22
Merged
konodioda727 merged 9 commits intokonodioda727:mainfrom Apr 16, 2026
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Expo config plugin to (1) avoid leaking noisy iOS debug logs into Release builds, (2) remove legacy global config helpers in favor of explicit mod inputs, and (3) align plugin “run once” metadata with the published package version.
Changes:
- Gate generated iOS JPush debug logging and
setDebugMode()behind#if DEBUG. - Refactor Android/iOS transforms to stop relying on global config helpers; pass config explicitly and remove legacy helper modules.
- Update plugin metadata/version strings and extend regression tests for Android Gradle injection edge cases.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| plugin/src/utils/vendorChannels.ts | Removes legacy global vendor channel helpers (now handled via explicit inputs). |
| plugin/src/utils/config.ts | Removes legacy global config storage helpers (globalThis.__JPUSH_CONFIG__). |
| plugin/src/ios/appDelegate.ts | Wraps debug logging / JPUSHService.setDebugMode() with #if DEBUG. |
| plugin/src/index.ts | Aligns createRunOncePlugin version metadata to 1.2.4. |
| plugin/src/android/projectBuildGradle.ts | Inlines vendor-channel helpers and tightens types for vendorChannels. |
| plugin/src/android/gradleProperties.ts | Refactors to accept vendorChannels explicitly and centralizes logic in applyAndroidGradleProperties. |
| plugin/src/android/appBuildGradle.ts | Hardens Gradle injection (no versionName anchor dependency), merges placeholders via +=, and removes legacy generated sections. |
| plugin/tests/nativeIosAppDelegate.test.ts | Adds assertions for #if DEBUG guarding. |
| plugin/tests/nativeAndroidMods.test.ts | Adds regression tests for manifestPlaceholders merge + missing/non-literal versionName. |
| plugin/tests/iosTransforms.test.ts | Removes reliance on legacy setConfig; adds #if DEBUG assertions. |
| plugin/tests/androidTransforms.test.ts | Updates transform tests to pass explicit inputs and reflect new placeholder injection behavior. |
| app.plugin.js | Updates header comment version to 1.2.4. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d1f6795 to
afa3629
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#if DEBUGcreateRunOncePluginmetadata with the published package versionReview Notes
Testing