From 0aa0944d42798d1f6fd589e8a58de7d791760644 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 10:29:27 +0000 Subject: [PATCH 01/45] deps(dev): bump aegir from 40.0.13 to 41.1.9 (#268) Bumps [aegir](https://github.com/ipfs/aegir) from 40.0.13 to 41.1.9. - [Release notes](https://github.com/ipfs/aegir/releases) - [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md) - [Commits](https://github.com/ipfs/aegir/compare/v40.0.13...v41.1.9) --- updated-dependencies: - dependency-name: aegir dependency-type: direct:development update-type: version-update:semver-major ... --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: achingbrain --- .github/workflows/semantic-pull-request.yml | 12 ++ README.md | 22 +-- package.json | 2 +- packages/blockstore-core/README.md | 91 +----------- packages/blockstore-core/package.json | 3 +- packages/blockstore-core/src/index.ts | 69 +++++++++ packages/blockstore-core/test/memory.spec.ts | 2 +- packages/blockstore-fs/README.md | 26 +--- packages/blockstore-fs/package.json | 6 +- packages/blockstore-fs/src/index.ts | 14 ++ packages/blockstore-fs/src/sharding.ts | 4 +- packages/blockstore-fs/test/index.spec.ts | 10 +- packages/blockstore-idb/README.md | 28 ++-- packages/blockstore-idb/package.json | 3 +- packages/blockstore-idb/src/index.ts | 14 ++ packages/blockstore-level/README.md | 30 ++-- packages/blockstore-level/package.json | 3 +- packages/blockstore-level/src/index.ts | 16 ++ packages/blockstore-s3/README.md | 63 ++++---- packages/blockstore-s3/package.json | 3 +- packages/blockstore-s3/src/index.ts | 27 ++++ packages/blockstore-s3/src/sharding.ts | 4 +- packages/blockstore-s3/test/index.spec.ts | 2 +- packages/datastore-core/README.md | 94 +----------- packages/datastore-core/package.json | 3 +- packages/datastore-core/src/index.ts | 71 ++++++++- packages/datastore-fs/README.md | 30 ++-- packages/datastore-fs/package.json | 3 +- packages/datastore-fs/src/index.ts | 14 ++ packages/datastore-idb/README.md | 28 ++-- packages/datastore-idb/package.json | 6 +- packages/datastore-idb/src/index.ts | 14 ++ packages/datastore-level/README.md | 53 +++---- packages/datastore-level/package.json | 3 +- packages/datastore-level/src/index.ts | 52 ++++++- packages/datastore-s3/README.md | 57 +++---- packages/datastore-s3/package.json | 3 +- packages/datastore-s3/src/index.ts | 25 ++++ packages/interface-blockstore-tests/README.md | 30 ++-- .../interface-blockstore-tests/package.json | 3 +- .../interface-blockstore-tests/src/index.ts | 28 +++- packages/interface-blockstore/README.md | 28 ++-- packages/interface-blockstore/package.json | 3 +- packages/interface-blockstore/src/index.ts | 18 ++- packages/interface-datastore-tests/README.md | 30 ++-- .../interface-datastore-tests/package.json | 3 +- .../interface-datastore-tests/src/index.ts | 28 +++- packages/interface-datastore/README.md | 139 +----------------- packages/interface-datastore/package.json | 3 +- packages/interface-datastore/src/index.ts | 110 +++++++++++++- packages/interface-store/README.md | 17 +-- packages/interface-store/package.json | 7 +- packages/interface-store/src/index.ts | 26 ++-- packages/interface-store/typedoc.json | 5 + 54 files changed, 760 insertions(+), 628 deletions(-) create mode 100644 .github/workflows/semantic-pull-request.yml create mode 100644 packages/interface-store/typedoc.json diff --git a/.github/workflows/semantic-pull-request.yml b/.github/workflows/semantic-pull-request.yml new file mode 100644 index 00000000..bd00f090 --- /dev/null +++ b/.github/workflows/semantic-pull-request.yml @@ -0,0 +1,12 @@ +name: Semantic PR + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +jobs: + main: + uses: pl-strflt/.github/.github/workflows/reusable-semantic-pull-request.yml@v0.3 diff --git a/README.md b/README.md index c55056f4..9e796f7b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -# stores - [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-stores.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-stores) @@ -7,15 +5,7 @@ > Blockstores and datastores used by IP-JS internals -## Table of contents - -- [Structure](#structure) -- [Packages](#packages) -- [API Docs](#api-docs) -- [License](#license) -- [Contribute](#contribute) - -## Structure +# 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 @@ -33,22 +23,18 @@ - [`/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 - -See the [./packages](./packages) directory for the various interfaces. - -## API Docs +# API Docs - -## License +# License Licensed under either of - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) - MIT ([LICENSE-MIT](LICENSE-MIT) / ) -## Contribute +# Contribute Contributions welcome! Please check out [the issues](https://github.com/ipfs/js-stores/issues). diff --git a/package.json b/package.json index 25e5f8b1..1283763c 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "release": "npm run docs:no-publish && aegir run release && npm run docs" }, "devDependencies": { - "aegir": "^40.0.8" + "aegir": "^41.1.9" }, "workspaces": [ "packages/*" diff --git a/packages/blockstore-core/README.md b/packages/blockstore-core/README.md index f55d6b17..8ab2013a 100644 --- a/packages/blockstore-core/README.md +++ b/packages/blockstore-core/README.md @@ -1,5 +1,3 @@ -# blockstore-core - [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-stores.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-stores) @@ -7,27 +5,13 @@ > Contains various implementations of the API contract described in interface-blockstore -## Table of contents - -- [Install](#install) - - [Browser ` ``` -## Implementations - -- Base: [`src/base`](src/base.ts) -- Memory: [`src/memory`](src/memory.ts) -- BlackHole: ['src/black-hole](src/black-hole.ts) -- Tiered: ['src/tiered](src/tiered.ts) - -## Usage - -### BaseBlockstore - -Provides a complete implementation of the Blockstore interface. You must implement `.get`, `.put`, etc. - -```js -import { BaseBlockstore } from 'blockstore-core/base' - -class MyCustomBlockstore extends BaseBlockstore { - put (key, val, options) { - // store a block - } - - get (key, options) { - // retrieve a block - } - - // ...etc -} -``` - -### MemoryBlockstore - -A simple Blockstore that stores blocks in memory. - -```js -import { MemoryBlockstore } from 'blockstore-core/memory' - -const store = new MemoryBlockstore() -``` - -### BlackHoleBlockstore - -A Blockstore that does not store any blocks. - -```js -import { BlackHoleBlockstore } from 'blockstore-core/black-hole' - -const store = new BlackHoleBlockstore() -``` - -### TieredBlockstore - -A tiered blockstore wraps one or more blockstores and will query each in parallel to retrieve a block - the operation will succeed if any wrapped store has the block. - -Writes are invoked on all wrapped blockstores. - -```js -import { TieredBlockstore } from 'blockstore-core/tiered' - -const store = new TieredBlockstore([ - store1, - store2, - // ...etc -]) -``` - -## API Docs +# API Docs - -## License +# License Licensed under either of - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) - MIT ([LICENSE-MIT](LICENSE-MIT) / ) -## Contribute +# Contribute Contributions welcome! Please check out [the issues](https://github.com/ipfs/js-stores/issues). diff --git a/packages/blockstore-core/package.json b/packages/blockstore-core/package.json index 597f67e2..eea19605 100644 --- a/packages/blockstore-core/package.json +++ b/packages/blockstore-core/package.json @@ -71,6 +71,7 @@ "eslintConfig": { "extends": "ipfs", "parserOptions": { + "project": true, "sourceType": "module" } }, @@ -186,7 +187,7 @@ "uint8arrays": "^4.0.2" }, "devDependencies": { - "aegir": "^40.0.8", + "aegir": "^41.1.9", "interface-blockstore-tests": "^6.0.0" } } diff --git a/packages/blockstore-core/src/index.ts b/packages/blockstore-core/src/index.ts index 69fa16c8..3e4df1a4 100644 --- a/packages/blockstore-core/src/index.ts +++ b/packages/blockstore-core/src/index.ts @@ -1,3 +1,72 @@ +/** + * @packageDocumentation + * + * Various Blockstore implementations are available. + * + * ## Implementations + * + * - Base: [`src/base`](src/base.ts) + * - Memory: [`src/memory`](src/memory.ts) + * - BlackHole: ['src/black-hole](src/black-hole.ts) + * - Tiered: ['src/tiered](src/tiered.ts) + * + * @example BaseBlockstore + * + * Provides a complete implementation of the Blockstore interface. You must implement `.get`, `.put`, etc. + * + * ```js + * import { BaseBlockstore } from 'blockstore-core/base' + * + * class MyCustomBlockstore extends BaseBlockstore { + * put (key, val, options) { + * // store a block + * } + * + * get (key, options) { + * // retrieve a block + * } + * + * // ...etc + * } + * ``` + * + * @example MemoryBlockstore + * + * A simple Blockstore that stores blocks in memory. + * + * ```js + * import { MemoryBlockstore } from 'blockstore-core/memory' + * + * const store = new MemoryBlockstore() + * ``` + * + * @example BlackHoleBlockstore + * + * A Blockstore that does not store any blocks. + * + * ```js + * import { BlackHoleBlockstore } from 'blockstore-core/black-hole' + * + * const store = new BlackHoleBlockstore() + * ``` + * + * @example TieredBlockstore + * + * A tiered blockstore wraps one or more blockstores and will query each in parallel to retrieve a block - the operation will succeed if any wrapped store has the block. + * + * Writes are invoked on all wrapped blockstores. + * + * ```js + * import { TieredBlockstore } from 'blockstore-core/tiered' + * + * const store = new TieredBlockstore([ + * store1, + * store2, + * // ...etc + * ]) + * ``` + */ + import * as ErrorsImport from './errors.js' export { BaseBlockstore } from './base.js' diff --git a/packages/blockstore-core/test/memory.spec.ts b/packages/blockstore-core/test/memory.spec.ts index d42c548b..0bf49373 100644 --- a/packages/blockstore-core/test/memory.spec.ts +++ b/packages/blockstore-core/test/memory.spec.ts @@ -4,7 +4,7 @@ import { interfaceBlockstoreTests } from 'interface-blockstore-tests' import { MemoryBlockstore } from '../src/memory.js' describe('memory', () => { - describe('interface-datastore', () => { + describe('interface-blockstore', () => { interfaceBlockstoreTests({ setup () { return new MemoryBlockstore() diff --git a/packages/blockstore-fs/README.md b/packages/blockstore-fs/README.md index e46e8afa..f2e27373 100644 --- a/packages/blockstore-fs/README.md +++ b/packages/blockstore-fs/README.md @@ -1,5 +1,3 @@ -# blockstore-fs - [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-stores.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-stores) @@ -7,40 +5,24 @@ > Blockstore implementation with file system backend -## Table of contents - -- [Install](#install) -- [Usage](#usage) -- [API Docs](#api-docs) -- [License](#license) -- [Contribute](#contribute) - -## Install +# Install ```console $ npm i blockstore-fs ``` -## Usage - -```js -import { FsBlockstore } from 'blockstore-fs' - -const store = new FsBlockstore('path/to/store') -``` - -## API Docs +# API Docs - -## License +# License Licensed under either of - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) - MIT ([LICENSE-MIT](LICENSE-MIT) / ) -## Contribute +# Contribute Contributions welcome! Please check out [the issues](https://github.com/ipfs/js-stores/issues). diff --git a/packages/blockstore-fs/package.json b/packages/blockstore-fs/package.json index fc0e3192..a77cc58a 100644 --- a/packages/blockstore-fs/package.json +++ b/packages/blockstore-fs/package.json @@ -55,11 +55,11 @@ "eslintConfig": { "extends": "ipfs", "parserOptions": { - "sourceType": "module", "project": [ "tsconfig.json", "benchmarks/encoding/tsconfig.json" - ] + ], + "sourceType": "module" } }, "release": { @@ -168,7 +168,7 @@ "multiformats": "^12.0.1" }, "devDependencies": { - "aegir": "^40.0.8", + "aegir": "^41.1.9", "interface-blockstore-tests": "^6.0.0" } } diff --git a/packages/blockstore-fs/src/index.ts b/packages/blockstore-fs/src/index.ts index 06471475..c029b0e4 100644 --- a/packages/blockstore-fs/src/index.ts +++ b/packages/blockstore-fs/src/index.ts @@ -1,3 +1,17 @@ +/** + * @packageDocumentation + * + * A Blockstore implementation that stores blocks in the local filesystem. + * + * @example + * + * ```js + * import { FsBlockstore } from 'blockstore-fs' + * + * const store = new FsBlockstore('path/to/store') + * ``` + */ + import fs from 'node:fs/promises' import path from 'node:path' import { promisify } from 'node:util' diff --git a/packages/blockstore-fs/src/sharding.ts b/packages/blockstore-fs/src/sharding.ts index 10d65169..aa6365be 100644 --- a/packages/blockstore-fs/src/sharding.ts +++ b/packages/blockstore-fs/src/sharding.ts @@ -5,8 +5,8 @@ import type { MultibaseCodec } from 'multiformats/bases/interface' export interface ShardingStrategy { extension: string - encode: (cid: CID) => { dir: string, file: string } - decode: (path: string) => CID + encode(cid: CID): { dir: string, file: string } + decode(path: string): CID } export interface NextToLastInit { diff --git a/packages/blockstore-fs/test/index.spec.ts b/packages/blockstore-fs/test/index.spec.ts index 25e0ebc3..696bacbc 100644 --- a/packages/blockstore-fs/test/index.spec.ts +++ b/packages/blockstore-fs/test/index.spec.ts @@ -4,7 +4,7 @@ import os from 'node:os' import path from 'node:path' import { expect } from 'aegir/chai' import { interfaceBlockstoreTests } from 'interface-blockstore-tests' -import { base256emoji } from 'multiformats/bases/base256emoji' +import { base32 } from 'multiformats/bases/base32' import { CID } from 'multiformats/cid' import { FsBlockstore } from '../src/index.js' import { FlatDirectory, NextToLast } from '../src/sharding.js' @@ -84,7 +84,7 @@ describe('FsBlockstore', () => { .with.property('code', 'ERR_NOT_FOUND') }) - describe('interface-datastore (flat directory)', () => { + describe('interface-blockstore (flat directory)', () => { interfaceBlockstoreTests({ setup: async () => { const store = new FsBlockstore(path.join(os.tmpdir(), `test-${Math.random()}`), { @@ -103,7 +103,7 @@ describe('FsBlockstore', () => { }) }) - describe('interface-datastore (default sharding)', () => { + describe('interface-blockstore (default sharding)', () => { interfaceBlockstoreTests({ setup: async () => { const store = new FsBlockstore(path.join(os.tmpdir(), `test-${Math.random()}`)) @@ -120,12 +120,12 @@ describe('FsBlockstore', () => { }) }) - describe('interface-datastore (custom encoding)', () => { + describe('interface-blockstore (custom encoding)', () => { interfaceBlockstoreTests({ setup: async () => { const store = new FsBlockstore(path.join(os.tmpdir(), `test-${Math.random()}`), { shardingStrategy: new NextToLast({ - base: base256emoji + base: base32 }) }) diff --git a/packages/blockstore-idb/README.md b/packages/blockstore-idb/README.md index ecb33d07..5e007576 100644 --- a/packages/blockstore-idb/README.md +++ b/packages/blockstore-idb/README.md @@ -1,5 +1,3 @@ -# blockstore-idb - [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-stores.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-stores) @@ -7,21 +5,25 @@ > Blockstore implementation with IndexedDB backend -## Table of contents +# About + +A Blockstore implementation for browsers that stores blocks in [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API). + +## Example -- [Install](#install) - - [Browser ` ``` -## API Docs +# API Docs - -## License +# License Licensed under either of - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) - MIT ([LICENSE-MIT](LICENSE-MIT) / ) -## Contribute +# Contribute Contributions welcome! Please check out [the issues](https://github.com/ipfs/js-stores/issues). diff --git a/packages/blockstore-idb/package.json b/packages/blockstore-idb/package.json index 2a0222ea..ebc5a805 100644 --- a/packages/blockstore-idb/package.json +++ b/packages/blockstore-idb/package.json @@ -36,6 +36,7 @@ "eslintConfig": { "extends": "ipfs", "parserOptions": { + "project": true, "sourceType": "module" } }, @@ -144,7 +145,7 @@ "multiformats": "^12.0.1" }, "devDependencies": { - "aegir": "^40.0.8", + "aegir": "^41.1.9", "interface-blockstore-tests": "^6.0.0" } } diff --git a/packages/blockstore-idb/src/index.ts b/packages/blockstore-idb/src/index.ts index 8adbe0eb..27b6882b 100644 --- a/packages/blockstore-idb/src/index.ts +++ b/packages/blockstore-idb/src/index.ts @@ -1,3 +1,17 @@ +/** + * @packageDocumentation + * + * A Blockstore implementation for browsers that stores blocks in [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API). + * + * @example + * + * ```js + * import { IDBBlockstore } from 'blockstore-idb' + * + * const store = new IDBBlockstore('path/to/store') + * ``` + */ + import { BaseBlockstore, Errors diff --git a/packages/blockstore-level/README.md b/packages/blockstore-level/README.md index 3372bd47..6434601f 100644 --- a/packages/blockstore-level/README.md +++ b/packages/blockstore-level/README.md @@ -1,5 +1,3 @@ -# blockstore-level - [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-stores.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-stores) @@ -7,21 +5,27 @@ > Blockstore implementation with level(up|down) backend -## Table of contents +# 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. -- [Install](#install) - - [Browser ` ``` -## API Docs +# API Docs - -## License +# License Licensed under either of - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) - MIT ([LICENSE-MIT](LICENSE-MIT) / ) -## Contribute +# Contribute Contributions welcome! Please check out [the issues](https://github.com/ipfs/js-stores/issues). diff --git a/packages/blockstore-level/package.json b/packages/blockstore-level/package.json index 92ce2ecd..bfd11484 100644 --- a/packages/blockstore-level/package.json +++ b/packages/blockstore-level/package.json @@ -37,6 +37,7 @@ "eslintConfig": { "extends": "ipfs", "parserOptions": { + "project": true, "sourceType": "module" } }, @@ -147,7 +148,7 @@ "multiformats": "^12.0.1" }, "devDependencies": { - "aegir": "^40.0.8", + "aegir": "^41.1.9", "interface-blockstore-tests": "^6.0.0", "ipfs-utils": "^9.0.4", "memory-level": "^1.0.0" diff --git a/packages/blockstore-level/src/index.ts b/packages/blockstore-level/src/index.ts index 4748dda1..22ac0ab5 100644 --- a/packages/blockstore-level/src/index.ts +++ b/packages/blockstore-level/src/index.ts @@ -1,3 +1,19 @@ +/** + * @packageDocumentation + * + * 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. + * + * @example + * + * ```js + * import { LevelBlockstore } from 'blockstore-level' + * + * const store = new LevelBlockstore('path/to/store') + * ``` + */ + import { BaseBlockstore, Errors } from 'blockstore-core' import { Level } from 'level' import { base32upper } from 'multiformats/bases/base32' diff --git a/packages/blockstore-s3/README.md b/packages/blockstore-s3/README.md index 50e16998..c57f45e6 100644 --- a/packages/blockstore-s3/README.md +++ b/packages/blockstore-s3/README.md @@ -1,5 +1,3 @@ -# blockstore-s3 - [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-stores.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-stores) @@ -7,66 +5,59 @@ > IPFS blockstore implementation backed by s3 -## Table of contents - -- [Install](#install) - - [Browser ` -``` +A Blockstore implementation that stores blocks on Amazon S3. -## Usage +## Example - Quickstart -If the flag `createIfMissing` is not set or is false, then the bucket must be created prior to using datastore-s3. Please see the AWS docs for information on how to configure the S3 instance. A bucket name is required to be set at the s3 instance level, see the below example. +If the flag `createIfMissing` is not set or is false, then the bucket must be created prior to using blockstore-s3. Please see the AWS docs for information on how to configure the S3 instance. A bucket name is required to be set at the s3 instance level, see the below example. ```js import S3 from 'aws-sdk/clients/s3.js' -import { S3Datastore } from 'datastore-s3' +import { S3Blockstore } from 'blockstore-s3' const s3Instance = new S3({ params: { Bucket: 'my-ipfs-bucket' } }) -const store = new S3Datastore('.ipfs/datastore', { +const store = new S3Blockstore('.ipfs/datastore', { s3: s3Instance createIfMissing: false }) ``` -### Create a Repo +## Example -See [examples/full-s3-repo](./examples/full-s3-repo) for how to quickly create an S3 backed repo using the `createRepo` convenience function. +```ts +Using with Helia -### Examples +See [examples/helia](./examples/helia) for a full example of how to use Helia with an S3 backed blockstore. +``` + +# Install + +```console +$ npm i blockstore-s3 +``` -You can see examples of S3 backed ipfs in the [examples folder](examples/) +## Browser ` +``` -## API Docs +# API Docs - -## License +# License Licensed under either of - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) - MIT ([LICENSE-MIT](LICENSE-MIT) / ) -## Contribute +# Contribute Contributions welcome! Please check out [the issues](https://github.com/ipfs/js-stores/issues). diff --git a/packages/blockstore-s3/package.json b/packages/blockstore-s3/package.json index a22d3b7a..ea5bad84 100644 --- a/packages/blockstore-s3/package.json +++ b/packages/blockstore-s3/package.json @@ -35,6 +35,7 @@ "eslintConfig": { "extends": "ipfs", "parserOptions": { + "project": true, "sourceType": "module" } }, @@ -148,7 +149,7 @@ }, "devDependencies": { "@types/sinon": "^10.0.15", - "aegir": "^40.0.8", + "aegir": "^41.1.9", "interface-blockstore-tests": "^6.0.0", "p-defer": "^4.0.0", "sinon": "^15.0.2" diff --git a/packages/blockstore-s3/src/index.ts b/packages/blockstore-s3/src/index.ts index 0444d4d3..4757866f 100644 --- a/packages/blockstore-s3/src/index.ts +++ b/packages/blockstore-s3/src/index.ts @@ -1,3 +1,28 @@ +/** + * @packageDocumentation + * + * A Blockstore implementation that stores blocks on Amazon S3. + * + * @example Quickstart + * + * If the flag `createIfMissing` is not set or is false, then the bucket must be created prior to using blockstore-s3. Please see the AWS docs for information on how to configure the S3 instance. A bucket name is required to be set at the s3 instance level, see the below example. + * + * ```js + * import S3 from 'aws-sdk/clients/s3.js' + * import { S3Blockstore } from 'blockstore-s3' + * + * const s3Instance = new S3({ params: { Bucket: 'my-ipfs-bucket' } }) + * const store = new S3Blockstore('.ipfs/datastore', { + * s3: s3Instance + * createIfMissing: false + * }) + * ``` + * + * @example Using with Helia + * + * See [examples/helia](./examples/helia) for a full example of how to use Helia with an S3 backed blockstore. + */ + import { PutObjectCommand, CreateBucketCommand, @@ -16,6 +41,8 @@ import type { Pair } from 'interface-blockstore' import type { AbortOptions } from 'interface-store' import type { CID } from 'multiformats/cid' +export type { ShardingStrategy } + export interface S3BlockstoreInit { /** * Whether to try to create the bucket if it is missing when `.open` is called diff --git a/packages/blockstore-s3/src/sharding.ts b/packages/blockstore-s3/src/sharding.ts index ef086143..b3cd23ac 100644 --- a/packages/blockstore-s3/src/sharding.ts +++ b/packages/blockstore-s3/src/sharding.ts @@ -4,8 +4,8 @@ import type { MultibaseCodec } from 'multiformats/bases/interface' export interface ShardingStrategy { extension: string - encode: (cid: CID) => string - decode: (path: string) => CID + encode(cid: CID): string + decode(path: string): CID } export interface NextToLastInit { diff --git a/packages/blockstore-s3/test/index.spec.ts b/packages/blockstore-s3/test/index.spec.ts index 7c537d9e..7e849e17 100644 --- a/packages/blockstore-s3/test/index.spec.ts +++ b/packages/blockstore-s3/test/index.spec.ts @@ -169,7 +169,7 @@ describe('S3Blockstore', () => { }) }) - describe('interface-datastore', () => { + describe('interface-blockstore', () => { interfaceBlockstoreTests({ setup () { const s3 = s3Mock(new S3({ region: 'REGION' })) diff --git a/packages/datastore-core/README.md b/packages/datastore-core/README.md index b794d97b..03229227 100644 --- a/packages/datastore-core/README.md +++ b/packages/datastore-core/README.md @@ -1,5 +1,3 @@ -# datastore-core - [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-stores.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-stores) @@ -7,27 +5,13 @@ > Wrapper implementation for interface-datastore -## Table of contents - -- [Install](#install) - - [Browser ` ``` -## Implementations - -- Wrapper Implementations - - Mount: [`src/mount`](src/mount.ts) - - Keytransform: [`src/keytransform`](src/keytransform.ts) - - Sharding: [`src/sharding`](src/sharding.ts) - - Tiered: [`src/tiered`](src/tirered.ts) - - Namespace: [`src/namespace`](src/namespace.ts) - - BlackHole: [`src/black-hole`](src/black-hole.ts) - -## Usage - -### BaseDatastore - -An base store is made available to make implementing your own datastore easier: - -```javascript -import { BaseDatastore } from 'datastore-core' - -class MyDatastore extends BaseDatastore { - constructor () { - super() - } - - async put (key, val) { - // your implementation here - } - - async get (key) { - // your implementation here - } - - // etc... -} -``` - -See the [MemoryDatastore](./src/memory.js) for an example of how it is used. - -### Wrapping Stores - -```js -import { Key } from 'interface-datastore' -import { - MemoryStore, - MountStore -} from 'datastore-core' - -const store = new MountStore({prefix: new Key('/a'), datastore: new MemoryStore()}) -``` - -### BlackHoleDatastore - -A datastore that does not store any data. - -```js -import { BlackHoleDatastore } from 'datastore-core/black-hole' - -const store = new BlackHoleDatastore() -``` - -## Contribute - -Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/js-ipfs-unixfs-importer/issues)! - -This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). - -[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md) - -## API Docs +# API Docs - -## License +# License Licensed under either of - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) - MIT ([LICENSE-MIT](LICENSE-MIT) / ) -## Contribute +# Contribute Contributions welcome! Please check out [the issues](https://github.com/ipfs/js-stores/issues). diff --git a/packages/datastore-core/package.json b/packages/datastore-core/package.json index 9d079da4..946c8ab2 100644 --- a/packages/datastore-core/package.json +++ b/packages/datastore-core/package.json @@ -91,6 +91,7 @@ "eslintConfig": { "extends": "ipfs", "parserOptions": { + "project": true, "sourceType": "module" } }, @@ -209,7 +210,7 @@ "uint8arrays": "^4.0.2" }, "devDependencies": { - "aegir": "^40.0.8", + "aegir": "^41.1.9", "interface-datastore": "^8.0.0", "interface-datastore-tests": "^5.0.0" } diff --git a/packages/datastore-core/src/index.ts b/packages/datastore-core/src/index.ts index 73e80c48..5ec96a75 100644 --- a/packages/datastore-core/src/index.ts +++ b/packages/datastore-core/src/index.ts @@ -1,3 +1,66 @@ +/** + * @packageDocumentation + * + * Various Datastore implementations are available. + * + * ## Implementations + * + * - Mount: [`src/mount`](src/mount.ts) + * - Keytransform: [`src/keytransform`](src/keytransform.ts) + * - Sharding: [`src/sharding`](src/sharding.ts) + * - Tiered: [`src/tiered`](src/tirered.ts) + * - Namespace: [`src/namespace`](src/namespace.ts) + * - BlackHole: [`src/black-hole`](src/black-hole.ts) + * + * @example BaseDatastore + * + * An base store is made available to make implementing your own datastore easier: + * + * ```javascript + * import { BaseDatastore } from 'datastore-core' + * + * class MyDatastore extends BaseDatastore { + * constructor () { + * super() + * } + * + * async put (key, val) { + * // your implementation here + * } + * + * async get (key) { + * // your implementation here + * } + * + * // etc... + * } + * ``` + * + * See the [MemoryDatastore](./src/memory.js) for an example of how it is used. + * + * @example Wrapping Stores + * + * ```js + * import { Key } from 'interface-datastore' + * import { + * MemoryStore, + * MountStore + * } from 'datastore-core' + * + * const store = new MountStore({prefix: new Key('/a'), datastore: new MemoryStore()}) + * ``` + * + * @example BlackHoleDatastore + * + * A datastore that does not store any data. + * + * ```js + * import { BlackHoleDatastore } from 'datastore-core/black-hole' + * + * const store = new BlackHoleDatastore() + * ``` + */ + import * as Errors from './errors.js' import * as shard from './shard.js' import type { Key } from 'interface-datastore' @@ -17,11 +80,11 @@ export interface Shard { name: string param: number readonly _padding: string - fun: (s: string) => string - toString: () => string + fun(s: string): string + toString(): string } export interface KeyTransform { - convert: (key: Key) => Key - invert: (key: Key) => Key + convert(key: Key): Key + invert(key: Key): Key } diff --git a/packages/datastore-fs/README.md b/packages/datastore-fs/README.md index 3e40717b..6ea50496 100644 --- a/packages/datastore-fs/README.md +++ b/packages/datastore-fs/README.md @@ -1,5 +1,3 @@ -# datastore-fs - [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-stores.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-stores) @@ -7,21 +5,11 @@ > Datastore implementation with file system backend -## Table of contents - -- [Install](#install) -- [Usage](#usage) -- [API Docs](#api-docs) -- [License](#license) -- [Contribute](#contribute) - -## Install +# About -```console -$ npm i datastore-fs -``` +A Datastore implementation with a file system backend. -## Usage +## Example ```js import { FsDatastore } from 'datastore-fs' @@ -29,18 +17,24 @@ import { FsDatastore } from 'datastore-fs' const store = new FsDatastore('path/to/store') ``` -## API Docs +# Install + +```console +$ npm i datastore-fs +``` + +# API Docs - -## License +# License Licensed under either of - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) - MIT ([LICENSE-MIT](LICENSE-MIT) / ) -## Contribute +# Contribute Contributions welcome! Please check out [the issues](https://github.com/ipfs/js-stores/issues). diff --git a/packages/datastore-fs/package.json b/packages/datastore-fs/package.json index 76c5122b..24687053 100644 --- a/packages/datastore-fs/package.json +++ b/packages/datastore-fs/package.json @@ -36,6 +36,7 @@ "eslintConfig": { "extends": "ipfs", "parserOptions": { + "project": true, "sourceType": "module" } }, @@ -145,7 +146,7 @@ }, "devDependencies": { "@types/mkdirp": "^2.0.0", - "aegir": "^40.0.8", + "aegir": "^41.1.9", "interface-datastore-tests": "^5.0.0", "ipfs-utils": "^9.0.4" } diff --git a/packages/datastore-fs/src/index.ts b/packages/datastore-fs/src/index.ts index ed76a805..bd19b657 100644 --- a/packages/datastore-fs/src/index.ts +++ b/packages/datastore-fs/src/index.ts @@ -1,3 +1,17 @@ +/** + * @packageDocumentation + * + * A Datastore implementation with a file system backend. + * + * @example + * + * ```js + * import { FsDatastore } from 'datastore-fs' + * + * const store = new FsDatastore('path/to/store') + * ``` + */ + import fs from 'node:fs/promises' import path from 'node:path' import { promisify } from 'util' diff --git a/packages/datastore-idb/README.md b/packages/datastore-idb/README.md index ee98b412..52bdec2b 100644 --- a/packages/datastore-idb/README.md +++ b/packages/datastore-idb/README.md @@ -1,5 +1,3 @@ -# datastore-idb - [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-stores.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-stores) @@ -7,21 +5,25 @@ > Datastore implementation with IndexedDB backend. -## Table of contents +# About + +A Datastore implementation for browsers that stores data in [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API). + +## Example -- [Install](#install) - - [Browser ` ``` -## API Docs +# API Docs - -## License +# License Licensed under either of - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) - MIT ([LICENSE-MIT](LICENSE-MIT) / ) -## Contribute +# Contribute Contributions welcome! Please check out [the issues](https://github.com/ipfs/js-stores/issues). diff --git a/packages/datastore-idb/package.json b/packages/datastore-idb/package.json index 8efbf570..d9eb1db0 100644 --- a/packages/datastore-idb/package.json +++ b/packages/datastore-idb/package.json @@ -37,11 +37,11 @@ "eslintConfig": { "extends": "ipfs", "parserOptions": { - "sourceType": "module", "project": [ "tsconfig.json", "benchmarks/datastore-level/tsconfig.json" - ] + ], + "sourceType": "module" } }, "release": { @@ -145,7 +145,7 @@ "it-sort": "^3.0.1" }, "devDependencies": { - "aegir": "^40.0.8", + "aegir": "^41.1.9", "datastore-core": "^9.0.0", "interface-datastore-tests": "^5.0.0" } diff --git a/packages/datastore-idb/src/index.ts b/packages/datastore-idb/src/index.ts index 8a582f79..8d50ee12 100644 --- a/packages/datastore-idb/src/index.ts +++ b/packages/datastore-idb/src/index.ts @@ -1,3 +1,17 @@ +/** + * @packageDocumentation + * + * A Datastore implementation for browsers that stores data in [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API). + * + * @example + * + * ```js + * import { IDBDatastore } from 'datastore-idb' + * + * const store = new IDBDatastore('path/to/store') + * ``` + */ + import { Errors, BaseDatastore } from 'datastore-core' import { openDB, deleteDB, type IDBPDatabase } from 'idb' import { type Batch, Key, type KeyQuery, type Pair, type Query } from 'interface-datastore' diff --git a/packages/datastore-level/README.md b/packages/datastore-level/README.md index 66b53723..c2a8674b 100644 --- a/packages/datastore-level/README.md +++ b/packages/datastore-level/README.md @@ -1,5 +1,3 @@ -# datastore-level - [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-stores.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-stores) @@ -7,32 +5,13 @@ > Datastore implementation with level(up|down) backend -## Table of contents - -- [Install](#install) - - [Browser ` -``` +This module is targetted at Node.js. It is possible to use it in a browser but you should probably use IDBDatastore instead. -## Usage +## Example ```js import { LevelDatastore } from 'datastore-level' @@ -49,13 +28,13 @@ const memStore = new LevelDatastore( ) ``` -### Browser Shimming Leveldown +## Browser Shimming Leveldown `LevelStore` uses the `level` module to automatically use `level` if a modern bundler is used which can detect bundle targets based on the `pkg.browser` property in your `package.json`. If you are using a bundler that does not support `pkg.browser`, you will need to handle the shimming yourself, as was the case with versions of `LevelStore` 0.7.0 and earlier. -### Database names +## Database names `level-js@3` changed the database prefix from `IDBWrapper-` to `level-js-`, so please specify the old prefix if you wish to continue using databases created using `datastore-level` prior to `v0.12.0`. E.g. @@ -70,18 +49,32 @@ import browserStore = new LevelDatastore( More information: [https://github.com/Level/level-js/blob/master/UPGRADING.md#new-database-prefix](https://github.com/Level/level-js/blob/99831913e905d19e5f6dee56d512b7264fbed7bd/UPGRADING.md#new-database-prefix) -## API Docs +# Install + +```console +$ npm i datastore-level +``` + +## Browser ` +``` + +# API Docs - -## License +# License Licensed under either of - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) - MIT ([LICENSE-MIT](LICENSE-MIT) / ) -## Contribute +# Contribute Contributions welcome! Please check out [the issues](https://github.com/ipfs/js-stores/issues). diff --git a/packages/datastore-level/package.json b/packages/datastore-level/package.json index 17ed0a6a..c5671a5b 100644 --- a/packages/datastore-level/package.json +++ b/packages/datastore-level/package.json @@ -38,6 +38,7 @@ "eslintConfig": { "extends": "ipfs", "parserOptions": { + "project": true, "sourceType": "module" } }, @@ -150,7 +151,7 @@ "level": "^8.0.0" }, "devDependencies": { - "aegir": "^40.0.8", + "aegir": "^41.1.9", "interface-datastore-tests": "^5.0.0", "ipfs-utils": "^9.0.4", "memory-level": "^1.0.0" diff --git a/packages/datastore-level/src/index.ts b/packages/datastore-level/src/index.ts index 25e9418e..66d8411a 100644 --- a/packages/datastore-level/src/index.ts +++ b/packages/datastore-level/src/index.ts @@ -1,3 +1,49 @@ +/** + * @packageDocumentation + * + * 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. + * + * @example + * + * ```js + * import { LevelDatastore } from 'datastore-level' + * + * // Default using level as backend for node or the browser + * const store = new LevelDatastore('path/to/store') + * + * // another leveldown compliant backend like memory-level + * const memStore = new LevelDatastore( + * new MemoryLevel({ + * keyEncoding: 'utf8', + * valueEncoding: 'view' + * }) + * ) + * ``` + * + * ## Browser Shimming Leveldown + * + * `LevelStore` uses the `level` module to automatically use `level` if a modern bundler is used which can detect bundle targets based on the `pkg.browser` property in your `package.json`. + * + * If you are using a bundler that does not support `pkg.browser`, you will need to handle the shimming yourself, as was the case with versions of `LevelStore` 0.7.0 and earlier. + * + * ## Database names + * + * `level-js@3` changed the database prefix from `IDBWrapper-` to `level-js-`, so please specify the old prefix if you wish to continue using databases created using `datastore-level` prior to `v0.12.0`. E.g. + * + * ```javascript + * import leveljs from 'level-js' + * import browserStore = new LevelDatastore( + * new Level('my/db/name', { + * prefix: 'IDBWrapper-' + * }) + * }) + * ``` + * + * More information: [https://github.com/Level/level-js/blob/master/UPGRADING.md#new-database-prefix](https://github.com/Level/level-js/blob/99831913e905d19e5f6dee56d512b7264fbed7bd/UPGRADING.md#new-database-prefix) + */ + import { BaseDatastore, Errors } from 'datastore-core' import { type Batch, Key, type KeyQuery, type Pair, type Query } from 'interface-datastore' import filter from 'it-filter' @@ -215,7 +261,7 @@ export class LevelDatastore extends BaseDatastore { } } -async function * levelIteratorToIterator (li: AsyncIterable<[string, Uint8Array]> & { close: () => Promise }): AsyncIterable { +async function * levelIteratorToIterator (li: AsyncIterable<[string, Uint8Array]> & { close(): Promise }): AsyncIterable { for await (const [key, value] of li) { yield { key: new Key(key, false), value } } @@ -224,8 +270,8 @@ async function * levelIteratorToIterator (li: AsyncIterable<[string, Uint8Array] } interface OldLevelIterator { - next: (cb: (err: Error, key: string | Uint8Array | null, value: any) => void) => void - end: (cb: (err: Error) => void) => void + next(cb: (err: Error, key: string | Uint8Array | null, value: any) => void): void + end(cb: (err: Error) => void): void } function oldLevelIteratorToIterator (li: OldLevelIterator): AsyncIterable { diff --git a/packages/datastore-s3/README.md b/packages/datastore-s3/README.md index 7fa06ced..9a6a7ba3 100644 --- a/packages/datastore-s3/README.md +++ b/packages/datastore-s3/README.md @@ -1,5 +1,3 @@ -# datastore-s3 - [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-stores.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-stores) @@ -7,32 +5,11 @@ > IPFS datastore implementation backed by s3 -## Table of contents - -- [Install](#install) - - [Browser ` -``` +A Datastore implementation that stores data on Amazon S3. -## Usage +## Example - Quickstart If the flag `createIfMissing` is not set or is false, then the bucket must be created prior to using datastore-s3. Please see the AWS docs for information on how to configure the S3 instance. A bucket name is required to be set at the s3 instance level, see the below example. @@ -47,26 +24,40 @@ const store = new S3Datastore('.ipfs/datastore', { }) ``` -### Create a Repo +## Example -See [examples/full-s3-repo](./examples/full-s3-repo) for how to quickly create an S3 backed repo using the `createRepo` convenience function. +```ts +Using with Helia -### Examples +See [examples/helia](./examples/helia) for a full example of how to use Helia with an S3 backed datastore. +``` + +# Install + +```console +$ npm i datastore-s3 +``` -You can see examples of S3 backed ipfs in the [examples folder](examples/) +## Browser ` +``` -## API Docs +# API Docs - -## License +# License Licensed under either of - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) - MIT ([LICENSE-MIT](LICENSE-MIT) / ) -## Contribute +# Contribute Contributions welcome! Please check out [the issues](https://github.com/ipfs/js-stores/issues). diff --git a/packages/datastore-s3/package.json b/packages/datastore-s3/package.json index da580d6c..f9fc2b99 100644 --- a/packages/datastore-s3/package.json +++ b/packages/datastore-s3/package.json @@ -35,6 +35,7 @@ "eslintConfig": { "extends": "ipfs", "parserOptions": { + "project": true, "sourceType": "module" } }, @@ -148,7 +149,7 @@ }, "devDependencies": { "@types/sinon": "^10.0.15", - "aegir": "^40.0.8", + "aegir": "^41.1.9", "interface-datastore-tests": "^5.0.0", "p-defer": "^4.0.0", "sinon": "^15.0.2" diff --git a/packages/datastore-s3/src/index.ts b/packages/datastore-s3/src/index.ts index b3829546..d072898a 100644 --- a/packages/datastore-s3/src/index.ts +++ b/packages/datastore-s3/src/index.ts @@ -1,3 +1,28 @@ +/** + * @packageDocumentation + * + * A Datastore implementation that stores data on Amazon S3. + * + * @example Quickstart + * + * If the flag `createIfMissing` is not set or is false, then the bucket must be created prior to using datastore-s3. Please see the AWS docs for information on how to configure the S3 instance. A bucket name is required to be set at the s3 instance level, see the below example. + * + * ```js + * import S3 from 'aws-sdk/clients/s3.js' + * import { S3Datastore } from 'datastore-s3' + * + * const s3Instance = new S3({ params: { Bucket: 'my-ipfs-bucket' } }) + * const store = new S3Datastore('.ipfs/datastore', { + * s3: s3Instance + * createIfMissing: false + * }) + * ``` + * + * @example Using with Helia + * + * See [examples/helia](./examples/helia) for a full example of how to use Helia with an S3 backed datastore. + */ + import { PutObjectCommand, CreateBucketCommand, diff --git a/packages/interface-blockstore-tests/README.md b/packages/interface-blockstore-tests/README.md index b70ea886..bd7f6239 100644 --- a/packages/interface-blockstore-tests/README.md +++ b/packages/interface-blockstore-tests/README.md @@ -1,5 +1,3 @@ -# interface-blockstore-tests - [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-stores.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-stores) @@ -7,21 +5,11 @@ > Compliance tests for the blockstore interface -## Table of contents - -- [Install](#install) -- [Usage](#usage) -- [API Docs](#api-docs) -- [License](#license) -- [Contribute](#contribute) - -## Install +# About -```console -$ npm i interface-blockstore-tests -``` +A test suite that ensures a given implementation implements the Blockstore interface properly. -## Usage +## Example ```js const MyBlockstore from './path/to/my-blockstore') @@ -39,18 +27,24 @@ describe('MyBlockstore', () => { }) ``` -## API Docs +# Install + +```console +$ npm i interface-blockstore-tests +``` + +# API Docs - -## License +# License Licensed under either of - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) - MIT ([LICENSE-MIT](LICENSE-MIT) / ) -## Contribute +# Contribute Contributions welcome! Please check out [the issues](https://github.com/ipfs/js-stores/issues). diff --git a/packages/interface-blockstore-tests/package.json b/packages/interface-blockstore-tests/package.json index a3572734..97872e2e 100644 --- a/packages/interface-blockstore-tests/package.json +++ b/packages/interface-blockstore-tests/package.json @@ -34,6 +34,7 @@ "eslintConfig": { "extends": "ipfs", "parserOptions": { + "project": true, "sourceType": "module" } }, @@ -137,6 +138,6 @@ "uint8arrays": "^4.0.2" }, "devDependencies": { - "aegir": "^40.0.8" + "aegir": "^41.1.9" } } diff --git a/packages/interface-blockstore-tests/src/index.ts b/packages/interface-blockstore-tests/src/index.ts index 697998e1..69a77146 100644 --- a/packages/interface-blockstore-tests/src/index.ts +++ b/packages/interface-blockstore-tests/src/index.ts @@ -1,5 +1,29 @@ /* eslint-env mocha */ +/** + * @packageDocumentation + * + * A test suite that ensures a given implementation implements the Blockstore interface properly. + * + * @example + * + * ```js + * const MyBlockstore from './path/to/my-blockstore') + * const suite from 'interface-blockstore-tests') + * + * describe('MyBlockstore', () => { + * describe('interface-blockstore compliance tests', () => { + * suite({ + * setup () { + * return new MyBlockstore() + * }, + * teardown () {} + * }) + * }) + * }) + * ``` + */ + import { expect } from 'aegir/chai' import all from 'it-all' import drain from 'it-drain' @@ -25,8 +49,8 @@ async function getKeyValuePairs (count: number): Promise { } export interface InterfaceBlockstoreTest { - setup: () => B | Promise - teardown: (store: B) => void | Promise + setup(): B | Promise + teardown(store: B): void | Promise } export function interfaceBlockstoreTests (test: InterfaceBlockstoreTest): void { diff --git a/packages/interface-blockstore/README.md b/packages/interface-blockstore/README.md index 0d3fcf8f..0986e458 100644 --- a/packages/interface-blockstore/README.md +++ b/packages/interface-blockstore/README.md @@ -1,5 +1,3 @@ -# interface-blockstore - [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-stores.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-stores) @@ -7,19 +5,11 @@ > An interface for storing and retrieving blocks -## Table of contents - -- [Install](#install) -- [Implementations](#implementations) -- [API Docs](#api-docs) -- [License](#license) -- [Contribute](#contribute) +# About -## Install +A Blockstore is a key/value database that lets use CIDs to store/retrieve binary blobs. -```console -$ npm i interface-blockstore -``` +It is used by IPFS to store/retrieve the block that a given CID resolves to. ## Implementations @@ -29,18 +19,24 @@ $ npm i interface-blockstore - Memory: [`blockstore-core/memory`](https://github.com/ipfs/js-stores/blob/main/packages/blockstore-core/src/memory.ts) - S3: [`blockstore-s3`](https://github.com/ipfs/js-stores/tree/main/packages/blockstore-s3) -## API Docs +# Install + +```console +$ npm i interface-blockstore +``` + +# API Docs - -## License +# License Licensed under either of - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) - MIT ([LICENSE-MIT](LICENSE-MIT) / ) -## Contribute +# Contribute Contributions welcome! Please check out [the issues](https://github.com/ipfs/js-stores/issues). diff --git a/packages/interface-blockstore/package.json b/packages/interface-blockstore/package.json index 203d48b4..39e1dd7d 100644 --- a/packages/interface-blockstore/package.json +++ b/packages/interface-blockstore/package.json @@ -28,6 +28,7 @@ "eslintConfig": { "extends": "ipfs", "parserOptions": { + "project": true, "sourceType": "module" } }, @@ -127,6 +128,6 @@ "multiformats": "^12.0.1" }, "devDependencies": { - "aegir": "^40.0.8" + "aegir": "^41.1.9" } } diff --git a/packages/interface-blockstore/src/index.ts b/packages/interface-blockstore/src/index.ts index 68662013..17fbdc96 100644 --- a/packages/interface-blockstore/src/index.ts +++ b/packages/interface-blockstore/src/index.ts @@ -4,6 +4,22 @@ // we are using it as an intersection type - see the aside at the bottom: // https://github.com/typescript-eslint/typescript-eslint/issues/2063#issuecomment-675156492 +/** + * @packageDocumentation + * + * 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. + * + * ## Implementations + * + * - File System: [`blockstore-fs`](https://github.com/ipfs/js-stores/tree/main/packages/blockstore-fs) + * - IndexedDB: [`blockstore-idb`](https://github.com/ipfs/js-stores/blob/main/packages/blockstore-idb) + * - level: [`blockstore-level`](https://github.com/ipfs/js-stores/tree/main/packages/blockstore-level) (supports any levelup compatible backend) + * - Memory: [`blockstore-core/memory`](https://github.com/ipfs/js-stores/blob/main/packages/blockstore-core/src/memory.ts) + * - S3: [`blockstore-s3`](https://github.com/ipfs/js-stores/tree/main/packages/blockstore-s3) + */ + import type { AbortOptions, AwaitIterable, @@ -34,5 +50,5 @@ DeleteOptionsExtension = {}, DeleteManyOptionsExtension = {}> extends Store AwaitIterable + getAll(options?: AbortOptions & GetAllOptionsExtension): AwaitIterable } diff --git a/packages/interface-datastore-tests/README.md b/packages/interface-datastore-tests/README.md index 4b488f6c..7befb1ef 100644 --- a/packages/interface-datastore-tests/README.md +++ b/packages/interface-datastore-tests/README.md @@ -1,5 +1,3 @@ -# interface-datastore-tests - [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-stores.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-stores) @@ -7,21 +5,11 @@ > Compliance tests for the datastore interface -## Table of contents - -- [Install](#install) -- [Usage](#usage) -- [API Docs](#api-docs) -- [License](#license) -- [Contribute](#contribute) - -## Install +# About -```console -$ npm i interface-datastore-tests -``` +A test suite that ensures a given implementation implements the Datastore interface properly. -## Usage +## Example ```js const MyDatastore from './path/to/my-datastore') @@ -39,18 +27,24 @@ describe('MyDatastore', () => { }) ``` -## API Docs +# Install + +```console +$ npm i interface-datastore-tests +``` + +# API Docs - -## License +# License Licensed under either of - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) - MIT ([LICENSE-MIT](LICENSE-MIT) / ) -## Contribute +# Contribute Contributions welcome! Please check out [the issues](https://github.com/ipfs/js-stores/issues). diff --git a/packages/interface-datastore-tests/package.json b/packages/interface-datastore-tests/package.json index 0174fd83..b1505abf 100644 --- a/packages/interface-datastore-tests/package.json +++ b/packages/interface-datastore-tests/package.json @@ -34,6 +34,7 @@ "eslintConfig": { "extends": "ipfs", "parserOptions": { + "project": true, "sourceType": "module" } }, @@ -138,6 +139,6 @@ "uint8arrays": "^4.0.2" }, "devDependencies": { - "aegir": "^40.0.8" + "aegir": "^41.1.9" } } diff --git a/packages/interface-datastore-tests/src/index.ts b/packages/interface-datastore-tests/src/index.ts index 3f47501c..8076c214 100644 --- a/packages/interface-datastore-tests/src/index.ts +++ b/packages/interface-datastore-tests/src/index.ts @@ -1,5 +1,29 @@ /* eslint-env mocha */ +/** + * @packageDocumentation + * + * A test suite that ensures a given implementation implements the Datastore interface properly. + * + * @example + * + * ```js + * const MyDatastore from './path/to/my-datastore') + * const suite from 'interface-datastore-tests') + * + * describe('MyDatastore', () => { + * describe('interface-datastore compliance tests', () => { + * suite({ + * setup () { + * return new MyDatastore() + * }, + * teardown () {} + * }) + * }) + * }) + * ``` + */ + import { expect } from 'aegir/chai' import { type Datastore, Key, type KeyQueryFilter, type KeyQueryOrder, type Pair, type QueryFilter, type QueryOrder } from 'interface-datastore' import { randomBytes } from 'iso-random-stream' @@ -9,8 +33,8 @@ import length from 'it-length' import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string' export interface InterfacDatastoreTest { - setup: () => D | Promise - teardown: (store: D) => void | Promise + setup(): D | Promise + teardown(store: D): void | Promise } export function interfaceDatastoreTests (test: InterfacDatastoreTest): void { diff --git a/packages/interface-datastore/README.md b/packages/interface-datastore/README.md index 6e869940..69454128 100644 --- a/packages/interface-datastore/README.md +++ b/packages/interface-datastore/README.md @@ -1,5 +1,3 @@ -# interface-datastore - [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-stores.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-stores) @@ -7,27 +5,13 @@ > datastore interface -## Table of contents - -- [Install](#install) - - [Browser ` ``` -## Implementations - -- Backed Implementations - - File System: [`datastore-fs`](https://github.com/ipfs/js-stores/tree/main/packages/datastore-fs) - - IndexedDB: [`datastore-idb`](https://github.com/ipfs/js-stores/blob/main/packages/datastore-idb) - - level: [`datastore-level`](https://github.com/ipfs/js-stores/tree/main/packages/datastore-level) (supports any levelup compatible backend) - - Memory: [`datastore-core/memory`](https://github.com/ipfs/js-stores/blob/main/packages/datastore-core/src/memory.ts) - - S3: [`datastore-s3`](https://github.com/ipfs/js-stores/tree/main/packages/datastore-s3) -- Wrapper Implementations - - Keytransform: [`datstore-core/src/keytransform`](https://github.com/ipfs/js-stores/blob/main/packages/datastore-core/src/keytransform.ts) - - Mount: [`datastore-core/src/mount`](https://github.com/ipfs/js-stores/blob/main/packages/datastore-core/src/mount.ts) - - Namespace: [`datastore-core/src/namespace`](https://github.com/ipfs/js-stores/blob/main/packages/datastore-core/src/namespace.ts) - - Sharding: [`datastore-core/src/sharding`](https://github.com/ipfs/js-stores/blob/main/packages/datastore-core/src/sharding.ts) - - Tiered: [`datstore-core/src/tiered`](https://github.com/ipfs/js-stores/blob/main/packages/datastore-core/src/tiered.ts) - -If you want the same functionality as [go-ds-flatfs](https://github.com/ipfs/go-ds-flatfs), use sharding with fs. - -```js -import FsStore from 'datastore-fs' -import { ShardingDataStore, shard } from 'datastore-core' - -const fs = new FsStore('path/to/store') - -// flatfs now works like go-flatfs -const flatfs = await ShardingStore.createOrOpen(fs, new shard.NextToLast(2)) -``` - -### Test suite - -Available via the [`interface-datastore-tests`](https://npmjs.com/package/interface-datastore-tests) module - -```js -import { interfaceDatastoreTests } from 'interface-datastore-tests' - -describe('mystore', () => { - interfaceDatastoreTests({ - async setup () { - return instanceOfMyStore - }, - async teardown () { - // cleanup resources - } - }) -}) -``` - -### Aborting requests - -Most API methods accept an \[AbortSignal]\[] as part of an options object. Implementations may listen for an `abort` event emitted by this object, or test the `signal.aborted` property. When received implementations should tear down any long-lived requests or resources created. - -### Concurrency - -The streaming `(put|get|delete)Many` methods are intended to be used with modules such as [it-parallel-batch](https://www.npmjs.com/package/it-parallel-batch) to allow calling code to control levels of parallelisation. The batching method ensures results are returned in the correct order, but interface implementations should be thread safe. - -```js -import batch from 'it-parallel-batch' -const source = [{ - key: .., - value: .. -}] - -// put values into the datastore concurrently, max 10 at a time -for await (const { key, data } of batch(store.putMany(source), 10)) { - console.info(`Put ${key}`) -} -``` - -### Keys - -To allow a better abstraction on how to address values, there is a `Key` class which is used as identifier. It's easy to create a key from a `Uint8Array` or a `string`. - -```js -const a = new Key('a') -const b = new Key(new Uint8Array([0, 1, 2, 3])) -``` - -The key scheme is inspired by file systems and Google App Engine key model. Keys are meant to be unique across a system. They are typically hierarchical, incorporating more and more specific namespaces. Thus keys can be deemed 'children' or 'ancestors' of other keys: - -- `new Key('/Comedy')` -- `new Key('/Comedy/MontyPython')` - -Also, every namespace can be parameterized to embed relevant object information. For example, the Key `name` (most specific namespace) could include the object type: - -- `new Key('/Comedy/MontyPython/Actor:JohnCleese')` -- `new Key('/Comedy/MontyPython/Sketch:CheeseShop')` -- `new Key('/Comedy/MontyPython/Sketch:CheeseShop/Character:Mousebender')` - -## API - - - -## API Docs +# API Docs - -## License +# License Licensed under either of - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) - MIT ([LICENSE-MIT](LICENSE-MIT) / ) -## Contribute +# Contribute Contributions welcome! Please check out [the issues](https://github.com/ipfs/js-stores/issues). @@ -148,25 +41,3 @@ Please be aware that all interactions related to this repo are subject to the IP Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. [![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md) - -[Key]: #Keys - -[Object]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object - -[Uint8Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array - -[AbortSignal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal - -[AsyncIterator]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/asyncIterator - -[AsyncIterable]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols - -[String]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String - -[Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array - -[Function]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function - -[Number]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number - -[Boolean]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean diff --git a/packages/interface-datastore/package.json b/packages/interface-datastore/package.json index ba6b8816..4c9e2a30 100644 --- a/packages/interface-datastore/package.json +++ b/packages/interface-datastore/package.json @@ -54,6 +54,7 @@ "eslintConfig": { "extends": "ipfs", "parserOptions": { + "project": true, "sourceType": "module" } }, @@ -161,6 +162,6 @@ "uint8arrays": "^4.0.2" }, "devDependencies": { - "aegir": "^40.0.8" + "aegir": "^41.1.9" } } diff --git a/packages/interface-datastore/src/index.ts b/packages/interface-datastore/src/index.ts index 251495c3..1ee4a57d 100644 --- a/packages/interface-datastore/src/index.ts +++ b/packages/interface-datastore/src/index.ts @@ -4,6 +4,104 @@ // we are using it as an intersection type - see the aside at the bottom: // https://github.com/typescript-eslint/typescript-eslint/issues/2063#issuecomment-675156492 +/** + * @packageDocumentation + * + * 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. + * + * ## Backed Implementations + * + * - File System: [`datastore-fs`](https://github.com/ipfs/js-stores/tree/main/packages/datastore-fs) + * - IndexedDB: [`datastore-idb`](https://github.com/ipfs/js-stores/blob/main/packages/datastore-idb) + * - level: [`datastore-level`](https://github.com/ipfs/js-stores/tree/main/packages/datastore-level) (supports any levelup compatible backend) + * - Memory: [`datastore-core/memory`](https://github.com/ipfs/js-stores/blob/main/packages/datastore-core/src/memory.ts) + * - S3: [`datastore-s3`](https://github.com/ipfs/js-stores/tree/main/packages/datastore-s3) + * + * ## Wrapper Implementations + * + * - Keytransform: [`datstore-core/src/keytransform`](https://github.com/ipfs/js-stores/blob/main/packages/datastore-core/src/keytransform.ts) + * - Mount: [`datastore-core/src/mount`](https://github.com/ipfs/js-stores/blob/main/packages/datastore-core/src/mount.ts) + * - Namespace: [`datastore-core/src/namespace`](https://github.com/ipfs/js-stores/blob/main/packages/datastore-core/src/namespace.ts) + * - Sharding: [`datastore-core/src/sharding`](https://github.com/ipfs/js-stores/blob/main/packages/datastore-core/src/sharding.ts) + * - Tiered: [`datstore-core/src/tiered`](https://github.com/ipfs/js-stores/blob/main/packages/datastore-core/src/tiered.ts) + * + * If you want the same functionality as [go-ds-flatfs](https://github.com/ipfs/go-ds-flatfs), use sharding with fs. + * + * @example + * + * ```js + * import FsStore from 'datastore-fs' + * import { ShardingDataStore, shard } from 'datastore-core' + * + * const fs = new FsStore('path/to/store') + * + * // flatfs now works like go-flatfs + * const flatfs = await ShardingStore.createOrOpen(fs, new shard.NextToLast(2)) + * ``` + * + * ### Test suite + * + * Available via the [`interface-datastore-tests`](https://npmjs.com/package/interface-datastore-tests) module + * + * ```js + * import { interfaceDatastoreTests } from 'interface-datastore-tests' + * + * describe('mystore', () => { + * interfaceDatastoreTests({ + * async setup () { + * return instanceOfMyStore + * }, + * async teardown () { + * // cleanup resources + * } + * }) + * }) + * ``` + * + * ### Aborting requests + * + * Most API methods accept an \[AbortSignal]\[] as part of an options object. Implementations may listen for an `abort` event emitted by this object, or test the `signal.aborted` property. When received implementations should tear down any long-lived requests or resources created. + * + * ### Concurrency + * + * The streaming `(put|get|delete)Many` methods are intended to be used with modules such as [it-parallel-batch](https://www.npmjs.com/package/it-parallel-batch) to allow calling code to control levels of parallelisation. The batching method ensures results are returned in the correct order, but interface implementations should be thread safe. + * + * ```js + * import batch from 'it-parallel-batch' + * const source = [{ + * key: .., + * value: .. + * }] + * + * // put values into the datastore concurrently, max 10 at a time + * for await (const { key, data } of batch(store.putMany(source), 10)) { + * console.info(`Put ${key}`) + * } + * ``` + * + * ### Keys + * + * To allow a better abstraction on how to address values, there is a `Key` class which is used as identifier. It's easy to create a key from a `Uint8Array` or a `string`. + * + * ```js + * const a = new Key('a') + * const b = new Key(new Uint8Array([0, 1, 2, 3])) + * ``` + * + * The key scheme is inspired by file systems and Google App Engine key model. Keys are meant to be unique across a system. They are typically hierarchical, incorporating more and more specific namespaces. Thus keys can be deemed 'children' or 'ancestors' of other keys: + * + * - `new Key('/Comedy')` + * - `new Key('/Comedy/MontyPython')` + * + * Also, every namespace can be parameterized to embed relevant object information. For example, the Key `name` (most specific namespace) could include the object type: + * + * - `new Key('/Comedy/MontyPython/Actor:JohnCleese')` + * - `new Key('/Comedy/MontyPython/Sketch:CheeseShop')` + * - `new Key('/Comedy/MontyPython/Sketch:CheeseShop/Character:Mousebender')` + */ + import { Key } from './key.js' import type { Await, @@ -18,9 +116,9 @@ export interface Pair { } export interface Batch { - put: (key: Key, value: Uint8Array) => void - delete: (key: Key) => void - commit: (options?: AbortOptions & BatchOptionsExtension) => Await + put(key: Key, value: Uint8Array): void + delete(key: Key): void + commit(options?: AbortOptions & BatchOptionsExtension): Await } export interface Datastore Batch + batch(): Batch /** * Query the datastore. @@ -63,7 +161,7 @@ BatchOptionsExtension = {} * console.log('ALL THE VALUES', list) * ``` */ - query: (query: Query, options?: AbortOptions & QueryOptionsExtension) => AwaitIterable + query(query: Query, options?: AbortOptions & QueryOptionsExtension): AwaitIterable /** * Query the datastore. @@ -78,7 +176,7 @@ BatchOptionsExtension = {} * console.log('ALL THE KEYS', key) * ``` */ - queryKeys: (query: KeyQuery, options?: AbortOptions & QueryKeysOptionsExtension) => AwaitIterable + queryKeys(query: KeyQuery, options?: AbortOptions & QueryKeysOptionsExtension): AwaitIterable } export interface QueryFilter { (item: Pair): boolean } diff --git a/packages/interface-store/README.md b/packages/interface-store/README.md index 06915f4d..0a7edca7 100644 --- a/packages/interface-store/README.md +++ b/packages/interface-store/README.md @@ -1,5 +1,3 @@ -# interface-store - [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech) [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-stores.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-stores) @@ -7,31 +5,28 @@ > A generic interface for storing and retrieving data -## Table of contents +# About -- [Install](#install) -- [API Docs](#api-docs) -- [License](#license) -- [Contribute](#contribute) +An abstraction of the Datastore/Blockstore codebases. -## Install +# Install ```console $ npm i interface-store ``` -## API Docs +# API Docs - -## License +# License Licensed under either of - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) - MIT ([LICENSE-MIT](LICENSE-MIT) / ) -## Contribute +# Contribute Contributions welcome! Please check out [the issues](https://github.com/ipfs/js-stores/issues). diff --git a/packages/interface-store/package.json b/packages/interface-store/package.json index 28e062d9..8aa1fcfe 100644 --- a/packages/interface-store/package.json +++ b/packages/interface-store/package.json @@ -32,7 +32,10 @@ "dist" ], "eslintConfig": { - "extends": "ipfs" + "extends": "ipfs", + "parserOptions": { + "project": true + } }, "release": { "branches": [ @@ -127,6 +130,6 @@ "dep-check": "aegir dep-check" }, "devDependencies": { - "aegir": "^40.0.8" + "aegir": "^41.1.9" } } diff --git a/packages/interface-store/src/index.ts b/packages/interface-store/src/index.ts index ff67c003..5d84d4ca 100644 --- a/packages/interface-store/src/index.ts +++ b/packages/interface-store/src/index.ts @@ -4,6 +4,12 @@ // we are using it as an intersection type - see the aside at the bottom: // https://github.com/typescript-eslint/typescript-eslint/issues/2063#issuecomment-675156492 +/** + * @packageDocumentation + * + * An abstraction of the Datastore/Blockstore codebases. + */ + /** * An iterable or async iterable of values */ @@ -39,7 +45,7 @@ export interface Store Await + has(key: Key, options?: AbortOptions & HasOptionsExtension): Await /** * Store the passed value under the passed key @@ -50,7 +56,7 @@ export interface Store Await + put(key: Key, val: Value, options?: AbortOptions & PutOptionsExtension): Await /** * Store the given key/value pairs @@ -64,10 +70,10 @@ export interface Store, options?: AbortOptions & PutManyOptionsExtension - ) => AwaitIterable + ): AwaitIterable /** * Retrieve the value stored under the given key @@ -79,7 +85,7 @@ export interface Store got content: datastore * ``` */ - get: (key: Key, options?: AbortOptions & GetOptionsExtension) => Await + get(key: Key, options?: AbortOptions & GetOptionsExtension): Await /** * Retrieve values for the passed keys @@ -92,10 +98,10 @@ export interface Store, options?: AbortOptions & GetManyOptionsExtension - ) => AwaitIterable + ): AwaitIterable /** * Remove the record for the passed key @@ -107,7 +113,7 @@ export interface Store Await + delete(key: Key, options?: AbortOptions & DeleteOptionsExtension): Await /** * Remove values for the passed keys @@ -122,8 +128,8 @@ export interface Store, options?: AbortOptions & DeleteManyOptionsExtension - ) => AwaitIterable + ): AwaitIterable } diff --git a/packages/interface-store/typedoc.json b/packages/interface-store/typedoc.json new file mode 100644 index 00000000..f599dc72 --- /dev/null +++ b/packages/interface-store/typedoc.json @@ -0,0 +1,5 @@ +{ + "entryPoints": [ + "./src/index.ts" + ] +} From 980c8c69001bc2570884bc9574909215de091bc7 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 10:37:55 +0000 Subject: [PATCH 02/45] chore(release): 5.1.5 [skip ci] ## [interface-store-v5.1.5](https://github.com/ipfs/js-stores/compare/interface-store-v5.1.4...interface-store-v5.1.5) (2023-11-27) ### Documentation * update datastore core readme and package config ([#245](https://github.com/ipfs/js-stores/issues/245)) ([c08d29a](https://github.com/ipfs/js-stores/commit/c08d29ab18ddea26a1d9dd73d673847469d28a13)) ### Dependencies * **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) --- packages/interface-store/CHANGELOG.md | 12 ++++++++++++ packages/interface-store/package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/interface-store/CHANGELOG.md b/packages/interface-store/CHANGELOG.md index 1677c8b9..7a662e3d 100644 --- a/packages/interface-store/CHANGELOG.md +++ b/packages/interface-store/CHANGELOG.md @@ -1,3 +1,15 @@ +## [interface-store-v5.1.5](https://github.com/ipfs/js-stores/compare/interface-store-v5.1.4...interface-store-v5.1.5) (2023-11-27) + + +### Documentation + +* update datastore core readme and package config ([#245](https://github.com/ipfs/js-stores/issues/245)) ([c08d29a](https://github.com/ipfs/js-stores/commit/c08d29ab18ddea26a1d9dd73d673847469d28a13)) + + +### Dependencies + +* **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) + ## [interface-store-v5.1.4](https://github.com/ipfs/js-stores/compare/interface-store-v5.1.3...interface-store-v5.1.4) (2023-09-05) diff --git a/packages/interface-store/package.json b/packages/interface-store/package.json index 8aa1fcfe..3bf5f419 100644 --- a/packages/interface-store/package.json +++ b/packages/interface-store/package.json @@ -1,6 +1,6 @@ { "name": "interface-store", - "version": "5.1.4", + "version": "5.1.5", "description": "A generic interface for storing and retrieving data", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/interface-store#readme", From 49d9e868d6ae990df38d93cf71895b540ff24106 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 10:38:12 +0000 Subject: [PATCH 03/45] chore(release): 8.2.6 [skip ci] ## [interface-datastore-v8.2.6](https://github.com/ipfs/js-stores/compare/interface-datastore-v8.2.5...interface-datastore-v8.2.6) (2023-11-27) ### Dependencies * **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) --- packages/interface-datastore/CHANGELOG.md | 7 +++++++ packages/interface-datastore/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/interface-datastore/CHANGELOG.md b/packages/interface-datastore/CHANGELOG.md index 859b9ff4..1d66b915 100644 --- a/packages/interface-datastore/CHANGELOG.md +++ b/packages/interface-datastore/CHANGELOG.md @@ -1,3 +1,10 @@ +## [interface-datastore-v8.2.6](https://github.com/ipfs/js-stores/compare/interface-datastore-v8.2.5...interface-datastore-v8.2.6) (2023-11-27) + + +### Dependencies + +* **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) + ## [interface-datastore-v8.2.5](https://github.com/ipfs/js-stores/compare/interface-datastore-v8.2.4...interface-datastore-v8.2.5) (2023-09-05) diff --git a/packages/interface-datastore/package.json b/packages/interface-datastore/package.json index 4c9e2a30..3a5899cf 100644 --- a/packages/interface-datastore/package.json +++ b/packages/interface-datastore/package.json @@ -1,6 +1,6 @@ { "name": "interface-datastore", - "version": "8.2.5", + "version": "8.2.6", "description": "datastore interface", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/interface-datastore#readme", From 9997757101a34dbd61c71841932433296b7f4038 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 10:38:26 +0000 Subject: [PATCH 04/45] chore(release): 5.1.5 [skip ci] ## [interface-datastore-tests-v5.1.5](https://github.com/ipfs/js-stores/compare/interface-datastore-tests-v5.1.4...interface-datastore-tests-v5.1.5) (2023-11-27) ### Dependencies * **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) --- packages/interface-datastore-tests/CHANGELOG.md | 7 +++++++ packages/interface-datastore-tests/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/interface-datastore-tests/CHANGELOG.md b/packages/interface-datastore-tests/CHANGELOG.md index 8538f3b4..abfd11cb 100644 --- a/packages/interface-datastore-tests/CHANGELOG.md +++ b/packages/interface-datastore-tests/CHANGELOG.md @@ -1,3 +1,10 @@ +## [interface-datastore-tests-v5.1.5](https://github.com/ipfs/js-stores/compare/interface-datastore-tests-v5.1.4...interface-datastore-tests-v5.1.5) (2023-11-27) + + +### Dependencies + +* **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) + ## [interface-datastore-tests-v5.1.4](https://github.com/ipfs/js-stores/compare/interface-datastore-tests-v5.1.3...interface-datastore-tests-v5.1.4) (2023-09-05) diff --git a/packages/interface-datastore-tests/package.json b/packages/interface-datastore-tests/package.json index b1505abf..ff4438b3 100644 --- a/packages/interface-datastore-tests/package.json +++ b/packages/interface-datastore-tests/package.json @@ -1,6 +1,6 @@ { "name": "interface-datastore-tests", - "version": "5.1.4", + "version": "5.1.5", "description": "Compliance tests for the datastore interface", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/interface-datastore-tests#readme", From 866b4c581d110955a07b9c80b4af849f0fc5719f Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 10:38:40 +0000 Subject: [PATCH 05/45] chore(release): 5.2.7 [skip ci] ## [interface-blockstore-v5.2.7](https://github.com/ipfs/js-stores/compare/interface-blockstore-v5.2.6...interface-blockstore-v5.2.7) (2023-11-27) ### Dependencies * **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) --- packages/interface-blockstore/CHANGELOG.md | 7 +++++++ packages/interface-blockstore/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/interface-blockstore/CHANGELOG.md b/packages/interface-blockstore/CHANGELOG.md index 4e81d7a7..603e579e 100644 --- a/packages/interface-blockstore/CHANGELOG.md +++ b/packages/interface-blockstore/CHANGELOG.md @@ -1,3 +1,10 @@ +## [interface-blockstore-v5.2.7](https://github.com/ipfs/js-stores/compare/interface-blockstore-v5.2.6...interface-blockstore-v5.2.7) (2023-11-27) + + +### Dependencies + +* **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) + ## [interface-blockstore-v5.2.6](https://github.com/ipfs/js-stores/compare/interface-blockstore-v5.2.5...interface-blockstore-v5.2.6) (2023-09-05) diff --git a/packages/interface-blockstore/package.json b/packages/interface-blockstore/package.json index 39e1dd7d..96504a64 100644 --- a/packages/interface-blockstore/package.json +++ b/packages/interface-blockstore/package.json @@ -1,6 +1,6 @@ { "name": "interface-blockstore", - "version": "5.2.6", + "version": "5.2.7", "description": "An interface for storing and retrieving blocks", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/interface-blockstore#readme", From 6407f97cf4139841f9dd902a9dfaa6bce30edb80 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 10:38:54 +0000 Subject: [PATCH 06/45] chore(release): 6.1.6 [skip ci] ## [interface-blockstore-tests-v6.1.6](https://github.com/ipfs/js-stores/compare/interface-blockstore-tests-v6.1.5...interface-blockstore-tests-v6.1.6) (2023-11-27) ### Dependencies * **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) --- packages/interface-blockstore-tests/CHANGELOG.md | 7 +++++++ packages/interface-blockstore-tests/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/interface-blockstore-tests/CHANGELOG.md b/packages/interface-blockstore-tests/CHANGELOG.md index e1b039e8..c8273204 100644 --- a/packages/interface-blockstore-tests/CHANGELOG.md +++ b/packages/interface-blockstore-tests/CHANGELOG.md @@ -1,3 +1,10 @@ +## [interface-blockstore-tests-v6.1.6](https://github.com/ipfs/js-stores/compare/interface-blockstore-tests-v6.1.5...interface-blockstore-tests-v6.1.6) (2023-11-27) + + +### Dependencies + +* **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) + ## [interface-blockstore-tests-v6.1.5](https://github.com/ipfs/js-stores/compare/interface-blockstore-tests-v6.1.4...interface-blockstore-tests-v6.1.5) (2023-09-05) diff --git a/packages/interface-blockstore-tests/package.json b/packages/interface-blockstore-tests/package.json index 97872e2e..f68b0b47 100644 --- a/packages/interface-blockstore-tests/package.json +++ b/packages/interface-blockstore-tests/package.json @@ -1,6 +1,6 @@ { "name": "interface-blockstore-tests", - "version": "6.1.5", + "version": "6.1.6", "description": "Compliance tests for the blockstore interface", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/interface-blockstore-tests#readme", From c961d009857aec77031107e04040aa99bfa7db5b Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 10:39:09 +0000 Subject: [PATCH 07/45] chore(release): 4.3.5 [skip ci] ## [blockstore-core-v4.3.5](https://github.com/ipfs/js-stores/compare/blockstore-core-v4.3.4...blockstore-core-v4.3.5) (2023-11-27) ### Documentation * update datastore core readme and package config ([#245](https://github.com/ipfs/js-stores/issues/245)) ([c08d29a](https://github.com/ipfs/js-stores/commit/c08d29ab18ddea26a1d9dd73d673847469d28a13)) ### Dependencies * **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) --- packages/blockstore-core/CHANGELOG.md | 12 ++++++++++++ packages/blockstore-core/package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/blockstore-core/CHANGELOG.md b/packages/blockstore-core/CHANGELOG.md index 6cb20b55..6a3bc4ef 100644 --- a/packages/blockstore-core/CHANGELOG.md +++ b/packages/blockstore-core/CHANGELOG.md @@ -1,3 +1,15 @@ +## [blockstore-core-v4.3.5](https://github.com/ipfs/js-stores/compare/blockstore-core-v4.3.4...blockstore-core-v4.3.5) (2023-11-27) + + +### Documentation + +* update datastore core readme and package config ([#245](https://github.com/ipfs/js-stores/issues/245)) ([c08d29a](https://github.com/ipfs/js-stores/commit/c08d29ab18ddea26a1d9dd73d673847469d28a13)) + + +### Dependencies + +* **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) + ## [blockstore-core-v4.3.4](https://github.com/ipfs/js-stores/compare/blockstore-core-v4.3.3...blockstore-core-v4.3.4) (2023-09-05) diff --git a/packages/blockstore-core/package.json b/packages/blockstore-core/package.json index eea19605..5760203c 100644 --- a/packages/blockstore-core/package.json +++ b/packages/blockstore-core/package.json @@ -1,6 +1,6 @@ { "name": "blockstore-core", - "version": "4.3.4", + "version": "4.3.5", "description": "Contains various implementations of the API contract described in interface-blockstore", "author": "Alex Potsides ", "license": "Apache-2.0 OR MIT", From 01f08206896b9181ab0a80158d43dc52c7ca6ec8 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 10:39:26 +0000 Subject: [PATCH 08/45] chore(release): 1.1.5 [skip ci] ## [blockstore-level-v1.1.5](https://github.com/ipfs/js-stores/compare/blockstore-level-v1.1.4...blockstore-level-v1.1.5) (2023-11-27) ### Documentation * update datastore core readme and package config ([#245](https://github.com/ipfs/js-stores/issues/245)) ([c08d29a](https://github.com/ipfs/js-stores/commit/c08d29ab18ddea26a1d9dd73d673847469d28a13)) ### Dependencies * **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) --- packages/blockstore-level/CHANGELOG.md | 12 ++++++++++++ packages/blockstore-level/package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/blockstore-level/CHANGELOG.md b/packages/blockstore-level/CHANGELOG.md index 2d455ab0..ac65a277 100644 --- a/packages/blockstore-level/CHANGELOG.md +++ b/packages/blockstore-level/CHANGELOG.md @@ -1,3 +1,15 @@ +## [blockstore-level-v1.1.5](https://github.com/ipfs/js-stores/compare/blockstore-level-v1.1.4...blockstore-level-v1.1.5) (2023-11-27) + + +### Documentation + +* update datastore core readme and package config ([#245](https://github.com/ipfs/js-stores/issues/245)) ([c08d29a](https://github.com/ipfs/js-stores/commit/c08d29ab18ddea26a1d9dd73d673847469d28a13)) + + +### Dependencies + +* **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) + ## [blockstore-level-v1.1.4](https://github.com/ipfs/js-stores/compare/blockstore-level-v1.1.3...blockstore-level-v1.1.4) (2023-09-05) diff --git a/packages/blockstore-level/package.json b/packages/blockstore-level/package.json index bfd11484..8afaf48d 100644 --- a/packages/blockstore-level/package.json +++ b/packages/blockstore-level/package.json @@ -1,6 +1,6 @@ { "name": "blockstore-level", - "version": "1.1.4", + "version": "1.1.5", "description": "Blockstore implementation with level(up|down) backend", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/blockstore-level#readme", From b0073e21997cac333c8237f31f414dc0dfc5d5fd Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 10:39:43 +0000 Subject: [PATCH 09/45] chore(release): 9.2.4 [skip ci] ## [datastore-core-v9.2.4](https://github.com/ipfs/js-stores/compare/datastore-core-v9.2.3...datastore-core-v9.2.4) (2023-11-27) ### Documentation * update datastore core readme and package config ([#245](https://github.com/ipfs/js-stores/issues/245)) ([c08d29a](https://github.com/ipfs/js-stores/commit/c08d29ab18ddea26a1d9dd73d673847469d28a13)) ### Dependencies * **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) --- packages/datastore-core/CHANGELOG.md | 12 ++++++++++++ packages/datastore-core/package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/datastore-core/CHANGELOG.md b/packages/datastore-core/CHANGELOG.md index 8fe0e40c..de208108 100644 --- a/packages/datastore-core/CHANGELOG.md +++ b/packages/datastore-core/CHANGELOG.md @@ -1,3 +1,15 @@ +## [datastore-core-v9.2.4](https://github.com/ipfs/js-stores/compare/datastore-core-v9.2.3...datastore-core-v9.2.4) (2023-11-27) + + +### Documentation + +* update datastore core readme and package config ([#245](https://github.com/ipfs/js-stores/issues/245)) ([c08d29a](https://github.com/ipfs/js-stores/commit/c08d29ab18ddea26a1d9dd73d673847469d28a13)) + + +### Dependencies + +* **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) + ## [datastore-core-v9.2.3](https://github.com/ipfs/js-stores/compare/datastore-core-v9.2.2...datastore-core-v9.2.3) (2023-09-05) diff --git a/packages/datastore-core/package.json b/packages/datastore-core/package.json index 946c8ab2..7ff7f53b 100644 --- a/packages/datastore-core/package.json +++ b/packages/datastore-core/package.json @@ -1,6 +1,6 @@ { "name": "datastore-core", - "version": "9.2.3", + "version": "9.2.4", "description": "Wrapper implementation for interface-datastore", "author": "Friedel Ziegelmayer ", "license": "Apache-2.0 OR MIT", From a9218cddfed1c25995927d060fdc97e85845b83a Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 10:40:01 +0000 Subject: [PATCH 10/45] chore(release): 11.1.5 [skip ci] ## [datastore-s3-v11.1.5](https://github.com/ipfs/js-stores/compare/datastore-s3-v11.1.4...datastore-s3-v11.1.5) (2023-11-27) ### Dependencies * **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) --- packages/datastore-s3/CHANGELOG.md | 7 +++++++ packages/datastore-s3/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/datastore-s3/CHANGELOG.md b/packages/datastore-s3/CHANGELOG.md index 99b1fc31..8f6fed3b 100644 --- a/packages/datastore-s3/CHANGELOG.md +++ b/packages/datastore-s3/CHANGELOG.md @@ -1,3 +1,10 @@ +## [datastore-s3-v11.1.5](https://github.com/ipfs/js-stores/compare/datastore-s3-v11.1.4...datastore-s3-v11.1.5) (2023-11-27) + + +### Dependencies + +* **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) + ## [datastore-s3-v11.1.4](https://github.com/ipfs/js-stores/compare/datastore-s3-v11.1.3...datastore-s3-v11.1.4) (2023-09-05) diff --git a/packages/datastore-s3/package.json b/packages/datastore-s3/package.json index f9fc2b99..58c5da36 100644 --- a/packages/datastore-s3/package.json +++ b/packages/datastore-s3/package.json @@ -1,6 +1,6 @@ { "name": "datastore-s3", - "version": "11.1.4", + "version": "11.1.5", "description": "IPFS datastore implementation backed by s3", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/datastore-s3#readme", From e2b96fdd4b390c32b4341ab2401d609a44db527c Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 10:40:15 +0000 Subject: [PATCH 11/45] chore(release): 1.1.5 [skip ci] ## [blockstore-idb-v1.1.5](https://github.com/ipfs/js-stores/compare/blockstore-idb-v1.1.4...blockstore-idb-v1.1.5) (2023-11-27) ### Documentation * update datastore core readme and package config ([#245](https://github.com/ipfs/js-stores/issues/245)) ([c08d29a](https://github.com/ipfs/js-stores/commit/c08d29ab18ddea26a1d9dd73d673847469d28a13)) ### Dependencies * **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) --- packages/blockstore-idb/CHANGELOG.md | 12 ++++++++++++ packages/blockstore-idb/package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/blockstore-idb/CHANGELOG.md b/packages/blockstore-idb/CHANGELOG.md index ef1ef85c..c1a359ba 100644 --- a/packages/blockstore-idb/CHANGELOG.md +++ b/packages/blockstore-idb/CHANGELOG.md @@ -1,3 +1,15 @@ +## [blockstore-idb-v1.1.5](https://github.com/ipfs/js-stores/compare/blockstore-idb-v1.1.4...blockstore-idb-v1.1.5) (2023-11-27) + + +### Documentation + +* update datastore core readme and package config ([#245](https://github.com/ipfs/js-stores/issues/245)) ([c08d29a](https://github.com/ipfs/js-stores/commit/c08d29ab18ddea26a1d9dd73d673847469d28a13)) + + +### Dependencies + +* **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) + ## [blockstore-idb-v1.1.4](https://github.com/ipfs/js-stores/compare/blockstore-idb-v1.1.3...blockstore-idb-v1.1.4) (2023-09-05) diff --git a/packages/blockstore-idb/package.json b/packages/blockstore-idb/package.json index ebc5a805..c1437e5f 100644 --- a/packages/blockstore-idb/package.json +++ b/packages/blockstore-idb/package.json @@ -1,6 +1,6 @@ { "name": "blockstore-idb", - "version": "1.1.4", + "version": "1.1.5", "description": "Blockstore implementation with IndexedDB backend", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/blockstore-idb#readme", From bf900b969cd18b9f3e83ff0b87d04f61af7614b0 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 10:40:32 +0000 Subject: [PATCH 12/45] chore(release): 2.1.5 [skip ci] ## [datastore-idb-v2.1.5](https://github.com/ipfs/js-stores/compare/datastore-idb-v2.1.4...datastore-idb-v2.1.5) (2023-11-27) ### Documentation * update datastore core readme and package config ([#245](https://github.com/ipfs/js-stores/issues/245)) ([c08d29a](https://github.com/ipfs/js-stores/commit/c08d29ab18ddea26a1d9dd73d673847469d28a13)) ### Dependencies * **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) --- packages/datastore-idb/CHANGELOG.md | 12 ++++++++++++ packages/datastore-idb/package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/datastore-idb/CHANGELOG.md b/packages/datastore-idb/CHANGELOG.md index 49d59614..64d34b54 100644 --- a/packages/datastore-idb/CHANGELOG.md +++ b/packages/datastore-idb/CHANGELOG.md @@ -1,3 +1,15 @@ +## [datastore-idb-v2.1.5](https://github.com/ipfs/js-stores/compare/datastore-idb-v2.1.4...datastore-idb-v2.1.5) (2023-11-27) + + +### Documentation + +* update datastore core readme and package config ([#245](https://github.com/ipfs/js-stores/issues/245)) ([c08d29a](https://github.com/ipfs/js-stores/commit/c08d29ab18ddea26a1d9dd73d673847469d28a13)) + + +### Dependencies + +* **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) + ## [datastore-idb-v2.1.4](https://github.com/ipfs/js-stores/compare/datastore-idb-v2.1.3...datastore-idb-v2.1.4) (2023-09-05) diff --git a/packages/datastore-idb/package.json b/packages/datastore-idb/package.json index d9eb1db0..a6db9c71 100644 --- a/packages/datastore-idb/package.json +++ b/packages/datastore-idb/package.json @@ -1,6 +1,6 @@ { "name": "datastore-idb", - "version": "2.1.4", + "version": "2.1.5", "description": "Datastore implementation with IndexedDB backend.", "author": "Hugo Dias ", "license": "Apache-2.0 OR MIT", From 2cd965ed62254aef02148c5a824b876932d7480f Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 10:40:49 +0000 Subject: [PATCH 13/45] chore(release): 1.0.8 [skip ci] ## [blockstore-s3-v1.0.8](https://github.com/ipfs/js-stores/compare/blockstore-s3-v1.0.7...blockstore-s3-v1.0.8) (2023-11-27) ### Dependencies * **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) --- packages/blockstore-s3/CHANGELOG.md | 7 +++++++ packages/blockstore-s3/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/blockstore-s3/CHANGELOG.md b/packages/blockstore-s3/CHANGELOG.md index 63987b20..60c3c961 100644 --- a/packages/blockstore-s3/CHANGELOG.md +++ b/packages/blockstore-s3/CHANGELOG.md @@ -1,3 +1,10 @@ +## [blockstore-s3-v1.0.8](https://github.com/ipfs/js-stores/compare/blockstore-s3-v1.0.7...blockstore-s3-v1.0.8) (2023-11-27) + + +### Dependencies + +* **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) + ## [blockstore-s3-v1.0.7](https://github.com/ipfs/js-stores/compare/blockstore-s3-v1.0.6...blockstore-s3-v1.0.7) (2023-09-05) diff --git a/packages/blockstore-s3/package.json b/packages/blockstore-s3/package.json index ea5bad84..74eae444 100644 --- a/packages/blockstore-s3/package.json +++ b/packages/blockstore-s3/package.json @@ -1,6 +1,6 @@ { "name": "blockstore-s3", - "version": "1.0.7", + "version": "1.0.8", "description": "IPFS blockstore implementation backed by s3", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/blockstore-s3#readme", From 20907ffb5813995bba89a8015f36003775b08e3e Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 10:41:03 +0000 Subject: [PATCH 14/45] chore(release): 1.1.7 [skip ci] ## [blockstore-fs-v1.1.7](https://github.com/ipfs/js-stores/compare/blockstore-fs-v1.1.6...blockstore-fs-v1.1.7) (2023-11-27) ### Documentation * update datastore core readme and package config ([#245](https://github.com/ipfs/js-stores/issues/245)) ([c08d29a](https://github.com/ipfs/js-stores/commit/c08d29ab18ddea26a1d9dd73d673847469d28a13)) ### Dependencies * **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) --- packages/blockstore-fs/CHANGELOG.md | 12 ++++++++++++ packages/blockstore-fs/package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/blockstore-fs/CHANGELOG.md b/packages/blockstore-fs/CHANGELOG.md index 6d5f93cc..4fdf62e9 100644 --- a/packages/blockstore-fs/CHANGELOG.md +++ b/packages/blockstore-fs/CHANGELOG.md @@ -1,3 +1,15 @@ +## [blockstore-fs-v1.1.7](https://github.com/ipfs/js-stores/compare/blockstore-fs-v1.1.6...blockstore-fs-v1.1.7) (2023-11-27) + + +### Documentation + +* update datastore core readme and package config ([#245](https://github.com/ipfs/js-stores/issues/245)) ([c08d29a](https://github.com/ipfs/js-stores/commit/c08d29ab18ddea26a1d9dd73d673847469d28a13)) + + +### Dependencies + +* **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) + ## [blockstore-fs-v1.1.6](https://github.com/ipfs/js-stores/compare/blockstore-fs-v1.1.5...blockstore-fs-v1.1.6) (2023-09-05) diff --git a/packages/blockstore-fs/package.json b/packages/blockstore-fs/package.json index a77cc58a..6bc9f4ce 100644 --- a/packages/blockstore-fs/package.json +++ b/packages/blockstore-fs/package.json @@ -1,6 +1,6 @@ { "name": "blockstore-fs", - "version": "1.1.6", + "version": "1.1.7", "description": "Blockstore implementation with file system backend", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/blockstore-fs#readme", From 50763d0ae947918aa9a8da05332a37d2229a6412 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 10:41:21 +0000 Subject: [PATCH 15/45] chore(release): 10.1.5 [skip ci] ## [datastore-level-v10.1.5](https://github.com/ipfs/js-stores/compare/datastore-level-v10.1.4...datastore-level-v10.1.5) (2023-11-27) ### Dependencies * **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) --- packages/datastore-level/CHANGELOG.md | 7 +++++++ packages/datastore-level/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/datastore-level/CHANGELOG.md b/packages/datastore-level/CHANGELOG.md index 4f3a551c..05bbaf47 100644 --- a/packages/datastore-level/CHANGELOG.md +++ b/packages/datastore-level/CHANGELOG.md @@ -1,3 +1,10 @@ +## [datastore-level-v10.1.5](https://github.com/ipfs/js-stores/compare/datastore-level-v10.1.4...datastore-level-v10.1.5) (2023-11-27) + + +### Dependencies + +* **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) + ## [datastore-level-v10.1.4](https://github.com/ipfs/js-stores/compare/datastore-level-v10.1.3...datastore-level-v10.1.4) (2023-09-05) diff --git a/packages/datastore-level/package.json b/packages/datastore-level/package.json index c5671a5b..f2a7439e 100644 --- a/packages/datastore-level/package.json +++ b/packages/datastore-level/package.json @@ -1,6 +1,6 @@ { "name": "datastore-level", - "version": "10.1.4", + "version": "10.1.5", "description": "Datastore implementation with level(up|down) backend", "author": "Friedel Ziegelmayer", "license": "Apache-2.0 OR MIT", From e11f15feebcd31a7638004463b9a2fb2225bbeb2 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 10:41:35 +0000 Subject: [PATCH 16/45] chore(release): 9.1.6 [skip ci] ## [datastore-fs-v9.1.6](https://github.com/ipfs/js-stores/compare/datastore-fs-v9.1.5...datastore-fs-v9.1.6) (2023-11-27) ### Documentation * update datastore core readme and package config ([#245](https://github.com/ipfs/js-stores/issues/245)) ([c08d29a](https://github.com/ipfs/js-stores/commit/c08d29ab18ddea26a1d9dd73d673847469d28a13)) ### Dependencies * **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) --- packages/datastore-fs/CHANGELOG.md | 12 ++++++++++++ packages/datastore-fs/package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/datastore-fs/CHANGELOG.md b/packages/datastore-fs/CHANGELOG.md index b837f31a..9f9683d0 100644 --- a/packages/datastore-fs/CHANGELOG.md +++ b/packages/datastore-fs/CHANGELOG.md @@ -1,3 +1,15 @@ +## [datastore-fs-v9.1.6](https://github.com/ipfs/js-stores/compare/datastore-fs-v9.1.5...datastore-fs-v9.1.6) (2023-11-27) + + +### Documentation + +* update datastore core readme and package config ([#245](https://github.com/ipfs/js-stores/issues/245)) ([c08d29a](https://github.com/ipfs/js-stores/commit/c08d29ab18ddea26a1d9dd73d673847469d28a13)) + + +### Dependencies + +* **dev:** bump aegir from 40.0.13 to 41.1.9 ([#268](https://github.com/ipfs/js-stores/issues/268)) ([0aa0944](https://github.com/ipfs/js-stores/commit/0aa0944d42798d1f6fd589e8a58de7d791760644)) + ## [datastore-fs-v9.1.5](https://github.com/ipfs/js-stores/compare/datastore-fs-v9.1.4...datastore-fs-v9.1.5) (2023-09-05) diff --git a/packages/datastore-fs/package.json b/packages/datastore-fs/package.json index 24687053..2aa68b69 100644 --- a/packages/datastore-fs/package.json +++ b/packages/datastore-fs/package.json @@ -1,6 +1,6 @@ { "name": "datastore-fs", - "version": "9.1.5", + "version": "9.1.6", "description": "Datastore implementation with file system backend", "author": "Friedel Ziegelmayer", "license": "Apache-2.0 OR MIT", From 316d3c54c3a113a8deebc8e53480ac38d40f3a41 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 10:50:38 +0000 Subject: [PATCH 17/45] deps(dev): bump sinon from 15.2.0 to 17.0.1 (#265) * deps(dev): bump sinon from 15.2.0 to 17.0.1 Bumps [sinon](https://github.com/sinonjs/sinon) from 15.2.0 to 17.0.1. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md) - [Commits](https://github.com/sinonjs/sinon/compare/v15.2.0...v17.0.1) --- updated-dependencies: - dependency-name: sinon dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * chore: update types --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: achingbrain --- packages/blockstore-s3/package.json | 4 ++-- packages/datastore-s3/package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/blockstore-s3/package.json b/packages/blockstore-s3/package.json index 74eae444..7abcdd27 100644 --- a/packages/blockstore-s3/package.json +++ b/packages/blockstore-s3/package.json @@ -148,10 +148,10 @@ "uint8arrays": "^4.0.2" }, "devDependencies": { - "@types/sinon": "^10.0.15", + "@types/sinon": "^17.0.2", "aegir": "^41.1.9", "interface-blockstore-tests": "^6.0.0", "p-defer": "^4.0.0", - "sinon": "^15.0.2" + "sinon": "^17.0.1" } } diff --git a/packages/datastore-s3/package.json b/packages/datastore-s3/package.json index 58c5da36..dd45a2cc 100644 --- a/packages/datastore-s3/package.json +++ b/packages/datastore-s3/package.json @@ -148,10 +148,10 @@ "uint8arrays": "^4.0.2" }, "devDependencies": { - "@types/sinon": "^10.0.15", + "@types/sinon": "^17.0.2", "aegir": "^41.1.9", "interface-datastore-tests": "^5.0.0", "p-defer": "^4.0.0", - "sinon": "^15.0.2" + "sinon": "^17.0.1" } } From 02cb8cd82de4174e7c417ea7e45ef7111f38e990 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 10:50:50 +0000 Subject: [PATCH 18/45] deps: bump nanoid from 4.0.2 to 5.0.3 (#269) Bumps [nanoid](https://github.com/ai/nanoid) from 4.0.2 to 5.0.3. - [Release notes](https://github.com/ai/nanoid/releases) - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md) - [Commits](https://github.com/ai/nanoid/compare/4.0.2...5.0.3) --- updated-dependencies: - dependency-name: nanoid dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alex Potsides --- packages/interface-datastore/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/interface-datastore/package.json b/packages/interface-datastore/package.json index 3a5899cf..b021927c 100644 --- a/packages/interface-datastore/package.json +++ b/packages/interface-datastore/package.json @@ -158,7 +158,7 @@ }, "dependencies": { "interface-store": "^5.0.0", - "nanoid": "^4.0.0", + "nanoid": "^5.0.3", "uint8arrays": "^4.0.2" }, "devDependencies": { From becf59fe0849f29644906bc1fe06409a7c3513ef Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 10:59:25 +0000 Subject: [PATCH 19/45] chore(release): 8.2.7 [skip ci] ## [interface-datastore-v8.2.7](https://github.com/ipfs/js-stores/compare/interface-datastore-v8.2.6...interface-datastore-v8.2.7) (2023-11-27) ### Dependencies * bump nanoid from 4.0.2 to 5.0.3 ([#269](https://github.com/ipfs/js-stores/issues/269)) ([02cb8cd](https://github.com/ipfs/js-stores/commit/02cb8cd82de4174e7c417ea7e45ef7111f38e990)) --- packages/interface-datastore/CHANGELOG.md | 7 +++++++ packages/interface-datastore/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/interface-datastore/CHANGELOG.md b/packages/interface-datastore/CHANGELOG.md index 1d66b915..08ed732d 100644 --- a/packages/interface-datastore/CHANGELOG.md +++ b/packages/interface-datastore/CHANGELOG.md @@ -1,3 +1,10 @@ +## [interface-datastore-v8.2.7](https://github.com/ipfs/js-stores/compare/interface-datastore-v8.2.6...interface-datastore-v8.2.7) (2023-11-27) + + +### Dependencies + +* bump nanoid from 4.0.2 to 5.0.3 ([#269](https://github.com/ipfs/js-stores/issues/269)) ([02cb8cd](https://github.com/ipfs/js-stores/commit/02cb8cd82de4174e7c417ea7e45ef7111f38e990)) + ## [interface-datastore-v8.2.6](https://github.com/ipfs/js-stores/compare/interface-datastore-v8.2.5...interface-datastore-v8.2.6) (2023-11-27) diff --git a/packages/interface-datastore/package.json b/packages/interface-datastore/package.json index b021927c..fd5b91db 100644 --- a/packages/interface-datastore/package.json +++ b/packages/interface-datastore/package.json @@ -1,6 +1,6 @@ { "name": "interface-datastore", - "version": "8.2.6", + "version": "8.2.7", "description": "datastore interface", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/interface-datastore#readme", From 17a8e76ad30eb57c0d05a33b9e36ef9da670a9e0 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 11:00:09 +0000 Subject: [PATCH 20/45] chore(release): 11.1.6 [skip ci] ## [datastore-s3-v11.1.6](https://github.com/ipfs/js-stores/compare/datastore-s3-v11.1.5...datastore-s3-v11.1.6) (2023-11-27) ### Dependencies * **dev:** bump sinon from 15.2.0 to 17.0.1 ([#265](https://github.com/ipfs/js-stores/issues/265)) ([316d3c5](https://github.com/ipfs/js-stores/commit/316d3c54c3a113a8deebc8e53480ac38d40f3a41)) --- packages/datastore-s3/CHANGELOG.md | 7 +++++++ packages/datastore-s3/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/datastore-s3/CHANGELOG.md b/packages/datastore-s3/CHANGELOG.md index 8f6fed3b..b45e264c 100644 --- a/packages/datastore-s3/CHANGELOG.md +++ b/packages/datastore-s3/CHANGELOG.md @@ -1,3 +1,10 @@ +## [datastore-s3-v11.1.6](https://github.com/ipfs/js-stores/compare/datastore-s3-v11.1.5...datastore-s3-v11.1.6) (2023-11-27) + + +### Dependencies + +* **dev:** bump sinon from 15.2.0 to 17.0.1 ([#265](https://github.com/ipfs/js-stores/issues/265)) ([316d3c5](https://github.com/ipfs/js-stores/commit/316d3c54c3a113a8deebc8e53480ac38d40f3a41)) + ## [datastore-s3-v11.1.5](https://github.com/ipfs/js-stores/compare/datastore-s3-v11.1.4...datastore-s3-v11.1.5) (2023-11-27) diff --git a/packages/datastore-s3/package.json b/packages/datastore-s3/package.json index dd45a2cc..e8df34f0 100644 --- a/packages/datastore-s3/package.json +++ b/packages/datastore-s3/package.json @@ -1,6 +1,6 @@ { "name": "datastore-s3", - "version": "11.1.5", + "version": "11.1.6", "description": "IPFS datastore implementation backed by s3", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/datastore-s3#readme", From f496d4fb81149b454c0b3bd6a7e58c3bc1e2508a Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 11:00:34 +0000 Subject: [PATCH 21/45] chore(release): 1.0.9 [skip ci] ## [blockstore-s3-v1.0.9](https://github.com/ipfs/js-stores/compare/blockstore-s3-v1.0.8...blockstore-s3-v1.0.9) (2023-11-27) ### Dependencies * **dev:** bump sinon from 15.2.0 to 17.0.1 ([#265](https://github.com/ipfs/js-stores/issues/265)) ([316d3c5](https://github.com/ipfs/js-stores/commit/316d3c54c3a113a8deebc8e53480ac38d40f3a41)) --- packages/blockstore-s3/CHANGELOG.md | 7 +++++++ packages/blockstore-s3/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/blockstore-s3/CHANGELOG.md b/packages/blockstore-s3/CHANGELOG.md index 60c3c961..0a141938 100644 --- a/packages/blockstore-s3/CHANGELOG.md +++ b/packages/blockstore-s3/CHANGELOG.md @@ -1,3 +1,10 @@ +## [blockstore-s3-v1.0.9](https://github.com/ipfs/js-stores/compare/blockstore-s3-v1.0.8...blockstore-s3-v1.0.9) (2023-11-27) + + +### Dependencies + +* **dev:** bump sinon from 15.2.0 to 17.0.1 ([#265](https://github.com/ipfs/js-stores/issues/265)) ([316d3c5](https://github.com/ipfs/js-stores/commit/316d3c54c3a113a8deebc8e53480ac38d40f3a41)) + ## [blockstore-s3-v1.0.8](https://github.com/ipfs/js-stores/compare/blockstore-s3-v1.0.7...blockstore-s3-v1.0.8) (2023-11-27) diff --git a/packages/blockstore-s3/package.json b/packages/blockstore-s3/package.json index 7abcdd27..64f6c934 100644 --- a/packages/blockstore-s3/package.json +++ b/packages/blockstore-s3/package.json @@ -1,6 +1,6 @@ { "name": "blockstore-s3", - "version": "1.0.8", + "version": "1.0.9", "description": "IPFS blockstore implementation backed by s3", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/blockstore-s3#readme", From e840ed4f0e601062c7cb727bd71390381644caa6 Mon Sep 17 00:00:00 2001 From: Marcel Gleeson Date: Mon, 27 Nov 2023 22:49:21 +1100 Subject: [PATCH 22/45] fix: incorrect export path (#273) Solves this error: ``` Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'node_modules/datastore-s3/src/index.js' ``` Co-authored-by: Alex Potsides --- packages/blockstore-s3/package.json | 2 +- packages/datastore-s3/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/blockstore-s3/package.json b/packages/blockstore-s3/package.json index 64f6c934..df99a9c2 100644 --- a/packages/blockstore-s3/package.json +++ b/packages/blockstore-s3/package.json @@ -29,7 +29,7 @@ "exports": { ".": { "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/src/index.js" } }, "eslintConfig": { diff --git a/packages/datastore-s3/package.json b/packages/datastore-s3/package.json index e8df34f0..0eca5639 100644 --- a/packages/datastore-s3/package.json +++ b/packages/datastore-s3/package.json @@ -29,7 +29,7 @@ "exports": { ".": { "types": "./dist/src/index.d.ts", - "import": "./src/index.js" + "import": "./dist/src/index.js" } }, "eslintConfig": { From 663ae051d6b23ed76bf7533db767f6de183690a5 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 11:58:54 +0000 Subject: [PATCH 23/45] chore(release): 11.1.7 [skip ci] ## [datastore-s3-v11.1.7](https://github.com/ipfs/js-stores/compare/datastore-s3-v11.1.6...datastore-s3-v11.1.7) (2023-11-27) ### Bug Fixes * incorrect export path ([#273](https://github.com/ipfs/js-stores/issues/273)) ([e840ed4](https://github.com/ipfs/js-stores/commit/e840ed4f0e601062c7cb727bd71390381644caa6)) --- packages/datastore-s3/CHANGELOG.md | 7 +++++++ packages/datastore-s3/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/datastore-s3/CHANGELOG.md b/packages/datastore-s3/CHANGELOG.md index b45e264c..0e14cf2e 100644 --- a/packages/datastore-s3/CHANGELOG.md +++ b/packages/datastore-s3/CHANGELOG.md @@ -1,3 +1,10 @@ +## [datastore-s3-v11.1.7](https://github.com/ipfs/js-stores/compare/datastore-s3-v11.1.6...datastore-s3-v11.1.7) (2023-11-27) + + +### Bug Fixes + +* incorrect export path ([#273](https://github.com/ipfs/js-stores/issues/273)) ([e840ed4](https://github.com/ipfs/js-stores/commit/e840ed4f0e601062c7cb727bd71390381644caa6)) + ## [datastore-s3-v11.1.6](https://github.com/ipfs/js-stores/compare/datastore-s3-v11.1.5...datastore-s3-v11.1.6) (2023-11-27) diff --git a/packages/datastore-s3/package.json b/packages/datastore-s3/package.json index 0eca5639..29b74dae 100644 --- a/packages/datastore-s3/package.json +++ b/packages/datastore-s3/package.json @@ -1,6 +1,6 @@ { "name": "datastore-s3", - "version": "11.1.6", + "version": "11.1.7", "description": "IPFS datastore implementation backed by s3", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/datastore-s3#readme", From f87dd444ff0cc27ed81f9ecf19de1d06df4ab03e Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 27 Nov 2023 11:59:17 +0000 Subject: [PATCH 24/45] chore(release): 1.0.10 [skip ci] ## [blockstore-s3-v1.0.10](https://github.com/ipfs/js-stores/compare/blockstore-s3-v1.0.9...blockstore-s3-v1.0.10) (2023-11-27) ### Bug Fixes * incorrect export path ([#273](https://github.com/ipfs/js-stores/issues/273)) ([e840ed4](https://github.com/ipfs/js-stores/commit/e840ed4f0e601062c7cb727bd71390381644caa6)) --- packages/blockstore-s3/CHANGELOG.md | 7 +++++++ packages/blockstore-s3/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/blockstore-s3/CHANGELOG.md b/packages/blockstore-s3/CHANGELOG.md index 0a141938..7f582580 100644 --- a/packages/blockstore-s3/CHANGELOG.md +++ b/packages/blockstore-s3/CHANGELOG.md @@ -1,3 +1,10 @@ +## [blockstore-s3-v1.0.10](https://github.com/ipfs/js-stores/compare/blockstore-s3-v1.0.9...blockstore-s3-v1.0.10) (2023-11-27) + + +### Bug Fixes + +* incorrect export path ([#273](https://github.com/ipfs/js-stores/issues/273)) ([e840ed4](https://github.com/ipfs/js-stores/commit/e840ed4f0e601062c7cb727bd71390381644caa6)) + ## [blockstore-s3-v1.0.9](https://github.com/ipfs/js-stores/compare/blockstore-s3-v1.0.8...blockstore-s3-v1.0.9) (2023-11-27) diff --git a/packages/blockstore-s3/package.json b/packages/blockstore-s3/package.json index df99a9c2..f256f2b2 100644 --- a/packages/blockstore-s3/package.json +++ b/packages/blockstore-s3/package.json @@ -1,6 +1,6 @@ { "name": "blockstore-s3", - "version": "1.0.9", + "version": "1.0.10", "description": "IPFS blockstore implementation backed by s3", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/blockstore-s3#readme", From ab4731f49a1a6f9163fb9c246121b3392503ba8b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Dec 2023 12:57:32 +0000 Subject: [PATCH 25/45] deps: bump @libp2p/logger from 3.1.0 to 4.0.1 (#280) Bumps [@libp2p/logger](https://github.com/libp2p/js-libp2p) from 3.1.0 to 4.0.1. - [Release notes](https://github.com/libp2p/js-libp2p/releases) - [Changelog](https://github.com/libp2p/js-libp2p/blob/main/.release-please.json) - [Commits](https://github.com/libp2p/js-libp2p/compare/logger-v3.1.0...utils-v4.0.1) --- updated-dependencies: - dependency-name: "@libp2p/logger" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- packages/blockstore-core/package.json | 2 +- packages/datastore-core/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/blockstore-core/package.json b/packages/blockstore-core/package.json index 5760203c..bdceff13 100644 --- a/packages/blockstore-core/package.json +++ b/packages/blockstore-core/package.json @@ -175,7 +175,7 @@ "dep-check": "aegir dep-check" }, "dependencies": { - "@libp2p/logger": "^3.0.0", + "@libp2p/logger": "^4.0.1", "err-code": "^3.0.1", "interface-blockstore": "^5.0.0", "interface-store": "^5.0.0", diff --git a/packages/datastore-core/package.json b/packages/datastore-core/package.json index 7ff7f53b..b37bc834 100644 --- a/packages/datastore-core/package.json +++ b/packages/datastore-core/package.json @@ -195,7 +195,7 @@ "dep-check": "aegir dep-check" }, "dependencies": { - "@libp2p/logger": "^3.0.0", + "@libp2p/logger": "^4.0.1", "err-code": "^3.0.1", "interface-store": "^5.0.0", "it-all": "^3.0.1", From a67f66a205b1326ec69335a3b5211421c70cab1e Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 1 Dec 2023 13:07:12 +0000 Subject: [PATCH 26/45] chore(release): 4.3.6 [skip ci] ## [blockstore-core-v4.3.6](https://github.com/ipfs/js-stores/compare/blockstore-core-v4.3.5...blockstore-core-v4.3.6) (2023-12-01) ### Dependencies * bump @libp2p/logger from 3.1.0 to 4.0.1 ([#280](https://github.com/ipfs/js-stores/issues/280)) ([ab4731f](https://github.com/ipfs/js-stores/commit/ab4731f49a1a6f9163fb9c246121b3392503ba8b)) --- packages/blockstore-core/CHANGELOG.md | 7 +++++++ packages/blockstore-core/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/blockstore-core/CHANGELOG.md b/packages/blockstore-core/CHANGELOG.md index 6a3bc4ef..0908a879 100644 --- a/packages/blockstore-core/CHANGELOG.md +++ b/packages/blockstore-core/CHANGELOG.md @@ -1,3 +1,10 @@ +## [blockstore-core-v4.3.6](https://github.com/ipfs/js-stores/compare/blockstore-core-v4.3.5...blockstore-core-v4.3.6) (2023-12-01) + + +### Dependencies + +* bump @libp2p/logger from 3.1.0 to 4.0.1 ([#280](https://github.com/ipfs/js-stores/issues/280)) ([ab4731f](https://github.com/ipfs/js-stores/commit/ab4731f49a1a6f9163fb9c246121b3392503ba8b)) + ## [blockstore-core-v4.3.5](https://github.com/ipfs/js-stores/compare/blockstore-core-v4.3.4...blockstore-core-v4.3.5) (2023-11-27) diff --git a/packages/blockstore-core/package.json b/packages/blockstore-core/package.json index bdceff13..ff846b50 100644 --- a/packages/blockstore-core/package.json +++ b/packages/blockstore-core/package.json @@ -1,6 +1,6 @@ { "name": "blockstore-core", - "version": "4.3.5", + "version": "4.3.6", "description": "Contains various implementations of the API contract described in interface-blockstore", "author": "Alex Potsides ", "license": "Apache-2.0 OR MIT", From be4f27d0eefaa873382f2b01bcd298b592197834 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 1 Dec 2023 13:07:34 +0000 Subject: [PATCH 27/45] chore(release): 9.2.5 [skip ci] ## [datastore-core-v9.2.5](https://github.com/ipfs/js-stores/compare/datastore-core-v9.2.4...datastore-core-v9.2.5) (2023-12-01) ### Dependencies * bump @libp2p/logger from 3.1.0 to 4.0.1 ([#280](https://github.com/ipfs/js-stores/issues/280)) ([ab4731f](https://github.com/ipfs/js-stores/commit/ab4731f49a1a6f9163fb9c246121b3392503ba8b)) --- packages/datastore-core/CHANGELOG.md | 7 +++++++ packages/datastore-core/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/datastore-core/CHANGELOG.md b/packages/datastore-core/CHANGELOG.md index de208108..a9b74cf1 100644 --- a/packages/datastore-core/CHANGELOG.md +++ b/packages/datastore-core/CHANGELOG.md @@ -1,3 +1,10 @@ +## [datastore-core-v9.2.5](https://github.com/ipfs/js-stores/compare/datastore-core-v9.2.4...datastore-core-v9.2.5) (2023-12-01) + + +### Dependencies + +* bump @libp2p/logger from 3.1.0 to 4.0.1 ([#280](https://github.com/ipfs/js-stores/issues/280)) ([ab4731f](https://github.com/ipfs/js-stores/commit/ab4731f49a1a6f9163fb9c246121b3392503ba8b)) + ## [datastore-core-v9.2.4](https://github.com/ipfs/js-stores/compare/datastore-core-v9.2.3...datastore-core-v9.2.4) (2023-11-27) diff --git a/packages/datastore-core/package.json b/packages/datastore-core/package.json index b37bc834..97626c5d 100644 --- a/packages/datastore-core/package.json +++ b/packages/datastore-core/package.json @@ -1,6 +1,6 @@ { "name": "datastore-core", - "version": "9.2.4", + "version": "9.2.5", "description": "Wrapper implementation for interface-datastore", "author": "Friedel Ziegelmayer ", "license": "Apache-2.0 OR MIT", From f5506243b2cb1e6462457241a1614bd5f0755c12 Mon Sep 17 00:00:00 2001 From: Marcel Gleeson Date: Sat, 2 Dec 2023 06:24:09 +1100 Subject: [PATCH 28/45] fix: cleanup references to datastore in blockstores (#274) Docs code comments and specs refer to datastores within blockstore packages. Theres also as small change to an error and exported type https://github.com/ipfs/js-stores/commit/e3302b697c97db7f8add70bb1ab9530cfa7ff928 --------- Co-authored-by: aegir[bot] Co-authored-by: Alex Potsides --- packages/blockstore-core/test/tiered.spec.ts | 2 +- packages/blockstore-fs/src/index.ts | 2 +- packages/blockstore-idb/src/index.ts | 4 ++-- packages/blockstore-level/src/index.ts | 2 +- packages/blockstore-level/test/node.ts | 2 +- packages/blockstore-s3/README.md | 18 +++++++++++++----- .../blockstore-s3/examples/helia/README.md | 4 ++-- packages/blockstore-s3/examples/helia/index.js | 6 +++--- .../blockstore-s3/examples/helia/package.json | 2 +- packages/blockstore-s3/package.json | 2 +- packages/blockstore-s3/src/index.ts | 18 +++++++++++++----- packages/blockstore-s3/test/utils/s3-mock.ts | 2 +- packages/datastore-idb/src/index.ts | 2 +- packages/datastore-s3/README.md | 18 +++++++++++++----- packages/datastore-s3/src/index.ts | 18 +++++++++++++----- 15 files changed, 67 insertions(+), 35 deletions(-) diff --git a/packages/blockstore-core/test/tiered.spec.ts b/packages/blockstore-core/test/tiered.spec.ts index 9f15b6f4..f56dd7b9 100644 --- a/packages/blockstore-core/test/tiered.spec.ts +++ b/packages/blockstore-core/test/tiered.spec.ts @@ -54,7 +54,7 @@ describe('Tiered', () => { }) }) - describe('inteface-datastore-single', () => { + describe('inteface-blockstore-single', () => { interfaceBlockstoreTests({ setup () { return new TieredBlockstore([ diff --git a/packages/blockstore-fs/src/index.ts b/packages/blockstore-fs/src/index.ts index c029b0e4..b2e0af65 100644 --- a/packages/blockstore-fs/src/index.ts +++ b/packages/blockstore-fs/src/index.ts @@ -257,7 +257,7 @@ export class FsBlockstore implements Blockstore { yield pair } catch (err: any) { - // if keys are removed from the datastore while the query is + // if keys are removed from the blockstore while the query is // running, we may encounter missing files. if (err.code !== 'ENOENT') { throw err diff --git a/packages/blockstore-idb/src/index.ts b/packages/blockstore-idb/src/index.ts index 27b6882b..51048a1d 100644 --- a/packages/blockstore-idb/src/index.ts +++ b/packages/blockstore-idb/src/index.ts @@ -25,7 +25,7 @@ import type { Pair } from 'interface-blockstore' import type { AbortOptions, AwaitIterable } from 'interface-store' import type { MultibaseCodec } from 'multiformats/bases/interface' -export interface IDBDatastoreInit { +export interface IDBBlockstoreInit { /** * A prefix to use for all database keys (default: '') */ @@ -49,7 +49,7 @@ export class IDBBlockstore extends BaseBlockstore { private db?: IDBPDatabase private readonly base: MultibaseCodec - constructor (location: string, init: IDBDatastoreInit = {}) { + constructor (location: string, init: IDBBlockstoreInit = {}) { super() this.location = `${init.prefix ?? ''}${location}` diff --git a/packages/blockstore-level/src/index.ts b/packages/blockstore-level/src/index.ts index 22ac0ab5..21383ce3 100644 --- a/packages/blockstore-level/src/index.ts +++ b/packages/blockstore-level/src/index.ts @@ -34,7 +34,7 @@ export interface LevelBlockstoreInit extends DatabaseOptions } /** - * A datastore backed by leveldb + * A blockstore backed by leveldb */ export class LevelBlockstore extends BaseBlockstore { public db: Level diff --git a/packages/blockstore-level/test/node.ts b/packages/blockstore-level/test/node.ts index db104ccc..d184c1ed 100644 --- a/packages/blockstore-level/test/node.ts +++ b/packages/blockstore-level/test/node.ts @@ -7,7 +7,7 @@ import { interfaceBlockstoreTests } from 'interface-blockstore-tests' import tempdir from 'ipfs-utils/src/temp-dir.js' import { LevelBlockstore } from '../src/index.js' -describe('LevelDatastore', () => { +describe('LevelBlockstore', () => { describe('interface-blockstore (leveldown)', () => { interfaceBlockstoreTests({ async setup () { diff --git a/packages/blockstore-s3/README.md b/packages/blockstore-s3/README.md index c57f45e6..874db8f0 100644 --- a/packages/blockstore-s3/README.md +++ b/packages/blockstore-s3/README.md @@ -14,14 +14,22 @@ A Blockstore implementation that stores blocks on Amazon S3. If the flag `createIfMissing` is not set or is false, then the bucket must be created prior to using blockstore-s3. Please see the AWS docs for information on how to configure the S3 instance. A bucket name is required to be set at the s3 instance level, see the below example. ```js -import S3 from 'aws-sdk/clients/s3.js' +import { S3 } from '@aws-sdk/client-s3' import { S3Blockstore } from 'blockstore-s3' -const s3Instance = new S3({ params: { Bucket: 'my-ipfs-bucket' } }) -const store = new S3Blockstore('.ipfs/datastore', { - s3: s3Instance - createIfMissing: false +const s3 = new S3({ + region: 'region', + credentials: { + accessKeyId: 'myaccesskey', + secretAccessKey: 'mysecretkey' + } }) + +const store = new S3Blockstore( + s3, + 'my-bucket', + { createIfMissing: false } +) ``` ## Example diff --git a/packages/blockstore-s3/examples/helia/README.md b/packages/blockstore-s3/examples/helia/README.md index b9bd8027..1fbb0e0b 100644 --- a/packages/blockstore-s3/examples/helia/README.md +++ b/packages/blockstore-s3/examples/helia/README.md @@ -1,7 +1,7 @@ Use with Helia ====== -This example uses a Datastore S3 instance to serve as the entire backend for Helia. +This example uses a Blockstore S3 instance to serve as the entire backend for Helia. ## Running The S3 parameters must be updated with an existing Bucket and credentials with access to it: @@ -15,7 +15,7 @@ const s3 = new S3({ } }) -const datastore = new DatastoreS3(s3, 'my-bucket') +const blockstore = new BlockstoreS3(s3, 'my-bucket') ``` Once the S3 instance has its needed data, you can run the example: diff --git a/packages/blockstore-s3/examples/helia/index.js b/packages/blockstore-s3/examples/helia/index.js index 0de17895..6940f74a 100644 --- a/packages/blockstore-s3/examples/helia/index.js +++ b/packages/blockstore-s3/examples/helia/index.js @@ -2,7 +2,7 @@ import { createHelia } from 'helia' import { unixfs } from '@helia/unixfs' import toBuffer from 'it-to-buffer' import { S3 } from '@aws-sdk/client-s3' -import { DatastoreS3 } from 'datastore-s3' +import { BlockstoreS3 } from 'blockstore-s3' async function main () { // Configure S3 as normal @@ -14,12 +14,12 @@ async function main () { } }) - const datastore = new DatastoreS3(s3, 'my-bucket') + const blockstore = new BlockstoreS3(s3, 'my-bucket') // Create a new Helia node with our S3 backed Repo console.log('Start Helia') const node = await createHelia({ - datastore + blockstore }) // Test out the repo by sending and fetching some data diff --git a/packages/blockstore-s3/examples/helia/package.json b/packages/blockstore-s3/examples/helia/package.json index 0d887034..938432ec 100644 --- a/packages/blockstore-s3/examples/helia/package.json +++ b/packages/blockstore-s3/examples/helia/package.json @@ -12,7 +12,7 @@ "dependencies": { "@aws-sdk/client-s3": "^3.297.0", "@helia/unixfs": "^1.2.0", - "datastore-s3": "../../", + "blockstore-s3": "../../", "helia": "^1.0.0", "it-to-buffer": "^3.0.1" } diff --git a/packages/blockstore-s3/package.json b/packages/blockstore-s3/package.json index f256f2b2..a33675f0 100644 --- a/packages/blockstore-s3/package.json +++ b/packages/blockstore-s3/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/ipfs/js-stores/issues" }, "keywords": [ - "datastore", + "blockstore", "interface", "ipfs", "key-value", diff --git a/packages/blockstore-s3/src/index.ts b/packages/blockstore-s3/src/index.ts index 4757866f..c41b6397 100644 --- a/packages/blockstore-s3/src/index.ts +++ b/packages/blockstore-s3/src/index.ts @@ -8,14 +8,22 @@ * If the flag `createIfMissing` is not set or is false, then the bucket must be created prior to using blockstore-s3. Please see the AWS docs for information on how to configure the S3 instance. A bucket name is required to be set at the s3 instance level, see the below example. * * ```js - * import S3 from 'aws-sdk/clients/s3.js' + * import { S3 } from '@aws-sdk/client-s3' * import { S3Blockstore } from 'blockstore-s3' * - * const s3Instance = new S3({ params: { Bucket: 'my-ipfs-bucket' } }) - * const store = new S3Blockstore('.ipfs/datastore', { - * s3: s3Instance - * createIfMissing: false + * const s3 = new S3({ + * region: 'region', + * credentials: { + * accessKeyId: 'myaccesskey', + * secretAccessKey: 'mysecretkey' + * } * }) + * + * const store = new S3Blockstore( + * s3, + * 'my-bucket', + * { createIfMissing: false } + * ) * ``` * * @example Using with Helia diff --git a/packages/blockstore-s3/test/utils/s3-mock.ts b/packages/blockstore-s3/test/utils/s3-mock.ts index f49ea81a..1b4aadd5 100644 --- a/packages/blockstore-s3/test/utils/s3-mock.ts +++ b/packages/blockstore-s3/test/utils/s3-mock.ts @@ -26,7 +26,7 @@ export const s3Reject = (err: T): any => { } /** - * Mocks out the s3 calls made by datastore-s3 + * Mocks out the s3 calls made by blockstore-s3 */ export function s3Mock (s3: S3): S3 { const mocks: any = {} diff --git a/packages/datastore-idb/src/index.ts b/packages/datastore-idb/src/index.ts index 8d50ee12..b6b2e935 100644 --- a/packages/datastore-idb/src/index.ts +++ b/packages/datastore-idb/src/index.ts @@ -96,7 +96,7 @@ export class IDBDatastore extends BaseDatastore { async has (key: Key): Promise { if (this.db == null) { - throw new Error('Blockstore needs to be opened.') + throw new Error('Datastore needs to be opened.') } try { diff --git a/packages/datastore-s3/README.md b/packages/datastore-s3/README.md index 9a6a7ba3..608d7801 100644 --- a/packages/datastore-s3/README.md +++ b/packages/datastore-s3/README.md @@ -14,14 +14,22 @@ A Datastore implementation that stores data on Amazon S3. If the flag `createIfMissing` is not set or is false, then the bucket must be created prior to using datastore-s3. Please see the AWS docs for information on how to configure the S3 instance. A bucket name is required to be set at the s3 instance level, see the below example. ```js -import S3 from 'aws-sdk/clients/s3.js' +import { S3 } from '@aws-sdk/client-s3' import { S3Datastore } from 'datastore-s3' -const s3Instance = new S3({ params: { Bucket: 'my-ipfs-bucket' } }) -const store = new S3Datastore('.ipfs/datastore', { - s3: s3Instance - createIfMissing: false +const s3 = new S3({ + region: 'region', + credentials: { + accessKeyId: 'myaccesskey', + secretAccessKey: 'mysecretkey' + } }) + +const store = new S3Datastore( + s3, + 'my-bucket', + { path: '.ipfs/datastore', createIfMissing: false } +) ``` ## Example diff --git a/packages/datastore-s3/src/index.ts b/packages/datastore-s3/src/index.ts index d072898a..9d464f3f 100644 --- a/packages/datastore-s3/src/index.ts +++ b/packages/datastore-s3/src/index.ts @@ -8,14 +8,22 @@ * If the flag `createIfMissing` is not set or is false, then the bucket must be created prior to using datastore-s3. Please see the AWS docs for information on how to configure the S3 instance. A bucket name is required to be set at the s3 instance level, see the below example. * * ```js - * import S3 from 'aws-sdk/clients/s3.js' + * import { S3 } from '@aws-sdk/client-s3' * import { S3Datastore } from 'datastore-s3' * - * const s3Instance = new S3({ params: { Bucket: 'my-ipfs-bucket' } }) - * const store = new S3Datastore('.ipfs/datastore', { - * s3: s3Instance - * createIfMissing: false + * const s3 = new S3({ + * region: 'region', + * credentials: { + * accessKeyId: 'myaccesskey', + * secretAccessKey: 'mysecretkey' + * } * }) + * + * const store = new S3Datastore( + * s3, + * 'my-bucket', + * { path: '.ipfs/datastore', createIfMissing: false } + * ) * ``` * * @example Using with Helia From ee2203a2c7ea14dc73286f58feb5e0af9fb9075c Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 1 Dec 2023 19:33:50 +0000 Subject: [PATCH 29/45] chore(release): 4.3.7 [skip ci] ## [blockstore-core-v4.3.7](https://github.com/ipfs/js-stores/compare/blockstore-core-v4.3.6...blockstore-core-v4.3.7) (2023-12-01) ### Bug Fixes * cleanup references to datastore in blockstores ([#274](https://github.com/ipfs/js-stores/issues/274)) ([f550624](https://github.com/ipfs/js-stores/commit/f5506243b2cb1e6462457241a1614bd5f0755c12)) --- packages/blockstore-core/CHANGELOG.md | 7 +++++++ packages/blockstore-core/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/blockstore-core/CHANGELOG.md b/packages/blockstore-core/CHANGELOG.md index 0908a879..4c4576f3 100644 --- a/packages/blockstore-core/CHANGELOG.md +++ b/packages/blockstore-core/CHANGELOG.md @@ -1,3 +1,10 @@ +## [blockstore-core-v4.3.7](https://github.com/ipfs/js-stores/compare/blockstore-core-v4.3.6...blockstore-core-v4.3.7) (2023-12-01) + + +### Bug Fixes + +* cleanup references to datastore in blockstores ([#274](https://github.com/ipfs/js-stores/issues/274)) ([f550624](https://github.com/ipfs/js-stores/commit/f5506243b2cb1e6462457241a1614bd5f0755c12)) + ## [blockstore-core-v4.3.6](https://github.com/ipfs/js-stores/compare/blockstore-core-v4.3.5...blockstore-core-v4.3.6) (2023-12-01) diff --git a/packages/blockstore-core/package.json b/packages/blockstore-core/package.json index ff846b50..e780d9e2 100644 --- a/packages/blockstore-core/package.json +++ b/packages/blockstore-core/package.json @@ -1,6 +1,6 @@ { "name": "blockstore-core", - "version": "4.3.6", + "version": "4.3.7", "description": "Contains various implementations of the API contract described in interface-blockstore", "author": "Alex Potsides ", "license": "Apache-2.0 OR MIT", From c786bdc58a173910865ad2cd5c1544b17ecaf3a4 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 1 Dec 2023 19:34:06 +0000 Subject: [PATCH 30/45] chore(release): 1.1.6 [skip ci] ## [blockstore-level-v1.1.6](https://github.com/ipfs/js-stores/compare/blockstore-level-v1.1.5...blockstore-level-v1.1.6) (2023-12-01) ### Bug Fixes * cleanup references to datastore in blockstores ([#274](https://github.com/ipfs/js-stores/issues/274)) ([f550624](https://github.com/ipfs/js-stores/commit/f5506243b2cb1e6462457241a1614bd5f0755c12)) --- packages/blockstore-level/CHANGELOG.md | 7 +++++++ packages/blockstore-level/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/blockstore-level/CHANGELOG.md b/packages/blockstore-level/CHANGELOG.md index ac65a277..37d44b30 100644 --- a/packages/blockstore-level/CHANGELOG.md +++ b/packages/blockstore-level/CHANGELOG.md @@ -1,3 +1,10 @@ +## [blockstore-level-v1.1.6](https://github.com/ipfs/js-stores/compare/blockstore-level-v1.1.5...blockstore-level-v1.1.6) (2023-12-01) + + +### Bug Fixes + +* cleanup references to datastore in blockstores ([#274](https://github.com/ipfs/js-stores/issues/274)) ([f550624](https://github.com/ipfs/js-stores/commit/f5506243b2cb1e6462457241a1614bd5f0755c12)) + ## [blockstore-level-v1.1.5](https://github.com/ipfs/js-stores/compare/blockstore-level-v1.1.4...blockstore-level-v1.1.5) (2023-11-27) diff --git a/packages/blockstore-level/package.json b/packages/blockstore-level/package.json index 8afaf48d..99728f26 100644 --- a/packages/blockstore-level/package.json +++ b/packages/blockstore-level/package.json @@ -1,6 +1,6 @@ { "name": "blockstore-level", - "version": "1.1.5", + "version": "1.1.6", "description": "Blockstore implementation with level(up|down) backend", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/blockstore-level#readme", From c5c79d098109ee58e1fa2698569e9ce452013b11 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 1 Dec 2023 19:34:28 +0000 Subject: [PATCH 31/45] chore(release): 11.1.8 [skip ci] ## [datastore-s3-v11.1.8](https://github.com/ipfs/js-stores/compare/datastore-s3-v11.1.7...datastore-s3-v11.1.8) (2023-12-01) ### Bug Fixes * cleanup references to datastore in blockstores ([#274](https://github.com/ipfs/js-stores/issues/274)) ([f550624](https://github.com/ipfs/js-stores/commit/f5506243b2cb1e6462457241a1614bd5f0755c12)) --- packages/datastore-s3/CHANGELOG.md | 7 +++++++ packages/datastore-s3/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/datastore-s3/CHANGELOG.md b/packages/datastore-s3/CHANGELOG.md index 0e14cf2e..42e0a12a 100644 --- a/packages/datastore-s3/CHANGELOG.md +++ b/packages/datastore-s3/CHANGELOG.md @@ -1,3 +1,10 @@ +## [datastore-s3-v11.1.8](https://github.com/ipfs/js-stores/compare/datastore-s3-v11.1.7...datastore-s3-v11.1.8) (2023-12-01) + + +### Bug Fixes + +* cleanup references to datastore in blockstores ([#274](https://github.com/ipfs/js-stores/issues/274)) ([f550624](https://github.com/ipfs/js-stores/commit/f5506243b2cb1e6462457241a1614bd5f0755c12)) + ## [datastore-s3-v11.1.7](https://github.com/ipfs/js-stores/compare/datastore-s3-v11.1.6...datastore-s3-v11.1.7) (2023-11-27) diff --git a/packages/datastore-s3/package.json b/packages/datastore-s3/package.json index 29b74dae..bac08ff4 100644 --- a/packages/datastore-s3/package.json +++ b/packages/datastore-s3/package.json @@ -1,6 +1,6 @@ { "name": "datastore-s3", - "version": "11.1.7", + "version": "11.1.8", "description": "IPFS datastore implementation backed by s3", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/datastore-s3#readme", From 91e4845e6b431c96d76223f402c42395d4089db6 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 1 Dec 2023 19:34:44 +0000 Subject: [PATCH 32/45] chore(release): 1.1.6 [skip ci] ## [blockstore-idb-v1.1.6](https://github.com/ipfs/js-stores/compare/blockstore-idb-v1.1.5...blockstore-idb-v1.1.6) (2023-12-01) ### Bug Fixes * cleanup references to datastore in blockstores ([#274](https://github.com/ipfs/js-stores/issues/274)) ([f550624](https://github.com/ipfs/js-stores/commit/f5506243b2cb1e6462457241a1614bd5f0755c12)) --- packages/blockstore-idb/CHANGELOG.md | 7 +++++++ packages/blockstore-idb/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/blockstore-idb/CHANGELOG.md b/packages/blockstore-idb/CHANGELOG.md index c1a359ba..08bae675 100644 --- a/packages/blockstore-idb/CHANGELOG.md +++ b/packages/blockstore-idb/CHANGELOG.md @@ -1,3 +1,10 @@ +## [blockstore-idb-v1.1.6](https://github.com/ipfs/js-stores/compare/blockstore-idb-v1.1.5...blockstore-idb-v1.1.6) (2023-12-01) + + +### Bug Fixes + +* cleanup references to datastore in blockstores ([#274](https://github.com/ipfs/js-stores/issues/274)) ([f550624](https://github.com/ipfs/js-stores/commit/f5506243b2cb1e6462457241a1614bd5f0755c12)) + ## [blockstore-idb-v1.1.5](https://github.com/ipfs/js-stores/compare/blockstore-idb-v1.1.4...blockstore-idb-v1.1.5) (2023-11-27) diff --git a/packages/blockstore-idb/package.json b/packages/blockstore-idb/package.json index c1437e5f..185eda6d 100644 --- a/packages/blockstore-idb/package.json +++ b/packages/blockstore-idb/package.json @@ -1,6 +1,6 @@ { "name": "blockstore-idb", - "version": "1.1.5", + "version": "1.1.6", "description": "Blockstore implementation with IndexedDB backend", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/blockstore-idb#readme", From 1ca88ca943756ea3bc6a465c3267b1bed2738789 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 1 Dec 2023 19:35:00 +0000 Subject: [PATCH 33/45] chore(release): 2.1.6 [skip ci] ## [datastore-idb-v2.1.6](https://github.com/ipfs/js-stores/compare/datastore-idb-v2.1.5...datastore-idb-v2.1.6) (2023-12-01) ### Bug Fixes * cleanup references to datastore in blockstores ([#274](https://github.com/ipfs/js-stores/issues/274)) ([f550624](https://github.com/ipfs/js-stores/commit/f5506243b2cb1e6462457241a1614bd5f0755c12)) --- packages/datastore-idb/CHANGELOG.md | 7 +++++++ packages/datastore-idb/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/datastore-idb/CHANGELOG.md b/packages/datastore-idb/CHANGELOG.md index 64d34b54..6f70babb 100644 --- a/packages/datastore-idb/CHANGELOG.md +++ b/packages/datastore-idb/CHANGELOG.md @@ -1,3 +1,10 @@ +## [datastore-idb-v2.1.6](https://github.com/ipfs/js-stores/compare/datastore-idb-v2.1.5...datastore-idb-v2.1.6) (2023-12-01) + + +### Bug Fixes + +* cleanup references to datastore in blockstores ([#274](https://github.com/ipfs/js-stores/issues/274)) ([f550624](https://github.com/ipfs/js-stores/commit/f5506243b2cb1e6462457241a1614bd5f0755c12)) + ## [datastore-idb-v2.1.5](https://github.com/ipfs/js-stores/compare/datastore-idb-v2.1.4...datastore-idb-v2.1.5) (2023-11-27) diff --git a/packages/datastore-idb/package.json b/packages/datastore-idb/package.json index a6db9c71..a3abb828 100644 --- a/packages/datastore-idb/package.json +++ b/packages/datastore-idb/package.json @@ -1,6 +1,6 @@ { "name": "datastore-idb", - "version": "2.1.5", + "version": "2.1.6", "description": "Datastore implementation with IndexedDB backend.", "author": "Hugo Dias ", "license": "Apache-2.0 OR MIT", From d292758334aa3960d30513dd238afab2765f68f5 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 1 Dec 2023 19:35:15 +0000 Subject: [PATCH 34/45] chore(release): 1.0.11 [skip ci] ## [blockstore-s3-v1.0.11](https://github.com/ipfs/js-stores/compare/blockstore-s3-v1.0.10...blockstore-s3-v1.0.11) (2023-12-01) ### Bug Fixes * cleanup references to datastore in blockstores ([#274](https://github.com/ipfs/js-stores/issues/274)) ([f550624](https://github.com/ipfs/js-stores/commit/f5506243b2cb1e6462457241a1614bd5f0755c12)) --- packages/blockstore-s3/CHANGELOG.md | 7 +++++++ packages/blockstore-s3/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/blockstore-s3/CHANGELOG.md b/packages/blockstore-s3/CHANGELOG.md index 7f582580..fb835590 100644 --- a/packages/blockstore-s3/CHANGELOG.md +++ b/packages/blockstore-s3/CHANGELOG.md @@ -1,3 +1,10 @@ +## [blockstore-s3-v1.0.11](https://github.com/ipfs/js-stores/compare/blockstore-s3-v1.0.10...blockstore-s3-v1.0.11) (2023-12-01) + + +### Bug Fixes + +* cleanup references to datastore in blockstores ([#274](https://github.com/ipfs/js-stores/issues/274)) ([f550624](https://github.com/ipfs/js-stores/commit/f5506243b2cb1e6462457241a1614bd5f0755c12)) + ## [blockstore-s3-v1.0.10](https://github.com/ipfs/js-stores/compare/blockstore-s3-v1.0.9...blockstore-s3-v1.0.10) (2023-11-27) diff --git a/packages/blockstore-s3/package.json b/packages/blockstore-s3/package.json index a33675f0..2293c219 100644 --- a/packages/blockstore-s3/package.json +++ b/packages/blockstore-s3/package.json @@ -1,6 +1,6 @@ { "name": "blockstore-s3", - "version": "1.0.10", + "version": "1.0.11", "description": "IPFS blockstore implementation backed by s3", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/blockstore-s3#readme", From 48b6a70ba24c8c98829d1017e77cc094621305c3 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 1 Dec 2023 19:35:31 +0000 Subject: [PATCH 35/45] chore(release): 1.1.8 [skip ci] ## [blockstore-fs-v1.1.8](https://github.com/ipfs/js-stores/compare/blockstore-fs-v1.1.7...blockstore-fs-v1.1.8) (2023-12-01) ### Bug Fixes * cleanup references to datastore in blockstores ([#274](https://github.com/ipfs/js-stores/issues/274)) ([f550624](https://github.com/ipfs/js-stores/commit/f5506243b2cb1e6462457241a1614bd5f0755c12)) --- packages/blockstore-fs/CHANGELOG.md | 7 +++++++ packages/blockstore-fs/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/blockstore-fs/CHANGELOG.md b/packages/blockstore-fs/CHANGELOG.md index 4fdf62e9..0b52f817 100644 --- a/packages/blockstore-fs/CHANGELOG.md +++ b/packages/blockstore-fs/CHANGELOG.md @@ -1,3 +1,10 @@ +## [blockstore-fs-v1.1.8](https://github.com/ipfs/js-stores/compare/blockstore-fs-v1.1.7...blockstore-fs-v1.1.8) (2023-12-01) + + +### Bug Fixes + +* cleanup references to datastore in blockstores ([#274](https://github.com/ipfs/js-stores/issues/274)) ([f550624](https://github.com/ipfs/js-stores/commit/f5506243b2cb1e6462457241a1614bd5f0755c12)) + ## [blockstore-fs-v1.1.7](https://github.com/ipfs/js-stores/compare/blockstore-fs-v1.1.6...blockstore-fs-v1.1.7) (2023-11-27) diff --git a/packages/blockstore-fs/package.json b/packages/blockstore-fs/package.json index 6bc9f4ce..c5bc9a54 100644 --- a/packages/blockstore-fs/package.json +++ b/packages/blockstore-fs/package.json @@ -1,6 +1,6 @@ { "name": "blockstore-fs", - "version": "1.1.7", + "version": "1.1.8", "description": "Blockstore implementation with file system backend", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/blockstore-fs#readme", From 2cbfd52257e9358786962d94e144df9583a45c30 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Dec 2023 11:49:23 +0000 Subject: [PATCH 36/45] deps: bump uint8arrays from 4.0.10 to 5.0.0 (#282) Bumps [uint8arrays](https://github.com/achingbrain/uint8arrays) from 4.0.10 to 5.0.0. - [Release notes](https://github.com/achingbrain/uint8arrays/releases) - [Changelog](https://github.com/achingbrain/uint8arrays/blob/main/CHANGELOG.md) - [Commits](https://github.com/achingbrain/uint8arrays/compare/v4.0.10...v5.0.0) --- updated-dependencies: - dependency-name: uint8arrays dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- packages/blockstore-core/package.json | 2 +- packages/blockstore-s3/package.json | 2 +- packages/datastore-core/package.json | 2 +- packages/datastore-s3/package.json | 2 +- packages/interface-blockstore-tests/package.json | 2 +- packages/interface-datastore-tests/package.json | 2 +- packages/interface-datastore/package.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/blockstore-core/package.json b/packages/blockstore-core/package.json index e780d9e2..4fe4ad54 100644 --- a/packages/blockstore-core/package.json +++ b/packages/blockstore-core/package.json @@ -184,7 +184,7 @@ "it-merge": "^3.0.1", "it-pushable": "^3.0.0", "multiformats": "^12.0.1", - "uint8arrays": "^4.0.2" + "uint8arrays": "^5.0.0" }, "devDependencies": { "aegir": "^41.1.9", diff --git a/packages/blockstore-s3/package.json b/packages/blockstore-s3/package.json index 2293c219..39e05b03 100644 --- a/packages/blockstore-s3/package.json +++ b/packages/blockstore-s3/package.json @@ -145,7 +145,7 @@ "interface-store": "^5.0.0", "it-to-buffer": "^4.0.1", "multiformats": "^12.0.1", - "uint8arrays": "^4.0.2" + "uint8arrays": "^5.0.0" }, "devDependencies": { "@types/sinon": "^17.0.2", diff --git a/packages/datastore-core/package.json b/packages/datastore-core/package.json index 97626c5d..7824f03f 100644 --- a/packages/datastore-core/package.json +++ b/packages/datastore-core/package.json @@ -207,7 +207,7 @@ "it-pushable": "^3.0.0", "it-sort": "^3.0.1", "it-take": "^3.0.1", - "uint8arrays": "^4.0.2" + "uint8arrays": "^5.0.0" }, "devDependencies": { "aegir": "^41.1.9", diff --git a/packages/datastore-s3/package.json b/packages/datastore-s3/package.json index bac08ff4..32ec2486 100644 --- a/packages/datastore-s3/package.json +++ b/packages/datastore-s3/package.json @@ -145,7 +145,7 @@ "interface-store": "^5.0.0", "it-filter": "^3.0.0", "it-to-buffer": "^4.0.1", - "uint8arrays": "^4.0.2" + "uint8arrays": "^5.0.0" }, "devDependencies": { "@types/sinon": "^17.0.2", diff --git a/packages/interface-blockstore-tests/package.json b/packages/interface-blockstore-tests/package.json index f68b0b47..96765525 100644 --- a/packages/interface-blockstore-tests/package.json +++ b/packages/interface-blockstore-tests/package.json @@ -135,7 +135,7 @@ "it-all": "^3.0.1", "it-drain": "^3.0.1", "multiformats": "^12.0.1", - "uint8arrays": "^4.0.2" + "uint8arrays": "^5.0.0" }, "devDependencies": { "aegir": "^41.1.9" diff --git a/packages/interface-datastore-tests/package.json b/packages/interface-datastore-tests/package.json index ff4438b3..f347e748 100644 --- a/packages/interface-datastore-tests/package.json +++ b/packages/interface-datastore-tests/package.json @@ -136,7 +136,7 @@ "it-all": "^3.0.1", "it-drain": "^3.0.1", "it-length": "^3.0.1", - "uint8arrays": "^4.0.2" + "uint8arrays": "^5.0.0" }, "devDependencies": { "aegir": "^41.1.9" diff --git a/packages/interface-datastore/package.json b/packages/interface-datastore/package.json index fd5b91db..d8547a50 100644 --- a/packages/interface-datastore/package.json +++ b/packages/interface-datastore/package.json @@ -159,7 +159,7 @@ "dependencies": { "interface-store": "^5.0.0", "nanoid": "^5.0.3", - "uint8arrays": "^4.0.2" + "uint8arrays": "^5.0.0" }, "devDependencies": { "aegir": "^41.1.9" From 23fbc88fb73114e3999feddc397b3c349941bbc8 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 8 Dec 2023 11:58:14 +0000 Subject: [PATCH 37/45] chore(release): 8.2.8 [skip ci] ## [interface-datastore-v8.2.8](https://github.com/ipfs/js-stores/compare/interface-datastore-v8.2.7...interface-datastore-v8.2.8) (2023-12-08) ### Dependencies * bump uint8arrays from 4.0.10 to 5.0.0 ([#282](https://github.com/ipfs/js-stores/issues/282)) ([2cbfd52](https://github.com/ipfs/js-stores/commit/2cbfd52257e9358786962d94e144df9583a45c30)) --- packages/interface-datastore/CHANGELOG.md | 7 +++++++ packages/interface-datastore/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/interface-datastore/CHANGELOG.md b/packages/interface-datastore/CHANGELOG.md index 08ed732d..98ff0462 100644 --- a/packages/interface-datastore/CHANGELOG.md +++ b/packages/interface-datastore/CHANGELOG.md @@ -1,3 +1,10 @@ +## [interface-datastore-v8.2.8](https://github.com/ipfs/js-stores/compare/interface-datastore-v8.2.7...interface-datastore-v8.2.8) (2023-12-08) + + +### Dependencies + +* bump uint8arrays from 4.0.10 to 5.0.0 ([#282](https://github.com/ipfs/js-stores/issues/282)) ([2cbfd52](https://github.com/ipfs/js-stores/commit/2cbfd52257e9358786962d94e144df9583a45c30)) + ## [interface-datastore-v8.2.7](https://github.com/ipfs/js-stores/compare/interface-datastore-v8.2.6...interface-datastore-v8.2.7) (2023-11-27) diff --git a/packages/interface-datastore/package.json b/packages/interface-datastore/package.json index d8547a50..7832bf27 100644 --- a/packages/interface-datastore/package.json +++ b/packages/interface-datastore/package.json @@ -1,6 +1,6 @@ { "name": "interface-datastore", - "version": "8.2.7", + "version": "8.2.8", "description": "datastore interface", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/interface-datastore#readme", From 55c5855091ddc426a68cea22453e58bdee05f808 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 8 Dec 2023 11:58:30 +0000 Subject: [PATCH 38/45] chore(release): 5.1.6 [skip ci] ## [interface-datastore-tests-v5.1.6](https://github.com/ipfs/js-stores/compare/interface-datastore-tests-v5.1.5...interface-datastore-tests-v5.1.6) (2023-12-08) ### Dependencies * bump uint8arrays from 4.0.10 to 5.0.0 ([#282](https://github.com/ipfs/js-stores/issues/282)) ([2cbfd52](https://github.com/ipfs/js-stores/commit/2cbfd52257e9358786962d94e144df9583a45c30)) --- packages/interface-datastore-tests/CHANGELOG.md | 7 +++++++ packages/interface-datastore-tests/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/interface-datastore-tests/CHANGELOG.md b/packages/interface-datastore-tests/CHANGELOG.md index abfd11cb..235ffc8b 100644 --- a/packages/interface-datastore-tests/CHANGELOG.md +++ b/packages/interface-datastore-tests/CHANGELOG.md @@ -1,3 +1,10 @@ +## [interface-datastore-tests-v5.1.6](https://github.com/ipfs/js-stores/compare/interface-datastore-tests-v5.1.5...interface-datastore-tests-v5.1.6) (2023-12-08) + + +### Dependencies + +* bump uint8arrays from 4.0.10 to 5.0.0 ([#282](https://github.com/ipfs/js-stores/issues/282)) ([2cbfd52](https://github.com/ipfs/js-stores/commit/2cbfd52257e9358786962d94e144df9583a45c30)) + ## [interface-datastore-tests-v5.1.5](https://github.com/ipfs/js-stores/compare/interface-datastore-tests-v5.1.4...interface-datastore-tests-v5.1.5) (2023-11-27) diff --git a/packages/interface-datastore-tests/package.json b/packages/interface-datastore-tests/package.json index f347e748..6dd6dff3 100644 --- a/packages/interface-datastore-tests/package.json +++ b/packages/interface-datastore-tests/package.json @@ -1,6 +1,6 @@ { "name": "interface-datastore-tests", - "version": "5.1.5", + "version": "5.1.6", "description": "Compliance tests for the datastore interface", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/interface-datastore-tests#readme", From c8e42f352feeae2aeeb586bdfdaef325fd820218 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 8 Dec 2023 11:58:46 +0000 Subject: [PATCH 39/45] chore(release): 9.2.6 [skip ci] ## [datastore-core-v9.2.6](https://github.com/ipfs/js-stores/compare/datastore-core-v9.2.5...datastore-core-v9.2.6) (2023-12-08) ### Dependencies * bump uint8arrays from 4.0.10 to 5.0.0 ([#282](https://github.com/ipfs/js-stores/issues/282)) ([2cbfd52](https://github.com/ipfs/js-stores/commit/2cbfd52257e9358786962d94e144df9583a45c30)) --- packages/datastore-core/CHANGELOG.md | 7 +++++++ packages/datastore-core/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/datastore-core/CHANGELOG.md b/packages/datastore-core/CHANGELOG.md index a9b74cf1..f00609f6 100644 --- a/packages/datastore-core/CHANGELOG.md +++ b/packages/datastore-core/CHANGELOG.md @@ -1,3 +1,10 @@ +## [datastore-core-v9.2.6](https://github.com/ipfs/js-stores/compare/datastore-core-v9.2.5...datastore-core-v9.2.6) (2023-12-08) + + +### Dependencies + +* bump uint8arrays from 4.0.10 to 5.0.0 ([#282](https://github.com/ipfs/js-stores/issues/282)) ([2cbfd52](https://github.com/ipfs/js-stores/commit/2cbfd52257e9358786962d94e144df9583a45c30)) + ## [datastore-core-v9.2.5](https://github.com/ipfs/js-stores/compare/datastore-core-v9.2.4...datastore-core-v9.2.5) (2023-12-01) diff --git a/packages/datastore-core/package.json b/packages/datastore-core/package.json index 7824f03f..19cbde54 100644 --- a/packages/datastore-core/package.json +++ b/packages/datastore-core/package.json @@ -1,6 +1,6 @@ { "name": "datastore-core", - "version": "9.2.5", + "version": "9.2.6", "description": "Wrapper implementation for interface-datastore", "author": "Friedel Ziegelmayer ", "license": "Apache-2.0 OR MIT", From 4807b1f92353320eecef97583eb1d43bf0c1dc4b Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 8 Dec 2023 11:59:14 +0000 Subject: [PATCH 40/45] chore(release): 6.1.7 [skip ci] ## [interface-blockstore-tests-v6.1.7](https://github.com/ipfs/js-stores/compare/interface-blockstore-tests-v6.1.6...interface-blockstore-tests-v6.1.7) (2023-12-08) ### Dependencies * bump uint8arrays from 4.0.10 to 5.0.0 ([#282](https://github.com/ipfs/js-stores/issues/282)) ([2cbfd52](https://github.com/ipfs/js-stores/commit/2cbfd52257e9358786962d94e144df9583a45c30)) --- packages/interface-blockstore-tests/CHANGELOG.md | 7 +++++++ packages/interface-blockstore-tests/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/interface-blockstore-tests/CHANGELOG.md b/packages/interface-blockstore-tests/CHANGELOG.md index c8273204..768241a4 100644 --- a/packages/interface-blockstore-tests/CHANGELOG.md +++ b/packages/interface-blockstore-tests/CHANGELOG.md @@ -1,3 +1,10 @@ +## [interface-blockstore-tests-v6.1.7](https://github.com/ipfs/js-stores/compare/interface-blockstore-tests-v6.1.6...interface-blockstore-tests-v6.1.7) (2023-12-08) + + +### Dependencies + +* bump uint8arrays from 4.0.10 to 5.0.0 ([#282](https://github.com/ipfs/js-stores/issues/282)) ([2cbfd52](https://github.com/ipfs/js-stores/commit/2cbfd52257e9358786962d94e144df9583a45c30)) + ## [interface-blockstore-tests-v6.1.6](https://github.com/ipfs/js-stores/compare/interface-blockstore-tests-v6.1.5...interface-blockstore-tests-v6.1.6) (2023-11-27) diff --git a/packages/interface-blockstore-tests/package.json b/packages/interface-blockstore-tests/package.json index 96765525..72f72c21 100644 --- a/packages/interface-blockstore-tests/package.json +++ b/packages/interface-blockstore-tests/package.json @@ -1,6 +1,6 @@ { "name": "interface-blockstore-tests", - "version": "6.1.6", + "version": "6.1.7", "description": "Compliance tests for the blockstore interface", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/interface-blockstore-tests#readme", From edb7c80b5e24b34c53e2d1eda1d1a96a02d19048 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 8 Dec 2023 11:59:30 +0000 Subject: [PATCH 41/45] chore(release): 11.1.9 [skip ci] ## [datastore-s3-v11.1.9](https://github.com/ipfs/js-stores/compare/datastore-s3-v11.1.8...datastore-s3-v11.1.9) (2023-12-08) ### Dependencies * bump uint8arrays from 4.0.10 to 5.0.0 ([#282](https://github.com/ipfs/js-stores/issues/282)) ([2cbfd52](https://github.com/ipfs/js-stores/commit/2cbfd52257e9358786962d94e144df9583a45c30)) --- packages/datastore-s3/CHANGELOG.md | 7 +++++++ packages/datastore-s3/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/datastore-s3/CHANGELOG.md b/packages/datastore-s3/CHANGELOG.md index 42e0a12a..6471c185 100644 --- a/packages/datastore-s3/CHANGELOG.md +++ b/packages/datastore-s3/CHANGELOG.md @@ -1,3 +1,10 @@ +## [datastore-s3-v11.1.9](https://github.com/ipfs/js-stores/compare/datastore-s3-v11.1.8...datastore-s3-v11.1.9) (2023-12-08) + + +### Dependencies + +* bump uint8arrays from 4.0.10 to 5.0.0 ([#282](https://github.com/ipfs/js-stores/issues/282)) ([2cbfd52](https://github.com/ipfs/js-stores/commit/2cbfd52257e9358786962d94e144df9583a45c30)) + ## [datastore-s3-v11.1.8](https://github.com/ipfs/js-stores/compare/datastore-s3-v11.1.7...datastore-s3-v11.1.8) (2023-12-01) diff --git a/packages/datastore-s3/package.json b/packages/datastore-s3/package.json index 32ec2486..2780a571 100644 --- a/packages/datastore-s3/package.json +++ b/packages/datastore-s3/package.json @@ -1,6 +1,6 @@ { "name": "datastore-s3", - "version": "11.1.8", + "version": "11.1.9", "description": "IPFS datastore implementation backed by s3", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/datastore-s3#readme", From e3ecb03a033bc31d1bc6e7950c1612e3ebf3ef30 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 8 Dec 2023 11:59:48 +0000 Subject: [PATCH 42/45] chore(release): 4.3.8 [skip ci] ## [blockstore-core-v4.3.8](https://github.com/ipfs/js-stores/compare/blockstore-core-v4.3.7...blockstore-core-v4.3.8) (2023-12-08) ### Dependencies * bump uint8arrays from 4.0.10 to 5.0.0 ([#282](https://github.com/ipfs/js-stores/issues/282)) ([2cbfd52](https://github.com/ipfs/js-stores/commit/2cbfd52257e9358786962d94e144df9583a45c30)) --- packages/blockstore-core/CHANGELOG.md | 7 +++++++ packages/blockstore-core/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/blockstore-core/CHANGELOG.md b/packages/blockstore-core/CHANGELOG.md index 4c4576f3..6022ffd9 100644 --- a/packages/blockstore-core/CHANGELOG.md +++ b/packages/blockstore-core/CHANGELOG.md @@ -1,3 +1,10 @@ +## [blockstore-core-v4.3.8](https://github.com/ipfs/js-stores/compare/blockstore-core-v4.3.7...blockstore-core-v4.3.8) (2023-12-08) + + +### Dependencies + +* bump uint8arrays from 4.0.10 to 5.0.0 ([#282](https://github.com/ipfs/js-stores/issues/282)) ([2cbfd52](https://github.com/ipfs/js-stores/commit/2cbfd52257e9358786962d94e144df9583a45c30)) + ## [blockstore-core-v4.3.7](https://github.com/ipfs/js-stores/compare/blockstore-core-v4.3.6...blockstore-core-v4.3.7) (2023-12-01) diff --git a/packages/blockstore-core/package.json b/packages/blockstore-core/package.json index 4fe4ad54..d0380298 100644 --- a/packages/blockstore-core/package.json +++ b/packages/blockstore-core/package.json @@ -1,6 +1,6 @@ { "name": "blockstore-core", - "version": "4.3.7", + "version": "4.3.8", "description": "Contains various implementations of the API contract described in interface-blockstore", "author": "Alex Potsides ", "license": "Apache-2.0 OR MIT", From 33f9197ef9d80018ca8c5fde8694668e90fc0037 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 8 Dec 2023 12:00:20 +0000 Subject: [PATCH 43/45] chore(release): 1.0.12 [skip ci] ## [blockstore-s3-v1.0.12](https://github.com/ipfs/js-stores/compare/blockstore-s3-v1.0.11...blockstore-s3-v1.0.12) (2023-12-08) ### Dependencies * bump uint8arrays from 4.0.10 to 5.0.0 ([#282](https://github.com/ipfs/js-stores/issues/282)) ([2cbfd52](https://github.com/ipfs/js-stores/commit/2cbfd52257e9358786962d94e144df9583a45c30)) --- packages/blockstore-s3/CHANGELOG.md | 7 +++++++ packages/blockstore-s3/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/blockstore-s3/CHANGELOG.md b/packages/blockstore-s3/CHANGELOG.md index fb835590..dcdfa5c2 100644 --- a/packages/blockstore-s3/CHANGELOG.md +++ b/packages/blockstore-s3/CHANGELOG.md @@ -1,3 +1,10 @@ +## [blockstore-s3-v1.0.12](https://github.com/ipfs/js-stores/compare/blockstore-s3-v1.0.11...blockstore-s3-v1.0.12) (2023-12-08) + + +### Dependencies + +* bump uint8arrays from 4.0.10 to 5.0.0 ([#282](https://github.com/ipfs/js-stores/issues/282)) ([2cbfd52](https://github.com/ipfs/js-stores/commit/2cbfd52257e9358786962d94e144df9583a45c30)) + ## [blockstore-s3-v1.0.11](https://github.com/ipfs/js-stores/compare/blockstore-s3-v1.0.10...blockstore-s3-v1.0.11) (2023-12-01) diff --git a/packages/blockstore-s3/package.json b/packages/blockstore-s3/package.json index 39e05b03..cf81e75f 100644 --- a/packages/blockstore-s3/package.json +++ b/packages/blockstore-s3/package.json @@ -1,6 +1,6 @@ { "name": "blockstore-s3", - "version": "1.0.11", + "version": "1.0.12", "description": "IPFS blockstore implementation backed by s3", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/blockstore-s3#readme", From da03ee29970fdc860eead076ccedb5eea8ff4266 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Fri, 8 Dec 2023 13:27:24 +0000 Subject: [PATCH 44/45] fix: remove nanoid (#283) The `Key.random` function isn't used anywhere in libp2p/helia so use a simpler key generation function that works with react-native. --- packages/interface-datastore/package.json | 1 - packages/interface-datastore/src/key.ts | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/interface-datastore/package.json b/packages/interface-datastore/package.json index 7832bf27..71c95aaf 100644 --- a/packages/interface-datastore/package.json +++ b/packages/interface-datastore/package.json @@ -158,7 +158,6 @@ }, "dependencies": { "interface-store": "^5.0.0", - "nanoid": "^5.0.3", "uint8arrays": "^5.0.0" }, "devDependencies": { diff --git a/packages/interface-datastore/src/key.ts b/packages/interface-datastore/src/key.ts index fcb546d0..6ef7ff69 100644 --- a/packages/interface-datastore/src/key.ts +++ b/packages/interface-datastore/src/key.ts @@ -1,4 +1,3 @@ -import { nanoid } from 'nanoid' import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string' import { type SupportedEncodings, toString as uint8ArrayToString } from 'uint8arrays/to-string' @@ -103,11 +102,11 @@ export class Key { * @example * ```js * Key.random() - * // => Key('/f98719ea086343f7b71f32ea9d9d521d') + * // => Key('/344502982398') * ``` */ static random (): Key { - return new Key(nanoid().replace(/-/g, '')) + return new Key(Math.random().toString().substring(2)) } /** From 7dad9a43fdec367895467752a6fee3ac7f912ca4 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 8 Dec 2023 13:36:52 +0000 Subject: [PATCH 45/45] chore(release): 8.2.9 [skip ci] ## [interface-datastore-v8.2.9](https://github.com/ipfs/js-stores/compare/interface-datastore-v8.2.8...interface-datastore-v8.2.9) (2023-12-08) ### Bug Fixes * remove nanoid ([#283](https://github.com/ipfs/js-stores/issues/283)) ([da03ee2](https://github.com/ipfs/js-stores/commit/da03ee29970fdc860eead076ccedb5eea8ff4266)) --- packages/interface-datastore/CHANGELOG.md | 7 +++++++ packages/interface-datastore/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/interface-datastore/CHANGELOG.md b/packages/interface-datastore/CHANGELOG.md index 98ff0462..e8ca24d2 100644 --- a/packages/interface-datastore/CHANGELOG.md +++ b/packages/interface-datastore/CHANGELOG.md @@ -1,3 +1,10 @@ +## [interface-datastore-v8.2.9](https://github.com/ipfs/js-stores/compare/interface-datastore-v8.2.8...interface-datastore-v8.2.9) (2023-12-08) + + +### Bug Fixes + +* remove nanoid ([#283](https://github.com/ipfs/js-stores/issues/283)) ([da03ee2](https://github.com/ipfs/js-stores/commit/da03ee29970fdc860eead076ccedb5eea8ff4266)) + ## [interface-datastore-v8.2.8](https://github.com/ipfs/js-stores/compare/interface-datastore-v8.2.7...interface-datastore-v8.2.8) (2023-12-08) diff --git a/packages/interface-datastore/package.json b/packages/interface-datastore/package.json index 71c95aaf..10fabe62 100644 --- a/packages/interface-datastore/package.json +++ b/packages/interface-datastore/package.json @@ -1,6 +1,6 @@ { "name": "interface-datastore", - "version": "8.2.8", + "version": "8.2.9", "description": "datastore interface", "license": "Apache-2.0 OR MIT", "homepage": "https://github.com/ipfs/js-stores/tree/master/packages/interface-datastore#readme",