Skip to content

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

Lines changed: 227 additions & 222 deletions

package.json

Lines changed: 1 addition & 1 deletion
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

Lines changed: 7 additions & 7 deletions
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

Lines changed: 4 additions & 5 deletions
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 13 additions & 8 deletions
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

Lines changed: 6 additions & 5 deletions
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 4 additions & 4 deletions
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

0 commit comments

Comments
 (0)