Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/prebid/Prebid.js: (102 commits)
  Marsmedia - Add vastXml and fix id response (prebid#5067)
  PubMatic adapter to support image sync (prebid#5104)
  minor consentManagement fix (prebid#5050)
  fix circle ci failing tests (prebid#5113)
  Add Relaido Adapter (prebid#5101)
  Add new bid adapter for ConnectAd (prebid#4806)
  change payload (prebid#5105)
  Utils updates (prebid#5092)
  Read OpenRTB app objects if set in config + bug fix for when ad units are reloaded (prebid#5086)
  Criteo : added first party data mapping to bidder request (prebid#4954)
  updateAdGenerationManual (prebid#5032)
  New bid adapter: Wipes (prebid#5051)
  Prebid manager analytics utm tags (prebid#4998)
  CRITEO RTUS Integration with Yieldmo Prebid (prebid#5075)
  isSafariBrowser update  (prebid#5077)
  Support min &max duration for onevideo (prebid#5079)
  increment pre version
  Prebid 3.15.0 release
  prebid#5011 Fix to set Secure attribute on cookie when SameSite=none (prebid#5064)
  Prebid adapter for windtalker (prebid#5040)
  ...
  • Loading branch information
redaguermas committed Apr 13, 2020
2 parents 36fab76 + 6c26b5b commit 51525d7
Show file tree
Hide file tree
Showing 269 changed files with 22,610 additions and 3,100 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ When you are adding code to Prebid.js, or modifying code that isn't covered by a
- If you need to check `adloader.loadExternalScript` in a test, use a `stub` rather than a `spy`. `spy`s trigger a network call which can result in a `script error` and cause unrelated unit tests to fail. `stub`s will let you gather information about the `adloader.loadExternalScript` call without affecting external resources
- If your test makes ajax requests, use the global xhr stub in `test/mocks/xhr`. Do not use your own `sinon.useFakeXMLHttpRequest()` or `sinon.createFakeServer()`.
- When writing tests you may use ES2015 syntax if desired
- If your test relies on `Window` or `global` object, do not mutate that object directly. Instead, create a separate copy of that object and perform operations on that new copy.

### Test Examples
Prebid.js already has many tests. Read them to see how Prebid.js is tested, and for inspiration:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module.exports = {
// override the regular exclusion from above (for being inside node_modules).
{
test: /.js$/,
include: new RegExp(`\\${path.sep}prebid\.js`),
include: new RegExp(`\\${path.sep}prebid\\.js`),
use: {
loader: 'babel-loader',
// presets and plugins for Prebid.js must be manually specified separate from your other babel rule.
Expand Down
18 changes: 10 additions & 8 deletions allowedModules.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@

const sharedWhiteList = [
"core-js/library/fn/array/find", // no ie11
"core-js/library/fn/array/includes", // no ie11
"core-js/library/fn/set", // ie11 supports Set but not Set#values
"core-js/library/fn/string/includes", // no ie11
"core-js/library/fn/number/is-integer", // no ie11,
"core-js/library/fn/array/from" // no ie11
'core-js/library/fn/array/find', // no ie11
'core-js/library/fn/array/includes', // no ie11
'core-js/library/fn/set', // ie11 supports Set but not Set#values
'core-js/library/fn/string/includes', // no ie11
'core-js/library/fn/number/is-integer', // no ie11,
'core-js/library/fn/array/from' // no ie11
];

module.exports = {
'modules': [
...sharedWhiteList,
'criteo-direct-rsa-validate',
'jsencrypt',
'crypto-js'
'crypto-js',
'live-connect' // Maintained by LiveIntent : https://github.com/liveintent-berlin/live-connect/
],
'src': [
...sharedWhiteList,
'fun-hooks/no-eval',
'just-clone',
'dlv',
'dset'
'dset',
'deep-equal'
]
};
26 changes: 13 additions & 13 deletions browsers.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"device": null,
"os": "Windows"
},
"bs_edge_16_windows_10": {
"bs_edge_18_windows_10": {
"base": "BrowserStack",
"os_version": "10",
"browser": "edge",
"browser_version": "16.0",
"browser_version": "18.0",
"device": null,
"os": "Windows"
},
Expand All @@ -23,43 +23,43 @@
"device": null,
"os": "Windows"
},
"bs_chrome_74_windows_10": {
"bs_chrome_80_windows_10": {
"base": "BrowserStack",
"os_version": "10",
"browser": "chrome",
"browser_version": "74.0",
"browser_version": "80.0",
"device": null,
"os": "Windows"
},
"bs_chrome_75_windows_10": {
"bs_chrome_79_windows_10": {
"base": "BrowserStack",
"os_version": "10",
"browser": "chrome",
"browser_version": "75.0",
"browser_version": "79.0",
"device": null,
"os": "Windows"
},
"bs_firefox_66_windows_10": {
"bs_firefox_73_windows_10": {
"base": "BrowserStack",
"os_version": "10",
"browser": "firefox",
"browser_version": "66.0",
"browser_version": "73.0",
"device": null,
"os": "Windows"
},
"bs_firefox_67_windows_10": {
"bs_firefox_72_windows_10": {
"base": "BrowserStack",
"os_version": "10",
"browser": "firefox",
"browser_version": "67.0",
"browser_version": "72.0",
"device": null,
"os": "Windows"
},
"bs_safari_11_mac_high_sierra": {
"bs_safari_11_mac_catalina": {
"base": "BrowserStack",
"os_version": "High Sierra",
"os_version": "Catalina",
"browser": "safari",
"browser_version": "11.1",
"browser_version": "13.0",
"device": null,
"os": "OS X"
},
Expand Down
26 changes: 13 additions & 13 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ function lint(done) {
if (argv.nolint) {
return done();
}
const isFixed = function(file) {
const isFixed = function (file) {
return file.eslint != null && file.eslint.fixed;
}
return gulp.src(['src/**/*.js', 'modules/**/*.js', 'test/**/*.js'], {base: './'})
.pipe(gulpif(argv.nolintfix, eslint(), eslint({fix: true})))
return gulp.src(['src/**/*.js', 'modules/**/*.js', 'test/**/*.js'], { base: './' })
.pipe(gulpif(argv.nolintfix, eslint(), eslint({ fix: true })))
.pipe(eslint.format('stylish'))
.pipe(eslint.failAfterError())
.pipe(gulpif(isFixed, gulp.dest('./')));
Expand Down Expand Up @@ -160,7 +160,7 @@ function nodeBundle(modules) {
.on('error', (err) => {
reject(err);
})
.pipe(through.obj(function(file, enc, done) {
.pipe(through.obj(function (file, enc, done) {
resolve(file.contents.toString(enc));
done();
}));
Expand Down Expand Up @@ -199,7 +199,7 @@ function bundle(dev, moduleArr) {
return gulp.src(
entries
)
.pipe(gulpif(dev, sourcemaps.init({loadMaps: true})))
.pipe(gulpif(dev, sourcemaps.init({ loadMaps: true })))
.pipe(concat(outputFileName))
.pipe(gulpif(!argv.manualEnable, footer('\n<%= global %>.processQueue();', {
global: prebid.globalVarName
Expand Down Expand Up @@ -239,7 +239,7 @@ function test(done) {
}

//run mock-server
const mockServer = spawn('node', ['./test/mock-server/index.js', '--port='+mockServerPort]);
const mockServer = spawn('node', ['./test/mock-server/index.js', '--port=' + mockServerPort]);
mockServer.stdout.on('data', (data) => {
console.log(`stdout: ${data}`);
});
Expand All @@ -249,13 +249,13 @@ function test(done) {

execa(wdioCmd, wdioOpts, { stdio: 'inherit' })
.then(stdout => {
//kill mock server
// kill mock server
mockServer.kill('SIGINT');
done();
process.exit(0);
})
.catch(err => {
//kill mock server
// kill mock server
mockServer.kill('SIGINT');
done(new Error(`Tests failed with error: ${err}`));
process.exit(1);
Expand All @@ -273,7 +273,7 @@ function test(done) {
}

function newKarmaCallback(done) {
return function(exitCode) {
return function (exitCode) {
if (exitCode) {
done(new Error('Karma tests failed with exit code ' + exitCode));
if (argv.browserstack) {
Expand All @@ -296,7 +296,7 @@ function testCoverage(done) {
function coveralls() { // 2nd arg is a dependency: 'test' must be finished
// first send results of istanbul's test coverage to coveralls.io.
return gulp.src('gulpfile.js', { read: false }) // You have to give it a file, but you don't
// have to read it.
// have to read it.
.pipe(shell('cat build/coverage/lcov.info | node_modules/coveralls/bin/coveralls.js'));
}

Expand Down Expand Up @@ -326,10 +326,10 @@ function setupE2e(done) {
done();
}

gulp.task('updatepath', function(){
gulp.task('updatepath', function () {
return gulp.src(['build/dist/*.js'])
.pipe(replace('https://ib.adnxs.com/ut/v3/prebid', 'http://' + host + ':' + mockServerPort + '/'))
.pipe(gulp.dest('build/dist'));
.pipe(replace('https://ib.adnxs.com/ut/v3/prebid', 'http://' + host + ':' + mockServerPort + '/'))
.pipe(gulp.dest('build/dist'));
});

// support tasks
Expand Down
2 changes: 1 addition & 1 deletion integrationExamples/gpt/digitrust_Full.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
}());
var t = document.createElement('script');
t.async = false;
t.src = 'http://acdn.adnxs.com/cmp/cmp.bundle.js';
t.src = 'https://acdn.adnxs.com/cmp/cmp.bundle.js';
var tag = document.getElementsByTagName('head')[0];
tag.appendChild(t);
}
Expand Down
2 changes: 1 addition & 1 deletion integrationExamples/gpt/digitrust_Simple.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
}());
var t = document.createElement('script');
t.async = false;
t.src = 'http://acdn.adnxs.com/cmp/cmp.bundle.js';
t.src = 'https://acdn.adnxs.com/cmp/cmp.bundle.js';
var tag = document.getElementsByTagName('head')[0];
tag.appendChild(t);
}
Expand Down
2 changes: 1 addition & 1 deletion integrationExamples/gpt/digitrust_cmp_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,6 @@ <h2>DigiTrust Prebid Sample - No Framework</h2>
googletag.cmd.push(function () { googletag.display('test-div'); });
</script>
</div>
<script src="http://cmp-origin-release.digitru.st/1/cmp.bundle.js"></script>
<script src="https://cmp-origin-release.digitru.st/1/cmp.bundle.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion integrationExamples/gpt/hello_world.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ <h5>Div-1</h5>
</script>
</div>
</body>
</html>
</html>
12 changes: 6 additions & 6 deletions karma.conf.maker.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function setBrowsers(karmaConf, browserstack) {
karmaConf.browserStack.startTunnel = false;
karmaConf.browserStack.tunnelIdentifier = process.env.BROWSERSTACK_LOCAL_IDENTIFIER;
}
karmaConf.customLaunchers = require('./browsers.json')
karmaConf.customLaunchers = require('./browsers.json');
karmaConf.browsers = Object.keys(karmaConf.customLaunchers);
} else {
var isDocker = require('is-docker')();
Expand Down Expand Up @@ -162,11 +162,11 @@ module.exports = function(codeCoverage, browserstack, watchMode, file) {
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: !watchMode,
browserDisconnectTimeout: 10000, // default 2000
browserDisconnectTolerance: 1, // default 0
browserNoActivityTimeout: 4 * 60 * 1000, // default 10000
captureTimeout: 4 * 60 * 1000, // default 60000,
processKillTimeout: 10000, // default 2000
browserDisconnectTimeout: 3e5, // default 2000
browserNoActivityTimeout: 3e5, // default 10000
captureTimeout: 3e5, // default 60000,
browserDisconnectTolerance: 3,
concurrency: 5,

plugins: plugins
}
Expand Down
1 change: 1 addition & 0 deletions modules/aardvarkBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export function resetUserSync() {

export const spec = {
code: BIDDER_CODE,
gvlid: 52,
aliases: ['adsparc', 'safereach'],

isBidRequestValid: function(bid) {
Expand Down
Loading

0 comments on commit 51525d7

Please sign in to comment.