Releases: sindresorhus/serialize-error
Releases · sindresorhus/serialize-error
v8.0.0
Breaking
- Use
Object#toJSON()
method to serialize properties if the method is defined (#38) 34655eb
- Buffer values in
Error
properties are not serialized and instead replaced with '[object Buffer]'
(#39) d58ce16
v7.0.1...v8.0.0
v7.0.0
Breaking
- 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 properties, I wanted to be safe and make it a major release.
v6.0.0...v7.0.0
v6.0.0
Breaking
- Require Node.js 10 5add55c
- Make it work better in the browser (#27) 728be12
Because of this, non-errors might be serialized slightly differently. It now uses JSON.stringify()
instead of util.inspect()
.
v5.0.0...v6.0.0
v5.0.0
Breaking
The default export is now a named export 9da0ddb
- const serializeError = require('serialize-error');
+ const {serializeError} = require('serialize-error');
Enhancements
Fixes
- Handle top-level null values 5ed49e4
v4.1.0...v5.0.0
v3.0.0
Breaking:
Other:
- Ensure the
.code
property is always serialized, even when it's higher up the prototype-chain.