fix (moengage): handled obj-case find method fuzzy traits method calling#846
Merged
joe-ayoub-segment merged 2 commits intosegmentio:masterfrom Apr 16, 2026
Merged
Conversation
Contributor
Contributor
joe-ayoub-segment
approved these changes
Apr 16, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses a MoEngage identify trait-mapping bug caused by obj-case’s fuzzy key matching, which previously could trigger calls to non-existent identify.<trait>() methods and throw errors.
Changes:
- Update MoEngage semantic trait mapping to use
obj-case.find(...)’s returned mapping value and the iterated traitvalue, avoiding dynamicidentify[key]()calls. - Add unit tests covering semantic trait mapping across different casing/separator conventions (camelCase, snake_case, kebab-case).
- Bump the MoEngage integration version and add a changelog entry.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| integrations/moengage/lib/index.js | Fixes semantic trait mapping logic to safely handle fuzzy-matched keys without calling missing identify[key]() methods. |
| integrations/moengage/test/index.test.js | Adds coverage for case/separator variations of common semantic traits. |
| integrations/moengage/package.json | Bumps integration version to 1.0.9. |
| integrations/moengage/HISTORY.md | Adds a 1.0.9 changelog entry describing the fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
AnkitSegment
added a commit
that referenced
this pull request
Apr 17, 2026
commit 3e04f5f Author: Ankit Gupta <ankit.gupta@segment.com> Date: Fri Apr 17 14:01:41 2026 +0530 Update package version commit a2b2265 Author: Ankit Gupta <ankit.gupta@segment.com> Date: Fri Apr 17 13:50:41 2026 +0530 Updated dynamic sdk from static commit 9257f39 Author: Aditya Gupta <97892100+adityagupta-7@users.noreply.github.com> Date: Thu Apr 16 13:57:44 2026 +0530 fix (moengage): handled obj-case find method fuzzy traits method calling (#846) * fix: handled obj-case find method fuzzy traits method calling * fix: updated history md file commit d41432e Author: Ankit Gupta <139338151+AnkitSegment@users.noreply.github.com> Date: Thu Mar 5 10:05:00 2026 +0530 Upgrade aws-sdk v2 to @aws-sdk/client-s3 v3 (#844) * Upgraded new aws version from v2 to v3 * Removed git command from pipeline * updated upload-assets file * updated upload-assets file commit 8019caa Author: Joe Ayoub <45374896+joe-ayoub-segment@users.noreply.github.com> Date: Wed Feb 11 15:28:33 2026 +0000 Updating GTM tests (#841) * Updating GTM tests * updating tests commit 81cf68d Author: Joe Ayoub <45374896+joe-ayoub-segment@users.noreply.github.com> Date: Tue Feb 10 06:31:10 2026 +0000 Gtm bugfix2 (#840) * fixing bug for gtm custom domain * package bump commit 5729cd6 Author: Joe Ayoub <45374896+joe-ayoub-segment@users.noreply.github.com> Date: Mon Feb 2 07:59:15 2026 +0000 Bump Google Tag Manager to v2.5.2 (#839) Version bump to deploy the fullURLpath changes from commit 78fd671. The previous commit modified code but didn't bump the version, causing the new code to overwrite cached 2.5.1 assets that have a 1-year immutable cache policy. Co-authored-by: Claude (us.anthropic.claude-sonnet-4-5-20250929-v1:0) <noreply@anthropic.com> commit 78fd671 Author: Joe Ayoub <45374896+joe-ayoub-segment@users.noreply.github.com> Date: Tue Jan 27 06:44:16 2026 +0000 STRATCONN-6010 - [GTM - Classic] - full domain with file path (#838) commit 503687d Author: Joe Ayoub <45374896+joe-ayoub-segment@users.noreply.github.com> Date: Mon Jan 26 07:44:07 2026 +0000 STRATCONN-5638 - [GTM] - domain configuration support (#836) commit b62fc34 Author: Arjun Bhandage <abhandage@twilio.com> Date: Tue Jan 20 16:48:01 2026 +0530 (non-prod) STRATCONN-6104: fix the pipeline to run all tests on master and remove publish step (#834) * chore: specify yarn package manager version in package.json * test * test * fix: enhance CI pipeline with master-specific build and test steps, remove publish step * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: correct argument order in test-master script for consistency * address comment --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> commit 8ea51e1 Author: VWO Integration <53477775+vwointegration@users.noreply.github.com> Date: Wed Sep 10 13:25:09 2025 +0530 feat: add experiment name to VWO tracking data (#829) Co-authored-by: Rohit Tyagi <rohittyagi@WINDELLAP-1217.local> commit 2470fd9 Author: Arjun Bhandage <abhandage@twilio.com> Date: Wed Jul 30 17:34:03 2025 +0530 STRATCONN-5792: Remove vulnerable dependency from several destinations. (#828) * STRATCONN-5792: Remove vulnerable dependency from several destinations. * update * untouch other dependencies commit adef8c3 Author: Ankit Gupta <139338151+AnkitSegment@users.noreply.github.com> Date: Wed Jul 16 12:14:04 2025 +0530 Updated twitter ads version to 2.5.3 (#827) commit 04cbb18 Author: Ankit Gupta <139338151+AnkitSegment@users.noreply.github.com> Date: Wed Jul 16 12:05:22 2025 +0530 [Main] Update bing ads version 2.0.3 (#826) * Updated condition for undefined consentSettings * Update the version commit af58163 Author: Ankit Gupta <139338151+AnkitSegment@users.noreply.github.com> Date: Wed Jul 16 11:55:41 2025 +0530 Updated condition for undefined consentSettings (#825) commit ec9a19d Author: Arjun Bhandage <abhandage@twilio.com> Date: Thu Jul 10 14:56:34 2025 +0530 STRATCONN-5950: Upgrade twitter-ads sdk (#824) * STRATCONN-5950: Upgrade twitter-ads sdk * update version commit 8ab0178 Author: Ankit Gupta <139338151+AnkitSegment@users.noreply.github.com> Date: Wed Apr 30 19:11:59 2025 +0530 [STRATCONN-5687] Added support for bing ads consent mode (#822) * Updated Bing ads consent * Updated Bing ads consent * Updated unit test cases and handle other cases * Updated unit test cases --------- Co-authored-by: Daniel Jackins <djackins@twilio.com> Co-authored-by: Harsh Joshi <harsh.joshi@segment.com> commit 786b989 Author: Ankit Gupta <139338151+AnkitSegment@users.noreply.github.com> Date: Thu Apr 24 15:12:53 2025 +0530 Revert "Added adStorage consent in bing ads (#819)" (#820) This reverts commit 5954107. commit 5954107 Author: Ankit Gupta <139338151+AnkitSegment@users.noreply.github.com> Date: Tue Apr 22 16:07:07 2025 +0530 Added adStorage consent in bing ads (#819)
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.


What does this PR do?
Are there breaking changes in this PR?
Testing
Existing Unit Tests
Since the existing unit tests for several integrations are not in good shape, developers are expected to fix
them for the integration they are working/touch on.
Please ensure the following before submitting a PR:
Any background context you want to provide?
Is there parity with the server-side/android/iOS integration components (if applicable)?
Does this require a new integration setting? If so, please explain how the new setting works
Links to helpful docs and other external resources