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

Commit

Permalink
chore: remove multihashes dep (#3115)
Browse files Browse the repository at this point in the history
Use the version exported by `multihashing-async` instead.
  • Loading branch information
achingbrain authored Jun 24, 2020
1 parent 21dab48 commit f9c83c0
Show file tree
Hide file tree
Showing 26 changed files with 24 additions and 26 deletions.
1 change: 0 additions & 1 deletion packages/interface-ipfs-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"it-pushable": "^1.3.1",
"multiaddr": "^7.4.3",
"multibase": "^0.7.0",
"multihashes": "^1.0.1",
"multihashing-async": "^0.8.0",
"nanoid": "^3.0.2",
"peer-id": "^0.13.12",
Expand Down
2 changes: 1 addition & 1 deletion packages/interface-ipfs-core/src/block/get.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-env mocha */
'use strict'
const { Buffer } = require('buffer')
const multihash = require('multihashes')
const multihash = require('multihashing-async').multihash
const CID = require('cids')
const { getDescribe, getIt, expect } = require('../utils/mocha')
const testTimeout = require('../utils/test-timeout')
Expand Down
2 changes: 1 addition & 1 deletion packages/interface-ipfs-core/src/block/put.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

const { Buffer } = require('buffer')
const Block = require('ipld-block')
const multihash = require('multihashes')
const multihash = require('multihashing-async').multihash
const CID = require('cids')
const { getDescribe, getIt, expect } = require('../utils/mocha')
const testTimeout = require('../utils/test-timeout')
Expand Down
2 changes: 1 addition & 1 deletion packages/interface-ipfs-core/src/dag/put.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const dagPB = require('ipld-dag-pb')
const DAGNode = dagPB.DAGNode
const dagCBOR = require('ipld-dag-cbor')
const CID = require('cids')
const multihash = require('multihashes')
const multihash = require('multihashing-async').multihash
const { getDescribe, getIt, expect } = require('../utils/mocha')
const testTimeout = require('../utils/test-timeout')

Expand Down
2 changes: 1 addition & 1 deletion packages/interface-ipfs-core/src/files/mkdir.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

const { nanoid } = require('nanoid')
const { getDescribe, getIt, expect } = require('../utils/mocha')
const multihash = require('multihashes')
const multihash = require('multihashing-async').multihash
const createShardedDirectory = require('../utils/create-sharded-directory')
const all = require('it-all')
const isShardAtPath = require('../utils/is-shard-at-path')
Expand Down
2 changes: 1 addition & 1 deletion packages/interface-ipfs-core/src/files/stat.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const { fixtures } = require('../utils')
const { getDescribe, getIt, expect } = require('../utils/mocha')
const createShardedDirectory = require('../utils/create-sharded-directory')
const CID = require('cids')
const mh = require('multihashes')
const mh = require('multihashing-async').multihash
const Block = require('ipld-block')
const randomBytes = require('iso-random-stream/src/random')
const isShardAtPath = require('../utils/is-shard-at-path')
Expand Down
2 changes: 1 addition & 1 deletion packages/interface-ipfs-core/src/files/write.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { Buffer } = require('buffer')
const { nanoid } = require('nanoid')
const { getDescribe, getIt, expect } = require('../utils/mocha')
const { isNode } = require('ipfs-utils/src/env')
const multihash = require('multihashes')
const multihash = require('multihashing-async').multihash
const traverseLeafNodes = require('../utils/traverse-leaf-nodes')
const createShardedDirectory = require('../utils/create-sharded-directory')
const createTwoShards = require('../utils/create-two-shards')
Expand Down
1 change: 0 additions & 1 deletion packages/ipfs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@
"multiaddr-to-uri": "^5.1.0",
"multibase": "^0.7.0",
"multicodec": "^1.0.0",
"multihashes": "^1.0.1",
"multihashing-async": "^0.8.0",
"p-defer": "^3.0.0",
"p-queue": "^6.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs/src/cli/commands/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
const { promisify } = require('util')
const getFolderSize = promisify(require('get-folder-size'))
const byteman = require('byteman')
const mh = require('multihashes')
const mh = require('multihashing-async').multihash
const multibase = require('multibase')
const {
createProgressBar,
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs/src/cli/commands/dag/put.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'
const { Buffer } = require('buffer')
const mh = require('multihashes')
const mh = require('multihashing-async').multihash
const multibase = require('multibase')
const dagCBOR = require('ipld-dag-cbor')
const dagPB = require('ipld-dag-pb')
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs/src/core/components/files/chmod.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const updateTree = require('./utils/update-tree')
const updateMfsRoot = require('./utils/update-mfs-root')
const { DAGNode } = require('ipld-dag-pb')
const mc = require('multicodec')
const mh = require('multihashes')
const mh = require('multihashing-async').multihash
const pipe = require('it-pipe')
const importer = require('ipfs-unixfs-importer')
const exporter = require('ipfs-unixfs-exporter')
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs/src/core/components/files/touch.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const updateTree = require('./utils/update-tree')
const updateMfsRoot = require('./utils/update-mfs-root')
const { DAGNode } = require('ipld-dag-pb')
const mc = require('multicodec')
const mh = require('multihashes')
const mh = require('multihashing-async').multihash
const { withTimeoutOption } = require('../../utils')

const defaultOptions = {
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs/src/core/components/files/utils/add-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const {
} = require('./hamt-utils')
const errCode = require('err-code')
const mc = require('multicodec')
const mh = require('multihashes')
const mh = require('multihashing-async').multihash
const last = require('it-last')

const addLink = async (context, options) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const {
DAGNode
} = require('ipld-dag-pb')
const mc = require('multicodec')
const mh = require('multihashes')
const mh = require('multihashing-async').multihash

const createNode = async (context, type, options) => {
const hashAlg = mh.names[options.hashAlg]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const DirSharded = require('ipfs-unixfs-importer/src/dir-sharded')
const log = require('debug')('ipfs:mfs:core:utils:hamt-utils')
const UnixFS = require('ipfs-unixfs')
const mc = require('multicodec')
const mh = require('multihashes')
const mh = require('multihashing-async').multihash
const last = require('it-last')
const { Buffer } = require('buffer')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const {
} = require('./hamt-utils')
const errCode = require('err-code')
const mc = require('multicodec')
const mh = require('multihashes')
const mh = require('multihashing-async').multihash

const removeLink = async (context, options) => {
if (!options.parentCid && !options.parent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const {
} = require('ipld-dag-pb')
const log = require('debug')('ipfs:mfs:utils:with-mfs-root')
const mc = require('multicodec')
const mh = require('multihashes')
const mh = require('multihashing-async').multihash
const errCode = require('err-code')

const {
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs/src/core/components/object/put.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const dagPB = require('ipld-dag-pb')
const DAGNode = dagPB.DAGNode
const DAGLink = dagPB.DAGLink
const mh = require('multihashes')
const mh = require('multihashing-async').multihash
const multicodec = require('multicodec')
const { withTimeoutOption } = require('../../utils')
const { Buffer } = require('buffer')
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs/src/core/components/pin/pin-set.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const multihashes = require('multihashes')
const multihashes = require('multihashing-async').multihash
const CID = require('cids')
const protobuf = require('protons')
const fnv1a = require('fnv1a')
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs/src/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ const PeerId = require('peer-id')
const crypto = require('libp2p-crypto')
const isIPFS = require('is-ipfs')
const multiaddr = require('multiaddr')
const multihash = require('multihashes')
const multibase = require('multibase')
const multicodec = require('multicodec')
const multihashing = require('multihashing-async')
const multihash = multihashing.multihash
const CID = require('cids')
const { NotInitializedError } = require('./errors')
const Components = require('./components')
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs/src/core/ipns/routing/pubsub-datastore.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const ipns = require('ipns')
const { Buffer } = require('buffer')
const { fromB58String, toB58String } = require('multihashes')
const { fromB58String, toB58String } = require('multihashing-async').multihash
const PubsubDatastore = require('datastore-pubsub')

const withIs = require('class-is')
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs/src/http/api/resources/block.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

const { Buffer } = require('buffer')
const multihash = require('multihashes')
const multihash = require('multihashing-async').multihash
const codecs = require('multicodec/src/base-table.json')
const multipart = require('../../utils/multipart-request-parser')
const Joi = require('../../utils/joi')
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs/src/http/api/resources/dag.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const CID = require('cids')
const multipart = require('../../utils/multipart-request-parser')
const mh = require('multihashes')
const mh = require('multihashing-async').multihash
const Joi = require('../../utils/joi')
const multicodec = require('multicodec')
const Boom = require('@hapi/boom')
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs/test/core/exports.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const isIPFS = require('is-ipfs')
const CID = require('cids')
const multiaddr = require('multiaddr')
const multibase = require('multibase')
const multihash = require('multihashes')
const multihashing = require('multihashing-async')
const multihash = multihashing.multihash
const multicodec = require('multicodec')
const PeerId = require('peer-id')
const { Buffer } = require('buffer')
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs/test/core/name-pubsub.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { nanoid } = require('nanoid')
const { Buffer } = require('buffer')
const { expect } = require('interface-ipfs-core/src/utils/mocha')
const base64url = require('base64url')
const { fromB58String } = require('multihashes')
const { fromB58String } = require('multihashing-async').multihash
const PeerId = require('peer-id')
const { isNode } = require('ipfs-utils/src/env')
const ipns = require('ipns')
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs/test/core/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

const { expect } = require('interface-ipfs-core/src/utils/mocha')
const fs = require('fs')
const fromB58String = require('multihashes').fromB58String
const { fromB58String } = require('multihashing-async').multihash
const all = require('it-all')

// This gets replaced by `create-repo-browser.js` in the browser
Expand Down

0 comments on commit f9c83c0

Please sign in to comment.