Skip to content

Commit

Permalink
Release build 6.16.0 [ci release]
Browse files Browse the repository at this point in the history
  • Loading branch information
mgurgel authored and github-actions[bot] committed Sep 17, 2024
1 parent 9f3717b commit 4f0d109
Show file tree
Hide file tree
Showing 20 changed files with 644 additions and 502 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,10 @@ updates:
target-branch: "main"
labels:
- "dependencies"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
target-branch: "main"
labels:
- "dependencies"
5 changes: 4 additions & 1 deletion .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
pull_request:
types: [opened, synchronize, closed, ready_for_review]

permissions: write-all

jobs:
build:
if: github.event.pull_request.draft == false && github.event.action != 'closed'
Expand All @@ -17,6 +19,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm install
Expand All @@ -40,7 +43,7 @@ jobs:
echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Post comment on PR
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: 'npm'

- name: Fetch files and checkout
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
bash ./scripts/changelog.sh > ${{ github.workspace }}-CHANGELOG.txt
- name: Create Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -51,4 +51,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3
14 changes: 7 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 20.x
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -49,7 +49,7 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 20.x
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -61,22 +61,22 @@ jobs:
npm run build
- name: Cache docs output
id: docs-output
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: docs
key: docs-output-${{ github.run_id }}
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- run: npm run playwright
# - run: npm run playwright-e2e
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: test-results
retention-days: 5
- run: npm run test-int-x
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report-pages
Expand All @@ -100,12 +100,12 @@ jobs:
node-version: 20.x
- name: Cache build outputs
id: docs-output
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: docs
key: docs-output-${{ github.run_id }}
- name: Setup Github Pages
uses: actions/configure-pages@v2
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
Expand Down
48 changes: 3 additions & 45 deletions Sources/ContentScopeScripts/dist/contentScopeIsolated.js
Original file line number Diff line number Diff line change
Expand Up @@ -3356,9 +3356,7 @@
overlayInteracted: false,
privatePlayerMode: { alwaysAsk: {} }
},
ui: {
overlayCopy: this.environment.getOverlayCopyOverride() || 'default'
}
ui: {}
})
}
return this.messaging.request(MSG_NAME_INITIAL_SETUP)
Expand Down Expand Up @@ -3923,15 +3921,6 @@
}
};

/**
* Converts occurrences of {newline} in a string to <br> tags
* @param {string} text
*/
function nl2br (text) {
return html`${text.split('{newline}')
.map((line, i) => i === 0 ? line : html`<br>${line}`)}`
}

/**
* @typedef {ReturnType<html>} Template
*/
Expand All @@ -3946,29 +3935,15 @@
*/

/**
* @type {Record<import('../duck-player').UISettings['overlayCopy'], OverlayCopyTranslation>}
* @type {Record<'default', OverlayCopyTranslation>}
*/
const overlayCopyVariants = {
default: {
title: i18n.t('videoOverlayTitle'),
subtitle: html`<b>${i18n.t('playText')}</b> ${i18n.t('videoOverlaySubtitle')}`,
buttonOptOut: i18n.t('videoButtonOptOut'),
buttonOpen: i18n.t('videoButtonOpen'),
rememberLabel: i18n.t('rememberLabel')
},
a1: {
title: i18n.t('videoOverlayTitle2'),
subtitle: i18n.t('videoOverlaySubtitle2'),
buttonOptOut: i18n.t('videoButtonOptOut2'),
buttonOpen: i18n.t('videoButtonOpen2'),
rememberLabel: i18n.t('rememberLabel')
},
b1: {
title: nl2br(i18n.t('videoOverlayTitle3')),
subtitle: i18n.t('videoOverlaySubtitle2'),
buttonOptOut: i18n.t('videoButtonOptOut2'),
buttonOpen: i18n.t('videoButtonOpen2'),
rememberLabel: i18n.t('rememberLabel')
}
};

Expand Down Expand Up @@ -4620,7 +4595,7 @@
* @returns {HTMLDivElement}
*/
createOverlay () {
const overlayCopy = overlayCopyVariants[this.ui?.overlayCopy || 'default'];
const overlayCopy = overlayCopyVariants.default;
const overlayElement = document.createElement('div');
overlayElement.classList.add('ddg-video-player-overlay');
const svgIcon = trustedUnsafe(dax);
Expand Down Expand Up @@ -5526,22 +5501,6 @@
return false
}

