Packages

tough-cookie

6.1.0 · 6 Nov 2026BSD-3-Clause202.3M / weekRepositorynpmAtom feed

Upgrading tough-cookie From 2.3.0 to 6.1.0

23 releases in betweennotes for 14

Reading releases, release notes and advisories…

Other targets from 2.3.0Newest 2.x2.5.0Clears its 2 advisories4.1.3
3.0.0 has no release note on GitHub or in the repository's changelog, so its breaking changes are missing from the counts below.
  1. 2.3.0yours
  2. 7 releases
  3. 3.0.0major
  4. 1 release
  5. 4.0.0major
  6. 3 releases
  7. 4.1.3security
  8. 1 release
  9. 5.0.0major
  10. 3 releases
  11. 6.0.0major
  12. 2 releases
  13. 6.1.0target
7+
changes to make
2
advisories fixed
10+
new
17+
fixes

Counted from 14 of 23 release notes. Advisories are counted from the advisory database, in full.

Before you upgrade

Tick each one off as you go
  • Breaking6.0.0
  • Breaking5.0.0
  • Breaking5.0.0
  • Breaking5.0.0
  • Breaking4.0.0
  • Breaking4.0.0
  • Breaking4.0.0

Security

Fixes 2 advisories affecting 2.3.0

  • Security fix for Prototype Pollution discovery in #282.

    4.1.3

Release by release

  1. 6.1.0

    6 Nov 20261 new
    • New

      New exported PrefixSecurityMode type for the prefixSecurity option (#659, #667).

  2. 6.0.2

    7 Jul 20261 fix
    • Fixed

      Avoid decoding URL authority part

  3. 6.0.1nothing new or fixed in the note

  4. 6.0.0

    Migration needed14 Aug 20252 new
    • Breaking

      Localhost connections over http will now be considered secure by default. For more information, see the README documentation and API Docs for how to configure this feature.

    • New

      Add RFC 6761–compliant localhost loopback checks so secure cookies work on localhost (fixes: #382)

    • New

      Support publishing of both ESM and CJS

  5. 5.1.2

    28 Feb 20251 fix
    • Fixed

      Fix regression bug in domainMatch

  6. 5.1.1nothing new or fixed in the note

  7. 5.1.0

    9 Jan 20254 fixes
    • Fixed

      Remove cookies that expire at epoch time of 0

    • Fixed

      Restore missing expiryDate method

    • Fixed

      path-match: Avoid parsing path as regex

    • Fixed

      Fix npm token config for publish

  8. 5.0.0

    Migration needed9 Sep 20242 fixes
    • Breaking

      We've migrated the project to TypeScript! First-party types are now available.

    • Breaking

      The minimum supported version of node is v18.

    • Breaking

      We no longer provide official support for non-node enviroments.

    • Fixed

      Fixed the expiry time not updating when a cookie is updating.

    • Fixed

      Fixed validation errors not getting called in some callbacks.

61 other lines we could not sort, mostly version bumps
  • __Host- cookies now need an explicit Path=/ attribute. Having the default path come out as / is no longer enough (#608).

    6.1.0
  • 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).

    6.1.0
  • An explicit SameSite=None is now kept when serializing with Cookie.toString() and getSetCookieStrings(); it used to be dropped (#639).

    6.1.0
  • An IPv4 address in the Domain attribute is now accepted instead of being treated as a public suffix (#630).

    6.1.0
  • The getCookiesSync, getCookieString*, getSetCookieStrings* and setCookieSync methods now accept a URL as well as a string, matching their async counterparts (#655).

    6.1.0
  • Review Section 5.1.3. Domain Matching

    6.0.2
  • Dependency bumps in too many PRs to bother enumerating

    6.0.2
  • Review Section 5.1.1. Dates

    6.0.1
  • Adopt npm trusted publishing (OIDC)

    6.0.1
  • Bump tldts from 7.0.23 to 7.0.25 in the production-dependencies group

    6.0.1

12 internal lines (docs, tests, tooling) left out.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.