Skip to content

Commit

Permalink
Merge pull request #6 from prebid/master
Browse files Browse the repository at this point in the history
fetch up
  • Loading branch information
patmmccann authored Feb 22, 2022
2 parents b0457ed + bd2e9f1 commit f3d0ade
Show file tree
Hide file tree
Showing 1,156 changed files with 162,244 additions and 77,895 deletions.
12 changes: 2 additions & 10 deletions .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,8 @@ module.exports = {
[
useLocal('@babel/preset-env'),
{
"targets": {
"browsers": [
"chrome >= 61",
"safari >=8",
"edge >= 14",
"ff >= 57",
"ie >= 11",
"ios >= 8"
]
}
"useBuiltIns": "entry",
"corejs": "3.13.0"
}
]
],
Expand Down
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
- image: circleci/node:12.16.1-browsers
resource_class: xlarge
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
Expand Down Expand Up @@ -52,7 +52,7 @@ aliases:
- &unit_test_steps
- checkout
- restore_cache: *restore_dep_cache
- run: npm install
- run: npm ci
- save_cache: *save_dep_cache
- run: *install
- run: *setup_browserstack
Expand All @@ -72,7 +72,7 @@ jobs:
build:
<<: *environment
steps: *unit_test_steps

e2etest:
<<: *environment
steps: *endtoend_test_steps
Expand Down
11 changes: 11 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ARG VARIANT="12"
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list
RUN apt update
RUN apt install -y google-chrome-stable xvfb
27 changes: 27 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/main/containers/javascript-node
{
"name": "Ubuntu",

"build": {
"dockerfile": "Dockerfile",
"args": { "VARIANT": "12" }
},

"postCreateCommand": "bash .devcontainer/postCreate.sh",

// Set *default* container specific settings.json values on container create.
"settings": {},


// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"nickdodd79.gulptasks"
],

// 9999 is web server, 9876 is karma
"forwardPorts": [9876, 9999],

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node"
}
6 changes: 6 additions & 0 deletions .devcontainer/postCreate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
echo "Post Create Starting"

nvm install
nvm use
npm install gulp-cli -g
npm ci
74 changes: 42 additions & 32 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,50 +1,60 @@

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"
// use babel as parser for fancy syntax
parser: '@babel/eslint-parser',
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]]
}
}))
})).concat([{
// code in other packages (such as plugins/eslint) is not "seen" by babel and its parser will complain.
files: 'plugins/*/**/*.js',
parser: 'esprima'
}])
};
2 changes: 1 addition & 1 deletion .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ version-resolver:
patch:
labels:
- 'patch'
default: patch
default: minor
template: |
## In This Release
$CHANGES
29 changes: 17 additions & 12 deletions PR_REVIEW.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## Summary

We take PR review seriously. Please read https://medium.com/@mrjoelkemp/giving-better-code-reviews-16109e0fdd36#.xa8lc4i23 to understand how a PR review should be conducted. Be rational and strict in your review, make sure you understand exactly what the submitter's intent is. Anyone in the community can review a PR, but a Prebid Org member is also required. A Prebid Org member should take ownership of a PR and do the initial review.

