Skip to content

Commit

Permalink
Revert "feat(prebid6): sync with official repo (#46)"
Browse files Browse the repository at this point in the history
This reverts commit 1ea2e79.
  • Loading branch information
EugeneVigonny committed May 23, 2022
1 parent 1ea2e79 commit 0404668
Show file tree
Hide file tree
Showing 537 changed files with 47,372 additions and 53,619 deletions.
27 changes: 26 additions & 1 deletion .babelrc.js
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
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'),
{
"useBuiltIns": "entry",
"corejs": "3.13.0"
}
]
],
"plugins": [
path.resolve(__dirname, './plugins/pbjsGlobals.js'),
useLocal('babel-plugin-transform-object-assign')
]
};
113 changes: 56 additions & 57 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ 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
Expand All @@ -16,72 +16,71 @@ aliases:
working_directory: ~/Prebid.js

- &restore_dep_cache
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- &save_dep_cache
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

- &install
name: Install gulp cli
command: sudo npm install -g gulp-cli
name: Install gulp cli
command: sudo npm install -g gulp-cli

- &run_unit_test
name: BrowserStack testing
command: gulp test --browserstack --nolintfix

- &run_endtoend_test
name: BrowserStack End to end testing
command: gulp e2e-test

# Download and run BrowserStack local
- &setup_browserstack
name : Download BrowserStack Local binary and start it.
command : |
# Download the browserstack binary file
wget "https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip"
# Unzip it
unzip BrowserStackLocal-linux-x64.zip
# Run the file with user's access key
./BrowserStackLocal ${BROWSERSTACK_ACCESS_KEY} &
- &unit_test_steps
- checkout
- restore_cache: *restore_dep_cache
- run: npm ci
- save_cache: *save_dep_cache
- run: *install
- run: *setup_browserstack
- run: *run_unit_test

- &endtoend_test_steps
- checkout
- restore_cache: *restore_dep_cache
- run: npm install
- save_cache: *save_dep_cache
- run: *install
- run: *setup_browserstack
- run: *run_endtoend_test

version: 2
version: 2.1
orbs:
aws-s3: circleci/aws-s3@2.0.0
jobs:
build:
<<: *environment
steps: *unit_test_steps

e2etest:
steps:
- checkout
- run: echo "export UPLOAD_DEST='s3://embedproduction/files/instbid-$(git describe --tags).js'" >> "$BASH_ENV"
- restore_cache: *restore_dep_cache
- run: npm install
- save_cache: *save_dep_cache
- run: *install
- run:
name: Build Prebid.js
command: gulp build --modules=modules.json
- aws-s3/copy:
from: build/dist/prebid.js
to: '"$UPLOAD_DEST"'
arguments: --cache-control 'max-age=86400'
build_v6:
<<: *environment
steps: *endtoend_test_steps
steps:
- checkout
- run: echo "export UPLOAD_DEST='s3://embedproduction/files/instbid-$(git describe --tags).js'" >> "$BASH_ENV"
- restore_cache: *restore_dep_cache
- run: npm install
- save_cache: *save_dep_cache
- run: *install
- run:
name: Build Prebid.js version 6
command: gulp build --modules=modules.json
- aws-s3/copy:
from: build/dist/prebid.js
to: '"$UPLOAD_DEST"'
arguments: --cache-control 'max-age=86400'


workflows:
version: 2
commit:
build:
jobs:
- build

