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

Commit 74bfce3

Browse files
authored
chore: fix types (#3608)
Updates deps, fixes typos. Not sure why the compiler doesn't pick up things like this.
1 parent 6870873 commit 74bfce3

File tree

39 files changed

+72
-76
lines changed

39 files changed

+72
-76
lines changed

examples/browser-create-react-app/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"version": "1.0.0",
44
"private": true,
55
"dependencies": {
6-
"dot-prop": "^5.0.0",
6+
"dot-prop": "^6.0.1",
77
"ipfs": "^0.54.4",
8-
"ipfs-css": "^0.13.1",
9-
"react": "^16.8.6",
10-
"react-dom": "^16.8.6",
8+
"ipfs-css": "^1.3.0",
9+
"react": "^17.0.2",
10+
"react-dom": "^17.0.2",
1111
"react-scripts": "^4.0.3",
1212
"tachyons": "^4.11.1"
1313
},

examples/browser-http-client-upload-file/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
},
2020
"devDependencies": {
2121
"ipfs": "^0.54.4",
22-
"parcel": "next",
23-
"react": "^16.8.6",
24-
"react-dom": "^16.8.6",
22+
"parcel": "2.0.0-beta.2",
23+
"react": "^17.0.2",
24+
"react-dom": "^17.0.2",
2525
"rimraf": "^3.0.2",
2626
"test-ipfs-example": "^3.0.0"
2727
},

examples/browser-http-client-upload-file/src/App.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
'use strict'
33

44
const React = require('react')
5-
const { create: ipfsClient } = require('ipfs-http-client')
5+
const { create: ipfsHttpClient } = require('ipfs-http-client')
66

77
class App extends React.Component {
88
constructor () {
@@ -73,7 +73,7 @@ class App extends React.Component {
7373

7474
async connect () {
7575
this.setState({
76-
ipfs: ipfsClient(this.multiaddr.current.value)
76+
ipfs: ipfsHttpClient(this.multiaddr.current.value)
7777
})
7878
}
7979

examples/browser-ipns-publish/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
"last 2 versions and not dead and > 2%"
2626
],
2727
"devDependencies": {
28-
"delay": "^4.4.0",
28+
"delay": "^5.0.0",
2929
"execa": "^5.0.0",
3030
"ipfsd-ctl": "^8.0.0",
3131
"go-ipfs": "0.8.0",
32-
"parcel": "next",
32+
"parcel": "2.0.0-beta.2",
3333
"path": "^0.12.7",
3434
"test-ipfs-example": "^3.0.0"
3535
},

examples/browser-parceljs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"ipfs": "^0.54.4"
2222
},
2323
"devDependencies": {
24-
"parcel": "next",
24+
"parcel": "2.0.0-beta.2",
2525
"rimraf": "^3.0.2",
2626
"standard": "^16.0.3",
2727
"test-ipfs-example": "^3.0.0"

examples/browser-video-streaming/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<body>
33
<video id="video" controls></video>
44
<script src="./node_modules/ipfs/dist/index.min.js"></script>
5-
<script src="https://cdn.jsdelivr.net/npm/hlsjs-ipfs-loader@latest/dist/index.js"></script>
6-
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
5+
<script src="https://cdn.jsdelivr.net/npm/hlsjs-ipfs-loader@0.3.0/dist/index.js"></script>
6+
<script src="https://cdn.jsdelivr.net/npm/hls.js@0.14.17"></script>
77
<script src="streaming.js"></script>
88
</body>
99
</html>

examples/browser-webpack/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"babel-loader": "^8.2.2",
1919
"copy-webpack-plugin": "^8.1.0",
2020
"node-polyfill-webpack-plugin": "^1.0.3",
21-
"react": "^17.0.1",
22-
"react-dom": "^17.0.1",
21+
"react": "^17.0.2",
22+
"react-dom": "^17.0.2",
2323
"react-hot-loader": "^4.12.21",
2424
"rimraf": "^3.0.2",
2525
"stream-browserify": "^3.0.0",

examples/circuit-relaying/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
"author": "Dmitriy Ryajov <[email protected]>",
1515
"license": "MIT",
1616
"dependencies": {
17-
"delay": "^4.4.0",
17+
"delay": "^5.0.0",
1818
"ipfs": "^0.54.4",
1919
"ipfs-pubsub-room": "^2.0.1",
2020
"libp2p-websockets": "^0.15.1",
2121
"uint8arrays": "^2.1.3"
2222
},
2323
"devDependencies": {
2424
"execa": "^5.0.0",
25-
"ipfs-css": "^0.13.1",
25+
"ipfs-css": "^1.3.0",
2626
"ipfs-http-client": "^49.0.4",
27-
"parcel": "next",
27+
"parcel": "2.0.0-beta.2",
2828
"rimraf": "^3.0.2",
2929
"tachyons": "^4.11.1",
3030
"test-ipfs-example": "^3.0.0"

examples/custom-ipld-formats/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"test-ipfs-example": "^3.0.0"
1212
},
1313
"dependencies": {
14-
"cids": "^1.1.5",
14+
"cids": "^1.1.6",
1515
"ipfs-daemon": "^0.5.4",
1616
"ipfs-core": "^0.5.4",
1717
"ipfs-http-client": "^49.0.4",

examples/custom-libp2p/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"ipfs": "^0.54.4",
1414
"libp2p": "^0.30.12",
1515
"libp2p-bootstrap": "^0.12.1",
16-
"libp2p-kad-dht": "^0.20.1",
16+
"libp2p-kad-dht": "^0.21.0",
1717
"libp2p-mdns": "^0.15.0",
1818
"libp2p-mplex": "^0.10.0",
1919
"libp2p-noise": "^2.0.1",

examples/http-client-browser-pubsub/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"go-ipfs": "0.8.0",
2323
"ipfs": "^0.54.4",
2424
"ipfsd-ctl": "^8.0.0",
25-
"parcel": "next",
25+
"parcel": "2.0.0-beta.2",
2626
"test-ipfs-example": "^3.0.0"
2727
}
2828
}

examples/http-client-bundle-webpack/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
"keywords": [],
1515
"dependencies": {
1616
"ipfs-http-client": "^49.0.4",
17-
"react": "^16.8.6",
18-
"react-dom": "^16.8.6"
17+
"react": "^17.0.2",
18+
"react-dom": "^17.0.2"
1919
},
2020
"devDependencies": {
21-
"@babel/core": "^7.13.10",
21+
"@babel/core": "^7.13.14",
2222
"@babel/preset-env": "^7.13.12",
23-
"@babel/preset-react": "^7.12.13",
23+
"@babel/preset-react": "^7.13.13",
2424
"babel-loader": "^8.2.2",
2525
"copy-webpack-plugin": "^8.1.0",
2626
"execa": "^5.0.0",

examples/http-client-name-api/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"private": true,
77
"scripts": {
88
"clean": "rimraf ./dist",
9-
"build": "parcel build index.html --no-scope-hoist",
9+
"build": "parcel build index.html",
1010
"start": "parcel index.html -p 8888",
1111
"test": "test-ipfs-example"
1212
},
@@ -19,7 +19,7 @@
1919
"execa": "^5.0.0",
2020
"go-ipfs": "0.8.0",
2121
"ipfsd-ctl": "^8.0.0",
22-
"parcel": "next",
22+
"parcel": "2.0.0-beta.2",
2323
"rimraf": "^3.0.2",
2424
"test-ipfs-example": "^3.0.0"
2525
},

examples/ipfs-client-add-files/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"private": true,
77
"scripts": {
88
"clean": "rimraf ./dist",
9-
"build": "parcel build index.html --no-scope-hoist",
9+
"build": "parcel build index.html",
1010
"start": "parcel index.html -p 8888",
1111
"test": "test-ipfs-example"
1212
},
@@ -17,7 +17,7 @@
1717
"execa": "^5.0.0",
1818
"ipfs": "^0.54.4",
1919
"ipfsd-ctl": "^8.0.0",
20-
"parcel": "next",
20+
"parcel": "2.0.0-beta.2",
2121
"rimraf": "^3.0.2",
2222
"test-ipfs-example": "^3.0.0"
2323
},

