Skip to content
This repository was archived by the owner on Jan 8, 2024. It is now read-only.

Commit d4d6515

Browse files
deps: update all deps and fix linting
* deps(dev): bump aegir from 38.1.8 to 39.0.8 Bumps [aegir](https://github.com/ipfs/aegir) from 38.1.8 to 39.0.8. - [Release notes](https://github.com/ipfs/aegir/releases) - [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md) - [Commits](ipfs/aegir@v38.1.8...v39.0.8) --- updated-dependencies: - dependency-name: aegir dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore: update all deps, fix linting * chore: add identify * chore: update fixtures * chore: deps again --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: achingbrain <alex@achingbrain.net>
1 parent 933179c commit d4d6515

39 files changed

+227
-222
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"release": "npm run docs:no-publish && aegir run release && npm run docs"
4040
},
4141
"devDependencies": {
42-
"aegir": "^38.1.0"
42+
"aegir": "^39.0.8"
4343
},
4444
"type": "module",
4545
"workspaces": [

packages/interop/package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,23 @@
5252
"test:electron-main": "aegir test -t electron-main"
5353
},
5454
"devDependencies": {
55-
"@chainsafe/libp2p-noise": "^11.0.0",
56-
"@chainsafe/libp2p-yamux": "^3.0.5",
55+
"@chainsafe/libp2p-noise": "^12.0.1",
56+
"@chainsafe/libp2p-yamux": "^4.0.2",
5757
"@helia/interface": "^1.0.0",
5858
"@helia/unixfs": "^1.0.0",
59-
"@libp2p/tcp": "^6.1.2",
60-
"@libp2p/websockets": "^5.0.3",
61-
"aegir": "^38.1.0",
59+
"@libp2p/tcp": "^7.0.1",
60+
"@libp2p/websockets": "^6.0.1",
61+
"aegir": "^39.0.8",
6262
"blockstore-core": "^4.0.1",
6363
"datastore-core": "^9.0.3",
64-
"go-ipfs": "^0.19.0",
64+
"go-ipfs": "^0.20.0",
6565
"helia": "^1.0.0",
6666
"ipfs-core-types": "^0.14.0",
6767
"ipfs-unixfs-importer": "^15.1.0",
6868
"ipfsd-ctl": "^13.0.0",
6969
"it-to-buffer": "^4.0.1",
7070
"kubo-rpc-client": "^3.0.0",
71-
"libp2p": "^0.43.2",
71+
"libp2p": "^0.45.3",
7272
"merge-options": "^3.0.4",
7373
"multiformats": "^11.0.1",
7474
"wherearewe": "^2.0.1"

packages/interop/test/bitswap.spec.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/* eslint-env mocha */
22

3+
import { type UnixFS, unixfs } from '@helia/unixfs'
34
import { expect } from 'aegir/chai'
5+
import toBuffer from 'it-to-buffer'
46
import { createHeliaNode } from './fixtures/create-helia.js'
57
import { createKuboNode } from './fixtures/create-kubo.js'
68
import type { Helia } from '@helia/interface'
7-
import type { Controller } from 'ipfsd-ctl'
8-
import { UnixFS, unixfs } from '@helia/unixfs'
99
import type { FileCandidate } from 'ipfs-unixfs-importer'
10-
import toBuffer from 'it-to-buffer'
10+
import type { Controller } from 'ipfsd-ctl'
1111

1212
describe('unixfs bitswap interop', () => {
1313
let helia: Helia
@@ -20,8 +20,7 @@ describe('unixfs bitswap interop', () => {
2020
kubo = await createKuboNode()
2121

2222
// connect helia to kubo
23-
await helia.libp2p.peerStore.addressBook.add(kubo.peer.id, kubo.peer.addresses)
24-
await helia.libp2p.dial(kubo.peer.id)
23+
await helia.libp2p.dial(kubo.peer.addresses)
2524
})
2625

2726
afterEach(async () => {

packages/interop/test/files.spec.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
/* eslint-env mocha */
22

3+
import { type AddOptions, type UnixFS, unixfs } from '@helia/unixfs'
34
import { expect } from 'aegir/chai'
5+
import { fixedSize } from 'ipfs-unixfs-importer/chunker'
6+
import { balanced } from 'ipfs-unixfs-importer/layout'
47
import { createHeliaNode } from './fixtures/create-helia.js'
58
import { createKuboNode } from './fixtures/create-kubo.js'
69
import type { Helia } from '@helia/interface'
7-
import type { Controller } from 'ipfsd-ctl'
8-
import { AddOptions, UnixFS, unixfs } from '@helia/unixfs'
9-
import { balanced } from 'ipfs-unixfs-importer/layout'
10-
import { fixedSize } from 'ipfs-unixfs-importer/chunker'
10+
import type { AddOptions as KuboAddOptions } from 'ipfs-core-types/src/root.js'
1111
import type { FileCandidate } from 'ipfs-unixfs-importer'
12+
import type { Controller } from 'ipfsd-ctl'
1213
import type { CID } from 'multiformats/cid'
13-
import type { AddOptions as KuboAddOptions } from 'ipfs-core-types/src/root.js'
1414

1515
describe('unixfs interop', () => {
1616
let helia: Helia

packages/interop/test/fixtures/create-helia.browser.ts

+13-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
import { createHelia } from 'helia'
2-
import { createLibp2p } from 'libp2p'
3-
import { webSockets } from '@libp2p/websockets'
4-
import { all } from '@libp2p/websockets/filters'
51
import { noise } from '@chainsafe/libp2p-noise'
62
import { yamux } from '@chainsafe/libp2p-yamux'
3+
import { webSockets } from '@libp2p/websockets'
4+
import { all } from '@libp2p/websockets/filters'
75
import { MemoryBlockstore } from 'blockstore-core'
86
import { MemoryDatastore } from 'datastore-core'
7+
import { createHelia } from 'helia'
8+
import { createLibp2p, type Libp2pOptions } from 'libp2p'
9+
import { identifyService } from 'libp2p/identify'
910
import type { Helia } from '@helia/interface'
1011

11-
export async function createHeliaNode (): Promise<Helia> {
12+
export async function createHeliaNode (config: Libp2pOptions = {}): Promise<Helia> {
1213
const blockstore = new MemoryBlockstore()
1314
const datastore = new MemoryDatastore()
1415

@@ -25,10 +26,14 @@ export async function createHeliaNode (): Promise<Helia> {
2526
streamMuxers: [
2627
yamux()
2728
],
29+
services: {
30+
identify: identifyService()
31+
},
2832
datastore,
29-
nat: {
30-
enabled: false
31-
}
33+
connectionGater: {
34+
denyDialMultiaddr: async () => false
35+
},
36+
...config
3237
})
3338

3439
const helia = await createHelia({

packages/interop/test/fixtures/create-helia.ts

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import { createHelia } from 'helia'
2-
import { createLibp2p, Libp2pOptions } from 'libp2p'
3-
import { tcp } from '@libp2p/tcp'
41
import { noise } from '@chainsafe/libp2p-noise'
52
import { yamux } from '@chainsafe/libp2p-yamux'
3+
import { tcp } from '@libp2p/tcp'
64
import { MemoryBlockstore } from 'blockstore-core'
75
import { MemoryDatastore } from 'datastore-core'
6+
import { createHelia } from 'helia'
7+
import { createLibp2p, type Libp2pOptions } from 'libp2p'
8+
import { identifyService } from 'libp2p/identify'
89
import type { Helia } from '@helia/interface'
910

1011
export async function createHeliaNode (config: Libp2pOptions = {}): Promise<Helia> {
@@ -22,8 +23,8 @@ export async function createHeliaNode (config: Libp2pOptions = {}): Promise<Heli
2223
yamux()
2324
],
2425
datastore,
25-
nat: {
26-
enabled: false
26+
services: {
27+
identify: identifyService()
2728
},
2829
...config
2930
})

packages/interop/test/fixtures/create-kubo.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

22
// @ts-expect-error no types
33
import * as goIpfs from 'go-ipfs'
4-
import { Controller, ControllerOptions, createController } from 'ipfsd-ctl'
4+
import { type Controller, type ControllerOptions, createController } from 'ipfsd-ctl'
55
import * as kuboRpcClient from 'kubo-rpc-client'
6-
import { isElectronMain, isNode } from 'wherearewe'
76
import mergeOptions from 'merge-options'
7+
import { isElectronMain, isNode } from 'wherearewe'
88

99
export async function createKuboNode (options: ControllerOptions<'go'> = {}): Promise<Controller> {
1010
const opts = mergeOptions({
@@ -24,5 +24,5 @@ export async function createKuboNode (options: ControllerOptions<'go'> = {}): Pr
2424
}
2525
}, options)
2626

27-
return await createController(opts)
27+
return createController(opts)
2828
}

packages/unixfs/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@
157157
"sparse-array": "^1.3.2"
158158
},
159159
"devDependencies": {
160-
"aegir": "^38.1.0",
160+
"aegir": "^39.0.8",
161161
"blockstore-core": "^4.0.1",
162-
"delay": "^5.0.0",
162+
"delay": "^6.0.0",
163163
"it-all": "^3.0.1",
164164
"it-drain": "^3.0.1",
165165
"it-first": "^3.0.1",

packages/unixfs/src/commands/add.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import type { CID } from 'multiformats/cid'
2-
import type { Blocks } from '@helia/interface/blocks'
3-
import { ByteStream, DirectoryCandidate, FileCandidate, importBytes, importByteStream, ImportCandidateStream, importDirectory, importer, ImporterOptions, importFile, ImportResult } from 'ipfs-unixfs-importer'
4-
import { balanced } from 'ipfs-unixfs-importer/layout'
1+
import { type ByteStream, type DirectoryCandidate, type FileCandidate, importBytes, importByteStream, type ImportCandidateStream, importDirectory, importer, type ImporterOptions, importFile, type ImportResult } from 'ipfs-unixfs-importer'
52
import { fixedSize } from 'ipfs-unixfs-importer/chunker'
3+
import { balanced } from 'ipfs-unixfs-importer/layout'
4+
import type { Blocks } from '@helia/interface/blocks'
5+
import type { CID } from 'multiformats/cid'
66

77
/**
88
* Default importer settings match Filecoin

packages/unixfs/src/commands/cat.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { exporter } from 'ipfs-unixfs-exporter'
2-
import type { CID } from 'multiformats/cid'
3-
import type { CatOptions } from '../index.js'
4-
import { resolve } from './utils/resolve.js'
52
import mergeOpts from 'merge-options'
6-
import type { Blocks } from '@helia/interface/blocks'
73
import { NoContentError, NotAFileError } from './utils/errors.js'
4+
import { resolve } from './utils/resolve.js'
5+
import type { CatOptions } from '../index.js'
6+
import type { Blocks } from '@helia/interface/blocks'
7+
import type { CID } from 'multiformats/cid'
88

99
const mergeOptions = mergeOpts.bind({ ignoreUndefined: true })
1010

packages/unixfs/src/commands/chmod.ts

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
import { recursive } from 'ipfs-unixfs-exporter'
2-
import { CID } from 'multiformats/cid'
3-
import type { ChmodOptions } from '../index.js'
4-
import mergeOpts from 'merge-options'
1+
import * as dagPB from '@ipld/dag-pb'
52
import { logger } from '@libp2p/logger'
63
import { UnixFS } from 'ipfs-unixfs'
7-
import { pipe } from 'it-pipe'
8-
import { InvalidPBNodeError, NotUnixFSError, UnknownError } from './utils/errors.js'
9-
import * as dagPB from '@ipld/dag-pb'
10-
import type { PBNode, PBLink } from '@ipld/dag-pb'
4+
import { recursive } from 'ipfs-unixfs-exporter'
115
import { importer } from 'ipfs-unixfs-importer'
12-
import { persist } from './utils/persist.js'
13-
import type { Blocks } from '@helia/interface/blocks'
146
import last from 'it-last'
15-
import { sha256 } from 'multiformats/hashes/sha2'
16-
import { resolve, updatePathCids } from './utils/resolve.js'
7+
import { pipe } from 'it-pipe'
8+
import mergeOpts from 'merge-options'
9+
import { CID } from 'multiformats/cid'
1710
import * as raw from 'multiformats/codecs/raw'
11+
import { sha256 } from 'multiformats/hashes/sha2'
1812
import { SHARD_SPLIT_THRESHOLD_BYTES } from './utils/constants.js'
13+
import { InvalidPBNodeError, NotUnixFSError, UnknownError } from './utils/errors.js'
14+
import { persist } from './utils/persist.js'
15+
import { resolve, updatePathCids } from './utils/resolve.js'
16+
import type { ChmodOptions } from '../index.js'
17+
import type { Blocks } from '@helia/interface/blocks'
18+
import type { PBNode, PBLink } from '@ipld/dag-pb'
1919

2020
const mergeOptions = mergeOpts.bind({ ignoreUndefined: true })
2121
const log = logger('helia:unixfs:chmod')
@@ -94,14 +94,14 @@ export async function chmod (cid: CID, mode: number, blockstore: Blocks, options
9494
}
9595
}
9696
}),
97-
async (nodes) => await last(nodes)
97+
async (nodes) => last(nodes)
9898
)
9999

100100
if (root == null) {
101101
throw new UnknownError(`Could not chmod ${resolved.cid.toString()}`)
102102
}
103103

104-
return await updatePathCids(root.cid, resolved, blockstore, opts)
104+
return updatePathCids(root.cid, resolved, blockstore, opts)
105105
}
106106

107107
const block = await blockstore.get(resolved.cid)
@@ -133,5 +133,5 @@ export async function chmod (cid: CID, mode: number, blockstore: Blocks, options
133133

134134
await blockstore.put(updatedCid, updatedBlock)
135135

136-
return await updatePathCids(updatedCid, resolved, blockstore, opts)
136+
return updatePathCids(updatedCid, resolved, blockstore, opts)
137137
}

packages/unixfs/src/commands/cp.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import type { Blocks } from '@helia/interface/blocks'
2-
import type { CID } from 'multiformats/cid'
3-
import type { CpOptions } from '../index.js'
4-
import mergeOpts from 'merge-options'
51
import { logger } from '@libp2p/logger'
2+
import mergeOpts from 'merge-options'
63
import { addLink } from './utils/add-link.js'
7-
import { cidToPBLink } from './utils/cid-to-pblink.js'
84
import { cidToDirectory } from './utils/cid-to-directory.js'
5+
import { cidToPBLink } from './utils/cid-to-pblink.js'
96
import { SHARD_SPLIT_THRESHOLD_BYTES } from './utils/constants.js'
107
import { InvalidParametersError } from './utils/errors.js'
8+
import type { CpOptions } from '../index.js'
9+
import type { Blocks } from '@helia/interface/blocks'
10+
import type { CID } from 'multiformats/cid'
1111

1212
const mergeOptions = mergeOpts.bind({ ignoreUndefined: true })
1313
const log = logger('helia:unixfs:cp')

packages/unixfs/src/commands/ls.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { exporter, UnixFSEntry } from 'ipfs-unixfs-exporter'
2-
import type { CID } from 'multiformats/cid'
3-
import type { LsOptions } from '../index.js'
4-
import { resolve } from './utils/resolve.js'
1+
import { exporter, type UnixFSEntry } from 'ipfs-unixfs-exporter'
52
import mergeOpts from 'merge-options'
6-
import type { Blocks } from '@helia/interface/blocks'
73
import { NoContentError, NotADirectoryError } from './utils/errors.js'
4+
import { resolve } from './utils/resolve.js'
5+
import type { LsOptions } from '../index.js'
6+
import type { Blocks } from '@helia/interface/blocks'
7+
import type { CID } from 'multiformats/cid'
88

99
const mergeOptions = mergeOpts.bind({ ignoreUndefined: true })
1010

packages/unixfs/src/commands/mkdir.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
import { CID } from 'multiformats/cid'
2-
import mergeOpts from 'merge-options'
3-
import { logger } from '@libp2p/logger'
4-
import type { MkdirOptions } from '../index.js'
51
import * as dagPB from '@ipld/dag-pb'
6-
import { addLink } from './utils/add-link.js'
7-
import type { Blocks } from '@helia/interface/blocks'
2+
import { logger } from '@libp2p/logger'
83
import { UnixFS } from 'ipfs-unixfs'
9-
import { sha256 } from 'multiformats/hashes/sha2'
104
import { exporter } from 'ipfs-unixfs-exporter'
5+
import mergeOpts from 'merge-options'
6+
import { CID } from 'multiformats/cid'
7+
import { sha256 } from 'multiformats/hashes/sha2'
8+
import { addLink } from './utils/add-link.js'
119
import { cidToDirectory } from './utils/cid-to-directory.js'
1210
import { cidToPBLink } from './utils/cid-to-pblink.js'
1311
import { SHARD_SPLIT_THRESHOLD_BYTES } from './utils/constants.js'
1412
import { InvalidParametersError, NotADirectoryError } from './utils/errors.js'
13+
import type { MkdirOptions } from '../index.js'
14+
import type { Blocks } from '@helia/interface/blocks'
1515

1616
const mergeOptions = mergeOpts.bind({ ignoreUndefined: true })
1717
const log = logger('helia:unixfs:mkdir')

packages/unixfs/src/commands/rm.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import type { Blocks } from '@helia/interface/blocks'
2-
import type { CID } from 'multiformats/cid'
3-
import type { RmOptions } from '../index.js'
4-
import mergeOpts from 'merge-options'
51
import { logger } from '@libp2p/logger'
6-
import { removeLink } from './utils/remove-link.js'
2+
import mergeOpts from 'merge-options'
73
import { cidToDirectory } from './utils/cid-to-directory.js'
84
import { SHARD_SPLIT_THRESHOLD_BYTES } from './utils/constants.js'
95
import { InvalidParametersError } from './utils/errors.js'
6+
import { removeLink } from './utils/remove-link.js'
7+
import type { RmOptions } from '../index.js'
8+
import type { Blocks } from '@helia/interface/blocks'
9+
import type { CID } from 'multiformats/cid'
1010

1111
const mergeOptions = mergeOpts.bind({ ignoreUndefined: true })
1212
const log = logger('helia:unixfs:rm')

packages/unixfs/src/commands/stat.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import { exporter } from 'ipfs-unixfs-exporter'
2-
import type { CID } from 'multiformats/cid'
3-
import type { StatOptions, UnixFSStats } from '../index.js'
4-
import mergeOpts from 'merge-options'
1+
import * as dagPb from '@ipld/dag-pb'
52
import { logger } from '@libp2p/logger'
63
import { UnixFS } from 'ipfs-unixfs'
4+
import { exporter } from 'ipfs-unixfs-exporter'
5+
import mergeOpts from 'merge-options'
6+
import * as raw from 'multiformats/codecs/raw'
77
import { InvalidPBNodeError, NotUnixFSError, UnknownError } from './utils/errors.js'
8-
import * as dagPb from '@ipld/dag-pb'
9-
import type { AbortOptions } from '@libp2p/interfaces'
10-
import type { Mtime } from 'ipfs-unixfs'
118
import { resolve } from './utils/resolve.js'
12-
import * as raw from 'multiformats/codecs/raw'
9+
import type { StatOptions, UnixFSStats } from '../index.js'
1310
import type { Blocks } from '@helia/interface/blocks'
11+
import type { AbortOptions } from '@libp2p/interfaces'
12+
import type { Mtime } from 'ipfs-unixfs'
13+
import type { CID } from 'multiformats/cid'
1414

1515
const mergeOptions = mergeOpts.bind({ ignoreUndefined: true })
1616
const log = logger('helia:unixfs:stat')

0 commit comments

Comments
 (0)