prebid.js 9.46.0 → 9.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (325) hide show
  1. package/.github/codeql/queries/jsonRequestContentType.ql +18 -0
  2. package/AGENTS.md +42 -0
  3. package/CLAUDE.md +1 -0
  4. package/babelConfig.js +1 -1
  5. package/dist/33acrossAnalyticsAdapter.js +1 -1
  6. package/dist/33acrossBidAdapter.js +1 -1
  7. package/dist/33acrossIdSystem.js +1 -1
  8. package/dist/BTBidAdapter.js +1 -1
  9. package/dist/adagioAnalyticsAdapter.js +1 -1
  10. package/dist/adagioBidAdapter.js +1 -1
  11. package/dist/adagioUtils.js +1 -1
  12. package/dist/addefendBidAdapter.js +1 -1
  13. package/dist/adgenerationBidAdapter.js +1 -1
  14. package/dist/adlooxRtdProvider.js +1 -1
  15. package/dist/adqueryBidAdapter.js +1 -1
  16. package/dist/adrelevantisBidAdapter.js +1 -1
  17. package/dist/adstirBidAdapter.js +1 -1
  18. package/dist/adtrgtmeBidAdapter.js +1 -1
  19. package/dist/advangUtils.js +1 -1
  20. package/dist/adverxoBidAdapter.js +1 -1
  21. package/dist/adxcgAnalyticsAdapter.js +1 -1
  22. package/dist/adxcgBidAdapter.js +1 -1
  23. package/dist/adyoulikeBidAdapter.js +1 -1
  24. package/dist/agmaAnalyticsAdapter.js +1 -1
  25. package/dist/ajaBidAdapter.js +1 -1
  26. package/dist/amxBidAdapter.js +1 -1
  27. package/dist/amxIdSystem.js +1 -1
  28. package/dist/aniviewBidAdapter.js +1 -1
  29. package/dist/appierAnalyticsAdapter.js +1 -1
  30. package/dist/appnexusBidAdapter.js +1 -1
  31. package/dist/asoBidAdapter.js +1 -1
  32. package/dist/axonixBidAdapter.js +1 -1
  33. package/dist/beopBidAdapter.js +1 -1
  34. package/dist/bidglassBidAdapter.js +1 -1
  35. package/dist/big-richmediaBidAdapter.js +1 -1
  36. package/dist/bitmediaBidAdapter.js +1 -1
  37. package/dist/blueBidAdapter.js +1 -1
  38. package/dist/blueUtils.js +1 -0
  39. package/dist/bmsBidAdapter.js +1 -1
  40. package/dist/bridBidAdapter.js +1 -1
  41. package/dist/bridgeuppBidAdapter.js +1 -1
  42. package/dist/bridgewellBidAdapter.js +1 -1
  43. package/dist/brightMountainMediaBidAdapter.js +1 -1
  44. package/dist/browsiUtils.js +1 -1
  45. package/dist/carodaBidAdapter.js +1 -1
  46. package/dist/chtnwBidAdapter.js +1 -1
  47. package/dist/chunk-core.js +1 -1
  48. package/dist/concertBidAdapter.js +1 -1
  49. package/dist/connectadBidAdapter.js +1 -1
  50. package/dist/consumableBidAdapter.js +1 -1
  51. package/dist/contxtfulBidAdapter.js +1 -1
  52. package/dist/conversantAnalyticsAdapter.js +1 -1
  53. package/dist/conversantBidAdapter.js +1 -1
  54. package/dist/craftBidAdapter.js +1 -1
  55. package/dist/criteoBidAdapter.js +1 -1
  56. package/dist/cwireBidAdapter.js +1 -1
  57. package/dist/czechAdIdSystem.js +1 -1
  58. package/dist/dailymotionBidAdapter.js +1 -1
  59. package/dist/debugging-standalone.js +1 -1
  60. package/dist/dependencies.json +16 -2
  61. package/dist/dspxBidAdapter.js +1 -1
  62. package/dist/dxkultureBidAdapter.js +1 -1
  63. package/dist/dynamicAdBoostRtdProvider.js +1 -1
  64. package/dist/eplanningBidAdapter.js +1 -1
  65. package/dist/eskimiBidAdapter.js +1 -1
  66. package/dist/euidIdSystem.js +1 -1
  67. package/dist/exadsBidAdapter.js +1 -1
  68. package/dist/excoBidAdapter.js +1 -1
  69. package/dist/feedadBidAdapter.js +1 -1
  70. package/dist/finativeBidAdapter.js +1 -1
  71. package/dist/freewheel-sspBidAdapter.js +1 -1
  72. package/dist/gmosspBidAdapter.js +1 -1
  73. package/dist/gptUtils.js +1 -1
  74. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  75. package/dist/greenbidsBidAdapter.js +1 -1
  76. package/dist/greenbidsRtdProvider.js +1 -1
  77. package/dist/gridBidAdapter.js +1 -1
  78. package/dist/gumgumBidAdapter.js +1 -1
  79. package/dist/h12mediaBidAdapter.js +1 -1
  80. package/dist/hypelabBidAdapter.js +1 -1
  81. package/dist/id5AnalyticsAdapter.js +1 -1
  82. package/dist/id5IdSystem.js +1 -1
  83. package/dist/imdsBidAdapter.js +1 -1
  84. package/dist/improvedigitalBidAdapter.js +1 -1
  85. package/dist/inmobiBidAdapter.js +1 -1
  86. package/dist/insticatorBidAdapter.js +1 -1
  87. package/dist/intentIqAnalyticsAdapter.js +1 -1
  88. package/dist/ixBidAdapter.js +1 -1
  89. package/dist/jixieBidAdapter.js +1 -1
  90. package/dist/justpremiumBidAdapter.js +1 -1
  91. package/dist/kargoBidAdapter.js +1 -1
  92. package/dist/kimberliteBidAdapter.js +1 -1
  93. package/dist/konduitAnalyticsAdapter.js +1 -1
  94. package/dist/kueezBidAdapter.js +1 -1
  95. package/dist/lassoBidAdapter.js +1 -1
  96. package/dist/lifestreetBidAdapter.js +1 -1
  97. package/dist/liveIntentId.js +1 -1
  98. package/dist/logicadBidAdapter.js +1 -1
  99. package/dist/loglyliftBidAdapter.js +1 -1
  100. package/dist/luceadBidAdapter.js +1 -1
  101. package/dist/luponmediaBidAdapter.js +1 -1
  102. package/dist/mabidderBidAdapter.js +1 -1
  103. package/dist/madsenseBidAdapter.js +1 -1
  104. package/dist/magniteAnalyticsAdapter.js +1 -1
  105. package/dist/malltvAnalyticsAdapter.js +1 -1
  106. package/dist/marsmediaBidAdapter.js +1 -1
  107. package/dist/mediafuseBidAdapter.js +1 -1
  108. package/dist/medianetBidAdapter.js +1 -1
  109. package/dist/medianetUtils.js +1 -1
  110. package/dist/mediasquareBidAdapter.js +1 -1
  111. package/dist/mgidBidAdapter.js +1 -1
  112. package/dist/missenaBidAdapter.js +1 -1
  113. package/dist/mobilefuseBidAdapter.js +1 -1
  114. package/dist/nativeryBidAdapter.js +1 -0
  115. package/dist/nextMillenniumBidAdapter.js +1 -1
  116. package/dist/nexx360Utils.js +1 -1
  117. package/dist/nobidAnalyticsAdapter.js +1 -1
  118. package/dist/nobidBidAdapter.js +1 -1
  119. package/dist/nodalsAiRtdProvider.js +1 -1
  120. package/dist/not-for-prod/prebid.js +187 -184
  121. package/dist/oguryBidAdapter.js +1 -1
  122. package/dist/onetagBidAdapter.js +1 -1
  123. package/dist/ooloAnalyticsAdapter.js +1 -1
  124. package/dist/openxBidAdapter.js +1 -1
  125. package/dist/optidigitalBidAdapter.js +1 -1
  126. package/dist/orbidderBidAdapter.js +1 -1
  127. package/dist/outbrainBidAdapter.js +1 -1
  128. package/dist/pinkLionBidAdapter.js +1 -0
  129. package/dist/pixfutureBidAdapter.js +1 -1
  130. package/dist/prebidServerBidAdapter.js +1 -1
  131. package/dist/priceFloors.js +1 -1
  132. package/dist/publinkIdSystem.js +1 -1
  133. package/dist/pubmaticAnalyticsAdapter.js +1 -1
  134. package/dist/pubmaticBidAdapter.js +1 -1
  135. package/dist/pubmaticRtdProvider.js +1 -1
  136. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  137. package/dist/pubxaiAnalyticsAdapter.js +1 -1
  138. package/dist/pubxaiRtdProvider.js +1 -1
  139. package/dist/pxyzBidAdapter.js +1 -1
  140. package/dist/quantcastBidAdapter.js +1 -1
  141. package/dist/readpeakBidAdapter.js +1 -1
  142. package/dist/relaidoBidAdapter.js +1 -1
  143. package/dist/retailspotBidAdapter.js +1 -1
  144. package/dist/rhythmoneBidAdapter.js +1 -1
  145. package/dist/riseUtils.js +1 -1
  146. package/dist/rtbhouseBidAdapter.js +1 -1
  147. package/dist/rubiconBidAdapter.js +1 -1
  148. package/dist/seedingAllianceBidAdapter.js +1 -1
  149. package/dist/seedtagBidAdapter.js +1 -1
  150. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  151. package/dist/sharethroughBidAdapter.js +1 -1
  152. package/dist/showheroes-bsBidAdapter.js +1 -1
  153. package/dist/smaatoBidAdapter.js +1 -1
  154. package/dist/smartadserverBidAdapter.js +1 -1
  155. package/dist/smartxBidAdapter.js +1 -1
  156. package/dist/smilewantedBidAdapter.js +1 -1
  157. package/dist/snigelBidAdapter.js +1 -1
  158. package/dist/sonobiBidAdapter.js +1 -1
  159. package/dist/sovrnBidAdapter.js +1 -1
  160. package/dist/sparteoBidAdapter.js +1 -1
  161. package/dist/sspBCBidAdapter.js +1 -1
  162. package/dist/stroeerCoreBidAdapter.js +1 -1
  163. package/dist/stvBidAdapter.js +1 -1
  164. package/dist/sublimeBidAdapter.js +1 -1
  165. package/dist/taboolaBidAdapter.js +1 -1
  166. package/dist/tappxBidAdapter.js +1 -1
  167. package/dist/targetVideoBidAdapter.js +1 -1
  168. package/dist/teadsBidAdapter.js +1 -1
  169. package/dist/terceptAnalyticsAdapter.js +1 -1
  170. package/dist/themoneytizerBidAdapter.js +1 -1
  171. package/dist/trionBidAdapter.js +1 -1
  172. package/dist/tripleliftBidAdapter.js +1 -1
  173. package/dist/ttdBidAdapter.js +1 -1
  174. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  175. package/dist/uid2IdSystem.js +1 -1
  176. package/dist/underdogmediaBidAdapter.js +1 -1
  177. package/dist/undertoneBidAdapter.js +1 -1
  178. package/dist/unifiedIdSystem.js +1 -1
  179. package/dist/unrulyBidAdapter.js +1 -1
  180. package/dist/userId.js +1 -1
  181. package/dist/vidazooUtils.js +1 -1
  182. package/dist/videobyteBidAdapter.js +1 -1
  183. package/dist/visxBidAdapter.js +1 -1
  184. package/dist/vuukleBidAdapter.js +1 -1
  185. package/dist/weboramaRtdProvider.js +1 -1
  186. package/dist/widespaceBidAdapter.js +1 -1
  187. package/dist/winrBidAdapter.js +1 -1
  188. package/dist/xeUtils.js +1 -1
  189. package/dist/yahooAdsBidAdapter.js +1 -1
  190. package/dist/yandexBidAdapter.js +1 -1
  191. package/dist/yieldmoBidAdapter.js +1 -1
  192. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  193. package/eslint.config.js +1 -3
  194. package/gulpHelpers.js +3 -6
  195. package/gulpfile.js +25 -24
  196. package/karma.conf.maker.js +1 -3
  197. package/libraries/advangUtils/index.js +3 -4
  198. package/libraries/blueUtils/bidderUtils.js +113 -0
  199. package/libraries/browsiUtils/browsiUtils.js +1 -2
  200. package/libraries/gptUtils/gptUtils.js +1 -2
  201. package/libraries/liveIntentId/shared.js +4 -0
  202. package/libraries/xeUtils/bidderUtils.js +3 -4
  203. package/modules/adagioBidAdapter.js +1 -2
  204. package/modules/addefendBidAdapter.md +1 -1
  205. package/modules/adtrgtmeBidAdapter.js +6 -8
  206. package/modules/aduptechBidAdapter.md +1 -1
  207. package/modules/adverxoBidAdapter.js +3 -3
  208. package/modules/blueBidAdapter.js +24 -104
  209. package/modules/bmsBidAdapter.js +25 -105
  210. package/modules/concertBidAdapter.md +1 -1
  211. package/modules/contxtfulBidAdapter.js +56 -10
  212. package/modules/conversantBidAdapter.js +0 -58
  213. package/modules/cwireBidAdapter.js +8 -0
  214. package/modules/czechAdIdSystem.js +13 -3
  215. package/modules/dynamicAdBoostRtdProvider.js +16 -33
  216. package/modules/dynamicAdBoostRtdProvider.md +1 -6
  217. package/modules/ixBidAdapter.js +2 -3
  218. package/modules/luponmediaBidAdapter.js +117 -522
  219. package/modules/luponmediaBidAdapter.md +2 -3
  220. package/modules/mediasquareBidAdapter.js +14 -20
  221. package/modules/microadBidAdapter.js +0 -1
  222. package/modules/nativeryBidAdapter.js +135 -0
  223. package/modules/nativeryBidAdapter.md +95 -0
  224. package/modules/nativoBidAdapter.js +3 -3
  225. package/modules/onetagBidAdapter.js +0 -1
  226. package/modules/pinkLionBidAdapter.js +17 -0
  227. package/modules/pinkLionBidAdapter.md +79 -0
  228. package/modules/prebidServerBidAdapter/ortbConverter.js +1 -1
  229. package/modules/priceFloors.js +2 -2
  230. package/modules/pubmaticBidAdapter.js +4 -1
  231. package/modules/qortexRtdProvider.md +1 -1
  232. package/modules/reconciliationRtdProvider.md +4 -4
  233. package/modules/rtbhouseBidAdapter.js +4 -83
  234. package/modules/rubiconBidAdapter.js +1 -1
  235. package/modules/sspBCBidAdapter.js +1 -1
  236. package/modules/stroeerCoreBidAdapter.js +3 -3
  237. package/modules/stvBidAdapter.js +19 -14
  238. package/modules/topicsFpdModule.md +1 -1
  239. package/modules/unifiedIdSystem.js +8 -1
  240. package/modules/userId/eids.js +15 -0
  241. package/modules/videoModule/index.js +0 -1
  242. package/modules/videoModule/videoImpressionVerifier.js +0 -1
  243. package/modules/yieldlabBidAdapter.js +1 -2
  244. package/modules/yieldmoBidAdapter.js +1 -2
  245. package/package.json +13 -20
  246. package/src/Renderer.js +1 -2
  247. package/src/adapterManager.js +14 -4
  248. package/src/auction.js +2 -3
  249. package/src/config.js +1 -2
  250. package/src/cpmBucketManager.js +1 -2
  251. package/src/secureCreatives.js +2 -3
  252. package/src/targeting.js +1 -2
  253. package/test/fake-server/README.md +3 -3
  254. package/test/helpers/index_adapter_utils.js +2 -2
  255. package/test/helpers/testing-utils.js +1 -1
  256. package/test/spec/auctionmanager_spec.js +2 -3
  257. package/test/spec/fpd/enrichment_spec.js +1 -1
  258. package/test/spec/libraries/greedy/greedyPromise_spec.js +2 -2
  259. package/test/spec/modules/adfBidAdapter_spec.js +1 -1
  260. package/test/spec/modules/adnuntiusBidAdapter_spec.js +25 -9
  261. package/test/spec/modules/adtrgtmeBidAdapter_spec.js +2 -4
  262. package/test/spec/modules/adverxoBidAdapter_spec.js +25 -1
  263. package/test/spec/modules/afpBidAdapter_spec.js +0 -1
  264. package/test/spec/modules/bliinkBidAdapter_spec.js +15 -7
  265. package/test/spec/modules/contxtfulBidAdapter_spec.js +606 -82
  266. package/test/spec/modules/conversantBidAdapter_spec.js +1 -139
  267. package/test/spec/modules/cwireBidAdapter_spec.js +2 -2
  268. package/test/spec/modules/czechAdIdSystem_spec.js +4 -4
  269. package/test/spec/modules/displayioBidAdapter_spec.js +1 -1
  270. package/test/spec/modules/dynamicAdBoostRtdProvider_spec.js +0 -42
  271. package/test/spec/modules/enrichmentLiftMeasurement_spec.js +8 -8
  272. package/test/spec/modules/hypelabBidAdapter_spec.js +17 -11
  273. package/test/spec/modules/iasRtdProvider_spec.js +2 -2
  274. package/test/spec/modules/id5IdSystem_spec.js +1 -1
  275. package/test/spec/modules/idxIdSystem_spec.js +1 -2
  276. package/test/spec/modules/intentIqAnalyticsAdapter_spec.js +25 -25
  277. package/test/spec/modules/intentIqIdSystem_spec.js +32 -32
  278. package/test/spec/modules/kargoBidAdapter_spec.js +11 -5
  279. package/test/spec/modules/liveIntentIdSystem_spec.js +14 -0
  280. package/test/spec/modules/lmpIdSystem_spec.js +1 -2
  281. package/test/spec/modules/lockrAIMIdSystem_spec.js +2 -2
  282. package/test/spec/modules/luceadBidAdapter_spec.js +1 -1
  283. package/test/spec/modules/luponmediaBidAdapter_spec.js +186 -324
  284. package/test/spec/modules/mediaeyesBidAdapter_spec.js +1 -1
  285. package/test/spec/modules/mediakeysBidAdapter_spec.js +1 -2
  286. package/test/spec/modules/mediasquareBidAdapter_spec.js +13 -2
  287. package/test/spec/modules/missenaBidAdapter_spec.js +1 -1
  288. package/test/spec/modules/nativeryBidAdapter_spec.js +195 -0
  289. package/test/spec/modules/nexx360BidAdapter_spec.js +6 -6
  290. package/test/spec/modules/oguryBidAdapter_spec.js +2 -2
  291. package/test/spec/modules/omsBidAdapter_spec.js +1 -1
  292. package/test/spec/modules/onetagBidAdapter_spec.js +1 -2
  293. package/test/spec/modules/onomagicBidAdapter_spec.js +2 -2
  294. package/test/spec/modules/overtoneRtdProvider_spec.mjs +1 -1
  295. package/test/spec/modules/permutiveIdentityManagerIdSystem_spec.js +17 -14
  296. package/test/spec/modules/pinkLionBidAdapter_spec.js +480 -0
  297. package/test/spec/modules/prebidServerBidAdapter_spec.js +2 -2
  298. package/test/spec/modules/previousAuctionInfo_spec.js +2 -2
  299. package/test/spec/modules/pubmaticAnalyticsAdapter_spec.js +1 -1
  300. package/test/spec/modules/pubmaticBidAdapter_spec.js +19 -1
  301. package/test/spec/modules/pubmaticRtdProvider_spec.js +16 -17
  302. package/test/spec/modules/pubwiseAnalyticsAdapter_spec.js +2 -2
  303. package/test/spec/modules/rtbhouseBidAdapter_spec.js +0 -182
  304. package/test/spec/modules/rubiconBidAdapter_spec.js +3 -4
  305. package/test/spec/modules/sizeMappingV2_spec.js +1 -1
  306. package/test/spec/modules/sizeMapping_spec.js +2 -3
  307. package/test/spec/modules/stroeerCoreBidAdapter_spec.js +36 -26
  308. package/test/spec/modules/stvBidAdapter_spec.js +108 -40
  309. package/test/spec/modules/topLevelPaapi_spec.js +1 -1
  310. package/test/spec/modules/tpmnBidAdapter_spec.js +1 -1
  311. package/test/spec/modules/ttdBidAdapter_spec.js +1 -1
  312. package/test/spec/modules/unifiedIdSystem_spec.js +20 -0
  313. package/test/spec/modules/userId_spec.js +1 -1
  314. package/test/spec/modules/vibrantmediaBidAdapter_spec.js +1 -1
  315. package/test/spec/modules/videoModule/submodules/videojsVideoProvider_spec.js +1 -1
  316. package/test/spec/modules/yieldmoBidAdapter_spec.js +2 -2
  317. package/test/spec/modules/zeotapIdPlusIdSystem_spec.js +1 -2
  318. package/test/spec/unit/core/adapterManager_spec.js +29 -17
  319. package/test/spec/unit/core/targeting_spec.js +1 -1
  320. package/test/spec/unit/pbjs_api_spec.js +4 -5
  321. package/test/spec/utils_spec.js +20 -12
  322. package/test/test_deps.js +1 -1
  323. package/nightwatch.browserstack.json +0 -46
  324. package/nightwatch.conf.js +0 -36
  325. package/nightwatch.json +0 -40
