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

EX-3265 Format adapter's tests #35

Closed
wants to merge 10 commits into from
Closed
Changes from all commits
Commits
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
  •  
  •  
  •  
35 changes: 34 additions & 1 deletion .babelrc.js
Original file line number Diff line number Diff line change
@@ -1 +1,34 @@
module.exports = require('./babelConfig.js')();

let path = require('path');

function useLocal(module) {
return require.resolve(module, {
paths: [
__dirname
]
})
}

module.exports = {
"presets": [
[
useLocal('@babel/preset-env'),
{
"targets": {
"browsers": [
"chrome >= 75",
"safari >=10",
"edge >= 70",
"ff >= 70",
"ie >= 11",
"ios >= 11"
]
}
}
]
],
"plugins": [
path.resolve(__dirname, './plugins/pbjsGlobals.js'),
useLocal('babel-plugin-transform-object-assign')
]
};
20 changes: 15 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -3,11 +3,11 @@
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#

aliases:
aliases:
- &environment
docker:
# specify the version you desire here
- image: circleci/node:12.16.1-browsers
- image: circleci/node:12.16.1
resource_class: xlarge
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
@@ -36,7 +36,7 @@ aliases:

- &run_endtoend_test
name: BrowserStack End to end testing
command: gulp e2e-test
command: echo "127.0.0.1 test.localhost" | sudo tee -a /etc/hosts && gulp e2e-test --host=test.localhost

# Download and run BrowserStack local
- &setup_browserstack
@@ -52,7 +52,7 @@ aliases:
- &unit_test_steps
- checkout
- restore_cache: *restore_dep_cache
- run: npm ci
- run: npm install
- save_cache: *save_dep_cache
- run: *install
- run: *setup_browserstack
@@ -72,7 +72,7 @@ jobs:
build:
<<: *environment
steps: *unit_test_steps

e2etest:
<<: *environment
steps: *endtoend_test_steps
@@ -82,6 +82,16 @@ workflows:
commit:
jobs:
- build
nightly:
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- master
jobs:
- e2etest

experimental:
pipelines: true
11 changes: 0 additions & 11 deletions .devcontainer/Dockerfile

This file was deleted.

27 changes: 0 additions & 27 deletions .devcontainer/devcontainer.json

This file was deleted.

6 changes: 0 additions & 6 deletions .devcontainer/postCreate.sh

This file was deleted.

9 changes: 1 addition & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -23,13 +23,10 @@ module.exports = {
'BROWSERSTACK_USERNAME': false,
'BROWSERSTACK_KEY': false
},
// use babel as parser for fancy syntax
parser: '@babel/eslint-parser',
parserOptions: {
sourceType: 'module',
ecmaVersion: 2018,
},

rules: {
'comma-dangle': 'off',
semi: 'off',
@@ -52,9 +49,5 @@ module.exports = {
rules: {
'prebid/validate-imports': ['error', allowedModules[key]]
}
})).concat([{
// code in other packages (such as plugins/eslint) is not "seen" by babel and its parser will complain.
files: 'plugins/*/**/*.js',
parser: 'esprima'
}])
}))
};
89 changes: 0 additions & 89 deletions .github/workflows/issue_tracker.yml

This file was deleted.

