Skip to content

Commit 7a558f8

Browse files
authored
fix: update Helia usage and fix tests (#63)
Helia 1.1.x comes with a libp2p instance so remove custom libp2p creation. The 101 example still has it so there's still a reference to link people to.
1 parent f28d9ac commit 7a558f8

File tree

3 files changed

+2
-60
lines changed

3 files changed

+2
-60
lines changed

package.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,8 @@
1717
"last 1 Chrome version"
1818
],
1919
"dependencies": {
20-
"@chainsafe/libp2p-noise": "^12.0.0",
21-
"@chainsafe/libp2p-yamux": "^4.0.1",
2220
"@helia/unixfs": "^1.2.1",
23-
"@libp2p/bootstrap": "^8.0.0",
24-
"@libp2p/websockets": "^6.0.1",
25-
"blockstore-core": "^4.1.0",
26-
"datastore-core": "^9.1.1",
2721
"helia": "^1.0.0",
28-
"libp2p": "^0.45.0",
2922
"react": "^18.2.0",
3023
"react-dom": "^18.2.0"
3124
},

src/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { unixfs } from '@helia/unixfs'
2+
import { createHelia } from 'helia'
23
import React, { useState, useRef } from 'react'
3-
import { getHelia } from './get-helia.js'
44

55
function App () {
66
const [output, setOutput] = useState([])
@@ -36,7 +36,7 @@ function App () {
3636
if (!helia) {
3737
showStatus('Creating Helia node...', COLORS.active)
3838

39-
node = await getHelia()
39+
node = await createHelia()
4040

4141
setHelia(node)
4242
}

src/get-helia.js

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)