diff --git a/examples/browser-add-readable-stream/package.json b/examples/browser-add-readable-stream/package.json index a4a9e16ec7..b7ad55a006 100644 --- a/examples/browser-add-readable-stream/package.json +++ b/examples/browser-add-readable-stream/package.json @@ -12,7 +12,7 @@ "keywords": [], "license": "MIT", "devDependencies": { - "ipfs": "^0.52.1", + "ipfs": "^0.52.2", "test-ipfs-example": "^2.0.3" } } diff --git a/examples/browser-browserify/package.json b/examples/browser-browserify/package.json index 7992059dd0..44891ed73b 100644 --- a/examples/browser-browserify/package.json +++ b/examples/browser-browserify/package.json @@ -18,7 +18,7 @@ "concat-stream": "^2.0.0", "execa": "^4.0.3", "http-server": "^0.12.3", - "ipfs": "^0.52.1", + "ipfs": "^0.52.2", "rimraf": "^3.0.2", "test-ipfs-example": "^2.0.3" }, diff --git a/examples/browser-create-react-app/package.json b/examples/browser-create-react-app/package.json index 6e58c264e3..e89e9ff04a 100644 --- a/examples/browser-create-react-app/package.json +++ b/examples/browser-create-react-app/package.json @@ -4,7 +4,7 @@ "private": true, "dependencies": { "dot-prop": "^5.0.0", - "ipfs": "^0.52.1", + "ipfs": "^0.52.2", "ipfs-css": "^0.13.1", "react": "^16.8.6", "react-dom": "^16.8.6", diff --git a/examples/browser-exchange-files/package.json b/examples/browser-exchange-files/package.json index 4a4effe818..0f2458792d 100644 --- a/examples/browser-exchange-files/package.json +++ b/examples/browser-exchange-files/package.json @@ -14,11 +14,11 @@ "browserify": "^16.2.3", "execa": "^4.0.3", "http-server": "^0.12.3", - "ipfs-http-client": "^48.1.1", + "ipfs-http-client": "^48.1.2", "uint8arrays": "^1.1.0" }, "dependencies": { - "ipfs": "^0.52.1", + "ipfs": "^0.52.2", "it-all": "^1.0.4", "rimraf": "^3.0.2", "test-ipfs-example": "^2.0.3" diff --git a/examples/browser-http-client-upload-file/package.json b/examples/browser-http-client-upload-file/package.json index 1fb5fb6596..8b7bfc666b 100644 --- a/examples/browser-http-client-upload-file/package.json +++ b/examples/browser-http-client-upload-file/package.json @@ -15,10 +15,10 @@ ], "license": "MIT", "dependencies": { - "ipfs-http-client": "^48.1.1" + "ipfs-http-client": "^48.1.2" }, "devDependencies": { - "ipfs": "^0.52.1", + "ipfs": "^0.52.2", "parcel-bundler": "^1.12.4", "react": "^16.8.6", "react-dom": "^16.8.6", diff --git a/examples/browser-ipns-publish/package.json b/examples/browser-ipns-publish/package.json index fbdc1f0029..417b7edb8a 100644 --- a/examples/browser-ipns-publish/package.json +++ b/examples/browser-ipns-publish/package.json @@ -13,8 +13,8 @@ "license": "MIT", "dependencies": { "human-crypto-keys": "^0.1.4", - "ipfs": "^0.52.1", - "ipfs-http-client": "^48.1.1", + "ipfs": "^0.52.2", + "ipfs-http-client": "^48.1.2", "ipfs-utils": "^5.0.0", "ipns": "^0.8.0", "it-last": "^1.0.4", diff --git a/examples/browser-mfs/package.json b/examples/browser-mfs/package.json index d8b32d1bd3..77db2343af 100644 --- a/examples/browser-mfs/package.json +++ b/examples/browser-mfs/package.json @@ -22,7 +22,7 @@ "webpack-cli": "^3.3.11" }, "dependencies": { - "ipfs": "^0.52.1", + "ipfs": "^0.52.2", "mime-sniffer": "~0.0.3" } } diff --git a/examples/browser-parceljs/package.json b/examples/browser-parceljs/package.json index 5161e96a86..dabbcd22f5 100644 --- a/examples/browser-parceljs/package.json +++ b/examples/browser-parceljs/package.json @@ -18,7 +18,7 @@ "author": "", "license": "ISC", "dependencies": { - "ipfs": "^0.52.1" + "ipfs": "^0.52.2" }, "devDependencies": { "@babel/cli": "^7.1.5", diff --git a/examples/browser-readablestream/package.json b/examples/browser-readablestream/package.json index a7f383f4d1..9499461604 100644 --- a/examples/browser-readablestream/package.json +++ b/examples/browser-readablestream/package.json @@ -21,7 +21,7 @@ "webpack": "^4.43.0" }, "dependencies": { - "ipfs": "^0.52.1", + "ipfs": "^0.52.2", "it-to-stream": "^0.1.2", "videostream": "^3.2.0" } diff --git a/examples/browser-script-tag/package.json b/examples/browser-script-tag/package.json index 4947cff63b..f55711d7dc 100644 --- a/examples/browser-script-tag/package.json +++ b/examples/browser-script-tag/package.json @@ -16,6 +16,6 @@ "test-ipfs-example": "^2.0.3" }, "dependencies": { - "ipfs": "^0.52.1" + "ipfs": "^0.52.2" } } diff --git a/examples/browser-service-worker/package.json b/examples/browser-service-worker/package.json index 4e13489bca..9c7075b426 100644 --- a/examples/browser-service-worker/package.json +++ b/examples/browser-service-worker/package.json @@ -22,7 +22,7 @@ "webpack-dev-server": "3.11.0" }, "dependencies": { - "ipfs": "^0.51.0", + "ipfs": "^0.52.0", "ipfs-message-port-client": "^0.3.0", "ipfs-message-port-protocol": "^0.3.0", "ipfs-message-port-server": "^0.3.0", diff --git a/examples/browser-sharing-node-across-tabs/package.json b/examples/browser-sharing-node-across-tabs/package.json index 6fefe8a2c9..7b3ccc9ae8 100644 --- a/examples/browser-sharing-node-across-tabs/package.json +++ b/examples/browser-sharing-node-across-tabs/package.json @@ -24,7 +24,7 @@ "worker-plugin": "4.0.3" }, "dependencies": { - "ipfs": "^0.52.1", + "ipfs": "^0.52.2", "ipfs-message-port-client": "^0.4.1", "ipfs-message-port-server": "^0.4.1" }, diff --git a/examples/browser-video-streaming/package.json b/examples/browser-video-streaming/package.json index 2444a67cba..3eab9b4f46 100644 --- a/examples/browser-video-streaming/package.json +++ b/examples/browser-video-streaming/package.json @@ -16,6 +16,6 @@ "test-ipfs-example": "^2.0.3" }, "dependencies": { - "ipfs": "^0.52.1" + "ipfs": "^0.52.2" } } diff --git a/examples/browser-vue/package.json b/examples/browser-vue/package.json index bd1d36a34b..b23680976a 100644 --- a/examples/browser-vue/package.json +++ b/examples/browser-vue/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "core-js": "^3.6.4", - "ipfs": "^0.52.1", + "ipfs": "^0.52.2", "vue": "^2.6.11" }, "devDependencies": { diff --git a/examples/browser-webpack/package.json b/examples/browser-webpack/package.json index 3615ac770e..a879e62c8d 100644 --- a/examples/browser-webpack/package.json +++ b/examples/browser-webpack/package.json @@ -27,7 +27,7 @@ "webpack-dev-server": "^3.11.0" }, "dependencies": { - "ipfs": "^0.52.1" + "ipfs": "^0.52.2" }, "browserslist": [ ">1%", diff --git a/examples/circuit-relaying/package.json b/examples/circuit-relaying/package.json index 2ae2071b99..3a7a55bc05 100644 --- a/examples/circuit-relaying/package.json +++ b/examples/circuit-relaying/package.json @@ -15,14 +15,14 @@ "license": "MIT", "dependencies": { "delay": "^4.4.0", - "ipfs": "^0.52.1", + "ipfs": "^0.52.2", "ipfs-pubsub-room": "^2.0.1", "uint8arrays": "^1.1.0" }, "devDependencies": { "execa": "^4.0.3", "ipfs-css": "^0.13.1", - "ipfs-http-client": "^48.1.1", + "ipfs-http-client": "^48.1.2", "parcel-bundler": "^1.12.4", "rimraf": "^3.0.2", "tachyons": "^4.11.1", diff --git a/examples/custom-ipfs-repo/package.json b/examples/custom-ipfs-repo/package.json index 8cfc596ef9..da2f9c0dc8 100644 --- a/examples/custom-ipfs-repo/package.json +++ b/examples/custom-ipfs-repo/package.json @@ -11,7 +11,7 @@ "license": "MIT", "dependencies": { "datastore-fs": "^2.0.0", - "ipfs": "^0.52.1", + "ipfs": "^0.52.2", "ipfs-repo": "^7.0.0", "it-all": "^1.0.4" }, diff --git a/examples/custom-ipld-formats/daemon-node.js b/examples/custom-ipld-formats/daemon-node.js index 939e6cd410..fae244020f 100644 --- a/examples/custom-ipld-formats/daemon-node.js +++ b/examples/custom-ipld-formats/daemon-node.js @@ -5,11 +5,15 @@ const codecName = 'dag-test' const codecNumber = 392091 -const baseTable = require('multicodec/src/base-table.json') -baseTable[codecName] = codecNumber +const table = require('multicodec/src/base-table') +// @ts-ignore +table.baseTable = { + ...table.baseTable, + [codecName]: codecNumber +} // now require modules as usual -const IPFSDaemon = require('ipfs-cli/src/daemon') +const IPFSDaemon = require('ipfs-daemon') const multihashing = require('multihashing-async') const multihash = multihashing.multihash const multicodec = require('multicodec') diff --git a/examples/custom-ipld-formats/in-process-node.js b/examples/custom-ipld-formats/in-process-node.js index 9fa19214ff..3bfcee48e2 100644 --- a/examples/custom-ipld-formats/in-process-node.js +++ b/examples/custom-ipld-formats/in-process-node.js @@ -5,8 +5,12 @@ const codecName = 'dag-test' const codecNumber = 392091 -const baseTable = require('multicodec/src/base-table.json') -baseTable[codecName] = codecNumber +const table = require('multicodec/src/base-table') +// @ts-ignore +table.baseTable = { + ...table.baseTable, + [codecName]: codecNumber +} // now require modules as usual const IPFS = require('ipfs-core') diff --git a/examples/custom-ipld-formats/package.json b/examples/custom-ipld-formats/package.json index 44caaf8fbc..3e4b5f3c01 100644 --- a/examples/custom-ipld-formats/package.json +++ b/examples/custom-ipld-formats/package.json @@ -11,10 +11,10 @@ "test-ipfs-example": "^2.0.3" }, "dependencies": { - "cids": "1.0.2", - "ipfs-cli": "^0.1.0", - "ipfs-core": "^0.2.1", - "ipfs-http-client": "^48.1.1", + "cids": "^1.0.0", + "ipfs-daemon": "^0.3.1", + "ipfs-core": "^0.3.0", + "ipfs-http-client": "^48.1.2", "multicodec": "^2.0.1", "multihashing-async": "^2.0.1", "uint8arrays": "^1.1.0" diff --git a/examples/custom-libp2p/package.json b/examples/custom-libp2p/package.json index 8b18ac2411..0988f32889 100644 --- a/examples/custom-libp2p/package.json +++ b/examples/custom-libp2p/package.json @@ -10,7 +10,7 @@ }, "license": "MIT", "dependencies": { - "ipfs": "^0.52.1", + "ipfs": "^0.52.2", "libp2p": "^0.29.3", "libp2p-bootstrap": "^0.12.1", "libp2p-kad-dht": "^0.20.1", diff --git a/examples/explore-ethereum-blockchain/package.json b/examples/explore-ethereum-blockchain/package.json index 097783c2f0..0d4ec63e96 100644 --- a/examples/explore-ethereum-blockchain/package.json +++ b/examples/explore-ethereum-blockchain/package.json @@ -10,8 +10,8 @@ "keywords": [], "license": "MIT", "devDependencies": { - "ipfs": "^0.52.1", - "ipfs-http-client": "^48.1.1", + "ipfs": "^0.52.2", + "ipfs-http-client": "^48.1.2", "ipfsd-ctl": "^7.1.1", "ipld-ethereum": "^5.0.1", "test-ipfs-example": "^2.0.3" diff --git a/examples/http-client-browser-pubsub/package.json b/examples/http-client-browser-pubsub/package.json index 36b9c8b1fd..a2620020c3 100644 --- a/examples/http-client-browser-pubsub/package.json +++ b/examples/http-client-browser-pubsub/package.json @@ -12,7 +12,7 @@ "author": "Alan Shaw", "license": "MIT", "dependencies": { - "ipfs-http-client": "^48.1.1" + "ipfs-http-client": "^48.1.2" }, "browserslist": [ "last 2 versions and not dead and > 2%" @@ -20,7 +20,7 @@ "devDependencies": { "execa": "^4.0.3", "go-ipfs": "^0.7.0", - "ipfs": "^0.52.1", + "ipfs": "^0.52.2", "ipfsd-ctl": "^7.1.1", "parcel-bundler": "^1.12.4", "test-ipfs-example": "^2.0.3" diff --git a/examples/http-client-bundle-webpack/package.json b/examples/http-client-bundle-webpack/package.json index 6d9b00b922..92fd387d19 100644 --- a/examples/http-client-bundle-webpack/package.json +++ b/examples/http-client-bundle-webpack/package.json @@ -13,7 +13,7 @@ "license": "MIT", "keywords": [], "dependencies": { - "ipfs-http-client": "^48.1.1", + "ipfs-http-client": "^48.1.2", "react": "^16.8.6", "react-dom": "^16.8.6" }, @@ -24,7 +24,7 @@ "babel-loader": "^8.0.5", "copy-webpack-plugin": "^5.0.4", "execa": "^4.0.3", - "ipfs": "^0.52.1", + "ipfs": "^0.52.2", "ipfsd-ctl": "^7.1.1", "react-hot-loader": "^4.12.21", "rimraf": "^3.0.2", diff --git a/examples/http-client-name-api/package.json b/examples/http-client-name-api/package.json index 90e0c1ab0c..f7e7bf9df2 100644 --- a/examples/http-client-name-api/package.json +++ b/examples/http-client-name-api/package.json @@ -13,7 +13,7 @@ "author": "Tara Vancil ", "license": "MIT", "dependencies": { - "ipfs-http-client": "^48.1.1" + "ipfs-http-client": "^48.1.2" }, "devDependencies": { "execa": "^4.0.3", diff --git a/examples/ipfs-101/package.json b/examples/ipfs-101/package.json index 3367d34bc9..6e0685d1a6 100644 --- a/examples/ipfs-101/package.json +++ b/examples/ipfs-101/package.json @@ -10,7 +10,7 @@ "author": "David Dias ", "license": "MIT", "dependencies": { - "ipfs": "^0.52.1", + "ipfs": "^0.52.2", "it-all": "^1.0.4", "uint8arrays": "^1.1.0" }, diff --git a/examples/run-in-electron/package.json b/examples/run-in-electron/package.json index 07121a55d2..25599fc1a4 100644 --- a/examples/run-in-electron/package.json +++ b/examples/run-in-electron/package.json @@ -18,7 +18,7 @@ "devDependencies": { "electron": "^6.0.0", "electron-rebuild": "^1.8.4", - "ipfs": "^0.52.1", + "ipfs": "^0.52.2", "test-ipfs-example": "^2.0.3" }, "greenkeeper": { diff --git a/examples/running-multiple-nodes/package.json b/examples/running-multiple-nodes/package.json index 17b5806d42..930970cd19 100644 --- a/examples/running-multiple-nodes/package.json +++ b/examples/running-multiple-nodes/package.json @@ -13,6 +13,6 @@ "test-ipfs-example": "^2.0.3" }, "dependencies": { - "ipfs": "^0.52.1" + "ipfs": "^0.52.2" } } diff --git a/examples/traverse-ipld-graphs/package.json b/examples/traverse-ipld-graphs/package.json index 18a028d849..27747ba097 100644 --- a/examples/traverse-ipld-graphs/package.json +++ b/examples/traverse-ipld-graphs/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "cids": "^1.0.0", - "ipfs": "^0.52.1", + "ipfs": "^0.52.2", "ipld-block": "^0.11.0", "ipld-dag-pb": "^0.20.0", "ipld-git": "^0.6.1", diff --git a/examples/types-use-ipfs-from-ts/package.json b/examples/types-use-ipfs-from-ts/package.json index f36edbd714..621c28d90c 100644 --- a/examples/types-use-ipfs-from-ts/package.json +++ b/examples/types-use-ipfs-from-ts/package.json @@ -2,7 +2,7 @@ "name": "example-types-use-ipfs-from-ts", "private": true, "dependencies": { - "ipfs": "^0.52.1" + "ipfs": "^0.52.2" }, "devDependencies": { "typescript": "4.0.x" diff --git a/examples/types-use-ipfs-from-ts/src/main.ts b/examples/types-use-ipfs-from-ts/src/main.ts index a6763cade9..29e1741602 100644 --- a/examples/types-use-ipfs-from-ts/src/main.ts +++ b/examples/types-use-ipfs-from-ts/src/main.ts @@ -14,7 +14,6 @@ export default async function main() { console.log('Added file:', file.path, file.cid.toString()) try { - // @ts-expect-error CID has no toUpperCase method file.cid.toUpperCase() } catch (error) { diff --git a/examples/types-use-ipfs-from-typed-js/package.json b/examples/types-use-ipfs-from-typed-js/package.json index c5912b4e55..c49141ca16 100644 --- a/examples/types-use-ipfs-from-typed-js/package.json +++ b/examples/types-use-ipfs-from-typed-js/package.json @@ -2,7 +2,7 @@ "name": "example-types-use-ipfs-from-typed-js", "private": true, "dependencies": { - "ipfs": "^0.52.1" + "ipfs": "^0.52.2" }, "devDependencies": { "typescript": "4.0.x" diff --git a/examples/types-use-ipfs-from-typed-js/src/main.js b/examples/types-use-ipfs-from-typed-js/src/main.js index 0ff2166786..5e24546705 100644 --- a/examples/types-use-ipfs-from-typed-js/src/main.js +++ b/examples/types-use-ipfs-from-typed-js/src/main.js @@ -17,7 +17,6 @@ async function main () { console.log('Added file:', file.path, file.cid.toString()) try { - // @ts-expect-error CID has no toUpperCase method file.cid.toUpperCase() } catch(error) { diff --git a/packages/interface-ipfs-core/package.json b/packages/interface-ipfs-core/package.json index 22deac5b3c..ec0df71dc6 100644 --- a/packages/interface-ipfs-core/package.json +++ b/packages/interface-ipfs-core/package.json @@ -34,7 +34,7 @@ "chai": "^4.2.0", "chai-as-promised": "^7.1.1", "chai-subset": "^1.6.0", - "cids": "1.0.2", + "cids": "^1.0.0", "delay": "^4.4.0", "dirty-chai": "^2.0.1", "err-code": "^2.0.3", diff --git a/packages/ipfs-cli/package.json b/packages/ipfs-cli/package.json index 2939d078b4..5a07a23034 100644 --- a/packages/ipfs-cli/package.json +++ b/packages/ipfs-cli/package.json @@ -32,7 +32,7 @@ "bignumber.js": "^9.0.0", "byteman": "^1.3.5", "cid-tool": "^1.0.0", - "cids": "1.0.2", + "cids": "^1.0.0", "debug": "^4.1.1", "err-code": "^2.0.3", "execa": "^5.0.0", diff --git a/packages/ipfs-cli/src/utils.js b/packages/ipfs-cli/src/utils.js index 82f54a477c..0bb6320956 100644 --- a/packages/ipfs-cli/src/utils.js +++ b/packages/ipfs-cli/src/utils.js @@ -252,7 +252,7 @@ const escapeControlCharacters = (str) => { * CID properties * * @param {object} obj - all keys/values in this object will be have control characters stripped - * @param {string} cidBase - any encountered CIDs will be stringified using this base + * @param {import('cids').BaseNameOrCode} cidBase - any encountered CIDs will be stringified using this base * @returns {object} */ const makeEntriesPrintable = (obj, cidBase = 'base58btc') => { diff --git a/packages/ipfs-core-utils/package.json b/packages/ipfs-core-utils/package.json index 57e2aa3361..db583a2ca9 100644 --- a/packages/ipfs-core-utils/package.json +++ b/packages/ipfs-core-utils/package.json @@ -41,7 +41,7 @@ "any-signal": "^2.0.0", "blob-to-it": "^1.0.1", "browser-readablestream-to-it": "^1.0.1", - "cids": "1.0.2", + "cids": "^1.0.0", "err-code": "^2.0.3", "ipfs-utils": "^5.0.0", "it-all": "^1.0.4", diff --git a/packages/ipfs-core-utils/src/cid.js b/packages/ipfs-core-utils/src/cid.js index b0578d375c..e9a3b6baef 100644 --- a/packages/ipfs-core-utils/src/cid.js +++ b/packages/ipfs-core-utils/src/cid.js @@ -12,7 +12,7 @@ const CID = require('cids') * * @param {CID|Uint8Array|string} input - The CID to encode * @param {Object} [options] - Optional options - * @param {string} [options.base] - Name of multibase codec to encode the CID with + * @param {import('cids').BaseNameOrCode} [options.base] - Name of multibase codec to encode the CID with * @param {boolean} [options.upgrade] - Automatically upgrade v0 CIDs to v1 when * necessary. Default: true. * @returns {string} - CID in string representation diff --git a/packages/ipfs-core/package.json b/packages/ipfs-core/package.json index 4266514814..a4269322a5 100644 --- a/packages/ipfs-core/package.json +++ b/packages/ipfs-core/package.json @@ -57,7 +57,7 @@ "array-shuffle": "^1.0.1", "bignumber.js": "^9.0.0", "cbor": "^5.1.0", - "cids": "1.0.2", + "cids": "^1.0.0", "class-is": "^1.1.0", "dag-cbor-links": "^2.0.0", "datastore-core": "^2.0.0", @@ -107,7 +107,7 @@ "multiaddr": "^8.0.0", "multiaddr-to-uri": "^6.0.0", "multibase": "^3.0.0", - "multicodec": "2.0.4", + "multicodec": "^2.0.1", "multihashing-async": "^2.0.1", "native-abort-controller": "~0.0.3", "p-queue": "^6.6.1", diff --git a/packages/ipfs-core/src/components/resolve.js b/packages/ipfs-core/src/components/resolve.js index 3336e4d7cf..9c6b0b3ef7 100644 --- a/packages/ipfs-core/src/components/resolve.js +++ b/packages/ipfs-core/src/components/resolve.js @@ -100,7 +100,7 @@ module.exports = ({ ipld, name }) => { * * @typedef {Object} ResolveSettings * @property {boolean} [recursive=true] - Resolve until result is an IPFS name. - * @property {string} [cidBase='base58btc'] - Multibase codec name the CID in the resolved path will be encoded with. + * @property {import('cids').BaseNameOrCode} [cidBase='base58btc'] - Multibase codec name the CID in the resolved path will be encoded with. * * @typedef {import('.').AbortOptions} AbortOptions */ diff --git a/packages/ipfs-http-client/package.json b/packages/ipfs-http-client/package.json index 7bc9f9a1dc..315abda5e0 100644 --- a/packages/ipfs-http-client/package.json +++ b/packages/ipfs-http-client/package.json @@ -52,7 +52,7 @@ "dependencies": { "any-signal": "^2.0.0", "bignumber.js": "^9.0.0", - "cids": "1.0.2", + "cids": "^1.0.0", "debug": "^4.1.1", "form-data": "^3.0.0", "ipfs-core-utils": "^0.5.3", @@ -68,7 +68,7 @@ "merge-options": "^2.0.0", "multiaddr": "^8.0.0", "multibase": "^3.0.0", - "multicodec": "2.0.4", + "multicodec": "^2.0.1", "multihashes": "^3.0.1", "nanoid": "^3.1.12", "native-abort-controller": "~0.0.3", diff --git a/packages/ipfs-http-client/src/dag/put.js b/packages/ipfs-http-client/src/dag/put.js index 1f58b32278..c06e43f625 100644 --- a/packages/ipfs-http-client/src/dag/put.js +++ b/packages/ipfs-http-client/src/dag/put.js @@ -28,6 +28,7 @@ module.exports = configure((api, opts) => { const cid = new CID(options.cid) encodingOptions = { ...options, + // @ts-expect-error - https://github.com/multiformats/js-cid/pull/138 format: multicodec.getName(cid.code), hashAlg: multihash.decode(cid.multihash).name } diff --git a/packages/ipfs-http-client/src/lib/ipld-formats.js b/packages/ipfs-http-client/src/lib/ipld-formats.js index 1ef4c4e8c6..7348b8505a 100644 --- a/packages/ipfs-http-client/src/lib/ipld-formats.js +++ b/packages/ipfs-http-client/src/lib/ipld-formats.js @@ -36,10 +36,11 @@ module.exports = ({ formats = [], loadFormat = noop } = {}) => { /** * Attempts to load an IPLD format for the passed CID * - * @param {string} codec - The code to load the format for + * @param {import('multicodec').CodecName} codec - The code to load the format for * @returns {Promise} - An IPLD format */ const loadResolver = async (codec) => { + // @ts-ignore - codec is a string and not a CodecName const number = multicodec.getNumber(codec) const format = configuredFormats[number] || await loadFormat(codec) diff --git a/packages/ipfs-http-gateway/package.json b/packages/ipfs-http-gateway/package.json index bd12d8d24f..d5add58cc9 100644 --- a/packages/ipfs-http-gateway/package.json +++ b/packages/ipfs-http-gateway/package.json @@ -32,7 +32,7 @@ "@hapi/ammo": "^5.0.1", "@hapi/boom": "^9.1.0", "@hapi/hapi": "^20.0.0", - "cids": "1.0.2", + "cids": "^1.0.0", "debug": "^4.1.1", "hapi-pino": "^8.3.0", "ipfs-core-utils": "^0.5.3", diff --git a/packages/ipfs-http-server/package.json b/packages/ipfs-http-server/package.json index 25d2aae78b..23c1f2a4d5 100644 --- a/packages/ipfs-http-server/package.json +++ b/packages/ipfs-http-server/package.json @@ -32,7 +32,7 @@ "@hapi/boom": "^9.1.0", "@hapi/content": "^5.0.2", "@hapi/hapi": "^20.0.0", - "cids": "1.0.2", + "cids": "^1.0.0", "debug": "^4.1.1", "dlv": "^1.1.3", "err-code": "^2.0.3", diff --git a/packages/ipfs-http-server/src/api/resources/block.js b/packages/ipfs-http-server/src/api/resources/block.js index 5d8d9c65fa..d3288587d1 100644 --- a/packages/ipfs-http-server/src/api/resources/block.js +++ b/packages/ipfs-http-server/src/api/resources/block.js @@ -1,7 +1,7 @@ 'use strict' const multihash = require('multihashing-async').multihash -const codecs = require('multicodec/src/base-table.json') +const { baseTable: codecs } = require('multicodec/src/base-table') const multipart = require('../../utils/multipart-request-parser') const Joi = require('../../utils/joi') const Boom = require('@hapi/boom') diff --git a/packages/ipfs-message-port-protocol/package.json b/packages/ipfs-message-port-protocol/package.json index e413fc3cf2..4ca7dafd92 100644 --- a/packages/ipfs-message-port-protocol/package.json +++ b/packages/ipfs-message-port-protocol/package.json @@ -42,7 +42,7 @@ "dep-check": "aegir dep-check -i typescript -i rimraf" }, "dependencies": { - "cids": "1.0.2", + "cids": "^1.0.0", "ipld-block": "^0.11.0" }, "devDependencies": { diff --git a/packages/ipfs-message-port-server/package.json b/packages/ipfs-message-port-server/package.json index 80b0628369..90cb15a2ee 100644 --- a/packages/ipfs-message-port-server/package.json +++ b/packages/ipfs-message-port-server/package.json @@ -50,7 +50,7 @@ "devDependencies": { "@types/it-all": "^1.0.0", "aegir": "^29.2.2", - "cids": "1.0.2", + "cids": "^1.0.0", "ipfs-utils": "^5.0.0", "rimraf": "^3.0.2", "typescript": "4.0.x"