Skip to content

fix(expo): make the config plugin idempotent#752

Merged
dylancom merged 1 commit intoinvertase:mainfrom
DoctorJohn:make-the-expo-plugin-idempotent
May 23, 2025
Merged

fix(expo): make the config plugin idempotent#752
dylancom merged 1 commit intoinvertase:mainfrom
DoctorJohn:make-the-expo-plugin-idempotent

Conversation

@DoctorJohn
Copy link
Contributor

Description

This PR makes the expo config plugin idempotent (i.e., npx expo prebuild can now be run idempotent without duplicate values ending up in any manifests).

Related issues

Checklist

  • I read the Contributor Guide
    and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
  • My change includes tests;
    • e2e tests added or updated in __tests__e2e__
    • jest tests added or updated in __tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan

  • I added new snapshot tests and carefully reviewed them
  • While the issue prompting this PR was focused on Android, I also added a test making sure the plugin behaves as expected regarding Info.plist modifications

🔥

@docs-page
Copy link

docs-page bot commented May 23, 2025

To view this pull requests documentation preview, visit the following URL:

docs.page/invertase/react-native-google-mobile-ads~752

Documentation is deployed and generated using docs.page.

@codecov
Copy link

codecov bot commented May 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.24%. Comparing base (a34c7ba) to head (56372e3).
Report is 145 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #752      +/-   ##
==========================================
- Coverage   43.72%   37.24%   -6.48%     
==========================================
  Files          30       36       +6     
  Lines         549      658     +109     
  Branches      151      169      +18     
==========================================
+ Hits          240      245       +5     
- Misses        309      413     +104     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

'android:value',
);

if (!existingItem) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it exists, we should update it with the latest value i think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about it for a little, and yes, overwriting values put into the manifest by hand or other config plugins sounds reasonable. I updated the PR.

@DoctorJohn DoctorJohn force-pushed the make-the-expo-plugin-idempotent branch from 96b27a0 to 56372e3 Compare May 23, 2025 16:17
@dylancom dylancom merged commit 67b30da into invertase:main May 23, 2025
10 of 11 checks passed
@mikehardy
Copy link
Collaborator

🎉 This PR is included in version 15.3.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐛] Prebuilds are polluting AndroidManifest with extra meta-data

3 participants