From cb10aa7707518b52edcf7fb1081c6969bcb5f8f8 Mon Sep 17 00:00:00 2001 From: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> Date: Fri, 10 May 2024 10:06:26 +0530 Subject: [PATCH 1/2] fix: update regex which was discarding firstname and lastname (#3360) --- .../destinations/fb_custom_audience/util.js | 4 +- .../fb_custom_audience/processor/data.ts | 44 ++++++++++++++++ .../fb_custom_audience/router/data.ts | 50 +++++++++++++++---- 3 files changed, 86 insertions(+), 12 deletions(-) diff --git a/src/v0/destinations/fb_custom_audience/util.js b/src/v0/destinations/fb_custom_audience/util.js index 6c53ed2814..1f096215f3 100644 --- a/src/v0/destinations/fb_custom_audience/util.js +++ b/src/v0/destinations/fb_custom_audience/util.js @@ -92,11 +92,11 @@ const ensureApplicableFormat = (userProperty, userInformation) => { case 'FN': case 'FI': if (userProperty !== 'FI') { - updatedProperty = stringifiedUserInformation.toLowerCase().replace(/[!#$%&@A-Za-z]/g, ''); + updatedProperty = stringifiedUserInformation.toLowerCase().replace(/[^#$%&'*+/a-z]/g, ''); } else { updatedProperty = stringifiedUserInformation .toLowerCase() - .replace(/[^!#$%&,.?@A-Za-z]/g, ''); + .replace(/[^!"#$%&'()*+,-./a-z]/g, ''); } break; case 'MADID': diff --git a/test/integrations/destinations/fb_custom_audience/processor/data.ts b/test/integrations/destinations/fb_custom_audience/processor/data.ts index 267b966865..602f8a7fb6 100644 --- a/test/integrations/destinations/fb_custom_audience/processor/data.ts +++ b/test/integrations/destinations/fb_custom_audience/processor/data.ts @@ -1261,6 +1261,23 @@ export const data = [ DOBY: '2013', PHONE: '@09432457768', GEN: 'f', + FN: 'test', + LN: 'user', + FI: 'Ms.', + MADID: 'ABC', + ZIP: 'ZIP ', + ST: '123abc ', + COUNTRY: 'IN', + }, + { + EMAIL: 'testuser2@abc.com', + DOBM: '2', + DOBD: '13', + DOBY: '2013', + PHONE: '@09432457768', + GEN: 'f', + FN: '1234', + LN: true, FI: 'Ms.', MADID: 'ABC', ZIP: 'ZIP ', @@ -1276,6 +1293,8 @@ export const data = [ DOBY: '2013', PHONE: '@09432457768', GEN: 'f', + FN: 'test', + LN: 'user', FI: 'Ms.', MADID: 'ABC', ZIP: 'ZIP ', @@ -1303,6 +1322,8 @@ export const data = [ 'DOBY', 'PHONE', 'GEN', + 'FN', + 'LN', 'FI', 'MADID', 'ZIP', @@ -1355,6 +1376,8 @@ export const data = [ 'DOBY', 'PHONE', 'GEN', + 'FN', + 'LN', 'FI', 'MADID', 'ZIP', @@ -1369,6 +1392,8 @@ export const data = [ '7931aa2a1bed855457d1ddf6bc06ab4406a9fba0579045a4d6ff78f9c07c440f', '0dcd4be87427e008a16adbdc2b2c15a14accf485dd451314dcecfb902c51c686', '252f10c83610ebca1a059c0bae8255eba2f95be4d1d7bcfa89d7248a82d9f111', + '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', + '04f8996da763b7a969b1028ee3007569eaf3a635486ddab211d512c85b9df8fb', 'db0683221aebc02cc034b65ebcf7d1bddd1eb199e33fd23a31931947d13a11bc', 'abc', '4a70fe9aa6436e02c2dea340fbd1e352e4ef2d8ce6ca52ad25d4b95471fc8bf2', @@ -1409,6 +1434,8 @@ export const data = [ 'DOBY', 'PHONE', 'GEN', + 'FN', + 'LN', 'FI', 'MADID', 'ZIP', @@ -1423,6 +1450,23 @@ export const data = [ '7931aa2a1bed855457d1ddf6bc06ab4406a9fba0579045a4d6ff78f9c07c440f', '0dcd4be87427e008a16adbdc2b2c15a14accf485dd451314dcecfb902c51c686', '252f10c83610ebca1a059c0bae8255eba2f95be4d1d7bcfa89d7248a82d9f111', + '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', + '04f8996da763b7a969b1028ee3007569eaf3a635486ddab211d512c85b9df8fb', + 'db0683221aebc02cc034b65ebcf7d1bddd1eb199e33fd23a31931947d13a11bc', + 'abc', + '4a70fe9aa6436e02c2dea340fbd1e352e4ef2d8ce6ca52ad25d4b95471fc8bf2', + 'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad', + '582967534d0f909d196b97f9e6921342777aea87b46fa52df165389db1fb8ccf', + ], + [ + '0059c0c78dac479648069fc1ed4298cd53bd857857aac57ac597537bedc6e043', + 'a953f09a1b6b6725b81956e9ad0b1eb49e3ad40004c04307ef8af6246a054116', + '3fdba35f04dc8c462986c992bcf875546257113072a909c162f7e470e581e278', + '7931aa2a1bed855457d1ddf6bc06ab4406a9fba0579045a4d6ff78f9c07c440f', + '0dcd4be87427e008a16adbdc2b2c15a14accf485dd451314dcecfb902c51c686', + '252f10c83610ebca1a059c0bae8255eba2f95be4d1d7bcfa89d7248a82d9f111', + '', + 'b5bea41b6c623f7c09f1bf24dcae58ebab3c0cdd90ad966bc43a45b44867e12b', 'db0683221aebc02cc034b65ebcf7d1bddd1eb199e33fd23a31931947d13a11bc', 'abc', '4a70fe9aa6436e02c2dea340fbd1e352e4ef2d8ce6ca52ad25d4b95471fc8bf2', diff --git a/test/integrations/destinations/fb_custom_audience/router/data.ts b/test/integrations/destinations/fb_custom_audience/router/data.ts index 492b625b2d..1240939dbd 100644 --- a/test/integrations/destinations/fb_custom_audience/router/data.ts +++ b/test/integrations/destinations/fb_custom_audience/router/data.ts @@ -26626,16 +26626,46 @@ export const data = [ payload: { schema: ['EMAIL', 'FN'], data: [ - ['7625cab24612c37df6d2f724721bb38a25095d0295e29b807238ee188b8aca43', ''], - ['b2b4abadd72190af54305c0d3abf1977fec4935016bb13ff28040d5712318dfd', ''], - ['c4b007d1c3c9a5d31bd4082237a913e8e0db1767225c2a5ef33be2716df005fa', ''], - ['94639be1bd9f17c05820164e9d71ef78558f117a9e8bfab43cf8015e08aa0b27', ''], - ['39b456cfb4bb07f9e6bb18698aa173171ca49c731fccc4790e9ecea808d24ae6', ''], - ['769f73387add781a481ca08300008a08fb2f1816aaed196137efc2e05976d711', ''], - ['48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08', ''], - ['da2d431121cd10578fd81f8f80344b06db59ea2d05a7b5d27536c8789ddae8f0', ''], - ['b100c2ec0718fe6b4805b623aeec6710719d042ceea55f5c8135b010ec1c7b36', ''], - ['0c1d1b0ba547a742013366d6fbc8f71dd77f566d94e41ed9f828a74b96928161', ''], + [ + '7625cab24612c37df6d2f724721bb38a25095d0295e29b807238ee188b8aca43', + 'e328a0d90d4b5132b2655cf7079b160040d2c1a83d70d4cad9cf1f69310635b3', + ], + [ + 'b2b4abadd72190af54305c0d3abf1977fec4935016bb13ff28040d5712318dfd', + 'f8147eb72c9bb356c362fdb0796b54971ebc983cb60b3cc3ff29582ce2052bad', + ], + [ + 'c4b007d1c3c9a5d31bd4082237a913e8e0db1767225c2a5ef33be2716df005fa', + 'd8bb13b95eaed7f9b6a8af276aa6122e8015e0c466c1a84e49ff7c69ad6ac911', + ], + [ + '94639be1bd9f17c05820164e9d71ef78558f117a9e8bfab43cf8015e08aa0b27', + 'b1661f97721dede0f876dcbf603289ee339f641b9c310deba53c76940f472698', + ], + [ + '39b456cfb4bb07f9e6bb18698aa173171ca49c731fccc4790e9ecea808d24ae6', + '6c882abd6d0aff713cdd6a4a31ee28c9140612fb2627a611f6f9f539bac44f81', + ], + [ + '769f73387add781a481ca08300008a08fb2f1816aaed196137efc2e05976d711', + '2222cb73346f7a01a1d4d3db28b58fd41045782bb66152b92aade379192544c5', + ], + [ + '48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08', + 'abc12f8d666517c35280bf220f5390b1f0ef4bdbbc794ac59c95bba0381bf91b', + ], + [ + 'da2d431121cd10578fd81f8f80344b06db59ea2d05a7b5d27536c8789ddae8f0', + 'abc12f8d666517c35280bf220f5390b1f0ef4bdbbc794ac59c95bba0381bf91b', + ], + [ + 'b100c2ec0718fe6b4805b623aeec6710719d042ceea55f5c8135b010ec1c7b36', + '62a2fed3d6e08c44835fce71f02210b1ddabfb066e39edf1e6c261988f824dd3', + ], + [ + '0c1d1b0ba547a742013366d6fbc8f71dd77f566d94e41ed9f828a74b96928161', + '62a2fed3d6e08c44835fce71f02210b1ddabfb066e39edf1e6c261988f824dd3', + ], ], }, }, From 8148e9bf3db13f3e3f124c15543188ffac648d5b Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 10 May 2024 05:31:32 +0000 Subject: [PATCH 2/2] chore(release): 1.65.1 --- 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 2b4ee4f176..a63e10b793 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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.65.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.65.0...v1.65.1) (2024-05-10) + + +### Bug Fixes + +* update regex which was discarding firstname and lastname ([#3360](https://github.com/rudderlabs/rudder-transformer/issues/3360)) ([cb10aa7](https://github.com/rudderlabs/rudder-transformer/commit/cb10aa7707518b52edcf7fb1081c6969bcb5f8f8)) + ## [1.65.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.64.0...v1.65.0) (2024-05-06) diff --git a/package-lock.json b/package-lock.json index 8e2400e049..23f524d0ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-transformer", - "version": "1.65.0", + "version": "1.65.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-transformer", - "version": "1.65.0", + "version": "1.65.1", "license": "ISC", "dependencies": { "@amplitude/ua-parser-js": "0.7.24", diff --git a/package.json b/package.json index e2fb25df41..00dad8305f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-transformer", - "version": "1.65.0", + "version": "1.65.1", "description": "", "homepage": "https://github.com/rudderlabs/rudder-transformer#readme", "bugs": {