tough-cookie breaking changes
tough-cookie 6.1.0 (November 6, 2026) is its newest release with breaking changes, 13 of them. The first: Behavior changed Cookie.toString. Every breaking API change we have recorded in tough-cookie on npm: 94 breaking changes in 6 versions. Below, its 6 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 6.1.0, released November 6, 2026. Source repository
Packages on npm run on Node.js. Node.js end of life dates.
- From 5.1.1 to 6.1.0: 14 breaking changes in 2 versions.
- From 4.0.0 to 6.1.0: 92 breaking changes in 5 versions.
tough-cookie 6.1.0 breaking changes
- Behavior changed
Cookie.toString
An explicit SameSite=None is now preserved in Cookie.toString() and getSetCookieStrings() output instead of being dropped. github.com - Behavior changed
Cookie.validate
Cookie.validate() now returns false for empty, separator-containing, control-character or non-ASCII names. github.com - Behavior changed
CookieJar
CookieJar now refuses to store Secure cookies set from non-trustworthy origins such as plain http. To keep the old behavior, pass enforceSecureOriginOnStorage: false. github.com - Behavior changed
Domain attribute
An IPv4 address in the Domain attribute is accepted rather than treated as a public suffix. github.com - Signature changed
Cookie.sameSiteCanonical
Was static sameSiteCanonical: {readonly strict: "Strict"; readonly lax: "Lax";}; now static sameSiteCanonical: {readonly strict: "Strict"; readonly lax: "Lax"; readonly none: "None";}. npmjs.com - Signature changed
CookieJar.getCookies
Was getCookies(url: string): Promise<Cookie[]> getCookies(url: string, callback: Callback<Cookie[]>): void; now getCookies(url: string | URL, callback: Callback<Cookie[]>): void. npmjs.com - Signature changed
CookieJar.getCookiesSync
Was getCookiesSync(url: string, options?: GetCookiesOptions): Cookie[]; now getCookiesSync(url: string | URL, options?: GetCookiesOptions): Cookie[]. npmjs.com - Signature changed
CookieJar.getCookieString
Was getCookieString(url: string, callback: Callback<string | undefined>): void getCookieString(url: string, options: GetCookiesOptions | Callback<string | undefined>, callback?: Callback<string | undefined>): unknown getCookieString(url... npmjs.com - Signature changed
CookieJar.getCookieStringSync
Was getCookieStringSync(url: string, options?: GetCookiesOptions): string; now getCookieStringSync(url: string | URL, options?: GetCookiesOptions): string. npmjs.com - Signature changed
CookieJar.getSetCookieStrings
Was getSetCookieStrings(url: string, callback: Callback<string[] | undefined>): void getSetCookieStrings(url: string, options: GetCookiesOptions, callback: Callback<string[] | undefined>): void getSetCookieStrings(url: string, options... npmjs.com - Signature changed
CookieJar.getSetCookieStringsSync
Was getSetCookieStringsSync(url: string, options?: GetCookiesOptions): string[]; now getSetCookieStringsSync(url: string | URL, options?: GetCookiesOptions): string[]. npmjs.com - Signature changed
CookieJar.setCookieSync
Was setCookieSync(cookie: string | Cookie, url: string, options?: SetCookieOptions): Cookie | undefined; now setCookieSync(cookie: string | Cookie, url: string | URL, options?: SetCookieOptions): Cookie | undefined. npmjs.com - Signature changed
CreateCookieJarOptions.prefixSecurity
Was prefixSecurity?: 'strict' | 'silent' | 'unsafe-disabled' | undefined; now prefixSecurity?: PrefixSecurityMode | undefined. npmjs.com
tough-cookie 6.0.0 breaking changes
- Behavior changed
Cookies on localhost over http are now considered secure by default, which can change how existing code behaves. Check the cookie jar options documentation to configure this behavior. github.com
tough-cookie 5.1.1 breaking changes
- Signature changed
PrefixSecurityEnum
Was const PrefixSecurityEnum: Readonly<{SILENT: "silent"; STRICT: "strict"; DISABLED: "unsafe-disabled";}>; now const PrefixSecurityEnum: {readonly SILENT: "silent"; readonly STRICT: "strict"; readonly DISABLED: "unsafe-disabled";}. npmjs.com
tough-cookie 5.1.0 breaking changes
- Behavior changed
Cookies whose expiry is epoch time 0 are now removed instead of kept. Check code that relies on such cookies persisting. github.com - Signature changed
CookieJar.getCookies
Was getCookies(url: string | URL, options?: GetCookiesOptions | undefined): Promise<Cookie[]>; now getCookies(url: string | URL, options?: GetCookiesOptions): Promise<Cookie[]>. npmjs.com
tough-cookie 5.0.0 breaking changes
- Removed
Official support for non-Node environments has ended; code relying on them may behave differently. github.com - Removed
The package now requires Node.js 18 or later; users on older Node versions must upgrade. github.com - Removed
Cookie.expiryDate
Cookie.expiryDate was removed in tough-cookie 5.0.0 npmjs.com - Removed
Cookie.inspect
Use node's util.inspect.custom symbol instead; cookies may print differently in non-node environments. npmjs.com - Removed
Cookie.ParseOptions
Cookie.ParseOptions was removed in tough-cookie 5.0.0 npmjs.com - Removed
Cookie.Properties
Cookie.Properties was removed in tough-cookie 5.0.0 npmjs.com - Removed
Cookie.Serialized
Cookie.Serialized was removed in tough-cookie 5.0.0 npmjs.com - Removed
CookieJar.GetCookiesOptions
CookieJar.GetCookiesOptions was removed in tough-cookie 5.0.0 npmjs.com - Removed
CookieJar.Options
CookieJar.Options was removed in tough-cookie 5.0.0 npmjs.com - Removed
CookieJar.Serialized
CookieJar.Serialized was removed in tough-cookie 5.0.0 npmjs.com
And 65 more in this version. Sign up to see every change
tough-cookie 4.0.0 breaking changes
- Behavior changed
Classes are now defined with class syntax instead of function prototypes. Code that uses .call() to inherit from these classes may break. github.com - Signature changed
findCookies
The callback parameter of findCookies() must now be the last argument. Update calls that pass the callback first. github.com
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.