Remove Node.js v8 support (#1402)
This commit is contained in:
committed by
delvedor
parent
ae3bb7031f
commit
28370acf49
@ -91,7 +91,7 @@ class Transport {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
var p = null
|
||||
let p = null
|
||||
|
||||
// promises support
|
||||
if (callback === undefined) {
|
||||
@ -147,9 +147,10 @@ class Transport {
|
||||
// the size of the stream, we risk to take too much memory.
|
||||
// Furthermore, copying everytime the stream is very a expensive operation.
|
||||
const maxRetries = isStream(params.body) || isStream(params.bulkBody)
|
||||
? 0 : (typeof options.maxRetries === 'number' ? options.maxRetries : this.maxRetries)
|
||||
? 0
|
||||
: (typeof options.maxRetries === 'number' ? options.maxRetries : this.maxRetries)
|
||||
const compression = options.compression !== undefined ? options.compression : this.compression
|
||||
var request = { abort: noop }
|
||||
let request = { abort: noop }
|
||||
const transportReturn = {
|
||||
then (onFulfilled, onRejected) {
|
||||
return p.then(onFulfilled, onRejected)
|
||||
@ -525,7 +526,7 @@ function defaultNodeFilter (node) {
|
||||
}
|
||||
|
||||
function roundRobinSelector () {
|
||||
var current = -1
|
||||
let current = -1
|
||||
return function _roundRobinSelector (connections) {
|
||||
if (++current >= connections.length) {
|
||||
current = 0
|
||||
@ -540,8 +541,8 @@ function randomSelector (connections) {
|
||||
}
|
||||
|
||||
function generateRequestId () {
|
||||
var maxInt = 2147483647
|
||||
var nextReqId = 0
|
||||
const maxInt = 2147483647
|
||||
let nextReqId = 0
|
||||
return function genReqId (params, options) {
|
||||
return (nextReqId = (nextReqId + 1) & maxInt)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user