---
title: "cookie 2.0.2 Breaking Changes on npm | Since.dev"
description: "What each cookie release removed, renamed or changed: 25 breaking changes in 6 versions on npm, each with its source."
canonical_url: https://since.dev/packages/npm/cookie
last_updated: 2026-12-04
---

# cookie breaking changes

cookie 2.0.2 (November 5, 2026) is its newest release with breaking changes, 2 of them. The first: Rejects Expires dates outside the cookie year bounds. Every breaking API change we have recorded in cookie on npm: 25 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

Latest version `2.0.2`, released November 5, 2026. [Source repository](https://github.com/jshttp/cookie)

Its 1.0.0 release requires [Node.js 18](https://since.dev/calendar/nodejs/18.md) or later. [Node.js end of life dates](https://since.dev/calendar/nodejs.md).

- From [1.1.1](#v-1-1-1) to [2.0.2](#v-2-0-2): 9 breaking changes in 2 versions.
- From [0.7.0](#v-0-7-0) to [2.0.2](#v-2-0-2): 24 breaking changes in 5 versions.

## cookie 2.0.2 breaking changes

cookie 2.0.2, released November 5, 2026: 2 breaking changes.

- **Behavior changed**  

Expires dates outside years 1601–9999 are now rejected instead of accepted. Clamp such dates to the maximum value before passing them in. [github.com](https://github.com/jshttp/cookie/releases/tag/v2.0.2)
- **Behavior changed**  

A maxAge larger than Number.MAX_SAFE_INTEGER is now rejected instead of accepted. Clamp it to a safe value before serializing. [github.com](https://github.com/jshttp/cookie/releases/tag/v2.0.2)

## cookie 2.0.0 breaking changes

cookie 2.0.0, released June 24, 2026: 7 breaking changes.

- **Removed** `parse`  

The parse method was renamed to parseCookie; code calling parse must be updated. [npmjs.com](https://www.npmjs.com/package/cookie/v/2.0.0)
- **Removed** `serialize`  

serialize was removed in cookie 2.0.0 [npmjs.com](https://www.npmjs.com/package/cookie/v/2.0.0)
- **Renamed** `stringify`  

The stringify method was renamed to stringifySetCookie; code calling stringify must be updated. [github.com](https://github.com/jshttp/cookie/releases/tag/v2.0.0)
- **Behavior changed** `encode`  

The encode function is now applied to empty cookie values, which changes their output. [github.com](https://github.com/jshttp/cookie/releases/tag/v2.0.0)
- **Behavior changed** `stringifySetCookie`  

stringifySetCookie now only supports object mode input such as { name: "", value: "" }; string input no longer works. [github.com](https://github.com/jshttp/cookie/releases/tag/v2.0.0)
- **Configuration changed**  

The package is now ESM only; node 22+ can require(esm), and older Node.js versions are no longer supported. [github.com](https://github.com/jshttp/cookie/releases/tag/v2.0.0)
- **Signature changed** `stringifySetCookie`  

The signature of stringifySetCookie changed in cookie 2.0.0 [npmjs.com](https://www.npmjs.com/package/cookie/v/2.0.0)

## cookie 1.1.1 breaking changes

cookie 1.1.1, released November 26, 2025: 1 breaking change.

- **Behavior changed** `serialize`  

Passing a value in the options object no longer replaces the value argument in serialize; the argument is used. Code relying on the options value must pass it as the argument instead. [github.com](https://github.com/jshttp/cookie/releases/tag/v1.1.1)

## cookie 1.1.0 breaking changes

cookie 1.1.0, released November 25, 2025: 3 breaking changes.

- **Signature changed** `parse`  

Was function parse(str: string, options?: ParseOptions): Record\<string, string | undefined>; now function parseCookie(str: string, options?: ParseOptions): Cookies. [npmjs.com](https://www.npmjs.com/package/cookie/v/1.1.0)
- **Signature changed** `serialize`  

Was function serialize(name: string, val: string, options?: SerializeOptions): string; now function stringifySetCookie(cookie: SetCookie, options?: StringifyOptions): string function stringifySetCookie(name: string, val: string, options?... [npmjs.com](https://www.npmjs.com/package/cookie/v/1.1.0)
- **Signature changed** `SerializeOptions`  

Was interface SerializeOptions; now type SerializeOptions = StringifyOptions & Omit\<SetCookie, "name" | "value">. [npmjs.com](https://www.npmjs.com/package/cookie/v/1.1.0)

## cookie 1.0.0 breaking changes

cookie 1.0.0, released October 8, 2024: 11 breaking changes.

- **Removed**  

The package now requires Node.js 18 or later, so older Node.js versions are no longer supported. [github.com](https://github.com/jshttp/cookie/releases/tag/v1.0.0)
- **Removed** `CookieParseOptions`  

CookieParseOptions was removed in cookie 1.0.0 [npmjs.com](https://www.npmjs.com/package/cookie/v/1.0.0)
- **Removed** `CookieSerializeOptions`  

CookieSerializeOptions was removed in cookie 1.0.0 [npmjs.com](https://www.npmjs.com/package/cookie/v/1.0.0)
- **Behavior changed**  

The package now uses an \_\_esModule marker, so users must import with named imports like { parse, serialize } or with import \* as cookie. [github.com](https://github.com/jshttp/cookie/releases/tag/v1.0.0)
- **Behavior changed** `decode`  

Error handling and quote parsing are now defined by the decode option rather than the package itself. [github.com](https://github.com/jshttp/cookie/releases/tag/v1.0.0)
- **Behavior changed** `maxAge`  

The maxAge option is validated with Number.isInteger, so non-integer values are rejected. [github.com](https://github.com/jshttp/cookie/releases/tag/v1.0.0)
- **Behavior changed** `parse`  

The return value of parse is a null prototype object, so inherited Object methods such as hasOwnProperty are not available on it. [github.com](https://github.com/jshttp/cookie/releases/tag/v1.0.0)
- **Behavior changed** `priority`  

The priority option now matches only lowercase strings such as low, not LOW or Low. [github.com](https://github.com/jshttp/cookie/releases/tag/v1.0.0)
- **Behavior changed** `strict`  

The strict option now matches only lowercase strings such as low, not LOW or Low. [github.com](https://github.com/jshttp/cookie/releases/tag/v1.0.0)
- **Signature changed** `parse`  

Was function parse(str: string, options?: CookieParseOptions): Record\<string, string>; now function parse(str: string, options?: ParseOptions): Record\<string, string | undefined>. [npmjs.com](https://www.npmjs.com/package/cookie/v/1.0.0)

And 1 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## cookie 0.7.0 breaking changes

cookie 0.7.0, released October 2, 2024: 1 breaking change.

- **Behavior changed**  

Cookie validation is stricter, so some cookie strings accepted before may now be rejected. Check code that relies on looser cookie names or values. [github.com](https://github.com/jshttp/cookie/releases/tag/v0.7.0)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#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.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
