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

Commit f98af8e

Browse files
authored
fix: mark ipld options as partial (#3669)
Otherwise the user has to specify a blockstore etc. We make the options object whole before instantiating ipld.
1 parent 9bc2d7c commit f98af8e

File tree

18 files changed

+32
-32
lines changed

18 files changed

+32
-32
lines changed

examples/browser-ipns-publish/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"human-crypto-keys": "^0.1.4",
1717
"ipfs": "^0.54.4",
1818
"ipfs-http-client": "^49.0.4",
19-
"ipfs-utils": "^6.0.4",
19+
"ipfs-utils": "^7.0.0",
2020
"ipns": "^0.11.0",
2121
"it-last": "^1.0.4",
2222
"p-retry": "^4.2.0",

examples/custom-ipfs-repo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"dependencies": {
1313
"datastore-fs": "4.0.0",
1414
"ipfs": "^0.54.4",
15-
"ipfs-repo": "^9.1.3",
15+
"ipfs-repo": "^9.1.4",
1616
"it-all": "^1.0.4"
1717
},
1818
"devDependencies": {

packages/interface-ipfs-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"err-code": "^3.0.1",
4848
"ipfs-unixfs": "^4.0.3",
4949
"ipfs-unixfs-importer": "^7.0.3",
50-
"ipfs-utils": "^6.0.4",
50+
"ipfs-utils": "^7.0.0",
5151
"ipld-block": "^0.11.0",
5252
"ipld-dag-cbor": "^1.0.0",
5353
"ipld-dag-pb": "^0.22.1",

packages/ipfs-cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
"ipfs-core-utils": "^0.7.2",
4343
"ipfs-daemon": "^0.5.4",
4444
"ipfs-http-client": "^49.0.4",
45-
"ipfs-repo": "^9.1.3",
46-
"ipfs-utils": "^6.0.4",
45+
"ipfs-repo": "^9.1.4",
46+
"ipfs-utils": "^7.0.0",
4747
"ipld-dag-cbor": "^1.0.0",
4848
"ipld-dag-pb": "^0.22.1",
4949
"it-all": "^1.0.4",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export interface IdentityConfig {
109109
/**
110110
* The base64 encoded protobuf describing (and containing) the nodes private key.
111111
*/
112-
PrivateKey: string
112+
PrivKey: string
113113
}
114114

115115
export interface KeychainConfig {

packages/ipfs-core-utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"err-code": "^3.0.1",
4949
"ipfs-core-types": "^0.3.1",
5050
"ipfs-unixfs": "^4.0.3",
51-
"ipfs-utils": "^6.0.4",
51+
"ipfs-utils": "^7.0.0",
5252
"it-all": "^1.0.4",
5353
"it-map": "^1.0.4",
5454
"it-peekable": "^1.0.1",

packages/ipfs-core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@
7474
"ipfs-block-service": "^0.19.0",
7575
"ipfs-core-types": "^0.3.1",
7676
"ipfs-core-utils": "^0.7.2",
77-
"ipfs-repo": "^9.1.3",
77+
"ipfs-repo": "^9.1.4",
7878
"ipfs-unixfs": "^4.0.3",
7979
"ipfs-unixfs-exporter": "^5.0.3",
8080
"ipfs-unixfs-importer": "^7.0.3",
81-
"ipfs-utils": "^6.0.4",
81+
"ipfs-utils": "^7.0.0",
8282
"ipld": "^0.30.0",
8383
"ipld-block": "^0.11.0",
8484
"ipld-dag-cbor": "^1.0.0",

packages/ipfs-core/src/components/cat.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const { exporter } = require('ipfs-unixfs-exporter')
44
const { normalizeCidPath } = require('../utils')
55
const withTimeoutOption = require('ipfs-core-utils/src/with-timeout-option')
6+
const CID = require('cids')
67

78
/**
89
* @typedef {Object} Context
@@ -20,7 +21,7 @@ module.exports = function ({ ipld, preload }) {
2021

2122
if (options.preload !== false) {
2223
const pathComponents = ipfsPath.split('/')
23-
preload(pathComponents[0])
24+
preload(new CID(pathComponents[0]))
2425
}
2526

2627
const file = await exporter(ipfsPath, ipld, options)

packages/ipfs-core/src/components/get.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const exporter = require('ipfs-unixfs-exporter')
44
const errCode = require('err-code')
55
const { normalizeCidPath, mapFile } = require('../utils')
66
const withTimeoutOption = require('ipfs-core-utils/src/with-timeout-option')
7+
const CID = require('cids')
78

89
/**
910
* @typedef {Object} Context
@@ -26,7 +27,7 @@ module.exports = function ({ ipld, preload }) {
2627
throw errCode(err, 'ERR_INVALID_PATH')
2728
}
2829

29-
preload(pathComponents[0])
30+
preload(new CID(pathComponents[0]))
3031
}
3132

3233
for await (const file of exporter.recursive(ipfsPath, ipld, options)) {

packages/ipfs-core/src/components/ipld.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const Ipld = require('ipld')
66
/**
77
* @param {Object} config
88
* @param {import('ipfs-block-service')} config.blockService
9-
* @param {import('ipld').Options} [config.options]
9+
* @param {Partial<import('ipld').Options>} [config.options]
1010
*/
1111
const createIPLD = ({ blockService, options }) => {
1212
return new Ipld(getDefaultIpldOptions(blockService, options))

0 commit comments

Comments
 (0)