Skip to content

deps(dev): bump aegir from 38.1.8 to 39.0.6 #326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"release": "npm run docs:no-publish && aegir run release && npm run docs"
},
"devDependencies": {
"aegir": "^38.1.2"
"aegir": "^39.0.6"
},
"workspaces": [
"packages/*"
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs-unixfs-exporter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
"devDependencies": {
"@types/readable-stream": "^2.3.15",
"@types/sinon": "^10.0.0",
"aegir": "^38.1.2",
"aegir": "^39.0.6",
"blockstore-core": "^4.0.1",
"delay": "^5.0.0",
"ipfs-unixfs-importer": "^15.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/ipfs-unixfs-exporter/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import errCode from 'err-code'
import last from 'it-last'
import { CID } from 'multiformats/cid'
import resolve from './resolvers/index.js'
import last from 'it-last'
import type { UnixFS } from 'ipfs-unixfs'
import type { PBNode } from '@ipld/dag-pb'
import type { Blockstore } from 'interface-blockstore'
import type { Bucket } from 'hamt-sharding'
import type { Blockstore } from 'interface-blockstore'
import type { UnixFS } from 'ipfs-unixfs'
import type { ProgressOptions, ProgressEvent } from 'progress-events'

export interface ExportProgress {
Expand Down
4 changes: 2 additions & 2 deletions packages/ipfs-unixfs-exporter/src/resolvers/dag-cbor.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CID } from 'multiformats/cid'
import errCode from 'err-code'
import * as dagCbor from '@ipld/dag-cbor'
import errCode from 'err-code'
import { CID } from 'multiformats/cid'
import type { Resolver } from '../index.js'

const resolve: Resolver = async (cid, name, path, toResolve, resolve, depth, blockstore, options) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/ipfs-unixfs-exporter/src/resolvers/identity.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import errCode from 'err-code'
import * as mh from 'multiformats/hashes/digest'
import { CustomProgressEvent } from 'progress-events'
import extractDataFromBlock from '../utils/extract-data-from-block.js'
import validateOffsetAndLength from '../utils/validate-offset-and-length.js'
import * as mh from 'multiformats/hashes/digest'
import type { ExporterOptions, Resolver, ExportProgress } from '../index.js'
import { CustomProgressEvent } from 'progress-events'

const rawContent = (node: Uint8Array): ((options?: ExporterOptions) => AsyncGenerator<Uint8Array, void, undefined>) => {
async function * contentGenerator (options: ExporterOptions = {}): AsyncGenerator<Uint8Array, void, undefined> {
Expand Down
11 changes: 5 additions & 6 deletions packages/ipfs-unixfs-exporter/src/resolvers/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import errCode from 'err-code'

import * as dagPb from '@ipld/dag-pb'
import * as dagCbor from '@ipld/dag-cbor'
import * as dagPb from '@ipld/dag-pb'
import errCode from 'err-code'
import * as raw from 'multiformats/codecs/raw'
import { identity } from 'multiformats/hashes/identity'

import dagPbResolver from './unixfs-v1/index.js'
import rawResolver from './raw.js'
import dagCborResolver from './dag-cbor.js'
import identifyResolver from './identity.js'
import rawResolver from './raw.js'
import dagPbResolver from './unixfs-v1/index.js'
import type { Resolve, Resolver } from '../index.js'

const resolvers: Record<number, Resolver> = {
Expand All @@ -25,7 +24,7 @@ const resolve: Resolve = async (cid, name, path, toResolve, depth, blockstore, o
throw errCode(new Error(`No resolver for code ${cid.code}`), 'ERR_NO_RESOLVER')
}

return await resolver(cid, name, path, toResolve, resolve, depth, blockstore, options)
return resolver(cid, name, path, toResolve, resolve, depth, blockstore, options)
}

export default resolve
4 changes: 2 additions & 2 deletions packages/ipfs-unixfs-exporter/src/resolvers/raw.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import errCode from 'err-code'
import type { ExporterOptions, Resolver, ExportProgress } from '../index.js'
import { CustomProgressEvent } from 'progress-events'
import extractDataFromBlock from '../utils/extract-data-from-block.js'
import validateOffsetAndLength from '../utils/validate-offset-and-length.js'
import { CustomProgressEvent } from 'progress-events'
import type { ExporterOptions, Resolver, ExportProgress } from '../index.js'

const rawContent = (node: Uint8Array): ((options?: ExporterOptions) => AsyncGenerator<Uint8Array, void, undefined>) => {
async function * contentGenerator (options: ExporterOptions = {}): AsyncGenerator<Uint8Array, void, undefined> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import filter from 'it-filter'
import map from 'it-map'
import parallel from 'it-parallel'
import { pipe } from 'it-pipe'
import map from 'it-map'
import filter from 'it-filter'
import type { ExporterOptions, ExportWalk, UnixfsV1DirectoryContent, UnixfsV1Resolver } from '../../../index.js'
import { CustomProgressEvent } from 'progress-events'
import type { ExporterOptions, ExportWalk, UnixfsV1DirectoryContent, UnixfsV1Resolver } from '../../../index.js'

const directoryContent: UnixfsV1Resolver = (cid, node, unixfs, path, resolve, depth, blockstore) => {
async function * yieldDirectoryContent (options: ExporterOptions = {}): UnixfsV1DirectoryContent {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import extractDataFromBlock from '../../../utils/extract-data-from-block.js'
import validateOffsetAndLength from '../../../utils/validate-offset-and-length.js'
import { UnixFS } from 'ipfs-unixfs'
import errCode from 'err-code'
import * as dagPb from '@ipld/dag-pb'
import * as raw from 'multiformats/codecs/raw'
import { Pushable, pushable } from 'it-pushable'
import errCode from 'err-code'
import { UnixFS } from 'ipfs-unixfs'
import map from 'it-map'
import parallel from 'it-parallel'
import { pipe } from 'it-pipe'
import map from 'it-map'
import { type Pushable, pushable } from 'it-pushable'
import * as raw from 'multiformats/codecs/raw'
import PQueue from 'p-queue'
import type { ExporterOptions, UnixfsV1FileContent, UnixfsV1Resolver, ReadableStorage, ExportProgress, ExportWalk } from '../../../index.js'
import { CustomProgressEvent } from 'progress-events'
import extractDataFromBlock from '../../../utils/extract-data-from-block.js'
import validateOffsetAndLength from '../../../utils/validate-offset-and-length.js'
import type { ExporterOptions, UnixfsV1FileContent, UnixfsV1Resolver, ReadableStorage, ExportProgress, ExportWalk } from '../../../index.js'

async function walkDAG (blockstore: ReadableStorage, node: dagPb.PBNode | Uint8Array, queue: Pushable<Uint8Array>, streamPosition: bigint, start: bigint, end: bigint, options: ExporterOptions): Promise<void> {
// a `raw` node
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { decode, type PBNode } from '@ipld/dag-pb'
import map from 'it-map'
import parallel from 'it-parallel'
import { pipe } from 'it-pipe'
import map from 'it-map'
import { decode, PBNode } from '@ipld/dag-pb'
import type { ExporterOptions, Resolve, UnixfsV1DirectoryContent, UnixfsV1Resolver, ReadableStorage, ExportWalk } from '../../../index.js'
import { CustomProgressEvent } from 'progress-events'
import type { ExporterOptions, Resolve, UnixfsV1DirectoryContent, UnixfsV1Resolver, ReadableStorage, ExportWalk } from '../../../index.js'

const hamtShardedDirectoryContent: UnixfsV1Resolver = (cid, node, unixfs, path, resolve, depth, blockstore) => {
function yieldHamtDirectoryContent (options: ExporterOptions = {}): UnixfsV1DirectoryContent {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CustomProgressEvent } from 'progress-events'
import type { ExporterOptions, ExportProgress, ExportWalk, UnixfsV1Resolver } from '../../../index.js'
import extractDataFromBlock from '../../../utils/extract-data-from-block.js'
import validateOffsetAndLength from '../../../utils/validate-offset-and-length.js'
import type { ExporterOptions, ExportProgress, ExportWalk, UnixfsV1Resolver } from '../../../index.js'

const rawContent: UnixfsV1Resolver = (cid, node, unixfs, path, resolve, depth, blockstore) => {
function * yieldRawContent (options: ExporterOptions = {}): Generator<Uint8Array, void, undefined> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { decode, type PBNode } from '@ipld/dag-pb'
import errCode from 'err-code'
import { UnixFS } from 'ipfs-unixfs'
import findShardCid from '../../utils/find-cid-in-shard.js'
import { decode, PBNode } from '@ipld/dag-pb'
import contentFile from './content/file.js'
import contentDirectory from './content/directory.js'
import contentFile from './content/file.js'
import contentHamtShardedDirectory from './content/hamt-sharded-directory.js'
import type { CID } from 'multiformats/cid'
import type { Resolver, UnixfsV1Resolver } from '../../index.js'
import type { CID } from 'multiformats/cid'

const findLinkCid = (node: PBNode, name: string): CID | undefined => {
const link = node.Links.find(link => link.Name === name)
Expand Down
6 changes: 3 additions & 3 deletions packages/ipfs-unixfs-exporter/src/utils/find-cid-in-shard.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import { Bucket, BucketPosition, createHAMT } from 'hamt-sharding'
import { decode, PBLink, PBNode } from '@ipld/dag-pb'
import { decode, type PBLink, type PBNode } from '@ipld/dag-pb'
import { murmur3128 } from '@multiformats/murmur3'
import { Bucket, type BucketPosition, createHAMT } from 'hamt-sharding'
import type { ExporterOptions, ShardTraversalContext, ReadableStorage } from '../index.js'
import type { CID } from 'multiformats/cid'

Expand Down Expand Up @@ -120,7 +120,7 @@ const findShardCid = async (node: PBNode, name: string, blockstore: ReadableStor
const block = await blockstore.get(link.Hash, options)
node = decode(block)

return await findShardCid(node, name, blockstore, context, options)
return findShardCid(node, name, blockstore, context, options)
}

export default findShardCid
14 changes: 7 additions & 7 deletions packages/ipfs-unixfs-exporter/test/exporter-esoteric.spec.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/* eslint-env mocha */

import * as dagPb from '@ipld/dag-pb'
import { expect } from 'aegir/chai'
import all from 'it-all'
import { MemoryBlockstore } from 'blockstore-core'
import { concat, concat as uint8ArrayConcat } from 'uint8arrays/concat'
import { exporter } from './../src/index.js'
import { UnixFS } from 'ipfs-unixfs'
import randomBytes from 'iso-random-stream/src/random.js'
import { sha256 } from 'multiformats/hashes/sha2'
import all from 'it-all'
import { CID } from 'multiformats/cid'
import * as raw from 'multiformats/codecs/raw'
import { UnixFS } from 'ipfs-unixfs'
import * as dagPb from '@ipld/dag-pb'
import type { Blockstore } from 'interface-blockstore'
import { sha256 } from 'multiformats/hashes/sha2'
import { concat, concat as uint8ArrayConcat } from 'uint8arrays/concat'
import { isNode } from 'wherearewe'
import { exporter } from './../src/index.js'
import type { Blockstore } from 'interface-blockstore'

describe('exporter esoteric DAGs', () => {
let block: Blockstore
Expand Down
18 changes: 9 additions & 9 deletions packages/ipfs-unixfs-exporter/test/exporter-sharded.spec.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/* eslint-env mocha */

import * as dagPb from '@ipld/dag-pb'
import { expect } from 'aegir/chai'
import { MemoryBlockstore } from 'blockstore-core'
import { UnixFS } from 'ipfs-unixfs'
import { importer } from 'ipfs-unixfs-importer'
import all from 'it-all'
import last from 'it-last'
import randomBytes from 'it-buffer-stream'
import { exporter, walkPath } from '../src/index.js'
import { importer } from 'ipfs-unixfs-importer'
import * as dagPb from '@ipld/dag-pb'
import { concat as uint8ArrayConcat } from 'uint8arrays/concat'
import asAsyncIterable from './helpers/as-async-iterable.js'
import last from 'it-last'
import { CID } from 'multiformats/cid'
import { sha256 } from 'multiformats/hashes/sha2'
import { MemoryBlockstore } from 'blockstore-core'
import { concat as uint8ArrayConcat } from 'uint8arrays/concat'
import { exporter, walkPath } from '../src/index.js'
import asAsyncIterable from './helpers/as-async-iterable.js'

const SHARD_SPLIT_THRESHOLD = 10

Expand All @@ -22,7 +22,7 @@ describe('exporter sharded', function () {
const block = new MemoryBlockstore()

const createShard = async (numFiles: number): Promise<CID> => {
return await createShardWithFileNames(numFiles, (index) => `file-${index}`)
return createShardWithFileNames(numFiles, (index) => `file-${index}`)
}

const createShardWithFileNames = async (numFiles: number, fileName: (index: number) => string): Promise<CID> => {
Expand All @@ -31,7 +31,7 @@ describe('exporter sharded', function () {
content: asAsyncIterable(Uint8Array.from([0, 1, 2, 3, 4, index]))
}))

return await createShardWithFiles(files)
return createShardWithFiles(files)
}

const createShardWithFiles = async (files: Array<{ path: string, content: AsyncIterable<Uint8Array> }>): Promise<CID> => {
Expand Down
6 changes: 3 additions & 3 deletions packages/ipfs-unixfs-exporter/test/exporter-subtree.spec.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/* eslint-env mocha */

import { expect } from 'aegir/chai'
import { MemoryBlockstore } from 'blockstore-core'
import { importer } from 'ipfs-unixfs-importer'
import all from 'it-all'
import last from 'it-last'
import { MemoryBlockstore } from 'blockstore-core'
import randomBytes from 'it-buffer-stream'
import last from 'it-last'
import { concat as uint8ArrayConcat } from 'uint8arrays/concat'
import asAsyncIterable from './helpers/as-async-iterable.js'
import { exporter, walkPath } from './../src/index.js'
import asAsyncIterable from './helpers/as-async-iterable.js'

const ONE_MEG = Math.pow(1024, 2)

Expand Down
40 changes: 20 additions & 20 deletions packages/ipfs-unixfs-exporter/test/exporter.spec.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
/* eslint-env mocha */

import * as dagCbor from '@ipld/dag-cbor'
import * as dagPb from '@ipld/dag-pb'
import { expect } from 'aegir/chai'
import { MemoryBlockstore } from 'blockstore-core'
import delay from 'delay'
import { UnixFS } from 'ipfs-unixfs'
import { CID } from 'multiformats/cid'
import * as dagPb from '@ipld/dag-pb'
import * as dagCbor from '@ipld/dag-cbor'
import { sha256 } from 'multiformats/hashes/sha2'
import { identity } from 'multiformats/hashes/identity'
import * as raw from 'multiformats/codecs/raw'
import { exporter, recursive } from '../src/index.js'
import { importer } from 'ipfs-unixfs-importer'
import { fixedSize } from 'ipfs-unixfs-importer/chunker'
import { balanced, type FileLayout, flat, trickle } from 'ipfs-unixfs-importer/layout'
import all from 'it-all'
import last from 'it-last'
import first from 'it-first'
import randomBytes from 'it-buffer-stream'
import { MemoryBlockstore } from 'blockstore-core'
import first from 'it-first'
import last from 'it-last'
import toBuffer from 'it-to-buffer'
import { CID } from 'multiformats/cid'
import * as raw from 'multiformats/codecs/raw'
import { identity } from 'multiformats/hashes/identity'
import { sha256 } from 'multiformats/hashes/sha2'
import { Readable } from 'readable-stream'
import { concat as uint8ArrayConcat } from 'uint8arrays/concat'
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
import { isNode } from 'wherearewe'
import { exporter, recursive } from '../src/index.js'
import asAsyncIterable from './helpers/as-async-iterable.js'
import delay from 'delay'
import type { PBNode } from '@ipld/dag-pb'
import type { Blockstore } from 'interface-blockstore'
import { balanced, FileLayout, flat, trickle } from 'ipfs-unixfs-importer/layout'
import type { Chunker } from 'ipfs-unixfs-importer/chunker'
import { fixedSize } from 'ipfs-unixfs-importer/chunker'
import toBuffer from 'it-to-buffer'
import { Readable } from 'readable-stream'
import { isNode } from 'wherearewe'

const ONE_MEG = Math.pow(1024, 2)

Expand Down Expand Up @@ -336,7 +336,7 @@ describe('exporter', () => {
async get (cid: CID) {
await delay(Math.random() * 10)

return await block.get(cid)
return block.get(cid)
}
}

Expand Down Expand Up @@ -1005,7 +1005,7 @@ describe('exporter', () => {
throw new Error('Unexpected type')
}

return await expect(first(exported.content())).to.eventually.deep.equal(node)
return expect(first(exported.content())).to.eventually.deep.equal(node)
})

it('errors when exporting a node with no resolver', async () => {
Expand Down Expand Up @@ -1219,7 +1219,7 @@ describe('exporter', () => {
const customBlock = {
get: async (cid: CID, options: { signal: AbortSignal }) => {
// promise will never resolve, so reject it when the abort signal is sent
return await new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
options.signal.addEventListener('abort', () => {
reject(new Error(message))
})
Expand Down Expand Up @@ -1275,7 +1275,7 @@ describe('exporter', () => {
const contentIterator = file.content()

const readableStreamToBytes = async (readableStream: Readable): Promise<Uint8Array> => {
return await new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
const chunks: any[] = []
readableStream.on('data', chunk => {
chunks.push(chunk)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/* eslint-env mocha */

import { importer } from 'ipfs-unixfs-importer'
import { exporter, UnixFSDirectory, UnixFSEntry } from '../src/index.js'
import { expect } from 'aegir/chai'
import { MemoryBlockstore } from 'blockstore-core'
import { importer } from 'ipfs-unixfs-importer'
import all from 'it-all'
import last from 'it-last'
import { MemoryBlockstore } from 'blockstore-core'
import { concat as uint8ArrayConcat } from 'uint8arrays/concat'
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
import { exporter, type UnixFSDirectory, type UnixFSEntry } from '../src/index.js'
import asAsyncIterable from './helpers/as-async-iterable.js'
import type { CID } from 'multiformats/cid'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* eslint-env mocha */

import { expect } from 'aegir/chai'
import all from 'it-all'
import { importer } from 'ipfs-unixfs-importer'
import { exporter, UnixFSEntry } from '../src/index.js'
import { MemoryBlockstore } from 'blockstore-core'
import { importer } from 'ipfs-unixfs-importer'
import all from 'it-all'
import { concat as uint8ArrayConcat } from 'uint8arrays/concat'
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
import { exporter, type UnixFSEntry } from '../src/index.js'
import asAsyncIterable from './helpers/as-async-iterable.js'
import type { CID } from 'multiformats/cid'

Expand Down
Loading