fix: web purchases report SDK version 9.1.0 instead of the real one - #1910
Merged
Conversation
The Fastfile rewrites versions with a literal gsub that silently skips patterns matching nothing, so two entries had been no-ops: the browser packageVersion pattern used double quotes where the source uses single quotes, freezing the version web purchases report at 9.1.0, and the RNPaywalls podspec entry referenced a dependency it never declared. Adds a test asserting every pattern still matches at the current version. Co-authored-by: Cursor <cursoragent@cursor.com>
The previous parser read the hashes line by line, so it silently skipped the multi-line yarn.lock entry and left its patterns unchecked. It also compared each file against a version read from one of those same files, which made two assertions unfalsifiable. Patterns now capture whichever version their file holds and are required to agree with each other, yarn.lock is excluded explicitly because the lane regenerates it, and a mismatch between parsed and declared entries fails instead of quietly reducing coverage. Co-authored-by: Cursor <cursoragent@cursor.com>
Nothing depends on react-native-purchases outside peerDependencies, so yarn never records a versioned descriptor for it and this pattern could never match. The two lanes that use this hash do not run yarn install, so the remaining lockfile patterns are load-bearing and the test now checks them instead of skipping the entry. Co-authored-by: Cursor <cursoragent@cursor.com>
ajpallares
marked this pull request as ready for review
August 20, 2026 14:59
tonidero
approved these changes
Aug 20, 2026
tonidero
left a comment
Contributor
There was a problem hiding this comment.
Ohhh ouch 🤦 Thanks for fixing!
| files_to_update_phc_version = { | ||
| 'RNPurchases.podspec' => ['"PurchasesHybridCommon", \'{x}\''], | ||
| 'react-native-purchases-store-galaxy/android/build.gradle' => ['com.revenuecat.purchases:purchases-hybrid-common-store-galaxy:{x}'], | ||
| 'react-native-purchases-ui/RNPaywalls.podspec' => ['"PurchasesHybridCommon", \'{x}\'', '"PurchasesHybridCommonUI", \'{x}\''], |
Contributor
There was a problem hiding this comment.
I think at some point we might have been referencing the base PurchasesHybridCommon as well... But yeah, makes sense now!
ajpallares
enabled auto-merge (squash)
August 20, 2026 16:50
RCGitBot
added a commit
that referenced
this pull request
Aug 25, 2026
**This is an automatic release.** ## RevenueCat SDK ### ✨ New Features * feat(ads): ad reward tracking support (#1890) via Peter Porfy (@peterporfy) ### 📦 Dependency Updates * [AUTOMATIC BUMP] Updates purchases-hybrid-common to 18.32.1 (#1913) via RevenueCat Git Bot (@RCGitBot) * [Android 10.18.1](https://github.com/RevenueCat/purchases-android/releases/tag/10.18.1) * [Android 10.18.0](https://github.com/RevenueCat/purchases-android/releases/tag/10.18.0) * [iOS 5.85.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.85.0) * [Web 1.53.1](https://github.com/RevenueCat/purchases-js/releases/tag/1.53.1) * [Web 1.53.0](https://github.com/RevenueCat/purchases-js/releases/tag/1.53.0) ## RevenueCatUI SDK ### 🐞 Bugfixes * [EXTERNAL] Fix RN interop mode crash for Paywalls (#1916) via @TheRogue76 (#1917) via Cesar de la Vega (@vegaro) ### 🔄 Other Changes * Update sdks-common-config orb to v4.6.1 (#1914) via Antonio Pallares (@ajpallares) * Match native SDKs text for simulated store purchase alert (#1724) via Antonio Pallares (@ajpallares) * fix: web purchases report SDK version 9.1.0 instead of the real one (#1910) via Antonio Pallares (@ajpallares) * Bump js-yaml from 4.3.0 to 4.3.1 in /examples/adsTester (#1911) via dependabot[bot] (@dependabot[bot]) * feat: rewarded ad sample app (#1897) via Peter Porfy (@peterporfy) * chore(ios): drop dead Swift stubs and namespace React header imports (#1906) via Antonio Pallares (@ajpallares) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > This PR is mostly version and changelog updates; functional risk comes from the bundled prior releases (native SDK bumps, ads tracking, paywall interop fix), not from new logic in this diff. > > **Overview** > **Automatic release** that ships **10.8.0** by aligning version constants and package metadata across the monorepo (`react-native-purchases`, `react-native-purchases-ui`, `react-native-purchases-store-galaxy`), Android/iOS plugin version strings, web `packageVersion`, docs redirect, `VERSIONS.md`, and lockfile/example deps. > > The changelog for this release (not new code in this diff) highlights **ad reward tracking** (#1890), **purchases-hybrid-common 18.32.1** (Android 10.18.x, iOS 5.85.0, Web 1.53.x), a **RevenueCatUI** fix for Paywalls crashing in RN interop mode (#1916/#1917), plus fixes for web SDK version reporting (#1910) and related sample/CI/iOS cleanup entries. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 53ae8fd. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: RevenueCat CI <dev+ci@revenuecat.com>
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.
Motivation
Fastlane's
replace_inrewrites versions with a literalgsuband silently skips any pattern that matches nothing, so a wrong pattern never fails a release. Three entries were dead this way — most importantly the browserpackageVersionone, which used double quotes where the source uses single quotes. Web purchases have reportedflavorVersion: 9.1.0to the backend ever since #1330 introduced it.Summary
PurchasesHybridCommoninRNPaywalls.podspec, which only declares the UI pod, and thereact-native-purchases@lockfile key, which would need a non-peer dependant to exist.Notes
Found while reviewing #1907. Unrelated to SwiftPM, so split out.
Note
Low Risk
Release-script pattern and version-string fixes plus a regression test; no auth, billing, or purchase-flow logic changes.
Overview
Web purchases were reporting
flavorVersion: 9.1.0because Fastlane’sreplace_insilently skipped a quote-mismatched pattern forpackageVersioninnativeModule.ts. That pattern now uses single quotes, and the constant is set to the current10.7.2.Also drops two other never-matching bump patterns (
PurchasesHybridCommoninRNPaywalls.podspecand ayarn.lockreact-native-purchases@key) and adds a test that parses both Fastfile hashes so every pattern must match and agree on one version.Reviewed by Cursor Bugbot for commit 9482f83. Bugbot is set up for automated code reviews on this repo. Configure here.