Skip to content

Commit

Permalink
deps: update all deps and fix linting
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
dependabot[bot] and achingbrain authored May 24, 2023
1 parent 933179c commit d4d6515
Show file tree
Hide file tree
Showing 39 changed files with 227 additions and 222 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"release": "npm run docs:no-publish && aegir run release && npm run docs"
},
"devDependencies": {
"aegir": "^38.1.0"
"aegir": "^39.0.8"
},
"type": "module",
"workspaces": [
Expand Down
14 changes: 7 additions & 7 deletions packages/interop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,23 @@
"test:electron-main": "aegir test -t electron-main"
},
"devDependencies": {
"@chainsafe/libp2p-noise": "^11.0.0",
"@chainsafe/libp2p-yamux": "^3.0.5",
"@chainsafe/libp2p-noise": "^12.0.1",
"@chainsafe/libp2p-yamux": "^4.0.2",
"@helia/interface": "^1.0.0",
"@helia/unixfs": "^1.0.0",
"@libp2p/tcp": "^6.1.2",
"@libp2p/websockets": "^5.0.3",
"aegir": "^38.1.0",
"@libp2p/tcp": "^7.0.1",
"@libp2p/websockets": "^6.0.1",
"aegir": "^39.0.8",
"blockstore-core": "^4.0.1",
"datastore-core": "^9.0.3",
"go-ipfs": "^0.19.0",
"go-ipfs": "^0.20.0",
"helia": "^1.0.0",
"ipfs-core-types": "^0.14.0",
"ipfs-unixfs-importer": "^15.1.0",
"ipfsd-ctl": "^13.0.0",
"it-to-buffer": "^4.0.1",
"kubo-rpc-client": "^3.0.0",
"libp2p": "^0.43.2",
"libp2p": "^0.45.3",
"merge-options": "^3.0.4",
"multiformats": "^11.0.1",
"wherearewe": "^2.0.1"
Expand Down
9 changes: 4 additions & 5 deletions packages/interop/test/bitswap.spec.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* eslint-env mocha */

import { type UnixFS, unixfs } from '@helia/unixfs'
import { expect } from 'aegir/chai'
import toBuffer from 'it-to-buffer'
import { createHeliaNode } from './fixtures/create-helia.js'
import { createKuboNode } from './fixtures/create-kubo.js'
import type { Helia } from '@helia/interface'
import type { Controller } from 'ipfsd-ctl'
import { UnixFS, unixfs } from '@helia/unixfs'
import type { FileCandidate } from 'ipfs-unixfs-importer'
import toBuffer from 'it-to-buffer'
import type { Controller } from 'ipfsd-ctl'

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

// connect helia to kubo
await helia.libp2p.peerStore.addressBook.add(kubo.peer.id, kubo.peer.addresses)
await helia.libp2p.dial(kubo.peer.id)
await helia.libp2p.dial(kubo.peer.addresses)
})

afterEach(async () => {
Expand Down
10 changes: 5 additions & 5 deletions packages/interop/test/files.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/* eslint-env mocha */

import { type AddOptions, type UnixFS, unixfs } from '@helia/unixfs'
import { expect } from 'aegir/chai'
import { fixedSize } from 'ipfs-unixfs-importer/chunker'
import { balanced } from 'ipfs-unixfs-importer/layout'
import { createHeliaNode } from './fixtures/create-helia.js'
import { createKuboNode } from './fixtures/create-kubo.js'
import type { Helia } from '@helia/interface'
import type { Controller } from 'ipfsd-ctl'
import { AddOptions, UnixFS, unixfs } from '@helia/unixfs'
import { balanced } from 'ipfs-unixfs-importer/layout'
import { fixedSize } from 'ipfs-unixfs-importer/chunker'
import type { AddOptions as KuboAddOptions } from 'ipfs-core-types/src/root.js'
import type { FileCandidate } from 'ipfs-unixfs-importer'
import type { Controller } from 'ipfsd-ctl'
import type { CID } from 'multiformats/cid'
import type { AddOptions as KuboAddOptions } from 'ipfs-core-types/src/root.js'

describe('unixfs interop', () => {
let helia: Helia
Expand Down
21 changes: 13 additions & 8 deletions packages/interop/test/fixtures/create-helia.browser.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { createHelia } from 'helia'
import { createLibp2p } from 'libp2p'
import { webSockets } from '@libp2p/websockets'
import { all } from '@libp2p/websockets/filters'
import { noise } from '@chainsafe/libp2p-noise'
import { yamux } from '@chainsafe/libp2p-yamux'
import { webSockets } from '@libp2p/websockets'
import { all } from '@libp2p/websockets/filters'
import { MemoryBlockstore } from 'blockstore-core'
import { MemoryDatastore } from 'datastore-core'
import { createHelia } from 'helia'
import { createLibp2p, type Libp2pOptions } from 'libp2p'
import { identifyService } from 'libp2p/identify'
import type { Helia } from '@helia/interface'

export async function createHeliaNode (): Promise<Helia> {
export async function createHeliaNode (config: Libp2pOptions = {}): Promise<Helia> {
const blockstore = new MemoryBlockstore()
const datastore = new MemoryDatastore()

Expand All @@ -25,10 +26,14 @@ export async function createHeliaNode (): Promise<Helia> {
streamMuxers: [
yamux()
],
services: {
identify: identifyService()
},
datastore,
nat: {
enabled: false
}
connectionGater: {
denyDialMultiaddr: async () => false
},
...config
})

const helia = await createHelia({
Expand Down
11 changes: 6 additions & 5 deletions packages/interop/test/fixtures/create-helia.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { createHelia } from 'helia'
import { createLibp2p, Libp2pOptions } from 'libp2p'
import { tcp } from '@libp2p/tcp'
import { noise } from '@chainsafe/libp2p-noise'
import { yamux } from '@chainsafe/libp2p-yamux'
import { tcp } from '@libp2p/tcp'
import { MemoryBlockstore } from 'blockstore-core'
import { MemoryDatastore } from 'datastore-core'
import { createHelia } from 'helia'
import { createLibp2p, type Libp2pOptions } from 'libp2p'
import { identifyService } from 'libp2p/identify'
import type { Helia } from '@helia/interface'

export async function createHeliaNode (config: Libp2pOptions = {}): Promise<Helia> {
Expand All @@ -22,8 +23,8 @@ export async function createHeliaNode (config: Libp2pOptions = {}): Promise<Heli
yamux()
],
datastore,
nat: {
enabled: false
services: {
identify: identifyService()
},
...config
})
Expand Down
6 changes: 3 additions & 3 deletions packages/interop/test/fixtures/create-kubo.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

// @ts-expect-error no types
import * as goIpfs from 'go-ipfs'
import { Controller, ControllerOptions, createController } from 'ipfsd-ctl'
import { type Controller, type ControllerOptions, createController } from 'ipfsd-ctl'
import * as kuboRpcClient from 'kubo-rpc-client'
import { isElectronMain, isNode } from 'wherearewe'
import mergeOptions from 'merge-options'
import { isElectronMain, isNode } from 'wherearewe'

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

return await createController(opts)
return createController(opts)
}
4 changes: 2 additions & 2 deletions packages/unixfs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@
"sparse-array": "^1.3.2"
},
"devDependencies": {
"aegir": "^38.1.0",
"aegir": "^39.0.8",
"blockstore-core": "^4.0.1",
"delay": "^5.0.0",
"delay": "^6.0.0",
"it-all": "^3.0.1",
"it-drain": "^3.0.1",
"it-first": "^3.0.1",
Expand Down
8 changes: 4 additions & 4 deletions packages/unixfs/src/commands/add.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { CID } from 'multiformats/cid'
import type { Blocks } from '@helia/interface/blocks'
import { ByteStream, DirectoryCandidate, FileCandidate, importBytes, importByteStream, ImportCandidateStream, importDirectory, importer, ImporterOptions, importFile, ImportResult } from 'ipfs-unixfs-importer'
import { balanced } from 'ipfs-unixfs-importer/layout'
import { type ByteStream, type DirectoryCandidate, type FileCandidate, importBytes, importByteStream, type ImportCandidateStream, importDirectory, importer, type ImporterOptions, importFile, type ImportResult } from 'ipfs-unixfs-importer'
import { fixedSize } from 'ipfs-unixfs-importer/chunker'
import { balanced } from 'ipfs-unixfs-importer/layout'
import type { Blocks } from '@helia/interface/blocks'
import type { CID } from 'multiformats/cid'

/**
* Default importer settings match Filecoin
Expand Down
8 changes: 4 additions & 4 deletions packages/unixfs/src/commands/cat.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { exporter } from 'ipfs-unixfs-exporter'
import type { CID } from 'multiformats/cid'
import type { CatOptions } from '../index.js'
import { resolve } from './utils/resolve.js'
import mergeOpts from 'merge-options'
import type { Blocks } from '@helia/interface/blocks'
import { NoContentError, NotAFileError } from './utils/errors.js'
import { resolve } from './utils/resolve.js'
import type { CatOptions } from '../index.js'
import type { Blocks } from '@helia/interface/blocks'
import type { CID } from 'multiformats/cid'

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

Expand Down
30 changes: 15 additions & 15 deletions packages/unixfs/src/commands/chmod.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import { recursive } from 'ipfs-unixfs-exporter'
import { CID } from 'multiformats/cid'
import type { ChmodOptions } from '../index.js'
import mergeOpts from 'merge-options'
import * as dagPB from '@ipld/dag-pb'
import { logger } from '@libp2p/logger'
import { UnixFS } from 'ipfs-unixfs'
import { pipe } from 'it-pipe'
import { InvalidPBNodeError, NotUnixFSError, UnknownError } from './utils/errors.js'
import * as dagPB from '@ipld/dag-pb'
import type { PBNode, PBLink } from '@ipld/dag-pb'
import { recursive } from 'ipfs-unixfs-exporter'
import { importer } from 'ipfs-unixfs-importer'
import { persist } from './utils/persist.js'
import type { Blocks } from '@helia/interface/blocks'
import last from 'it-last'
import { sha256 } from 'multiformats/hashes/sha2'
import { resolve, updatePathCids } from './utils/resolve.js'
import { pipe } from 'it-pipe'
import mergeOpts from 'merge-options'
import { CID } from 'multiformats/cid'
import * as raw from 'multiformats/codecs/raw'
import { sha256 } from 'multiformats/hashes/sha2'
import { SHARD_SPLIT_THRESHOLD_BYTES } from './utils/constants.js'
import { InvalidPBNodeError, NotUnixFSError, UnknownError } from './utils/errors.js'
import { persist } from './utils/persist.js'
import { resolve, updatePathCids } from './utils/resolve.js'
import type { ChmodOptions } from '../index.js'
import type { Blocks } from '@helia/interface/blocks'
import type { PBNode, PBLink } from '@ipld/dag-pb'

const mergeOptions = mergeOpts.bind({ ignoreUndefined: true })
const log = logger('helia:unixfs:chmod')
Expand Down Expand Up @@ -94,14 +94,14 @@ export async function chmod (cid: CID, mode: number, blockstore: Blocks, options
}
}
}),
async (nodes) => await last(nodes)
async (nodes) => last(nodes)
)

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

return await updatePathCids(root.cid, resolved, blockstore, opts)
return updatePathCids(root.cid, resolved, blockstore, opts)
}

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

await blockstore.put(updatedCid, updatedBlock)

return await updatePathCids(updatedCid, resolved, blockstore, opts)
return updatePathCids(updatedCid, resolved, blockstore, opts)
}
10 changes: 5 additions & 5 deletions packages/unixfs/src/commands/cp.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import type { Blocks } from '@helia/interface/blocks'
import type { CID } from 'multiformats/cid'
import type { CpOptions } from '../index.js'
import mergeOpts from 'merge-options'
import { logger } from '@libp2p/logger'
import mergeOpts from 'merge-options'
import { addLink } from './utils/add-link.js'
import { cidToPBLink } from './utils/cid-to-pblink.js'
import { cidToDirectory } from './utils/cid-to-directory.js'
import { cidToPBLink } from './utils/cid-to-pblink.js'
import { SHARD_SPLIT_THRESHOLD_BYTES } from './utils/constants.js'
import { InvalidParametersError } from './utils/errors.js'
import type { CpOptions } from '../index.js'
import type { Blocks } from '@helia/interface/blocks'
import type { CID } from 'multiformats/cid'

const mergeOptions = mergeOpts.bind({ ignoreUndefined: true })
const log = logger('helia:unixfs:cp')
Expand Down
10 changes: 5 additions & 5 deletions packages/unixfs/src/commands/ls.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { exporter, UnixFSEntry } from 'ipfs-unixfs-exporter'
import type { CID } from 'multiformats/cid'
import type { LsOptions } from '../index.js'
import { resolve } from './utils/resolve.js'
import { exporter, type UnixFSEntry } from 'ipfs-unixfs-exporter'
import mergeOpts from 'merge-options'
import type { Blocks } from '@helia/interface/blocks'
import { NoContentError, NotADirectoryError } from './utils/errors.js'
import { resolve } from './utils/resolve.js'
import type { LsOptions } from '../index.js'
import type { Blocks } from '@helia/interface/blocks'
import type { CID } from 'multiformats/cid'

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

Expand Down
14 changes: 7 additions & 7 deletions packages/unixfs/src/commands/mkdir.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { CID } from 'multiformats/cid'
import mergeOpts from 'merge-options'
import { logger } from '@libp2p/logger'
import type { MkdirOptions } from '../index.js'
import * as dagPB from '@ipld/dag-pb'
import { addLink } from './utils/add-link.js'
import type { Blocks } from '@helia/interface/blocks'
import { logger } from '@libp2p/logger'
import { UnixFS } from 'ipfs-unixfs'
import { sha256 } from 'multiformats/hashes/sha2'
import { exporter } from 'ipfs-unixfs-exporter'
import mergeOpts from 'merge-options'
import { CID } from 'multiformats/cid'
import { sha256 } from 'multiformats/hashes/sha2'
import { addLink } from './utils/add-link.js'
import { cidToDirectory } from './utils/cid-to-directory.js'
import { cidToPBLink } from './utils/cid-to-pblink.js'
import { SHARD_SPLIT_THRESHOLD_BYTES } from './utils/constants.js'
import { InvalidParametersError, NotADirectoryError } from './utils/errors.js'
import type { MkdirOptions } from '../index.js'
import type { Blocks } from '@helia/interface/blocks'

const mergeOptions = mergeOpts.bind({ ignoreUndefined: true })
const log = logger('helia:unixfs:mkdir')
Expand Down
10 changes: 5 additions & 5 deletions packages/unixfs/src/commands/rm.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { Blocks } from '@helia/interface/blocks'
import type { CID } from 'multiformats/cid'
import type { RmOptions } from '../index.js'
import mergeOpts from 'merge-options'
import { logger } from '@libp2p/logger'
import { removeLink } from './utils/remove-link.js'
import mergeOpts from 'merge-options'
import { cidToDirectory } from './utils/cid-to-directory.js'
import { SHARD_SPLIT_THRESHOLD_BYTES } from './utils/constants.js'
import { InvalidParametersError } from './utils/errors.js'
import { removeLink } from './utils/remove-link.js'
import type { RmOptions } from '../index.js'
import type { Blocks } from '@helia/interface/blocks'
import type { CID } from 'multiformats/cid'

const mergeOptions = mergeOpts.bind({ ignoreUndefined: true })
const log = logger('helia:unixfs:rm')
Expand Down
16 changes: 8 additions & 8 deletions packages/unixfs/src/commands/stat.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { exporter } from 'ipfs-unixfs-exporter'
import type { CID } from 'multiformats/cid'
import type { StatOptions, UnixFSStats } from '../index.js'
import mergeOpts from 'merge-options'
import * as dagPb from '@ipld/dag-pb'
import { logger } from '@libp2p/logger'
import { UnixFS } from 'ipfs-unixfs'
import { exporter } from 'ipfs-unixfs-exporter'
import mergeOpts from 'merge-options'
import * as raw from 'multiformats/codecs/raw'
import { InvalidPBNodeError, NotUnixFSError, UnknownError } from './utils/errors.js'
import * as dagPb from '@ipld/dag-pb'
import type { AbortOptions } from '@libp2p/interfaces'
import type { Mtime } from 'ipfs-unixfs'
import { resolve } from './utils/resolve.js'
import * as raw from 'multiformats/codecs/raw'
import type { StatOptions, UnixFSStats } from '../index.js'
import type { Blocks } from '@helia/interface/blocks'
import type { AbortOptions } from '@libp2p/interfaces'
import type { Mtime } from 'ipfs-unixfs'
import type { CID } from 'multiformats/cid'

const mergeOptions = mergeOpts.bind({ ignoreUndefined: true })
const log = logger('helia:unixfs:stat')
Expand Down
Loading

0 comments on commit d4d6515

Please sign in to comment.