Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prebid 7 #8530

Merged
merged 55 commits into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
f462beb
Prebid 7: Delete userid targeting module (#8227)
patmmccann Apr 2, 2022
1da703e
NextRoll ID: Remove NextRoll ID module (#8150)
abijr Apr 2, 2022
9bb10d8
Remove Sortable Analytics Adapter (#8251)
nicgallardo Apr 4, 2022
817c91d
Prebid 7: Merge in changes from master (#8278)
patmmccann Apr 12, 2022
418fe56
remove appnexusAnalyticsAdapter (#8330)
jsnellbaker Apr 27, 2022
fa20923
Merge branch 'master' into prebid-7
dgirardi Apr 28, 2022
90df3ff
Merge master into prebid-7 (#8336)
dgirardi Apr 28, 2022
1d74541
Revert "Merge master into prebid-7 (#8336)"
dgirardi Apr 28, 2022
ce4631c
Merge branch 'pb7-merge' into prebid-7
dgirardi Apr 28, 2022
14712d1
Merge branch 'master' into prebid-7
dgirardi May 2, 2022
db102b5
Prebid 7: Remove FLOC id submodule (#8225)
patmmccann May 3, 2022
a2b0079
Prebid 7: Delete onevideo bid adapter (#8281)
patmmccann May 3, 2022
3b3c8a5
Prebid 7: auction-specific first party data and refactoring of FPD in…
dgirardi May 3, 2022
64375dd
Merge branch 'master' into prebid-7
dgirardi May 3, 2022
eeeab7b
Prebid 7 : update instl for current prebid standards (#8361)
ChrisHuie May 3, 2022
670ee19
Merge branch 'master' into prebid-7
dgirardi May 4, 2022
863b2ee
Merge branch 'master' into prebid-7
dgirardi May 10, 2022
6259946
Merge branch 'master' into prebid-7
dgirardi May 16, 2022
b6f5ff2
Remove districtm Dmx Bid Adapter (#8417)
pierreted90 May 16, 2022
1e9da88
Merge branch 'master' into prebid-7
dgirardi May 17, 2022
19e669e
Merge branch 'prebid-7' of github.com:prebid/Prebid.js into prebid-7
dgirardi May 17, 2022
6e28596
Fix lint
dgirardi May 17, 2022
de31f55
Prebid 7: Remove Halo System (#8420)
patmmccann May 17, 2022
6fcb4f6
Prebid 7: change default of `allowAlternateBidderCodes` from `true` t…
dgirardi May 17, 2022
cf7c11b
Prebid 7: TheMediaGrid: make trustxBidAdapter as alias of gridBidAdap…
TheMediaGrid May 18, 2022
e0afeff
Prebid 7: Change default bidder access to storage manager (#8279)
patmmccann May 20, 2022
72a1ae4
Merge branch 'master' into prebid-7
dgirardi May 20, 2022
29f4c75
Merge branch 'prebid-7' of github.com:prebid/Prebid.js into prebid-7
dgirardi May 20, 2022
3104a3f
Remove Sortable Analytics Adapter (#8442)
liliana-sortable May 20, 2022
29848c2
Prebid 7: Remove AppNexus Alias for Brealtime and DistrictM (#8437)
patmmccann May 23, 2022
7efc875
remove md files of removed adapters (#8446)
ChrisHuie May 23, 2022
2870089
Prebid 7: Deprecating OneVideo Bid Adapter (#8436)
DeepthiNeeladri May 23, 2022
a8c4a80
Merge branch 'master' into prebid-7
dgirardi May 23, 2022
c885816
Sortable Adapter Removal (#8447)
nicgallardo May 24, 2022
e524628
Merge branch 'master' into prebid-7
dgirardi May 25, 2022
f7910d4
Merge branch 'master' into prebid-7
dgirardi May 25, 2022
823fa5a
Prebid 7: Clean up misc halo references (#8468)
patmmccann May 26, 2022
187c0d0
Prebid 7: Adapter fixes for reading impression position (#8451)
patmmccann May 26, 2022
13e0b43
Prebid 7: Remove Akamai DAP ID in favor of RTD (#8480)
patmmccann May 26, 2022
2da0059
Prebid 7: update multiple adapters to standardize bcat (#8462)
ChrisHuie May 26, 2022
2f1a83c
Merge branch 'master' into prebid-7
dgirardi May 31, 2022
26312c2
Magnite GVL ID update (7.0 branch) (#8502)
bretg May 31, 2022
174368b
Prebid 7: Remove stored auction response (#8235)
patmmccann Jun 1, 2022
228bb10
Merge branch 'master' into prebid-7
dgirardi Jun 1, 2022
a3364b5
Merge branch 'prebid-7' of github.com:prebid/Prebid.js into prebid-7
dgirardi Jun 1, 2022
a5f1ae8
Prebid 7: remove support for legacy FPD (#8372)
dgirardi Jun 1, 2022
133a738
Merge branch 'master' into prebid-7
dgirardi Jun 2, 2022
4a25c2e
Merge branch 'prebid-7' of github.com:prebid/Prebid.js into prebid-7
dgirardi Jun 2, 2022
da54a9c
Prebid 7: Allow USP module to work without explicit configuration (#8…
patmmccann Jun 2, 2022
5905aa9
Merge branch 'master' into prebid-7
dgirardi Jun 3, 2022
759cfc0
Prebid.js 7: update pbsBidAdapter to use imp.ext.prebid.bidder.BIDDER…
ChrisHuie Jun 6, 2022
6e3f8dd
Prebid 7: refactoring of refererInfo, pageUrl, publisherDomain (#8450)
dgirardi Jun 7, 2022
3682d62
Prebid 7: remove support for TCFv1 (#8356)
dgirardi Jun 7, 2022
d44519b
Merge branch 'master' into prebid-7
dgirardi Jun 7, 2022
1f648fd
Prebid 7: prevent Prebid from being loaded multiple times (#8508)
dgirardi Jun 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 16 additions & 0 deletions bundle-template.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* <%= prebid.name %> v<%= prebid.version %>
Updated: <%= (new Date()).toISOString().substring(0, 10) %>
Modules: <%= modules %> */

if (!<%= prebid.globalVarName %> || !<%= prebid.globalVarName %>.libLoaded) {
$$PREBID_SOURCE$$
<% if(enable) {%>
<%= prebid.globalVarName %>.processQueue();
<% } %>
} else {
try {
if(<%= prebid.globalVarName %>.getConfig('debug')) {
console.warn('Attempted to load a copy of Prebid.js that clashes with the existing \'<%= prebid.globalVarName %>\' instance. Load aborted.');
}
} catch (e) {}
}
77 changes: 52 additions & 25 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ var opens = require('opn');
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');
var replace = require('gulp-replace');
var shell = require('gulp-shell');
var eslint = require('gulp-eslint');
Expand All @@ -27,10 +25,10 @@ var fs = require('fs');
var jsEscape = require('gulp-js-escape');
const path = require('path');
const execa = require('execa');
const {minify} = require('terser');
const Vinyl = require('vinyl');

var prebid = require('./package.json');
var dateString = 'Updated : ' + (new Date()).toISOString().substring(0, 10);
var banner = '/* <%= prebid.name %> v<%= prebid.version %>\n' + dateString + '*/\n';
var port = 9999;
const INTEG_SERVER_HOST = argv.host ? argv.host : 'localhost';
const INTEG_SERVER_PORT = 4444;
Expand Down Expand Up @@ -149,18 +147,12 @@ function makeWebpackPkg() {
.pipe(gulp.dest('build/dist'));
}

function addBanner() {
const sm = argv.sourceMaps;

return gulp.src(['build/dist/prebid-core.js'])
.pipe(gulpif(sm, sourcemaps.init({loadMaps: true})))
.pipe(header(banner, {prebid}))
.pipe(gulpif(sm, sourcemaps.write('.')))
.pipe(gulp.dest('build/dist'))
}

function getModulesListToAddInBanner(modules) {
return (modules.length > 0) ? modules.join(', ') : 'All available modules in current version.';
if (!modules || modules.length === helpers.getModuleNames().length) {
return 'All available modules for this version.'
} else {
return modules.join(', ')
}
}

function gulpBundle(dev) {
Expand All @@ -180,6 +172,47 @@ function nodeBundle(modules, dev = false) {
});
}

function wrapWithHeaderAndFooter(dev, modules) {
// NOTE: gulp-header, gulp-footer & gulp-wrap do not play nice with source maps.
// gulp-concat does; for that reason we are prepending and appending the source stream with "fake" header & footer files.
function memoryVinyl(name, contents) {
return new Vinyl({
cwd: '',
base: 'generated',
path: name,
contents: Buffer.from(contents, 'utf-8')
});
}
return function wrap(stream) {
const wrapped = through.obj();
const placeholder = '$$PREBID_SOURCE$$';
const tpl = _.template(fs.readFileSync('./bundle-template.txt'))({
prebid,
modules: getModulesListToAddInBanner(modules),
enable: !argv.manualEnable
});
(dev ? Promise.resolve(tpl) : minify(tpl, {format: {comments: true}}).then((res) => res.code))
.then((tpl) => {
// wrap source placeholder in an IIFE to make it an expression (so that it works with minify output)
const parts = tpl.replace(placeholder, `(function(){$$${placeholder}$$})()`).split(placeholder);
if (parts.length !== 2) {
throw new Error(`Cannot parse bundle template; it must contain exactly one instance of '${placeholder}'`);
}
const [header, footer] = parts;
wrapped.push(memoryVinyl('prebid-header.js', header));
stream.pipe(wrapped, {end: false});
stream.on('end', () => {
wrapped.push(memoryVinyl('prebid-footer.js', footer));
wrapped.push(null);
});
})
.catch((err) => {
wrapped.destroy(err);
});
return wrapped;
}
}

function bundle(dev, moduleArr) {
var modules = moduleArr || helpers.getArgModules();
var allModules = helpers.getModuleNames(modules);
Expand Down Expand Up @@ -210,17 +243,10 @@ function bundle(dev, moduleArr) {
gutil.log('Appending ' + prebid.globalVarName + '.processQueue();');
gutil.log('Generating bundle:', outputFileName);

return gulp.src(
entries
)
// Need to uodate the "Modules: ..." section in comment with the current modules list
.pipe(replace(/(Modules: )(.*?)(\*\/)/, ('$1' + getModulesListToAddInBanner(helpers.getArgModules()) + ' $3')))
const wrap = wrapWithHeaderAndFooter(dev, modules);
return wrap(gulp.src(entries))
.pipe(gulpif(sm, sourcemaps.init({ loadMaps: true })))
.pipe(concat(outputFileName))
.pipe(gulpif(!argv.manualEnable, footer('\n<%= global %>.processQueue();', {
global: prebid.globalVarName
}
)))
.pipe(gulpif(sm, sourcemaps.write('.')));
}

Expand Down Expand Up @@ -389,7 +415,7 @@ gulp.task(clean);
gulp.task(escapePostbidConfig);

gulp.task('build-bundle-dev', gulp.series(makeDevpackPkg, gulpBundle.bind(null, true)));
gulp.task('build-bundle-prod', gulp.series(makeWebpackPkg, addBanner, gulpBundle.bind(null, false)));
gulp.task('build-bundle-prod', gulp.series(makeWebpackPkg, gulpBundle.bind(null, false)));

// public tasks (dependencies are needed for each task since they can be ran on their own)
gulp.task('test-only', test);
Expand All @@ -405,6 +431,7 @@ gulp.task('build-postbid', gulp.series(escapePostbidConfig, buildPostbid));

gulp.task('serve', gulp.series(clean, lint, gulp.parallel('build-bundle-dev', watch, test)));
gulp.task('serve-fast', gulp.series(clean, gulp.parallel('build-bundle-dev', watchFast)));
gulp.task('serve-prod', gulp.series(clean, gulp.parallel('build-bundle-prod', startLocalServer)));
gulp.task('serve-and-test', gulp.series(clean, gulp.parallel('build-bundle-dev', watchFast, testTaskMaker({watch: true}))));
gulp.task('serve-e2e', gulp.series(clean, 'build-bundle-prod', gulp.parallel(() => startIntegServer(), startLocalServer)))
gulp.task('serve-e2e-dev', gulp.series(clean, 'build-bundle-dev', gulp.parallel(() => startIntegServer(true), startLocalServer)))
Expand Down
118 changes: 0 additions & 118 deletions integrationExamples/gpt/akamaidap_email_example.html

This file was deleted.

117 changes: 0 additions & 117 deletions integrationExamples/gpt/akamaidap_signature_example.html

This file was deleted.

Loading