diff --git a/README.md b/README.md index 1dd9ec84..ea6b756e 100644 --- a/README.md +++ b/README.md @@ -9,21 +9,21 @@ # Packages -- [`/packages/blockstore-core`](./packages/blockstore-core) Contains various implementations of the API contract described in interface-blockstore -- [`/packages/blockstore-fs`](./packages/blockstore-fs) Blockstore implementation with file system backend -- [`/packages/blockstore-idb`](./packages/blockstore-idb) Blockstore implementation with IndexedDB backend -- [`/packages/blockstore-level`](./packages/blockstore-level) Blockstore implementation with level(up|down) backend -- [`/packages/blockstore-s3`](./packages/blockstore-s3) IPFS blockstore implementation backed by s3 -- [`/packages/datastore-core`](./packages/datastore-core) Wrapper implementation for interface-datastore -- [`/packages/datastore-fs`](./packages/datastore-fs) Datastore implementation with file system backend -- [`/packages/datastore-idb`](./packages/datastore-idb) Datastore implementation with IndexedDB backend. -- [`/packages/datastore-level`](./packages/datastore-level) Datastore implementation with level(up|down) backend -- [`/packages/datastore-s3`](./packages/datastore-s3) IPFS datastore implementation backed by s3 -- [`/packages/interface-blockstore`](./packages/interface-blockstore) An interface for storing and retrieving blocks -- [`/packages/interface-blockstore-tests`](./packages/interface-blockstore-tests) Compliance tests for the blockstore interface -- [`/packages/interface-datastore`](./packages/interface-datastore) datastore interface -- [`/packages/interface-datastore-tests`](./packages/interface-datastore-tests) Compliance tests for the datastore interface -- [`/packages/interface-store`](./packages/interface-store) A generic interface for storing and retrieving data +- [`packages/blockstore-core`](https://github.com/ipfs/js-stores/tree/main/packages/blockstore-core) Contains various implementations of the API contract described in interface-blockstore +- [`packages/blockstore-fs`](https://github.com/ipfs/js-stores/tree/main/packages/blockstore-fs) Blockstore implementation with file system backend +- [`packages/blockstore-idb`](https://github.com/ipfs/js-stores/tree/main/packages/blockstore-idb) Blockstore implementation with IndexedDB backend +- [`packages/blockstore-level`](https://github.com/ipfs/js-stores/tree/main/packages/blockstore-level) Blockstore implementation with level(up|down) backend +- [`packages/blockstore-s3`](https://github.com/ipfs/js-stores/tree/main/packages/blockstore-s3) IPFS blockstore implementation backed by s3 +- [`packages/datastore-core`](https://github.com/ipfs/js-stores/tree/main/packages/datastore-core) Wrapper implementation for interface-datastore +- [`packages/datastore-fs`](https://github.com/ipfs/js-stores/tree/main/packages/datastore-fs) Datastore implementation with file system backend +- [`packages/datastore-idb`](https://github.com/ipfs/js-stores/tree/main/packages/datastore-idb) Datastore implementation with IndexedDB backend. +- [`packages/datastore-level`](https://github.com/ipfs/js-stores/tree/main/packages/datastore-level) Datastore implementation with level(up|down) backend +- [`packages/datastore-s3`](https://github.com/ipfs/js-stores/tree/main/packages/datastore-s3) IPFS datastore implementation backed by s3 +- [`packages/interface-blockstore`](https://github.com/ipfs/js-stores/tree/main/packages/interface-blockstore) An interface for storing and retrieving blocks +- [`packages/interface-blockstore-tests`](https://github.com/ipfs/js-stores/tree/main/packages/interface-blockstore-tests) Compliance tests for the blockstore interface +- [`packages/interface-datastore`](https://github.com/ipfs/js-stores/tree/main/packages/interface-datastore) datastore interface +- [`packages/interface-datastore-tests`](https://github.com/ipfs/js-stores/tree/main/packages/interface-datastore-tests) Compliance tests for the datastore interface +- [`packages/interface-store`](https://github.com/ipfs/js-stores/tree/main/packages/interface-store) A generic interface for storing and retrieving data # API Docs @@ -33,8 +33,8 @@ Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/js-stores/blob/main/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/ipfs/js-stores/blob/main/LICENSE-MIT) / ) # Contribute diff --git a/package.json b/package.json index f6902bd1..ea189d92 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,7 @@ "docs:no-publish": "aegir docs --publish false" }, "devDependencies": { - "aegir": "^42.2.3", + "aegir": "^44.1.0", "npm-run-all": "^4.1.5" }, "workspaces": [ diff --git a/packages/blockstore-core/README.md b/packages/blockstore-core/README.md index 94943a86..db91f412 100644 --- a/packages/blockstore-core/README.md +++ b/packages/blockstore-core/README.md @@ -9,6 +9,21 @@ # About + + Various Blockstore implementations are available. ## Implementations @@ -97,7 +112,7 @@ $ npm i blockstore-core ## Browser ` @@ -111,8 +126,8 @@ Loading this module through a script tag will make it's exports available as `Bl Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/js-stores/blob/main/packages/blockstore-core/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/ipfs/js-stores/blob/main/packages/blockstore-core/LICENSE-MIT) / ) # Contribute diff --git a/packages/blockstore-core/package.json b/packages/blockstore-core/package.json index 3cd6381b..48360663 100644 --- a/packages/blockstore-core/package.json +++ b/packages/blockstore-core/package.json @@ -94,22 +94,23 @@ "test:firefox": "aegir test -t browser -- --browser firefox", "test:firefox-webworker": "aegir test -t webworker -- --browser firefox", "test:electron-main": "aegir test -t electron-main", - "dep-check": "aegir dep-check" + "dep-check": "aegir dep-check", + "release": "aegir release" }, "dependencies": { - "@libp2p/logger": "^4.0.6", + "@libp2p/logger": "^4.0.19", "interface-blockstore": "^5.0.0", - "interface-store": "6.0.0", - "it-drain": "^3.0.5", - "it-filter": "^3.0.4", - "it-merge": "^3.0.3", + "interface-store": "^6.0.0", + "it-drain": "^3.0.7", + "it-filter": "^3.1.1", + "it-merge": "^3.0.5", "it-pushable": "^3.2.3", - "multiformats": "^13.0.1" + "multiformats": "^13.2.2" }, "devDependencies": { - "aegir": "^42.2.3", - "interface-blockstore-tests": "7.0.0", - "it-all": "^3.0.4", - "uint8arrays": "^5.0.2" + "aegir": "^44.1.0", + "interface-blockstore-tests": "^7.0.0", + "it-all": "^3.0.6", + "uint8arrays": "^5.1.0" } } diff --git a/packages/blockstore-fs/README.md b/packages/blockstore-fs/README.md index a7e4b185..61af9aeb 100644 --- a/packages/blockstore-fs/README.md +++ b/packages/blockstore-fs/README.md @@ -9,6 +9,21 @@ # About + + A Blockstore implementation that stores blocks in the local filesystem. ## Example @@ -33,8 +48,8 @@ $ npm i blockstore-fs Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/js-stores/blob/main/packages/blockstore-fs/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/ipfs/js-stores/blob/main/packages/blockstore-fs/LICENSE-MIT) / ) # Contribute diff --git a/packages/blockstore-fs/package.json b/packages/blockstore-fs/package.json index d606df4a..28d04356 100644 --- a/packages/blockstore-fs/package.json +++ b/packages/blockstore-fs/package.json @@ -73,19 +73,20 @@ "test": "aegir test -t node -t electron-main", "test:node": "aegir test -t node", "test:electron-main": "aegir test -t electron-main", - "dep-check": "aegir dep-check" + "dep-check": "aegir dep-check", + "release": "aegir release" }, "dependencies": { "fast-write-atomic": "^0.2.1", "interface-blockstore": "^5.0.0", - "interface-store": "6.0.0", + "interface-store": "^6.0.0", "it-glob": "^3.0.1", - "it-map": "^3.0.5", - "it-parallel-batch": "^3.0.4", - "multiformats": "^13.0.1" + "it-map": "^3.1.1", + "it-parallel-batch": "^3.0.6", + "multiformats": "^13.2.2" }, "devDependencies": { - "aegir": "^42.2.3", - "interface-blockstore-tests": "7.0.0" + "aegir": "^44.1.0", + "interface-blockstore-tests": "^7.0.0" } } diff --git a/packages/blockstore-fs/tsconfig.json b/packages/blockstore-fs/tsconfig.json index e27c7fa6..73395b59 100644 --- a/packages/blockstore-fs/tsconfig.json +++ b/packages/blockstore-fs/tsconfig.json @@ -8,9 +8,6 @@ "test" ], "references": [ - { - "path": "../blockstore-core" - }, { "path": "../interface-blockstore" }, diff --git a/packages/blockstore-idb/README.md b/packages/blockstore-idb/README.md index 7009d9ac..906b5879 100644 --- a/packages/blockstore-idb/README.md +++ b/packages/blockstore-idb/README.md @@ -9,6 +9,21 @@ # About + + A Blockstore implementation for browsers that stores blocks in [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API). ## Example @@ -27,7 +42,7 @@ $ npm i blockstore-idb ## Browser ` @@ -41,8 +56,8 @@ Loading this module through a script tag will make it's exports available as `Bl Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/js-stores/blob/main/packages/blockstore-idb/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/ipfs/js-stores/blob/main/packages/blockstore-idb/LICENSE-MIT) / ) # Contribute diff --git a/packages/blockstore-idb/package.json b/packages/blockstore-idb/package.json index 717b0495..e4296c87 100644 --- a/packages/blockstore-idb/package.json +++ b/packages/blockstore-idb/package.json @@ -53,17 +53,18 @@ "test:chrome-webworker": "aegir test -t webworker", "test:firefox": "aegir test -t browser -- --browser firefox", "test:firefox-webworker": "aegir test -t webworker -- --browser firefox", - "dep-check": "aegir dep-check" + "dep-check": "aegir dep-check", + "release": "aegir release" }, "dependencies": { - "blockstore-core": "5.0.0", + "blockstore-core": "^5.0.0", "idb": "^8.0.0", "interface-blockstore": "^5.0.0", - "interface-store": "6.0.0", - "multiformats": "^13.0.1" + "interface-store": "^6.0.0", + "multiformats": "^13.2.2" }, "devDependencies": { - "aegir": "^42.2.3", - "interface-blockstore-tests": "7.0.0" + "aegir": "^44.1.0", + "interface-blockstore-tests": "^7.0.0" } } diff --git a/packages/blockstore-level/README.md b/packages/blockstore-level/README.md index a7cdfd73..2c7b37fd 100644 --- a/packages/blockstore-level/README.md +++ b/packages/blockstore-level/README.md @@ -9,6 +9,21 @@ # About + + A Blockstore implementation that uses a flavour of [Level](https://leveljs.org/) as a backend. N.b. this is here largely for the sake of completeness, in node you should probably use FSDatastore, in browsers you should probably use IDBDatastore. @@ -29,7 +44,7 @@ $ npm i blockstore-level ## Browser ` @@ -43,8 +58,8 @@ Loading this module through a script tag will make it's exports available as `Bl Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/js-stores/blob/main/packages/blockstore-level/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/ipfs/js-stores/blob/main/packages/blockstore-level/LICENSE-MIT) / ) # Contribute diff --git a/packages/blockstore-level/package.json b/packages/blockstore-level/package.json index 856ef107..9e036427 100644 --- a/packages/blockstore-level/package.json +++ b/packages/blockstore-level/package.json @@ -56,18 +56,19 @@ "test:firefox": "aegir test -t browser -- --browser firefox", "test:firefox-webworker": "aegir test -t webworker -- --browser firefox", "test:electron-main": "aegir test -t electron-main", - "dep-check": "aegir dep-check" + "dep-check": "aegir dep-check", + "release": "aegir release" }, "dependencies": { - "blockstore-core": "5.0.0", + "blockstore-core": "^5.0.0", "interface-blockstore": "^5.0.0", - "interface-store": "6.0.0", + "interface-store": "^6.0.0", "level": "^8.0.1", - "multiformats": "^13.0.1" + "multiformats": "^13.2.2" }, "devDependencies": { - "aegir": "^42.2.3", - "interface-blockstore-tests": "7.0.0", + "aegir": "^44.1.0", + "interface-blockstore-tests": "^7.0.0", "ipfs-utils": "^9.0.14", "memory-level": "^1.0.0" } diff --git a/packages/blockstore-s3/README.md b/packages/blockstore-s3/README.md index fa1f519e..9e36a0e3 100644 --- a/packages/blockstore-s3/README.md +++ b/packages/blockstore-s3/README.md @@ -9,6 +9,21 @@ # About + + A Blockstore implementation that stores blocks on Amazon S3. ## Example - Quickstart @@ -50,7 +65,7 @@ $ npm i blockstore-s3 ## Browser ` @@ -64,8 +79,8 @@ Loading this module through a script tag will make it's exports available as `Bl Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/js-stores/blob/main/packages/blockstore-s3/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/ipfs/js-stores/blob/main/packages/blockstore-s3/LICENSE-MIT) / ) # Contribute diff --git a/packages/blockstore-s3/package.json b/packages/blockstore-s3/package.json index 9a0315f5..7d50865a 100644 --- a/packages/blockstore-s3/package.json +++ b/packages/blockstore-s3/package.json @@ -54,22 +54,23 @@ "test:firefox": "aegir test -t browser -- --browser firefox", "test:firefox-webworker": "aegir test -t webworker -- --browser firefox", "test:electron-main": "aegir test -t electron-main", - "dep-check": "aegir dep-check" + "dep-check": "aegir dep-check", + "release": "aegir release" }, "dependencies": { - "@aws-sdk/client-s3": "^3.511.0", - "blockstore-core": "5.0.0", + "@aws-sdk/client-s3": "^3.622.0", + "blockstore-core": "^5.0.0", "interface-blockstore": "^5.0.0", - "interface-store": "6.0.0", - "it-to-buffer": "^4.0.5", - "multiformats": "^13.0.1", - "uint8arrays": "^5.0.2" + "interface-store": "^6.0.0", + "it-to-buffer": "^4.0.7", + "multiformats": "^13.2.2", + "uint8arrays": "^5.1.0" }, "devDependencies": { "@types/sinon": "^17.0.3", - "aegir": "^42.2.3", - "interface-blockstore-tests": "7.0.0", - "p-defer": "^4.0.0", + "aegir": "^44.1.0", + "interface-blockstore-tests": "^7.0.0", + "p-defer": "^4.0.1", "sinon": "^18.0.0" } } diff --git a/packages/blockstore-s3/src/index.ts b/packages/blockstore-s3/src/index.ts index f858e18f..5febb515 100644 --- a/packages/blockstore-s3/src/index.ts +++ b/packages/blockstore-s3/src/index.ts @@ -220,7 +220,7 @@ export class S3Blockstore extends BaseBlockstore { return } - if (data == null || data.Contents == null) { + if (data?.Contents == null) { throw new Error('Not found') } diff --git a/packages/blockstore-s3/test/utils/s3-mock.ts b/packages/blockstore-s3/test/utils/s3-mock.ts index 1b4aadd5..06118f5c 100644 --- a/packages/blockstore-s3/test/utils/s3-mock.ts +++ b/packages/blockstore-s3/test/utils/s3-mock.ts @@ -17,11 +17,11 @@ export class S3Error extends Error { } } -export const s3Resolve = (res?: any): any => { +export function s3Resolve (res?: any): any { return Promise.resolve(res) } -export const s3Reject = (err: T): any => { +export function s3Reject (err: Error): any { return Promise.reject(err) } diff --git a/packages/datastore-core/README.md b/packages/datastore-core/README.md index 66a1aa0f..e9dec9aa 100644 --- a/packages/datastore-core/README.md +++ b/packages/datastore-core/README.md @@ -9,6 +9,21 @@ # About + + Various Datastore implementations are available. ## Implementations @@ -76,7 +91,7 @@ $ npm i datastore-core ## Browser ` @@ -90,8 +105,8 @@ Loading this module through a script tag will make it's exports available as `Da Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/js-stores/blob/main/packages/datastore-core/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/ipfs/js-stores/blob/main/packages/datastore-core/LICENSE-MIT) / ) # Contribute diff --git a/packages/datastore-core/package.json b/packages/datastore-core/package.json index 6d9d7916..cad5d81f 100644 --- a/packages/datastore-core/package.json +++ b/packages/datastore-core/package.json @@ -110,25 +110,26 @@ "test:firefox": "aegir test -t browser -- --browser firefox", "test:firefox-webworker": "aegir test -t webworker -- --browser firefox", "test:electron-main": "aegir test -t electron-main", - "dep-check": "aegir dep-check" + "dep-check": "aegir dep-check", + "release": "aegir release" }, "dependencies": { - "@libp2p/logger": "^4.0.6", + "@libp2p/logger": "^4.0.19", "interface-datastore": "^8.0.0", - "interface-store": "6.0.0", - "it-drain": "^3.0.5", - "it-filter": "^3.0.4", - "it-map": "^3.0.5", - "it-merge": "^3.0.3", + "interface-store": "^6.0.0", + "it-drain": "^3.0.7", + "it-filter": "^3.1.1", + "it-map": "^3.1.1", + "it-merge": "^3.0.5", "it-pipe": "^3.0.1", "it-pushable": "^3.2.3", - "it-sort": "^3.0.4", - "it-take": "^3.0.4" + "it-sort": "^3.0.6", + "it-take": "^3.0.6" }, "devDependencies": { - "aegir": "^42.2.3", - "interface-datastore-tests": "6.0.0", - "it-all": "^3.0.4", - "uint8arrays": "^5.0.2" + "aegir": "^44.1.0", + "interface-datastore-tests": "^6.0.0", + "it-all": "^3.0.6", + "uint8arrays": "^5.1.0" } } diff --git a/packages/datastore-fs/README.md b/packages/datastore-fs/README.md index 04454a72..30a6c67a 100644 --- a/packages/datastore-fs/README.md +++ b/packages/datastore-fs/README.md @@ -9,6 +9,21 @@ # About + + A Datastore implementation with a file system backend. ## Example @@ -33,8 +48,8 @@ $ npm i datastore-fs Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/js-stores/blob/main/packages/datastore-fs/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/ipfs/js-stores/blob/main/packages/datastore-fs/LICENSE-MIT) / ) # Contribute diff --git a/packages/datastore-fs/package.json b/packages/datastore-fs/package.json index 26fbd138..301e5abf 100644 --- a/packages/datastore-fs/package.json +++ b/packages/datastore-fs/package.json @@ -48,25 +48,24 @@ "clean": "aegir clean", "lint": "aegir lint", "build": "aegir build --bundle false", - "release": "aegir release", "test": "aegir test -t node -t electron-main", "test:node": "aegir test -t node", "test:electron-main": "aegir test -t electron-main", - "dep-check": "aegir dep-check" + "dep-check": "aegir dep-check", + "release": "aegir release" }, "dependencies": { - "datastore-core": "10.0.0", + "datastore-core": "^10.0.0", "fast-write-atomic": "^0.2.1", "interface-datastore": "^8.0.0", - "interface-store": "6.0.0", + "interface-store": "^6.0.0", "it-glob": "^3.0.1", - "it-map": "^3.0.5", - "it-parallel-batch": "^3.0.4" + "it-map": "^3.1.1", + "it-parallel-batch": "^3.0.6" }, "devDependencies": { - "@types/mkdirp": "^2.0.0", - "aegir": "^42.2.3", - "interface-datastore-tests": "6.0.0", + "aegir": "^44.1.0", + "interface-datastore-tests": "^6.0.0", "ipfs-utils": "^9.0.14" } } diff --git a/packages/datastore-idb/README.md b/packages/datastore-idb/README.md index 68c97a86..ebbb5f33 100644 --- a/packages/datastore-idb/README.md +++ b/packages/datastore-idb/README.md @@ -9,6 +9,21 @@ # About + + A Datastore implementation for browsers that stores data in [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API). ## Example @@ -27,7 +42,7 @@ $ npm i datastore-idb ## Browser ` @@ -41,8 +56,8 @@ Loading this module through a script tag will make it's exports available as `Da Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/js-stores/blob/main/packages/datastore-idb/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/ipfs/js-stores/blob/main/packages/datastore-idb/LICENSE-MIT) / ) # Contribute diff --git a/packages/datastore-idb/package.json b/packages/datastore-idb/package.json index 4296ab7f..d24f2dac 100644 --- a/packages/datastore-idb/package.json +++ b/packages/datastore-idb/package.json @@ -54,19 +54,19 @@ "test:webworker": "aegir test -t webworker", "build": "aegir build", "lint": "aegir lint", - "release": "aegir release", - "dep-check": "aegir dep-check" + "dep-check": "aegir dep-check", + "release": "aegir release" }, "dependencies": { - "datastore-core": "10.0.0", + "datastore-core": "^10.0.0", "idb": "^8.0.0", "interface-datastore": "^8.0.0", - "interface-store": "6.0.0", - "it-filter": "^3.0.4", - "it-sort": "^3.0.4" + "interface-store": "^6.0.0", + "it-filter": "^3.1.1", + "it-sort": "^3.0.6" }, "devDependencies": { - "aegir": "^42.2.3", - "interface-datastore-tests": "6.0.0" + "aegir": "^44.1.0", + "interface-datastore-tests": "^6.0.0" } } diff --git a/packages/datastore-idb/tsconfig.json b/packages/datastore-idb/tsconfig.json index 58cae45c..e30932c0 100644 --- a/packages/datastore-idb/tsconfig.json +++ b/packages/datastore-idb/tsconfig.json @@ -16,6 +16,9 @@ }, { "path": "../interface-datastore-tests" + }, + { + "path": "../interface-store" } ] } diff --git a/packages/datastore-level/README.md b/packages/datastore-level/README.md index 938cab76..07a6c85e 100644 --- a/packages/datastore-level/README.md +++ b/packages/datastore-level/README.md @@ -9,6 +9,21 @@ # About + + A Datastore implementation that uses a flavour of [Level](https://leveljs.org/) as a backend. This module is targetted at Node.js. It is possible to use it in a browser but you should probably use IDBDatastore instead. @@ -59,7 +74,7 @@ $ npm i datastore-level ## Browser ` @@ -73,8 +88,8 @@ Loading this module through a script tag will make it's exports available as `Da Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/js-stores/blob/main/packages/datastore-level/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/ipfs/js-stores/blob/main/packages/datastore-level/LICENSE-MIT) / ) # Contribute diff --git a/packages/datastore-level/package.json b/packages/datastore-level/package.json index e671ce1b..2561790b 100644 --- a/packages/datastore-level/package.json +++ b/packages/datastore-level/package.json @@ -50,7 +50,6 @@ "clean": "aegir clean", "lint": "aegir lint", "build": "aegir build", - "release": "aegir release", "test": "aegir test", "test:node": "aegir test -t node --cov", "test:chrome": "aegir test -t browser --cov", @@ -58,21 +57,22 @@ "test:firefox": "aegir test -t browser -- --browser firefox", "test:firefox-webworker": "aegir test -t webworker -- --browser firefox", "test:electron-main": "aegir test -t electron-main", - "dep-check": "aegir dep-check" + "dep-check": "aegir dep-check", + "release": "aegir release" }, "dependencies": { - "datastore-core": "10.0.0", + "datastore-core": "^10.0.0", "interface-datastore": "^8.0.0", - "interface-store": "6.0.0", - "it-filter": "^3.0.4", - "it-map": "^3.0.5", - "it-sort": "^3.0.4", - "it-take": "^3.0.4", + "interface-store": "^6.0.0", + "it-filter": "^3.1.1", + "it-map": "^3.1.1", + "it-sort": "^3.0.6", + "it-take": "^3.0.6", "level": "^8.0.1" }, "devDependencies": { - "aegir": "^42.2.3", - "interface-datastore-tests": "6.0.0", + "aegir": "^44.1.0", + "interface-datastore-tests": "^6.0.0", "ipfs-utils": "^9.0.14", "memory-level": "^1.0.0" } diff --git a/packages/datastore-level/tsconfig.json b/packages/datastore-level/tsconfig.json index 031d7aae..8bae2503 100644 --- a/packages/datastore-level/tsconfig.json +++ b/packages/datastore-level/tsconfig.json @@ -16,6 +16,9 @@ }, { "path": "../interface-datastore-tests" + }, + { + "path": "../interface-store" } ] } diff --git a/packages/datastore-s3/README.md b/packages/datastore-s3/README.md index 2abdac48..49493922 100644 --- a/packages/datastore-s3/README.md +++ b/packages/datastore-s3/README.md @@ -9,6 +9,21 @@ # About + + A Datastore implementation that stores data on Amazon S3. ## Example - Quickstart @@ -50,7 +65,7 @@ $ npm i datastore-s3 ## Browser ` @@ -64,8 +79,8 @@ Loading this module through a script tag will make it's exports available as `Da Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/js-stores/blob/main/packages/datastore-s3/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/ipfs/js-stores/blob/main/packages/datastore-s3/LICENSE-MIT) / ) # Contribute diff --git a/packages/datastore-s3/package.json b/packages/datastore-s3/package.json index ed256640..89e5c080 100644 --- a/packages/datastore-s3/package.json +++ b/packages/datastore-s3/package.json @@ -47,7 +47,6 @@ "clean": "aegir clean", "lint": "aegir lint", "build": "aegir build", - "release": "aegir release", "test": "aegir test", "test:node": "aegir test -t node --cov", "test:chrome": "aegir test -t browser --cov", @@ -55,22 +54,23 @@ "test:firefox": "aegir test -t browser -- --browser firefox", "test:firefox-webworker": "aegir test -t webworker -- --browser firefox", "test:electron-main": "aegir test -t electron-main", - "dep-check": "aegir dep-check" + "dep-check": "aegir dep-check", + "release": "aegir release" }, "dependencies": { - "@aws-sdk/client-s3": "^3.511.0", - "datastore-core": "10.0.0", + "@aws-sdk/client-s3": "^3.622.0", + "datastore-core": "^10.0.0", "interface-datastore": "^8.0.0", - "interface-store": "6.0.0", - "it-filter": "^3.0.4", - "it-to-buffer": "^4.0.5", - "uint8arrays": "^5.0.2" + "interface-store": "^6.0.0", + "it-filter": "^3.1.1", + "it-to-buffer": "^4.0.7", + "uint8arrays": "^5.1.0" }, "devDependencies": { "@types/sinon": "^17.0.3", - "aegir": "^42.2.3", - "interface-datastore-tests": "6.0.0", - "p-defer": "^4.0.0", + "aegir": "^44.1.0", + "interface-datastore-tests": "^6.0.0", + "p-defer": "^4.0.1", "sinon": "^18.0.0" } } diff --git a/packages/datastore-s3/src/index.ts b/packages/datastore-s3/src/index.ts index cdd6d1d1..906b0e6f 100644 --- a/packages/datastore-s3/src/index.ts +++ b/packages/datastore-s3/src/index.ts @@ -233,7 +233,7 @@ export class S3Datastore extends BaseDatastore { return } - if (data == null || data.Contents == null) { + if (data?.Contents == null) { throw new Error('Not found') } diff --git a/packages/datastore-s3/test/utils/s3-mock.ts b/packages/datastore-s3/test/utils/s3-mock.ts index f49ea81a..6b11726f 100644 --- a/packages/datastore-s3/test/utils/s3-mock.ts +++ b/packages/datastore-s3/test/utils/s3-mock.ts @@ -17,11 +17,11 @@ export class S3Error extends Error { } } -export const s3Resolve = (res?: any): any => { +export function s3Resolve (res?: any): any { return Promise.resolve(res) } -export const s3Reject = (err: T): any => { +export function s3Reject (err: Error): any { return Promise.reject(err) } diff --git a/packages/interface-blockstore-tests/README.md b/packages/interface-blockstore-tests/README.md index a8bfbdb8..b636423b 100644 --- a/packages/interface-blockstore-tests/README.md +++ b/packages/interface-blockstore-tests/README.md @@ -9,6 +9,21 @@ # About + + A test suite that ensures a given implementation implements the Blockstore interface properly. ## Example @@ -43,8 +58,8 @@ $ npm i interface-blockstore-tests Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/js-stores/blob/main/packages/interface-blockstore-tests/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/ipfs/js-stores/blob/main/packages/interface-blockstore-tests/LICENSE-MIT) / ) # Contribute diff --git a/packages/interface-blockstore-tests/package.json b/packages/interface-blockstore-tests/package.json index 88e9d106..30737a96 100644 --- a/packages/interface-blockstore-tests/package.json +++ b/packages/interface-blockstore-tests/package.json @@ -51,12 +51,12 @@ }, "dependencies": { "interface-blockstore": "^5.0.0", - "it-all": "^3.0.4", - "it-drain": "^3.0.5", - "multiformats": "^13.0.1", - "uint8arrays": "^5.0.2" + "it-all": "^3.0.6", + "it-drain": "^3.0.7", + "multiformats": "^13.2.2", + "uint8arrays": "^5.1.0" }, "devDependencies": { - "aegir": "^42.2.3" + "aegir": "^44.1.0" } } diff --git a/packages/interface-blockstore/README.md b/packages/interface-blockstore/README.md index b8980909..cc0428ec 100644 --- a/packages/interface-blockstore/README.md +++ b/packages/interface-blockstore/README.md @@ -9,6 +9,21 @@ # About + + A Blockstore is a key/value database that lets use CIDs to store/retrieve binary blobs. It is used by IPFS to store/retrieve the block that a given CID resolves to. @@ -35,8 +50,8 @@ $ npm i interface-blockstore Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/js-stores/blob/main/packages/interface-blockstore/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/ipfs/js-stores/blob/main/packages/interface-blockstore/LICENSE-MIT) / ) # Contribute diff --git a/packages/interface-blockstore/package.json b/packages/interface-blockstore/package.json index 4d7d9033..73f4a223 100644 --- a/packages/interface-blockstore/package.json +++ b/packages/interface-blockstore/package.json @@ -43,10 +43,10 @@ "release": "aegir release" }, "dependencies": { - "interface-store": "6.0.0", - "multiformats": "^13.0.1" + "interface-store": "^6.0.0", + "multiformats": "^13.2.2" }, "devDependencies": { - "aegir": "^42.2.3" + "aegir": "^44.1.0" } } diff --git a/packages/interface-datastore-tests/README.md b/packages/interface-datastore-tests/README.md index 649f63fb..6a82a0dc 100644 --- a/packages/interface-datastore-tests/README.md +++ b/packages/interface-datastore-tests/README.md @@ -9,6 +9,21 @@ # About + + A test suite that ensures a given implementation implements the Datastore interface properly. ## Example @@ -43,8 +58,8 @@ $ npm i interface-datastore-tests Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/js-stores/blob/main/packages/interface-datastore-tests/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/ipfs/js-stores/blob/main/packages/interface-datastore-tests/LICENSE-MIT) / ) # Contribute diff --git a/packages/interface-datastore-tests/package.json b/packages/interface-datastore-tests/package.json index bfb55814..0011c655 100644 --- a/packages/interface-datastore-tests/package.json +++ b/packages/interface-datastore-tests/package.json @@ -52,12 +52,12 @@ "dependencies": { "interface-datastore": "^8.0.0", "iso-random-stream": "^2.0.2", - "it-all": "^3.0.4", - "it-drain": "^3.0.5", - "it-length": "^3.0.4", - "uint8arrays": "^5.0.2" + "it-all": "^3.0.6", + "it-drain": "^3.0.7", + "it-length": "^3.0.6", + "uint8arrays": "^5.1.0" }, "devDependencies": { - "aegir": "^42.2.3" + "aegir": "^44.1.0" } } diff --git a/packages/interface-datastore/README.md b/packages/interface-datastore/README.md index 48062c9c..748222a1 100644 --- a/packages/interface-datastore/README.md +++ b/packages/interface-datastore/README.md @@ -9,6 +9,21 @@ # About + + A Datastore is a key/value database that lets store/retrieve binary blobs using namespaced Keys. It is used by IPFS to store/retrieve arbitrary metadata needed to run the node - DHT provider records, signed peer records, etc. @@ -111,7 +126,7 @@ $ npm i interface-datastore ## Browser ` @@ -125,8 +140,8 @@ Loading this module through a script tag will make it's exports available as `In Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/js-stores/blob/main/packages/interface-datastore/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/ipfs/js-stores/blob/main/packages/interface-datastore/LICENSE-MIT) / ) # Contribute diff --git a/packages/interface-datastore/package.json b/packages/interface-datastore/package.json index a8142d9b..b0ab963a 100644 --- a/packages/interface-datastore/package.json +++ b/packages/interface-datastore/package.json @@ -76,10 +76,10 @@ "release": "aegir release" }, "dependencies": { - "interface-store": "6.0.0", - "uint8arrays": "^5.0.2" + "interface-store": "^6.0.0", + "uint8arrays": "^5.1.0" }, "devDependencies": { - "aegir": "^42.2.3" + "aegir": "^44.1.0" } } diff --git a/packages/interface-store/README.md b/packages/interface-store/README.md index 2f152391..52fa8d03 100644 --- a/packages/interface-store/README.md +++ b/packages/interface-store/README.md @@ -9,6 +9,21 @@ # About + + An abstraction of the Datastore/Blockstore codebases. # Install @@ -25,8 +40,8 @@ $ npm i interface-store Licensed under either of -- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) -- MIT ([LICENSE-MIT](LICENSE-MIT) / ) +- Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/js-stores/blob/main/packages/interface-store/LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](https://github.com/ipfs/js-stores/blob/main/packages/interface-store/LICENSE-MIT) / ) # Contribute diff --git a/packages/interface-store/package.json b/packages/interface-store/package.json index 545d08e6..ff4977ac 100644 --- a/packages/interface-store/package.json +++ b/packages/interface-store/package.json @@ -51,10 +51,10 @@ "build": "aegir build", "lint": "aegir lint", "clean": "aegir clean", - "release": "aegir release", - "dep-check": "aegir dep-check" + "dep-check": "aegir dep-check", + "release": "aegir release" }, "devDependencies": { - "aegir": "^42.2.3" + "aegir": "^44.1.0" } }