Skip to content

Commit

Permalink
fix(deps): update dependency cookie to v1 (#2247)
Browse files Browse the repository at this point in the history
* fix(deps): update dependency cookie to v1

* chore: add changeset renovate-4f825ef

Signed-off-by: Alexandre Philibeaux <aphilibeaux@scaleway.com>

---------

Signed-off-by: Alexandre Philibeaux <aphilibeaux@scaleway.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Scaleway Bot <github@scaleway.com>
  • Loading branch information
renovate[bot] and scaleway-bot authored Oct 15, 2024
1 parent f771da8 commit 67691c8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
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.

0 comments on commit 67691c8

Please sign in to comment.