Skip to content

Commit a6857ca

Browse files
committed
upgrade to hemera 5
1 parent fc45373 commit a6857ca

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

lib/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ async function register(server, options) {
2020
const settings = Hoek.applyToDefaults(internals.defaults, options)
2121
const hemera = new Hemera(Nats.connect(settings.nats), settings.hemera)
2222

23-
hemera.on('error', error => server.log(['hemera', 'error'], error))
2423
hemera.on('serverResponseError', error =>
2524
server.log(['hemera', 'serverResponseError'], error)
2625
)

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,29 @@
1515
"node": ">=8.9.0"
1616
},
1717
"dependencies": {
18-
"hoek": "5.0.x",
18+
"hoek": "5.0.3",
1919
"nats": "0.8.x",
20-
"nats-hemera": "^4.0.0",
20+
"nats-hemera": "^5.0.0-rc.1",
2121
"tinysonic": "1.3.x"
2222
},
2323
"peerDependencies": {
24-
"hapi": ">=17.2.0"
24+
"hapi": "^17.2.3"
2525
},
2626
"devDependencies": {
2727
"catbox-memory": "^3.1.1",
2828
"code": "^5.2.0",
2929
"coveralls": "^3.0.0",
30-
"eslint": "^4.18.2",
30+
"eslint": "^4.19.0",
3131
"eslint-config-hemera": "^0.0.2",
32-
"hapi": "^17.2.2",
33-
"hemera-testsuite": "^2.0.5",
32+
"hapi": "^17.2.3",
33+
"hemera-testsuite": "^4.0.0",
3434
"istanbul": "^0.4.5",
35-
"joi": "^13.0.2",
35+
"joi": "^13.1.2",
3636
"mocha": "^5.0.4",
3737
"mocha-lcov-reporter": "^1.3.0",
3838
"np": "^2.20.1",
3939
"prettier": "^1.11.1",
40-
"sinon": "^4.4.2"
40+
"sinon": "^4.4.6"
4141
},
4242
"scripts": {
4343
"test": "mocha --exit -t 5000 --recursive",

test/hemera-plugin.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22

33
const Hapi = require('hapi')
44
const HemeraTestsuite = require('hemera-testsuite')
5+
const hemeraInternalSymbols = require('nats-hemera/lib/symbols')
56
const Code = require('code')
67
const HapiHemera = require('../lib')
78

89
const expect = Code.expect
910

10-
process.setMaxListeners(0)
11-
1211
describe('Hemera plugin registration', function() {
1312
const PORT = 6242
1413
const noAuthUrl = 'nats://localhost:' + PORT
@@ -43,9 +42,9 @@ describe('Hemera plugin registration', function() {
4342
}
4443
})
4544
expect(server.hemera).to.exist()
46-
expect(server.hemera.plugins.myPlugin.plugin$.options).to.be.equals({
47-
a: 1
48-
})
45+
expect(server.hemera[hemeraInternalSymbols.registeredPlugins]).to.be.equals(
46+
['myPlugin']
47+
)
4948

5049
await server.stop()
5150
})

0 commit comments

Comments
 (0)