Skip to content

Commit

Permalink
Merge branch 'main' into Fix-panel-prev/next-buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
ychsieh committed Oct 25, 2024
2 parents 9cfd03c + 1a94596 commit bfd95fe
Show file tree
Hide file tree
Showing 42 changed files with 3,348 additions and 7,498 deletions.
15 changes: 9 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ version: 2.1

orbs:
browser-tools: circleci/browser-tools@1.4.8
codecov: codecov/codecov@4.1.0
codecov: codecov/codecov@5.0.0
macos: circleci/macos@2.5.2
node: circleci/node@5.2.0
node: circleci/node@6.3.0

push_and_pr_builds: &push_and_pr_builds
filters:
Expand Down Expand Up @@ -65,7 +65,7 @@ executors:
resource_class: xlarge
jdk-docker-2xlarge:
docker:
- image: cimg/openjdk:21.0.2-node
- image: cimg/openjdk:21.0.5-node
resource_class: 2xlarge
macos-medium:
macos:
Expand Down Expand Up @@ -156,7 +156,8 @@ commands:
- save_cache:
name: '💾 Save node_modules/ Cache'
key: node-modules-cache-{{ arch }}-v3-{{ checksum "package-lock.json" }}
paths: node_modules/
paths:
- node_modules/
teardown_vm:
steps:
- persist_to_workspace:
Expand Down Expand Up @@ -335,7 +336,8 @@ jobs:
name: '⭐⭐⭐ All Unit Tests ⭐⭐⭐'
command: node build-system/pr-check/unit-tests.js
- codecov/upload:
file: test/coverage/lcov-unit.info
disable_search: true
files: test/coverage/lcov-unit.info
flags: unit_tests
- store_test_output
- store_filelist
Expand All @@ -350,7 +352,8 @@ jobs:
name: '⭐⭐⭐ Unminified Tests ⭐⭐⭐'
command: node build-system/pr-check/unminified-tests.js
- codecov/upload:
file: test/coverage/lcov-integration.info
disable_search: true
files: test/coverage/lcov-integration.info
flags: integration_tests
- store_test_output
- teardown_vm
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
uses: github/codeql-action/init@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
with:
config-file: ./.github/codeql/config.yml
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
uses: github/codeql-action/analyze@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
with:
category: '/language:${{matrix.language}}'
10 changes: 5 additions & 5 deletions .github/workflows/cross-platform-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ jobs:
runs-on: ${{ matrix.platform }}-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: Checkout Repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Set Up Node
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: lts/*
- name: Install Dependencies
Expand All @@ -44,11 +44,11 @@ jobs:
environment: create_issue_on_error
steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Create issue on error
uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5 # v2.9.2
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/cut-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: Checkout Repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 100

- name: Set Up Node
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: lts/*

Expand All @@ -55,11 +55,11 @@ jobs:
environment: create_issue_on_error
steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Create issue on error
uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5 # v2.9.2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: 'Checkout Repository'
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: 'Dependency Review'
uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4.3.4
10 changes: 5 additions & 5 deletions .github/workflows/release-tagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: lts/*
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- run: bash ./.github/workflows/install_dependencies.sh
- name: Run tagger
run: |
Expand All @@ -56,11 +56,11 @@ jobs:
environment: create_issue_on_error
steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Create issue on error
uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5 # v2.9.2
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: 'Checkout code'
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
persist-credentials: false

Expand All @@ -64,14 +64,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: 'Upload artifact'
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: 'Upload to code-scanning'
uses: github/codeql-action/upload-sarif@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
uses: github/codeql-action/upload-sarif@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
with:
sarif_file: results.sarif
10 changes: 5 additions & 5 deletions .github/workflows/status-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
environment: status_page
steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: lts/*
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Add progress comment to cherry-pick issue for Stable and LTS
if: github.event_name == 'issues' && github.event.action == 'opened'
run: |
Expand Down Expand Up @@ -52,11 +52,11 @@ jobs:
environment: create_issue_on_error
steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Create issue on error
uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5 # v2.9.2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-session-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: Checkout Repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Update Session Issues
run: |
node ./build-system/common/update-session-issues
Expand Down
2 changes: 0 additions & 2 deletions 3p/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ import {wisteria} from '#ads/vendors/wisteria';
import {wpmedia} from '#ads/vendors/wpmedia';
import {wunderkind} from '#ads/vendors/wunderkind';
import {xlift} from '#ads/vendors/xlift';
import {yahoo} from '#ads/vendors/yahoo';
import {yahoofedads} from '#ads/vendors/yahoofedads';
import {yahoojp} from '#ads/vendors/yahoojp';
import {yahoonativeads} from '#ads/vendors/yahoonativeads';
Expand Down Expand Up @@ -583,7 +582,6 @@ register('wisteria', wisteria);
register('wunderkind', wunderkind);
register('wpmedia', wpmedia);
register('xlift', xlift);
register('yahoo', yahoo);
register('yahoofedads', yahoofedads);
register('yahoojp', yahoojp);
register('yahoonativeads', yahoonativeads);
Expand Down
4 changes: 2 additions & 2 deletions 3p/vendors/yahoo.js → 3p/vendors/piberica.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import '#3p/polyfills';
import {register} from '#3p/3p';
import {draw3p, init} from '#3p/integration-lib';

import {yahoo} from '#ads/vendors/yahoo';
import {piberica} from '#ads/vendors/piberica';

init(window);
register('yahoo', yahoo);
register('piberica', piberica);

window.draw3p = draw3p;
10 changes: 5 additions & 5 deletions ads/_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,11 @@ const adConfig = jsonConfiguration({
consentHandlingOverride: true,
},

'piberica': {
preconnect: ['https://trafico.prensaiberica.es'],
renderStartImplemented: true,
},

'pixad': {},

'pixels': {
Expand Down Expand Up @@ -1487,11 +1492,6 @@ const adConfig = jsonConfiguration({
renderStartImplemented: true,
},

'yahoo': {
prefetch: 'https://s.yimg.com/aaq/ampad/display.js',
preconnect: 'https://us.adserver.yahoo.com',
},

'yahoofedads': {
renderStartImplemented: true,
},
Expand Down
6 changes: 6 additions & 0 deletions ads/ads.extern.js
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,12 @@ data.dfpSlot;
data.nc;
data.auid;

// piberica.js
data.height;
data.publisher;
data.slot;
data.width;

// pixels.js
var pixelsAd;
var pixelsAMPAd;
Expand Down
25 changes: 25 additions & 0 deletions ads/vendors/piberica.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import {loadScript, validateData} from '#3p/3p';

/**
* @param {!Window} global
* @param {!Object} data
*/
export function piberica(global, data) {
/*eslint "local/camelcase": 0*/
global._piberica_amp = {
allowed_data: ['publisher', 'slot'],
mandatory_data: ['publisher', 'slot'],
data,
};

validateData(
data,
global._piberica_amp.mandatory_data,
global._piberica_amp.allowed_data
);

loadScript(
global,
`https://trafico.prensaiberica.es/adm/min/intext/${data.publisher}/${data.slot}.js`
);
}
24 changes: 24 additions & 0 deletions ads/vendors/piberica.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# PIberica

## Example

```html
<amp-ad
width="300"
height="1"
type="piberica"
layout="responsive"
data-publisher="test"
data-slot="1"
data-block-on-consent="_till_responded"
></amp-ad>
```

## Configuration

For further information, please contact [PIberica](https://www.prensaiberica360.es).

### Required parameters

- `data-publisher`: Publisher Integration ID provided by PIberica
- `data-slot`: Slot Integration ID provided by PIberica
Loading

0 comments on commit bfd95fe

Please sign in to comment.