NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm
npm, #1672 most downloaded on npm
Serialize/deserialize an error into a plain object
Latest stable
13.1.0
Last release 20 days ago
02 Nov 2026
Release timing varies
gaps range from 3 weeks to 1.2 years
Most releases are documented
notes for 23 of 27 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
27 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
Harden error serialization and constructor registration 1893fb0
https://github.com/sindresorhus/serialize-error/compare/v13.0.2...v13.1.0
Fix throwing toJSON() preventing later calls for the same object c5ca25c
toJSON() preventing later calls for the same object c5ca25chttps://github.com/sindresorhus/serialize-error/compare/v13.0.1...v13.0.2
Fix plain objects in error properties not being recursively processed 667d958
NonError deserialization round-trip 4b56cb5https://github.com/sindresorhus/serialize-error/compare/v13.0.0...v13.0.1
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Add factory function support for incompatible error constructors (#114) d196952
addKnownErrorConstructor work with minified code (#113) adbdd79NonError error (#112) fda78b8https://github.com/sindresorhus/serialize-error/compare/v12.0.0...v13.0.0
Require Node.js 18+ (#100) 98bbe4e
AggregateError (#103) b6ff2ebunknown input (#105) 64ce883https://github.com/sindresorhus/serialize-error/compare/v11.0.3...v12.0.0
Improve compatibility with Next.js (#94) 6729be5
https://github.com/sindresorhus/serialize-error/compare/v11.0.2...v11.0.3
Fix compatibility with DOMException 26fc52b
DOMException 26fc52bhttps://github.com/sindresorhus/serialize-error/compare/v11.0.1...v11.0.2
Fix handling of non-extensible objects fdfe034
https://github.com/sindresorhus/serialize-error/compare/v11.0.0...v11.0.1
Expect a message property at a minimum to be interpreted as an Error (#77) 0720121
message property at a minimum to be interpreted as an Error (#77) 0720121https://github.com/sindresorhus/serialize-error/compare/v10.0.0...v11.0.0
Preserve error constructor (#70) 49db63a
TypeError might have been deserialized as a Error before, but is now deserialized as a TypeError.useToJSON option (#71) e9e8666isErrorLike() method (#68) bb6d9d6cause property (#65) 7e8be51https://github.com/sindresorhus/serialize-error/compare/v9.1.1...v10.0.0
https://github.com/sindresorhus/serialize-error/compare/v9.1.0...v9.1.1
https://github.com/sindresorhus/serialize-error/compare/v9.1.0...v9.1.1
Handle streams attached to an error by replacing them with '[object Stream]' (#57) b589f8e
'[object Stream]' (#57) b589f8ehttps://github.com/sindresorhus/serialize-error/compare/v9.0.0...v9.1.0
This package is now pure ESM. Please [read this](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
https://github.com/sindresorhus/serialize-error/compare/v8.1.0...v9.0.0
Add `maxDepth` option (#43) f15af7d
maxDepth option (#43) f15af7dhttps://github.com/sindresorhus/serialize-error/compare/v8.0.1...v8.1.0
Fix browser compatibility (#42) 8b1cc94
https://github.com/sindresorhus/serialize-error/compare/v8.0.0...v8.0.1
Use Object#toJSON() method to serialize properties if the method is defined (#38) 34655eb
Object#toJSON() method to serialize properties if the method is defined (#38) 34655ebError properties are not serialized and instead replaced with '[object Buffer]'(#39) d58ce16https://github.com/sindresorhus/serialize-error/compare/v7.0.1...v8.0.0
Make serialized error properties enumerable (#32) 3235f50
https://github.com/sindresorhus/serialize-error/compare/v7.0.0...v7.0.1
Make error properties non-enumerable (#30) cea59fc This is really just a bug fix, but since it can cause subtle bugs if you actually iterate over the
https://github.com/sindresorhus/serialize-error/compare/v6.0.0...v7.0.0
Make it work better in the browser (#27) 728be12 Because of this, non-errors might be serialized slightly differently. It now uses JSON.stringify() in
JSON.stringify() instead of util.inspect().https://github.com/sindresorhus/serialize-error/compare/v5.0.0...v6.0.0
The default export is now a named export 9da0ddb ```diff
The default export is now a named export 9da0ddb
- const serializeError = require('serialize-error');
+ const {serializeError} = require('serialize-error');
deserializeError method (#24) 9da0ddbhttps://github.com/sindresorhus/serialize-error/compare/v4.1.0...v5.0.0
Refactor TypeScript definition to CommonJS compatible export (#15) 9212299
https://github.com/sindresorhus/serialize-error/compare/v4.0.0...v4.1.0
Require Node.js 8 (#14) 955c617
Breaking:
Enhancements:
https://github.com/sindresorhus/serialize-error/compare/v3.0.0...v4.0.0
Ensure the .code property is always serialized, even when it's higher up the prototype-chain.
Breaking:
Other:
.code property is always serialized, even when it's higher up the prototype-chain.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.