From b7a4c7f6bc45395d77be06ed03c93b1a512ca0f0 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 22 Oct 2021 12:46:20 -0400 Subject: [PATCH 1/6] Update betweenBidAdapter.js --- modules/betweenBidAdapter.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/betweenBidAdapter.js b/modules/betweenBidAdapter.js index 09c8678d1ff..b2f63488e12 100644 --- a/modules/betweenBidAdapter.js +++ b/modules/betweenBidAdapter.js @@ -6,6 +6,7 @@ const BIDDER_CODE = 'between'; let ENDPOINT = 'https://ads.betweendigital.com/adjson?t=prebid'; const CODE_TYPES = ['inpage', 'preroll', 'midroll', 'postroll']; +const includes = require('core-js-pure/features/array/includes.js'); export const spec = { code: BIDDER_CODE, aliases: ['btw'], @@ -53,7 +54,7 @@ export const spec = { params.mind = video.mind; params.pos = 'atf'; ENDPOINT += '&jst=pvc'; - params.codeType = CODE_TYPES.includes(video.codeType) ? video.codeType : 'inpage'; + params.codeType = includes(CODE_TYPES, video.codeType) ? video.codeType : 'inpage'; } if (i.params.itu !== undefined) { From 9fa6ea8875241cc2a1edfa0c9638dd89eb6ada90 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 22 Oct 2021 13:01:54 -0400 Subject: [PATCH 2/6] Update yahoosspBidAdapter.js --- modules/yahoosspBidAdapter.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/yahoosspBidAdapter.js b/modules/yahoosspBidAdapter.js index ac91596f8d0..0559c60af96 100644 --- a/modules/yahoosspBidAdapter.js +++ b/modules/yahoosspBidAdapter.js @@ -4,6 +4,7 @@ import { deepAccess, isFn, isStr, isNumber, isArray, isEmpty, isPlainObject, gen import { config } from '../src/config.js'; import { Renderer } from '../src/Renderer.js'; +const includes = require('core-js-pure/features/array/includes.js'); const INTEGRATION_METHOD = 'prebid.js'; const BIDDER_CODE = 'yahoossp'; const ADAPTER_VERSION = '1.0.1'; @@ -144,9 +145,9 @@ function getAdapterMode() { function getResponseFormat(bid) { const adm = bid.adm; - if (adm.includes('o2playerSettings') || adm.includes('YAHOO.VideoPlatform.VideoPlayer') || adm.includes('AdPlacement')) { + if (includes(adm, 'o2playerSettings') || includes(adm, 'YAHOO.VideoPlatform.VideoPlayer') || includes(adm, 'AdPlacement')) { return BANNER; - } else if (adm.includes('VAST')) { + } else if (includes(adm, 'VAST')) { return VIDEO; } }; @@ -188,23 +189,23 @@ function validateAppendObject(validationType, allowedKeys, inputObject, appendTo for (const objectKey in inputObject) { switch (validationType) { case 'string': - if (allowedKeys.includes(objectKey) && isStr(inputObject[objectKey])) { + if (includes(allowedKeys, objectKey) && isStr(inputObject[objectKey])) { outputObject[objectKey] = inputObject[objectKey]; }; break; case 'number': - if (allowedKeys.includes(objectKey) && isNumber(inputObject[objectKey])) { + if (includes(allowedKeys, objectKey) && isNumber(inputObject[objectKey])) { outputObject[objectKey] = inputObject[objectKey]; }; break; case 'array': - if (allowedKeys.includes(objectKey) && isArray(inputObject[objectKey])) { + if (includes(allowedKeys, objectKey) && isArray(inputObject[objectKey])) { outputObject[objectKey] = inputObject[objectKey]; }; break; case 'object': - if (allowedKeys.includes(objectKey) && isPlainObject(inputObject[objectKey])) { + if (includes(allowedKeys, objectKey) && isPlainObject(inputObject[objectKey])) { outputObject[objectKey] = inputObject[objectKey]; }; break; From 9e2828f90a2ab7581911466046c346381fde7a69 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 22 Oct 2021 13:07:58 -0400 Subject: [PATCH 3/6] Update adapterManager_spec.js --- test/spec/unit/core/adapterManager_spec.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/spec/unit/core/adapterManager_spec.js b/test/spec/unit/core/adapterManager_spec.js index 75fd74748a0..563ce58d434 100644 --- a/test/spec/unit/core/adapterManager_spec.js +++ b/test/spec/unit/core/adapterManager_spec.js @@ -456,7 +456,8 @@ describe('adapterManager tests', function () { }); it('should call spec\'s onBidderError callback when callBidderError is called', function () { - const bidderRequest = getBidRequests().find(bidRequest => bidRequest.bidderCode === bidder); + const bidRequests = getBidRequests() + const bidderRequest = find(bidRequests, bidRequest => bidRequest.bidderCode === bidder); const xhrErrorMock = { status: 500, statusText: 'Internal Server Error' From 76d882b54261b97d62b59c95a5234003b0308eb5 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 22 Oct 2021 13:08:52 -0400 Subject: [PATCH 4/6] Update adapterManager_spec.js --- test/spec/unit/core/adapterManager_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/unit/core/adapterManager_spec.js b/test/spec/unit/core/adapterManager_spec.js index 563ce58d434..30aa30c52e9 100644 --- a/test/spec/unit/core/adapterManager_spec.js +++ b/test/spec/unit/core/adapterManager_spec.js @@ -456,7 +456,7 @@ describe('adapterManager tests', function () { }); it('should call spec\'s onBidderError callback when callBidderError is called', function () { - const bidRequests = getBidRequests() + const bidRequests = getBidRequests(); const bidderRequest = find(bidRequests, bidRequest => bidRequest.bidderCode === bidder); const xhrErrorMock = { status: 500, From a2a1e931e80fb84564f371760664396f4ce3b41e Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 22 Oct 2021 13:13:24 -0400 Subject: [PATCH 5/6] Update airgridRtdProvider.js --- modules/airgridRtdProvider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/airgridRtdProvider.js b/modules/airgridRtdProvider.js index 8d212204da8..f5403cca3eb 100644 --- a/modules/airgridRtdProvider.js +++ b/modules/airgridRtdProvider.js @@ -33,7 +33,7 @@ export function attachScriptTagToDOM(rtdConfig) { edktInitializor.load = function(e) { var p = e || 'sdk'; var n = document.createElement('script'); - n.type = 'text/javascript'; + n.type = 'module'; n.async = true; n.src = 'https://cdn.edkt.io/' + p + '/edgekit.min.js'; document.getElementsByTagName('head')[0].appendChild(n); From 7ad0252ce1cf1659a5f429268dfb7e13c7aaeacf Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Fri, 22 Oct 2021 13:43:13 -0400 Subject: [PATCH 6/6] Update yahoosspBidAdapter.js --- modules/yahoosspBidAdapter.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/yahoosspBidAdapter.js b/modules/yahoosspBidAdapter.js index 0559c60af96..ac91596f8d0 100644 --- a/modules/yahoosspBidAdapter.js +++ b/modules/yahoosspBidAdapter.js @@ -4,7 +4,6 @@ import { deepAccess, isFn, isStr, isNumber, isArray, isEmpty, isPlainObject, gen import { config } from '../src/config.js'; import { Renderer } from '../src/Renderer.js'; -const includes = require('core-js-pure/features/array/includes.js'); const INTEGRATION_METHOD = 'prebid.js'; const BIDDER_CODE = 'yahoossp'; const ADAPTER_VERSION = '1.0.1'; @@ -145,9 +144,9 @@ function getAdapterMode() { function getResponseFormat(bid) { const adm = bid.adm; - if (includes(adm, 'o2playerSettings') || includes(adm, 'YAHOO.VideoPlatform.VideoPlayer') || includes(adm, 'AdPlacement')) { + if (adm.includes('o2playerSettings') || adm.includes('YAHOO.VideoPlatform.VideoPlayer') || adm.includes('AdPlacement')) { return BANNER; - } else if (includes(adm, 'VAST')) { + } else if (adm.includes('VAST')) { return VIDEO; } }; @@ -189,23 +188,23 @@ function validateAppendObject(validationType, allowedKeys, inputObject, appendTo for (const objectKey in inputObject) { switch (validationType) { case 'string': - if (includes(allowedKeys, objectKey) && isStr(inputObject[objectKey])) { + if (allowedKeys.includes(objectKey) && isStr(inputObject[objectKey])) { outputObject[objectKey] = inputObject[objectKey]; }; break; case 'number': - if (includes(allowedKeys, objectKey) && isNumber(inputObject[objectKey])) { + if (allowedKeys.includes(objectKey) && isNumber(inputObject[objectKey])) { outputObject[objectKey] = inputObject[objectKey]; }; break; case 'array': - if (includes(allowedKeys, objectKey) && isArray(inputObject[objectKey])) { + if (allowedKeys.includes(objectKey) && isArray(inputObject[objectKey])) { outputObject[objectKey] = inputObject[objectKey]; }; break; case 'object': - if (includes(allowedKeys, objectKey) && isPlainObject(inputObject[objectKey])) { + if (allowedKeys.includes(objectKey) && isPlainObject(inputObject[objectKey])) { outputObject[objectKey] = inputObject[objectKey]; }; break;