unstale

npm / cookie

cookie

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

9 breaking5 new APIs and options3 performance1 behavior and defaults1 tooling4 fixes and other

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

npx @unstale/cli init

@unstale/cli 0.2.6 on npm

cookie 28 changes

Breaking changes 3

  • The package is ESM-only; Node versions older than 22 are not supported.

    2.0.0release notes

  • The old parse method is renamed to parseCookie.

    2.0.0release notes

  • The old stringify method is renamed to stringifySetCookie, which only supports object mode.

    2.0.0release notes

Performance 3

  • Parsing set-cookie is slightly faster because the parser increments the = index.

    2.0.1release notes

  • Encoding performance is optimized.

    2.0.0release notes

  • Stringifying cookies is faster.

    2.0.0release notes

Fixes and other changes 2

  • The encode function is now applied to empty cookie values.

    2.0.0release notes

  • Fixes an unwanted leading semicolon when stringifying cookies with skipped values.

    2.0.0release notes

cookie 115 changes

Breaking changes 6

  • The package adds an __esModule marker, so imports must use named imports or namespace imports.

    1.0.0release notes

  • The minimum supported Node.js version is now v18.

    1.0.0release notes

  • The object returned by parse now has a null prototype.

    1.0.0release notes

  • Priority values must use lowercase spelling.

    1.0.0release notes

  • The strict value must use lowercase spelling.

    1.0.0release notes

  • maxAge must be an integer; non-integer values are checked with Number.isInteger.

    1.0.0release notes

New APIs and options 5

  • Renames parse to parseCookie for clarity; the old method name remains for backward compatibility.

    1.1.0release notes

  • Adds parseSetCookie for parsing Set-Cookie values.

    1.1.0release notes

  • Adds a side effects field.

    1.1.0release notes

  • Adds stringifyCookie for stringifying cookies.

    1.1.0release notes

  • Renames serialize to stringifySetCookie for clarity; the old method name remains for backward compatibility.

    1.1.0release notes

Behavior and default changes 1

  • The decode option now defines error handling and quote parsing.

    1.0.0release notes

Tooling 1

Fixes and other changes 2

  • When value is provided in the options object, serialize now uses the value passed as an argument instead.

    1.1.1release notes

  • Argument and option error messages have been improved.

    1.0.0release notes