Skip to content

Commit 4577b25

Browse files
release v5.1.0
1 parent 5dfeb49 commit 4577b25

File tree

3 files changed

+22
-8
lines changed

3 files changed

+22
-8
lines changed

CHANGELOG.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
1-
# Change Log
1+
Change Log
2+
=======================================
23
All notable changes will be documented in this file.
34
`ono` adheres to [Semantic Versioning](http://semver.org/).
45

56

6-
## [v5.0.0](https://github.com/JS-DevTools/ono/tree/v5.0.0) (2019-02-18)
7+
[v5.1.0](https://github.com/JS-DevTools/ono/tree/v5.1.0) (2019-09-10)
8+
----------------------------------------------------------------------------------------------------
79

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.
11+
12+
[Full Changelog](https://github.com/JS-DevTools/ono/compare/v4.0.11...v5.0.0)
13+
14+
15+
16+
[v5.0.0](https://github.com/JS-DevTools/ono/tree/v5.0.0) (2019-02-18)
17+
----------------------------------------------------------------------------------------------------
818
### Breaking Changes
919

1020
#### in Node.js
@@ -28,32 +38,36 @@ All notable changes will be documented in this file.
2838
[Full Changelog](https://github.com/JS-DevTools/ono/compare/v4.0.11...v5.0.0)
2939

3040

31-
## [v4.0.0](https://github.com/JS-DevTools/ono/tree/v4.0.0) (2017-07-07)
3241

42+
[v4.0.0](https://github.com/JS-DevTools/ono/tree/v4.0.0) (2017-07-07)
43+
----------------------------------------------------------------------------------------------------
3344
The `err` parameter (see [the API docs](https://github.com/JS-DevTools/ono#api)) 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`](https://developer.mozilla.org/en-US/docs/Web/API/DOMError), [`DOMException`](https://developer.mozilla.org/en-US/docs/Web/API/DOMException), and custom error types.
3445

3546
> **NOTE:** This should **not** be a breaking change, but I'm bumping the major version number out of an abundance of caution.
3647
3748
[Full Changelog](https://github.com/JS-DevTools/ono/compare/v3.1.0...v4.0.0)
3849

3950

40-
## [v3.1.0](https://github.com/JS-DevTools/ono/tree/v3.1.0) (2017-06-01)
4151

52+
[v3.1.0](https://github.com/JS-DevTools/ono/tree/v3.1.0) (2017-06-01)
53+
----------------------------------------------------------------------------------------------------
4254
We removed the direct dependency on [Node's `util.format()`](https://nodejs.org/api/util.html#util_util_format_format_args), which was needlessly bloating the browser bundle. Instead, I now import [`format-util`](https://www.npmjs.com/package/format-util), which a much more [lightweight browser implementation](https://github.com/tmpfs/format-util/blob/f88c550ef10c5aaadc15a7ebab595f891bb385e1/format.js). There's no change when running in Node.js, because `format-util` simply [exports `util.format()`](https://github.com/tmpfs/format-util/blob/392628c5d45e558589f2f19ffb9d79d4b5540010/index.js#L1).
4355

4456
[Full Changelog](https://github.com/JS-DevTools/ono/compare/v3.0.0...v3.1.0)
4557

4658

47-
## [v3.0.0](https://github.com/JS-DevTools/ono/tree/v3.0.0) (2017-06-01)
4859

60+
[v3.0.0](https://github.com/JS-DevTools/ono/tree/v3.0.0) (2017-06-01)
61+
----------------------------------------------------------------------------------------------------
4962
- Updated all dependencies and verified support for Node 8.0
5063
- Ono no longer appears in error stack traces, so errors look like they came directly from your code
5164

5265
[Full Changelog](https://github.com/JS-DevTools/ono/compare/v2.0.0...v3.0.0)
5366

5467

55-
## [v2.0.0](https://github.com/JS-DevTools/ono/tree/v2.0.0) (2015-12-14)
5668

69+
[v2.0.0](https://github.com/JS-DevTools/ono/tree/v2.0.0) (2015-12-14)
70+
----------------------------------------------------------------------------------------------------
5771
- Did a major refactoring and code cleanup
5872
- Support for various browser-specific `Error.prototype` properties (`fileName`, `lineNumber`, `sourceURL`, etc.)
5973
- If you define a custom `toJSON()` method on an error object, Ono will no longer overwrite it

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ono",
3-
"version": "5.0.2",
3+
"version": "5.1.0",
44
"description": "Throw better errors.",
55
"keywords": [
66
"throw",

0 commit comments

Comments
 (0)