Skip to content

Commit

Permalink
feat(series): node update
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonLantukh committed May 6, 2023
1 parent 4dcff53 commit cbbfde5
Show file tree
Hide file tree
Showing 10 changed files with 211 additions and 510 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeceptjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [16.x]
node-version: [18.x]
config: [desktop, mobile]

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lhci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
- name: Use Node.js 18.x
uses: actions/setup-node@v1
with:
node-version: 16.x
node-version: 18.x
- name: yarn install, build
run: |
yarn install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [18.x]

steps:
- uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [18.x]

steps:
- uses: actions/checkout@v1
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"author": "JW Player",
"private": true,
"engines": {
"node": ">=16.0.0"
"node": ">=18.0.0"
},
"scripts": {
"prepare": "husky install",
Expand Down Expand Up @@ -86,7 +86,7 @@
"@vitejs/plugin-react": "^1.0.7",
"@vitest/coverage-c8": "^0.25.7",
"allure-commandline": "^2.17.2",
"codeceptjs": "3.3.0",
"codeceptjs": "3.4.1",
"confusing-browser-globals": "^1.0.10",
"depcheck": "^1.4.3",
"eslint": "^7.31.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ const MediaSeriesEpisode: ScreenComponent<PlaylistItem> = ({ data: episode, isLo
<meta property="og:video:tag" content={tag} key={tag} />
))}
{seriesPlaylist && enrichedEpisode ? (
<script type="application/ld+json">{generateEpisodeJSONLD(seriesPlaylist, series, enrichedEpisode, seriesId, feedId)}</script>
<script type="application/ld+json">{generateEpisodeJSONLD(seriesPlaylist, series, enrichedEpisode, seriesId)}</script>
) : null}
</Helmet>
<VideoLayout
Expand Down
10 changes: 2 additions & 8 deletions src/utils/structuredData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,8 @@ export const generateSeriesMetadata = (series: Series | undefined, seriesPlaylis
};
};

export const generateEpisodeJSONLD = (
seriesPlaylist: Playlist,
series: Series | undefined,
episode: PlaylistItem,
seriesId: string | undefined,
feedId: string | undefined,
) => {
const episodeCanonical = `${window.location.origin}${episodeURL({ episode, playlistId: feedId, seriesId })}`;
export const generateEpisodeJSONLD = (seriesPlaylist: Playlist, series: Series | undefined, episode: PlaylistItem, seriesId: string | undefined) => {
const episodeCanonical = `${window.location.origin}${episodeURL({ episode, seriesId })}`;
const seriesMetadata = generateSeriesMetadata(series, seriesPlaylist, seriesId);

return JSON.stringify({
Expand Down
2 changes: 1 addition & 1 deletion test-e2e/codecept.desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exports.config = {
Playwright: {
url: 'http://localhost:8080',
show: !!process.env.SHOW,
channel: 'chrome',
browser: 'chromium',
locale: 'en-US',
},
},
Expand Down
2 changes: 1 addition & 1 deletion test-e2e/tests/seo_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Scenario('It renders the correct meta tags for the movie screen', async ({ I })
Scenario('It renders the correct structured metadata for the movie screen', async ({ I }) => {
await I.openVideoCard(constants.agent327Title);

const url = await I.grabCurrentUrl();
const url = removeQueryParam(await I.grabCurrentUrl(), 'r');

I.seeTextEquals(
JSON.stringify({
Expand Down
Loading

0 comments on commit cbbfde5

Please sign in to comment.