examples/traverse-ipld-graphs/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
"test-ipfs-example": "^3.0.0"
1414
},
1515
"dependencies": {
16-
"cids": "^1.1.5",
16+
"cids": "^1.1.6",
1717
"ipfs": "^0.54.4",
1818
"ipld-block": "^0.11.0",
19-
"ipld-dag-pb": "^0.22.0",
19+
"ipld-dag-pb": "^0.22.1",
2020
"ipld-git": "^0.6.1",
2121
"ipld-ethereum": "^5.0.1",
2222
"multihashing-async": "^2.1.2"

packages/interface-ipfs-core/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"chai": "^4.2.0",
4242
"chai-as-promised": "^7.1.1",
4343
"chai-subset": "^1.6.0",
44-
"cids": "^1.1.5",
44+
"cids": "^1.1.6",
4545
"delay": "^5.0.0",
4646
"dirty-chai": "^2.0.1",
4747
"err-code": "^3.0.1",
@@ -50,7 +50,7 @@
5050
"ipfs-utils": "^6.0.4",
5151
"ipld-block": "^0.11.0",
5252
"ipld-dag-cbor": "^0.18.0",
53-
"ipld-dag-pb": "^0.22.0",
53+
"ipld-dag-pb": "^0.22.1",
5454
"ipns": "^0.10.0",
5555
"is-ipfs": "^4.0.0",
5656
"iso-random-stream": "^1.1.1",

packages/ipfs-cli/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"dependencies": {
3333
"byteman": "^1.3.5",
3434
"cid-tool": "^1.0.0",
35-
"cids": "^1.1.5",
35+
"cids": "^1.1.6",
3636
"debug": "^4.1.1",
3737
"err-code": "^3.0.1",
3838
"execa": "^5.0.0",
@@ -45,7 +45,7 @@
4545
"ipfs-repo": "^9.0.0",
4646
"ipfs-utils": "^6.0.4",
4747
"ipld-dag-cbor": "^0.18.0",
48-
"ipld-dag-pb": "^0.22.0",
48+
"ipld-dag-pb": "^0.22.1",
4949
"it-all": "^1.0.4",
5050
"it-concat": "^1.0.3",
5151
"it-first": "^1.0.4",

packages/ipfs-core-types/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
],
2929
"license": "(Apache-2.0 OR MIT)",
3030
"dependencies": {
31-
"cids": "^1.1.5",
31+
"cids": "^1.1.6",
32+
"ipld": "^0.29.0",
3233
"multiaddr": "^8.0.0",
3334
"multibase": "^4.0.2"
3435
},

packages/ipfs-core-types/src/block/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AbortOptions, PreloadOptions } from '../utils'
1+
import { AbortOptions, PreloadOptions, IPFSPath } from '../utils'
22
import CID, { CIDVersion } from 'cids'
33
import Block from 'ipld-block'
44
import { CodecName } from 'multicodec'

