Skip to content

v2

Compare
Choose a tag to compare
@AndreiIgna AndreiIgna released this 22 May 17:50

v2 is here

@layered/dns-records now uses http DNS resolvers by default, so it works in all JavaScript runtimes. Using DNS lookup withdig command is still available, but needs to be included specifically when querying DNS records.

Breaking changes

  • the library is ESM only now. Use v1.x if your projects uses CommonJS require()
  • getAllRecords() renamed to getAllDnsRecords()
  • getNameServers is removed, use getDnsRecords(name: string, type = 'NS')

What's new

  • DNS lookup over http. resolver option in getDnsRecords() and getAllDnsRecords() can be set to cloudflare-dns (default), google-dns or a Function that does custom dns lookup
  • new function getAllDnsRecordsStream that can return dns record lines as they're discovered