Repository navigation
Releases
Releases · jshttp/cookie
v2.0.2
Fixed
- Perf optimize cookie value validation by @blakeembrey in #285
- Small convention cleanups by @blakeembrey in #284
- Reject
Expiresdates outside cookie year bounds by @offyotto in #290 - Reject unsafe-integer
maxAgeby @spokodev in #286
Full Changelog: v2.0.1...v2.0.2
v2.0.1
Improved:
- Small performance improvement by incrementing
=index while parsingset-cookie(#280)
v2.0.0
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
parseandstringifymethods have been renamed:parseCookieandstringifySetCookie stringifySetCookieonly supports object mode (e.g.{ name: "", value: "" })
- The old
Improvements
- Faster stringify cookie (#262)
- Optimize encode performance (#269)
- Apply
encodeto empty cookie values (#277)
Fixed
- Omit leading semicolon when stringifying cookies with skipped values (#267)
v1.1.1
v1.1.0
v1.0.2
Fixed
- Loosen cookie name/value validation (#210)
- fix:
options.priorityused incorrect fallback (#207) by @jonchurch
Added
v1.0.1
v1.0.0
Breaking changes
- Use modern JS features, ship TypeScript definition (#175) 1cc64ff
- Adds
__esModulemarker, imports need to useimport { parse, serialize }orimport * as cookie
- Adds
- Minimum node.js v18
- Uses null prototype object for
parsereturn value - Changes
strictandpriorityto match the lower case strings (i.e.low, notLOWorLow) - Require
maxAgeto be an integer usingNumber.isIntegercheck - Delegates decode implementation details to
decodeoption (i.e. error handling and quote parsing is defined bydecode) - Improve arg/option error messages (#162) e206fd5 @MaoShizhong
Other
- Remove
hasOwnProperty, useundefinedcheck for performance (#183) 8f3ee9e @gurgunday