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

Commit

Permalink
chore: fix types (#3608)
Browse files Browse the repository at this point in the history
Updates deps, fixes typos.

Not sure why the compiler doesn't pick up things like this.
  • Loading branch information
achingbrain committed Apr 7, 2021
1 parent 6870873 commit 74bfce3
Show file tree
Hide file tree
Showing 39 changed files with 72 additions and 76 deletions.
8 changes: 4 additions & 4 deletions examples/browser-create-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"version": "1.0.0",
"private": true,
"dependencies": {
"dot-prop": "^5.0.0",
"dot-prop": "^6.0.1",
"ipfs": "^0.54.4",
"ipfs-css": "^0.13.1",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"ipfs-css": "^1.3.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "^4.0.3",
"tachyons": "^4.11.1"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/browser-http-client-upload-file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
},
"devDependencies": {
"ipfs": "^0.54.4",
"parcel": "next",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"parcel": "2.0.0-beta.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"rimraf": "^3.0.2",
"test-ipfs-example": "^3.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/browser-http-client-upload-file/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'use strict'

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

class App extends React.Component {
constructor () {
Expand Down Expand Up @@ -73,7 +73,7 @@ class App extends React.Component {

async connect () {
this.setState({
ipfs: ipfsClient(this.multiaddr.current.value)
ipfs: ipfsHttpClient(this.multiaddr.current.value)
})
}

Expand Down
4 changes: 2 additions & 2 deletions examples/browser-ipns-publish/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
"last 2 versions and not dead and > 2%"
],
"devDependencies": {
"delay": "^4.4.0",
"delay": "^5.0.0",
"execa": "^5.0.0",
"ipfsd-ctl": "^8.0.0",
"go-ipfs": "0.8.0",
"parcel": "next",
"parcel": "2.0.0-beta.2",
"path": "^0.12.7",
"test-ipfs-example": "^3.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/browser-parceljs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"ipfs": "^0.54.4"
},
"devDependencies": {
"parcel": "next",
"parcel": "2.0.0-beta.2",
"rimraf": "^3.0.2",
"standard": "^16.0.3",
"test-ipfs-example": "^3.0.0"
Expand Down
4 changes: 2 additions & 2 deletions examples/browser-video-streaming/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<body>
<video id="video" controls></video>
<script src="./node_modules/ipfs/dist/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/hlsjs-ipfs-loader@latest/dist/index.js"></script>
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<script src="https://cdn.jsdelivr.net/npm/hlsjs-ipfs-loader@0.3.0/dist/index.js"></script>
<script src="https://cdn.jsdelivr.net/npm/hls.js@0.14.17"></script>
<script src="streaming.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions examples/browser-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"babel-loader": "^8.2.2",
"copy-webpack-plugin": "^8.1.0",
"node-polyfill-webpack-plugin": "^1.0.3",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-hot-loader": "^4.12.21",
"rimraf": "^3.0.2",
"stream-browserify": "^3.0.0",
Expand Down
6 changes: 3 additions & 3 deletions examples/circuit-relaying/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
"author": "Dmitriy Ryajov <dryajov@gmail.com>",
"license": "MIT",
"dependencies": {
"delay": "^4.4.0",
"delay": "^5.0.0",
"ipfs": "^0.54.4",
"ipfs-pubsub-room": "^2.0.1",
"libp2p-websockets": "^0.15.1",
"uint8arrays": "^2.1.3"
},
"devDependencies": {
"execa": "^5.0.0",
"ipfs-css": "^0.13.1",
"ipfs-css": "^1.3.0",
"ipfs-http-client": "^49.0.4",
"parcel": "next",
"parcel": "2.0.0-beta.2",
"rimraf": "^3.0.2",
"tachyons": "^4.11.1",
"test-ipfs-example": "^3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-ipld-formats/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"test-ipfs-example": "^3.0.0"
},
"dependencies": {
"cids": "^1.1.5",
"cids": "^1.1.6",
"ipfs-daemon": "^0.5.4",
"ipfs-core": "^0.5.4",
"ipfs-http-client": "^49.0.4",
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-libp2p/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"ipfs": "^0.54.4",
"libp2p": "^0.30.12",
"libp2p-bootstrap": "^0.12.1",
"libp2p-kad-dht": "^0.20.1",
"libp2p-kad-dht": "^0.21.0",
"libp2p-mdns": "^0.15.0",
"libp2p-mplex": "^0.10.0",
"libp2p-noise": "^2.0.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/http-client-browser-pubsub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"go-ipfs": "0.8.0",
"ipfs": "^0.54.4",
"ipfsd-ctl": "^8.0.0",
"parcel": "next",
"parcel": "2.0.0-beta.2",
"test-ipfs-example": "^3.0.0"
}
}
8 changes: 4 additions & 4 deletions examples/http-client-bundle-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"keywords": [],
"dependencies": {
"ipfs-http-client": "^49.0.4",
"react": "^16.8.6",
"react-dom": "^16.8.6"
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@babel/core": "^7.13.10",
"@babel/core": "^7.13.14",
"@babel/preset-env": "^7.13.12",
"@babel/preset-react": "^7.12.13",
"@babel/preset-react": "^7.13.13",
"babel-loader": "^8.2.2",
"copy-webpack-plugin": "^8.1.0",
"execa": "^5.0.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/http-client-name-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"private": true,
"scripts": {
"clean": "rimraf ./dist",
"build": "parcel build index.html --no-scope-hoist",
"build": "parcel build index.html",
"start": "parcel index.html -p 8888",
"test": "test-ipfs-example"
},
Expand All @@ -19,7 +19,7 @@
"execa": "^5.0.0",
"go-ipfs": "0.8.0",
"ipfsd-ctl": "^8.0.0",
"parcel": "next",
"parcel": "2.0.0-beta.2",
"rimraf": "^3.0.2",
"test-ipfs-example": "^3.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/ipfs-client-add-files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"private": true,
"scripts": {
"clean": "rimraf ./dist",
"build": "parcel build index.html --no-scope-hoist",
"build": "parcel build index.html",
"start": "parcel index.html -p 8888",
"test": "test-ipfs-example"
},
Expand All @@ -17,7 +17,7 @@
"execa": "^5.0.0",
"ipfs": "^0.54.4",
"ipfsd-ctl": "^8.0.0",
"parcel": "next",
"parcel": "2.0.0-beta.2",
"rimraf": "^3.0.2",
"test-ipfs-example": "^3.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/traverse-ipld-graphs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"test-ipfs-example": "^3.0.0"
},
"dependencies": {
"cids": "^1.1.5",
"cids": "^1.1.6",
"ipfs": "^0.54.4",
"ipld-block": "^0.11.0",
"ipld-dag-pb": "^0.22.0",
"ipld-dag-pb": "^0.22.1",
"ipld-git": "^0.6.1",
"ipld-ethereum": "^5.0.1",
"multihashing-async": "^2.1.2"
Expand Down
4 changes: 2 additions & 2 deletions packages/interface-ipfs-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"chai-subset": "^1.6.0",
"cids": "^1.1.5",
"cids": "^1.1.6",
"delay": "^5.0.0",
"dirty-chai": "^2.0.1",
"err-code": "^3.0.1",
Expand All @@ -50,7 +50,7 @@
"ipfs-utils": "^6.0.4",
"ipld-block": "^0.11.0",
"ipld-dag-cbor": "^0.18.0",
"ipld-dag-pb": "^0.22.0",
"ipld-dag-pb": "^0.22.1",
"ipns": "^0.10.0",
"is-ipfs": "^4.0.0",
"iso-random-stream": "^1.1.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/ipfs-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"dependencies": {
"byteman": "^1.3.5",
"cid-tool": "^1.0.0",
"cids": "^1.1.5",
"cids": "^1.1.6",
"debug": "^4.1.1",
"err-code": "^3.0.1",
"execa": "^5.0.0",
Expand All @@ -45,7 +45,7 @@
"ipfs-repo": "^9.0.0",
"ipfs-utils": "^6.0.4",
"ipld-dag-cbor": "^0.18.0",
"ipld-dag-pb": "^0.22.0",
"ipld-dag-pb": "^0.22.1",
"it-all": "^1.0.4",
"it-concat": "^1.0.3",
"it-first": "^1.0.4",
Expand Down
3 changes: 2 additions & 1 deletion packages/ipfs-core-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
],
"license": "(Apache-2.0 OR MIT)",
"dependencies": {
"cids": "^1.1.5",
"cids": "^1.1.6",
"ipld": "^0.29.0",
"multiaddr": "^8.0.0",
"multibase": "^4.0.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs-core-types/src/block/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AbortOptions, PreloadOptions } from '../utils'
import { AbortOptions, PreloadOptions, IPFSPath } from '../utils'
import CID, { CIDVersion } from 'cids'
import Block from 'ipld-block'
import { CodecName } from 'multicodec'
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs-core-types/src/config/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export interface DEK {

export interface PubsubConfig {
PubSubRouter?: 'gossipsub' | 'floodsub'
Enabled?: booleam
Enabled?: boolean
}

export interface SwarmConfig {
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs-core-types/src/dag/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AbortOptions, PreloadOptions, IPFSPath } from '../utils'
import CID from 'cids'
import CID, { CIDVersion } from 'cids'
import { CodecName } from 'multicodec'
import { HashName } from 'multihashes'

Expand Down
11 changes: 5 additions & 6 deletions packages/ipfs-core-types/src/files/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { AbortOptions, IPFSPath } from '../utils'
import { ToMTime } from './files'
import CID, { CIDVersion } from 'cids'
import { CodecName } from 'multicodec'
import { HashName } from 'multihashes'
import { Mtime } from 'ipfs-unixfs'
import { Mtime, MtimeLike } from 'ipfs-unixfs'
import type { AddProgressFn } from '../root'

export interface API<OptionExtension = {}> {
Expand Down Expand Up @@ -105,7 +104,7 @@ export interface API<OptionExtension = {}> {
* // Hello, World!
* ```
*/
read: (ipfsPath: IPFSPath, options?: ResolveOptions & OptionExtension) => AsyncIterable<Uint8Array>
read: (ipfsPath: IPFSPath, options?: ReadOptions & OptionExtension) => AsyncIterable<Uint8Array>

/**
* Write to an MFS path
Expand Down Expand Up @@ -260,7 +259,7 @@ export interface MkdirOptions extends MFSOptions, AbortOptions {
/**
* 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()
*/
mtime?: ToMTime
mtime?: MtimeLike

/**
* The hash algorithm to use for any updated entries
Expand Down Expand Up @@ -351,7 +350,7 @@ export interface TouchOptions extends MFSOptions, AbortOptions {
/**
* 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()
*/
mtime?: ToMTime
mtime?: MtimeLike

/**
* The hash algorithm to use for any updated entries
Expand Down Expand Up @@ -442,7 +441,7 @@ export interface WriteOptions extends MFSOptions, AbortOptions {
/**
* 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()
*/
mtime?: ToMTime
mtime?: MtimeLike

/**
* The hash algorithm to use for any updated entries
Expand Down
2 changes: 0 additions & 2 deletions packages/ipfs-core-types/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ export interface IPFS extends RootAPI {
}

export type {
IPFS,

AbortOptions,
Await,
AwaitIterable
Expand Down
2 changes: 0 additions & 2 deletions packages/ipfs-core-types/src/pin/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ export interface AddOptions extends AbortOptions {
}

export interface AddAllOptions extends AbortOptions {
lock?: boolean

/**
* Whether to preload all blocks pinned during this operation
*/
Expand Down
10 changes: 5 additions & 5 deletions packages/ipfs-core-types/src/root.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { AbortOptions, PreloadOptions, IPFSPath, ImportSource, ToEntry } from './utils'
import type CID, { CIDVersion } from 'cids'
import type { Mtime } from 'ipfs-unixfs'
import type Multiaddr from 'multiaddr'
import type { BaseName } from 'multibase'
import { AbortOptions, PreloadOptions, IPFSPath, ImportSource, ToEntry } from './utils'
import CID, { CIDVersion } from 'cids'
import { Mtime } from 'ipfs-unixfs'
import Multiaddr from 'multiaddr'
import { BaseName } from 'multibase'

export interface API<OptionExtension = {}> {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs-core-types/src/stats/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { AbortOptions } from '../utils'
import { API as BitswapAPI } from '../bitswap'
import { API as RepoAPI } from '../repo'
import type CID from 'cid'
import type CID from 'cids'

export interface API<OptionExtension = {}> {
bitswap: BitswapAPI<OptionExtension>["stat"]
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs-core-types/src/swarm/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { AbortOptions } from '../utils'
import { API as BitswapAPI } from '../bitswap'
import { API as RepoAPI } from '../repo'
import type CID from 'cid'
import type CID from 'cids'
import type Multiaddr from 'multiaddr'

export interface API<OptionExtension = {}> {
Expand Down
1 change: 0 additions & 1 deletion packages/ipfs-core-types/src/utils.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import CID from 'cids'
import { AwaitIterable } from './utils'
import { Mtime, MtimeLike } from 'ipfs-unixfs'

export type Entry<Content extends AsyncIterable<Uint8Array>|Blob> =
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs-core-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"any-signal": "^2.1.2",
"blob-to-it": "^1.0.1",
"browser-readablestream-to-it": "^1.0.1",
"cids": "^1.1.5",
"cids": "^1.1.6",
"err-code": "^3.0.1",
"ipfs-core-types": "^0.3.1",
"ipfs-unixfs": "^4.0.1",
Expand Down
Loading

0 comments on commit 74bfce3

Please sign in to comment.