experimental:
pipelines: true
- build:
context: org-aws
filters:
branches:
only:
- master
- build_v6:
context: org-aws
filters:
branches:
only:
- prebid6
11 changes: 2 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,12 @@ module.exports = {
'no-throw-literal': 'off',
'no-undef': 2,
'no-useless-escape': 'off',
'no-console': 'error',
'no-console': 'error'
},
overrides: Object.keys(allowedModules).map((key) => ({
files: key + '/**/*.js',
rules: {
'prebid/validate-imports': ['error', allowedModules[key]],
'no-restricted-globals': [
'error',
{
name: 'require',
message: 'use import instead'
}
]
'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.
Expand Down
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
Expand Up @@ -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`
Expand Down
68 changes: 63 additions & 5 deletions RELEASE_SCHEDULE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
- [Release Process](#release-process)
- [1. Make sure that all PRs have been named and labeled properly per the PR Process](#1-make-sure-that-all-prs-have-been-named-and-labeled-properly-per-the-pr-process)
- [2. Make sure all browserstack tests are passing](#2-make-sure-all-browserstack-tests-are-passing)
- [3. Start the release](#3-start-the-release)
- [3. Prepare Prebid Code](#3-prepare-prebid-code)
- [4. Verify the Release](#4-verify-the-release)
- [5. Create a GitHub release](#5-create-a-github-release)
- [6. Update coveralls _(skip for legacy)_](#6-update-coveralls-skip-for-legacy)
- [7. Distribute the code](#7-distribute-the-code)
- [8. Increment Version for Next Release](#8-increment-version-for-next-release)
- [Beta Releases](#beta-releases)
- [FAQs](#faqs)

Expand All @@ -16,10 +21,12 @@ it will be about a week before the Prebid Org [Download Page](http://prebid.org/

You can determine what is in a given build using the [releases page](https://github.com/prebid/Prebid.js/releases)

Announcements regarding releases will be made to the #prebid-js channel in prebid.slack.com.
Announcements regarding releases will be made to the #headerbidding-dev channel in subredditadops.slack.com.

## Release Process

_Note: If `github.com/prebid/Prebid.js` is not configured as the git origin for your repo, all of the following git commands will have to be modified to reference the proper remote (e.g. `upstream`)_

### 1. Make sure that all PRs have been named and labeled properly per the [PR Process](https://github.com/prebid/Prebid.js/blob/master/PR_REVIEW.md#general-pr-review-process)
* Do this by checking the latest draft release from the [releases page](https://github.com/prebid/Prebid.js/releases) and make sure nothing appears in the first section called "In This Release". If they do, please open the PRs and add the appropriate labels.
* Do a quick check that all the titles/descriptions look ok, and if not, adjust the PR title.
Expand Down Expand Up @@ -50,10 +57,61 @@ Announcements regarding releases will be made to the #prebid-js channel in prebi
```


### 3. Start the release
### 3. Prepare Prebid Code

Update the package.json version to become the current release. Then commit your changes.

```
git commit -m "Prebid 4.x.x Release"
git push
```

### 4. Verify the Release

Make sure your there are no more merges to master branch. Prebid code is clean and up to date.

### 5. Create a GitHub release

Edit the most recent [release notes](https://github.com/prebid/Prebid.js/releases) draft and make sure the correct version is set and the master branch is selected in the dropdown. Click `Publish release`. GitHub will create release tag.

Pull these changes locally by running command
```
git pull
git fetch --tags
```

and verify the tag.

### 6. Update coveralls _(skip for legacy)_

We use https://coveralls.io/ to show parts of code covered by unit tests.

Set the environment variables. You may want to add these to your `~/.bashrc` for convenience.
```
export COVERALLS_SERVICE_NAME="travis-ci"
export COVERALLS_REPO_TOKEN="talk to Matt Kendall"
```

Run `gulp coveralls` to update code coverage history.

### 7. Distribute the code

_Note: do not go to step 8 until step 7 has been verified completed._

Reach out to any of the Appnexus folks to trigger the jenkins job.

// TODO:
Jenkins job is moving files to appnexus cdn, pushing prebid.js to npm, purging cache and sending notification to slack.
Move all the files from Appnexus CDN to jsDelivr and create bash script to do above tasks.

### 8. Increment Version for Next Release

Update the version by manually editing Prebid's `package.json` to become "4.x.x-pre" (using the values for the next release). Then commit your changes.
```
git commit -m "Increment pre version"
git push
```

Follow the instructions at https://github.com/prebid/prebidjs-releaser. Note that you will need to be a member of the [https://github.com/orgs/prebid/teams/prebidjs-release](prebidjs-release) GitHub team.

## Beta Releases

Prebid.js features may be released as Beta or as Generally Available (GA).
Expand Down
Loading

0 comments on commit 0404668

Please sign in to comment.