Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/renovate-4f825ef.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@scaleway/cookie-consent': patch
---

Updated dependency `cookie` to `1.0.1`.
2 changes: 1 addition & 1 deletion packages/cookie-consent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"directory": "packages/cookie-consent"
},
"dependencies": {
"cookie": "0.7.2"
"cookie": "1.0.1"
},
"devDependencies": {
"@types/cookie": "0.6.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { CookieSerializeOptions } from 'cookie'
import type { SerializeOptions } from 'cookie'
import cookie from 'cookie'
import type { PropsWithChildren } from 'react'
import {
Expand All @@ -24,7 +24,7 @@ const CONSENT_MAX_AGE = 13 * 30 * 24 * 60 * 60
// Appx 6 Months
const CONSENT_ADVERTISING_MAX_AGE = 6 * 30 * 24 * 60 * 60

const COOKIES_OPTIONS = {
const COOKIES_OPTIONS: SerializeOptions = {
sameSite: 'strict',
secure: true,
path: '/',
Expand Down Expand Up @@ -69,10 +69,10 @@ export const CookieConsentProvider = ({
cookiePrefix?: string
consentMaxAge?: number
consentAdvertisingMaxAge?: number
cookiesOptions?: CookieSerializeOptions
cookiesOptions?: SerializeOptions
}>) => {
const [needConsent, setNeedsConsent] = useState(false)
const [cookies, setCookies] = useState<Record<string, string>>(
const [cookies, setCookies] = useState<Record<string, string | undefined>>(
IS_CLIENT ? cookie.parse(document.cookie) : {},
)

Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading