Skip to content

Commit 6ec0c70

Browse files
committed
fix: remove abortable-iterator
depends on ipfs/helia-delegated-routing-v1-http-api#166
1 parent 8de3c04 commit 6ec0c70

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

packages/verified-fetch/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@
164164
"@libp2p/webrtc": "^5.2.12",
165165
"@libp2p/websockets": "^9.2.10",
166166
"@multiformats/dns": "^1.0.6",
167-
"abortable-iterator": "^5.1.0",
168167
"cborg": "^4.2.10",
169168
"file-type": "^20.4.1",
170169
"hashlru": "^2.3.0",

packages/verified-fetch/src/utils/walk-path.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { DoesNotExistError } from '@helia/unixfs/errors'
22
import { type Logger } from '@libp2p/interface'
3-
import { abortableSource } from 'abortable-iterator'
43
import { type Blockstore } from 'interface-blockstore'
54
import { walkPath as exporterWalk, type ExporterOptions, type ReadableStorage, type ObjectNode, type UnixFSEntry } from 'ipfs-unixfs-exporter'
65
import { badGatewayResponse, notFoundResponse } from './responses.js'
@@ -23,9 +22,7 @@ async function walkPath (blockstore: ReadableStorage, path: string, options?: Pa
2322
const ipfsRoots: CID[] = []
2423
let terminalElement: UnixFSEntry | undefined
2524

26-
const iterator = options?.signal != null ? abortableSource(exporterWalk(path, blockstore, options), options.signal) : exporterWalk(path, blockstore, options)
27-
28-
for await (const entry of iterator) {
25+
for await (const entry of exporterWalk(path, blockstore, options)) {
2926
ipfsRoots.push(entry.cid)
3027
terminalElement = entry
3128
}

0 commit comments

Comments
 (0)