Skip to content

Commit ce42510

Browse files
Merge pull request prebid#1032 from PubMatic-OpenWrap/UOE-11674
Prebid upgrade 9.21.0 & Phase 1.5
2 parents f36c48e + d55ad31 commit ce42510

File tree

399 files changed

+68312
-20563
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

399 files changed

+68312
-20563
lines changed

.github/workflows/linter.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
3838
- name: Check out PR
3939
run: git checkout ${{ github.event.pull_request.head.sha }}
4040

41+
- name: Install dependencies
42+
run: npm ci
43+
4144
- name: Run linter on PR
4245
run: npx eslint --no-inline-config --format json $(cat __changed_files.txt | xargs stat --printf '%n\n' 2> /dev/null) > __pr.json || true
4346

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Prebid.js is open source software that is offered for free as a convenience. Whi
2626

2727
*Note:* Requires Prebid.js v1.38.0+
2828

29-
Prebid.js depends on Babel and some Babel Plugins in order to run correctly in the browser. Here are some examples for
29+
Prebid.js depends on Babel and some Babel Plugins in order to run correctly in the browser. Here are some examples for
3030
configuring webpack to work with Prebid.js.
3131

3232
With Babel 7:
@@ -37,7 +37,7 @@ module.exports = {
3737
mode: 'production',
3838
module: {
3939
rules: [
40-
40+
4141
// this rule can be excluded if you don't require babel-loader for your other application files
4242
{
4343
test: /\.m?js$/,
@@ -46,7 +46,7 @@ module.exports = {
4646
loader: 'babel-loader',
4747
}
4848
},
49-
49+
5050
// this separate rule is required to make sure that the Prebid.js files are babel-ified. this rule will
5151
// override the regular exclusion from above (for being inside node_modules).
5252
{
@@ -71,15 +71,15 @@ Or for Babel 6:
7171
// you must manually install and specify the presets and plugins yourself
7272
options: {
7373
plugins: [
74-
"transform-object-assign", // required (for IE support) and "babel-plugin-transform-object-assign"
74+
"transform-object-assign", // required (for IE support) and "babel-plugin-transform-object-assign"
7575
// must be installed as part of your package.
7676
require('prebid.js/plugins/pbjsGlobals.js') // required!
7777
],
7878
presets: [
7979
["env", { // you can use other presets if you wish.
8080
"targets": { // this example is using "babel-presets-env", which must be installed if you
8181
"browsers": [ // follow this example.
82-
... // your browser targets. they should probably match the targets you're using for the rest
82+
... // your browser targets. they should probably match the targets you're using for the rest
8383
// of your application
8484
]
8585
}
@@ -143,7 +143,7 @@ This will run testing but not linting. A web server will start at `http://localh
143143

144144
Development may be a bit slower but if you prefer linting and additional watch files you can also still run just:
145145

146-
$ gulp serve
146+
$ gulp serve
147147

148148

149149
### Build Optimization
@@ -162,11 +162,11 @@ Building with just these adapters will result in a smaller bundle which should a
162162
- Then run the build:
163163

164164
$ gulp build --modules=openxBidAdapter,rubiconBidAdapter,sovrnBidAdapter
165-
165+
166166
Alternatively, a `.json` file can be specified that contains a list of modules you would like to include.
167167

168168
$ gulp build --modules=modules.json
169-
169+
170170
With `modules.json` containing the following
171171
```json modules.json
172172
[
@@ -202,7 +202,7 @@ gulp bundle --tag one --modules=one.json
202202
gulp bundle --tag two --modules=two.json
203203
```
204204

205-
This generates slightly larger files, but has the advantage of being much faster to run (after the initial `gulp build`). It's also the method used by [the Prebid.org download page](https://docs.prebid.org/download.html).
205+
This generates slightly larger files, but has the advantage of being much faster to run (after the initial `gulp build`). It's also the method used by [the Prebid.org download page](https://docs.prebid.org/download.html).
206206

207207
<a name="Run"></a>
208208

@@ -378,7 +378,7 @@ For instructions on writing tests for Prebid.js, see [Testing Prebid.js](https:/
378378

379379
### Supported Browsers
380380

381-
Prebid.js is supported on IE11 and modern browsers until 5.x. 6.x+ transpiles to target >0.25%; not Opera Mini; not IE11.
381+
Prebid.js is supported on IE11 and modern browsers until 5.x. 6.x+ transpiles to target >0.25%; not Opera Mini; not IE11.
382382

383383
### Governance
384384
Review our governance model [here](https://github.com/prebid/Prebid.js/tree/master/governance.md).

integrationExamples/gpt/51DegreesRtdProvider_example.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
name: '51Degrees',
9393
waitForIt: true,
9494
params: {
95-
// Get your resource key from https://configure.51degrees.com/tWrhNfY6
95+
// Get your resource key from https://configure.51degrees.com/HNZ75HT1
9696
resourceKey: '<YOUR_RESOURCE_KEY>',
9797
// alternatively, you can use the on-premise version of the 51Degrees service and connect to your chosen end point
9898
// onPremiseJSUrl: 'https://localhost/51Degrees.core.js'
@@ -181,12 +181,11 @@ <h3>div-banner-native-2</h3>
181181
<h3>Testing/Debugging Guidance</h3>
182182
<ol>
183183
<li>Make sure you have <code>debug: true</code> under <code>pbjs.setConfig</code> in this example code (be sure to remove it for production!)
184-
<li>Make sure you have replaced <code>&lt;YOUR RESOURCE KEY&gt;</code> in this example code with the one you have obtained
185-
from the <a href="https://configure.51degrees.com/tWrhNfY6" target="blank;">51Degrees Configurator Tool</a></li>
184+
<li>Make sure you have replaced <code>&lt;YOUR RESOURCE KEY&gt;</code> in this example code with the one you have obtained
185+
from the <a href="https://configure.51degrees.com/HNZ75HT1" target="blank;">51Degrees Configurator Tool</a></li>
186186
<li>Open DevTools Console in your browser and refresh the page</li>
187187
<li>Observe the enriched ortb device data shown below and also in the console as part of the <code>[51Degrees RTD Submodule]: reqBidsConfigObj:</code> message (under <code>reqBidsConfigObj.global.device</code>)</li>
188188
</ol>
189-
190189
</div>
191190
<div id="enriched-51" style="display: none">
192191
<h3>Enriched ORTB2 device data</h3>
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
<html>
2+
<head>
3+
<script async src="https://www.googletagservices.com/tag/js/gpt.js"></script>
4+
<script async src="../../build/dev/prebid.js"></script>
5+
<script>
6+
var FAILSAFE_TIMEOUT = 3000;
7+
8+
var adUnits = [{
9+
code: 'div-gpt-ad-1683695049516-0',
10+
bids: [{
11+
bidder: 'adnuntius',
12+
params: {
13+
auId: "381535",
14+
network: "1287",
15+
bidType: 'netBid',
16+
targeting: {
17+
kv: {
18+
'isolate': 'native-anto'
19+
}
20+
}
21+
}
22+
}],
23+
mediaTypes: {
24+
banner: {
25+
sizes: [[200, 200]]
26+
},
27+
video: {
28+
playerSize: [200, 200],
29+
context: 'instream'
30+
}
31+
}},
32+
{
33+
code: 'div-gpt-ad-1683695049516-0',
34+
bids: [{
35+
bidder: 'adnuntius',
36+
params: {
37+
auId: "381535",
38+
network: "1287",
39+
bidType: 'netBid',
40+
targetId: 'fred',
41+
targeting: {
42+
kv: {
43+
'isolate': 'native-anto'
44+
}
45+
}
46+
}
47+
}],
48+
mediaTypes: {
49+
banner: {
50+
sizes: [[200, 200]]
51+
},
52+
video: {
53+
playerSize: [200, 200],
54+
context: 'instream'
55+
}
56+
}}];
57+
var googletag = googletag || {};
58+
googletag.cmd = googletag.cmd || [];
59+
googletag.cmd.push(function() {
60+
googletag.pubads().disableInitialLoad();
61+
});
62+
63+
var pbjs = pbjs || {};
64+
pbjs.que = pbjs.que || [];
65+
66+
pbjs.que.push(function() {
67+
pbjs.setConfig({
68+
enableSendAllBids: true,
69+
targetingControls: {
70+
alwaysIncludeDeals: true
71+
},
72+
userSync: {
73+
syncEnabled: false
74+
}
75+
});
76+
77+
pbjs.setBidderConfig({
78+
bidders: ['adnuntius'],
79+
config: {
80+
bidType: 'netBid'
81+
}
82+
});
83+
84+
pbjs.bidderSettings = {
85+
standard: {
86+
storageAllowed: true
87+
}
88+
};
89+
90+
pbjs.addAdUnits(adUnits);
91+
pbjs.requestBids({bidsBackHandler: initAdserver});
92+
});
93+
94+
function initAdserver() {
95+
if (pbjs.initAdserverSet) return;
96+
pbjs.initAdserverSet = true;
97+
googletag.cmd.push(function() {
98+
pbjs.que.push(function() {
99+
pbjs.setTargetingForGPTAsync('div-gpt-ad-1683695049516-0');
100+
googletag.pubads().refresh();
101+
});
102+
});
103+
}
104+
105+
// in case PBJS doesn't load
106+
setTimeout(function() {
107+
initAdserver();
108+
}, FAILSAFE_TIMEOUT);
109+
110+
window.googletag = window.googletag || {cmd: []};
111+
googletag.cmd.push(function() {
112+
googletag.defineSlot('/19660636/320x320', [320, 320], 'div-gpt-ad-1683695049516-0').addService(googletag.pubads());
113+
googletag.pubads().enableSingleRequest();
114+
googletag.enableServices();
115+
});
116+
</script>
117+
</head>
118+
<body>
119+
<h2>Adnuntius NATIVE</h2>
120+
<h5>Ad Slot 1</h5>
121+
122+
<!-- /19660636/320x320 -->
123+
<div id='div-gpt-ad-1683695049516-0' style='min-width: 320px; min-height: 320px;'>
124+
<script>
125+
googletag.cmd.push(function() {
126+
googletag.display('div-gpt-ad-1683695049516-0');
127+
});
128+
</script>
129+
</div>
130+
131+
</body>
132+
</html>

0 commit comments

Comments
 (0)