mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:13:31 +02:00
upgrade node to latest version v17.9.0 (#500)
* upgrade node to latest version v17.9.0 Signed-off-by: Denis Barbaron <denis.barbaron@orange.com> * remove useless comments in karma configuration file Signed-off-by: Denis Barbaron <denis.barbaron@orange.com>
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
//
|
||||
// Copyright © 2022 contains code contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
|
||||
//
|
||||
|
||||
var stream = require('stream')
|
||||
var url = require('url')
|
||||
var util = require('util')
|
||||
@@ -70,6 +74,11 @@ module.exports = syrup.serial()
|
||||
, stats.bytesTransferred / contentLength
|
||||
))
|
||||
)
|
||||
// temporary workaround as the 'end' event is never fired
|
||||
if ((stats.bytesTransferred / contentLength) === 1 &&
|
||||
process.versions.node.split('.')[0] >= 16) {
|
||||
endListener()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
//
|
||||
// Copyright © 2022 contains code contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
|
||||
//
|
||||
|
||||
var net = require('net')
|
||||
var util = require('util')
|
||||
var os = require('os')
|
||||
@@ -59,13 +63,13 @@ module.exports = syrup.serial()
|
||||
}
|
||||
|
||||
function joinListener(newGroup, identifier) {
|
||||
if (!data.response.equals(new Buffer(identifier || '', 'hex'))) {
|
||||
if (!data.response.equals(Buffer.from(identifier || '', 'hex'))) {
|
||||
resolver.reject(new Error('Someone else took the device'))
|
||||
}
|
||||
}
|
||||
|
||||
function autojoinListener(identifier, joined) {
|
||||
if (data.response.equals(new Buffer(identifier, 'hex'))) {
|
||||
if (data.response.equals(Buffer.from(identifier, 'hex'))) {
|
||||
if (joined) {
|
||||
resolver.resolve()
|
||||
}
|
||||
@@ -99,7 +103,7 @@ module.exports = syrup.serial()
|
||||
, height: options.vncInitialSize[1]
|
||||
, security: [{
|
||||
type: VncConnection.SECURITY_VNC
|
||||
, challenge: new Buffer(16).fill(0)
|
||||
, challenge: Buffer.alloc(16).fill(0)
|
||||
, auth: vncAuthHandler
|
||||
}]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user