Skip to content

Commit

Permalink
chore(backend): Update major dependencies (major) (#4881)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jacek <jacek@clerk.dev>
  • Loading branch information
renovate[bot] and jacekradko authored Jan 13, 2025
1 parent 2e505ca commit fa967ce
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 45 deletions.
5 changes: 5 additions & 0 deletions .changeset/sixty-students-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/backend': patch
---

Upgrading cookies@1.0.2 and snakecase-keys@8.0.1
7 changes: 3 additions & 4 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,13 @@
"dependencies": {
"@clerk/shared": "workspace:^",
"@clerk/types": "workspace:^",
"cookie": "0.7.0",
"snakecase-keys": "5.4.4",
"cookie": "1.0.2",
"snakecase-keys": "8.0.1",
"tslib": "catalog:repo"
},
"devDependencies": {
"@clerk/eslint-config-custom": "workspace:*",
"@edge-runtime/vm": "4.0.4",
"@types/cookie": "^0.6.0",
"@edge-runtime/vm": "5.0.0",
"msw": "2.6.4",
"npm-run-all": "^4.1.5",
"vitest-environment-miniflare": "2.14.4"
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/api/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export type ClerkBackendApiRequestOptions = {
method: 'GET' | 'POST' | 'PATCH' | 'DELETE' | 'PUT';
queryParams?: Record<string, unknown>;
headerParams?: Record<string, string>;
bodyParams?: object;
bodyParams?: Record<string, unknown>;
formData?: FormData;
} & (
| {
Expand Down
6 changes: 3 additions & 3 deletions packages/backend/src/tokens/clerkRequest.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { parse as parseCookies } from 'cookie';
import { parse } from 'cookie';

import { constants } from '../constants';
import type { ClerkUrl } from './clerkUrl';
Expand All @@ -11,7 +11,7 @@ import { createClerkUrl } from './clerkUrl';
*/
class ClerkRequest extends Request {
readonly clerkUrl: ClerkUrl;
readonly cookies: Map<string, string>;
readonly cookies: Map<string, string | undefined>;

public constructor(input: ClerkRequest | Request | RequestInfo, init?: RequestInit) {
// The usual way to duplicate a request object is to
Expand Down Expand Up @@ -67,7 +67,7 @@ class ClerkRequest extends Request {
}

private parseCookies(req: Request) {
const cookiesRecord = parseCookies(this.decodeCookieValue(req.headers.get('cookie') || ''));
const cookiesRecord = parse(this.decodeCookieValue(req.headers.get('cookie') || ''));
return new Map(Object.entries(cookiesRecord));
}

Expand Down
71 changes: 34 additions & 37 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 fa967ce

Please sign in to comment.