Skip to content

Commit d521ef2

Browse files
fix: bump aegir to 42.2.3, update project config and fix deps (#297)
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] <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: achingbrain <[email protected]>
1 parent 5d78301 commit d521ef2

File tree

34 files changed

+519
-1382
lines changed

34 files changed

+519
-1382
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ updates:
55
schedule:
66
interval: daily
77
time: "10:00"
8-
open-pull-requests-limit: 10
8+
open-pull-requests-limit: 20
99
commit-message:
1010
prefix: "deps"
1111
prefix-development: "deps(dev)"

.github/workflows/js-test-and-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ on:
99

1010
permissions:
1111
contents: write
12+
id-token: write
1213
packages: write
14+
pull-requests: write
1315

1416
concurrency:
1517
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# stores
2+
13
[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)
24
[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)
35
[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-stores.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-stores)

package.json

Lines changed: 93 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,93 @@
1212
"url": "https://github.com/ipfs/js-stores/issues"
1313
},
1414
"private": true,
15+
"release": {
16+
"branches": [
17+
"main"
18+
],
19+
"plugins": [
20+
[
21+
"@semantic-release/commit-analyzer",
22+
{
23+
"preset": "conventionalcommits",
24+
"releaseRules": [
25+
{
26+
"breaking": true,
27+
"release": "major"
28+
},
29+
{
30+
"revert": true,
31+
"release": "patch"
32+
},
33+
{
34+
"type": "feat",
35+
"release": "minor"
36+
},
37+
{
38+
"type": "fix",
39+
"release": "patch"
40+
},
41+
{
42+
"type": "docs",
43+
"release": "patch"
44+
},
45+
{
46+
"type": "test",
47+
"release": "patch"
48+
},
49+
{
50+
"type": "deps",
51+
"release": "patch"
52+
},
53+
{
54+
"scope": "no-release",
55+
"release": false
56+
}
57+
]
58+
}
59+
],
60+
[
61+
"@semantic-release/release-notes-generator",
62+
{
63+
"preset": "conventionalcommits",
64+
"presetConfig": {
65+
"types": [
66+
{
67+
"type": "feat",
68+
"section": "Features"
69+
},
70+
{
71+
"type": "fix",
72+
"section": "Bug Fixes"
73+
},
74+
{
75+
"type": "chore",
76+
"section": "Trivial Changes"
77+
},
78+
{
79+
"type": "docs",
80+
"section": "Documentation"
81+
},
82+
{
83+
"type": "deps",
84+
"section": "Dependencies"
85+
},
86+
{
87+
"type": "test",
88+
"section": "Tests"
89+
}
90+
]
91+
}
92+
}
93+
],
94+
"@semantic-release/changelog",
95+
"@semantic-release/npm",
96+
"@semantic-release/github",
97+
"@semantic-release/git"
98+
]
99+
},
15100
"scripts": {
16-
"reset": "aegir run clean && aegir clean ./node_modules ./package-lock.json packages/*/node_modules packages/*/package-lock.json packages/*/dist",
101+
"reset": "aegir run clean && aegir clean **/node_modules **/package-lock.json",
17102
"test": "aegir run test",
18103
"test:node": "aegir run test:node",
19104
"test:chrome": "aegir run test:chrome",
@@ -23,15 +108,18 @@
23108
"test:electron-main": "aegir run test:electron-main",
24109
"test:electron-renderer": "aegir run test:electron-renderer",
25110
"clean": "aegir run clean",
111+
"generate": "aegir run generate",
26112
"build": "aegir run build",
27113
"lint": "aegir run lint",
28-
"docs": "NODE_OPTIONS=--max_old_space_size=8192 aegir docs",
29-
"docs:no-publish": "NODE_OPTIONS=--max_old_space_size=8192 aegir docs --publish false",
30114
"dep-check": "aegir run dep-check",
31-
"release": "npm run docs:no-publish && aegir run release --concurrency=1 && npm run docs"
115+
"release": "run-s build docs:no-publish npm:release docs",
116+
"npm:release": "aegir release",
117+
"docs": "aegir docs",
118+
"docs:no-publish": "aegir docs --publish false"
32119
},
33120
"devDependencies": {
34-
"aegir": "^41.1.9"
121+
"aegir": "^42.2.3",
122+
"npm-run-all": "^4.1.5"
35123
},
36124
"workspaces": [
37125
"packages/*"

packages/blockstore-core/README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,79 @@
1+
# blockstore-core
2+
13
[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)
24
[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)
35
[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-stores.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-stores)
46
[![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)
57

68
> Contains various implementations of the API contract described in interface-blockstore
79
10+
# About
11+
12+
Various Blockstore implementations are available.
13+
14+
## Implementations
15+
16+
- Base: [`src/base`](src/base.ts)
17+
- Memory: [`src/memory`](src/memory.ts)
18+
- BlackHole: ['src/black-hole](src/black-hole.ts)
19+
- Tiered: ['src/tiered](src/tiered.ts)
20+
21+
## Example - BaseBlockstore
22+
23+
Provides a complete implementation of the Blockstore interface. You must implement `.get`, `.put`, etc.
24+
25+
```js
26+
import { BaseBlockstore } from 'blockstore-core/base'
27+
28+
class MyCustomBlockstore extends BaseBlockstore {
29+
put (key, val, options) {
30+
// store a block
31+
}
32+
33+
get (key, options) {
34+
// retrieve a block
35+
}
36+
37+
// ...etc
38+
}
39+
```
40+
41+
## Example - MemoryBlockstore
42+
43+
A simple Blockstore that stores blocks in memory.
44+
45+
```js
46+
import { MemoryBlockstore } from 'blockstore-core/memory'
47+
48+
const store = new MemoryBlockstore()
49+
```
50+
51+
## Example - BlackHoleBlockstore
52+
53+
A Blockstore that does not store any blocks.
54+
55+
```js
56+
import { BlackHoleBlockstore } from 'blockstore-core/black-hole'
57+
58+
const store = new BlackHoleBlockstore()
59+
```
60+
61+
## Example - TieredBlockstore
62+
63+
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.
64+
65+
Writes are invoked on all wrapped blockstores.
66+
67+
```js
68+
import { TieredBlockstore } from 'blockstore-core/tiered'
69+
70+
const store = new TieredBlockstore([
71+
store1,
72+
store2,
73+
// ...etc
74+
])
75+
```
76+
877
# Install
978

1079
```console

packages/blockstore-core/package.json

Lines changed: 14 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@
44
"description": "Contains various implementations of the API contract described in interface-blockstore",
55
"author": "Alex Potsides <[email protected]>",
66
"license": "Apache-2.0 OR MIT",
7-
"homepage": "https://github.com/ipfs/js-stores/tree/master/packages/blockstore-core#readme",
7+
"homepage": "https://github.com/ipfs/js-stores/tree/main/packages/blockstore-core#readme",
88
"repository": {
99
"type": "git",
1010
"url": "git+https://github.com/ipfs/js-stores.git"
1111
},
1212
"bugs": {
1313
"url": "https://github.com/ipfs/js-stores/issues"
1414
},
15+
"publishConfig": {
16+
"access": "public",
17+
"provenance": true
18+
},
1519
"keywords": [
1620
"datastore",
1721
"interface",
@@ -75,96 +79,10 @@
7579
"sourceType": "module"
7680
}
7781
},
78-
"release": {
79-
"branches": [
80-
"main"
81-
],
82-
"plugins": [
83-
[
84-
"@semantic-release/commit-analyzer",
85-
{
86-
"preset": "conventionalcommits",
87-
"releaseRules": [
88-
{
89-
"breaking": true,
90-
"release": "major"
91-
},
92-
{
93-
"revert": true,
94-
"release": "patch"
95-
},
96-
{
97-
"type": "feat",
98-
"release": "minor"
99-
},
100-
{
101-
"type": "fix",
102-
"release": "patch"
103-
},
104-
{
105-
"type": "docs",
106-
"release": "patch"
107-
},
108-
{
109-
"type": "test",
110-
"release": "patch"
111-
},
112-
{
113-
"type": "deps",
114-
"release": "patch"
115-
},
116-
{
117-
"scope": "no-release",
118-
"release": false
119-
}
120-
]
121-
}
122-
],
123-
[
124-
"@semantic-release/release-notes-generator",
125-
{
126-
"preset": "conventionalcommits",
127-
"presetConfig": {
128-
"types": [
129-
{
130-
"type": "feat",
131-
"section": "Features"
132-
},
133-
{
134-
"type": "fix",
135-
"section": "Bug Fixes"
136-
},
137-
{
138-
"type": "chore",
139-
"section": "Trivial Changes"
140-
},
141-
{
142-
"type": "docs",
143-
"section": "Documentation"
144-
},
145-
{
146-
"type": "deps",
147-
"section": "Dependencies"
148-
},
149-
{
150-
"type": "test",
151-
"section": "Tests"
152-
}
153-
]
154-
}
155-
}
156-
],
157-
"@semantic-release/changelog",
158-
"@semantic-release/npm",
159-
"@semantic-release/github",
160-
"@semantic-release/git"
161-
]
162-
},
16382
"scripts": {
16483
"clean": "aegir clean",
16584
"lint": "aegir lint",
16685
"build": "aegir build",
167-
"release": "aegir release",
16886
"test": "aegir test -t node -t browser -t webworker -t electron-main",
16987
"test:node": "aegir test -t node --cov",
17088
"test:chrome": "aegir test -t browser --cov",
@@ -175,19 +93,19 @@
17593
"dep-check": "aegir dep-check"
17694
},
17795
"dependencies": {
178-
"@libp2p/logger": "^4.0.1",
96+
"@libp2p/logger": "^4.0.6",
17997
"err-code": "^3.0.1",
18098
"interface-blockstore": "^5.0.0",
18199
"interface-store": "^5.0.0",
182-
"it-drain": "^3.0.1",
183-
"it-filter": "^3.0.0",
184-
"it-merge": "^3.0.1",
185-
"it-pushable": "^3.0.0",
186-
"multiformats": "^13.0.0",
187-
"uint8arrays": "^5.0.0"
100+
"it-drain": "^3.0.5",
101+
"it-filter": "^3.0.4",
102+
"it-merge": "^3.0.3",
103+
"it-pushable": "^3.2.3",
104+
"multiformats": "^13.0.1"
188105
},
189106
"devDependencies": {
190-
"aegir": "^41.1.9",
191-
"interface-blockstore-tests": "^6.0.0"
107+
"aegir": "^42.2.3",
108+
"interface-blockstore-tests": "^6.0.0",
109+
"uint8arrays": "^5.0.2"
192110
}
193111
}

packages/blockstore-fs/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
1+
# blockstore-fs
2+
13
[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)
24
[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)
35
[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-stores.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-stores)
46
[![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)
57

68
> Blockstore implementation with file system backend
79
10+
# About
11+
12+
A Blockstore implementation that stores blocks in the local filesystem.
13+
14+
## Example
15+
16+
```js
17+
import { FsBlockstore } from 'blockstore-fs'
18+
19+
const store = new FsBlockstore('path/to/store')
20+
```
21+
822
# Install
923

1024
```console

0 commit comments

Comments
 (0)