diff --git a/modules/1ad4goodBidAdapter.js b/modules/1ad4goodBidAdapter.js index 560808b368f..ed536f2a2bb 100644 --- a/modules/1ad4goodBidAdapter.js +++ b/modules/1ad4goodBidAdapter.js @@ -1,8 +1,8 @@ import * as utils from '../src/utils.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; import { BANNER, VIDEO } from '../src/mediaTypes.js'; -import find from 'core-js/library/fn/array/find.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import find from 'core-js-pure/features/array/find'; +import includes from 'core-js-pure/features/array/includes'; const BIDDER_CODE = '1ad4good'; const URL = 'https://hb.1ad4good.org/prebid'; diff --git a/modules/adagioBidAdapter.js b/modules/adagioBidAdapter.js index 3bf5eb5d34d..a57caa994d1 100644 --- a/modules/adagioBidAdapter.js +++ b/modules/adagioBidAdapter.js @@ -1,4 +1,4 @@ -import find from 'core-js/library/fn/array/find.js'; +import find from 'core-js-pure/features/array/find'; import * as utils from '../src/utils.js'; import {registerBidder} from '../src/adapters/bidderFactory.js'; import { loadExternalScript } from '../src/adloader.js' diff --git a/modules/adkernelBidAdapter.js b/modules/adkernelBidAdapter.js index 18c60c3e438..2409a9f578c 100644 --- a/modules/adkernelBidAdapter.js +++ b/modules/adkernelBidAdapter.js @@ -1,8 +1,8 @@ import * as utils from '../src/utils.js'; import { BANNER, VIDEO } from '../src/mediaTypes.js'; import {registerBidder} from '../src/adapters/bidderFactory.js'; -import find from 'core-js/library/fn/array/find.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import find from 'core-js-pure/features/array/find'; +import includes from 'core-js-pure/features/array/includes'; import {parse as parseUrl} from '../src/url.js'; /* diff --git a/modules/adomikAnalyticsAdapter.js b/modules/adomikAnalyticsAdapter.js index ec5923ea0f8..62431d0facd 100644 --- a/modules/adomikAnalyticsAdapter.js +++ b/modules/adomikAnalyticsAdapter.js @@ -2,8 +2,8 @@ import adapter from '../src/AnalyticsAdapter.js'; import CONSTANTS from '../src/constants.json'; import adapterManager from '../src/adapterManager.js'; import { logInfo } from '../src/utils.js'; -import find from 'core-js/library/fn/array/find.js'; -import findIndex from 'core-js/library/fn/array/find-index.js'; +import find from 'core-js-pure/features/array/find'; +import findIndex from 'core-js-pure/features/array/find-index'; // Events used in adomik analytics adapter const auctionInit = CONSTANTS.EVENTS.AUCTION_INIT; diff --git a/modules/adpod.js b/modules/adpod.js index a2d5cb4a0ed..c4109aefa66 100644 --- a/modules/adpod.js +++ b/modules/adpod.js @@ -20,12 +20,12 @@ import { setupBeforeHookFnOnce, module } from '../src/hook.js'; import { store } from '../src/videoCache.js'; import { config } from '../src/config.js'; import { ADPOD } from '../src/mediaTypes.js'; -import Set from 'core-js/library/fn/set.js'; -import find from 'core-js/library/fn/array/find.js'; +import Set from 'core-js-pure/features/set'; +import find from 'core-js-pure/features/array/find'; import { auctionManager } from '../src/auctionManager.js'; import CONSTANTS from '../src/constants.json'; -const from = require('core-js/library/fn/array/from.js'); +const from = require('core-js-pure/features/array/from'); const TARGETING_KEY_PB_CAT_DUR = 'hb_pb_cat_dur'; const TARGETING_KEY_CACHE_ID = 'hb_cache_id'; diff --git a/modules/adtelligentBidAdapter.js b/modules/adtelligentBidAdapter.js index 2d3162b435d..0cfb90990c8 100644 --- a/modules/adtelligentBidAdapter.js +++ b/modules/adtelligentBidAdapter.js @@ -2,7 +2,7 @@ import * as utils from '../src/utils.js'; import {registerBidder} from '../src/adapters/bidderFactory.js'; import {VIDEO, BANNER} from '../src/mediaTypes.js'; import {Renderer} from '../src/Renderer.js'; -import find from 'core-js/library/fn/array/find.js'; +import find from 'core-js-pure/features/array/find'; const URL = 'https://ghb.adtelligent.com/auction/'; const OUTSTREAM_SRC = 'https://player.adtelligent.com/outstream-unit/2.01/outstream.min.js'; diff --git a/modules/advangelistsBidAdapter.js b/modules/advangelistsBidAdapter.js index b3064568d3a..ad744d64bf8 100644 --- a/modules/advangelistsBidAdapter.js +++ b/modules/advangelistsBidAdapter.js @@ -3,8 +3,8 @@ import { parse as parseUrl } from '../src/url.js'; import { config } from '../src/config.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; import { VIDEO, BANNER } from '../src/mediaTypes.js'; -import find from 'core-js/library/fn/array/find.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import find from 'core-js-pure/features/array/find'; +import includes from 'core-js-pure/features/array/includes'; const ADAPTER_VERSION = '1.0'; const BIDDER_CODE = 'advangelists'; diff --git a/modules/adxcgBidAdapter.js b/modules/adxcgBidAdapter.js index 37690c66d58..f1e1a93977e 100644 --- a/modules/adxcgBidAdapter.js +++ b/modules/adxcgBidAdapter.js @@ -3,7 +3,7 @@ import * as utils from '../src/utils.js' import * as url from '../src/url.js' import { registerBidder } from '../src/adapters/bidderFactory.js' import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js' -import includes from 'core-js/library/fn/array/includes.js' +import includes from 'core-js-pure/features/array/includes' /** * Adapter for requesting bids from adxcg.net diff --git a/modules/adyoulikeBidAdapter.js b/modules/adyoulikeBidAdapter.js index 7e591b3901c..7ccd9d665ef 100644 --- a/modules/adyoulikeBidAdapter.js +++ b/modules/adyoulikeBidAdapter.js @@ -2,7 +2,7 @@ import * as utils from '../src/utils.js'; import { format } from '../src/url.js'; // import { config } from '../src/config.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; -import find from 'core-js/library/fn/array/find.js'; +import find from 'core-js-pure/features/array/find'; const VERSION = '1.0'; const BIDDER_CODE = 'adyoulike'; diff --git a/modules/appnexusBidAdapter.js b/modules/appnexusBidAdapter.js index 9f107bf54ec..a79607b9e9d 100644 --- a/modules/appnexusBidAdapter.js +++ b/modules/appnexusBidAdapter.js @@ -4,8 +4,8 @@ import { config } from '../src/config.js'; import { registerBidder, getIabSubCategory } from '../src/adapters/bidderFactory.js'; import { BANNER, NATIVE, VIDEO, ADPOD } from '../src/mediaTypes.js'; import { auctionManager } from '../src/auctionManager.js'; -import find from 'core-js/library/fn/array/find.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import find from 'core-js-pure/features/array/find'; +import includes from 'core-js-pure/features/array/includes'; import { OUTSTREAM, INSTREAM } from '../src/video.js'; const BIDDER_CODE = 'appnexus'; diff --git a/modules/audienceNetworkBidAdapter.js b/modules/audienceNetworkBidAdapter.js index 54a50af4269..da81a386e5f 100644 --- a/modules/audienceNetworkBidAdapter.js +++ b/modules/audienceNetworkBidAdapter.js @@ -4,8 +4,8 @@ import { registerBidder } from '../src/adapters/bidderFactory.js'; import { formatQS } from '../src/url.js'; import { generateUUID, deepAccess, convertTypes } from '../src/utils.js'; -import findIndex from 'core-js/library/fn/array/find-index.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import findIndex from 'core-js-pure/features/array/find-index'; +import includes from 'core-js-pure/features/array/includes'; const code = 'audienceNetwork'; const currency = 'USD'; diff --git a/modules/beachfrontBidAdapter.js b/modules/beachfrontBidAdapter.js index bbb4ae35729..3d3ac9b51ef 100644 --- a/modules/beachfrontBidAdapter.js +++ b/modules/beachfrontBidAdapter.js @@ -4,8 +4,8 @@ import { config } from '../src/config.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; import { Renderer } from '../src/Renderer.js'; import { VIDEO, BANNER } from '../src/mediaTypes.js'; -import find from 'core-js/library/fn/array/find.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import find from 'core-js-pure/features/array/find'; +import includes from 'core-js-pure/features/array/includes'; const ADAPTER_VERSION = '1.9'; const ADAPTER_NAME = 'BFIO_PREBID'; diff --git a/modules/bridgewellBidAdapter.js b/modules/bridgewellBidAdapter.js index a95a19f0402..b4891549115 100644 --- a/modules/bridgewellBidAdapter.js +++ b/modules/bridgewellBidAdapter.js @@ -1,7 +1,7 @@ import * as utils from '../src/utils.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; import { BANNER, NATIVE } from '../src/mediaTypes.js'; -import find from 'core-js/library/fn/array/find.js'; +import find from 'core-js-pure/features/array/find'; const BIDDER_CODE = 'bridgewell'; const REQUEST_ENDPOINT = 'https://prebid.scupio.com/recweb/prebid.aspx?cb=' + Math.random(); diff --git a/modules/consentManagement.js b/modules/consentManagement.js index f098effdb08..91869bdbabc 100644 --- a/modules/consentManagement.js +++ b/modules/consentManagement.js @@ -7,8 +7,8 @@ import * as utils from '../src/utils.js'; import { config } from '../src/config.js'; import { gdprDataHandler } from '../src/adapterManager.js'; -import includes from 'core-js/library/fn/array/includes.js'; -import strIncludes from 'core-js/library/fn/string/includes.js'; +import includes from 'core-js-pure/features/array/includes'; +import strIncludes from 'core-js-pure/features/string/includes'; const DEFAULT_CMP = 'iab'; const DEFAULT_CONSENT_TIMEOUT = 10000; diff --git a/modules/criteoBidAdapter.js b/modules/criteoBidAdapter.js index b1b1cc75745..eb509583823 100644 --- a/modules/criteoBidAdapter.js +++ b/modules/criteoBidAdapter.js @@ -4,7 +4,7 @@ import { config } from '../src/config.js'; import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js'; import { parse } from '../src/url.js'; import * as utils from '../src/utils.js'; -import find from 'core-js/library/fn/array/find.js'; +import find from 'core-js-pure/features/array/find'; import { verify } from 'criteo-direct-rsa-validate/build/verify.js'; export const ADAPTER_VERSION = 26; diff --git a/modules/emx_digitalBidAdapter.js b/modules/emx_digitalBidAdapter.js index 22a7bb6f643..2b5a848fd96 100644 --- a/modules/emx_digitalBidAdapter.js +++ b/modules/emx_digitalBidAdapter.js @@ -2,7 +2,7 @@ import * as utils from '../src/utils.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; import { BANNER, VIDEO } from '../src/mediaTypes.js'; import { Renderer } from '../src/Renderer.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; import {parse as parseUrl} from '../src/url.js'; const BIDDER_CODE = 'emx_digital'; diff --git a/modules/gumgumBidAdapter.js b/modules/gumgumBidAdapter.js index baa79ecfe04..bbc0be5a04d 100644 --- a/modules/gumgumBidAdapter.js +++ b/modules/gumgumBidAdapter.js @@ -2,7 +2,7 @@ import * as utils from '../src/utils.js' import { config } from '../src/config.js' import { BANNER, VIDEO } from '../src/mediaTypes.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; import { registerBidder } from '../src/adapters/bidderFactory.js' const BIDDER_CODE = 'gumgum' diff --git a/modules/ixBidAdapter.js b/modules/ixBidAdapter.js index fd22a21b94f..31dc660a1c1 100644 --- a/modules/ixBidAdapter.js +++ b/modules/ixBidAdapter.js @@ -1,8 +1,8 @@ import * as utils from '../src/utils.js'; import { BANNER, VIDEO } from '../src/mediaTypes.js'; import { config } from '../src/config.js'; -import find from 'core-js/library/fn/array/find.js'; -import isInteger from 'core-js/library/fn/number/is-integer.js'; +import find from 'core-js-pure/features/array/find'; +import isInteger from 'core-js-pure/features/number/is-integer'; import { registerBidder } from '../src/adapters/bidderFactory.js'; const BIDDER_CODE = 'ix'; diff --git a/modules/livewrappedBidAdapter.js b/modules/livewrappedBidAdapter.js index 0e478869b53..75216bab46b 100644 --- a/modules/livewrappedBidAdapter.js +++ b/modules/livewrappedBidAdapter.js @@ -1,7 +1,7 @@ import * as utils from '../src/utils.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; import { config } from '../src/config.js'; -import find from 'core-js/library/fn/array/find.js'; +import find from 'core-js-pure/features/array/find'; import { BANNER, NATIVE } from '../src/mediaTypes.js'; const BIDDER_CODE = 'livewrapped'; diff --git a/modules/nextrollBidAdapter.js b/modules/nextrollBidAdapter.js index e85efceba68..5f26822d2ae 100644 --- a/modules/nextrollBidAdapter.js +++ b/modules/nextrollBidAdapter.js @@ -3,7 +3,7 @@ import { registerBidder } from '../src/adapters/bidderFactory.js'; import { BANNER } from '../src/mediaTypes.js'; import { parse as parseUrl } from '../src/url.js'; -import find from 'core-js/library/fn/array/find.js'; +import find from 'core-js-pure/features/array/find'; const BIDDER_CODE = 'nextroll'; const BIDDER_ENDPOINT = 'https://d.adroll.com/bid/prebid/'; diff --git a/modules/prebidServerBidAdapter/index.js b/modules/prebidServerBidAdapter/index.js index 3b16330310d..daf3684f19c 100644 --- a/modules/prebidServerBidAdapter/index.js +++ b/modules/prebidServerBidAdapter/index.js @@ -8,10 +8,10 @@ import { VIDEO, NATIVE } from '../../src/mediaTypes.js'; import { processNativeAdUnitParams } from '../../src/native.js'; import { isValid } from '../../src/adapters/bidderFactory.js'; import events from '../../src/events.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; import { S2S_VENDORS } from './config.js'; import { ajax } from '../../src/ajax.js'; -import find from 'core-js/library/fn/array/find.js'; +import find from 'core-js-pure/features/array/find'; const getConfig = config.getConfig; diff --git a/modules/roxotAnalyticsAdapter.js b/modules/roxotAnalyticsAdapter.js index 814a2c0d1ad..bb5605a77a6 100644 --- a/modules/roxotAnalyticsAdapter.js +++ b/modules/roxotAnalyticsAdapter.js @@ -1,7 +1,7 @@ import adapter from '../src/AnalyticsAdapter.js'; import CONSTANTS from '../src/constants.json'; import adapterManager from '../src/adapterManager.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; import {ajaxBuilder} from '../src/ajax.js'; const utils = require('../src/utils.js'); diff --git a/modules/rtbhouseBidAdapter.js b/modules/rtbhouseBidAdapter.js index b0d7c0e04de..ed9d335b499 100644 --- a/modules/rtbhouseBidAdapter.js +++ b/modules/rtbhouseBidAdapter.js @@ -1,7 +1,7 @@ import * as utils from '../src/utils.js'; import { BANNER, NATIVE } from '../src/mediaTypes.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; const BIDDER_CODE = 'rtbhouse'; const REGIONS = ['prebid-eu', 'prebid-us', 'prebid-asia']; diff --git a/modules/sigmoidAnalyticsAdapter.js b/modules/sigmoidAnalyticsAdapter.js index c20afbf9bfe..dbd40738176 100644 --- a/modules/sigmoidAnalyticsAdapter.js +++ b/modules/sigmoidAnalyticsAdapter.js @@ -1,6 +1,6 @@ /* Sigmoid Analytics Adapter for prebid.js v1.1.0-pre Updated : 2018-03-28 */ -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; import adapter from '../src/AnalyticsAdapter.js'; import CONSTANTS from '../src/constants.json'; import adapterManager from '../src/adapterManager.js'; diff --git a/modules/sizeMappingV2.js b/modules/sizeMappingV2.js index ec3604faa97..92d83e99b69 100644 --- a/modules/sizeMappingV2.js +++ b/modules/sizeMappingV2.js @@ -6,7 +6,7 @@ import * as utils from '../src/utils.js'; import { processNativeAdUnitParams } from '../src/native.js'; import { adunitCounter } from '../src/adUnits.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; import { getHook } from '../src/hook.js'; import { adUnitSetupChecks diff --git a/modules/somoBidAdapter.js b/modules/somoBidAdapter.js index 298b1c3050e..eedcce564a1 100644 --- a/modules/somoBidAdapter.js +++ b/modules/somoBidAdapter.js @@ -1,6 +1,6 @@ import * as utils from '../src/utils.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; import {BANNER, VIDEO} from '../src/mediaTypes.js'; const VIDEO_TARGETING = ['mimes', 'minduration', 'maxduration', 'protocols', diff --git a/modules/sovrnAnalyticsAdapter.js b/modules/sovrnAnalyticsAdapter.js index 8a712680dac..3160e63ca28 100644 --- a/modules/sovrnAnalyticsAdapter.js +++ b/modules/sovrnAnalyticsAdapter.js @@ -4,8 +4,8 @@ import CONSTANTS from '../src/constants.json' import {ajaxBuilder} from '../src/ajax.js' import * as utils from '../src/utils.js' import {config} from '../src/config.js' -import find from 'core-js/library/fn/array/find.js' -import includes from 'core-js/library/fn/array/includes.js' +import find from 'core-js-pure/features/array/find' +import includes from 'core-js-pure/features/array/includes' const ajax = ajaxBuilder(0) diff --git a/modules/synacormediaBidAdapter.js b/modules/synacormediaBidAdapter.js index ae2fd91cb6f..d2c81e898bb 100644 --- a/modules/synacormediaBidAdapter.js +++ b/modules/synacormediaBidAdapter.js @@ -3,7 +3,7 @@ import { getAdUnitSizes, logWarn } from '../src/utils.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; import { BANNER, VIDEO } from '../src/mediaTypes.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; const BID_HOST = 'https://prebid.technoratimedia.com'; const USER_SYNC_HOST = 'https://ad-cdn.technoratimedia.com'; diff --git a/modules/userId/index.js b/modules/userId/index.js index c1f8075863b..2d46f196c8a 100644 --- a/modules/userId/index.js +++ b/modules/userId/index.js @@ -96,7 +96,7 @@ * @property {(function|undefined)} callback - function that will return an id */ -import find from 'core-js/library/fn/array/find.js'; +import find from 'core-js-pure/features/array/find'; import {config} from '../../src/config.js'; import events from '../../src/events.js'; import * as utils from '../../src/utils.js'; diff --git a/modules/viewdeosDXBidAdapter.js b/modules/viewdeosDXBidAdapter.js index fb028fca8c8..ee9cd9b7e70 100644 --- a/modules/viewdeosDXBidAdapter.js +++ b/modules/viewdeosDXBidAdapter.js @@ -2,7 +2,7 @@ import * as utils from '../src/utils.js'; import {registerBidder} from '../src/adapters/bidderFactory.js'; import {VIDEO, BANNER} from '../src/mediaTypes.js'; import {Renderer} from '../src/Renderer.js'; -import findIndex from 'core-js/library/fn/array/find-index.js'; +import findIndex from 'core-js-pure/features/array/find-index'; const URL = 'https://ghb.sync.viewdeos.com/auction/'; const OUTSTREAM_SRC = 'https://player.sync.viewdeos.com/outstream-unit/2.01/outstream.min.js'; diff --git a/modules/widespaceBidAdapter.js b/modules/widespaceBidAdapter.js index 486926f1889..ee58161876f 100644 --- a/modules/widespaceBidAdapter.js +++ b/modules/widespaceBidAdapter.js @@ -5,8 +5,8 @@ import { parseQueryStringParameters, parseSizesInput } from '../src/utils.js'; -import includes from 'core-js/library/fn/array/includes.js'; -import find from 'core-js/library/fn/array/find.js'; +import includes from 'core-js-pure/features/array/includes'; +import find from 'core-js-pure/features/array/find'; const BIDDER_CODE = 'widespace'; const WS_ADAPTER_VERSION = '2.0.1'; diff --git a/modules/xhbBidAdapter.js b/modules/xhbBidAdapter.js index 0f7669f6eeb..3d8949fd430 100644 --- a/modules/xhbBidAdapter.js +++ b/modules/xhbBidAdapter.js @@ -2,8 +2,8 @@ import { Renderer } from '../src/Renderer.js'; import * as utils from '../src/utils.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js'; -import find from 'core-js/library/fn/array/find.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import find from 'core-js-pure/features/array/find'; +import includes from 'core-js-pure/features/array/includes'; const BIDDER_CODE = 'xhb'; const URL = 'https://ib.adnxs.com/ut/v3/prebid'; diff --git a/modules/yieldlabBidAdapter.js b/modules/yieldlabBidAdapter.js index ca07449f12e..ff43462cad4 100644 --- a/modules/yieldlabBidAdapter.js +++ b/modules/yieldlabBidAdapter.js @@ -1,6 +1,6 @@ import * as utils from '../src/utils.js' import { registerBidder } from '../src/adapters/bidderFactory.js' -import find from 'core-js/library/fn/array/find.js' +import find from 'core-js-pure/features/array/find' import { VIDEO, BANNER } from '../src/mediaTypes.js' import { Renderer } from '../src/Renderer.js' diff --git a/package.json b/package.json index 071ebe71c6c..d48edf90050 100755 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ }, "dependencies": { "babel-plugin-transform-object-assign": "^6.22.0", - "core-js": "^2.4.1", + "core-js": "^3.0.0", "criteo-direct-rsa-validate": "^1.1.0", "crypto-js": "^3.3.0", "deep-equal": "^1.0.1", @@ -105,6 +105,7 @@ "express": "^4.15.4", "fun-hooks": "^0.9.8", "jsencrypt": "^3.0.0-rc.1", - "just-clone": "^1.0.2" + "just-clone": "^1.0.2", + "core-js-pure": "^3.6.4" } } diff --git a/src/Renderer.js b/src/Renderer.js index 2efe717eca4..a47f37db816 100644 --- a/src/Renderer.js +++ b/src/Renderer.js @@ -1,6 +1,6 @@ import { loadExternalScript } from './adloader.js'; import * as utils from './utils.js'; -import find from 'core-js/library/fn/array/find.js'; +import find from 'core-js-pure/features/array/find'; const moduleCode = 'outstream'; /** diff --git a/src/adapterManager.js b/src/adapterManager.js index 9886934ab47..fbf9ec2992f 100644 --- a/src/adapterManager.js +++ b/src/adapterManager.js @@ -7,8 +7,8 @@ import { newBidder } from './adapters/bidderFactory.js'; import { ajaxBuilder } from './ajax.js'; import { config, RANDOM } from './config.js'; import { hook } from './hook.js'; -import includes from 'core-js/library/fn/array/includes.js'; -import find from 'core-js/library/fn/array/find.js'; +import includes from 'core-js-pure/features/array/includes'; +import find from 'core-js-pure/features/array/find'; import { adunitCounter } from './adUnits.js'; import { getRefererInfo } from './refererDetection.js'; diff --git a/src/adapters/bidderFactory.js b/src/adapters/bidderFactory.js index 64bfe27c0c5..cb64d0cd6bb 100644 --- a/src/adapters/bidderFactory.js +++ b/src/adapters/bidderFactory.js @@ -7,7 +7,7 @@ import { nativeBidIsValid } from '../native.js'; import { isValidVideoBid } from '../video.js'; import CONSTANTS from '../constants.json'; import events from '../events.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; import { ajax } from '../ajax.js'; import { logWarn, logError, parseQueryStringParameters, delayExecution, parseSizesInput, getBidderRequest, flatten, uniques, timestamp, setDataInLocalStorage, getDataFromLocalStorage, deepAccess, isArray } from '../utils.js'; import { ADPOD } from '../mediaTypes.js'; diff --git a/src/adloader.js b/src/adloader.js index ce21d763797..2bc594a503a 100644 --- a/src/adloader.js +++ b/src/adloader.js @@ -1,4 +1,4 @@ -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; import * as utils from './utils.js'; const _requestCache = {}; diff --git a/src/auction.js b/src/auction.js index 628c164a537..6698dff78c6 100644 --- a/src/auction.js +++ b/src/auction.js @@ -66,7 +66,7 @@ import { Renderer } from './Renderer.js'; import { config } from './config.js'; import { userSync } from './userSync.js'; import { hook } from './hook.js'; -import find from 'core-js/library/fn/array/find.js'; +import find from 'core-js-pure/features/array/find'; import { OUTSTREAM } from './video.js'; import { VIDEO } from './mediaTypes.js'; diff --git a/src/auctionManager.js b/src/auctionManager.js index bf95f0ab05e..602e69cbd5c 100644 --- a/src/auctionManager.js +++ b/src/auctionManager.js @@ -18,7 +18,7 @@ import { uniques, flatten, logWarn } from './utils.js'; import { newAuction, getStandardBidderSettings, AUCTION_COMPLETED } from './auction.js'; -import find from 'core-js/library/fn/array/find.js'; +import find from 'core-js-pure/features/array/find'; const CONSTANTS = require('./constants.json'); diff --git a/src/config.js b/src/config.js index 678b680d712..472aebe5577 100644 --- a/src/config.js +++ b/src/config.js @@ -13,12 +13,12 @@ */ import { isValidPriceConfig } from './cpmBucketManager.js'; -import find from 'core-js/library/fn/array/find.js'; -import includes from 'core-js/library/fn/array/includes.js'; -import Set from 'core-js/library/fn/set.js'; +import find from 'core-js-pure/features/array/find'; +import includes from 'core-js-pure/features/array/includes'; +import Set from 'core-js-pure/features/set'; import { parseQS } from './url.js'; -const from = require('core-js/library/fn/array/from.js'); +const from = require('core-js-pure/features/array/from'); const utils = require('./utils.js'); const CONSTANTS = require('./constants.json'); diff --git a/src/cpmBucketManager.js b/src/cpmBucketManager.js index 2f0ae4312e9..ef60b32666e 100644 --- a/src/cpmBucketManager.js +++ b/src/cpmBucketManager.js @@ -1,4 +1,4 @@ -import find from 'core-js/library/fn/array/find.js'; +import find from 'core-js-pure/features/array/find'; const utils = require('./utils.js'); const _defaultPrecision = 2; diff --git a/src/native.js b/src/native.js index 0d8461a5b6f..6ff0c227adc 100644 --- a/src/native.js +++ b/src/native.js @@ -1,5 +1,5 @@ import { deepAccess, getBidRequest, getKeyByValue, insertHtmlIntoIframe, logError, triggerPixel } from './utils.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; const CONSTANTS = require('./constants.json'); diff --git a/src/prebid.js b/src/prebid.js index aa2d2493e7b..5adfbc8108c 100644 --- a/src/prebid.js +++ b/src/prebid.js @@ -9,7 +9,7 @@ import { auctionManager } from './auctionManager.js'; import { targeting } from './targeting.js'; import { hook } from './hook.js'; import { sessionLoader } from './debugging.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; import { adunitCounter } from './adUnits.js'; import { isRendererRequired, executeRenderer } from './Renderer.js'; import { createBid } from './bidfactory.js'; diff --git a/src/secureCreatives.js b/src/secureCreatives.js index 36e5efe22cd..37030584094 100644 --- a/src/secureCreatives.js +++ b/src/secureCreatives.js @@ -8,9 +8,9 @@ import { fireNativeTrackers, getAssetMessage } from './native.js'; import { EVENTS } from './constants.json'; import { logWarn, replaceAuctionPrice } from './utils.js'; import { auctionManager } from './auctionManager.js'; -import find from 'core-js/library/fn/array/find.js'; +import find from 'core-js-pure/features/array/find'; import { isRendererRequired, executeRenderer } from './Renderer.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; const BID_WON = EVENTS.BID_WON; diff --git a/src/sizeMapping.js b/src/sizeMapping.js index ff54ff8f251..c3cc5889fec 100644 --- a/src/sizeMapping.js +++ b/src/sizeMapping.js @@ -1,6 +1,6 @@ import { config } from './config.js'; import {logWarn, isPlainObject, deepAccess, deepClone, getWindowTop} from './utils.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; let sizeConfig = []; diff --git a/src/targeting.js b/src/targeting.js index d960d800a25..6bef633f722 100644 --- a/src/targeting.js +++ b/src/targeting.js @@ -4,7 +4,7 @@ import { NATIVE_TARGETING_KEYS } from './native.js'; import { auctionManager } from './auctionManager.js'; import { sizeSupported } from './sizeMapping.js'; import { ADPOD } from './mediaTypes.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; const utils = require('./utils.js'); var CONSTANTS = require('./constants.json'); diff --git a/src/userSync.js b/src/userSync.js index e19f64d8082..07b3a6f7e48 100644 --- a/src/userSync.js +++ b/src/userSync.js @@ -1,6 +1,6 @@ import * as utils from './utils.js'; import { config } from './config.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; export const USERSYNC_DEFAULT_CONFIG = { syncEnabled: true, diff --git a/src/utils.js b/src/utils.js index 3211048b5a8..bd7219ba369 100644 --- a/src/utils.js +++ b/src/utils.js @@ -1,8 +1,8 @@ /* eslint-disable no-console */ import { config } from './config.js'; import clone from 'just-clone'; -import find from 'core-js/library/fn/array/find.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import find from 'core-js-pure/features/array/find'; +import includes from 'core-js-pure/features/array/includes'; const CONSTANTS = require('./constants.json'); diff --git a/src/video.js b/src/video.js index c3deb73ad4d..233fc76438a 100644 --- a/src/video.js +++ b/src/video.js @@ -1,7 +1,7 @@ import adapterManager from './adapterManager.js'; import { getBidRequest, deepAccess, logError } from './utils.js'; import { config } from '../src/config.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; import { hook } from './hook.js'; const VIDEO_MEDIA_TYPE = 'video'; diff --git a/test/spec/auctionmanager_spec.js b/test/spec/auctionmanager_spec.js index 3ec3d67e448..dacdc6abc6e 100644 --- a/test/spec/auctionmanager_spec.js +++ b/test/spec/auctionmanager_spec.js @@ -1,13 +1,18 @@ -import { getKeyValueTargetingPairs, auctionCallbacks, AUCTION_COMPLETED } from 'src/auction.js'; +import { + getKeyValueTargetingPairs, + auctionCallbacks, + AUCTION_COMPLETED, + adjustBids, + getMediaTypeGranularity, +} from 'src/auction.js'; import CONSTANTS from 'src/constants.json'; -import { adjustBids, getMediaTypeGranularity } from 'src/auction.js'; import * as auctionModule from 'src/auction.js'; import { registerBidder } from 'src/adapters/bidderFactory.js'; import { createBid } from 'src/bidfactory.js'; import { config } from 'src/config.js'; import * as store from 'src/videoCache.js'; import * as ajaxLib from 'src/ajax.js'; -import find from 'core-js/library/fn/array/find.js'; +import find from 'core-js-pure/features/array/find'; import { server } from 'test/mocks/xhr.js'; var assert = require('assert'); diff --git a/test/spec/e2e/longform/basic_w_bidderSettings.spec.js b/test/spec/e2e/longform/basic_w_bidderSettings.spec.js index 06413fb809a..379caafa5b8 100644 --- a/test/spec/e2e/longform/basic_w_bidderSettings.spec.js +++ b/test/spec/e2e/longform/basic_w_bidderSettings.spec.js @@ -1,4 +1,4 @@ -const includes = require('core-js/library/fn/array/includes'); +const includes = require('core-js-pure/features/array/includes'); const expect = require('chai').expect; const testServer = require('../../../helpers/testing-utils'); diff --git a/test/spec/e2e/longform/basic_w_custom_adserver_translation.spec.js b/test/spec/e2e/longform/basic_w_custom_adserver_translation.spec.js index 82310738246..8a22668fb65 100644 --- a/test/spec/e2e/longform/basic_w_custom_adserver_translation.spec.js +++ b/test/spec/e2e/longform/basic_w_custom_adserver_translation.spec.js @@ -1,4 +1,4 @@ -const includes = require('core-js/library/fn/array/includes'); +const includes = require('core-js-pure/features/array/includes'); const expect = require('chai').expect; const testServer = require('../../../helpers/testing-utils'); diff --git a/test/spec/e2e/longform/basic_w_priceGran.spec.js b/test/spec/e2e/longform/basic_w_priceGran.spec.js index 696b7fa3359..a4725aad638 100644 --- a/test/spec/e2e/longform/basic_w_priceGran.spec.js +++ b/test/spec/e2e/longform/basic_w_priceGran.spec.js @@ -1,4 +1,4 @@ -const includes = require('core-js/library/fn/array/includes'); +const includes = require('core-js-pure/features/array/includes'); const expect = require('chai').expect; const testServer = require('../../../helpers/testing-utils'); diff --git a/test/spec/e2e/longform/basic_w_requireExactDuration.spec.js b/test/spec/e2e/longform/basic_w_requireExactDuration.spec.js index 224ff1cbc34..938fe33830d 100644 --- a/test/spec/e2e/longform/basic_w_requireExactDuration.spec.js +++ b/test/spec/e2e/longform/basic_w_requireExactDuration.spec.js @@ -1,4 +1,4 @@ -const includes = require('core-js/library/fn/array/includes'); +const includes = require('core-js-pure/features/array/includes'); const expect = require('chai').expect; const testServer = require('../../../helpers/testing-utils'); diff --git a/test/spec/e2e/longform/basic_wo_brandCategoryExclusion.spec.js b/test/spec/e2e/longform/basic_wo_brandCategoryExclusion.spec.js index 95237366d0e..83e2e6630b6 100644 --- a/test/spec/e2e/longform/basic_wo_brandCategoryExclusion.spec.js +++ b/test/spec/e2e/longform/basic_wo_brandCategoryExclusion.spec.js @@ -1,4 +1,4 @@ -const includes = require('core-js/library/fn/array/includes'); +const includes = require('core-js-pure/features/array/includes'); const expect = require('chai').expect; const testServer = require('../../../helpers/testing-utils'); diff --git a/test/spec/e2e/longform/basic_wo_requireExactDuration.spec.js b/test/spec/e2e/longform/basic_wo_requireExactDuration.spec.js index 6b628067138..d301be2787b 100644 --- a/test/spec/e2e/longform/basic_wo_requireExactDuration.spec.js +++ b/test/spec/e2e/longform/basic_wo_requireExactDuration.spec.js @@ -1,4 +1,4 @@ -const includes = require('core-js/library/fn/array/includes'); +const includes = require('core-js-pure/features/array/includes'); const expect = require('chai').expect; const testServer = require('../../../helpers/testing-utils'); diff --git a/test/spec/modules/eplanningAnalyticsAdapter_spec.js b/test/spec/modules/eplanningAnalyticsAdapter_spec.js index e900f7ca31c..645dab8eaab 100644 --- a/test/spec/modules/eplanningAnalyticsAdapter_spec.js +++ b/test/spec/modules/eplanningAnalyticsAdapter_spec.js @@ -1,5 +1,5 @@ import eplAnalyticsAdapter from 'modules/eplanningAnalyticsAdapter.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; import { expect } from 'chai'; import {parse as parseURL} from 'src/url.js'; import { server } from 'test/mocks/xhr.js'; diff --git a/test/spec/modules/fintezaAnalyticsAdapter_spec.js b/test/spec/modules/fintezaAnalyticsAdapter_spec.js index 4b58761d8a6..987ac92bce6 100644 --- a/test/spec/modules/fintezaAnalyticsAdapter_spec.js +++ b/test/spec/modules/fintezaAnalyticsAdapter_spec.js @@ -1,5 +1,5 @@ import fntzAnalyticsAdapter from 'modules/fintezaAnalyticsAdapter.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; import { expect } from 'chai'; import { parse as parseURL } from 'src/url.js'; import { server } from 'test/mocks/xhr.js'; diff --git a/test/spec/modules/rubiconBidAdapter_spec.js b/test/spec/modules/rubiconBidAdapter_spec.js index 7adedbcfdde..ad409d650ad 100644 --- a/test/spec/modules/rubiconBidAdapter_spec.js +++ b/test/spec/modules/rubiconBidAdapter_spec.js @@ -2,13 +2,9 @@ import {expect} from 'chai'; import adapterManager from 'src/adapterManager.js'; import {spec, getPriceGranularity, masSizeOrdering, resetUserSync, hasVideoMediaType, FASTLANE_ENDPOINT} from 'modules/rubiconBidAdapter.js'; import {parse as parseQuery} from 'querystring'; -import {newBidder} from 'src/adapters/bidderFactory.js'; -import {userSync} from 'src/userSync.js'; import {config} from 'src/config.js'; import * as utils from 'src/utils.js'; -import find from 'core-js/library/fn/array/find.js'; - -var CONSTANTS = require('src/constants.json'); +import find from 'core-js-pure/features/array/find'; const INTEGRATION = `pbjs_lite_v$prebid.version$`; // $prebid.version$ will be substituted in by gulp in built prebid diff --git a/test/spec/modules/widespaceBidAdapter_spec.js b/test/spec/modules/widespaceBidAdapter_spec.js index c7d4f3bdaf9..9cca52fdbb7 100644 --- a/test/spec/modules/widespaceBidAdapter_spec.js +++ b/test/spec/modules/widespaceBidAdapter_spec.js @@ -1,6 +1,6 @@ import {expect} from 'chai'; import {spec} from 'modules/widespaceBidAdapter.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; describe('+widespaceAdatperTest', function () { // Dummy bid request diff --git a/test/spec/sizeMapping_spec.js b/test/spec/sizeMapping_spec.js index b6b8c00ada3..fb728d74279 100644 --- a/test/spec/sizeMapping_spec.js +++ b/test/spec/sizeMapping_spec.js @@ -1,6 +1,6 @@ import { expect } from 'chai'; import { resolveStatus, setSizeConfig, sizeSupported } from 'src/sizeMapping.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import includes from 'core-js-pure/features/array/includes'; let utils = require('src/utils'); let deepClone = utils.deepClone; diff --git a/test/spec/unit/core/adapterManager_spec.js b/test/spec/unit/core/adapterManager_spec.js index 566ebe2e400..61f5fd60630 100644 --- a/test/spec/unit/core/adapterManager_spec.js +++ b/test/spec/unit/core/adapterManager_spec.js @@ -11,8 +11,8 @@ import * as utils from 'src/utils.js'; import { config } from 'src/config.js'; import { registerBidder } from 'src/adapters/bidderFactory.js'; import { setSizeConfig } from 'src/sizeMapping.js'; -import find from 'core-js/library/fn/array/find.js'; -import includes from 'core-js/library/fn/array/includes.js'; +import find from 'core-js-pure/features/array/find'; +import includes from 'core-js-pure/features/array/includes'; import s2sTesting from 'modules/s2sTesting.js'; var events = require('../../../../src/events'); diff --git a/test/spec/unit/pbjs_api_spec.js b/test/spec/unit/pbjs_api_spec.js index cfdd39239d3..d977d3153f7 100644 --- a/test/spec/unit/pbjs_api_spec.js +++ b/test/spec/unit/pbjs_api_spec.js @@ -13,22 +13,16 @@ import { targeting, newTargeting, filters } from 'src/targeting.js'; import { config as configObj } from 'src/config.js'; import * as ajaxLib from 'src/ajax.js'; import * as auctionModule from 'src/auction.js'; -import { newBidder, registerBidder } from 'src/adapters/bidderFactory.js'; +import { registerBidder } from 'src/adapters/bidderFactory.js'; import { _sendAdToCreative } from 'src/secureCreatives.js'; -import find from 'core-js/library/fn/array/find.js'; +import find from 'core-js-pure/features/array/find'; var assert = require('chai').assert; var expect = require('chai').expect; -var urlParse = require('url-parse'); - -var prebid = require('src/prebid'); var utils = require('src/utils'); -var bidfactory = require('src/bidfactory'); -var adloader = require('test/mocks/adloaderStub'); var adapterManager = require('src/adapterManager').default; var events = require('src/events'); -var adserver = require('src/adserver'); var CONSTANTS = require('src/constants.json'); // These bid adapters are required to be loaded for the following tests to work