chore(package): update all dependencies

This commit is contained in:
Julien Fontanet 2016-11-18 11:50:26 +01:00
parent caba246e0b
commit 9d6560aece
9 changed files with 84 additions and 88 deletions

View File

@ -1,8 +0,0 @@
{
"comments": false,
"compact": true,
"presets": [
"stage-0",
"es2015"
]
}

View File

@ -1,9 +1,7 @@
/.nyc_output/
/bower_components/
/dist/
/node_modules/
npm-debug.log
npm-debug.log.*
!node_modules/*
node_modules/*/
pnpm-debug.log
pnpm-debug.log.*

View File

@ -1,5 +0,0 @@
Error.stackTraceLimit = 100
try { require('trace') } catch (_) {}
try { require('clarify') } catch (_) {}
try { require('source-map-support/register') } catch (_) {}

View File

@ -1 +0,0 @@
--require ./.mocha.js

View File

@ -1,9 +1,8 @@
language: node_js
node_js:
- 'stable'
- '4'
- '0.12'
- '0.10'
- stable
- 6
- 4
# Use containers.
# http://docs.travis-ci.com/user/workers/container-based-infrastructure/

View File

@ -1,36 +1,45 @@
'use strict'
var xoLib = require('./')
process.on('unhandledRejection', function (error) {
console.log(error)
})
var xo = new xoLib.Xo({
var Xo = require('./').default
var xo = new Xo({
url: 'localhost:9000'
})
xo.call('acl.get', {}).then(function (result) {
console.log('baz', result)
}).catch(function (error) {
console.log('error', error)
})
xo.signIn({
email: 'admin@admin.net',
password: 'admin'
xo.open().then(function () {
return xo.call('acl.get', {}).then(function (result) {
console.log('success:', result)
}).catch(function (error) {
console.log('failure:', error)
})
}).then(function () {
console.log('foo', xo.user)
}).catch(function (error) {
console.log('error', error)
})
xo.signIn({
email: 'tom',
password: 'tom'
return xo.signIn({
email: 'admin@admin.net',
password: 'admin'
}).then(function () {
console.log('connected as ', xo.user)
}).catch(function (error) {
console.log('failure:', error)
})
}).then(function () {
console.log('bar', xo.user)
}).catch(function (error) {
console.log('error', error)
})
return xo.signIn({
email: 'tom',
password: 'tom'
}).then(function () {
console.log('connected as', xo.user)
xo.call('acl.get', {}).then(function (result) {
console.log('plop', result)
}).catch(function (error) {
console.log('error', error)
return xo.call('acl.get', {}).then(function (result) {
console.log('success:', result)
}).catch(function (error) {
console.log('failure:', error)
})
}).catch(function (error) {
console.log('failure', error)
})
}).then(function () {
return xo.close()
})

View File

@ -25,41 +25,62 @@
"dist/"
],
"engines": {
"node": ">=0.12"
"node": ">=4"
},
"dependencies": {
"jsonrpc-websocket-client": "0.1.1",
"lodash.startswith": "^4.0.0",
"jsonrpc-websocket-client": "^0.1.2",
"lodash": "^4.17.2",
"make-error": "^1.0.4"
},
"devDependencies": {
"babel-cli": "^6.3.17",
"babel-eslint": "^7.0.0",
"babel-preset-es2015": "^6.3.13",
"babel-preset-stage-0": "^6.3.13",
"clarify": "^2.0.0",
"dependency-check": "^2.5.1",
"mocha": "^3.0.0",
"must": "^0.13.1",
"nyc": "^8.1.0",
"source-map-support": "^0.4.0",
"standard": "^8.0.0",
"trace": "^2.0.1"
"babel-cli": "^6.18.0",
"babel-eslint": "^7.1.1",
"babel-plugin-lodash": "^3.2.9",
"babel-preset-env": "^0.0.8",
"babel-preset-stage-0": "^6.16.0",
"cross-env": "^3.1.3",
"dependency-check": "^2.6.0",
"ghooks": "^1.3.2",
"rimraf": "^2.5.4",
"standard": "^8.5.0"
},
"scripts": {
"build": "NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
"clean": "rimraf dist/",
"depcheck": "dependency-check ./package.json",
"dev": "babel --watch --source-maps --out-dir=dist/ src/",
"dev-test": "mocha --opts .mocha.opts --watch --reporter=min \"dist/**/*.spec.js\"",
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
"lint": "standard",
"posttest": "npm run lint && npm run depcheck",
"prepublish": "npm run build",
"test": "nyc mocha --opts .mocha.opts \"dist/**/*.spec.js\""
"prebuild": "npm run clean",
"predev": "npm run clean",
"prepublish": "npm run build"
},
"babel": {
"plugins": [
"lodash"
],
"presets": [
[
"env",
{
"targets": {
"browsers": "> 5%",
"node": 4
}
}
],
"stage-0"
]
},
"standard": {
"ignore": [
"dist/**"
"dist"
],
"parser": "babel-eslint"
},
"config": {
"ghooks": {
"commit-msg": "npm test"
}
}
}

View File

@ -1,9 +1,9 @@
import startsWith from 'lodash.startswith'
import JsonRpcWebSocketClient, {
OPEN,
CLOSED
} from 'jsonrpc-websocket-client'
import { BaseError } from 'make-error'
import { startsWith } from 'lodash'
// ===================================================================

View File

@ -1,17 +0,0 @@
/* eslint-env mocha */
import expect from 'must'
// ===================================================================
import myLib from './'
// ===================================================================
describe.skip('myLib', () => {
it('does something', () => {
// TODO: some real tests.
expect(myLib).to.exists()
})
})