diff --git a/.gitignore b/.gitignore index c2ba6370..923c22a3 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,6 @@ node_modules .node_repl_history dist + +package-lock.js +yarn.lock \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 5cc672b8..5918cb31 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/circle.yml b/circle.yml index 56f7efbe..e8305206 100644 --- a/circle.yml +++ b/circle.yml @@ -2,6 +2,10 @@ machine: node: version: stable +post: + test: + - npm run coverage -- --upload + dependencies: pre: - google-chrome --version diff --git a/package.json b/package.json index 3d900c9e..c065b6bf 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", @@ -57,4 +56,4 @@ "Pedro Teixeira ", "Richard Littauer " ] -} \ No newline at end of file +} diff --git a/src/index.js b/src/index.js index 9793c687..68179dfe 100644 --- a/src/index.js +++ b/src/index.js @@ -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