Skip to content

fix: web purchases report SDK version 9.1.0 instead of the real one - #1910

Merged
ajpallares merged 4 commits into
mainfrom
pallares/phc-bump-pattern-guard
Aug 20, 2026
Merged

fix: web purchases report SDK version 9.1.0 instead of the real one#1910
ajpallares merged 4 commits into
mainfrom
pallares/phc-bump-pattern-guard

Conversation

@ajpallares

@ajpallares ajpallares commented Aug 20, 2026

Copy link
Copy Markdown
Member

Motivation

Fastlane's replace_in rewrites versions with a literal gsub and silently skips any pattern that matches nothing, so a wrong pattern never fails a release. Three entries were dead this way — most importantly the browser packageVersion one, which used double quotes where the source uses single quotes. Web purchases have reported flavorVersion: 9.1.0 to the backend ever since #1330 introduced it.

Summary

  • Fix that pattern's quoting and set the browser version to the current release.
  • Drop two patterns that can never match: PurchasesHybridCommon in RNPaywalls.podspec, which only declares the UI pod, and the react-native-purchases@ lockfile key, which would need a non-peer dependant to exist.
  • Add a test requiring every pattern in both hashes to match its file and to agree on the version.

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.0 because Fastlane’s replace_in silently skipped a quote-mismatched pattern for packageVersion in nativeModule.ts. That pattern now uses single quotes, and the constant is set to the current 10.7.2.

Also drops two other never-matching bump patterns (PurchasesHybridCommon in RNPaywalls.podspec and a yarn.lock react-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.

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>
@ajpallares ajpallares added the pr:fix A bug fix label Aug 20, 2026
ajpallares and others added 2 commits August 20, 2026 13:56
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
ajpallares marked this pull request as ready for review August 20, 2026 14:59
@ajpallares
ajpallares requested a review from a team as a code owner August 20, 2026 14:59
@ajpallares ajpallares added pr:other A code change that improves performance and removed pr:fix A bug fix labels Aug 20, 2026
@ajpallares
ajpallares requested a review from a team August 20, 2026 14:59

@AlvaroBrey AlvaroBrey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great catch!

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ohhh ouch 🤦 Thanks for fixing!

Comment thread fastlane/Fastfile
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}\''],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think at some point we might have been referencing the base PurchasesHybridCommon as well... But yeah, makes sense now!

@ajpallares
ajpallares enabled auto-merge (squash) August 20, 2026 16:50
@ajpallares
ajpallares merged commit 2390d2d into main Aug 20, 2026
12 checks passed
@ajpallares
ajpallares deleted the pallares/phc-bump-pattern-guard branch August 20, 2026 17:01
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:other A code change that improves performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants