Skip to content

Commit 0b8f1a0

Browse files
authored
feat!: simplify store interface, move query/batch to datastore, add getAll to blockstore (#189)
- Removes open/close from store as not every implementation needs them - Removes query from store as it doesn't make sense for blockstores - Removes batch from store as storing blocks in memory before writing is a bad idea - Adds query/batch to datastore interface - Adds getAll to blockstore interface - Converts datastore tests to typescript - Improves typing of datastore/blockstore tests to allow setup/teardown to recieve the right store type to open/close, etc - Blockstore pair is now `{ cid, block }` instead of `{ key, value }` BREAKING CHANGE: open/close/batch/query methods have been removed from store interface, query/batch added to datastore, getAll added to blockstore
1 parent 54f3eee commit 0b8f1a0

File tree

9 files changed

+279
-762
lines changed

9 files changed

+279
-762
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
node_modules
2+
build
23
dist
34
.docs
45
.coverage
56
node_modules
67
package-lock.json
78
yarn.lock
9+
.vscode

packages/interface-blockstore-tests/package.json

-17
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,6 @@
2323
},
2424
"type": "module",
2525
"types": "./dist/src/index.d.ts",
26-
"typesVersions": {
27-
"*": {
28-
"*": [
29-
"*",
30-
"dist/*",
31-
"dist/src/*",
32-
"dist/src/*/index"
33-
],
34-
"src/*": [
35-
"*",
36-
"dist/*",
37-
"dist/src/*",
38-
"dist/src/*/index"
39-
]
40-
}
41-
},
4226
"files": [
4327
"src",
4428
"dist",
@@ -154,7 +138,6 @@
154138
"interface-blockstore": "^4.0.0",
155139
"it-all": "^2.0.0",
156140
"it-drain": "^2.0.0",
157-
"it-length": "^2.0.0",
158141
"multiformats": "^11.0.0",
159142
"uint8arrays": "^4.0.2"
160143
},

0 commit comments

Comments
 (0)