Skip to content

Commit b94bd8d

Browse files
author
Ernests Kečko
committed
Merge commit '8db2720d60a6533dee52e96f847854ef1c219345'
* commit '8db2720d60a6533dee52e96f847854ef1c219345': (249 commits) Release 3.17.0 LunaMedia Adapter (prebid#5110) UserId module to export user ids as eids with pbjs.getUserIdsAsEids() (prebid#5108) Triplelift: expose tl_souce in bid response (prebid#5139) Add warning messages for publishers while native ads send assets containing url without sendId (prebid#5096) use customSlotMatching func for reseting targeting (prebid#5132) Teads fix production GDPR error (prebid#5122) No bid version 1.2.5 (prebid#5137) SublimeBidAdapter src/url.js import fix (prebid#5150) Improve Digital adapter: add support for outstream video (prebid#5129) Disallowing remote requests from Safari and Firefox due to browsers no longer supporting DigiTrust ID. (prebid#5109) PS bid adapter update to copy site object from config (prebid#5083) SublimeBidAdapter: Update to version 0.5.1 (prebid#4977) LuponMedia Bid Adapter (prebid#5146) [BUGFIX] AdagioBidAdapter getDataFromLocalStorage (prebid#5081) Revert "New LuponMedia Bid Adapter (prebid#5120)" (prebid#5145) New LuponMedia Bid Adapter (prebid#5120) Feature/send publisher domain (prebid#5121) update test adunit params (prebid#5135) add parameter to the conversant adapter to override the url (prebid#5133) ...
2 parents b8fcc6c + 8db2720 commit b94bd8d

File tree

745 files changed

+66272
-23049
lines changed

Some content is hidden

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

745 files changed

+66272
-23049
lines changed

.eslintrc.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ module.exports = {
1515
},
1616
"extends": "standard",
1717
"plugins": [
18-
"prebid"
18+
"prebid",
19+
"import"
1920
],
2021
"globals": {
2122
"$$PREBID_GLOBAL$$": false
@@ -27,6 +28,7 @@ module.exports = {
2728
"comma-dangle": "off",
2829
"semi": "off",
2930
"space-before-function-paren": "off",
31+
"import/extensions": ["error", "ignorePackages"],
3032

3133
// Exceptions below this line are temporary, so that eslint can be added into the CI process.
3234
// Violations of these styles should be fixed, and the exceptions removed over time.
@@ -37,6 +39,7 @@ module.exports = {
3739
"no-throw-literal": "off",
3840
"no-undef": 2,
3941
"no-useless-escape": "off",
42+
"no-console": "error"
4043
},
4144
"overrides": Object.keys(allowedModules).map((key) => ({
4245
"files": key + "/**/*.js",

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ When you are adding code to Prebid.js, or modifying code that isn't covered by a
5151
- 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
5252
- 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()`.
5353
- When writing tests you may use ES2015 syntax if desired
54+
- 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.
5455

5556
### Test Examples
5657
Prebid.js already has many tests. Read them to see how Prebid.js is tested, and for inspiration:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ module.exports = {
5353
// override the regular exclusion from above (for being inside node_modules).
5454
{
5555
test: /.js$/,
56-
include: new RegExp(`\\${path.sep}prebid\.js`),
56+
include: new RegExp(`\\${path.sep}prebid\\.js`),
5757
use: {
5858
loader: 'babel-loader',
5959
// presets and plugins for Prebid.js must be manually specified separate from your other babel rule.

allowedModules.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11

22
const sharedWhiteList = [
3-
"core-js/library/fn/array/find", // no ie11
4-
"core-js/library/fn/array/includes", // no ie11
5-
"core-js/library/fn/set", // ie11 supports Set but not Set#values
6-
"core-js/library/fn/string/includes", // no ie11
7-
"core-js/library/fn/number/is-integer", // no ie11,
8-
"core-js/library/fn/array/from" // no ie11
3+
'core-js/library/fn/array/find', // no ie11
4+
'core-js/library/fn/array/includes', // no ie11
5+
'core-js/library/fn/set', // ie11 supports Set but not Set#values
6+
'core-js/library/fn/string/includes', // no ie11
7+
'core-js/library/fn/number/is-integer', // no ie11,
8+
'core-js/library/fn/array/from' // no ie11
99
];
1010

1111
module.exports = {
1212
'modules': [
1313
...sharedWhiteList,
1414
'criteo-direct-rsa-validate',
1515
'jsencrypt',
16-
'crypto-js'
16+
'crypto-js',
17+
'live-connect' // Maintained by LiveIntent : https://github.com/liveintent-berlin/live-connect/
1718
],
1819
'src': [
1920
...sharedWhiteList,
2021
'fun-hooks/no-eval',
2122
'just-clone',
2223
'dlv',
23-
'dset'
24+
'dset',
25+
'deep-equal'
2426
]
2527
};

browsers.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
"device": null,
88
"os": "Windows"
99
},
10-
"bs_edge_16_windows_10": {
10+
"bs_edge_18_windows_10": {
1111
"base": "BrowserStack",
1212
"os_version": "10",
1313
"browser": "edge",
14-
"browser_version": "16.0",
14+
"browser_version": "18.0",
1515
"device": null,
1616
"os": "Windows"
1717
},
@@ -23,43 +23,43 @@
2323
"device": null,
2424
"os": "Windows"
2525
},
26-
"bs_chrome_74_windows_10": {
26+
"bs_chrome_80_windows_10": {
2727
"base": "BrowserStack",
2828
"os_version": "10",
2929
"browser": "chrome",
30-
"browser_version": "74.0",
30+
"browser_version": "80.0",
3131
"device": null,
3232
"os": "Windows"
3333
},
34-
"bs_chrome_75_windows_10": {
34+
"bs_chrome_79_windows_10": {
3535
"base": "BrowserStack",
3636
"os_version": "10",
3737
"browser": "chrome",
38-
"browser_version": "75.0",
38+
"browser_version": "79.0",
3939
"device": null,
4040
"os": "Windows"
4141
},
42-
"bs_firefox_66_windows_10": {
42+
"bs_firefox_73_windows_10": {
4343
"base": "BrowserStack",
4444
"os_version": "10",
4545
"browser": "firefox",
46-
"browser_version": "66.0",
46+
"browser_version": "73.0",
4747
"device": null,
4848
"os": "Windows"
4949
},
50-
"bs_firefox_67_windows_10": {
50+
"bs_firefox_72_windows_10": {
5151
"base": "BrowserStack",
5252
"os_version": "10",
5353
"browser": "firefox",
54-
"browser_version": "67.0",
54+
"browser_version": "72.0",
5555
"device": null,
5656
"os": "Windows"
5757
},
58-
"bs_safari_11_mac_high_sierra": {
58+
"bs_safari_11_mac_catalina": {
5959
"base": "BrowserStack",
60-
"os_version": "High Sierra",
60+
"os_version": "Catalina",
6161
"browser": "safari",
62-
"browser_version": "11.1",
62+
"browser_version": "13.0",
6363
"device": null,
6464
"os": "OS X"
6565
},

gulpHelpers.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ module.exports = {
5959
});
6060
}
6161

62+
// we need to forcefuly include the parentModule if the subModule is present in modules list and parentModule is not present in modules list
6263
Object.keys(submodules).forEach(parentModule => {
6364
if (
6465
!modules.includes(parentModule) &&

gulpfile.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ function lint(done) {
6868
if (argv.nolint) {
6969
return done();
7070
}
71-
const isFixed = function(file) {
71+
const isFixed = function (file) {
7272
return file.eslint != null && file.eslint.fixed;
7373
}
74-
return gulp.src(['src/**/*.js', 'modules/**/*.js', 'test/**/*.js'], {base: './'})
75-
.pipe(gulpif(argv.nolintfix, eslint(), eslint({fix: true})))
74+
return gulp.src(['src/**/*.js', 'modules/**/*.js', 'test/**/*.js'], { base: './' })
75+
.pipe(gulpif(argv.nolintfix, eslint(), eslint({ fix: true })))
7676
.pipe(eslint.format('stylish'))
7777
.pipe(eslint.failAfterError())
7878
.pipe(gulpif(isFixed, gulp.dest('./')));
@@ -85,7 +85,7 @@ function viewCoverage(done) {
8585

8686
connect.server({
8787
port: coveragePort,
88-
root: 'build/coverage/karma_html',
88+
root: 'build/coverage/lcov-report',
8989
livereload: false
9090
});
9191
opens('http://' + mylocalhost + ':' + coveragePort);
@@ -161,7 +161,7 @@ function nodeBundle(modules) {
161161
.on('error', (err) => {
162162
reject(err);
163163
})
164-
.pipe(through.obj(function(file, enc, done) {
164+
.pipe(through.obj(function (file, enc, done) {
165165
resolve(file.contents.toString(enc));
166166
done();
167167
}));
@@ -200,7 +200,7 @@ function bundle(dev, moduleArr) {
200200
return gulp.src(
201201
entries
202202
)
203-
.pipe(gulpif(dev, sourcemaps.init({loadMaps: true})))
203+
.pipe(gulpif(dev, sourcemaps.init({ loadMaps: true })))
204204
.pipe(concat(outputFileName))
205205
.pipe(gulpif(!argv.manualEnable, footer('\n<%= global %>.processQueue();', {
206206
global: prebid.globalVarName
@@ -242,7 +242,7 @@ function test(done) {
242242
}
243243

244244
//run mock-server
245-
const mockServer = spawn('node', ['./test/mock-server/index.js', '--port='+mockServerPort]);
245+
const mockServer = spawn('node', ['./test/mock-server/index.js', '--port=' + mockServerPort]);
246246
mockServer.stdout.on('data', (data) => {
247247
console.log(`stdout: ${data}`);
248248
});
@@ -252,13 +252,13 @@ function test(done) {
252252

253253
execa(wdioCmd, wdioOpts, { stdio: 'inherit' })
254254
.then(stdout => {
255-
//kill mock server
255+
// kill mock server
256256
mockServer.kill('SIGINT');
257257
done();
258258
process.exit(0);
259259
})
260260
.catch(err => {
261-
//kill mock server
261+
// kill mock server
262262
mockServer.kill('SIGINT');
263263
done(new Error(`Tests failed with error: ${err}`));
264264
process.exit(1);
@@ -276,7 +276,7 @@ function test(done) {
276276
}
277277

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

@@ -329,10 +329,10 @@ function setupE2e(done) {
329329
done();
330330
}
331331

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

338338
// support tasks

0 commit comments

Comments
 (0)