unstale

npm / cookie-es

cookie-es

What changed in cookie-es 1 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-25.

13 breaking1 security5 new APIs and options4 behavior and defaults

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.7 on npm

cookie-es 320 changes

Breaking changes 11

  • Invalid input now returns undefined instead of an object with empty name and value.

    3.0.0release notes

  • Parsed Domain values have a leading dot stripped and are lowercased.

    3.0.0release notes

  • Parsed Max-Age values are capped to the 400-day limit.

    3.0.0release notes

  • Unknown SameSite values now default to lax.

    3.0.0release notes

  • Returns undefined when the combined name and value exceed 4096 octets.

    3.0.0release notes

  • Attribute values exceeding 1024 octets are ignored.

    3.0.0release notes

  • Names that could pollute prototypes, including __proto__ and constructor, are rejected.

    3.0.0release notes

  • maxAge must be an integer and is clamped to the range from 0 to 400 days.

    3.0.0release notes

  • Serialization throws when Partitioned is used without Secure.

    3.0.0release notes

  • Serialization throws when SameSite=None is used without Secure.

    3.0.0release notes

  • Cookie names, values, domains, and paths are validated against stricter regular expressions.

    3.0.0release notes

Security 1

  • Prefix cookies require Secure; __Host- cookies additionally require Path=/ and no Domain.

    3.0.0release notes

New APIs and options 5

  • Supports a custom stringify option for value coercion.

    3.1.0release notes

  • When enabled, duplicate cookie names return an array of values instead of only the first.

    3.0.0release notes

  • A filter option skips specified keys during parsing.

    3.0.0release notes

  • serialize() now accepts a single SetCookie object as well as the existing name, value, and options arguments.

    3.0.0release notes

  • Converts a Cookies object back into a Cookie header string, complementing parse().

    3.0.0release notes

Behavior and default changes 3

  • Accepts non-string values.

    3.1.0release notes

  • CookieSerializeOptions is now a compatibility alias for CookieStringifyOptions intersected with SetCookie fields other than name and value.

    3.0.0release notes

  • A custom decode function can return undefined to exclude a cookie from the result.

    3.0.0release notes

cookie-es 22 changes

Breaking changes 1

  • The package distribution is ESM-only, which affects how developers can consume it.

    2.0.0release notes

Behavior and default changes 1

cookie-es 11 changes

Breaking changes 1

  • parse now uses a null-prototype object for its result.

    1.2.3release notes