Skip to content

Latest commit

 

History

History
122 lines (62 loc) · 6.99 KB

CHANGELOG.md

File metadata and controls

122 lines (62 loc) · 6.99 KB

Change Log

All notable changes will be documented in this file. ono adheres to Semantic Versioning.

v7.1.0 (2020-03-03)

  • Added a static Ono.extend() method that allows Ono to extend errors that were created outside of Ono. The extended error gets all the Ono functionality, including nested stack traces, custom properties, improved support for JSON.stringify(), etc.

Full Changelog

v7.0.0 (2020-02-16)

  • Moved Ono to the @JSDevTools scope on NPM

  • The "ono" NPM package is now just a wrapper around the scoped "@jsdevtools/ono" package

Full Changelog

v6.0.0 (2019-12-28)

Breaking Changes

  • Dropped support for IE8 and other JavaScript engines that don't support Object.getOwnPropertyDescriptor()

  • Removed ono.formatter. It has been replaced with the format option

  • When using the default ono() function to wrap an error, it will now try to match the error's type, rather than simply using the base Error class.

New Features

Full Changelog

v5.1.0 (2019-09-10)

  • Added a static Ono.toJSON() method that accepts any Error (even a non-Ono error) and returns a POJO that can be used with JSON.stringify(). Ono errors already have a built-in toJSON() method, but this exposes that enhanced functionality in a way that can be used with any error.

Full Changelog

v5.0.0 (2019-02-18)

Breaking Changes

in Node.js

  • Ono errors previously included an inspect() method to support Node's util.inspect() function. As of Node v6.6.0, the inspect() method is deprecated in favor of a util.inspect.custom. Ono has updated accordingly, so errors no longer have an inspect() method.

in Web Browsers

New Features

  • Completely rewritten in TypeScript.

  • Ono is now completely dependency free.

  • You can now create your own Ono functions for custom error classes. See the docs for details.

  • Symbol-keyed properties are now supported. If the originalError and/or props objects has Symbol-keyed properties, they will be copied to the Ono error.

Full Changelog

v4.0.0 (2017-07-07)

The err parameter (see the API docs) can now be any type of object, not just an instanceof Error. This allows for errors that don't extend from the Error class, such as DOMError, DOMException, and custom error types.

NOTE: This should not be a breaking change, but I'm bumping the major version number out of an abundance of caution.

Full Changelog

v3.1.0 (2017-06-01)

We removed the direct dependency on Node's util.format(), which was needlessly bloating the browser bundle. Instead, I now import format-util, which a much more lightweight browser implementation. There's no change when running in Node.js, because format-util simply exports util.format().

Full Changelog

v3.0.0 (2017-06-01)

  • Updated all dependencies and verified support for Node 8.0
  • Ono no longer appears in error stack traces, so errors look like they came directly from your code

Full Changelog

v2.0.0 (2015-12-14)

  • Did a major refactoring and code cleanup
  • Support for various browser-specific Error.prototype properties (fileName, lineNumber, sourceURL, etc.)
  • If you define a custom toJSON() method on an error object, Ono will no longer overwrite it
  • Added support for Node's util.inspect()

Full Changelog