link-check icon indicating copy to clipboard operation
link-check copied to clipboard

Replace isemail, convert to ES6 module

Open rkitover opened this issue 1 year ago • 7 comments

Replace isemail with node-email-verifier, which also checks that email domains have an MX record.

Add support for the timeout option for domain MX verification.

This also fixes the deprecation warning for the punycode module, which is a dependency of isemail.

Convert module to ES6 with "type": "module" in package.json. This will mean that users will need to import into an ES6 module or use one of the workarounds for cjs such as await import.

rkitover avatar Jun 09 '24 20:06 rkitover

sorry I'm still working on this, I opened this by accident

rkitover avatar Jun 09 '24 20:06 rkitover

could you run the CI please?

rkitover avatar Jun 09 '24 20:06 rkitover

You can turn on Actions on your own fork https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository then you can test as much as you want

nschonni avatar Jun 09 '24 23:06 nschonni

I don't see actions at all in my fork.

rkitover avatar Jun 10 '24 14:06 rkitover

@tcort this is ready for review.

rkitover avatar Jun 10 '24 19:06 rkitover

@tcort I simplified this using a PR I did for node-email-verifier to add the timeout option there.

rkitover avatar Aug 20 '24 10:08 rkitover

@tcort Can you look at this please, the main issue is that this fixes the deprecation warning for the pynycode module.

If you don't want it to be an ES6 module I can convert it back to cjs.

rkitover avatar Sep 18 '24 13:09 rkitover

  • This is related to https://github.com/tcort/link-check/issues/92

Maybe a minimal PR which only replaces isemail, without additional enhancements, would be easier to review and merge? It would be good to get some feedback from @tcort on this.

MikeMcC399 avatar Oct 18 '24 10:10 MikeMcC399

I can convert back to cjs which will make this only a couple of lines, would you like me to?

rkitover avatar Oct 18 '24 11:10 rkitover

@rkitover

I can convert back to cjs which will make this only a couple of lines, would you like me to?

If you ask me, then "yes". However bear in mind that I am not a maintainer of this repo, or the owner of it. It's just my personal opinion.

Also, if you do that, it would probably make sense to open a new PR to make it cleaner.

MikeMcC399 avatar Oct 18 '24 11:10 MikeMcC399

Moved here:

https://github.com/tcort/link-check/pull/94 .

rkitover avatar Oct 19 '24 18:10 rkitover