Skip to content

Commit

Permalink
Merge tag '5.16.0' into bid-strap
Browse files Browse the repository at this point in the history
  • Loading branch information
from20020516 committed Sep 30, 2021
2 parents fb84a96 + d5f764c commit 3db2c13
Show file tree
Hide file tree
Showing 443 changed files with 21,999 additions and 7,432 deletions.
10 changes: 5 additions & 5 deletions .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ module.exports = {
{
"targets": {
"browsers": [
"chrome >= 61",
"safari >=8",
"edge >= 14",
"ff >= 57",
"chrome >= 75",
"safari >=10",
"edge >= 70",
"ff >= 70",
"ie >= 11",
"ios >= 8"
"ios >= 11"
]
}
}
Expand Down
65 changes: 34 additions & 31 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,50 +1,53 @@

const allowedModules = require("./allowedModules");
const allowedModules = require('./allowedModules.js');

module.exports = {
"env": {
"browser": true,
"commonjs": true
env: {
browser: true,
commonjs: true
},
"settings": {
"import/resolver": {
"node": {
"moduleDirectory": ["node_modules", "./"]
settings: {
'import/resolver': {
node: {
moduleDirectory: ['node_modules', './']
}
}
},
"extends": "standard",
"plugins": [
"prebid",
"import"
extends: 'standard',
plugins: [
'prebid',
'import'
],
"globals": {
"$$PREBID_GLOBAL$$": false
globals: {
'$$PREBID_GLOBAL$$': false,
'BROWSERSTACK_USERNAME': false,
'BROWSERSTACK_KEY': false
},
"parserOptions": {
"sourceType": "module"
parserOptions: {
sourceType: 'module',
ecmaVersion: 2018,
},
"rules": {
"comma-dangle": "off",
"semi": "off",
"space-before-function-paren": "off",
"import/extensions": ["error", "ignorePackages"],
rules: {
'comma-dangle': 'off',
semi: 'off',
'space-before-function-paren': 'off',
'import/extensions': ['error', 'ignorePackages'],

// Exceptions below this line are temporary, so that eslint can be added into the CI process.
// Violations of these styles should be fixed, and the exceptions removed over time.
//
// See Issue #1111.
"eqeqeq": "off",
"no-return-assign": "off",
"no-throw-literal": "off",
"no-undef": 2,
"no-useless-escape": "off",
"no-console": "error"
eqeqeq: 'off',
'no-return-assign': 'off',
'no-throw-literal': 'off',
'no-undef': 2,
'no-useless-escape': 'off',
'no-console': 'error'
},
"overrides": Object.keys(allowedModules).map((key) => ({
"files": key + "/**/*.js",
"rules": {
"prebid/validate-imports": ["error", allowedModules[key]]
overrides: Object.keys(allowedModules).map((key) => ({
files: key + '/**/*.js',
rules: {
'prebid/validate-imports': ['error', allowedModules[key]]
}
}))
};
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[![Build Status](https://circleci.com/gh/prebid/Prebid.js.svg?style=svg)](https://circleci.com/gh/prebid/Prebid.js)
[![Percentage of issues still open](http://isitmaintained.com/badge/open/prebid/Prebid.js.svg)](http://isitmaintained.com/project/prebid/Prebid.js "Percentage of issues still open")
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/prebid/Prebid.js.svg)](http://isitmaintained.com/project/prebid/Prebid.js "Average time to resolve an issue")
[![Code Climate](https://codeclimate.com/github/prebid/Prebid.js/badges/gpa.svg)](https://codeclimate.com/github/prebid/Prebid.js)
[![Coverage Status](https://coveralls.io/repos/github/prebid/Prebid.js/badge.svg)](https://coveralls.io/github/prebid/Prebid.js)
[![devDependencies Status](https://david-dm.org/prebid/Prebid.js/dev-status.svg)](https://david-dm.org/prebid/Prebid.js?type=dev)
Expand Down Expand Up @@ -152,7 +151,7 @@ Building with just these adapters will result in a smaller bundle which should a

**Build standalone prebid.js**

- Clone the repo, run `npm install`
- Clone the repo, run `npm ci`
- Then run the build:

$ gulp build --modules=openxBidAdapter,rubiconBidAdapter,sovrnBidAdapter
Expand Down
3 changes: 2 additions & 1 deletion allowedModules.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ const sharedWhiteList = [
'core-js-pure/features/set', // ie11 supports Set but not Set#values
'core-js-pure/features/string/includes', // no ie11
'core-js-pure/features/number/is-integer', // no ie11,
'core-js-pure/features/array/from' // no ie11
'core-js-pure/features/array/from', // no ie11
'core-js-pure/web/url-search-params' // no ie11
];

module.exports = {
Expand Down
1 change: 0 additions & 1 deletion gulpHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ module.exports = {
},

jsonifyHTML: function (str) {
console.log(arguments);
return str.replace(/\n/g, '')
.replace(/<\//g, '<\\/')
.replace(/\/>/g, '\\/>');
Expand Down
14 changes: 10 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ var webpackStream = require('webpack-stream');
var terser = require('gulp-terser');
var gulpClean = require('gulp-clean');
var KarmaServer = require('karma').Server;
var karmaConfMaker = require('./karma.conf.maker');
var karmaConfMaker = require('./karma.conf.maker.js');
var opens = require('opn');
var webpackConfig = require('./webpack.conf');
var helpers = require('./gulpHelpers');
var webpackConfig = require('./webpack.conf.js');
var helpers = require('./gulpHelpers.js');
var concat = require('gulp-concat');
var header = require('gulp-header');
var footer = require('gulp-footer');
Expand Down Expand Up @@ -71,7 +71,13 @@ function lint(done) {
const isFixed = function (file) {
return file.eslint != null && file.eslint.fixed;
}
return gulp.src(['src/**/*.js', 'modules/**/*.js', 'test/**/*.js'], { base: './' })
return gulp.src([
'src/**/*.js',
'modules/**/*.js',
'test/**/*.js',
'plugins/**/*.js',
'./*.js'
], { base: './' })
.pipe(gulpif(argv.nolintfix, eslint(), eslint({ fix: true })))
.pipe(eslint.format('stylish'))
.pipe(eslint.failAfterError())
Expand Down
27 changes: 21 additions & 6 deletions integrationExamples/gpt/adloox.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@
playerSize: [ 640, 480 ]
}
},
fpd: {
context: {
pbAdSlot: '/19968336/prebid_cache_video_adunit'
ortb2Imp: {
ext: {
data: {
pbadslot: '/19968336/prebid_cache_video_adunit'
}
}
},
bids: [
Expand Down Expand Up @@ -106,7 +108,8 @@
pbjs.initAdserverSet = true;

googletag.cmd.push(function() {
pbjs.setTargetingForGPTAsync && pbjs.setTargetingForGPTAsync(adUnits);
const adUnitCodes = adUnits.map(adUnit => adUnit.code);
pbjs.setTargetingForGPTAsync(adUnitCodes);
googletag.pubads().refresh();
});

Expand Down Expand Up @@ -135,12 +138,24 @@
}

// optionally wrap with googletag to have gpt-pre-auction
// automatically populate Prebid Ad Slot (pbAdSlot)
// automatically populate Prebid Ad Slot (pbadslot)
// https://docs.prebid.org/dev-docs/modules/gpt-pre-auction.html
// alternatively remove wrapping and set AdUnit.fpd.context.pbAdSlot
// alternatively remove wrapping and set AdUnit.ortb2Imp.ext.data.pbadslot
googletag.cmd.push(function() {
pbjs.que.push(function() {
pbjs.setConfig({
realTimeData: {
auctionDelay: AUCTION_DELAY,
dataProviders: [
{
name: 'adloox',
params: { // optional, defaults shown
thresholds: [ 50, 60, 70, 80, 90 ],
slotinpath: false
}
}
]
},
instreamTracking: {
enabled: true
},
Expand Down
Loading

0 comments on commit 3db2c13

Please sign in to comment.