Skip to content

Commit 67691c8

Browse files
fix(deps): update dependency cookie to v1 (#2247)
* fix(deps): update dependency cookie to v1 * chore: add changeset renovate-4f825ef Signed-off-by: Alexandre Philibeaux <[email protected]> --------- Signed-off-by: Alexandre Philibeaux <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Scaleway Bot <[email protected]>
1 parent f771da8 commit 67691c8

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

.changeset/renovate-4f825ef.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@scaleway/cookie-consent': patch
3+
---
4+
5+
Updated dependency `cookie` to `1.0.1`.

packages/cookie-consent/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"directory": "packages/cookie-consent"
4242
},
4343
"dependencies": {
44-
"cookie": "0.7.2"
44+
"cookie": "1.0.1"
4545
},
4646
"devDependencies": {
4747
"@types/cookie": "0.6.0",

packages/cookie-consent/src/CookieConsentProvider/CookieConsentProvider.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { CookieSerializeOptions } from 'cookie'
1+
import type { SerializeOptions } from 'cookie'
22
import cookie from 'cookie'
33
import type { PropsWithChildren } from 'react'
44
import {
@@ -24,7 +24,7 @@ const CONSENT_MAX_AGE = 13 * 30 * 24 * 60 * 60
2424
// Appx 6 Months
2525
const CONSENT_ADVERTISING_MAX_AGE = 6 * 30 * 24 * 60 * 60
2626

27-
const COOKIES_OPTIONS = {
27+
const COOKIES_OPTIONS: SerializeOptions = {
2828
sameSite: 'strict',
2929
secure: true,
3030
path: '/',
@@ -69,10 +69,10 @@ export const CookieConsentProvider = ({
6969
cookiePrefix?: string
7070
consentMaxAge?: number
7171
consentAdvertisingMaxAge?: number
72-
cookiesOptions?: CookieSerializeOptions
72+
cookiesOptions?: SerializeOptions
7373
}>) => {
7474
const [needConsent, setNeedsConsent] = useState(false)
75-
const [cookies, setCookies] = useState<Record<string, string>>(
75+
const [cookies, setCookies] = useState<Record<string, string | undefined>>(
7676
IS_CLIENT ? cookie.parse(document.cookie) : {},
7777
)
7878

pnpm-lock.yaml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)