Update isemail from 2.x.x to 3.x.x#1229
Conversation
| ['joe@www.example.com', true], | ||
| ['joe@localhost', false, null, '"value" must be a valid email'], | ||
| ['joe@localhost', true], | ||
| ['joe@', false, null, '"value" must be a valid email'], |
There was a problem hiding this comment.
Should we add a test here for a unicode address? êjness@something.com for example. We don't want to ensure the operation of isemail but I think it would be good to make sure we continue to support unicode going forward and throughout the Joi part of the code base.
| done(); | ||
| }); | ||
|
|
||
| it('throws when checkDNS option is enabled', (done) => { |
There was a problem hiding this comment.
No harm in keeping this test.
| Helper.validate(schema, [ | ||
| ['joe@example.com', true], | ||
| ['joe@www.example.com', true], | ||
| ['joe@localhost', false, null, '"value" must be a valid email'], |
There was a problem hiding this comment.
Is this an expected breaking change ? /cc @skeggse
There was a problem hiding this comment.
I believe so, extrapolating from the resolution of skeggse/isemail#154
There was a problem hiding this comment.
Assuming that test used to specify that joe@localhost was not a valid email, yes, this is an expected change. I'd actually like to see the same test, but true.
There was a problem hiding this comment.
Makes me wonder if this should be a breaking change for joi or if it's considered a bugfix from your pov.
There was a problem hiding this comment.
I'd actually like to see the same test, but true
I'm not sure why the Github UI is showing that line just taken out. I didn't remove it, I did just change the assertion to true :)
There was a problem hiding this comment.
It seems like a bugfix to me - users who do not desire this behavior can add localhost to their tldBlacklist.
|
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. |
isemailv3.0.0 has been released, adding support for unicode emails and removing DNS lookups entirely.