Skip to content

Commit

Permalink
fix(core): vendor cookie until it has an ESM build (#12248)
Browse files Browse the repository at this point in the history
* fix(core): vendor `cookie` until it has an ESM build

* change link
  • Loading branch information
balazsorban44 authored Nov 16, 2024
1 parent 4b01b46 commit a150f1e
Show file tree
Hide file tree
Showing 7 changed files with 408 additions and 37 deletions.
1 change: 0 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
"license": "ISC",
"dependencies": {
"@panva/hkdf": "^1.2.1",
"cookie": "1.0.1",
"jose": "^5.9.6",
"oauth4webapi": "^3.1.1",
"preact": "10.24.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/jwt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import { defaultCookies, SessionStore } from "./lib/utils/cookie.js"
import { Awaitable } from "./types.js"
import type { LoggerInstance } from "./lib/utils/logger.js"
import { MissingSecret } from "./errors.js"
import * as cookie from "cookie"
import * as cookie from "./lib/vendored/cookie.js"

const { parse: parseCookie } = cookie
const DEFAULT_MAX_AGE = 30 * 24 * 60 * 60 // 30 days
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/lib/utils/cookie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {

// Uncomment to recalculate the estimated size
// of an empty session cookie
// import * as cookie from "cookie"
// import * as cookie from "../vendored/cookie.js"
// const { serialize } = cookie
// console.log(
// "Cookie estimated to be ",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/lib/utils/web.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as cookie from "cookie"
import * as cookie from "../vendored/cookie.js"
import { UnknownAction } from "../../errors.js"
import { setLogger } from "./logger.js"

Expand Down
Loading

0 comments on commit a150f1e

Please sign in to comment.