Skip to content

Commit da56416

Browse files
committed
chore: update deps and fix linting
1 parent 25d5323 commit da56416

File tree

5 files changed

+31
-29
lines changed

5 files changed

+31
-29
lines changed

packages/ipfs-unixfs-exporter/package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"clean": "rimraf ./dist",
1515
"lint": "aegir ts -p check && aegir lint",
1616
"coverage": "nyc -s npm run test -t node && nyc report --reporter=html",
17-
"depcheck": "aegir dep-check -i @types/mocha -i @types/sinon -i nyc -i abort-controller -i rimraf -i ipfs-core-types -i copy -i util -i crypto-browserify -i events -i readable-stream -i interface-blockstore"
17+
"depcheck": "aegir dep-check -i @types/mocha -i @types/sinon -i nyc -i abort-controller -i rimraf -i copy -i util -i crypto-browserify -i events -i readable-stream -i interface-blockstore"
1818
},
1919
"repository": {
2020
"type": "git",
@@ -36,12 +36,11 @@
3636
"@types/mocha": "^8.2.1",
3737
"@types/sinon": "^10.0.0",
3838
"abort-controller": "^3.0.0",
39-
"aegir": "^33.1.0",
39+
"aegir": "^34.0.0",
4040
"copy": "^0.3.2",
4141
"crypto-browserify": "^3.12.0",
4242
"detect-node": "^2.0.4",
4343
"events": "^3.3.0",
44-
"ipfs-core-types": "^0.5.2",
4544
"ipfs-unixfs-importer": "^7.0.3",
4645
"it-all": "^1.0.5",
4746
"it-buffer-stream": "^2.0.0",
@@ -61,7 +60,7 @@
6160
"@ipld/dag-pb": "^2.1.0",
6261
"err-code": "^3.0.1",
6362
"hamt-sharding": "^2.0.0",
64-
"interface-blockstore": "^0.2.1",
63+
"interface-blockstore": "^1.0.0",
6564
"ipfs-unixfs": "^4.0.3",
6665
"it-last": "^1.0.5",
6766
"multiformats": "^9.0.4",

packages/ipfs-unixfs-exporter/src/types.d.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interface ExporterOptions {
1111
}
1212

1313
interface Exportable<T> {
14-
type: 'file' | 'directory' | 'object' | 'raw' | 'identity',
14+
type: 'file' | 'directory' | 'object' | 'raw' | 'identity'
1515
name: string
1616
path: string
1717
cid: CID
@@ -61,10 +61,10 @@ interface ResolveResult {
6161
next?: NextResult
6262
}
6363

64-
type Resolve = (cid: CID, name: string, path: string, toResolve: string[], depth: number, blockstore: Blockstore, options: ExporterOptions) => Promise<ResolveResult>
65-
type Resolver = (cid: CID, name: string, path: string, toResolve: string[], resolve: Resolve, depth: number, blockstore: Blockstore, options: ExporterOptions) => Promise<ResolveResult>
64+
interface Resolve { (cid: CID, name: string, path: string, toResolve: string[], depth: number, blockstore: Blockstore, options: ExporterOptions): Promise<ResolveResult> }
65+
interface Resolver { (cid: CID, name: string, path: string, toResolve: string[], resolve: Resolve, depth: number, blockstore: Blockstore, options: ExporterOptions): Promise<ResolveResult> }
6666

6767
type UnixfsV1FileContent = AsyncIterable<Uint8Array> | Iterable<Uint8Array>
6868
type UnixfsV1DirectoryContent = AsyncIterable<UnixFSEntry> | Iterable<UnixFSEntry>
6969
type UnixfsV1Content = UnixfsV1FileContent | UnixfsV1DirectoryContent
70-
type UnixfsV1Resolver = (cid: CID, node: PBNode, unixfs: UnixFS, path: string, resolve: Resolve, depth: number, blockstore: Blockstore) => (options: ExporterOptions) => UnixfsV1Content
70+
interface UnixfsV1Resolver { (cid: CID, node: PBNode, unixfs: UnixFS, path: string, resolve: Resolve, depth: number, blockstore: Blockstore): (options: ExporterOptions) => UnixfsV1Content }

packages/ipfs-unixfs-importer/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"homepage": "https://github.com/ipfs/js-ipfs-unixfs#readme",
3535
"devDependencies": {
3636
"@types/mocha": "^8.2.1",
37-
"aegir": "^33.1.0",
37+
"aegir": "^34.0.0",
3838
"assert": "^2.0.0",
3939
"copy": "^0.3.2",
4040
"crypto-browserify": "^3.12.0",
@@ -50,7 +50,7 @@
5050
"bl": "^5.0.0",
5151
"err-code": "^3.0.1",
5252
"hamt-sharding": "^2.0.0",
53-
"interface-blockstore": "^0.2.1",
53+
"interface-blockstore": "^1.0.0",
5454
"ipfs-unixfs": "^4.0.3",
5555
"it-all": "^1.0.5",
5656
"it-batch": "^1.0.8",

packages/ipfs-unixfs-importer/src/types.d.ts

+17-17
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@ interface InProgressImportResult extends ImportResult {
3636
}
3737

3838
type ChunkerType = 'fixed' | 'rabin'
39-
type ProgressHandler = (chunkSize: number, path?: string) => void
40-
type HamtHashFn = (value: Uint8Array) => Promise<Uint8Array>
41-
type Chunker = (source: AsyncIterable<Uint8Array>, options: ImporterOptions) => AsyncIterable<Uint8Array>
42-
type DAGBuilder = (source: AsyncIterable<ImportCandidate> | Iterable<ImportCandidate>, blockstore: Blockstore, options: ImporterOptions) => AsyncIterable<() => Promise<InProgressImportResult>>
43-
type TreeBuilder = (source: AsyncIterable<InProgressImportResult>, blockstore: Blockstore, options: ImporterOptions) => AsyncIterable<ImportResult>
44-
type BufferImporter = (file: File, blockstore: Blockstore, options: ImporterOptions) => AsyncIterable<() => Promise<InProgressImportResult>>
45-
type ChunkValidator = (source: AsyncIterable<Uint8Array>, options: ImporterOptions) => AsyncIterable<Uint8Array>
46-
type UnixFSV1DagBuilder<T> = (item: T, blockstore: Blockstore, options: ImporterOptions) => Promise<InProgressImportResult>
47-
type Reducer = (leaves: InProgressImportResult[]) => Promise<InProgressImportResult>
39+
interface ProgressHandler { (chunkSize: number, path?: string): void }
40+
interface HamtHashFn { (value: Uint8Array): Promise<Uint8Array> }
41+
interface Chunker { (source: AsyncIterable<Uint8Array>, options: ImporterOptions): AsyncIterable<Uint8Array> }
42+
interface DAGBuilder { (source: AsyncIterable<ImportCandidate> | Iterable<ImportCandidate>, blockstore: Blockstore, options: ImporterOptions): AsyncIterable<() => Promise<InProgressImportResult>> }
43+
interface TreeBuilder { (source: AsyncIterable<InProgressImportResult>, blockstore: Blockstore, options: ImporterOptions): AsyncIterable<ImportResult> }
44+
interface BufferImporter { (file: File, blockstore: Blockstore, options: ImporterOptions): AsyncIterable<() => Promise<InProgressImportResult>> }
45+
interface ChunkValidator { (source: AsyncIterable<Uint8Array>, options: ImporterOptions): AsyncIterable<Uint8Array> }
46+
interface UnixFSV1DagBuilder<T> { (item: T, blockstore: Blockstore, options: ImporterOptions): Promise<InProgressImportResult> }
47+
interface Reducer { (leaves: InProgressImportResult[]): Promise<InProgressImportResult> }
4848

49-
type FileDAGBuilder = (source: AsyncIterable<InProgressImportResult> | Iterable<InProgressImportResult>, reducer: Reducer, options: ImporterOptions) => Promise<InProgressImportResult>
49+
interface FileDAGBuilder { (source: AsyncIterable<InProgressImportResult> | Iterable<InProgressImportResult>, reducer: Reducer, options: ImporterOptions): Promise<InProgressImportResult> }
5050

5151
interface UserImporterOptions {
5252
strategy?: 'balanced' | 'flat' | 'trickle'
@@ -115,14 +115,14 @@ interface ImporterOptions {
115115
}
116116

117117
export interface TrickleDagNode {
118-
children: InProgressImportResult[],
119-
depth: number,
120-
maxDepth: number,
121-
maxChildren: number,
122-
data?: InProgressImportResult[],
118+
children: InProgressImportResult[]
119+
depth: number
120+
maxDepth: number
121+
maxChildren: number
122+
data?: InProgressImportResult[]
123123
parent?: TrickleDagNode
124-
cid?: CID,
125-
size?: number,
124+
cid?: CID
125+
size?: number
126126
unixfs?: UnixFS
127127
}
128128

packages/ipfs-unixfs/package.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"homepage": "https://github.com/ipfs/js-ipfs-unixfs#readme",
3838
"devDependencies": {
3939
"@types/mocha": "^8.2.1",
40-
"aegir": "^33.1.0",
40+
"aegir": "^34.0.0",
4141
"copy": "^0.3.2",
4242
"mkdirp": "^1.0.4",
4343
"npm-run-all": "^4.1.5",
@@ -55,6 +55,9 @@
5555
"dist"
5656
],
5757
"eslintConfig": {
58-
"extends": "ipfs"
58+
"extends": "ipfs",
59+
"ignorePatterns": [
60+
"src/unixfs.d.ts"
61+
]
5962
}
6063
}

0 commit comments

Comments
 (0)