NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #303 most downloaded on npm
RFC6265 Cookies and Cookie Jar for node.js
Latest stable
6.1.0
Last release 16 days ago
06 Nov 2026
Release timing varies
gaps range from 1 weeks to 7 months
Some releases are documented
notes for 14 of 51 stable releases
Nothing withdrawn
no release was ever pulled
15 years old
60 releases · first in 2011
Drag across the ruler to compare, or tap a release to open it.
Secure cookies are rejected when set from an insecure origin ( #656 , #663 )
Secure cookies are rejected when set from an insecure origin (#656, #663)CookieJar now refuses to store a Secure cookie set from a URL that isn't potentially trustworthy, such as plain http://example.com, per RFC 6265bis §5.7 step 13. https: and wss: URLs are still accepted, and so are localhost and loopback addresses while allowSecureOnLocal is enabled (the default). setCookie() now rejects with Cookie is Secure but this is not a secure connection, or drops the cookie silently when ignoreError: true is passed.
This changes behavior that existing v6 code may rely on. To keep storing Secure cookies no matter which origin set them, opt out with:
new CookieJar(store, { enforceSecureOriginOnStorage: false })The opt-out applies only to storage. On retrieval, Secure cookies are still returned only for secure origins, the same as in v6.0.x. The setting survives serialize()/deserialize() and clone().
__Host- cookies now need an explicit Path=/ attribute. Having the default path come out as / is no longer enough (#608).Cookie.validate() now returns false for names that aren't valid HTTP tokens, such as empty names, names with separators or control characters, and non-ASCII names. Parsing and storage are unchanged (#650).SameSite=None is now kept when serializing with Cookie.toString() and getSetCookieStrings(); it used to be dropped (#639).Domain attribute is now accepted instead of being treated as a public suffix (#630).PrefixSecurityMode type for the prefixSecurity option (#659, #667).getCookiesSync, getCookieString*, getSetCookieStrings* and setCookieSync methods now accept a URL as well as a string, matching their async counterparts (#655).prefixSecurity refinement by @wjhsf in #667Full Changelog: v6.0.2...v6.1.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Review Section 5.1.3. Domain Matching by @colincasey in #580
Full Changelog: v6.0.1...v6.0.2
Review Section 5.1.1. Dates by @colincasey in #547
Full Changelog: v6.0.0...v6.0.1
Localhost connections over http will now be considered secure by default. For more information, see the README documentation and API Docs for how to c
http will now be considered secure by default. For more information, see the README documentation and API Docs for how to configure this feature.Full Changelog: v5.1.2...v6.0.0
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fix regression bug in domainMatch by @colincasey in #500
domainMatch by @colincasey in #500Full Changelog: v5.1.1...v5.1.2
chore: avoid nodejs modules by @wjhsf in #487
Full Changelog: v5.1.0...v5.1.1
Scheduled integration test with jsdom by @colincasey in #450
0 by @colincasey in #457expiryDate method by @colincasey in #459domainToASCII by @wjhsf in #480Full Changelog: v5.0.0...v5.1.0
Scheduled integration test with jsdom by @colincasey in #450
0 by @colincasey in #457expiryDate method by @colincasey in #459Full Changelog: v5.0.0...v5.1.0-rc.0
We've migrated the project to TypeScript! First-party types are now available.
null and undefined and return only undefined.getCookie and getCookies now accept a string or URL as a parameter.inspect function in favor of node's util.inspect.custom symbol. Cookies may appear different when logged in non-node environments.v5 into master by @colincasey in https://github.com/salesforce/tough-cookie/pull/3035.0.0-rc.0 by @colincasey in https://github.com/salesforce/tough-cookie/pull/304arguments by @wjhsf in https://github.com/salesforce/tough-cookie/pull/316void by @wjhsf in https://github.com/salesforce/tough-cookie/pull/331psl with tldts by @colincasey in https://github.com/salesforce/tough-cookie/pull/346util in non-node environments by @wjhsf in https://github.com/salesforce/tough-cookie/pull/359getCookies and setCookie by @colincasey in https://github.com/salesforce/tough-cookie/pull/364files for what to include in npm package by @colincasey in https://github.com/salesforce/tough-cookie/pull/368parse export that was accidentally removed by @wjhsf in https://github.com/salesforce/tough-cookie/pull/376@types/psl from dev dependencies by @colincasey in https://github.com/salesforce/tough-cookie/pull/406domainToASCII(str) instead of new URL(str).hostName by @wjhsf in https://github.com/salesforce/tough-cookie/pull/433Full Changelog: https://github.com/salesforce/tough-cookie/compare/v4.1.3...v5.0.0
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
https://www.npmjs.com/package/tough-cookie/v/4.1.4
https://www.npmjs.com/package/tough-cookie/v/4.1.4
toString by @corvidism in https://github.com/salesforce/tough-cookie/pull/409Full Changelog: https://github.com/salesforce/tough-cookie/compare/v4.1.3...v4.1.4
Security fix for Prototype Pollution discovery in #282. This is a minor release, although output from the inspect utility is affected by this change,…
Security fix for Prototype Pollution discovery in #282. This is a minor release, although output from the inspect utility is affected by this change, we felt this change was important enough to be pushed into the next patch.
fix: allow set cookies with localhost by @colincasey in https://github.com/salesforce/tough-cookie/pull/253
Full Changelog: https://github.com/salesforce/tough-cookie/compare/v4.1.1...v4.1.2
fix: allow special use domains by default by @colincasey in https://github.com/salesforce/tough-cookie/pull/249
Full Changelog: https://github.com/salesforce/tough-cookie/compare/v4.1.0...v4.1.1
Minor release, focused mainly on resolving reported issues and some minor feature work.
v4.1.0
Minor release, focused mainly on resolving reported issues and some minor feature work.
allowSpecialUseDomain option by @colincasey in https://github.com/salesforce/tough-cookie/pull/225Full Changelog: https://github.com/salesforce/tough-cookie/compare/v4.0.0...v4.1.0
Use ESLint and Prettier to apply consistent, modern formatting (add dependency on universalify, eslint and prettier)
universalify, eslint and prettier)psl and asyncfindCookies() - callback fn has to be last in order to comply with universalify.call() to do inheritance using function prototypesNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.