Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: multiformats/js-multiaddr
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v12.5.0
Choose a base ref
...
head repository: multiformats/js-multiaddr
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v12.5.1
Choose a head ref
  • 2 commits
  • 5 files changed
  • 2 contributors

Commits on Jun 25, 2025

  1. fix: deprecate DNS resolvers (#426)

    Adds deprecation notices to all DNS resolvers
    achingbrain authored Jun 25, 2025
    Copy the full SHA
    090fe79 View commit details
  2. chore(release): 12.5.1 [skip ci]

    ## [12.5.1](v12.5.0...v12.5.1) (2025-06-25)
    
    ### Bug Fixes
    
    * deprecate DNS resolvers ([#426](#426)) ([090fe79](090fe79))
    semantic-release-bot committed Jun 25, 2025
    Copy the full SHA
    558c9c9 View commit details
Showing with 22 additions and 1 deletion.
  1. +6 −0 CHANGELOG.md
  2. +1 −1 package.json
  3. +6 −0 src/index.ts
  4. +6 −0 src/resolvers/dnsaddr.ts
  5. +3 −0 src/resolvers/index.ts
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [12.5.1](https://github.com/multiformats/js-multiaddr/compare/v12.5.0...v12.5.1) (2025-06-25)

### Bug Fixes

* deprecate DNS resolvers ([#426](https://github.com/multiformats/js-multiaddr/issues/426)) ([090fe79](https://github.com/multiformats/js-multiaddr/commit/090fe790857bb75cc8df66ee22019ac54106f3ec))

## [12.5.0](https://github.com/multiformats/js-multiaddr/compare/v12.4.4...v12.5.0) (2025-06-18)

### Features
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiformats/multiaddr",
"version": "12.5.0",
"version": "12.5.1",
"description": "multiaddr implementation (binary + string representation of network addresses)",
"license": "Apache-2.0 OR MIT",
"homepage": "https://github.com/multiformats/js-multiaddr#readme",
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -672,6 +672,8 @@ export function fromNodeAddress (addr: NodeAddress, transport: string): Multiadd
* console.info(ma2)
* // '/ip4/127.0.0.1'
* ```
*
* @deprecated Will be removed in a future release
*/
export function fromTuples (tuples: Tuple[]): Multiaddr {
return multiaddr(tuples.map(([code, value]) => {
@@ -706,6 +708,8 @@ export function fromTuples (tuples: Tuple[]): Multiaddr {
* console.info(ma2)
* // '/ip4/127.0.0.1'
* ```
*
* @deprecated Will be removed in a future release
*/
export function fromStringTuples (tuples: StringTuple[]): Multiaddr {
return multiaddr(tuples.map(([code, value]) => {
@@ -737,6 +741,8 @@ export function fromStringTuples (tuples: StringTuple[]): Multiaddr {
* isName(multiaddr('/dns/ipfs.io'))
* // true
* ```
*
* @deprecated DNS resolving will be removed in a future release
*/
export function isName (addr: Multiaddr): boolean {
if (!isMultiaddr(addr)) {
6 changes: 6 additions & 0 deletions src/resolvers/dnsaddr.ts
Original file line number Diff line number Diff line change
@@ -15,6 +15,9 @@ class RecursionLimitError extends Error {
}
}

/**
* @deprecated DNS resolving will be removed in a future release
*/
export interface DNSADDROptions extends AbortOptions {
/**
* An optional DNS resolver
@@ -30,6 +33,9 @@ export interface DNSADDROptions extends AbortOptions {
maxRecursiveDepth?: number
}

/**
* @deprecated DNS resolving will be removed in a future release
*/
export const dnsaddrResolver: Resolver<DNSADDROptions> = async function dnsaddrResolver (ma: Multiaddr, options: DNSADDROptions = {}): Promise<string[]> {
const recursionLimit = options.maxRecursiveDepth ?? MAX_RECURSIVE_DEPTH

3 changes: 3 additions & 0 deletions src/resolvers/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import type { AbortOptions, Multiaddr } from '../index.js'

/**
* @deprecated DNS resolving will be removed in a future release
*/
export interface Resolver<ResolveOptions extends AbortOptions = AbortOptions> {
(ma: Multiaddr, options?: ResolveOptions): Promise<string[]>
}