Skip to content

Commit

Permalink
Merge branch 'master' of github.com:prebid/Prebid.js
Browse files Browse the repository at this point in the history
* 'master' of github.com:prebid/Prebid.js: (303 commits)
  BridgewellBidAdapter: modify to include user ids in the bid request object (prebid#6845)
  GridNMBidAdapter: Use absent in video params data from mediaTypes (prebid#6817)
  PubMatic: For Video: bid.mediaTypes.video.mimes OR bid.params.video.mimes should be present and must be a non-empty array (prebid#6926)
  Increment pre version
  Prebid 4.42.0 Release
  Seedtag Bid Adapter: read video params from mediaTypes, and allow override from bidder params, support passing adomain (prebid#6888)
  Medianet bid adapter: MD update for video parameters. (prebid#6922)
  dgkeyword RTD Provider: add new real time data module  (prebid#6912)
  Smaato bid adapter: Rework multi imp support (prebid#6814)
  Adot Bid Adapter: add the advertising domains support (prebid#6876)
  Update Adtelligent, Adtarget, ViewDeos   adapters to support adomain (prebid#6917)
  LockerDome Bid Adapter: support for meta.advertiserDomains  (prebid#6921)
  Sublime Bid Adapter : Add support for meta.advertiserDomains (prebid#6920)
  Brightcom Bid Adapter: use getFloor function (prebid#6918)
  AdYouLike Bidder: Handle advertiser domains (prebid#6916)
  relaido Bid Adapter: Add meta OBJ to BidResponse (prebid#6914)
  Jixie Bid Adapter: add support for advertiserDomains (prebid#6898)
  Onomagic Bid Adapter: use getFloor function (prebid#6907)
  Sharethrough Bid Adapter: Use getFloor module for Prebid 5.0 compliance (prebid#6874)
  Accept outstream renderers defined in mediatype for PBS (prebid#6896)
  ...
  • Loading branch information
K-JBoon committed Jun 3, 2021
2 parents 0750c3b + 589bc3f commit d106691
Show file tree
Hide file tree
Showing 355 changed files with 23,958 additions and 4,862 deletions.
2 changes: 1 addition & 1 deletion .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ version-resolver:
patch:
labels:
- 'patch'
default: patch
default: minor
template: |
## In This Release
$CHANGES
4 changes: 4 additions & 0 deletions PR_REVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ General gulp commands include separate commands for serving the codebase on a bu
Documentation they're supposed to be following is https://docs.prebid.org/dev-docs/bidder-adaptor.html

Follow steps above for general review process. In addition, please verify the following:
- Verify the biddercode and aliases are valid:
- Lower case alphanumeric with the only special character allowed is underscore.
- The bidder code should be unique for the first 6 characters
- Reserved words that cannot be used as bidder names: all, context, data, general, prebid, and skadn
- Verify that bidder has submitted valid bid params and that bids are being received.
- Verify that bidder is not manipulating the prebid.js auction in any way or doing things that go against the principles of the project. If unsure check with the Tech Lead.
- Verify that code re-use is being done properly and that changes introduced by a bidder don't impact other bidders.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ Or for Babel 6:
Then you can use Prebid.js as any other npm depedendency

```javascript
import prebid from 'prebid.js';
import pbjs from 'prebid.js';
import 'prebid.js/modules/rubiconBidAdapter'; // imported modules will register themselves automatically with prebid
import 'prebid.js/modules/appnexusBidAdapter';
prebid.processQueue(); // required to process existing pbjs.queue blocks and setup any further pbjs.queue execution
pbjs.processQueue(); // required to process existing pbjs.queue blocks and setup any further pbjs.queue execution

prebid.requestBids({
pbjs.requestBids({
...
})

Expand Down Expand Up @@ -202,7 +202,7 @@ To run the unit tests:
gulp test
```

To run the unit tests for a perticular file (example for pubmaticBidAdapter_spec.js):
To run the unit tests for a particular file (example for pubmaticBidAdapter_spec.js):
```bash
gulp test --file "test/spec/modules/pubmaticBidAdapter_spec.js"
```
Expand Down
1 change: 0 additions & 1 deletion allowedModules.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module.exports = {
'modules': [
...sharedWhiteList,
'criteo-direct-rsa-validate',
'jsencrypt',
'crypto-js',
'live-connect' // Maintained by LiveIntent : https://github.com/liveintent-berlin/live-connect/
],
Expand Down
4 changes: 2 additions & 2 deletions browsers.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
"device": null,
"os": "Windows"
},
"bs_chrome_80_windows_10": {
"bs_chrome_89_windows_10": {
"base": "BrowserStack",
"os_version": "10",
"browser": "chrome",
"browser_version": "80.0",
"browser_version": "89.0",
"device": null,
"os": "Windows"
},
Expand Down
17 changes: 12 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const execa = require('execa');

var prebid = require('./package.json');
var dateString = 'Updated : ' + (new Date()).toISOString().substring(0, 10);
var banner = '/* <%= prebid.name %> v<%= prebid.version %>\n' + dateString + '\nModules: <%= modules %> */\n';
var banner = '/* <%= prebid.name %> v<%= prebid.version %>\n' + dateString + '*/\n';
var port = 9999;
const FAKE_SERVER_HOST = argv.host ? argv.host : 'localhost';
const FAKE_SERVER_PORT = 4444;
Expand Down Expand Up @@ -134,6 +134,12 @@ function watch(done) {
done();
};

function makeModuleList(modules) {
return modules.map(module => {
return '"' + module + '"'
});
}

function makeDevpackPkg() {
var cloned = _.cloneDeep(webpackConfig);
cloned.devtool = 'source-map';
Expand All @@ -145,6 +151,7 @@ function makeDevpackPkg() {
return gulp.src([].concat(moduleSources, analyticsSources, 'src/prebid.js'))
.pipe(helpers.nameModules(externalModules))
.pipe(webpackStream(cloned, webpack))
.pipe(replace(/('|")v\$prebid\.modulesList\$('|")/g, makeModuleList(externalModules)))
.pipe(gulp.dest('build/dev'))
.pipe(connect.reload());
}
Expand All @@ -157,18 +164,18 @@ function makeWebpackPkg() {

const analyticsSources = helpers.getAnalyticsSources();
const moduleSources = helpers.getModulePaths(externalModules);
const modulesString = getModulesListToAddInBanner(externalModules);

return gulp.src([].concat(moduleSources, analyticsSources, 'src/prebid.js'))
.pipe(helpers.nameModules(externalModules))
.pipe(webpackStream(cloned, webpack))
.pipe(uglify())
.pipe(gulpif(file => file.basename === 'prebid-core.js', header(banner, { prebid: prebid, modules: modulesString })))
.pipe(replace(/('|")v\$prebid\.modulesList\$('|")/g, makeModuleList(externalModules)))
.pipe(gulpif(file => file.basename === 'prebid-core.js', header(banner, { prebid: prebid })))
.pipe(gulp.dest('build/dist'));
}

function getModulesListToAddInBanner(modules){
return (modules.length > 0) ? modules.join(', ') : 'All available modules in current version.';
function getModulesListToAddInBanner(modules) {
return (modules.length > 0) ? modules.join(', ') : 'All available modules in current version.';
}

function gulpBundle(dev) {
Expand Down
26 changes: 13 additions & 13 deletions integrationExamples/gpt/gdpr_hello_world.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,37 +82,37 @@
<script>
var PREBID_TIMEOUT = 700;
var FAILSAFE_TIMEOUT = 2500;

var adUnits = [{
code: 'div-gpt-ad-1460505748561-0',
mediaTypes: {
banner: {
sizes: [[300, 250], [300,600]]
}
},

// Replace this object to test a new Adapter!
bids: [{
bidder: 'appnexus',
params: {
placementId: 13144370
}
}]

}];

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];

</script>

<script>
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function() {
googletag.pubads().disableInitialLoad();
});

pbjs.que.push(function() {
pbjs.addAdUnits(adUnits);
pbjs.setConfig({
Expand All @@ -130,7 +130,7 @@
timeout: PREBID_TIMEOUT
});
});

function sendAdserverRequest() {
if (pbjs.adserverRequestSent) return;
pbjs.adserverRequestSent = true;
Expand All @@ -141,23 +141,23 @@
});
});
}

setTimeout(function() {
sendAdserverRequest();
console.log('timeout in main pbjs fired');
}, FAILSAFE_TIMEOUT);
</script>

</script>
<script>
googletag.cmd.push(function () {
googletag.defineSlot('/19968336/header-bid-tag-0', [[300, 250], [300, 600]], 'div-gpt-ad-1460505748561-0').addService(googletag.pubads());

googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
</head>

<body>
<h2>Prebid.js Test</h2>
<h5>Div-1</h5>
Expand Down
30 changes: 3 additions & 27 deletions integrationExamples/gpt/haloRtdProvider_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,27 +40,6 @@
googletag.pubads().disableInitialLoad();
});

var appnexusSegmentHandler = function(bid, segments) {
if (!bid.params) {
bid.params = {};
}
if (!bid.params.user) {
bid.params.user = {};
}

if (!Array.isArray(bid.params.user.segments)) {
bid.params.user.segments = [];
}

var appnexusSegments = [];
for (var i = 0; i < segments.length; i++) {
var segment = segments[i];
let appnexusSegment = {'id': segment.id, 'value': segment.value};
appnexusSegments.push(appnexusSegment);
}
bid.params.user.segments = bid.params.user.segments.concat(appnexusSegments);
};

pbjs.que.push(function() {
pbjs.setConfig({
debug: true,
Expand All @@ -71,9 +50,6 @@
name: "halo",
waitForIt: true,
params: {
mapSegments: {
appnexus: appnexusSegmentHandler // pass true to use the builtin handler. here, we will demo overriding the handler with a function
},
segmentCache: false,
requestParams: {
publisherId: 0
Expand All @@ -89,7 +65,7 @@
});

function sendAdserverRequest() {
document.getElementById('audigent_segments').innerHTML = JSON.stringify(adUnits[0].bids[0].params.user.segments);
document.getElementById('audigent_segments').innerHTML = window.localStorage.getItem('auHaloRtd');
document.getElementById('halo_id').innerHTML = testHaloId;

if (pbjs.adserverRequestSent) return;
Expand Down Expand Up @@ -130,7 +106,7 @@
</head>

<body>
<h2>Audigent Segments Prebid</h2>
<h2>Halo RTD Prebid</h2>

<div id='test-div'>
<script>
Expand All @@ -142,7 +118,7 @@ <h2>Audigent Segments Prebid</h2>
<div id='halo_id'>
</div>

Audigent Segments (Appnexus):
Halo Real-Time Data:
<div id='audigent_segments'>
</div>
</body>
Expand Down
3 changes: 2 additions & 1 deletion integrationExamples/gpt/idImportLibrary_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
}, {
name: 'identityLink',
params: {
pid: '14' // Set your real identityLink placement ID here
pid: '14', // Set your real identityLink placement ID here
// notUse3P: true // true/false - If you do not want to use 3P endpoint to retrieve envelope. If you do not set this property to true, 3p endpoint will be fired. By default this propertt is undefined and 3p request will be fired.},
},
storage: {
type: 'html5',
Expand Down
2 changes: 1 addition & 1 deletion integrationExamples/gpt/prebidServer_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@
s2sConfig : {
accountId : '1',
enabled : true, //default value set to false
defaultVendor: 'appnexus',
bidders : ['appnexus'],
timeout : 1000, //default value is 1000
adapter : 'prebidServer', //if we have any other s2s adapter, default value is s2s
endpoint : 'https://prebid.adnxs.com/pbs/v1/openrtb2/auction'
}
});

Expand Down
Loading

0 comments on commit d106691

Please sign in to comment.