fix: make wrapFetch options optional
fix: make wrapFetch return type match global fetch
fix: use first arg as RequestInit when invoked as fetch(Request)
- fix: Implement default path algorithm
Thanks @bgoscinski
- feat: Support double quote wrapping of value (foo="bar")
- fix: Support empty cookie value
- fix: Clear existing matching cookie when setting expired cookie
Thanks @jonasb
- fix: Support
=
in cookie value (Thanks @jonasb)
- fix input type for use on deno 1.20.3
- allow . in cookie name.
- BREAKING CHANGE: implement rfc6265 path matching properly and add test.
- change
CookieJar.getCookieString()
to useCookie.canSendTo
function filtering cookies for a url
- BREAKING CHANGE: rename fetch wrapper option
fetchFn
tofetch
. - export type WrapFetchOptions.
- renamed the left out Cookie.ts file.
- renamed file names. does not affect exports.
- fix fix replaceCookies for when an array of CookieOptions is used.
- add tests for case above
- export CookieOptions type
- fix expires not being added to cookie.toString()
- remove unnecessary array replacement when sorting.
- remove unnecessary assignments
- fixed some other code smells
CookieJar.setCookie()
: set cookie path from url's pathname if path is not defined inside cookie string (or Cookie). (it was already done for domain.)
- update readme
- add replaceCookies method
- sets cookie header with a more precise approach.
- add
fetchFn
to wrap options. this allows you to wrap your fetch multiple times to add other helpers.
- fix headers not merged correctly and add test
- now
value
,secure
,httpOnly
,maxAge
,expires
,sameSite
props will only be strictly checked only if when retrieving the cookies usingCookieOptions
, which means if you pass a cookie, it will only be checked ifname
,path
anddomain
match. This should solve issue of replacing cookies.