Skip to content

Commit

Permalink
WCP-2562: bump cookie banner to 1.x (#223)
Browse files Browse the repository at this point in the history
* wcp-000: bump cookie banner to 1.0.0

* wcp-000: revert change

* wcp-000: remove old cookie-banner dep

* wcp-000: remove old cookie-banner dep

* wcp-000: fix yarn lock

* fix: DSW-2562 update vite to fix cookie banner in vanilla-app

* copy locales to dist

* chore: DSW-2562 use latest webc snapshot version

* fix turbo

* update cookie-banner

* update cookie-banner

* update yarn.lock

* update browserstack device version

* update to latest cookie-banner version

* revert vite

---------

Co-authored-by: Ben Siggery <[email protected]>
  • Loading branch information
siggerzz and Ben Siggery authored Nov 19, 2024
1 parent 41eb400 commit 6dacb08
Show file tree
Hide file tree
Showing 9 changed files with 2,075 additions and 3,187 deletions.
3 changes: 1 addition & 2 deletions nextjs-app-v14/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
"upgrade-pie-packages": "npx npm-check-updates \"@justeattakeaway/pie-*\" -u"
},
"dependencies": {
"@justeattakeaway/pie-cookie-banner": "0.26.5",
"@justeattakeaway/pie-css": "0.13.0",
"@justeattakeaway/pie-icons-webc": "0.25.1",
"@justeattakeaway/pie-webc": "0.5.42",
"@justeattakeaway/pie-webc": "0.5.53",
"@lit-labs/nextjs": "0.2.0",
"@lit/react": "1.0.5",
"next": "14.2.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@

import NavigationLayout from "@/app/layout/navigation";
import { PieCookieBanner } from '@justeattakeaway/pie-webc/react/cookie-banner.js';
// TODO: Remove this comment as soon as we provide the TS declaration for locales
// @ts-ignore: missing declaration for locales
import daDK from '@justeattakeaway/pie-cookie-banner/locales/da-dk.json';

export default function CookieBanner() {
return (
<NavigationLayout title="Cookie Banner">
<PieCookieBanner
defaultPreferences={{functional: true, personalized: true, analytical: true}}
locale={daDK}
language="da"
country="dk"
hasPrimaryActionsOnly
cookieTechnologiesLink="https://justeattakeaway.com"
cookieStatementLink="https://justeattakeaway.com" />
Expand Down
3 changes: 1 addition & 2 deletions nuxt-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@
"sass": "1.70.0"
},
"dependencies": {
"@justeattakeaway/pie-cookie-banner": "0.26.5",
"@justeattakeaway/pie-css": "0.13.0",
"@justeattakeaway/pie-icons-webc": "0.25.1",
"@justeattakeaway/pie-webc": "0.5.42",
"@justeattakeaway/pie-webc": "0.5.53",
"just-kebab-case": "4.2.0",
"nuxt-ssr-lit": "1.6.16"
},
Expand Down
5 changes: 1 addition & 4 deletions nuxt-app/pages/components/cookie-banner.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div>
<pie-cookie-banner hasPrimaryActionsOnly :locale="daDK" cookieTechnologiesLink="https://justeattakeaway.com"
<pie-cookie-banner hasPrimaryActionsOnly language="da" country="dk" cookieTechnologiesLink="https://justeattakeaway.com"
cookieStatementLink="https://justeattakeaway.com">
</pie-cookie-banner>
</div>
Expand All @@ -14,7 +14,4 @@ definePageMeta({
title: 'Cookie Banner',
});
// TODO: DSW-1710 - Update this to use the TS declaration for locales.
// Currently importing the JSON file directly as a workaround as Nuxt wants import assertions.
import daDK from '@justeattakeaway/pie-cookie-banner/locales/da-dk.json';
</script>
1 change: 1 addition & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"pipeline": {
"preview": {
"cache": false,
"persistent": true,
"dependsOn": ["build"]
},
"test:ssr": {
Expand Down
4 changes: 2 additions & 2 deletions vanilla-app/js/cookie-banner.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import '@justeattakeaway/pie-webc/components/cookie-banner.js';
import daDK from '@justeattakeaway/pie-cookie-banner/locales/da-dk.json';
import './utils/navigation.js';
import './shared.js';

document.querySelector('#app').innerHTML = `
<pie-cookie-banner
locale='${JSON.stringify(daDK)}'
language="da"
country="dk"
hasPrimaryActionsOnly
cookieTechnologiesLink="https://justeattakeaway.com"
cookieStatementLink="https://justeattakeaway.com"></pie-cookie-banner>`;
3 changes: 1 addition & 2 deletions vanilla-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
"vite-plugin-html-inject": "1.1.2"
},
"dependencies": {
"@justeattakeaway/pie-cookie-banner": "0.26.5",
"@justeattakeaway/pie-css": "0.13.0",
"@justeattakeaway/pie-icons-webc": "0.25.1",
"@justeattakeaway/pie-webc": "0.5.42"
"@justeattakeaway/pie-webc": "0.5.53"
},
"installConfig": {
"hoistingLimits": "workspaces"
Expand Down
2 changes: 1 addition & 1 deletion wdio.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const capabilities = [
createCapability("Windows", "11", "Firefox", "127"),
createCapability(null, "18", "Safari", null, "iPhone 16"),
createCapability(null, "16", "Safari", null, "iPhone 14"),
createCapability(null, "14.0", "Chrome", null, "Google Pixel 9"),
createCapability(null, "15.0", "Chrome", null, "Google Pixel 9"),
createCapability(null, "11.0", "Chrome", null, "Google Pixel 6")
];

Expand Down
Loading

0 comments on commit 6dacb08

Please sign in to comment.