From b0ab4d8ec19b6fab88b880b4796b9cb1afcfedaf Mon Sep 17 00:00:00 2001 From: cb-haripriyan <67890824+cb-haripriyan@users.noreply.github.com> Date: Tue, 12 Dec 2023 17:52:26 +0530 Subject: [PATCH 01/28] chore: updates release yml (#171) * chore: updates release yml * chore: fixes package manager version --- .github/workflows/build.yml | 2 ++ .github/workflows/release.yml | 8 +++++++- package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bc3525f..1bb9a1e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,6 +10,8 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 + - name: Enable Corepack before setting up Node + run: corepack enable - name: Cache node modules id: cache-nodemodules uses: actions/cache@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 230cd34..58a1a91 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,10 @@ on: branches: - master - next + paths-ignore: + - 'CHANGELOG.md' + - 'package-lock.json' + - 'package.json' jobs: release: runs-on: ubuntu-latest @@ -13,6 +17,8 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 + - name: Enable Corepack before setting up Node + run: corepack enable - name: Initialize Git Config run: | git config user.name "${GITHUB_ACTOR}" @@ -49,7 +55,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Release package if: github.ref == 'refs/heads/master' - run: npm run release -- --ci -VV + run: npm run release -- --ci --dry-run -VV env: NPM_TOKEN: ${{ secrets.RN_SDK_NPM_WRITE_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index b0b67fd..7cfa410 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "engines": { "node": ">= 16.0.0" }, - "packageManager": "^yarn@1.22.15", + "packageManager": "yarn@1.22.19", "jest": { "preset": "react-native", "modulePathIgnorePatterns": [ From 0059f158f5a0f14df777b79844a3f2b2f65fcc65 Mon Sep 17 00:00:00 2001 From: Pravinraj Mohan <89197122+cb-pravinrajmohan@users.noreply.github.com> Date: Tue, 12 Dec 2023 18:32:21 +0530 Subject: [PATCH 02/28] fix: multiple callback issue (#172) --- .github/workflows/release.yml | 2 +- android/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 58a1a91..c774d51 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,7 +55,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Release package if: github.ref == 'refs/heads/master' - run: npm run release -- --ci --dry-run -VV + run: npm run release -- --ci -VV env: NPM_TOKEN: ${{ secrets.RN_SDK_NPM_WRITE_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/android/build.gradle b/android/build.gradle index 82b8e88..0df5222 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -84,7 +84,7 @@ dependencies { //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - implementation 'com.chargebee:chargebee-android:1.2.0' + implementation 'com.chargebee:chargebee-android:1.2.1' implementation 'com.android.billingclient:billing-ktx:5.2.1' implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0")) } From 96463bd16ea0ac6c3a17e9f773c41daea224b36d Mon Sep 17 00:00:00 2001 From: cb-anurags Date: Tue, 12 Dec 2023 13:04:53 +0000 Subject: [PATCH 03/28] chore: release 2.4.5 [skip ci] --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc288d6..5af3bc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ +## [2.4.5](https://github.com/chargebee/chargebee-react-native/compare/v2.4.4...v2.4.5) (2023-12-12) + + +### Bug Fixes + +* multiple callback issue ([#172](https://github.com/chargebee/chargebee-react-native/issues/172)) ([0059f15](https://github.com/chargebee/chargebee-react-native/commit/0059f158f5a0f14df777b79844a3f2b2f65fcc65)) + ## [2.4.4](https://github.com/chargebee/chargebee-react-native/compare/v2.4.3...v2.4.4) (2023-11-10) ## [2.4.3](https://github.com/chargebee/chargebee-react-native/compare/v2.4.2...v2.4.3) (2023-10-09) diff --git a/package-lock.json b/package-lock.json index 49e2405..aab3b07 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@chargebee/react-native-chargebee", - "version": "2.4.4", + "version": "2.4.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@chargebee/react-native-chargebee", - "version": "2.4.4", + "version": "2.4.5", "license": "MIT", "devDependencies": { "@commitlint/config-conventional": "^17.0.2", diff --git a/package.json b/package.json index 7cfa410..708cf8d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chargebee/react-native-chargebee", - "version": "2.4.4", + "version": "2.4.5", "description": "Package for Chargebee In-App Purchases", "main": "lib/commonjs/index", "module": "lib/module/index", From ee552de4076a6e329d4d4375512504cbde555f51 Mon Sep 17 00:00:00 2001 From: cb-pravin Date: Thu, 28 Dec 2023 13:15:49 +0530 Subject: [PATCH 04/28] chore: remove duplicate declarations --- ios/CBEntitlement+Extensions.swift | 2 -- 1 file changed, 2 deletions(-) diff --git a/ios/CBEntitlement+Extensions.swift b/ios/CBEntitlement+Extensions.swift index 9ce6837..8d582c5 100644 --- a/ios/CBEntitlement+Extensions.swift +++ b/ios/CBEntitlement+Extensions.swift @@ -13,8 +13,6 @@ extension Entitlement { var entitlement: [String: Any] = [:] entitlement["subscriptionId"] = self.subscriptionID entitlement["featureId"] = self.featureID - entitlement["subscriptionId"] = self.subscriptionID - entitlement["featureId"] = self.featureID entitlement["featureName"] = self.featureName entitlement["featureDescription"] = self.featureDescription entitlement["featureType"] = self.featureType From f06cdc374ff8b198748a4ae1fd3e6195041036ef Mon Sep 17 00:00:00 2001 From: cb-pravin Date: Fri, 5 Jan 2024 12:58:03 +0530 Subject: [PATCH 05/28] chore: update pkg version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 708cf8d..6f73706 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chargebee/react-native-chargebee", - "version": "2.4.5", + "version": "2.4.6", "description": "Package for Chargebee In-App Purchases", "main": "lib/commonjs/index", "module": "lib/module/index", From 3bc705c4665d47cc4de3d43252e196fd8ac182f5 Mon Sep 17 00:00:00 2001 From: cb-pravin Date: Fri, 5 Jan 2024 15:58:50 +0530 Subject: [PATCH 06/28] Revert "chore: update pkg version" This reverts commit f06cdc374ff8b198748a4ae1fd3e6195041036ef. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6f73706..708cf8d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chargebee/react-native-chargebee", - "version": "2.4.6", + "version": "2.4.5", "description": "Package for Chargebee In-App Purchases", "main": "lib/commonjs/index", "module": "lib/module/index", From 5ff22a5f00dfff1693f881390cf29e45bbcae3bc Mon Sep 17 00:00:00 2001 From: cb-pravinrajmohan Date: Fri, 5 Jan 2024 12:12:12 +0000 Subject: [PATCH 07/28] chore: release 2.4.6 [skip ci] --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5af3bc2..b29ef19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ +## [2.4.6](https://github.com/chargebee/chargebee-react-native/compare/v2.4.5...v2.4.6) (2024-01-05) + + +### Reverts + +* Revert "chore: update pkg version" ([3bc705c](https://github.com/chargebee/chargebee-react-native/commit/3bc705c4665d47cc4de3d43252e196fd8ac182f5)) + ## [2.4.5](https://github.com/chargebee/chargebee-react-native/compare/v2.4.4...v2.4.5) (2023-12-12) diff --git a/package-lock.json b/package-lock.json index aab3b07..59f1cb2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@chargebee/react-native-chargebee", - "version": "2.4.5", + "version": "2.4.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@chargebee/react-native-chargebee", - "version": "2.4.5", + "version": "2.4.6", "license": "MIT", "devDependencies": { "@commitlint/config-conventional": "^17.0.2", diff --git a/package.json b/package.json index 708cf8d..6f73706 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chargebee/react-native-chargebee", - "version": "2.4.5", + "version": "2.4.6", "description": "Package for Chargebee In-App Purchases", "main": "lib/commonjs/index", "module": "lib/module/index", From 411b066a904f675047b9a0a2a3b761eb824f93c2 Mon Sep 17 00:00:00 2001 From: cb-palanim Date: Fri, 19 Jul 2024 22:44:35 +0530 Subject: [PATCH 08/28] feat: updating billing client from 5 to 6 Google Billing client 5.2.1 to 6.2.1 --- android/build.gradle | 4 ++-- android/gradle.properties | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 0df5222..662308a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -84,8 +84,8 @@ dependencies { //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - implementation 'com.chargebee:chargebee-android:1.2.1' - implementation 'com.android.billingclient:billing-ktx:5.2.1' + implementation 'com.chargebee:chargebee-android:1.2.2' + implementation 'com.android.billingclient:billing-ktx:6.2.1' implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0")) } diff --git a/android/gradle.properties b/android/gradle.properties index 2fcaaa7..02a5371 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,4 +1,4 @@ -ChargebeeReactNative_kotlinVersion=1.7.0 +ChargebeeReactNative_kotlinVersion=1.9.0 ChargebeeReactNative_minSdkVersion=21 ChargebeeReactNative_targetSdkVersion=31 ChargebeeReactNative_compileSdkVersion=31 diff --git a/package-lock.json b/package-lock.json index 59f1cb2..ba9cc7d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@chargebee/react-native-chargebee", - "version": "2.4.6", + "version": "2.4.7", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@chargebee/react-native-chargebee", - "version": "2.4.6", + "version": "2.4.7", "license": "MIT", "devDependencies": { "@commitlint/config-conventional": "^17.0.2", diff --git a/package.json b/package.json index 6f73706..00ff018 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chargebee/react-native-chargebee", - "version": "2.4.6", + "version": "2.4.7", "description": "Package for Chargebee In-App Purchases", "main": "lib/commonjs/index", "module": "lib/module/index", From 19d6f4c17bd6fcf9f25116a1d6a2c5681d2fe338 Mon Sep 17 00:00:00 2001 From: cb-palanim Date: Fri, 19 Jul 2024 23:00:00 +0530 Subject: [PATCH 09/28] feat: discard package changes --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ba9cc7d..59f1cb2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@chargebee/react-native-chargebee", - "version": "2.4.7", + "version": "2.4.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@chargebee/react-native-chargebee", - "version": "2.4.7", + "version": "2.4.6", "license": "MIT", "devDependencies": { "@commitlint/config-conventional": "^17.0.2", diff --git a/package.json b/package.json index 00ff018..6f73706 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chargebee/react-native-chargebee", - "version": "2.4.7", + "version": "2.4.6", "description": "Package for Chargebee In-App Purchases", "main": "lib/commonjs/index", "module": "lib/module/index", From 762c988da9093c621987e2e14df64fd8e4c72658 Mon Sep 17 00:00:00 2001 From: cb-palanim Date: Sat, 20 Jul 2024 11:54:04 +0530 Subject: [PATCH 10/28] feat: update secret name --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c774d51..e9dbcec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,20 +44,20 @@ jobs: npm config set //registry.npmjs.com/:_authToken=$NPM_TOKEN npm config list env: - NPM_TOKEN: ${{ secrets.RN_SDK_NPM_WRITE_TOKEN }} + NPM_TOKEN: ${{ secrets.RN_SDK_NPM_WRITE_TOKEN_1 }} - name: Yarn Tests run: yarn test - name: Pre-Release package if: github.ref == 'refs/heads/next' run: npm run release -- --ci --preRelease=beta -VV env: - NPM_TOKEN: ${{ secrets.RN_SDK_NPM_WRITE_TOKEN }} + NPM_TOKEN: ${{ secrets.RN_SDK_NPM_WRITE_TOKEN_1 }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Release package if: github.ref == 'refs/heads/master' run: npm run release -- --ci -VV env: - NPM_TOKEN: ${{ secrets.RN_SDK_NPM_WRITE_TOKEN }} + NPM_TOKEN: ${{ secrets.RN_SDK_NPM_WRITE_TOKEN_1 }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create PR for package.json and changelogs run: | From 7882016d8f1aee65f6cc2c1f50c4cabf627b8192 Mon Sep 17 00:00:00 2001 From: cb-haripriyan Date: Sat, 20 Jul 2024 06:36:05 +0000 Subject: [PATCH 11/28] chore: release 2.5.0 [skip ci] --- CHANGELOG.md | 14 ++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b29ef19..2d8479a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ +# [2.5.0](https://github.com/chargebee/chargebee-react-native/compare/v2.4.5...v2.5.0) (2024-07-20) + + +### Features + +* discard package changes ([19d6f4c](https://github.com/chargebee/chargebee-react-native/commit/19d6f4c17bd6fcf9f25116a1d6a2c5681d2fe338)) +* update secret name ([762c988](https://github.com/chargebee/chargebee-react-native/commit/762c988da9093c621987e2e14df64fd8e4c72658)) +* updating billing client from 5 to 6 ([411b066](https://github.com/chargebee/chargebee-react-native/commit/411b066a904f675047b9a0a2a3b761eb824f93c2)) + + +### Reverts + +* Revert "chore: update pkg version" ([3bc705c](https://github.com/chargebee/chargebee-react-native/commit/3bc705c4665d47cc4de3d43252e196fd8ac182f5)) + ## [2.4.6](https://github.com/chargebee/chargebee-react-native/compare/v2.4.5...v2.4.6) (2024-01-05) diff --git a/package-lock.json b/package-lock.json index 59f1cb2..41dbf7a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@chargebee/react-native-chargebee", - "version": "2.4.6", + "version": "2.5.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@chargebee/react-native-chargebee", - "version": "2.4.6", + "version": "2.5.0", "license": "MIT", "devDependencies": { "@commitlint/config-conventional": "^17.0.2", diff --git a/package.json b/package.json index 6f73706..384ae94 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chargebee/react-native-chargebee", - "version": "2.4.6", + "version": "2.5.0", "description": "Package for Chargebee In-App Purchases", "main": "lib/commonjs/index", "module": "lib/module/index", From 5776237f7a8c440cd8477d7bee7b3ea324a436b3 Mon Sep 17 00:00:00 2001 From: Rohit Sharma Date: Thu, 27 Mar 2025 16:01:47 +0530 Subject: [PATCH 12/28] Secret scan workflow added for all the prs --- .github/workflows/secret.scan.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/workflows/secret.scan.yml diff --git a/.github/workflows/secret.scan.yml b/.github/workflows/secret.scan.yml new file mode 100644 index 0000000..bcdb1c0 --- /dev/null +++ b/.github/workflows/secret.scan.yml @@ -0,0 +1,10 @@ +name: CB Secret PR Scan + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + SecretScanning: + uses: chargebee/cb-secrets-scanner/.github/workflows/cb-secret-scan.yml@main + secrets: inherit From 0a6c4b62d8d9693b63eece1333293416e30a7f6a Mon Sep 17 00:00:00 2001 From: Rohit Sharma Date: Mon, 21 Apr 2025 10:01:21 +0530 Subject: [PATCH 13/28] workflow updated --- .github/workflows/secret.scan.yml | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/secret.scan.yml b/.github/workflows/secret.scan.yml index bcdb1c0..e08ac36 100644 --- a/.github/workflows/secret.scan.yml +++ b/.github/workflows/secret.scan.yml @@ -5,6 +5,28 @@ on: types: [opened, synchronize, reopened] jobs: - SecretScanning: - uses: chargebee/cb-secrets-scanner/.github/workflows/cb-secret-scan.yml@main - secrets: inherit + scan: + name: Secret PR Scan + runs-on: ubuntu-latest + steps: + - name: Get the file name changed in the PR + id: pr_files + run: | + changed_files=$(curl -s -H "Authorization: token ${{ + secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files | jq -r '.[].filename') + echo "Changed files: $changed_files" + + echo "CHANGED_FILES<> $GITHUB_OUTPUT + + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: gitleaks/gitleaks-action@v2 + env: + GITLEAKS_ENABLE_UPLOAD_ARTIFACT: false + GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' + GITLEAKS_LICENSE: '${{ secrets.GITLEAKS_LICENSE }}' + GITLEAKS_ENABLE_SUMMARY: false From f4050da5def6fc433a41eadee6983a81ed172a07 Mon Sep 17 00:00:00 2001 From: Shrey Gupta Date: Mon, 23 Jun 2025 11:52:37 +0530 Subject: [PATCH 14/28] legacy message added --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 81e45cf..af1ada7 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +> [!WARNING] +> **Chargebee React Native SDK** is part of Chargebee's legacy Mobile Subscription Solution and will not include the latest enhancements. We recommend using Chargebee's new [Omnichannel Subscriptions](https://www.chargebee.com/docs/billing/2.0/mobile-subscriptions/omnichannel-subscription-overview) solution for improved reliability and unified mobile subscriptions experience. +If you are a new customer, or considering to migrate new solution, please reach out to support@chargebee.com or contact your Technical Success Manager (TSM) for guidance. + ![Latest Release](https://github.com/chargebee/chargebee-react-native/actions/workflows/release.yml/badge.svg?branch=master) Introduction From 1d55ee2350d05fb38000aec6fff0bd493bc4a6d7 Mon Sep 17 00:00:00 2001 From: Rohit Sharma Date: Thu, 17 Jul 2025 20:49:33 +0530 Subject: [PATCH 15/28] Upgraded billing lib & cb-android version --- android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 662308a..bbd28d5 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -84,8 +84,8 @@ dependencies { //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - implementation 'com.chargebee:chargebee-android:1.2.2' - implementation 'com.android.billingclient:billing-ktx:6.2.1' + implementation 'com.chargebee:chargebee-android:1.2.4' + implementation 'com.android.billingclient:billing-ktx:7.1.1' implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0")) } From 0830294a655e9374cfc0a510f0445cb1df875df4 Mon Sep 17 00:00:00 2001 From: Rohit Sharma Date: Thu, 17 Jul 2025 20:55:00 +0530 Subject: [PATCH 16/28] version upgraded --- android/gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/gradle.properties b/android/gradle.properties index 02a5371..102753b 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,4 +1,4 @@ -ChargebeeReactNative_kotlinVersion=1.9.0 +ChargebeeReactNative_kotlinVersion=1.10.0 ChargebeeReactNative_minSdkVersion=21 ChargebeeReactNative_targetSdkVersion=31 ChargebeeReactNative_compileSdkVersion=31 From 4491fd1be5733d38ecd6650c581e7f0afd0112c0 Mon Sep 17 00:00:00 2001 From: Rohit Sharma Date: Tue, 22 Jul 2025 16:39:11 +0530 Subject: [PATCH 17/28] updated cache action version in release workflow --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e9dbcec..6c2ce2f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" - name: Cache node modules id: cache-nodemodules - uses: actions/cache@v2 + uses: actions/cache@v4 env: cache-name: cache-node-modules with: From 2bb659fbdca3d276c00fc40d9569482be9ef1b29 Mon Sep 17 00:00:00 2001 From: Rohit Sharma Date: Tue, 22 Jul 2025 19:44:48 +0530 Subject: [PATCH 18/28] updated npm token --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6c2ce2f..3220f6b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,20 +44,20 @@ jobs: npm config set //registry.npmjs.com/:_authToken=$NPM_TOKEN npm config list env: - NPM_TOKEN: ${{ secrets.RN_SDK_NPM_WRITE_TOKEN_1 }} + NPM_TOKEN: ${{ secrets.RN_SDK_NPM_WRITE_TOKEN_2 }} - name: Yarn Tests run: yarn test - name: Pre-Release package if: github.ref == 'refs/heads/next' run: npm run release -- --ci --preRelease=beta -VV env: - NPM_TOKEN: ${{ secrets.RN_SDK_NPM_WRITE_TOKEN_1 }} + NPM_TOKEN: ${{ secrets.RN_SDK_NPM_WRITE_TOKEN_2 }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Release package if: github.ref == 'refs/heads/master' run: npm run release -- --ci -VV env: - NPM_TOKEN: ${{ secrets.RN_SDK_NPM_WRITE_TOKEN_1 }} + NPM_TOKEN: ${{ secrets.RN_SDK_NPM_WRITE_TOKEN_2 }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create PR for package.json and changelogs run: | From 990594fce2c35c255b8acc83d20768275bd58374 Mon Sep 17 00:00:00 2001 From: cb-haripriyan Date: Tue, 22 Jul 2025 15:13:48 +0000 Subject: [PATCH 19/28] chore: release 2.5.1 [skip ci] --- CHANGELOG.md | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d8479a..c2080e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ +## [2.5.1](https://github.com/chargebee/chargebee-react-native/compare/v2.5.0...v2.5.1) (2025-07-22) + # [2.5.0](https://github.com/chargebee/chargebee-react-native/compare/v2.4.5...v2.5.0) (2024-07-20) diff --git a/package-lock.json b/package-lock.json index 41dbf7a..f79747c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@chargebee/react-native-chargebee", - "version": "2.5.0", + "version": "2.5.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@chargebee/react-native-chargebee", - "version": "2.5.0", + "version": "2.5.1", "license": "MIT", "devDependencies": { "@commitlint/config-conventional": "^17.0.2", diff --git a/package.json b/package.json index 384ae94..950d0d8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chargebee/react-native-chargebee", - "version": "2.5.0", + "version": "2.5.1", "description": "Package for Chargebee In-App Purchases", "main": "lib/commonjs/index", "module": "lib/module/index", From ad40267bb1daa3aa93171c48029440640f2a8278 Mon Sep 17 00:00:00 2001 From: Rohit Sharma Date: Tue, 29 Jul 2025 17:13:08 +0530 Subject: [PATCH 20/28] updated kotlin version to 1.9.23 --- android/gradle.properties | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/android/gradle.properties b/android/gradle.properties index 102753b..a362338 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,4 +1,4 @@ -ChargebeeReactNative_kotlinVersion=1.10.0 +ChargebeeReactNative_kotlinVersion=1.9.23 ChargebeeReactNative_minSdkVersion=21 ChargebeeReactNative_targetSdkVersion=31 ChargebeeReactNative_compileSdkVersion=31 diff --git a/package.json b/package.json index 384ae94..af5a9a2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chargebee/react-native-chargebee", - "version": "2.5.0", + "version": "2.5.2", "description": "Package for Chargebee In-App Purchases", "main": "lib/commonjs/index", "module": "lib/module/index", From ba89e7147697cb8a12b91c5e5d0b2013ed2f9b7e Mon Sep 17 00:00:00 2001 From: cb-anomitromunshi <94455471+cb-anomitromunshi@users.noreply.github.com> Date: Fri, 13 Mar 2026 11:33:36 +0530 Subject: [PATCH 21/28] PR standardization --- .github/pull_request_template.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..e10d702 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,29 @@ +## CHANGELOG +REPLACE_ME_WITH_CHANGELOG + +## SUMMARY +REPLACE_ME_WITH_SUMMARY_OF_THE_CHANGES + +## FUNCTIONAL AUTOMATION CHANGES PR +- [ ] Yes + - If Yes, PR : +- [ ] No + - If No, Reason: + +## AUTOMATION TEST REPORT URL +REPLACE_ME_WITH_TEST_REPORT_URL + +## AREAS OF IMPACT +REPLACE_ME_WITH_AREAS_OF_IMPACT_OR_NA + +## TYPE OF CHANGE +- [ ] ๐Ÿž Bugfix +- [ ] ๐ŸŒŸ Feature +- [ ] โœจ Enhancement +- [ ] ๐Ÿงช Unit Test Cases +- [ ] ๐Ÿ“” Documentation +- [ ] โš™๏ธ Chore - Build Related / Configuration / Others + + +## DOCUMENTATION +REPLACE_ME_WITH_DOCUMENTATION_LINK_OR_NA \ No newline at end of file From 18191d0a29032bd28af637189f54f838de3e0152 Mon Sep 17 00:00:00 2001 From: cb-anomitromunshi <94455471+cb-anomitromunshi@users.noreply.github.com> Date: Fri, 13 Mar 2026 11:33:37 +0530 Subject: [PATCH 22/28] PR standardization --- .github/scripts/README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/scripts/README.md diff --git a/.github/scripts/README.md b/.github/scripts/README.md new file mode 100644 index 0000000..6a4a49f --- /dev/null +++ b/.github/scripts/README.md @@ -0,0 +1,31 @@ +# Scripts + +## Generate changelog + +Lists PRs merged into a branch (excludes "Parent branch sync" and bot-authored PRs). + +**Prerequisites:** `jq`, and GitHub credentials as env vars. + +### Set credentials (once per terminal) + +```bash +export GH_USERNAME=your-github-username +export GH_PAT=your-github-personal-access-token +``` + +### Commands + +From repo root: + +| What you want | Command | +|---------------|---------| +| PRs merged into **current branch** (last 30 days) | `./.github/scripts/generate-changelog.sh` | +| PRs merged into **master** (last 30 days) | `./.github/scripts/generate-changelog.sh master` | +| PRs merged into **master** since a date | `./.github/scripts/generate-changelog.sh master "merged:>=2025-01-01"` | + +### Arguments + +1. **Branch** (optional) โ€” default: current branch +2. **Date filter** (optional) โ€” default: last 30 days (e.g. `merged:>=2025-01-01`) + +Output includes a GitHub search URL to verify results. From 05c5d5646abb8a27af43bb8970aeb8cd5f8b96b2 Mon Sep 17 00:00:00 2001 From: cb-anomitromunshi <94455471+cb-anomitromunshi@users.noreply.github.com> Date: Fri, 13 Mar 2026 11:33:39 +0530 Subject: [PATCH 23/28] PR standardization --- .github/scripts/generate-changelog.sh | 84 +++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 .github/scripts/generate-changelog.sh diff --git a/.github/scripts/generate-changelog.sh b/.github/scripts/generate-changelog.sh new file mode 100644 index 0000000..78b3aa7 --- /dev/null +++ b/.github/scripts/generate-changelog.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +set -e + +# Check required environment variables +if [[ -z "$GH_USERNAME" ]]; then + echo "โŒ Error: Environment variable GH_USERNAME not found" + exit 1 +fi + +if [[ -z "$GH_PAT" ]]; then + echo "โŒ Error: Environment variable GH_PAT not found" + exit 1 +fi + +# Optional: Branch name (defaults to current branch if not provided) +SOURCE_BRANCH="${1:-$(git branch --show-current)}" +# Optional: Date filter (defaults to last 30 days if not provided) +DATE_FILTER="${2:-merged:>=$(date -u -v-30d +%Y-%m-%d 2>/dev/null || date -u -d '30 days ago' +%Y-%m-%d)}" + +# Repo is set per-repo when this file is pushed (placeholder replaced by upload script) +REPO="chargebee/chargebee-react-native" + +echo "๐Ÿ” Searching for PRs merged into $SOURCE_BRANCH..." + +# GitHub API call with error handling +HTTP_STATUS=$(curl -s -w "%{http_code}" -G -u "$GH_USERNAME:$GH_PAT" \ + "https://api.github.com/search/issues" \ + --data-urlencode "q=NOT \"Parent branch sync\" in:title is:pr repo:$REPO is:merged base:$SOURCE_BRANCH merged:$DATE_FILTER -author:app/distributed-gitflow-app" \ + -o /tmp/curl_output.json \ + 2>/tmp/curl_error.log) + +CURL_EXIT_CODE=$? + +echo "๐ŸŒ API call status: $HTTP_STATUS" + +if [ $CURL_EXIT_CODE -ne 0 ]; then + echo "โŒ Error: curl request failed with exit code $CURL_EXIT_CODE" + echo "Error details: $(cat /tmp/curl_error.log)" + exit 1 +fi + +if [ "$HTTP_STATUS" -ne 200 ]; then + echo "โŒ Error: API returned HTTP status $HTTP_STATUS" + echo "Response: $(cat /tmp/curl_output.json)" + exit 1 +fi + +PR_LIST_RESPONSE=$(cat /tmp/curl_output.json) + +# Clean invalid control characters from JSON response +if ! echo "$PR_LIST_RESPONSE" | jq . >/dev/null 2>&1; then + echo "โš ๏ธ Invalid JSON detected โ€” cleaning control characters..." + PR_LIST_RESPONSE=$(echo "$PR_LIST_RESPONSE" | tr -d '\000-\037') + + if ! echo "$PR_LIST_RESPONSE" | jq . >/dev/null 2>&1; then + echo "$PR_LIST_RESPONSE" > /tmp/invalid_json_debug.json + echo "โŒ Error: JSON is still invalid after cleaning control characters" + echo "๐Ÿ’ก Use 'cat /tmp/invalid_json_debug.json' to inspect the JSON" + exit 1 + fi +fi + +PR_MERGED_COUNT=$(echo "$PR_LIST_RESPONSE" | jq '.total_count') + +# Color codes +GREEN='\033[0;32m' +YELLOW='\033[0;33m' +NOCOLOR='\033[0m' + +echo "==============================================================================" +echo -e "Found ${GREEN}$PR_MERGED_COUNT${NOCOLOR} PR(s) merged into $SOURCE_BRANCH (filter: $DATE_FILTER)" +echo "==============================================================================" +echo -e "## ${GREEN}CHANGELOG${NOCOLOR}" +echo "$PR_LIST_RESPONSE" | jq -r '.items[] | (.title) + " (" + (.user.login) + ") [#" + (.number | tostring) + "]"' | sort +printf "\n" +echo "==============================================================================" +echo -e "${GREEN}GitHub Search URL (to verify, if required)${NOCOLOR}" +BRANCH_ENCODED=$(echo "$SOURCE_BRANCH" | sed 's/ /%20/g') +echo "https://github.com/$REPO/pulls?q=NOT+%22Parent+branch+sync%22+in%3Atitle+is%3Apr+is%3Amerged+base%3A$BRANCH_ENCODED+merged%3A$DATE_FILTER+-author%3Aapp%2Fdistributed-gitflow-app" +echo "==============================================================================" + +# Clean up temporary files +rm -f /tmp/curl_output.json /tmp/curl_error.log From a4a401f8ae77865939426c40e679727b1a2ff2ae Mon Sep 17 00:00:00 2001 From: cb-anomitromunshi <94455471+cb-anomitromunshi@users.noreply.github.com> Date: Fri, 13 Mar 2026 11:33:40 +0530 Subject: [PATCH 24/28] PR standardization --- .github/workflows/pr-lint.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/pr-lint.yml diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml new file mode 100644 index 0000000..42e00e0 --- /dev/null +++ b/.github/workflows/pr-lint.yml @@ -0,0 +1,13 @@ +name: Common PR Lint + +on: + pull_request: + branches: [master, main,staging, dev,develop] + types: [ready_for_review, reopened, review_requested, review_request_removed, opened, edited] + +jobs: + pr-lint: + name: Common PR Lint Checks + if: github.base_ref == 'main' || github.base_ref == 'master' + uses: chargebee/cb-cicd-pipelines/.github/workflows/pr-lint.yml@main + secrets: inherit From 388d8a724a6132fb9ecfa392ed4b7db402e8c568 Mon Sep 17 00:00:00 2001 From: cb-anomitromunshi <94455471+cb-anomitromunshi@users.noreply.github.com> Date: Fri, 13 Mar 2026 11:33:42 +0530 Subject: [PATCH 25/28] PR standardization --- .github/workflows/pr-size-check.yml | 82 +++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 .github/workflows/pr-size-check.yml diff --git a/.github/workflows/pr-size-check.yml b/.github/workflows/pr-size-check.yml new file mode 100644 index 0000000..106e8e3 --- /dev/null +++ b/.github/workflows/pr-size-check.yml @@ -0,0 +1,82 @@ +name: PR Size Check +on: + pull_request: + types: [ reopened, opened, synchronize, edited, labeled, unlabeled ] + branches: + - develop/** + - dev + + +jobs: + pre-approval-comment: + name: Announce pending bypass approval + if: ${{ github.event.pull_request.user.login != 'distributed-gitflow-app[bot]' && + !startsWith(github.head_ref, 'revert-') && + !startsWith(github.head_ref, 'parent-branch-sync/') && + contains(github.event.pull_request.labels.*.name, 'pr-size-exception') }} + runs-on: graviton-small-runner + permissions: + contents: read + pull-requests: write + steps: + - uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const owner = context.repo.owner; + const repo = context.repo.repo; + const issue_number = context.payload.pull_request.number; + + const marker = ''; + const pending = `${marker} + ๐Ÿ›‘ The \`pr-size-exception\` label is present. This workflow is **waiting for approvals** from the **[cb-Billing-CAB-reviewers](https://github.com/orgs/chargebee/teams/cb-billing-cab-approvers)**.`; + + // create a new comment when the workflow runs + await github.rest.issues.createComment({ owner, repo, issue_number, body: pending }); + pr-size-check: + name: Check PR size + if: ${{ (github.base_ref == 'dev' || startsWith(github.base_ref, 'develop/')) && github.event.pull_request.user.login != 'distributed-gitflow-app[bot]' && !startsWith(github.head_ref, 'revert-') && !startsWith(github.head_ref, 'parent-branch-sync/') }} + runs-on: graviton-small-runner + permissions: + contents: read + pull-requests: write + id-token: write + env: + BYPASS_LABEL: pr-size-exception + environment: ${{ contains(github.event.pull_request.labels.*.name, 'pr-size-exception') && 'cb-billing-reviewers' || '' }} + steps: + - uses: chargebee/cb-cicd-pipelines/.github/actions/pr-size-check@v4.20.3 + if: ${{ !contains(github.event.pull_request.labels.*.name, env.BYPASS_LABEL) }} + with: + githubToken: ${{ secrets.GITHUB_TOKEN }} + errorSize: 250 + warningSize: 200 + excludePaths: | + .github/** + .cursor/** + + + - name: Ensure required check passes when bypassed + if: ${{ contains(github.event.pull_request.labels.*.name, env.BYPASS_LABEL) }} + run: echo "Bypass active โ€” marking job successful." + + - name: Configure OIDC authentication + if: ${{ contains(github.event.pull_request.labels.*.name, env.BYPASS_LABEL) }} + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: arn:aws:iam::127322177288:role/OIDC_S3 + role-session-name: GithubActionsSession + role-duration-seconds: 900 + aws-region: us-east-1 + + - name: Record bypass approval to S3 + if: ${{ contains(github.event.pull_request.labels.*.name, env.BYPASS_LABEL) }} + run: | + REPO="${{ github.repository }}" + PR_LINK="https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}" + DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ)" + WF_ID="${{ github.run_id }}" + S3_KEY="${REPO}/datas/${WF_ID}.json" + printf '{"repo":"%s","date":"%s","pr_link":"%s","wf_id":"%s"}\n' "$REPO" "$DATE" "$PR_LINK" "$WF_ID" | \ + aws s3 cp - "s3://prsizebypassdata/${S3_KEY}" --content-type application/json + echo "Recorded to s3://prsizebypassdata/${S3_KEY}" From eeb7a74561dba802c3b78c1efb9bdd051ffec278 Mon Sep 17 00:00:00 2001 From: cb-anomitromunshi <94455471+cb-anomitromunshi@users.noreply.github.com> Date: Fri, 13 Mar 2026 14:54:30 +0530 Subject: [PATCH 26/28] Update PR size check to target master branch --- .github/workflows/pr-size-check.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-size-check.yml b/.github/workflows/pr-size-check.yml index 106e8e3..0fef5e8 100644 --- a/.github/workflows/pr-size-check.yml +++ b/.github/workflows/pr-size-check.yml @@ -3,8 +3,7 @@ on: pull_request: types: [ reopened, opened, synchronize, edited, labeled, unlabeled ] branches: - - develop/** - - dev + - master jobs: @@ -35,7 +34,7 @@ jobs: await github.rest.issues.createComment({ owner, repo, issue_number, body: pending }); pr-size-check: name: Check PR size - if: ${{ (github.base_ref == 'dev' || startsWith(github.base_ref, 'develop/')) && github.event.pull_request.user.login != 'distributed-gitflow-app[bot]' && !startsWith(github.head_ref, 'revert-') && !startsWith(github.head_ref, 'parent-branch-sync/') }} + if: ${{ (github.base_ref == 'master') && github.event.pull_request.user.login != 'distributed-gitflow-app[bot]' && !startsWith(github.head_ref, 'revert-') && !startsWith(github.head_ref, 'parent-branch-sync/') }} runs-on: graviton-small-runner permissions: contents: read From 39097bbef8b02f984c9f4f8bfb7e62e70cc28d77 Mon Sep 17 00:00:00 2001 From: cb-jit-bhuin Date: Wed, 5 Aug 2026 12:01:05 +0530 Subject: [PATCH 27/28] chore: use frozen lockfile for CI dependency installs Replace bare `yarn install` with `yarn install --frozen-lockfile` in the build and release workflows so CI installs exactly what the committed yarn.lock specifies. Also key the node_modules cache off yarn.lock instead of package-lock.json. The install step is guarded by a cache-hit check, and the old key hashed a lockfile that yarn never writes to, so dependency changes did not invalidate the cache and the install step was skipped. Co-authored-by: Cursor --- .github/workflows/build.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1bb9a1e..0275da8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,14 +19,14 @@ jobs: cache-name: cache-node-modules with: path: node_modules - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }} restore-keys: | ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- ${{ runner.os }}- - name: Install dependencies if: steps.cache-nodemodules.outputs.cache-hit != 'true' - run: yarn install + run: yarn install --frozen-lockfile - name: Linter run: yarn run eslint - name: Yarn Tests diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3220f6b..53a3539 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,14 +30,14 @@ jobs: cache-name: cache-node-modules with: path: node_modules - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }} restore-keys: | ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- ${{ runner.os }}- - name: Install dependencies if: steps.cache-nodemodules.outputs.cache-hit != 'true' - run: yarn install + run: yarn install --frozen-lockfile - name: Initialize NPM config run: | npm config set registry=https://registry.npmjs.com/ From 1a9177e35e802398268b76e74f4cb83d61db8a7b Mon Sep 17 00:00:00 2001 From: cb-jit-bhuin Date: Wed, 5 Aug 2026 12:30:06 +0530 Subject: [PATCH 28/28] ci: bump actions/cache to v4 in build workflow GitHub auto-fails jobs using actions/cache@v2, so the build job aborted during setup before reaching the install step. release.yml already uses v4; this brings build.yml in line so the frozen-lockfile install is actually exercised. Co-authored-by: Cursor --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0275da8..50fab53 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ jobs: run: corepack enable - name: Cache node modules id: cache-nodemodules - uses: actions/cache@v2 + uses: actions/cache@v4 env: cache-name: cache-node-modules with: