Skip to content

Commit f17056c

Browse files
authored
fix: remove abortable-iterator (#223)
* fix: remove abortable-iterator depends on ipfs/helia-delegated-routing-v1-http-api#166 * chore: update delegated-routing-v1-http-api-client
1 parent 8de3c04 commit f17056c

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

packages/verified-fetch/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
"dependencies": {
150150
"@helia/block-brokers": "^4.1.0",
151151
"@helia/car": "^4.0.4",
152-
"@helia/delegated-routing-v1-http-api-client": "^4.2.2",
152+
"@helia/delegated-routing-v1-http-api-client": "^4.2.3",
153153
"@helia/interface": "^5.2.1",
154154
"@helia/ipns": "^8.2.0",
155155
"@helia/routers": "^3.0.1",
@@ -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)