Skip to content

Commit

Permalink
feat: migrate out of protocol-buffers and into protons
Browse files Browse the repository at this point in the history
* feat: upgrade to new aegir

* feat: replace protocol-buffers with protons

Ref ipfs/js-ipfs#991

* chore: fix travis config
  • Loading branch information
dignifiedquire authored and daviddias committed Sep 7, 2017
1 parent c1070e0 commit 32deddc
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 31 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ node_modules
.node_repl_history

dist

package-lock.js
yarn.lock
13 changes: 1 addition & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,20 @@ language: node_js

matrix:
include:
- node_js: 4
env: CXX=g++-4.8
- node_js: 6
env:
- CXX=g++-4.8
- node_js: stable
env: CXX=g++-4.8

# Make sure we have new NPM.
before_install:
- npm install -g npm@4

script:
- npm run lint
- npm test
- npm run coverage
- make test
- npm run test

before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start

after_success:
- npm run coverage-publish

addons:
firefox: 'latest'
apt:
Expand Down
4 changes: 4 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ machine:
node:
version: stable

post:
test:
- npm run coverage -- --upload

dependencies:
pre:
- google-chrome --version
Expand Down
33 changes: 16 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@
"fs": false
},
"scripts": {
"test": "aegir-test",
"test:node": "aegir-test node",
"test:browser": "aegir-test browser",
"build": "aegir-build",
"lint": "aegir-lint",
"release": "aegir-release",
"release-minor": "aegir-release --minor",
"release-major": "aegir-release --major",
"coverage": "aegir-coverage",
"coverage-publish": "aegir-coverage publish"
"test": "aegir test",
"test:node": "aegir test -t node",
"test:browser": "aegir test -t browser -t webworker",
"build": "aegir build",
"lint": "aegir lint",
"release": "aegir release",
"release-minor": "aegir release --type minor",
"release-major": "aegir release --type major",
"coverage": "aegir coverage"
},
"repository": {
"type": "git",
Expand All @@ -31,19 +30,19 @@
"url": "https://github.com/ipfs/js-ipfs-unixfs/issues"
},
"engines": {
"node": ">=4.0.0",
"node": ">=6.0.0",
"npm": ">=3.0.0"
},
"homepage": "https://github.com/ipfs/js-ipfs-unixfs#readme",
"devDependencies": {
"aegir": "^11.0.2",
"chai": "^4.0.2",
"dirty-chai": "^2.0.0",
"aegir": "^12.0.4",
"chai": "^4.1.2",
"dirty-chai": "^2.0.1",
"pre-commit": "^1.2.2",
"safe-buffer": "^5.1.0"
"safe-buffer": "^5.1.1"
},
"dependencies": {
"protocol-buffers": "^3.2.1"
"protons": "^1.0.0"
},
"pre-commit": [
"lint",
Expand All @@ -57,4 +56,4 @@
"Pedro Teixeira <[email protected]>",
"Richard Littauer <[email protected]>"
]
}
}
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

const protobuf = require('protocol-buffers')
const pb = protobuf(require('./unixfs.proto'))
const protons = require('protons')
const pb = protons(require('./unixfs.proto'))
// encode/decode
const unixfsData = pb.Data
// const unixfsMetadata = pb.MetaData // encode/decode
Expand Down

0 comments on commit 32deddc

Please sign in to comment.