Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 7eb630d

Browse files
committed
fix: make sure all deps are up to date, expose Buffer type
1 parent 8b5ddf3 commit 7eb630d

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

examples/bundle-browserify/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"keywords": [],
1212
"license": "MIT",
1313
"devDependencies": {
14-
"browserify": "^13.1.1",
15-
"concat-stream": "^1.5.2",
14+
"browserify": "^14.0.0",
15+
"concat-stream": "^1.6.0",
1616
"http-server": "^0.9.0",
1717
"browserify-zlib-next": "^1.0.1"
1818
},

examples/bundle-browserify/src/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
'use strict'
22

3-
var IPFS = require('../../../src/core') // replace this by line below
3+
const concat = require('concat-stream')
4+
const IPFS = require('../../../src/core') // replace this by line below
45
// var IPFS = require('ipfs')
56

67
// Create the IPFS node instance
78
// for simplicity, we create a new repo everytime the node
89
// is created, because you can't init already existing repos
910
const repoPath = String(Math.random())
11+
1012
const node = new IPFS({
1113
repo: repoPath,
1214
EXPERIMENTAL: {
1315
pubsub: false
1416
}
1517
})
16-
const concat = require('concat-stream')
18+
19+
// expose the node to the window, for the fun!
20+
window.ipfs = node
1721

1822
node.init({ emptyRepo: true, bits: 2048 }, function (err) {
1923
if (err) {

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"async": "^2.1.4",
9191
"bl": "^1.2.0",
9292
"boom": "^4.2.0",
93-
"debug": "^2.6.0",
93+
"debug": "^2.6.1",
9494
"fs-pull-blob-store": "~0.3.0",
9595
"glob": "^7.1.1",
9696
"hapi": "^16.1.0",
@@ -109,8 +109,8 @@
109109
"isstream": "^0.1.2",
110110
"joi": "^10.2.2",
111111
"libp2p-floodsub": "~0.7.3",
112-
"libp2p-ipfs-browser": "~0.18.0",
113-
"libp2p-ipfs-nodejs": "~0.18.0",
112+
"libp2p-ipfs-browser": "~0.18.2",
113+
"libp2p-ipfs-nodejs": "~0.18.1",
114114
"lodash.flatmap": "^4.5.0",
115115
"lodash.get": "^4.4.2",
116116
"lodash.has": "^4.5.2",

src/core/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ class IPFS {
2222
configOpts.EXPERIMENTAL = configOpts.EXPERIMENTAL || {}
2323

2424
// IPFS utils
25-
this.types = {}
25+
this.types = {
26+
Buffer: Buffer
27+
}
2628
this.log = debug('jsipfs')
2729
this.log.err = debug('jsipfs:err')
2830

0 commit comments

Comments
 (0)