/**
* @returns {import("../duck-player.js").UISettings['overlayCopy'] | null}
*/
getOverlayCopyOverride () {
if (this.isIntegrationMode()) {
const allowedOverlayCopyOverrides = ['default', 'a1', 'b1'];

const url = new URLSearchParams(window.location.href);
const override = url.get('overlayCopy');
if (override && allowedOverlayCopyOverrides.includes(override)) {
return /** @type {import("../duck-player.js").UISettings['overlayCopy']} */ (override)
}
}
return null
}

isIntegrationMode () {
return this.debug === true && this.injectName === 'integration'
}
Expand Down Expand Up @@ -5624,7 +5583,6 @@

/**
* @typedef UISettings - UI-specific settings
* @property {'default'|'a1'|'b1'} overlayCopy - Overlay copy experiment variant
* @property {boolean} [allowFirstVideo] - should the first video be allowed to load/play?
* @property {boolean} [playInDuckPlayer] - Forces next video to be played in Duck Player regardless of user setting
*/
Expand Down
48 changes: 3 additions & 45 deletions build/android/contentScope.js
Original file line number Diff line number Diff line change
Expand Up @@ -12192,9 +12192,7 @@
overlayInteracted: false,
privatePlayerMode: { alwaysAsk: {} }
},
ui: {
overlayCopy: this.environment.getOverlayCopyOverride() || 'default'
}
ui: {}
})
}
return this.messaging.request(MSG_NAME_INITIAL_SETUP)
Expand Down Expand Up @@ -12677,15 +12675,6 @@
}
};

/**
* Converts occurrences of {newline} in a string to <br> tags
* @param {string} text
*/
function nl2br (text) {
return html`${text.split('{newline}')
.map((line, i) => i === 0 ? line : html`<br>${line}`)}`
}

/**
* @typedef {ReturnType<html>} Template
*/
Expand All @@ -12700,29 +12689,15 @@
*/

/**
* @type {Record<import('../duck-player').UISettings['overlayCopy'], OverlayCopyTranslation>}
* @type {Record<'default', OverlayCopyTranslation>}
*/
const overlayCopyVariants = {
default: {
title: i18n.t('videoOverlayTitle'),
subtitle: html`<b>${i18n.t('playText')}</b> ${i18n.t('videoOverlaySubtitle')}`,
buttonOptOut: i18n.t('videoButtonOptOut'),
buttonOpen: i18n.t('videoButtonOpen'),
rememberLabel: i18n.t('rememberLabel')
},
a1: {
title: i18n.t('videoOverlayTitle2'),
subtitle: i18n.t('videoOverlaySubtitle2'),
buttonOptOut: i18n.t('videoButtonOptOut2'),
buttonOpen: i18n.t('videoButtonOpen2'),
rememberLabel: i18n.t('rememberLabel')
},
b1: {
title: nl2br(i18n.t('videoOverlayTitle3')),
subtitle: i18n.t('videoOverlaySubtitle2'),
buttonOptOut: i18n.t('videoButtonOptOut2'),
buttonOpen: i18n.t('videoButtonOpen2'),
rememberLabel: i18n.t('rememberLabel')
}
};

Expand Down Expand Up @@ -13374,7 +13349,7 @@
* @returns {HTMLDivElement}
*/
createOverlay () {
const overlayCopy = overlayCopyVariants[this.ui?.overlayCopy || 'default'];
const overlayCopy = overlayCopyVariants.default;
const overlayElement = document.createElement('div');
overlayElement.classList.add('ddg-video-player-overlay');
const svgIcon = trustedUnsafe(dax);
Expand Down Expand Up @@ -14280,22 +14255,6 @@
return false
}

/**
* @returns {import("../duck-player.js").UISettings['overlayCopy'] | null}
*/
getOverlayCopyOverride () {
if (this.isIntegrationMode()) {
const allowedOverlayCopyOverrides = ['default', 'a1', 'b1'];

const url = new URLSearchParams(window.location.href);
const override = url.get('overlayCopy');
if (override && allowedOverlayCopyOverrides.includes(override)) {
return /** @type {import("../duck-player.js").UISettings['overlayCopy']} */ (override)
}
}
return null
}

isIntegrationMode () {
return this.debug === true && this.injectName === 'integration'
}
Expand Down Expand Up @@ -14378,7 +14337,6 @@

/**
* @typedef UISettings - UI-specific settings
* @property {'default'|'a1'|'b1'} overlayCopy - Overlay copy experiment variant
* @property {boolean} [allowFirstVideo] - should the first video be allowed to load/play?
* @property {boolean} [playInDuckPlayer] - Forces next video to be played in Duck Player regardless of user setting
*/
Expand Down
Loading

0 comments on commit 4f0d109

Please sign in to comment.