Skip to content

Commit

Permalink
chore(release): pull main into develop post release v1.91.1 (#4095)
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsSudip authored Feb 19, 2025
2 parents fae16fb + aed87ce commit 58738ba
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [1.91.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.91.0...v1.91.1) (2025-02-19)


### Bug Fixes

* snapchat util function for normalizing phone number ([#4093](https://github.com/rudderlabs/rudder-transformer/issues/4093)) ([17ff7f9](https://github.com/rudderlabs/rudder-transformer/commit/17ff7f96a2a911485592afb379dd2886ee8b9982))

## [1.91.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.90.2...v1.91.0) (2025-02-17)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rudder-transformer",
"version": "1.91.0",
"version": "1.91.1",
"description": "",
"homepage": "https://github.com/rudderlabs/rudder-transformer#readme",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion src/v0/destinations/snapchat_conversion/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function getNormalizedPhoneNumber(message) {
if (regexExp.test(phoneNumber)) return phoneNumber;

// Remove leading zeros and non-numeric characters
return phoneNumber.replace(/\D/g, '').replace(/^0+/, '') || null;
return String(phoneNumber).replace(/\D/g, '').replace(/^0+/, '') || null;
}

function getDataUseValue(message) {
Expand Down
10 changes: 10 additions & 0 deletions src/v0/destinations/snapchat_conversion/util.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ describe('Snapchat Conversion Utils', () => {
input: { traits: { phone: '000' } },
expected: null,
},
{
name: 'should handle integer phone numbers',
input: { traits: { phone: 1234567890 } },
expected: '1234567890',
},
{
name: 'should handle object in place of phone number',
input: { traits: { phone: { test: 'test' } } },
expected: null,
},
];

testCases.forEach(({ name, input, expected }) => {
Expand Down

0 comments on commit 58738ba

Please sign in to comment.