Releases: nc-js/ip
Releases · nc-js/ip
v0.9.0
Breaking changes
- The package has been renamed to
@nc/ip(formally@nc/whatwg-infra). - The types
IpAddrandIpAddrValueare now exported under@nc/ip(formally@nc/net-addr/ip) - The types
Ipv4AddrandIpv4AddrIteratorare now exported under@nc/ip/v4(formally@nc/net-addr/ip) - The types
Ipv6Addr,Ipv6AddrIterator, andIpv6MulticastScopeare now exported under@nc/ip/v4(formally@nc/net-addr/ip) - The types
Port,SocketAddr,SocketAddrValue,SocketAddrV4, andSocketAddrV6are now exported under@nc/ip/socket(formally@nc/net-addr/socket).
Internal changes
- Unit tests for socket-related types are now in separate files
v0.8.0
Breaking changes
IpAddrno longer has the methodsisIpv4()andisIpv6(), as they are not usable as type guards in their current state. These methods may be re-introduced in the future.
Bug fixes
Two edge cases were fixed:
IpAddrcan no longer recursively contain anotherIpAddr. It can now only contain eitherIpv4AddrorIpv6Addr.SocketAddrcan no longer recursively contain anotherSocketAddr. It can now only contain eitherSocketAddrV4orSocketAddrV6.
Internal changes
IpAddrnow has unit tests.
v0.7.7
Features
IPv6Addrnow returns its canonical string representation. This TypeScript implementation is ported over from Rust's implementation (impl fmt::Display for Ipv6Addr).
Internal changes
Ipv4Addr.tryNew()now has more extensive unit tests.
v0.7.6
Features
Ipv6Addrnow has 3 new instance methods,tryFromUint8Array(),toIpv4()andtoIpv4Mapped(). Their implementation and documentation are also ported from Rust'sstd::netmodule to TypeScript.Ipv4Addrnow has 2 new instance methods,toIpv6Compatible()andtoIpv6Mapped(). Like above, these implementations are also ported from Rust's standard library.
v0.7.5
Documentation
- The root module-level documentation now uses
README.mdwhich includes examples, instead of documentation in./src/mod.ts(now removed). - Minor documentation fixes for
SocketAddr,SocketAddrValue,SocketAddrV4, andSocketAddrV6. - Minor module-level documentation fixes for
/socketand/ipfor consistency.
v0.7.4
Documentation
- Hack-fix links to method names referenced in
IpAddrandIpAddrValue.
Internal changes
- CI: The commands in the main CI workflow no longer has to be manually synced. They now use custom command aliases under
deno task, including:deno task checkdeno task testdeno task htmldocsdeno task lintdocs
v0.7.3
Bug fixes
- Renames a typo in a Port method name, changing
Port.isDyanmic()toPort.isDynamic(). - Renames the current
MulticastScopetype toIpv6MulticastScope, since it only describes IPv6 addresses.
Documentation
- Classes now have top-level code block examples of how they work.
- Module files and the
README.mdfile now have some brief, top-level documentation describing what they contain. - Symbols now have more internal links between each other, which should make it easier to navigate.
- Documentation style and formatting is generally more consistent.
Internal changes
- CI: The main CI workflow now also runs tests in all documentation code examples, not just in the README.md file.
- CI: Fixes a minor typo in a step name of a GitHub Actions CI workflow.
v0.7.2
Features
- It is now possible to iterate through a range of IP addresses via
Ipv4AddrIteratorandIpv6AddrIterator. This provides a slightly more optimized way of iterating versus callingIpv4Addr.next()/Ipv6Addr.next(). Instead of having to constantly convert to/from a single integer to create a new IP address, the iterator stores that integer internally as a mutable state.
v0.7.1
Features
- The
Ipv6Addrclass now exposes 2 instance methods,isDiscardOnly()andisIpv4Translated().
Documentation
- The documentation for the
Ipv6Addr.isIpv4Mapped()method now mentions its relevant RFC (RFC 4291). - The code example in
README.mdis now fixed. - The syntax highlighting in the install section is now fixed.
Internal
- This also adds some unit tests for pre-existing methods,
Ipv6Addr.tryNew()andIpv6Addr.isIpv4Mapped(). .git-blame-ignore-revsfile is now setup.- The CI workflow will now also run tests for any code examples set in
README.md.
v0.7.0
Breaking changes
- Exports
/ipv4and/ipv6were removed in favor of a new export,/ip. This exports all currently existing IP-related types:Ipv4Addr,Ipv6Addr,IpAddr,IpAddrValue, andMulticastScope.