Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
feat!: update helia to v3 and multiformats to v13
Browse files Browse the repository at this point in the history
Updates all deps and fixes linitng errors.

BREAKING CHANGE: uses multiformats v13
  • Loading branch information
achingbrain committed Jan 8, 2024
1 parent 15d42a0 commit 9f7dc0a
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 54 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
12 changes: 12 additions & 0 deletions .github/workflows/semantic-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Semantic PR

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
main:
uses: pl-strflt/.github/.github/workflows/[email protected]
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</a>
</p>

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

[![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)
Expand All @@ -13,30 +13,23 @@

> A mutable filesystem powered by Helia
## Table of contents <!-- omit in toc -->

- [Structure](#structure)
- [API Docs](#api-docs)
- [License](#license)
- [Contribute](#contribute)

## Structure
# Packages

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

## API Docs
# API Docs

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

## License
# License

Licensed under either of

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

## Contribute
# Contribute

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

Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
"bugs": {
"url": "https://github.com/ipfs/helia-mfs/issues"
},
"publishConfig": {
"access": "public",
"provenance": true
},
"keywords": [
"ipfs"
],
Expand All @@ -36,7 +40,7 @@
"docs:no-publish": "NODE_OPTIONS=--max_old_space_size=8192 aegir docs --publish false -- --exclude packages/interop"
},
"devDependencies": {
"aegir": "^41.0.0",
"aegir": "^42.0.1",
"npm-run-all": "^4.1.5"
},
"type": "module",
Expand Down
11 changes: 3 additions & 8 deletions packages/interop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</a>
</p>

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

[![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)
Expand All @@ -13,19 +13,14 @@

> Interop tests for @helia/mfs
## Table of contents <!-- omit in toc -->

- [License](#license)
- [Contribute](#contribute)

## License
# License

Licensed under either of

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

## Contribute
# Contribute

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

Expand Down
12 changes: 8 additions & 4 deletions packages/interop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
"version": "0.0.0",
"description": "Interop tests for @helia/mfs",
"license": "Apache-2.0 OR MIT",
"homepage": "https://github.com/ipfs/helia-mfs/tree/master/packages/interop#readme",
"homepage": "https://github.com/ipfs/helia-mfs/tree/main/packages/interop#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/ipfs/helia-mfs.git"
},
"bugs": {
"url": "https://github.com/ipfs/helia-mfs/issues"
},
"publishConfig": {
"access": "public",
"provenance": true
},
"keywords": [
"IPFS"
],
Expand Down Expand Up @@ -49,11 +53,11 @@
"test:electron-main": "aegir test -t electron-main"
},
"devDependencies": {
"@helia/interface": "^2.0.0",
"@helia/interface": "^3.0.0",
"@helia/mfs": "^1.0.0",
"aegir": "^41.0.3",
"aegir": "^42.0.1",
"go-ipfs": "^0.22.0",
"helia": "^2.0.3",
"helia": "^3.0.0",
"ipfsd-ctl": "^13.0.0",
"kubo-rpc-client": "^3.0.0",
"merge-options": "^3.0.4",
Expand Down
5 changes: 0 additions & 5 deletions packages/interop/typedoc.json

This file was deleted.

47 changes: 34 additions & 13 deletions packages/mfs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</a>
</p>

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

[![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)
Expand All @@ -13,40 +13,61 @@

> A mutable filesystem powered by Helia
## Table of contents <!-- omit in toc -->
# About

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

## Install
See the interface for all available operations.

## Example

```typescript
import { createHelia } from 'helia'
import { mfs } from '@helia/mfs'

const helia = createHelia({
// ... helia config
})
const fs = mfs(helia)

// create an empty directory
await fs.mkdir('/my-directory')

// add a file to the directory
await fs.writeBytes(Uint8Array.from([0, 1, 2, 3]), '/my-directory/foo.txt')

// read the file
for await (const buf of fs.cat('/my-directory/foo.txt')) {
console.info(buf)
}
```

# Install

```console
$ npm i @helia/mfs
```

### Browser `<script>` tag
## Browser `<script>` tag

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

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

## API Docs
# API Docs

- <https://ipfs.github.io/helia-mfs/modules.html>
- <https://ipfs.github.io/helia-mfs/modules/_helia_mfs.html>

## License
# License

Licensed under either of

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

## Contribute
# Contribute

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

Expand Down
24 changes: 14 additions & 10 deletions packages/mfs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
"version": "1.0.2",
"description": "A mutable filesystem powered by Helia",
"license": "Apache-2.0 OR MIT",
"homepage": "https://github.com/ipfs/helia-mfs/tree/master/packages/mfs#readme",
"homepage": "https://github.com/ipfs/helia-mfs/tree/main/packages/mfs#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/ipfs/helia-mfs.git"
},
"bugs": {
"url": "https://github.com/ipfs/helia-mfs/issues"
},
"publishConfig": {
"access": "public",
"provenance": true
},
"keywords": [
"IPFS"
],
Expand Down Expand Up @@ -135,28 +139,28 @@
"release": "aegir release"
},
"dependencies": {
"@helia/interface": "^2.0.0",
"@helia/unixfs": "^1.2.2",
"@ipld/dag-pb": "^4.0.0",
"@helia/interface": "^3.0.0",
"@helia/unixfs": "^2.0.0",
"@libp2p/interfaces": "^3.3.1",
"@libp2p/logger": "^3.0.1",
"interface-blockstore": "^5.0.0",
"@libp2p/logger": "^4.0.4",
"interface-datastore": "^8.2.2",
"ipfs-unixfs": "^11.0.0",
"ipfs-unixfs-exporter": "^13.1.0",
"ipfs-unixfs-importer": "^15.1.0",
"it-last": "^3.0.1",
"multiformats": "^12.0.1"
"multiformats": "^13.0.0"
},
"devDependencies": {
"aegir": "^41.0.3",
"@ipld/dag-pb": "^4.0.7",
"aegir": "^42.0.1",
"blockstore-core": "^4.0.1",
"datastore-core": "^9.2.0",
"delay": "^6.0.0",
"interface-blockstore": "^5.2.9",
"it-all": "^3.0.1",
"it-drain": "^3.0.1",
"it-first": "^3.0.1",
"it-last": "^3.0.4",
"it-to-buffer": "^4.0.1",
"uint8arrays": "^4.0.3"
"uint8arrays": "^5.0.1"
}
}

0 comments on commit 9f7dc0a

Please sign in to comment.