Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gouv.fr, co.uk, com.sg, other public suffixes are not being resolved as TLDs #67

Closed
flotwig opened this issue Apr 2, 2019 · 4 comments · Fixed by #79
Closed

gouv.fr, co.uk, com.sg, other public suffixes are not being resolved as TLDs #67

flotwig opened this issue Apr 2, 2019 · 4 comments · Fixed by #79

Comments

@flotwig
Copy link

flotwig commented Apr 2, 2019

We're running in to an issue (cypress-io/cypress#3717) caused by an update to parse-domain causing public suffixes to not be resolved as TLDs. gouv.fr, co.uk, com.sg, and other public suffixes are not being resolved as TLDs ever since 2.1.0.

const parseDomain = require('parse-domain')

console.log(
  parseDomain('dev.classea12.beta.gouv.fr', {
    privateTlds: true,
    customTlds: /^[\d\.]+$/
  })
)

With [email protected], this results in:

{ tld: 'gouv.fr', domain: 'beta', subdomain: 'dev.classea12' }

With [email protected], this results in:

{ tld: 'fr', domain: 'gouv', subdomain: 'dev.classea12.beta' }

Potentially related: #64, #65

@jhnns
Copy link
Member

jhnns commented May 27, 2019

Can you try out v2.1.8? Does it fix your issue?

@flotwig
Copy link
Author

flotwig commented May 28, 2019

No, still the same issue. Tried 2.2.1 as well.

@jhnns
Copy link
Member

jhnns commented May 29, 2019

Ok, I can confirm the issue. It's in combination with the privateTlds: true flag. I need to look into it.

@jhnns
Copy link
Member

jhnns commented Aug 10, 2019

This fix shipped with v2.3.2 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants