Skip to content

Commit 5e7560b

Browse files
committed
Bump engine.io and engine.io-client
Closes vulnerability alerts, though they appear to have been false positives in the context of `airtap`. The main motivation for bumping these dependencies is simply keeping up with changes. We're jumping several versions ahead but by using the transpiled ES5 bundle of `engine.io-client` (included in its npm package) it should not affect browser support of `airtap`. Verified with the test matrix of `airtap-sauce` (which includes IE9). Closes #276, closes #317, closes #312, closes #315.
1 parent 02f31b9 commit 5e7560b

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,5 @@ updates:
1010
schedule:
1111
interval: monthly
1212
ignore:
13-
- dependency-name: engine.io
14-
- dependency-name: engine.io-client
1513
- dependency-name: standard
1614
- dependency-name: tempy

client/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
var load = require('load-script')
2-
var engineClient = require('engine.io-client')
2+
3+
// Use transpiled flavor for older browser support
4+
var engineClient = require('engine.io-client/dist/engine.io.js')
35

46
// Without Developer Tools open, console is undefined in IE9.
57
if (typeof global.console === 'undefined') {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
"bruce-millis-option": "^1.0.0",
3232
"compression": "^1.7.1",
3333
"debug": "^4.1.0",
34-
"engine.io": "^3.4.2",
35-
"engine.io-client": "3.3.2",
34+
"engine.io": "^6.1.0",
35+
"engine.io-client": "^6.1.1",
3636
"express": "^4.17.0",
3737
"find-nearest-file": "^1.1.0",
3838
"globs-to-files": "^1.0.0",

test/unit/message-server.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict'
22

33
const test = require('tape')
4-
const engineClient = require('engine.io-client')
4+
const Socket = require('engine.io-client').Socket
55
const EventEmitter = require('events')
66
const MessageServer = require('../../lib/message-server')
77

@@ -37,7 +37,7 @@ test('message server closes open connections', function (t) {
3737

3838
server.register(cid, mockContext)
3939

40-
const socket = engineClient(url, {
40+
const socket = new Socket(url, {
4141
path: '/airtap/msg',
4242
extraHeaders: {
4343
'x-airtap-context-id': cid
@@ -73,7 +73,7 @@ test('message server closes if connections were already closed', function (t) {
7373

7474
server.register(cid, mockContext)
7575

76-
const socket = engineClient(url, {
76+
const socket = new Socket(url, {
7777
path: '/airtap/msg',
7878
extraHeaders: {
7979
'x-airtap-context-id': cid
@@ -104,7 +104,7 @@ test('message server closes connection without valid cid', function (t) {
104104
server.open(function (err) {
105105
t.ifError(err, 'no open error')
106106

107-
const socket = engineClient(`ws://localhost:${server.port}`, {
107+
const socket = new Socket(`ws://localhost:${server.port}`, {
108108
path: '/airtap/msg'
109109
})
110110

0 commit comments

Comments
 (0)