9 changes: 2 additions & 7 deletions PR_REVIEW.md
Original file line number Diff line number Diff line change
@@ -51,16 +51,11 @@ Follow steps above for general review process. In addition, please verify the fo
- If the adapter being submitted is an alias type, check with the bidder contact that is being aliased to make sure it's allowed.
- All bidder parameter conventions must be followed:
- Video params must be read from AdUnit.mediaTypes.video when available; however bidder config can override the ad unit.
- First party data must be read from [getConfig('ortb2');](https://docs.prebid.org/dev-docs/publisher-api-reference/setConfig.html#setConfig-fpd).
- First party data must be read from [`fpd.context` and `fpd.user`](https://docs.prebid.org/dev-docs/publisher-api-reference.html#setConfig-fpd).
- Adapters that accept a floor parameter must also support the [floors module](https://docs.prebid.org/dev-docs/modules/floors.html) -- look for a call to the `getFloor()` function.
- Adapters cannot accept an schain parameter. Rather, they must look for the schain parameter at bidRequest.schain.
- The bidderRequest.refererInfo.referer must be checked in addition to any bidder-specific parameter.
- The bidRequest page referrer must checked in addition to any bidder-specific parameter.
- If they're getting the COPPA flag, it must come from config.getConfig('coppa');
- Page position must come from bidrequest.mediaTypes.banner.pos or bidrequest.mediaTypes.video.pos
- Global OpenRTB fields should come from [getConfig('ortb2');](https://docs.prebid.org/dev-docs/publisher-api-reference/setConfig.html#setConfig-fpd):
- bcat, battr, badv
- Impression-specific OpenRTB fields should come from bidrequest.ortb2imp
- instl
- Below are some examples of bidder specific updates that should require docs update (in their dev-docs/bidders/BIDDER.md file):
- If they support the GDPR consentManagement module and TCF1, add `gdpr_supported: true`
- If they support the GDPR consentManagement module and TCF2, add `tcf2_supported: true`
25 changes: 9 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![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)
@@ -59,8 +60,6 @@ module.exports = {
loader: 'babel-loader',
// presets and plugins for Prebid.js must be manually specified separate from your other babel rule.
// this can be accomplished by requiring prebid's .babelrc.js file (requires Babel 7 and Node v8.9.0+)
// as of Prebid 6, babelrc.js only targets modern browsers. One can change the targets and build for
// older browsers if they prefer, but integration tests on ie11 were removed in Prebid.js 6.0
options: require('prebid.js/.babelrc.js')
}
}
@@ -130,22 +129,16 @@ Once setup, run the following command to globally install the `gulp-cli` package

## Build for Development

To build the project on your local machine we recommend, running:
To build the project on your local machine, run:

$ gulp serve-and-test --file <spec_file.js>
$ gulp serve

This will run testing but not linting. A web server will start at `http://localhost:9999` serving from the project root and generates the following files:
This runs some code quality checks, starts a web server at `http://localhost:9999` serving from the project root and generates the following files:

+ `./build/dev/prebid.js` - Full source code for dev and debug
+ `./build/dev/prebid.js.map` - Source map for dev and debug
+ `./build/dev/prebid-core.js`
+ `./build/dev/prebid-core.js.map`


Development may be a bit slower but if you prefer linting and additional watch files you can also still run just:

$ gulp serve

+ `./build/dist/prebid.js` - Minified production code
+ `./prebid.js_<version>.zip` - Distributable zip archive

### Build Optimization

@@ -159,7 +152,7 @@ Building with just these adapters will result in a smaller bundle which should a

**Build standalone prebid.js**

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

$ gulp build --modules=openxBidAdapter,rubiconBidAdapter,sovrnBidAdapter
@@ -280,7 +273,7 @@ As you make code changes, the bundles will be rebuilt and the page reloaded auto

## Contribute

Many SSPs, bidders, and publishers have contributed to this project. [Hundreds of bidders](https://github.com/prebid/Prebid.js/tree/master/modules) are supported by Prebid.js.
Many SSPs, bidders, and publishers have contributed to this project. [Hundreds of bidders](https://github.com/prebid/Prebid.js/tree/master/src/adapters) are supported by Prebid.js.

For guidelines, see [Contributing](./CONTRIBUTING.md).

@@ -322,7 +315,7 @@ For instructions on writing tests for Prebid.js, see [Testing Prebid.js](http://

### Supported Browsers

Prebid.js is supported on IE11 and modern browsers until 5.x. 6.x+ transpiles to target >0.25%; not Opera Mini; not IE11.
Prebid.js is supported on IE11 and modern browsers.

### Governance
Review our governance model [here](https://github.com/prebid/Prebid.js/tree/master/governance.md).
Loading
Oops, something went wrong.