Skip to content

Release v3.9.0#496

Open
Anush-Shand wants to merge 1 commit intomasterfrom
develop
Open

Release v3.9.0#496
Anush-Shand wants to merge 1 commit intomasterfrom
develop

Conversation

@Anush-Shand
Copy link
Contributor

@Anush-Shand Anush-Shand commented Feb 17, 2026

  • task(SDK-5520) - Release v3.9.0

Inaction and NestedObject support

  • task(SDK-5520) - Fixes a minor bump in nested object date ingestion

  • task(SDK-5520) - Fixes changelog date

https://wizrocket.atlassian.net/browse/SDK-5520

Summary by CodeRabbit

Release 3.9.0

  • New Features
    • Added support for nested objects and arrays within event and profile properties
    • Introduced server-side in-app notification support for actions triggered by inaction within specified timeframes
    • Upgraded CleverTap Android SDK to v7.8.0
    • Upgraded CleverTap iOS SDK to v7.5.0

* task(SDK-5520) - Release v3.9.0

Inaction and NestedObject support

* task(SDK-5520) - Fixes a minor bump in nested object date ingestion

* task(SDK-5520) - Fixes changelog date
@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

📝 Walkthrough

Walkthrough

This PR releases version 3.9.0 with support for nested objects in event and profile properties. It updates CleverTap Android SDK to 7.8.0 and iOS SDK to 7.5.0, adds native layer handling for nested Map and Array types, enhances recursive date conversion for nested structures, and introduces example app demonstrations of the nested properties feature.

Changes

Cohort / File(s) Summary
Release and Version Updates
CHANGELOG.md, package.json, android/build.gradle, clevertap-react-native.podspec, src/index.js
Updates version to 3.9.0 across all manifest files. Bumps CleverTap Android SDK from 7.7.1 to 7.8.0 and iOS SDK (podspec) from 7.4.2 to 7.5.0. Updates library version constant from 30801 to 30900.
Example App Nested Properties Feature
Example/app/App.js, Example/app/app-utils.js, Example/app/constants.js
Introduces UI actions and handler functions for testing nested properties: PROFILE_PUSH_WITH_NESTED_PROPERTIES, USER_LOGIN_WITH_NESTED_PROPERTIES, and RECORD_EVENT_WITH_NESTED_PROPERTIES. Adds corresponding helper functions that construct payloads with nested Address, Company, and Payment Details objects.
Native Layer Nested Object Support
android/src/main/java/com/clevertap/react/CleverTapModuleImpl.java
Extends ReadableMap property conversion to handle nested Map and Array types via CleverTapUtils.MapUtil utilities, enabling ingestion of nested objects in event and profile properties at the native layer.
Recursive Date Handling
src/index.js
Enhances convertDateToEpochInProperties to recursively traverse and convert Date values within nested objects and arrays, supporting deep nested structures.

Sequence Diagram(s)

sequenceDiagram
    participant App as Example App
    participant Bridge as React Native Bridge
    participant Native as Native Layer<br/>(CleverTapModuleImpl)
    participant SDK as CleverTap SDK

    App->>App: Build nested payload<br/>(set_userProfileWithNestedProperties)
    App->>Bridge: recordEvent('Product Purchased',<br/>eventProps with nested objs)
    Bridge->>Bridge: convertDateToEpochInProperties<br/>(recursive traversal)
    Bridge->>Native: Read ReadableMap<br/>(including nested Maps/Arrays)
    Native->>Native: Handle nested Map type<br/>via MapUtil.toMap()
    Native->>Native: Handle nested Array type<br/>via ArrayUtil.toArray()
    Native->>SDK: profileSet() / recordEvent()<br/>with nested objects
    SDK->>SDK: Process nested structure
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • task(SDK-5520) - Release v3.9.0 #494 — Direct v3.9.0 release PR with identical nested-object ingestion changes across native layers and example app
  • Release v3.7.0 #485 — Modifies CleverTapModuleImpl.java file similarly; implements DOB parsing logic changes in the same native conversion layer
  • Release 3.8.1 #491 — Updates version metadata files (package.json, podspec, version constants) for a parallel release or coordinated versioning change

Suggested reviewers

  • nishant-clevertap
  • CTLalit
  • piyush-kukadiya
  • darshanclevertap
  • Sonal-Kachare

