Skip to content

Commit

Permalink
fix: bump aegir to 42.2.3, update project config and fix deps (#297)
Browse files Browse the repository at this point in the history
Bumps [aegir](https://github.com/ipfs/aegir) from 41.3.5 to 42.2.3.
- [Release notes](https://github.com/ipfs/aegir/releases)
- [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md)
- [Commits](ipfs/aegir@v41.3.5...v42.2.3)

---
updated-dependencies:
- dependency-name: aegir
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: achingbrain <alex@achingbrain.net>
  • Loading branch information
dependabot[bot] and achingbrain committed Feb 12, 2024
1 parent 5d78301 commit d521ef2
Show file tree
Hide file tree
Showing 34 changed files with 519 additions and 1,382 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ updates:
schedule:
interval: daily
time: "10:00"
open-pull-requests-limit: 10
open-pull-requests-limit: 20
commit-message:
prefix: "deps"
prefix-development: "deps(dev)"
2 changes: 2 additions & 0 deletions .github/workflows/js-test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ on:

permissions:
contents: write
id-token: write
packages: write
pull-requests: write

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# 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)
Expand Down
98 changes: 93 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,93 @@
"url": "https://github.com/ipfs/js-stores/issues"
},
"private": true,
"release": {
"branches": [
"main"
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{
"breaking": true,
"release": "major"
},
{
"revert": true,
"release": "patch"
},
{
"type": "feat",
"release": "minor"
},
{
"type": "fix",
"release": "patch"
},
{
"type": "docs",
"release": "patch"
},
{
"type": "test",
"release": "patch"
},
{
"type": "deps",
"release": "patch"
},
{
"scope": "no-release",
"release": false
}
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "chore",
"section": "Trivial Changes"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "deps",
"section": "Dependencies"
},
{
"type": "test",
"section": "Tests"
}
]
}
}
],
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/github",
"@semantic-release/git"
]
},
"scripts": {
"reset": "aegir run clean && aegir clean ./node_modules ./package-lock.json packages/*/node_modules packages/*/package-lock.json packages/*/dist",
"reset": "aegir run clean && aegir clean **/node_modules **/package-lock.json",
"test": "aegir run test",
"test:node": "aegir run test:node",
"test:chrome": "aegir run test:chrome",
Expand All @@ -23,15 +108,18 @@
"test:electron-main": "aegir run test:electron-main",
"test:electron-renderer": "aegir run test:electron-renderer",
"clean": "aegir run clean",
"generate": "aegir run generate",
"build": "aegir run build",
"lint": "aegir run lint",
"docs": "NODE_OPTIONS=--max_old_space_size=8192 aegir docs",
"docs:no-publish": "NODE_OPTIONS=--max_old_space_size=8192 aegir docs --publish false",
"dep-check": "aegir run dep-check",
"release": "npm run docs:no-publish && aegir run release --concurrency=1 && npm run docs"
"release": "run-s build docs:no-publish npm:release docs",
"npm:release": "aegir release",
"docs": "aegir docs",
"docs:no-publish": "aegir docs --publish false"
},
"devDependencies": {
"aegir": "^41.1.9"
"aegir": "^42.2.3",
"npm-run-all": "^4.1.5"
},
"workspaces": [
"packages/*"
Expand Down
69 changes: 69 additions & 0 deletions packages/blockstore-core/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,79 @@
# 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)
[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-stores/js-test-and-release.yml?branch=main\&style=flat-square)](https://github.com/ipfs/js-stores/actions/workflows/js-test-and-release.yml?query=branch%3Amain)

> Contains various implementations of the API contract described in interface-blockstore
# About

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
])
```

# Install

```console
Expand Down
110 changes: 14 additions & 96 deletions packages/blockstore-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
"description": "Contains various implementations of the API contract described in interface-blockstore",
"author": "Alex Potsides <alex.potsides@protocol.ai>",
"license": "Apache-2.0 OR MIT",
"homepage": "https://github.com/ipfs/js-stores/tree/master/packages/blockstore-core#readme",
"homepage": "https://github.com/ipfs/js-stores/tree/main/packages/blockstore-core#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/ipfs/js-stores.git"
},
"bugs": {
"url": "https://github.com/ipfs/js-stores/issues"
},
"publishConfig": {
"access": "public",
"provenance": true
},
"keywords": [
"datastore",
"interface",
Expand Down Expand Up @@ -75,96 +79,10 @@
"sourceType": "module"
}
},
"release": {
"branches": [
"main"
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{
"breaking": true,
"release": "major"
},
{
"revert": true,
"release": "patch"
},
{
"type": "feat",
"release": "minor"
},
{
"type": "fix",
"release": "patch"
},
{
"type": "docs",
"release": "patch"
},
{
"type": "test",
"release": "patch"
},
{
"type": "deps",
"release": "patch"
},
{
"scope": "no-release",
"release": false
}
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "chore",
"section": "Trivial Changes"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "deps",
"section": "Dependencies"
},
{
"type": "test",
"section": "Tests"
}
]
}
}
],
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/github",
"@semantic-release/git"
]
},
"scripts": {
"clean": "aegir clean",
"lint": "aegir lint",
"build": "aegir build",
"release": "aegir release",
"test": "aegir test -t node -t browser -t webworker -t electron-main",
"test:node": "aegir test -t node --cov",
"test:chrome": "aegir test -t browser --cov",
Expand All @@ -175,19 +93,19 @@
"dep-check": "aegir dep-check"
},
"dependencies": {
"@libp2p/logger": "^4.0.1",
"@libp2p/logger": "^4.0.6",
"err-code": "^3.0.1",
"interface-blockstore": "^5.0.0",
"interface-store": "^5.0.0",
"it-drain": "^3.0.1",
"it-filter": "^3.0.0",
"it-merge": "^3.0.1",
"it-pushable": "^3.0.0",
"multiformats": "^13.0.0",
"uint8arrays": "^5.0.0"
"it-drain": "^3.0.5",
"it-filter": "^3.0.4",
"it-merge": "^3.0.3",
"it-pushable": "^3.2.3",
"multiformats": "^13.0.1"
},
"devDependencies": {
"aegir": "^41.1.9",
"interface-blockstore-tests": "^6.0.0"
"aegir": "^42.2.3",
"interface-blockstore-tests": "^6.0.0",
"uint8arrays": "^5.0.2"
}
}
14 changes: 14 additions & 0 deletions packages/blockstore-fs/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
# 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)
[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-stores/js-test-and-release.yml?branch=main\&style=flat-square)](https://github.com/ipfs/js-stores/actions/workflows/js-test-and-release.yml?query=branch%3Amain)

> Blockstore implementation with file system backend
# About

A Blockstore implementation that stores blocks in the local filesystem.

## Example

```js
import { FsBlockstore } from 'blockstore-fs'

const store = new FsBlockstore('path/to/store')
```

# Install

```console
Expand Down
Loading

0 comments on commit d521ef2

Please sign in to comment.