From d65b09ad8376396266c0fecd65d41f275d7281c7 Mon Sep 17 00:00:00 2001 From: Nick Llerandi Date: Thu, 18 Feb 2021 19:22:38 -0500 Subject: [PATCH 1/6] removes duplicate eids from POST call --- modules/tripleliftBidAdapter.js | 22 +++++++++---------- .../spec/modules/tripleliftBidAdapter_spec.js | 6 ++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/tripleliftBidAdapter.js b/modules/tripleliftBidAdapter.js index 029cdd68331..ee790c14103 100644 --- a/modules/tripleliftBidAdapter.js +++ b/modules/tripleliftBidAdapter.js @@ -129,9 +129,9 @@ function _buildPostBody(bidRequests) { }); let eids = [ - ...getUnifiedIdEids(bidRequests), - ...getIdentityLinkEids(bidRequests), - ...getCriteoEids(bidRequests) + ...getUnifiedIdEids([bidRequests[0]]), + ...getIdentityLinkEids([bidRequests[0]]), + ...getCriteoEids([bidRequests[0]]) ]; if (eids.length > 0) { @@ -239,20 +239,20 @@ function _getExt(schain, fpd) { return ext; } -function getUnifiedIdEids(bidRequests) { - return getEids(bidRequests, 'tdid', 'adserver.org', 'TDID'); +function getUnifiedIdEids(bidRequest) { + return getEids(bidRequest, 'tdid', 'adserver.org', 'TDID'); } -function getIdentityLinkEids(bidRequests) { - return getEids(bidRequests, 'idl_env', 'liveramp.com', 'idl'); +function getIdentityLinkEids(bidRequest) { + return getEids(bidRequest, 'idl_env', 'liveramp.com', 'idl'); } -function getCriteoEids(bidRequests) { - return getEids(bidRequests, 'criteoId', 'criteo.com', 'criteoId'); +function getCriteoEids(bidRequest) { + return getEids(bidRequest, 'criteoId', 'criteo.com', 'criteoId'); } -function getEids(bidRequests, type, source, rtiPartner) { - return bidRequests +function getEids(bidRequest, type, source, rtiPartner) { + return bidRequest .map(getUserId(type)) // bids -> userIds of a certain type .filter((x) => !!x) // filter out null userIds .map(formatEid(source, rtiPartner)); // userIds -> eid objects diff --git a/test/spec/modules/tripleliftBidAdapter_spec.js b/test/spec/modules/tripleliftBidAdapter_spec.js index c5d00f4db2b..06c638df69a 100644 --- a/test/spec/modules/tripleliftBidAdapter_spec.js +++ b/test/spec/modules/tripleliftBidAdapter_spec.js @@ -512,9 +512,9 @@ describe('triplelift adapter', function () { const criteoId = '53e30ea700424f7bbdd793b02abc5d7'; const bidRequestsMultiple = [ - { ...bidRequests[0], userId: { tdid: tdidId } }, - { ...bidRequests[0], userId: { idl_env: idlEnvId } }, - { ...bidRequests[0], userId: { criteoId: criteoId } } + { ...bidRequests[0], userId: { tdid: tdidId, idl_env: idlEnvId, criteoId } }, + { ...bidRequests[0], userId: { tdid: tdidId, idl_env: idlEnvId, criteoId } }, + { ...bidRequests[0], userId: { tdid: tdidId, idl_env: idlEnvId, criteoId } } ]; const request = tripleliftAdapterSpec.buildRequests(bidRequestsMultiple, bidderRequest); From 0e9deb5df4c5ab41641d72133cd21c20b628c2ea Mon Sep 17 00:00:00 2001 From: Nick Llerandi Date: Mon, 22 Feb 2021 12:26:15 -0500 Subject: [PATCH 2/6] additional tests --- test/spec/modules/tripleliftBidAdapter_spec.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/spec/modules/tripleliftBidAdapter_spec.js b/test/spec/modules/tripleliftBidAdapter_spec.js index 06c638df69a..1f942921ab5 100644 --- a/test/spec/modules/tripleliftBidAdapter_spec.js +++ b/test/spec/modules/tripleliftBidAdapter_spec.js @@ -506,7 +506,7 @@ describe('triplelift adapter', function () { }); }); - it('should add user ids from multiple bid requests', function () { + it('should consolidate user ids from multiple bid requests', function () { const tdidId = '6bca7f6b-a98a-46c0-be05-6020f7604598'; const idlEnvId = 'XY6104gr0njcH9UDIR7ysFFJcm2XNpqeJTYslleJ_cMlsFOfZI'; const criteoId = '53e30ea700424f7bbdd793b02abc5d7'; @@ -553,6 +553,9 @@ describe('triplelift adapter', function () { ] } }); + + expect(payload.user.ext.eids).to.be.an('array'); + expect(payload.user.ext.eids).to.have.lengthOf(3); }); it('should return a query string for TL call', function () { From 224dc40450366a418d93ff76fdfcb86d4d8a36fc Mon Sep 17 00:00:00 2001 From: Nick Llerandi Date: Mon, 22 Feb 2021 13:36:42 -0500 Subject: [PATCH 3/6] pubcid support --- modules/tripleliftBidAdapter.js | 7 ++++++- test/spec/modules/tripleliftBidAdapter_spec.js | 18 ++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/modules/tripleliftBidAdapter.js b/modules/tripleliftBidAdapter.js index ee790c14103..b681b0980ea 100644 --- a/modules/tripleliftBidAdapter.js +++ b/modules/tripleliftBidAdapter.js @@ -131,7 +131,8 @@ function _buildPostBody(bidRequests) { let eids = [ ...getUnifiedIdEids([bidRequests[0]]), ...getIdentityLinkEids([bidRequests[0]]), - ...getCriteoEids([bidRequests[0]]) + ...getCriteoEids([bidRequests[0]]), + ...getPubCommonEids([bidRequests[0]]) ]; if (eids.length > 0) { @@ -251,6 +252,10 @@ function getCriteoEids(bidRequest) { return getEids(bidRequest, 'criteoId', 'criteo.com', 'criteoId'); } +function getPubCommonEids(bidRequest) { + return getEids(bidRequest, 'pubcid', 'pubcid.org', 'pubcid'); +} + function getEids(bidRequest, type, source, rtiPartner) { return bidRequest .map(getUserId(type)) // bids -> userIds of a certain type diff --git a/test/spec/modules/tripleliftBidAdapter_spec.js b/test/spec/modules/tripleliftBidAdapter_spec.js index 1f942921ab5..eb410c2525d 100644 --- a/test/spec/modules/tripleliftBidAdapter_spec.js +++ b/test/spec/modules/tripleliftBidAdapter_spec.js @@ -510,11 +510,12 @@ describe('triplelift adapter', function () { const tdidId = '6bca7f6b-a98a-46c0-be05-6020f7604598'; const idlEnvId = 'XY6104gr0njcH9UDIR7ysFFJcm2XNpqeJTYslleJ_cMlsFOfZI'; const criteoId = '53e30ea700424f7bbdd793b02abc5d7'; + const pubcid = '3261d8ad-435d-481d-abd1-9f1a9ec99f0e'; const bidRequestsMultiple = [ - { ...bidRequests[0], userId: { tdid: tdidId, idl_env: idlEnvId, criteoId } }, - { ...bidRequests[0], userId: { tdid: tdidId, idl_env: idlEnvId, criteoId } }, - { ...bidRequests[0], userId: { tdid: tdidId, idl_env: idlEnvId, criteoId } } + { ...bidRequests[0], userId: { tdid: tdidId, idl_env: idlEnvId, criteoId, pubcid } }, + { ...bidRequests[0], userId: { tdid: tdidId, idl_env: idlEnvId, criteoId, pubcid } }, + { ...bidRequests[0], userId: { tdid: tdidId, idl_env: idlEnvId, criteoId, pubcid } } ]; const request = tripleliftAdapterSpec.buildRequests(bidRequestsMultiple, bidderRequest); @@ -549,13 +550,22 @@ describe('triplelift adapter', function () { ext: { rtiPartner: 'criteoId' } } ] + }, + { + source: 'pubcid.org', + uids: [ + { + id: '3261d8ad-435d-481d-abd1-9f1a9ec99f0e', + ext: { rtiPartner: 'pubcid' } + } + ] } ] } }); expect(payload.user.ext.eids).to.be.an('array'); - expect(payload.user.ext.eids).to.have.lengthOf(3); + expect(payload.user.ext.eids).to.have.lengthOf(4); }); it('should return a query string for TL call', function () { From 2c51a918eefd416c25d0115aa3bf3f8c678ca208 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 May 2021 16:14:02 +0000 Subject: [PATCH 4/6] Bump elliptic from 6.5.3 to 6.5.4 Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4) Signed-off-by: dependabot[bot] --- package-lock.json | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3c4e59cdba7..9c6998b68fc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "prebid.js", - "version": "4.39.0-pre", + "version": "4.41.0-pre", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -7582,24 +7582,30 @@ "dev": true }, "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", "dev": true, "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", + "bn.js": "^4.11.9", + "brorand": "^1.1.0", "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" }, "dependencies": { "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true } } From a5f3a379b0efbdaeb6c4894dac74f40ffffb4ce9 Mon Sep 17 00:00:00 2001 From: Dan Goldin Date: Thu, 10 Jun 2021 15:56:58 -0400 Subject: [PATCH 5/6] Revert "Bump elliptic from 6.5.3 to 6.5.4" --- package-lock.json | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index 54f91e8ec62..a6a58a530de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "prebid.js", - "version": "4.41.0-pre", + "version": "4.39.0-pre", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -7582,30 +7582,24 @@ "dev": true }, "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", "dev": true, "requires": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", + "bn.js": "^4.4.0", + "brorand": "^1.0.1", "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" }, "dependencies": { "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true } } From 0da94e89fd7c0f56df2e2a7e1d6ad99a215169a6 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Sat, 26 Jun 2021 02:30:38 +0000 Subject: [PATCH 6/6] fix: upgrade core-js-pure from 3.6.5 to 3.13.1 Snyk has created this PR to upgrade core-js-pure from 3.6.5 to 3.13.1. See this package in npm: https://www.npmjs.com/package/core-js-pure See this project in Snyk: https://app.snyk.io/org/lpolya/project/ebc82fee-7702-4dad-911d-6a3b385c2325?utm_source=github&utm_medium=upgrade-pr --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index a6a58a530de..3507cb92e96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "prebid.js", - "version": "4.39.0-pre", + "version": "4.41.0-pre", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -6153,9 +6153,9 @@ } }, "core-js-pure": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.5.tgz", - "integrity": "sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA==" + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.13.1.tgz", + "integrity": "sha512-wVlh0IAi2t1iOEh16y4u1TRk6ubd4KvLE8dlMi+3QUI6SfKphQUh7tAwihGGSQ8affxEXpVIPpOdf9kjR4v4Pw==" }, "core-util-is": { "version": "1.0.2", diff --git a/package.json b/package.json index 66f1976d4ce..cfd0bde0947 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "dependencies": { "babel-plugin-transform-object-assign": "^6.22.0", "core-js": "^3.0.0", - "core-js-pure": "^3.6.5", + "core-js-pure": "^3.13.1", "criteo-direct-rsa-validate": "^1.1.0", "crypto-js": "^3.3.0", "dlv": "1.1.3",