If the PR is for a standard bid adapter or a standard analytics adapter, just the one review from a core member is sufficient. The reviewer will check against [required conventions](http://prebid.org/dev-docs/bidder-adaptor.html#required-adapter-conventions) and may merge the PR after approving and confirming that the documentation PR against prebid.org is open and linked to the issue.
Expand All @@ -11,14 +12,15 @@ General gulp commands include separate commands for serving the codebase on a bu

- Run `gulp review-start`, adding the host parameter `gulp review-start --host=0.0.0.0` will bind to all IPs on the machine
- A page will open which provides a hub for common reviewer tools.
- If you need to manually acceess the tools:
- If you need to manually access the tools:
- Navigate to build/coverage/lcov-report/index.html to view coverage
- Navigate to integrationExamples/gpt/hellow_world.html for basic integration testing
- The hello_world.html and other exampls can be edited and used as needed to verify functionality
- The hello_world.html and other examples can be edited and used as needed to verify functionality

### General PR review Process

- All required global and bidder-adapter rules defined in the [Module Rules](https://docs.prebid.org/dev-docs/module-rules.html) must be followed. Please review these rules often - we depend on reviewers to enforce them.
- Checkout the branch (these instructions are available on the github PR page as well).
- Checkout the branch (these instructions are available on the GitHub PR page as well).
- Verify PR is a single change type. Example, refactor OR bugfix. If more than 1 type, ask submitter to break out requests.
- Verify code under review has at least 80% unit test coverage. If legacy code doesn't have enough unit test coverage, require that additional unit tests to be included in the PR.
- Verify tests are green in Travis-ci + local build by running `gulp serve` | `gulp test`
Expand All @@ -29,13 +31,14 @@ General gulp commands include separate commands for serving the codebase on a bu
- If the change results in needing updates to docs (such as public API change, module interface etc), add a label for "needs docs" and inform the submitter they must submit a docs PR to update the appropriate area of Prebid.org **before the PR can merge**. Help them with finding where the docs are located on prebid.org if needed.
- If all above is good, add a `LGTM` comment and, if the change is in PBS-core or is an important module like the prebidServerBidAdapter, request 1 additional core member to review.
- Once there are 2 `LGTM` on the PR, merge to master
- The [draft release](https://github.com/prebid/Prebid.js/releases) notes are managed by [release drafter](https://github.com/release-drafter/release-drafter). To get the PR added to the release notes do the steps below. A github action will use that information to build the release notes.
- The [draft release](https://github.com/prebid/Prebid.js/releases) notes are managed by [release drafter](https://github.com/release-drafter/release-drafter). To get the PR added to the release notes do the steps below. A GitHub action will use that information to build the release notes.
- Adjust the PR Title to be appropriate for release notes
- Add a label for `feature`, `maintenance`, `fix`, `bugfix` or `bug` to categorize the PR
- Add a semver label of `major`, `minor` or `patch` to indicate the scope of change
- Add a SemVer label of `major`, `minor` or `patch` to indicate the scope of change

### Reviewing a New or Updated Bid Adapter
Documentation they're supposed to be following is https://docs.prebid.org/dev-docs/bidder-adaptor.html

Documentation: https://docs.prebid.org/dev-docs/bidder-adaptor.html

Follow steps above for general review process. In addition, please verify the following:
- Verify the biddercode and aliases are valid:
Expand Down Expand Up @@ -67,14 +70,16 @@ Follow steps above for general review process. In addition, please verify the fo
- After a new adapter is approved, let the submitter know they may open a PR in the [headerbid-expert repository](https://github.com/prebid/headerbid-expert) to have their adapter recognized by the [Headerbid Expert extension](https://chrome.google.com/webstore/detail/headerbid-expert/cgfkddgbnfplidghapbbnngaogeldmop). The PR should be to the [bidder patterns file](https://github.com/prebid/headerbid-expert/blob/master/bidderPatterns.js), adding an entry with their adapter's name and the url the adapter uses to send and receive bid responses.

### Reviewing a New or Updated Analytics Adapter
Documentation they're supposed to be following is https://docs.prebid.org/dev-docs/integrate-with-the-prebid-analytics-api.html

Documentation: https://docs.prebid.org/dev-docs/integrate-with-the-prebid-analytics-api.html

No additional steps above the general review process and making sure it conforms to the [Module Rules](https://docs.prebid.org/dev-docs/module-rules.html).

Make sure there's a docs pull request

### Reviewing a New or Updated User ID Sub-Module
Documentation they're supposed to be following is https://docs.prebid.org/dev-docs/modules/userId.html#id-providers

Documentation: https://docs.prebid.org/dev-docs/modules/userId.html#id-providers

Follow steps above for general review process. In addition:
- Try running the new user ID module with a basic config and confirm it hits the endpoint and stores the results.
Expand Down Expand Up @@ -102,9 +107,11 @@ Follow steps above for general review process. In addition:
- make sure there's a docs pull request

### Reviewing a New or Updated Real-Time-Data Sub-Module
Documentation they're supposed to be following is https://docs.prebid.org/dev-docs/add-rtd-submodule.html

Documentation: https://docs.prebid.org/dev-docs/add-rtd-submodule.html

Follow steps above for general review process. In addition:

- The RTD Provider must include a `providerRtdProvider.md` file. This file must have example parameters and document a sense of what to expect: what should change in the bidrequest, or what targeting data should be added?
- Try running the new sub-module and confirm the provided test parameters.
- Confirm that the module
Expand All @@ -118,9 +125,7 @@ Follow steps above for general review process. In addition:

## Ticket Coordinator

Each week, Prebid Org assigns one person to keep an eye on incoming issues and PRs. Every Monday morning a reminder is
sent to the prebid-js slack channel with a link to the spreadsheet. If you're on rotation, please check that list each
Monday to see if you're on-duty.
Each week, Prebid Org assigns one person to keep an eye on incoming issues and PRs. Every Monday morning a reminder is sent to the prebid-js slack channel with a link to the spreadsheet. If you're on rotation, please check that list each Monday to see if you're on-duty.

When on-duty:
- Review issues and PRs at least once per weekday for new items. Encourage a 48 "SLA" on PRs/issues assigned. Aim for touchpoint once every 48/hours.
Expand Down
25 changes: 16 additions & 9 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 @@ -60,6 +59,8 @@ 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')
}
}
Expand Down Expand Up @@ -129,16 +130,22 @@ Once setup, run the following command to globally install the `gulp-cli` package

## Build for Development

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

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

This runs some code quality checks, starts a web server at `http://localhost:9999` serving from the project root and generates the following files:
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:

+ `./build/dev/prebid.js` - Full source code for dev and debug
+ `./build/dev/prebid.js.map` - Source map for dev and debug
+ `./build/dist/prebid.js` - Minified production code
+ `./prebid.js_<version>.zip` - Distributable zip archive
+ `./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 Optimization

Expand All @@ -152,7 +159,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 Expand Up @@ -273,7 +280,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/src/adapters) 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/modules) are supported by Prebid.js.

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

Expand Down Expand Up @@ -315,7 +322,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.
Prebid.js is supported on IE11 and modern browsers until 5.x. 6.x+ transpiles to target >0.25%; not Opera Mini; not IE11.

### Governance
Review our governance model [here](https://github.com/prebid/Prebid.js/tree/master/governance.md).
4 changes: 2 additions & 2 deletions allowedModules.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ 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 = {
'modules': [
...sharedWhiteList,
'criteo-direct-rsa-validate',
'jsencrypt',
'crypto-js',
'live-connect' // Maintained by LiveIntent : https://github.com/liveintent-berlin/live-connect/
],
Expand Down
Loading

0 comments on commit f3d0ade

Please sign in to comment.