Skip to content

Releases: jshttp/cookie

v2.0.1

Choose a tag to compare

@blakeembrey blakeembrey released this 30 Jun 22:06
51c4854

Improved:

  • Small performance improvement by incrementing = index while parsing set-cookie (#280)

v2.0.0

Choose a tag to compare

@blakeembrey blakeembrey released this 24 Jun 23:04
e5164de

Important: This release moves the package to ESM only. In node 22+ you can require(esm), and older node versions are not supported.

Changed

  • Switch to ESM (#273)
  • Remove deprecated code paths (#272)
    • The old parse and stringify methods have been renamed: parseCookie and stringifySetCookie
    • stringifySetCookie only supports object mode (e.g. { name: "", value: "" })

Improvements

  • Faster stringify cookie (#262)
  • Optimize encode performance (#269)
  • Apply encode to empty cookie values (#277)

Fixed

  • Omit leading semicolon when stringifying cookies with skipped values (#267)

v1.1.1

Choose a tag to compare

@blakeembrey blakeembrey released this 26 Nov 17:51
1b89eec

Fixed

  • Overwrite value in passed in options (#253) c66147c
    • When value was provided in serialize(key, value, { value }) the value in options was used instead of the value passed as an argument

v1.1.0...v1.1.1

v1.1.0

Choose a tag to compare

@blakeembrey blakeembrey released this 25 Nov 22:58
09cec9f

Added:

  • Add stringifyCookie and parseSetCookie methods (#244, #214)
  • Rename existing methods for clarity (old method names remain for backward compatibility)
    • parseparseCookie
    • serializestringifySetCookie
  • Add side effects field (#245) 00b0327

v1.0.2...v1.1.0

v1.0.2

Choose a tag to compare

@blakeembrey blakeembrey released this 20 Nov 17:41
e739f41

Fixed

  • Loosen cookie name/value validation (#210)
  • fix: options.priority used incorrect fallback (#207) by @jonchurch

Added

v1.0.1...v1.0.2

v1.0.1

Choose a tag to compare

@blakeembrey blakeembrey released this 11 Oct 17:18
ba9e677

Added

v1.0.0...v1.0.1

v1.0.0

Choose a tag to compare

@blakeembrey blakeembrey released this 08 Oct 22:29
c69cef6

Breaking changes

  • Use modern JS features, ship TypeScript definition (#175) 1cc64ff
    • Adds __esModule marker, imports need to use import { parse, serialize } or import * as cookie
  • Minimum node.js v18
  • Uses null prototype object for parse return value
  • Changes strict and priority to match the lower case strings (i.e. low, not LOW or Low)
  • Require maxAge to be an integer using Number.isInteger check
  • Delegates decode implementation details to decode option (i.e. error handling and quote parsing is defined by decode)
  • Improve arg/option error messages (#162) e206fd5 @MaoShizhong

Other

v0.7.2...v1.0.0

v0.7.2

Choose a tag to compare

@blakeembrey blakeembrey released this 07 Oct 03:41
d19eaa1

Fixed

  • Fix object assignment of hasOwnProperty (#177) bc38ffd

v0.7.1...v0.7.2

0.7.1

Choose a tag to compare

@blakeembrey blakeembrey released this 03 Oct 18:19
cf4658f

Fixed

  • Allow leading dot for domain (#174)
    • Although not permitted in the spec, some users expect this to work and user agents ignore the leading dot according to spec
  • Add fast path for serialize without options, use obj.hasOwnProperty when parsing (#172)

v0.7.0...v0.7.1

0.7.0

Choose a tag to compare

@blakeembrey blakeembrey released this 02 Oct 23:06
ab057d6

v0.6.0...v0.7.0