Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WCP-2562: bump cookie banner to 1.x #223

Merged
merged 15 commits into from
Nov 19, 2024
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.0.0-snapshot-release-20241113163818",
"@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.0.0-snapshot-release-20241113163818",
"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>`;
5 changes: 2 additions & 3 deletions vanilla-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
},
"devDependencies": {
"deepmerge": "4.3.1",
"vite": "4.5.3",
"vite": "5.4.11",
"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.0.0-snapshot-release-20241113163818"
},
"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"),
siggerzz marked this conversation as resolved.
Show resolved Hide resolved
createCapability(null, "11.0", "Chrome", null, "Google Pixel 6")
];

Expand Down
Loading
Loading