@@ -58,11 +58,11 @@ export const spec = {
58
58
  schain: anyBid.schain
59
59
  };
60
60
 
61
- const userIds = anyBid.userId;
61
+ const eids = anyBid.userIdAsEids;
62
62
 
63
- if (!isEmpty(userIds)) {
63
+ if (!isEmpty(eids)) {
64
64
  basePayload.user = {
65
- euids: userIds
65
+ eids: eids
66
66
  };
67
67
  }
68
68
 
@@ -191,43 +191,48 @@ function serializeSChain(schain) {
191
191
  function serializeUids(bidRequest) {
192
192
  let uids = [];
193
193
 
194
- let id5 = deepAccess(bidRequest, 'userId.id5id.uid');
194
+ if (bidRequest.userIdAsEids === undefined || !Array.isArray(bidRequest.userIdAsEids)) {
195
+ return '';
196
+ }
197
+
198
+ let buids = {};
199
+ bidRequest.userIdAsEids.forEach((src) => (buids[deepAccess(src, 'source')] = deepAccess(src, 'uids.0')));
200
+
201
+ let id5 = deepAccess(buids['id5-sync.com'], 'id');
195
202
  if (id5) {
196
203
  uids.push(encodeURIComponent('id5:' + id5));
197
- let id5Linktype = deepAccess(bidRequest, 'userId.id5id.ext.linkType');
204
+ let id5Linktype = deepAccess(buids['id5-sync.com'], 'ext.linkType');
198
205
  if (id5Linktype) {
199
206
  uids.push(encodeURIComponent('id5_linktype:' + id5Linktype));
200
207
  }
201
208
  }
202
- let netId = deepAccess(bidRequest, 'userId.netId');
209
+ let netId = deepAccess(buids['netid.de'], 'id');
203
210
  if (netId) {
204
211
  uids.push(encodeURIComponent('netid:' + netId));
205
212
  }
206
- let uId2 = deepAccess(bidRequest, 'userId.uid2.id');
213
+ let uId2 = deepAccess(buids['uidapi.com'], 'id');
207
214
  if (uId2) {
208
215
  uids.push(encodeURIComponent('uid2:' + uId2));
209
216
  }
210
- let sharedId = deepAccess(bidRequest, 'userId.sharedid.id');
217
+ let sharedId = deepAccess(buids['pubcid.org'], 'id');
211
218
  if (sharedId) {
212
219
  uids.push(encodeURIComponent('sharedid:' + sharedId));
213
220
  }
214
- let liverampId = deepAccess(bidRequest, 'userId.idl_env');
221
+ let liverampId = deepAccess(buids['liveramp.com'], 'id');
215
222
  if (liverampId) {
216
223
  uids.push(encodeURIComponent('liverampid:' + liverampId));
217
224
  }
218
- let criteoId = deepAccess(bidRequest, 'userId.criteoId');
225
+ let criteoId = deepAccess(buids['criteo.com'], 'id');
219
226
  if (criteoId) {
220
227
  uids.push(encodeURIComponent('criteoid:' + criteoId));
221
228
  }
222
- // documentation missing...
223
- let utiqId = deepAccess(bidRequest, 'userId.utiq.id');
229
+ let utiqId = deepAccess(buids['utiq.com'], 'id');
224
230
  if (utiqId) {
225
231
  uids.push(encodeURIComponent('utiq:' + utiqId));
226
- } else {
227
- utiqId = deepAccess(bidRequest, 'userId.utiq');
228
- if (utiqId) {
229
- uids.push(encodeURIComponent('utiq:' + utiqId));
230
- }
232
+ }
233
+ let euidId = deepAccess(buids['euid.eu'], 'id');
234
+ if (euidId) {
235
+ uids.push(encodeURIComponent('euid:' + euidId));
231
236
  }
232
237
 
233
238
  return uids.join(',');
@@ -84,7 +84,7 @@ pbjs.setConfig({
84
84
  | Field | Required? | Type | Description |
85
85
  |---|---|---|---|
86
86
  | topics.maxTopicCaller | no | integer | Defines the maximum numbers of Bidders Iframe which needs to be loaded on the publisher page. Default is 1 which is hardcoded in Module. Eg: topics.maxTopicCaller is set to 3. If there are 10 bidders configured along with their iframe URLS, random 3 bidders iframe URL is loaded which will call TOPICS API. If topics.maxTopicCaller is set to 0, it will load random 1(default) bidder iframe atleast. |
87
- | topics.bidders | no | Array of objects | Array of topics callers with the iframe locations and other necessary informations like bidder(Bidder code) and expiry. Default Array of topics in the module itself.|
87
+ | topics.bidders | no | Array of objects | Array of topics callers with the iframe locations and other necessary information like bidder(Bidder code) and expiry. Default Array of topics in the module itself.|
88
88
  | topics.bidders[].bidder | yes | string | Bidder Code of the bidder(SSP). |
89
89
  | topics.bidders[].iframeURL | yes | string | URL which is hosted on bidder/SSP/third-party domains which will call Topics API. |
90
90
  | topics.bidders[].expiry | no | integer | Max number of days where Topics data will be persist. If Data is stored for more than mentioned expiry day, it will be deleted from storage. Default is 21 days which is hardcoded in Module. |
@@ -75,7 +75,14 @@ export const unifiedIdSubmodule = {
75
75
  };
76
76
  return {callback: resp};
77
77
  },
78
- eids: {...UID1_EIDS}
78
+ eids: {
79
+ tdid: {
80
+ ...UID1_EIDS.tdid,
81
+ mm: 4,
82
+ inserter: 'adserver.org',
83
+ matcher: 'adserver.org'
84
+ }
85
+ }
79
86
  };
80
87
 
81
88
  submodule('userId', unifiedIdSubmodule);
@@ -22,6 +22,21 @@ function createEidObject(userIdData, subModuleKey, eidConf) {
22
22
  }
23
23
  }
24
24
  eid.uids = [uid];
25
+ if (eidConf['inserter'] || isFn(eidConf['getInserter'])) {
26
+ const inserter = isFn(eidConf['getInserter']) ? eidConf['getInserter'](userIdData) : eidConf['inserter'];
27
+ if (inserter != null) {
28
+ eid.inserter = inserter;
29
+ }
30
+ }
31
+ if (eidConf['matcher'] || isFn(eidConf['getMatcher'])) {
32
+ const matcher = isFn(eidConf['getMatcher']) ? eidConf['getMatcher'](userIdData) : eidConf['matcher'];
33
+ if (matcher != null) {
34
+ eid.matcher = matcher;
35
+ }
36
+ }
37
+ if (eidConf['mm'] != null) {
38
+ eid.mm = eidConf['mm'];
39
+ }
25
40
  // getEidExt
26
41
  if (isFn(eidConf['getEidExt'])) {
27
42
  const eidExt = eidConf['getEidExt'](userIdData);
@@ -1,5 +1,4 @@
1
1
  import { config } from '../../src/config.js';
2
- import { } from '../../src/polyfill.js';
3
2
  import * as events from '../../src/events.js';
4
3
  import {mergeDeep, logWarn, logError} from '../../src/utils.js';
5
4
  import { getGlobal } from '../../src/prebidGlobal.js';
@@ -1,4 +1,3 @@
1
- import { } from '../../src/polyfill.js';
2
1
  import { vastXmlEditorFactory } from '../../libraries/video/shared/vastXmlEditor.js';
3
2
  import { generateUUID } from '../../src/utils.js';
4
3
 
@@ -1,6 +1,5 @@
1
1
  import { _each, deepAccess, isArray, isEmptyStr, isFn, isPlainObject, timestamp } from '../src/utils.js';
2
2
  import { registerBidder } from '../src/adapters/bidderFactory.js';
3
- import { } from '../src/polyfill.js';
4
3
  import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
5
4
  import { Renderer } from '../src/Renderer.js';
6
5
  import { convertOrtbRequestToProprietaryNative } from '../src/native.js';
@@ -450,7 +449,7 @@ function getContentObject(bid) {
450
449
  * Creates a string for iab_content object by
451
450
  * 1. flatten the iab content object
452
451
  * 2. encoding the values
453
- * 3. joining array of defined keys ('keyword', 'cat') into one value seperated with '|'
452
+ * 3. joining array of defined keys ('keyword', 'cat') into one value separated with '|'
454
453
  * 4. encoding the whole string
455
454
  * @param {Object} iabContent
456
455
  * @returns {String}
@@ -17,7 +17,6 @@ import {
17
17
  import {BANNER, VIDEO} from '../src/mediaTypes.js';
18
18
  import {registerBidder} from '../src/adapters/bidderFactory.js';
19
19
  import {Renderer} from '../src/Renderer.js';
20
- import {find} from '../src/polyfill.js';
21
20
 
22
21
  /**
23
22
  * @typedef {import('../src/adapters/bidderFactory.js').BidRequest} BidRequest
@@ -326,7 +325,7 @@ function createNewBannerBid(response) {
326
325
  * @param bidRequest server request
327
326
  */
328
327
  function createNewVideoBid(response, bidRequest) {
329
- const imp = find((deepAccess(bidRequest, 'data.imp') || []), imp => imp.id === response.impid);
328
+ const imp = (deepAccess(bidRequest, 'data.imp') || []).find(imp => imp.id === response.impid);
330
329
 
331
330
  let result = {
332
331
  dealId: response.dealid,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prebid.js",
3
- "version": "9.46.0",
3
+ "version": "9.48.0",
4
4
  "description": "Header Bidding Management Library",
5
5
  "main": "src/prebid.public.js",
6
6
  "exports": {
@@ -46,6 +46,7 @@
46
46
  },
47
47
  "devDependencies": {
48
48
  "@babel/eslint-parser": "^7.16.5",
49
+ "@babel/plugin-transform-runtime": "^7.27.4",
49
50
  "@babel/register": "^7.24.6",
50
51
  "@eslint/compat": "^1.2.7",
51
52
  "@wdio/browserstack-service": "^9.0.5",
@@ -54,7 +55,6 @@
54
55
  "@wdio/local-runner": "^9.0.5",
55
56
  "@wdio/mocha-framework": "^9.12.6",
56
57
  "@wdio/spec-reporter": "^8.29.0",
57
- "ajv": "6.12.3",
58
58
  "assert": "^2.0.0",
59
59
  "babel-loader": "^8.0.5",
60
60
  "babel-plugin-istanbul": "^6.1.1",
@@ -63,15 +63,15 @@
63
63
  "coveralls": "^3.1.0",
64
64
  "deep-equal": "^2.0.3",
65
65
  "documentation": "^14.0.0",
66
- "es5-shim": "^4.5.14",
67
66
  "eslint": "^9.22.0",
68
67
  "eslint-plugin-import": "^2.31.0",
69
68
  "eslint-plugin-jsdoc": "^50.6.6",
70
69
  "execa": "^1.0.0",
71
70
  "faker": "^5.5.3",
72
- "fs.extra": "^1.3.2",
71
+ "fancy-log": "^2.0.0",
72
+ "fs-extra": "^11.3.0",
73
73
  "globals": "^16.0.0",
74
- "gulp": "^4.0.2",
74
+ "gulp": "^5.0.1",
75
75
  "gulp-clean": "^0.4.0",
76
76
  "gulp-concat": "^2.6.0",
77
77
  "gulp-connect": "^5.7.0",
@@ -79,10 +79,6 @@
79
79
  "gulp-js-escape": "^1.0.1",
80
80
  "gulp-rename": "^2.0.0",
81
81
  "gulp-replace": "^1.0.0",
82
- "gulp-shell": "^0.8.0",
83
- "gulp-sourcemaps": "^3.0.0",
84
- "gulp-terser": "^2.0.1",
85
- "gulp-util": "^3.0.0",
86
82
  "is-docker": "^2.2.1",
87
83
  "istanbul": "^0.4.5",
88
84
  "karma": "^6.3.2",
@@ -92,9 +88,7 @@
92
88
  "karma-chrome-launcher": "^3.1.0",
93
89
  "karma-coverage": "^2.0.1",
94
90
  "karma-coverage-istanbul-reporter": "^3.0.3",
95
- "karma-es5-shim": "^0.0.4",
96
91
  "karma-firefox-launcher": "^2.1.0",
97
- "karma-ie-launcher": "^1.0.0",
98
92
  "karma-mocha": "^2.0.1",
99
93
  "karma-mocha-reporter": "^2.2.5",
100
94
  "karma-opera-launcher": "^1.0.0",
@@ -110,6 +104,7 @@
110
104
  "neostandard": "^0.12.1",
111
105
  "node-html-parser": "^6.1.5",
112
106
  "opn": "^5.4.0",
107
+ "plugin-error": "^2.0.1",
113
108
  "resolve-from": "^5.0.0",
114
109
  "sinon": "^4.5.0",
115
110
  "through2": "^4.0.2",
@@ -127,17 +122,15 @@
127
122
  "yargs": "^1.3.1"
128
123
  },
129
124
  "dependencies": {
130
- "@babel/core": "^7.25.2",
131
- "@babel/plugin-transform-runtime": "^7.18.9",
132
- "@babel/preset-env": "^7.16.8",
133
- "@babel/runtime": "^7.18.9",
134
- "core-js": "^3.13.0",
135
- "core-js-pure": "^3.13.0",
125
+ "@babel/core": "^7.27.4",
126
+ "@babel/preset-env": "^7.27.2",
127
+ "@babel/runtime": "^7.27.6",
128
+ "core-js": "^3.42.0",
136
129
  "crypto-js": "^4.2.0",
137
- "dlv": "1.1.3",
138
- "dset": "3.1.4",
130
+ "dlv": "^1.1.3",
131
+ "dset": "^3.1.4",
139
132
  "express": "^4.15.4",
140
- "fun-hooks": "^0.9.9",
133
+ "fun-hooks": "^0.9.10",
141
134
  "gulp-wrap": "^0.15.0",
142
135
  "klona": "^2.0.6",
143
136
  "live-connect-js": "^7.2.0"
package/src/Renderer.js CHANGED
@@ -2,7 +2,6 @@ import { loadExternalScript } from './adloader.js';
2
2
  import {
3
3
  logError, logWarn, logMessage
4
4
  } from './utils.js';
5
- import {find} from './polyfill.js';
6
5
  import {getGlobal} from './prebidGlobal.js';
7
6
  import { MODULE_TYPE_PREBID } from './activities/modules.js';
8
7
 
@@ -136,7 +135,7 @@ export function executeRenderer(renderer, bid, doc) {
136
135
 
137
136
  function isRendererPreferredFromAdUnit(adUnitCode) {
138
137
  const adUnits = pbjsInstance.adUnits;
139
- const adUnit = find(adUnits, adUnit => {
138
+ const adUnit = adUnits.find(adUnit => {
140
139
  return adUnit.code === adUnitCode;
141
140
  });
142
141
 
@@ -27,7 +27,6 @@ import {newBidder} from './adapters/bidderFactory.js';
27
27
  import {ajaxBuilder} from './ajax.js';
28
28
  import {config, RANDOM} from './config.js';
29
29
  import {hook} from './hook.js';
30
- import {find} from './polyfill.js';
31
30
  import {
32
31
  getAuctionsCounter,
33
32
  getBidderRequestsCounter,
@@ -309,13 +308,24 @@ adapterManager.makeBidRequests = hook('sync', function (adUnits, auctionStart, a
309
308
  const ortb2 = ortb2Fragments.global || {};
310
309
  const bidderOrtb2 = ortb2Fragments.bidder || {};
311
310
 
311
+ function moveUserEidsToExt(o) {
312
+ const eids = o.user?.eids;
313
+ if (Array.isArray(eids) && eids.length) {
314
+ o.user.ext = o.user.ext || {};
315
+ o.user.ext.eids = [...(o.user.ext.eids || []), ...eids];
316
+ delete o.user.eids;
317
+ }
318
+ }
319
+
312
320
  function addOrtb2(bidderRequest, s2sActivityParams) {
313
321
  const redact = dep.redact(
314
322
  s2sActivityParams != null
315
323
  ? s2sActivityParams
316
324
  : activityParams(MODULE_TYPE_BIDDER, bidderRequest.bidderCode)
317
325
  );
318
- const fpd = Object.freeze(redact.ortb2(mergeDeep({source: {tid: auctionId}}, ortb2, bidderOrtb2[bidderRequest.bidderCode])));
326
+ const merged = mergeDeep({source: {tid: auctionId}}, ortb2, bidderOrtb2[bidderRequest.bidderCode]);
327
+ moveUserEidsToExt(merged);
328
+ const fpd = Object.freeze(redact.ortb2(merged));
319
329
  bidderRequest.ortb2 = fpd;
320
330
  bidderRequest.bids = bidderRequest.bids.map((bid) => {
321
331
  bid.ortb2 = fpd;
@@ -356,8 +366,8 @@ adapterManager.makeBidRequests = hook('sync', function (adUnits, auctionStart, a
356
366
  // this is to keep consistency and only allow bids/adunits that passed the checks to go to pbs
357
367
  adUnitsS2SCopy.forEach((adUnitCopy) => {
358
368
  let validBids = adUnitCopy.bids.filter((adUnitBid) =>
359
- find(bidRequests, request =>
360
- find(request.bids, (reqBid) => reqBid.bidId === adUnitBid.bid_id)));
369
+ bidRequests.find(request =>
370
+ request.bids.find((reqBid) => reqBid.bidId === adUnitBid.bid_id)));
361
371
  adUnitCopy.bids = validBids;
362
372
  });
363
373
 
package/src/auction.js CHANGED
@@ -84,7 +84,6 @@ import {Renderer} from './Renderer.js';
84
84
  import {config} from './config.js';
85
85
  import {userSync} from './userSync.js';
86
86
  import {hook, ignoreCallbackArg} from './hook.js';
87
- import {find} from './polyfill.js';
88
87
  import {OUTSTREAM} from './video.js';
89
88
  import {VIDEO} from './mediaTypes.js';
90
89
  import {auctionManager} from './auctionManager.js';
@@ -839,7 +838,7 @@ export function getStandardBidderSettings(mediaType, bidderCode) {
839
838
 
840
839
  // Adding hb_uuid + hb_cache_id
841
840
  [TARGETING_KEYS.UUID, TARGETING_KEYS.CACHE_ID].forEach(targetingKeyVal => {
842
- if (typeof find(adserverTargeting, kvPair => kvPair.key === targetingKeyVal) === 'undefined') {
841
+ if (typeof adserverTargeting.find(kvPair => kvPair.key === targetingKeyVal) === 'undefined') {
843
842
  adserverTargeting.push(createKeyVal(targetingKeyVal, 'videoCacheKey'));
844
843
  }
845
844
  });
@@ -848,7 +847,7 @@ export function getStandardBidderSettings(mediaType, bidderCode) {
848
847
  if (config.getConfig('cache.url') && (!bidderCode || bidderSettings.get(bidderCode, 'sendStandardTargeting') !== false)) {
849
848
  const urlInfo = parseUrl(config.getConfig('cache.url'));
850
849
 
851
- if (typeof find(adserverTargeting, targetingKeyVal => targetingKeyVal.key === TARGETING_KEYS.CACHE_HOST) === 'undefined') {
850
+ if (typeof adserverTargeting.find(targetingKeyVal => targetingKeyVal.key === TARGETING_KEYS.CACHE_HOST) === 'undefined') {
852
851
  adserverTargeting.push(createKeyVal(TARGETING_KEYS.CACHE_HOST, function(bidResponse) {
853
852
  return bidResponse?.adserverTargeting?.[TARGETING_KEYS.CACHE_HOST] || urlInfo.hostname;
854
853
  }));
package/src/config.js CHANGED
@@ -13,7 +13,6 @@
13
13
  */
14
14
 
15
15
  import {isValidPriceConfig} from './cpmBucketManager.js';
16
- import {find} from './polyfill.js';
17
16
  import {
18
17
  deepAccess,
19
18
  deepClone,
@@ -151,7 +150,7 @@ function attachProperties(config, useDefaultValues = true) {
151
150
  return config;
152
151
 
153
152
  function hasGranularity(val) {
154
- return find(Object.keys(GRANULARITY_OPTIONS), option => val === GRANULARITY_OPTIONS[option]);
153
+ return Object.keys(GRANULARITY_OPTIONS).find(option => val === GRANULARITY_OPTIONS[option]);
155
154
  }
156
155
 
157
156
  function validatePriceGranularity(val) {
@@ -1,4 +1,3 @@
1
- import {find} from './polyfill.js';
2
1
  import { isEmpty, logWarn } from './utils.js';
3
2
  import { config } from './config.js';
4
3
 
@@ -81,7 +80,7 @@ function getCpmStringValue(cpm, config, granularityMultiplier) {
81
80
  });
82
81
 
83
82
  let bucketFloor = 0;
84
- let bucket = find(config.buckets, bucket => {
83
+ let bucket = config.buckets.find(bucket => {
85
84
  if (cpm > cap.max * granularityMultiplier) {
86
85
  // cpm exceeds cap, just return the cap.
87
86
  let precision = bucket.precision;
@@ -6,7 +6,6 @@
6
6
  import {getAllAssetsMessage, getAssetMessage} from './native.js';
7
7
  import {BID_STATUS, MESSAGES} from './constants.js';
8
8
  import {isApnGetTagDefined, isGptPubadsDefined, logError, logWarn} from './utils.js';
9
- import {find} from './polyfill.js';
10
9
  import {
11
10
  deferRendering,
12
11
  getBidToRender,
@@ -172,8 +171,8 @@ export function resizeRemoteCreative({instl, adId, adUnitCode, width, height}) {
172
171
  }
173
172
 
174
173
  function getDfpElementId(adId) {
175
- const slot = find(window.googletag.pubads().getSlots(), slot => {
176
- return find(slot.getTargetingKeys(), key => {
174
+ const slot = window.googletag.pubads().getSlots().find(slot => {
175
+ return slot.getTargetingKeys().find(key => {
177
176
  return slot.getTargeting(key).includes(adId);
178
177
  });
179
178
  });
package/src/targeting.js CHANGED
@@ -15,7 +15,6 @@ import * as events from './events.js';
15
15
  import { hook } from './hook.js';
16
16
  import { ADPOD } from './mediaTypes.js';
17
17
  import { NATIVE_TARGETING_KEYS } from './native.js';
18
- import {find} from './polyfill.js';
19
18
  import {
20
19
  deepAccess,
21
20
  deepClone,
@@ -254,7 +253,7 @@ export function newTargeting(auctionManager) {
254
253
  // check if key is in default keys, if not, it's custom, we won't remove it.
255
254
  const isCustom = defaultKeys.filter(defaultKey => key.indexOf(defaultKeyring[defaultKey]) === 0).length === 0;
256
255
  // check if key explicitly allowed, if not, we'll remove it.
257
- const found = isCustom || find(allowedKeys, allowedKey => {
256
+ const found = isCustom || allowedKeys.find(allowedKey => {
258
257
  const allowedKeyName = defaultKeyring[allowedKey];
259
258
  // we're looking to see if the key exactly starts with one of our default keys.
260
259
  // (which hopefully means it's not custom)
@@ -9,9 +9,9 @@ All the `request-response` pairs are stored in the `fixtures/` directory. They a
9
9
 
10
10
  Follow the steps below to add another `request-response` pair.
11
11
 
12
- 1. Inside the `/fixtures` directory, create a directory and give it a suitable name.
13
- - If you are creating a one-off type of test, you can name this directory with a name that describes the test; for example `basic-banner`.
14
- - If you plan to create a series of tests focusing on one feature/topic, then you can create a generic container directory to hold all your tests together; for example `longform`.
12
+ 1. Inside the `/fixtures` directory, create a directory and give it a suitable name.
13
+ - If you are creating a one-off type of test, you can name this directory with a name that describes the test; for example `basic-banner`.
14
+ - If you plan to create a series of tests focusing on one feature/topic, then you can create a generic container directory to hold all your tests together; for example `longform`.
15
15
  - If you did the latter case, please proceed to create the necessary test directories describing them with a meaningful and **unique** test name.
16
16
  2. If you are planning to handle multiple bidder requests as part of your tests, you will need to create a specific directory for each request. For example, you could create a pair named like so `longform_biddersettings_1` and `longform_biddersettings_2`.
17
17
  3. Once all your directories are created, inside the bottom test folder(s), create **three files**:
@@ -79,11 +79,11 @@ exports.createBidSlots = function(numSlot, numSize) {
79
79
  if (typeof numSlot === 'undefined') numSlot = 1;
80
80
  if (typeof numSize === 'undefined') numSize = 1;
81
81
 
82
- var bids = new Array(numSlot);
82
+ var bids = Array(numSlot);
83
83
 
84
84
  var mkPlacementCode = function(i, j) { return DefaultPlacementCodePrefix + i + '_' + j; };
85
85
  for (var i = 0; i < bids.length; i++) {
86
- var requestSizes = new Array(numSize);
86
+ var requestSizes = Array(numSize);
87
87
  for (var j = 0; j < requestSizes.length; j++) requestSizes[j] = AllowedAdUnits[(i + j) % AllowedAdUnits.length];
88
88
 
89
89
  bids[i] = _createBidSlot(mkPlacementCode(i, j), 'slot-' + i, requestSizes, {
@@ -1,4 +1,4 @@
1
-
1
+
2
2
  const {expect} = require('chai');
3
3
  const DEFAULT_TIMEOUT = 2000;
4
4
  const utils = {
@@ -14,7 +14,6 @@ import { createBid } from 'src/bidfactory.js';
14
14
  import { config } from 'src/config.js';
15
15
  import {_internal as store} from 'src/videoCache.js';
16
16
  import * as ajaxLib from 'src/ajax.js';
17
- import {find} from 'src/polyfill.js';
18
17
  import { server } from 'test/mocks/xhr.js';
19
18
  import {hook} from '../../src/hook.js';
20
19
  import {auctionManager} from '../../src/auctionManager.js';
@@ -1249,7 +1248,7 @@ describe('auctionmanager.js', function () {
1249
1248
  it('should use renderers on bid response', () => {
1250
1249
  auction.callBids();
1251
1250
 
1252
- const addedBid = find(auction.getBidsReceived(), bid => bid.adUnitCode === ADUNIT_CODE);
1251
+ const addedBid = auction.getBidsReceived().find(bid => bid.adUnitCode === ADUNIT_CODE);
1253
1252
  assert.equal(addedBid.renderer.url, 'renderer.js');
1254
1253
  });
1255
1254
 
@@ -1693,7 +1692,7 @@ describe('auctionmanager.js', function () {
1693
1692
  assert.equal(auctionBidRequests.length > 0, true);
1694
1693
  assert.equal(Array.isArray(auctionBidRequests[0].bids), true);
1695
1694
 
1696
- const bid = find(auctionBidRequests[0].bids, bid => bid.adUnitCode === ADUNIT_CODE);
1695
+ const bid = auctionBidRequests[0].bids.find(bid => bid.adUnitCode === ADUNIT_CODE);
1697
1696
  assert.equal(typeof bid !== 'undefined', true);
1698
1697
  });
1699
1698
  });
@@ -172,7 +172,7 @@ describe('FPD enrichment', () => {
172
172
  testWindows(() => win, () => {
173
173
  it('sets w/h', () => {
174
174
  const getWinDimensionsStub = sandbox.stub(utils, 'getWinDimensions');
175
-
175
+
176
176
  getWinDimensionsStub.returns({screen: {width: 321, height: 123}});
177
177
  return fpd().then(ortb2 => {
178
178
  sinon.assert.match(ortb2.device, {
@@ -24,7 +24,7 @@ describe('GreedyPromise', () => {
24
24
  let makePromise, pendingFailure, pendingSuccess;
25
25
 
26
26
  Object.entries({
27
-
27
+
28
28
  'resolver that throws': (P) => new P(() => { throw 'error' }),
29
29
  'resolver that resolves multiple times': (P) => new P((resolve) => { resolve('first'); resolve('second'); }),
30
30
  'resolver that rejects multiple times': (P) => new P((resolve, reject) => { reject('first'); reject('second') }),
@@ -74,7 +74,7 @@ describe('GreedyPromise', () => {
74
74
  .finally(() => pendingSuccess.then(() => { fval = 'finally' }))
75
75
  .catch((err) => `${err} ${fval}`)
76
76
  },
77
-
77
+
78
78
  '.finally that throws': (P) => makePromise(P, 'value').finally(() => { throw 'error' }),
79
79
  'chained .finally that rejects': (P) => makePromise(P, 'value').finally(() => P.reject('error')),
80
80
  'scalar Promise.resolve': (P) => P.resolve('scalar'),
@@ -1,5 +1,5 @@
1
1
  // jshint esversion: 6, es3: false, node: true
2
-
2
+
3
3
  import { assert } from 'chai';
4
4
  import { spec } from 'modules/adfBidAdapter.js';
5
5
  import { config } from 'src/config.js';
@@ -24,10 +24,12 @@ describe('adnuntiusBidAdapter', function () {
24
24
  }
25
25
  };
26
26
  storage = getStorageManager({ bidderCode: 'adnuntius' });
27
+ resetExpectedUrls();
27
28
  });
28
29
 
29
30
  beforeEach(() => {
30
31
  storage.setDataInLocalStorage('adn.metaData', JSON.stringify(meta));
32
+ resetExpectedUrls();
31
33
  });
32
34
 
33
35
  afterEach(function () {
@@ -35,23 +37,37 @@ describe('adnuntiusBidAdapter', function () {
35
37
  config.setBidderConfig({ bidders: [] });
36
38
  localStorage.removeItem('adn.metaData');
37
39
  sandbox.restore();
40
+ resetExpectedUrls();
38
41
  });
39
42
 
40
43
  after(() => {
41
44
  getGlobal().bidderSettings = {};
45
+ resetExpectedUrls();
42
46
  });
43
47
 
44
48
  const tzo = new Date().getTimezoneOffset();
45
- const winDimensions = getWinDimensions();
46
- const screen = winDimensions.screen.availWidth + 'x' + winDimensions.screen.availHeight;
47
- const viewport = winDimensions.innerWidth + 'x' + winDimensions.innerHeight;
48
49
  const prebidVersion = getGlobal().version;
49
- const ENDPOINT_URL_BASE = `${URL}${tzo}&format=prebid&pbv=${prebidVersion}&screen=${screen}&viewport=${viewport}`;
50
- const ENDPOINT_URL = `${ENDPOINT_URL_BASE}&userId=${usi}`;
51
- const LOCALHOST_URL = `http://localhost:8078/i?tzo=${tzo}&format=prebid&pbv=${prebidVersion}&screen=${screen}&viewport=${viewport}&userId=${usi}`;
52
- const ENDPOINT_URL_NOCOOKIE = `${ENDPOINT_URL_BASE}&userId=${usi}&noCookies=true`;
53
- const ENDPOINT_URL_SEGMENTS = `${ENDPOINT_URL_BASE}&segments=segment1,segment2,segment3&userId=${usi}`;
54
- const ENDPOINT_URL_CONSENT = `${EURO_URL}${tzo}&format=prebid&pbv=${prebidVersion}&consentString=consentString&gdpr=1&screen=${screen}&viewport=${viewport}&userId=${usi}`;
50
+
51
+ let screen;
52
+ let viewport;
53
+ let ENDPOINT_URL_BASE;
54
+ let ENDPOINT_URL;
55
+ let LOCALHOST_URL;
56
+ let ENDPOINT_URL_NOCOOKIE;
57
+ let ENDPOINT_URL_SEGMENTS;
58
+ let ENDPOINT_URL_CONSENT;
59
+
60
+ function resetExpectedUrls() {
61
+ const winDimensions = getWinDimensions();
62
+ screen = winDimensions.screen.availWidth + 'x' + winDimensions.screen.availHeight;
63
+ viewport = winDimensions.innerWidth + 'x' + winDimensions.innerHeight;
64
+ ENDPOINT_URL_BASE = `${URL}${tzo}&format=prebid&pbv=${prebidVersion}&screen=${screen}&viewport=${viewport}`;
65
+ ENDPOINT_URL = `${ENDPOINT_URL_BASE}&userId=${usi}`;
66
+ LOCALHOST_URL = `http://localhost:8078/i?tzo=${tzo}&format=prebid&pbv=${prebidVersion}&screen=${screen}&viewport=${viewport}&userId=${usi}`;
67
+ ENDPOINT_URL_NOCOOKIE = `${ENDPOINT_URL_BASE}&userId=${usi}&noCookies=true`;
68
+ ENDPOINT_URL_SEGMENTS = `${ENDPOINT_URL_BASE}&segments=segment1,segment2,segment3&userId=${usi}`;
69
+ ENDPOINT_URL_CONSENT = `${EURO_URL}${tzo}&format=prebid&pbv=${prebidVersion}&consentString=consentString&gdpr=1&screen=${screen}&viewport=${viewport}&userId=${usi}`;
70
+ }
55
71
 
56
72
  function expectUrlsEqual(actual, expected) {
57
73
  const a = utils.parseUrl(actual);
@@ -6,7 +6,7 @@ const DEFAULT_SID = '1220291391';
6
6
  const DEFAULT_ZID = '1836455615';
7
7
  const DEFAULT_PIXEL_URL = 'https://cdn.adtarget.me/libs/1x1.gif';
8
8
  const DEFAULT_BANNER_URL = 'https://cdn.adtarget.me/libs/banner/300x250.jpg';
9
- const BIDDER_VERSION = '1.0.6';
9
+ const BIDDER_VERSION = '1.0.7';
10
10
  const PREBIDJS_VERSION = '$prebid.version$';
11
11
 
12
12
  const createBidRequest = ({bidId, adUnitCode, bidOverride, zid, ortb2}) => {
@@ -268,7 +268,7 @@ describe('Adtrgtme Bid Adapter:', () => {
268
268
  };
269
269
  bidRequest.schain = globalSchain;
270
270
  const data = spec.buildRequests(validBR, bidderRequest)[0].data;
271
- const schain = data.source.ext.schain;
271
+ const schain = data.source.schain;
272
272
  expect(schain.nodes.length).to.equal(1);
273
273
  expect(schain).to.equal(globalSchain);
274
274
  });
@@ -566,10 +566,8 @@ describe('Adtrgtme Bid Adapter:', () => {
566
566
  });
567
567
 
568
568
  expect(data.regs).to.deep.equal({
569
- ext: {
570
569
  'us_privacy': '',
571
570
  gdpr: 1
572
- }
573
571
  });
574
572
 
575
573
  expect(data.cur).to.deep.equal(['USD']);