Conversation
Marsup
left a comment
There was a problem hiding this comment.
That's great! Do you mind writing the docs or should I?
lib/errors.js
Outdated
|
|
||
| super(message); | ||
| this._object = object; | ||
| this.annotate = internals.annotate; |
There was a problem hiding this comment.
I think annotate, isJoi and name can be part of the prototype as they don't change between errors. As node still doesn't support class properties I'd suggest attaching it to the prototype like exports.ValidationError.prototype.isJoi = true right after.
I have a doubt about name since it's part of Error so if you can't for this one, leave it be.
|
Thanks :) I'll have a go at the docs |
|
If I moved the ValidationError into |
73bca8a to
30bd0d7
Compare
|
Wasn't sure what approach to take with the docs, it doesn't seem like a breaking change so I just went with 'mention it somewhere'. Let me know what you had in mind. |
None from me 👍 It shouldn't be a breaking change unless people do things like As for the docs, the error type should probably appear next to https://github.com/hapijs/joi/blob/master/API.md#version as it's now exported. |
30bd0d7 to
49f9b42
Compare
|
I've add a I've not moved Are there any other changes I should make to this PR? Are the docs OK? |
|
Nope, that's perfect, just a few details to sort out to decide in which release to include this, I'll merge in a bit. |
4a2de06 to
a9aa3e7
Compare
|
Out of safety I'm going to set this one for v15 even though I don't personally consider it a breaking change. |
|
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions. |
See #1244