Skip to content

Commit

Permalink
Merge 868961f into 2d85c3e
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydwatkin committed Dec 28, 2016
2 parents 2d85c3e + 868961f commit 427da9f
Show file tree
Hide file tree
Showing 20 changed files with 29 additions and 27 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
Presence: require('./lib/presence'),
Chat: require('./lib/chat'),
Roster: require('./lib/roster'),
JID: require('node-xmpp-core').JID,
JID: require('node-xmpp-client').JID,
utils: {
'xep-0004': require('./lib/utils/xep-0004'),
'xep-0059': require('./lib/utils/xep-0059'),
Expand Down
4 changes: 2 additions & 2 deletions lib/base.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* @flow */
'use strict'

const uuid = require('node-uuid')
const uuidV4 = require('uuid/v4')

class Base {

Expand Down Expand Up @@ -79,7 +79,7 @@ class Base {
}
}
++Base.prototype.id.counter
return uuid.v4()
return uuidV4()
}

_parseError (stanza) {
Expand Down
6 changes: 4 additions & 2 deletions lib/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const state = require('./utils/xep-0085')
const delay = require('./utils/xep-0203')
const receipt = require('./utils/xep-0184')
const correction = require('./utils/xep-0308')
const builder = require('ltx')
const builder = require('node-xmpp-client').ltx

class Chat extends Base {

Expand Down Expand Up @@ -52,7 +52,9 @@ class Chat extends Base {
}
correction.parse(stanza, chat)
stanza.getChildren('archived').forEach((archived) => {
if (!chat.archived) chat.archived = []
if (!chat.archived) {
chat.archived = []
}
chat.archived.push({
by: this._getJid(archived.attrs.by),
id: archived.attrs.id
Expand Down
2 changes: 1 addition & 1 deletion lib/presence.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* @flow */
'use strict'

const builder = require('ltx')
const builder = require('node-xmpp-client').ltx
const Base = require('./base')

class Presence extends Base {
Expand Down
2 changes: 1 addition & 1 deletion lib/roster.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* @flow */
'use strict'

const builder = require('ltx')
const builder = require('node-xmpp-client').ltx
const Base = require('./base')

class Roster extends Base {
Expand Down
3 changes: 2 additions & 1 deletion lib/utils/xep-0071.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/* @flow */
'use strict'

const ltx = require('ltx')
const ltx = require('node-xmpp-client').ltx

const NS_XHTML = 'http://www.w3.org/1999/xhtml'
const NS_XHTML_IM = 'http://jabber.org/protocol/xhtml-im'

Expand Down
3 changes: 2 additions & 1 deletion lib/xmpp.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

const Client = require('node-xmpp-client')
const EventEmitter = require('events').EventEmitter
const JID = require('node-xmpp-core').JID
const JID = require('node-xmpp-client').JID

const Chat = require('./chat')
const Presence = require('./presence')
const Roster = require('./roster')
Expand Down
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,20 @@
"main": "index.js",
"dependencies": {
"debounce": "^1.0.0",
"ltx": "^2.1.1",
"node-uuid": "^1.4.7",
"node-xmpp-client": "^3.0.0",
"node-xmpp-core": "^5.0.1"
"uuid": "^3.0.1"
},
"devDependencies": {
"coveralls": "^2.11.4",
"grunt": "~1.0.1",
"grunt-cli": "^1.1.0",
"grunt-mocha-cli": "~2.1.0",
"grunt-mocha-cli": "3",
"grunt-mocha-istanbul": "^5.0.2",
"grunt-standard": "^2.0.0",
"istanbul": "^0.4.0",
"mocha": "~3.1.0",
"mocha": "~3.2.0",
"nodemon": "~1.11.0",
"should": "~11.1.0"
"should": "~11.1.2"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion test/helper.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const ltx = require('ltx')
const ltx = require('node-xmpp-client').ltx
const fs = require('fs')
const Event = require('events').EventEmitter

Expand Down
2 changes: 1 addition & 1 deletion test/lib/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* eslint-env mocha */

const Chat = require('../../index').Chat
const ltx = require('ltx')
const ltx = require('node-xmpp-client').ltx
const helper = require('../helper')
const should = require('should')
const chatState = require('../../index').utils['xep-0085']
Expand Down
2 changes: 1 addition & 1 deletion test/lib/presence.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

const should = require('should')
const Presence = require('../../index').Presence
const ltx = require('ltx')
const ltx = require('node-xmpp-client').ltx
const helper = require('../helper')

/* jshint -W030 */
Expand Down
2 changes: 1 addition & 1 deletion test/lib/roster.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

const should = require('should')
const Roster = require('../../index').Roster
const ltx = require('ltx')
const ltx = require('node-xmpp-client').ltx
const helper = require('../helper')

/* jshint -W030 */
Expand Down
2 changes: 1 addition & 1 deletion test/lib/utils/xep-0004.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
const dataForm = require('../../../index').utils['xep-0004']
const should = require('should')
const helper = require('../../helper')
const ltx = require('ltx')
const ltx = require('node-xmpp-client').ltx

/* jshint -W030 */
describe('XEP-0004', function () {
Expand Down
2 changes: 1 addition & 1 deletion test/lib/utils/xep-0059.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* eslint-env mocha */

const rsm = require('../../../index').utils['xep-0059']
const ltx = require('ltx')
const ltx = require('node-xmpp-client').ltx

/* jshint -W030 */
describe('XEP-0059', function () {
Expand Down
2 changes: 1 addition & 1 deletion test/lib/utils/xep-0066.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* eslint-env mocha */

const oob = require('../../../index').utils['xep-0066']
const ltx = require('ltx')
const ltx = require('node-xmpp-client').ltx

/* jshint -W030 */
describe('XEP-0066', function () {
Expand Down
2 changes: 1 addition & 1 deletion test/lib/utils/xep-0085.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* eslint-env mocha */

const state = require('../../../index').utils['xep-0085']
const ltx = require('ltx')
const ltx = require('node-xmpp-client').ltx

/* jshint -W030 */
describe('XEP-0085', function () {
Expand Down
2 changes: 1 addition & 1 deletion test/lib/utils/xep-0184.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* eslint-env mocha */

const receipt = require('../../../index').utils['xep-0184']
const ltx = require('ltx')
const ltx = require('node-xmpp-client').ltx

/* jshint -W030 */
describe('XEP-0184', function () {
Expand Down
2 changes: 1 addition & 1 deletion test/lib/utils/xep-0203.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* eslint-env mocha */

const delay = require('../../../index').utils['xep-0203']
const ltx = require('ltx')
const ltx = require('node-xmpp-client').ltx

/* jshint -W030 */
describe('XEP-0203', function () {
Expand Down
2 changes: 1 addition & 1 deletion test/lib/utils/xep-0308.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* eslint-env mocha */

const correction = require('../../../index').utils['xep-0308']
const ltx = require('ltx')
const ltx = require('node-xmpp-client').ltx

/* jshint -W030 */
describe('XEP-0308', function () {
Expand Down
2 changes: 1 addition & 1 deletion test/lib/xmpp.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

const Xmpp = require('../../index').Xmpp
const should = require('should')
const ltx = require('ltx')
const ltx = require('node-xmpp-client').ltx
const helper = require('../helper')

/* jshint -W030 */
Expand Down

0 comments on commit 427da9f

Please sign in to comment.