Skip to content

Commit

Permalink
removed node 0.10 support and standardized on bluebird usage
Browse files Browse the repository at this point in the history
  • Loading branch information
timgit committed Mar 11, 2017
1 parent 20bb12b commit 85d32fc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
5 changes: 3 additions & 2 deletions src/boss.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const EventEmitter = require('events').EventEmitter; //node 0.10 compatibility;
const EventEmitter = require('events');
const plans = require('./plans');
const Promise = require("bluebird");

class Boss extends EventEmitter{
constructor(db, config){
Expand All @@ -11,7 +12,7 @@ class Boss extends EventEmitter{
}

supervise(){
var self = this;
const self = this;

return archive().then(init);

Expand Down
5 changes: 3 additions & 2 deletions src/db.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const EventEmitter = require('events').EventEmitter; //node 0.10 compatibility;
const EventEmitter = require('events');
const pg = require('pg');
const Promise = require("bluebird");
const migrations = require('./migrations');
Expand All @@ -20,7 +20,8 @@ class Db extends EventEmitter {
host: poolConfig.host,
port: poolConfig.port,
database: poolConfig.database,
max: poolConfig.poolSize
max: poolConfig.poolSize,
Promise
});

this.pool.on('error', error => this.emit('error', error));
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const EventEmitter = require('events').EventEmitter; //node 0.10 compatibility;
const EventEmitter = require('events');
const assert = require('assert');

const Promise = require("bluebird");
const Attorney = require('./attorney');
const Contractor = require('./contractor');
const Manager = require('./manager');
Expand Down
4 changes: 2 additions & 2 deletions src/manager.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const assert = require('assert');
const EventEmitter = require('events').EventEmitter; //node 0.10 compatibility;
const EventEmitter = require('events');
const Promise = require('bluebird');
const uuid = require('uuid');

Expand All @@ -24,7 +24,7 @@ class Manager extends EventEmitter {
}

monitor(){
var self = this;
const self = this;

return expire().then(init);

Expand Down

0 comments on commit 85d32fc

Please sign in to comment.