Skip to content

Commit 8d13b29

Browse files
committed
upgrade to newer HAPI world order
1 parent d9045f0 commit 8d13b29

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

hapi-plugin-websocket.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424

2525
/* external dependencies */
2626
const URI = require("urijs")
27-
const hoek = require("hoek")
28-
const Boom = require("boom")
27+
const hoek = require("@hapi/hoek")
28+
const Boom = require("@hapi/boom")
2929
const WS = require("ws")
3030
const WSF = require("websocket-framed")
3131

@@ -37,7 +37,7 @@ const register = async (server, pluginOptions) => {
3737
/* determine plugin registration options */
3838
pluginOptions = hoek.applyToDefaults({
3939
create: function () {}
40-
}, pluginOptions, true)
40+
}, pluginOptions, { nullOverride: true })
4141

4242
/* check whether a HAPI route has WebSocket enabled */
4343
const isRouteWebSocketEnabled = (route) => {

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"homepage": "https://github.com/rse/hapi-plugin-websocket",
1818
"bugs": "https://github.com/rse/hapi-plugin-websocket/issues",
1919
"peerDependencies": {
20-
"hapi": ">=17.0.0"
20+
"@hapi/hapi": ">=18.0.0"
2121
},
2222
"dependencies": {
2323
"urijs": "1.19.1",
@@ -27,8 +27,8 @@
2727
"websocket-framed": "1.2.1"
2828
},
2929
"devDependencies": {
30-
"hapi": "18.1.0",
31-
"hapi-auth-basic": "5.0.0",
30+
"@hapi/hapi": "18.3.1",
31+
"@hapi/basic": "5.1.0",
3232
"babel-eslint": "10.0.1",
3333
"eslint": "5.16.0",
3434
"eslint-config-standard": "12.0.0",

sample-server.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

2-
const Boom = require("boom")
3-
const HAPI = require("hapi")
2+
const Boom = require("@hapi/boom")
3+
const HAPI = require("@hapi/hapi")
4+
const HAPIAuthBasic = require("@hapi/basic")
45
const HAPIWebSocket = require("./hapi-plugin-websocket")
5-
const HAPIAuthBasic = require("hapi-auth-basic")
66
const WebSocket = require("ws")
77

88
;(async () => {

0 commit comments

Comments
 (0)