Poem

🐰 Nested objects hop on through,
From JavaScript to Android too!
Maps and arrays, deep and wide,
Version 3.9.0, with pride!
Dates convert recursively bright,
React Native does it right! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Merge Conflict Detection ⚠️ Warning ❌ Merge conflicts detected (9 files):

⚔️ CHANGELOG.md (content)
⚔️ Example/app/App.js (content)
⚔️ Example/app/app-utils.js (content)
⚔️ Example/app/constants.js (content)
⚔️ android/build.gradle (content)
⚔️ android/src/main/java/com/clevertap/react/CleverTapModuleImpl.java (content)
⚔️ clevertap-react-native.podspec (content)
⚔️ package.json (content)
⚔️ src/index.js (content)

These conflicts must be resolved before merging into master.
Resolve conflicts locally and push changes to this branch.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Release v3.9.0' clearly and directly summarizes the main change - a release of version 3.9.0 of the library.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop
⚔️ Resolve merge conflicts (beta)
  • Auto-commit resolved conflicts to branch develop
  • Create stacked PR with resolved conflicts
  • Post resolved changes as copyable diffs in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@francispereira
Copy link

francispereira commented Feb 17, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/index.js (1)

1244-1268: Recursive date conversion looks correct but has inconsistent indentation.

The nested object and array handling properly recurses to convert Date values at any depth. However, the array branch (lines 257-264) uses extra indentation compared to the rest of the function body, which hurts readability.

One edge-case note: arrays nested inside arrays are handled implicitly — an inner array item passes the typeof item === 'object' check on line 260 and enters convertDateToEpochInProperties, which works because Object.entries on an array yields index-value pairs. Consider adding an explicit Array.isArray(item) branch for clarity and to avoid relying on this implicit behavior.

♻️ Suggested improvement for explicit nested array handling
             } else if (Array.isArray(value)) {
-                  value.forEach((item, index) => {
-                      if (Object.prototype.toString.call(item) === '[object Date]') {
-                          value[index] = "$D_" + Math.floor(item.getTime() / 1000);
-                      } else if (item !== null && typeof item === 'object') {
-                          convertDateToEpochInProperties(item);
-                      }
-                  });
-              }
+                value.forEach((item, index) => {
+                    if (Object.prototype.toString.call(item) === '[object Date]') {
+                        value[index] = "$D_" + Math.floor(item.getTime() / 1000);
+                    } else if (Array.isArray(item)) {
+                        // Recursively handle nested arrays
+                        item.forEach((nestedItem, nestedIndex) => {
+                            if (Object.prototype.toString.call(nestedItem) === '[object Date]') {
+                                item[nestedIndex] = "$D_" + Math.floor(nestedItem.getTime() / 1000);
+                            } else if (nestedItem !== null && typeof nestedItem === 'object') {
+                                convertDateToEpochInProperties(nestedItem);
+                            }
+                        });
+                    } else if (item !== null && typeof item === 'object') {
+                        convertDateToEpochInProperties(item);
+                    }
+                });
+            }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/index.js` around lines 1244 - 1268, The convertDateToEpochInProperties
function works but its array branch has inconsistent indentation and should
explicitly handle arrays nested inside arrays; reformat the Array.isArray(value)
branch to match the function's indentation style and add an explicit
Array.isArray(item) check inside the value.forEach loop (in function
convertDateToEpochInProperties) so that when item is an array you call
convertDateToEpochInProperties(item) directly instead of relying on
Object.entries on arrays; ensure the rest of the recursive branches remain
unchanged and preserve Date-to-"$D_" epoch conversion logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/index.js`:
- Around line 1244-1268: The convertDateToEpochInProperties function works but
its array branch has inconsistent indentation and should explicitly handle
arrays nested inside arrays; reformat the Array.isArray(value) branch to match
the function's indentation style and add an explicit Array.isArray(item) check
inside the value.forEach loop (in function convertDateToEpochInProperties) so
that when item is an array you call convertDateToEpochInProperties(item)
directly instead of relying on Object.entries on arrays; ensure the rest of the
recursive branches remain unchanged and preserve Date-to-"$D_" epoch conversion
logic.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants