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

Commit

Permalink
fix: make sure all deps are up to date, expose Buffer type
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Feb 11, 2017
1 parent 8b5ddf3 commit 7eb630d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions examples/bundle-browserify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"keywords": [],
"license": "MIT",
"devDependencies": {
"browserify": "^13.1.1",
"concat-stream": "^1.5.2",
"browserify": "^14.0.0",
"concat-stream": "^1.6.0",
"http-server": "^0.9.0",
"browserify-zlib-next": "^1.0.1"
},
Expand Down
8 changes: 6 additions & 2 deletions examples/bundle-browserify/src/index.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
'use strict'

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

// Create the IPFS node instance
// for simplicity, we create a new repo everytime the node
// is created, because you can't init already existing repos
const repoPath = String(Math.random())

const node = new IPFS({
repo: repoPath,
EXPERIMENTAL: {
pubsub: false
}
})
const concat = require('concat-stream')

// expose the node to the window, for the fun!
window.ipfs = node

node.init({ emptyRepo: true, bits: 2048 }, function (err) {
if (err) {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"async": "^2.1.4",
"bl": "^1.2.0",
"boom": "^4.2.0",
"debug": "^2.6.0",
"debug": "^2.6.1",
"fs-pull-blob-store": "~0.3.0",
"glob": "^7.1.1",
"hapi": "^16.1.0",
Expand All @@ -109,8 +109,8 @@
"isstream": "^0.1.2",
"joi": "^10.2.2",
"libp2p-floodsub": "~0.7.3",
"libp2p-ipfs-browser": "~0.18.0",
"libp2p-ipfs-nodejs": "~0.18.0",
"libp2p-ipfs-browser": "~0.18.2",
"libp2p-ipfs-nodejs": "~0.18.1",
"lodash.flatmap": "^4.5.0",
"lodash.get": "^4.4.2",
"lodash.has": "^4.5.2",
Expand Down
4 changes: 3 additions & 1 deletion src/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ class IPFS {
configOpts.EXPERIMENTAL = configOpts.EXPERIMENTAL || {}

// IPFS utils
this.types = {}
this.types = {
Buffer: Buffer
}
this.log = debug('jsipfs')
this.log.err = debug('jsipfs:err')

Expand Down

0 comments on commit 7eb630d

Please sign in to comment.