packages/ipfs-core-types/src/config/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export interface DEK {
107107

108108
export interface PubsubConfig {
109109
PubSubRouter?: 'gossipsub' | 'floodsub'
110-
Enabled?: booleam
110+
Enabled?: boolean
111111
}
112112

113113
export interface SwarmConfig {

packages/ipfs-core-types/src/dag/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { AbortOptions, PreloadOptions, IPFSPath } from '../utils'
2-
import CID from 'cids'
2+
import CID, { CIDVersion } from 'cids'
33
import { CodecName } from 'multicodec'
44
import { HashName } from 'multihashes'
55

packages/ipfs-core-types/src/files/index.d.ts

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { AbortOptions, IPFSPath } from '../utils'
2-
import { ToMTime } from './files'
32
import CID, { CIDVersion } from 'cids'
43
import { CodecName } from 'multicodec'
54
import { HashName } from 'multihashes'
6-
import { Mtime } from 'ipfs-unixfs'
5+
import { Mtime, MtimeLike } from 'ipfs-unixfs'
76
import type { AddProgressFn } from '../root'
87

98
export interface API<OptionExtension = {}> {
@@ -105,7 +104,7 @@ export interface API<OptionExtension = {}> {
105104
* // Hello, World!
106105
* ```
107106
*/
108-
read: (ipfsPath: IPFSPath, options?: ResolveOptions & OptionExtension) => AsyncIterable<Uint8Array>
107+
read: (ipfsPath: IPFSPath, options?: ReadOptions & OptionExtension) => AsyncIterable<Uint8Array>
109108

110109
/**
111110
* Write to an MFS path
@@ -260,7 +259,7 @@ export interface MkdirOptions extends MFSOptions, AbortOptions {
260259
/**
261260
* A Date object, an object with { secs, nsecs } properties where secs is the number of seconds since (positive) or before (negative) the Unix Epoch began and nsecs is the number of nanoseconds since the last full second, or the output of process.hrtime()
262261
*/
263-
mtime?: ToMTime
262+
mtime?: MtimeLike
264263

265264
/**
266265
* The hash algorithm to use for any updated entries
@@ -351,7 +350,7 @@ export interface TouchOptions extends MFSOptions, AbortOptions {
351350
/**
352351
* A Date object, an object with { secs, nsecs } properties where secs is the number of seconds since (positive) or before (negative) the Unix Epoch began and nsecs is the number of nanoseconds since the last full second, or the output of process.hrtime()
353352
*/
354-
mtime?: ToMTime
353+
mtime?: MtimeLike
355354

356355
/**
357356
* The hash algorithm to use for any updated entries
@@ -442,7 +441,7 @@ export interface WriteOptions extends MFSOptions, AbortOptions {
442441
/**
443442
* A Date object, an object with { secs, nsecs } properties where secs is the number of seconds since (positive) or before (negative) the Unix Epoch began and nsecs is the number of nanoseconds since the last full second, or the output of process.hrtime()
444443
*/
445-
mtime?: ToMTime
444+
mtime?: MtimeLike
446445

447446
/**
448447
* The hash algorithm to use for any updated entries

packages/ipfs-core-types/src/index.d.ts

-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ export interface IPFS extends RootAPI {
4545
}
4646

4747
export type {
48-
IPFS,
49-
5048
AbortOptions,
5149
Await,
5250
AwaitIterable

packages/ipfs-core-types/src/pin/index.d.ts

-2
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ export interface AddOptions extends AbortOptions {
113113
}
114114

115115
export interface AddAllOptions extends AbortOptions {
116-
lock?: boolean
117-
118116
/**
119117
* Whether to preload all blocks pinned during this operation
120118
*/

packages/ipfs-core-types/src/root.d.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import type { AbortOptions, PreloadOptions, IPFSPath, ImportSource, ToEntry } from './utils'
2-
import type CID, { CIDVersion } from 'cids'
3-
import type { Mtime } from 'ipfs-unixfs'
4-
import type Multiaddr from 'multiaddr'
5-
import type { BaseName } from 'multibase'
1+
import { AbortOptions, PreloadOptions, IPFSPath, ImportSource, ToEntry } from './utils'
2+
import CID, { CIDVersion } from 'cids'
3+
import { Mtime } from 'ipfs-unixfs'
4+
import Multiaddr from 'multiaddr'
5+
import { BaseName } from 'multibase'
66

77
export interface API<OptionExtension = {}> {
88
/**

packages/ipfs-core-types/src/stats/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { AbortOptions } from '../utils'
22
import { API as BitswapAPI } from '../bitswap'
33
import { API as RepoAPI } from '../repo'
4-
import type CID from 'cid'
4+
import type CID from 'cids'
55

66
export interface API<OptionExtension = {}> {
77
bitswap: BitswapAPI<OptionExtension>["stat"]

packages/ipfs-core-types/src/swarm/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { AbortOptions } from '../utils'
22
import { API as BitswapAPI } from '../bitswap'
33
import { API as RepoAPI } from '../repo'
4-
import type CID from 'cid'
4+
import type CID from 'cids'
55
import type Multiaddr from 'multiaddr'
66

77
export interface API<OptionExtension = {}> {

packages/ipfs-core-types/src/utils.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import CID from 'cids'
2-
import { AwaitIterable } from './utils'
32
import { Mtime, MtimeLike } from 'ipfs-unixfs'
43

54
export type Entry<Content extends AsyncIterable<Uint8Array>|Blob> =

packages/ipfs-core-utils/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"any-signal": "^2.1.2",
4545
"blob-to-it": "^1.0.1",
4646
"browser-readablestream-to-it": "^1.0.1",
47-
"cids": "^1.1.5",
47+
"cids": "^1.1.6",
4848
"err-code": "^3.0.1",
4949
"ipfs-core-types": "^0.3.1",
5050
"ipfs-unixfs": "^4.0.1",

0 commit comments

Comments
 (0)