Skip to content

Commit 36efbd0

Browse files
Update tmp package version (#9155)
"tmp": "^0.1.0" has next code 'process.on(SIGINT, function _tmp$sigint_listener(doExit) { .... process.exit(0);' "tmp": "^0.2.1" does not have this code and don't affect SIGINT/SIGTERM/SIGQUIT fix issue 9059 Co-authored-by: Sri Harsha <[email protected]>
1 parent e4c07b3 commit 36efbd0

File tree

13 files changed

+49
-39
lines changed

13 files changed

+49
-39
lines changed

javascript/node/selenium-webdriver/chromium.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ const Command = {
108108
* @return {!command.Executor} The new command executor.
109109
*/
110110
function createExecutor(url, vendorPrefix) {
111-
let agent = new http.Agent({ keepAlive: true })
112-
let client = url.then((url) => new http.HttpClient(url, agent))
113-
let executor = new http.Executor(client)
111+
const agent = new http.Agent({ keepAlive: true })
112+
const client = url.then((url) => new http.HttpClient(url, agent))
113+
const executor = new http.Executor(client)
114114
configureExecutor(executor, vendorPrefix)
115115
return executor
116116
}

javascript/node/selenium-webdriver/edge.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class ServiceBuilder extends chromium.ServiceBuilder {
169169
* MicrosoftWebDriver cannot be found on the PATH.
170170
*/
171171
constructor(opt_exe) {
172-
let exe = opt_exe || locateSynchronously()
172+
const exe = opt_exe || locateSynchronously()
173173
if (!exe) {
174174
throw Error(
175175
'The WebDriver for Edge could not be found on the current PATH. Please ' +

javascript/node/selenium-webdriver/http/util.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ const Executor = require('./index').Executor,
3535
* a hash of the server status.
3636
*/
3737
function getStatus(url) {
38-
var client = new HttpClient(url)
39-
var executor = new Executor(client)
40-
var command = new Command(CommandName.GET_SERVER_STATUS)
38+
const client = new HttpClient(url)
39+
const executor = new Executor(client)
40+
const command = new Command(CommandName.GET_SERVER_STATUS)
4141
return executor.execute(command)
4242
}
4343

javascript/node/selenium-webdriver/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -598,9 +598,9 @@ class Builder {
598598
build() {
599599
// Create a copy for any changes we may need to make based on the current
600600
// environment.
601-
var capabilities = new Capabilities(this.capabilities_)
601+
const capabilities = new Capabilities(this.capabilities_)
602602

603-
var browser
603+
let browser
604604
if (!this.ignoreEnv_ && process.env.SELENIUM_BROWSER) {
605605
this.log_.fine(`SELENIUM_BROWSER=${process.env.SELENIUM_BROWSER}`)
606606
browser = process.env.SELENIUM_BROWSER.split(/:/, 3)

javascript/node/selenium-webdriver/io/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717

1818
'use strict'
1919

20-
var fs = require('fs'),
21-
path = require('path'),
22-
rimraf = require('rimraf'),
23-
tmp = require('tmp')
20+
const fs = require('fs')
21+
const path = require('path')
22+
const rimraf = require('rimraf')
23+
const tmp = require('tmp')
2424

2525
/**
2626
* @param {!Function} fn .

javascript/node/selenium-webdriver/lib/actions.js

+16-15
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ const input = require('./input')
2626
* @return {!Array} .
2727
*/
2828
function flatten(args) {
29-
let result = []
29+
const result = []
3030
for (let i = 0; i < args.length; i++) {
31-
let element = args[i]
31+
const element = args[i]
3232
if (Array.isArray(element)) {
3333
result.push.apply(result, flatten(element))
3434
} else {
@@ -119,8 +119,8 @@ class LegacyActionSequence {
119119
// Make a protected copy of the scheduled actions. This will protect against
120120
// users defining additional commands before this sequence is actually
121121
// executed.
122-
let actions = this.actions_.concat()
123-
for (let action of actions) {
122+
const actions = this.actions_.concat()
123+
for (const action of actions) {
124124
await this.driver_.execute(action.command)
125125
}
126126
}
@@ -141,7 +141,7 @@ class LegacyActionSequence {
141141
* @return {!LegacyActionSequence} A self reference.
142142
*/
143143
mouseMove(location, opt_offset) {
144-
let cmd = new command.Command(command.Name.LEGACY_ACTION_MOUSE_MOVE)
144+
const cmd = new command.Command(command.Name.LEGACY_ACTION_MOUSE_MOVE)
145145

146146
if (typeof location.x === 'number') {
147147
setOffset(/** @type {{x: number, y: number}} */ (location))
@@ -389,8 +389,9 @@ class LegacyActionSequence {
389389
* @return {!LegacyActionSequence} A self reference.
390390
* @throws {Error} If the key is not a valid modifier key.
391391
*/
392-
sendKeys(var_args) { // eslint-disable-line
393-
let keys = flatten(arguments)
392+
sendKeys(_var_args) {
393+
// eslint-disable-line
394+
const keys = flatten(arguments)
394395
return this.scheduleKeyboardAction_('sendKeys', keys)
395396
}
396397
}
@@ -481,7 +482,7 @@ class LegacyTouchSequence {
481482
* @return {!LegacyTouchSequence} A self reference.
482483
*/
483484
doubleTap(elem) {
484-
let cmd = new command.Command(
485+
const cmd = new command.Command(
485486
command.Name.LEGACY_ACTION_TOUCH_DOUBLE_TAP
486487
).setParameter('element', elem.getId())
487488

@@ -496,7 +497,7 @@ class LegacyTouchSequence {
496497
* @return {!LegacyTouchSequence} A self reference.
497498
*/
498499
longPress(elem) {
499-
let cmd = new command.Command(
500+
const cmd = new command.Command(
500501
command.Name.LEGACY_ACTION_TOUCH_LONG_PRESS
501502
).setParameter('element', elem.getId())
502503

@@ -511,7 +512,7 @@ class LegacyTouchSequence {
511512
* @return {!LegacyTouchSequence} A self reference.
512513
*/
513514
tapAndHold(location) {
514-
let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_DOWN)
515+
const cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_DOWN)
515516
.setParameter('x', location.x)
516517
.setParameter('y', location.y)
517518

@@ -526,7 +527,7 @@ class LegacyTouchSequence {
526527
* @return {!LegacyTouchSequence} A self reference.
527528
*/
528529
move(location) {
529-
let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_MOVE)
530+
const cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_MOVE)
530531
.setParameter('x', location.x)
531532
.setParameter('y', location.y)
532533

@@ -556,7 +557,7 @@ class LegacyTouchSequence {
556557
* @return {!LegacyTouchSequence} A self reference.
557558
*/
558559
scroll(offset) {
559-
let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_SCROLL)
560+
const cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_SCROLL)
560561
.setParameter('xoffset', offset.x)
561562
.setParameter('yoffset', offset.y)
562563

@@ -573,7 +574,7 @@ class LegacyTouchSequence {
573574
* @return {!LegacyTouchSequence} A self reference.
574575
*/
575576
scrollFromElement(elem, offset) {
576-
let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_SCROLL)
577+
const cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_SCROLL)
577578
.setParameter('element', elem.getId())
578579
.setParameter('xoffset', offset.x)
579580
.setParameter('yoffset', offset.y)
@@ -590,7 +591,7 @@ class LegacyTouchSequence {
590591
* @return {!LegacyTouchSequence} A self reference.
591592
*/
592593
flick(speed) {
593-
let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_FLICK)
594+
const cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_FLICK)
594595
.setParameter('xspeed', speed.xspeed)
595596
.setParameter('yspeed', speed.yspeed)
596597

@@ -607,7 +608,7 @@ class LegacyTouchSequence {
607608
* @return {!LegacyTouchSequence} A self reference.
608609
*/
609610
flickElement(elem, offset, speed) {
610-
let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_FLICK)
611+
const cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_FLICK)
611612
.setParameter('element', elem.getId())
612613
.setParameter('xoffset', offset.x)
613614
.setParameter('yoffset', offset.y)

javascript/node/selenium-webdriver/lib/by.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ class By {
252252
}
253253

254254
toObject() {
255-
var tmp = {}
255+
const tmp = {}
256256
tmp[this.using] = this.value
257257
return tmp
258258
}

javascript/node/selenium-webdriver/lib/http.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function requireAtom(module, bazelTarget) {
7676
* @return {string} The headers as a string.
7777
*/
7878
function headersToString(headers) {
79-
let ret = []
79+
const ret = []
8080
headers.forEach(function (value, name) {
8181
ret.push(`${name.toLowerCase()}: ${value}`)
8282
})

javascript/node/selenium-webdriver/lib/promise.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function isPromise(value) {
5151
*/
5252
function delayed(ms) {
5353
return new Promise((resolve) => {
54-
setTimeout(() => resolve(), ms)
54+
setTimeout(resolve, ms)
5555
})
5656
}
5757

javascript/node/selenium-webdriver/lib/until.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const webdriver = require('./webdriver'),
6868
* @return {!Condition<boolean>} A new condition.
6969
*/
7070
exports.ableToSwitchToFrame = function ableToSwitchToFrame(frame) {
71-
var condition
71+
let condition
7272
if (typeof frame === 'number' || frame instanceof webdriver.WebElement) {
7373
condition = (driver) => attemptToSwitchFrames(driver, frame)
7474
} else {

javascript/node/selenium-webdriver/lib/webdriver.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ class WebDriver {
930930

931931
/** @override */
932932
sleep(ms) {
933-
return new Promise((resolve) => setTimeout(() => resolve(), ms))
933+
return new Promise((resolve) => setTimeout(resolve, ms))
934934
}
935935

936936
/** @override */

javascript/node/selenium-webdriver/package-lock.json

+14-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

javascript/node/selenium-webdriver/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"dependencies": {
2626
"jszip": "^3.5.0",
2727
"rimraf": "^2.7.1",
28-
"tmp": "^0.1.0",
28+
"tmp": "^0.2.1",
2929
"ws": "^7.3.1"
3030
},
3131
"devDependencies": {

0 commit comments

Comments
 (0)