Skip to content

Commit 9f7dc0a

Browse files
committed
feat!: update helia to v3 and multiformats to v13
Updates all deps and fixes linitng errors. BREAKING CHANGE: uses multiformats v13
1 parent 15d42a0 commit 9f7dc0a

10 files changed

+84
-54
lines changed

.github/dependabot.yml

+1-1
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

+2
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 }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Semantic PR
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
jobs:
11+
main:
12+
uses: pl-strflt/.github/.github/workflows/reusable-semantic-pull-request.yml@v0.3

README.md

+5-12
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</a>
55
</p>
66

7-
# @helia/mfs <!-- omit in toc -->
7+
# @helia/mfs
88

99
[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)
1010
[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)
@@ -13,30 +13,23 @@
1313

1414
> A mutable filesystem powered by Helia
1515
16-
## Table of contents <!-- omit in toc -->
17-
18-
- [Structure](#structure)
19-
- [API Docs](#api-docs)
20-
- [License](#license)
21-
- [Contribute](#contribute)
22-
23-
## Structure
16+
# Packages
2417

2518
- [`/packages/interop`](./packages/interop) Interop tests for @helia/mfs
2619
- [`/packages/mfs`](./packages/mfs) A mutable filesystem powered by Helia
2720

28-
## API Docs
21+
# API Docs
2922

3023
- <https://ipfs.github.io/helia-mfs>
3124

32-
## License
25+
# License
3326

3427
Licensed under either of
3528

3629
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
3730
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
3831

39-
## Contribute
32+
# Contribute
4033

4134
Contributions welcome! Please check out [the issues](https://github.com/ipfs/helia-mfs/issues).
4235

package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
"bugs": {
1212
"url": "https://github.com/ipfs/helia-mfs/issues"
1313
},
14+
"publishConfig": {
15+
"access": "public",
16+
"provenance": true
17+
},
1418
"keywords": [
1519
"ipfs"
1620
],
@@ -36,7 +40,7 @@
3640
"docs:no-publish": "NODE_OPTIONS=--max_old_space_size=8192 aegir docs --publish false -- --exclude packages/interop"
3741
},
3842
"devDependencies": {
39-
"aegir": "^41.0.0",
43+
"aegir": "^42.0.1",
4044
"npm-run-all": "^4.1.5"
4145
},
4246
"type": "module",

packages/interop/README.md

+3-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</a>
55
</p>
66

7-
# @helia/mfs-interop <!-- omit in toc -->
7+
# @helia/mfs-interop
88

99
[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)
1010
[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)
@@ -13,19 +13,14 @@
1313

1414
> Interop tests for @helia/mfs
1515
16-
## Table of contents <!-- omit in toc -->
17-
18-
- [License](#license)
19-
- [Contribute](#contribute)
20-
21-
## License
16+
# License
2217

2318
Licensed under either of
2419

2520
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
2621
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
2722

28-
## Contribute
23+
# Contribute
2924

3025
Contributions welcome! Please check out [the issues](https://github.com/ipfs/helia-mfs/issues).
3126

packages/interop/package.json

+8-4
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@
33
"version": "0.0.0",
44
"description": "Interop tests for @helia/mfs",
55
"license": "Apache-2.0 OR MIT",
6-
"homepage": "https://github.com/ipfs/helia-mfs/tree/master/packages/interop#readme",
6+
"homepage": "https://github.com/ipfs/helia-mfs/tree/main/packages/interop#readme",
77
"repository": {
88
"type": "git",
99
"url": "git+https://github.com/ipfs/helia-mfs.git"
1010
},
1111
"bugs": {
1212
"url": "https://github.com/ipfs/helia-mfs/issues"
1313
},
14+
"publishConfig": {
15+
"access": "public",
16+
"provenance": true
17+
},
1418
"keywords": [
1519
"IPFS"
1620
],
@@ -49,11 +53,11 @@
4953
"test:electron-main": "aegir test -t electron-main"
5054
},
5155
"devDependencies": {
52-
"@helia/interface": "^2.0.0",
56+
"@helia/interface": "^3.0.0",
5357
"@helia/mfs": "^1.0.0",
54-
"aegir": "^41.0.3",
58+
"aegir": "^42.0.1",
5559
"go-ipfs": "^0.22.0",
56-
"helia": "^2.0.3",
60+
"helia": "^3.0.0",
5761
"ipfsd-ctl": "^13.0.0",
5862
"kubo-rpc-client": "^3.0.0",
5963
"merge-options": "^3.0.4",

packages/interop/typedoc.json

-5
This file was deleted.

packages/mfs/README.md

+34-13
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</a>
55
</p>
66

7-
# @helia/mfs <!-- omit in toc -->
7+
# @helia/mfs
88

99
[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)
1010
[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)
@@ -13,40 +13,61 @@
1313

1414
> A mutable filesystem powered by Helia
1515
16-
## Table of contents <!-- omit in toc -->
16+
# About
1717

18-
- [Install](#install)
19-
- [Browser `<script>` tag](#browser-script-tag)
20-
- [API Docs](#api-docs)
21-
- [License](#license)
22-
- [Contribute](#contribute)
18+
`@helia/mfs` is an implementation of a Mutable File System powered by Helia.
2319

24-
## Install
20+
See the interface for all available operations.
21+
22+
## Example
23+
24+
```typescript
25+
import { createHelia } from 'helia'
26+
import { mfs } from '@helia/mfs'
27+
28+
const helia = createHelia({
29+
// ... helia config
30+
})
31+
const fs = mfs(helia)
32+
33+
// create an empty directory
34+
await fs.mkdir('/my-directory')
35+
36+
// add a file to the directory
37+
await fs.writeBytes(Uint8Array.from([0, 1, 2, 3]), '/my-directory/foo.txt')
38+
39+
// read the file
40+
for await (const buf of fs.cat('/my-directory/foo.txt')) {
41+
console.info(buf)
42+
}
43+
```
44+
45+
# Install
2546

2647
```console
2748
$ npm i @helia/mfs
2849
```
2950

30-
### Browser `<script>` tag
51+
## Browser `<script>` tag
3152

3253
Loading this module through a script tag will make it's exports available as `HeliaMfs` in the global namespace.
3354

3455
```html
3556
<script src="https://unpkg.com/@helia/mfs/dist/index.min.js"></script>
3657
```
3758

38-
## API Docs
59+
# API Docs
3960

40-
- <https://ipfs.github.io/helia-mfs/modules.html>
61+
- <https://ipfs.github.io/helia-mfs/modules/_helia_mfs.html>
4162

42-
## License
63+
# License
4364

4465
Licensed under either of
4566

4667
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
4768
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
4869

49-
## Contribute
70+
# Contribute
5071

5172
Contributions welcome! Please check out [the issues](https://github.com/ipfs/helia-mfs/issues).
5273

packages/mfs/package.json

+14-10
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@
33
"version": "1.0.2",
44
"description": "A mutable filesystem powered by Helia",
55
"license": "Apache-2.0 OR MIT",
6-
"homepage": "https://github.com/ipfs/helia-mfs/tree/master/packages/mfs#readme",
6+
"homepage": "https://github.com/ipfs/helia-mfs/tree/main/packages/mfs#readme",
77
"repository": {
88
"type": "git",
99
"url": "git+https://github.com/ipfs/helia-mfs.git"
1010
},
1111
"bugs": {
1212
"url": "https://github.com/ipfs/helia-mfs/issues"
1313
},
14+
"publishConfig": {
15+
"access": "public",
16+
"provenance": true
17+
},
1418
"keywords": [
1519
"IPFS"
1620
],
@@ -135,28 +139,28 @@
135139
"release": "aegir release"
136140
},
137141
"dependencies": {
138-
"@helia/interface": "^2.0.0",
139-
"@helia/unixfs": "^1.2.2",
140-
"@ipld/dag-pb": "^4.0.0",
142+
"@helia/interface": "^3.0.0",
143+
"@helia/unixfs": "^2.0.0",
141144
"@libp2p/interfaces": "^3.3.1",
142-
"@libp2p/logger": "^3.0.1",
143-
"interface-blockstore": "^5.0.0",
145+
"@libp2p/logger": "^4.0.4",
144146
"interface-datastore": "^8.2.2",
145147
"ipfs-unixfs": "^11.0.0",
146148
"ipfs-unixfs-exporter": "^13.1.0",
147149
"ipfs-unixfs-importer": "^15.1.0",
148-
"it-last": "^3.0.1",
149-
"multiformats": "^12.0.1"
150+
"multiformats": "^13.0.0"
150151
},
151152
"devDependencies": {
152-
"aegir": "^41.0.3",
153+
"@ipld/dag-pb": "^4.0.7",
154+
"aegir": "^42.0.1",
153155
"blockstore-core": "^4.0.1",
154156
"datastore-core": "^9.2.0",
155157
"delay": "^6.0.0",
158+
"interface-blockstore": "^5.2.9",
156159
"it-all": "^3.0.1",
157160
"it-drain": "^3.0.1",
158161
"it-first": "^3.0.1",
162+
"it-last": "^3.0.4",
159163
"it-to-buffer": "^4.0.1",
160-
"uint8arrays": "^4.0.3"
164+
"uint8arrays": "^5.0.1"
161165
}
162166
}

0 commit comments

Comments
 (0)