diff --git a/examples/node.js b/examples/node.js index 685e423fd..e3c973a44 100644 --- a/examples/node.js +++ b/examples/node.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/gulpfile.babel.js b/gulpfile.babel.js index d4cc01e39..02bf3860c 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/docs.js b/src/docs.js index 2c1071bdf..9357d74d8 100644 --- a/src/docs.js +++ b/src/docs.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/driver.js b/src/driver.js index 8feaf8d9f..bb1ed6ff1 100644 --- a/src/driver.js +++ b/src/driver.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/error.js b/src/error.js index 121a30c2a..7e9dca1c7 100644 --- a/src/error.js +++ b/src/error.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/graph-types.js b/src/graph-types.js index 2a3416309..ab94b7909 100644 --- a/src/graph-types.js +++ b/src/graph-types.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/index.js b/src/index.js index 44cb16203..bc8395ff5 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/integer.js b/src/integer.js index c4ee7edc0..bb8114262 100644 --- a/src/integer.js +++ b/src/integer.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. @@ -76,6 +76,7 @@ class Integer { this.lessThanOrEqual(Integer.MAX_SAFE_VALUE) ) } + /** * Converts the Integer to an exact javascript Number, assuming it is a 32 bit integer. * @returns {number} @@ -696,7 +697,7 @@ Object.defineProperty(Integer.prototype, '__isInteger__', { * @expose */ Integer.isInteger = function (obj) { - return (obj && obj['__isInteger__']) === true + return (obj && obj.__isInteger__) === true } /** @@ -976,7 +977,7 @@ Integer.MAX_SAFE_VALUE = Integer.fromBits(0xffffffff | 0, 0x1fffff | 0) * @param {Mixed} value - The value to use. * @return {Integer} - An object of type Integer. */ -let int = Integer.fromValue +const int = Integer.fromValue /** * Check if a variable is of Integer type. @@ -984,7 +985,7 @@ let int = Integer.fromValue * @param {Mixed} value - The variable to check. * @return {Boolean} - Is it of the Integer type? */ -let isInt = Integer.isInteger +const isInt = Integer.isInteger /** * Check if a variable can be safely converted to a number @@ -992,7 +993,7 @@ let isInt = Integer.isInteger * @param {Mixed} value - The variable to check * @return {Boolean} - true if it is safe to call toNumber on variable otherwise false */ -let inSafeRange = Integer.inSafeRange +const inSafeRange = Integer.inSafeRange /** * Converts a variable to a number @@ -1000,7 +1001,7 @@ let inSafeRange = Integer.inSafeRange * @param {Mixed} value - The variable to convert * @return {number} - the variable as a number */ -let toNumber = Integer.toNumber +const toNumber = Integer.toNumber /** * Converts the integer to a string representation @@ -1009,7 +1010,7 @@ let toNumber = Integer.toNumber * @param {number} radix - radix to use in string conversion, defaults to 10 * @return {string} - returns a string representation of the integer */ -let toString = Integer.toString +const toString = Integer.toString export { int, isInt, inSafeRange, toNumber, toString } diff --git a/src/internal/bolt-protocol-util.js b/src/internal/bolt-protocol-util.js index 5b8031d5b..314ad483c 100644 --- a/src/internal/bolt-protocol-util.js +++ b/src/internal/bolt-protocol-util.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/bolt-protocol-v1.js b/src/internal/bolt-protocol-v1.js index 2f6c60ae2..3a4206528 100644 --- a/src/internal/bolt-protocol-v1.js +++ b/src/internal/bolt-protocol-v1.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/bolt-protocol-v2.js b/src/internal/bolt-protocol-v2.js index a22a87d31..fabb602ad 100644 --- a/src/internal/bolt-protocol-v2.js +++ b/src/internal/bolt-protocol-v2.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/bolt-protocol-v3.js b/src/internal/bolt-protocol-v3.js index 4184ed7a8..1e5b27f18 100644 --- a/src/internal/bolt-protocol-v3.js +++ b/src/internal/bolt-protocol-v3.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/bolt-protocol-v4.js b/src/internal/bolt-protocol-v4.js index ecdd6e93b..1d1ff76c9 100644 --- a/src/internal/bolt-protocol-v4.js +++ b/src/internal/bolt-protocol-v4.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/bookmark.js b/src/internal/bookmark.js index 59a7f8c26..b6a21846a 100644 --- a/src/internal/bookmark.js +++ b/src/internal/bookmark.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/browser/browser-buf.js b/src/internal/browser/browser-buf.js index ed275322b..66fb5b0ae 100644 --- a/src/internal/browser/browser-buf.js +++ b/src/internal/browser/browser-buf.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/browser/browser-channel.js b/src/internal/browser/browser-channel.js index 4dfe1ccba..93ddc87a9 100644 --- a/src/internal/browser/browser-channel.js +++ b/src/internal/browser/browser-channel.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. @@ -58,7 +58,7 @@ export default class WebSocketChannel { this._ws = createWebSocket(scheme, config.address, socketFactory) this._ws.binaryType = 'arraybuffer' - let self = this + const self = this // All connection errors are not sent to the error handler // we must also check for dirty close calls this._ws.onclose = function (e) { @@ -71,7 +71,7 @@ export default class WebSocketChannel { self._clearConnectionTimeout() // Drain all pending messages - let pending = self._pending + const pending = self._pending self._pending = null for (let i = 0; i < pending.length; i++) { self.write(pending[i]) diff --git a/src/internal/browser/browser-host-name-resolver.js b/src/internal/browser/browser-host-name-resolver.js index 400fc35c9..e95438911 100644 --- a/src/internal/browser/browser-host-name-resolver.js +++ b/src/internal/browser/browser-host-name-resolver.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/browser/browser-utf8.js b/src/internal/browser/browser-utf8.js index 32cd49e0a..a3d065795 100644 --- a/src/internal/browser/browser-utf8.js +++ b/src/internal/browser/browser-utf8.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/browser/index.js b/src/internal/browser/index.js index 926391373..9c1bbfc97 100644 --- a/src/internal/browser/index.js +++ b/src/internal/browser/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/buf/base-buf.js b/src/internal/buf/base-buf.js index 9ff8a4150..60fe75d87 100644 --- a/src/internal/buf/base-buf.js +++ b/src/internal/buf/base-buf.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. @@ -320,7 +320,7 @@ export default class BaseBuffer { } _updatePos (length) { - let p = this.position + const p = this.position this.position += length return p } diff --git a/src/internal/buf/combined-buf.js b/src/internal/buf/combined-buf.js index 5c8a11038..72a6dde91 100644 --- a/src/internal/buf/combined-buf.js +++ b/src/internal/buf/combined-buf.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/channel-config.js b/src/internal/channel-config.js index 4fdd3ff97..f6101dfb8 100644 --- a/src/internal/channel-config.js +++ b/src/internal/channel-config.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/chunking.js b/src/internal/chunking.js index e05e91b3c..dc9b5cc36 100644 --- a/src/internal/chunking.js +++ b/src/internal/chunking.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. @@ -21,9 +21,9 @@ import BaseBuffer from './buf/base-buf' import { alloc } from './node' import CombinedBuffer from './buf/combined-buf' -let _CHUNK_HEADER_SIZE = 2 -let _MESSAGE_BOUNDARY = 0x00 -let _DEFAULT_BUFFER_SIZE = 1400 // http://stackoverflow.com/questions/2613734/maximum-packet-size-for-a-tcp-connection +const _CHUNK_HEADER_SIZE = 2 +const _MESSAGE_BOUNDARY = 0x00 +const _DEFAULT_BUFFER_SIZE = 1400 // http://stackoverflow.com/questions/2613734/maximum-packet-size-for-a-tcp-connection /** * Looks like a writable buffer, chunks output transparently into a channel below. @@ -75,7 +75,7 @@ class Chunker extends BaseBuffer { this._closeChunkIfOpen() // Local copy and clear the buffer field. This ensures that the buffer is not re-released if the flush call fails - let out = this._buffer + const out = this._buffer this._buffer = null this._ch.write(out.getSlice(0, out.position)) @@ -105,7 +105,7 @@ class Chunker extends BaseBuffer { /** Ensure at least the given size is available for writing */ _ensure (size) { - let toWriteSize = this._chunkOpen ? size : size + _CHUNK_HEADER_SIZE + const toWriteSize = this._chunkOpen ? size : size + _CHUNK_HEADER_SIZE if (this._buffer.remaining() < toWriteSize) { this.flush() } @@ -119,7 +119,7 @@ class Chunker extends BaseBuffer { _closeChunkIfOpen () { if (this._chunkOpen) { - let chunkSize = + const chunkSize = this._buffer.position - (this._currentChunkStart + _CHUNK_HEADER_SIZE) this._buffer.putUInt16(this._currentChunkStart, chunkSize) this._chunkOpen = false diff --git a/src/internal/connection-channel.js b/src/internal/connection-channel.js index a4fd927b4..b7fd35e44 100644 --- a/src/internal/connection-channel.js +++ b/src/internal/connection-channel.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. @@ -294,7 +294,7 @@ export default class ChannelConnection extends Connection { this._currentObserver.onError(this._error) } while (this._pendingObservers.length > 0) { - let observer = this._pendingObservers.shift() + const observer = this._pendingObservers.shift() if (observer && observer.onError) { observer.onError(this._error) } diff --git a/src/internal/connection-delegate.js b/src/internal/connection-delegate.js index ad6a61192..aeea6c235 100644 --- a/src/internal/connection-delegate.js +++ b/src/internal/connection-delegate.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/connection-error-handler.js b/src/internal/connection-error-handler.js index d027aae13..ca514d3b3 100644 --- a/src/internal/connection-error-handler.js +++ b/src/internal/connection-error-handler.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/connection-holder.js b/src/internal/connection-holder.js index bb817fcf9..1ca1c52ae 100644 --- a/src/internal/connection-holder.js +++ b/src/internal/connection-holder.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/connection-provider-direct.js b/src/internal/connection-provider-direct.js index 723945e1a..04d8aa38b 100644 --- a/src/internal/connection-provider-direct.js +++ b/src/internal/connection-provider-direct.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/connection-provider-pooled.js b/src/internal/connection-provider-pooled.js index 082029723..3af753bf7 100644 --- a/src/internal/connection-provider-pooled.js +++ b/src/internal/connection-provider-pooled.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/connection-provider-routing.js b/src/internal/connection-provider-routing.js index f48b2faa9..3008b451c 100644 --- a/src/internal/connection-provider-routing.js +++ b/src/internal/connection-provider-routing.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/connection-provider-single.js b/src/internal/connection-provider-single.js index d9db87d9e..2259355a0 100644 --- a/src/internal/connection-provider-single.js +++ b/src/internal/connection-provider-single.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/connection-provider.js b/src/internal/connection-provider.js index 304cc1d60..466bb1902 100644 --- a/src/internal/connection-provider.js +++ b/src/internal/connection-provider.js @@ -1,7 +1,7 @@ import Bookmark from './bookmark' /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/connection.js b/src/internal/connection.js index f51c5cbb7..709977a05 100644 --- a/src/internal/connection.js +++ b/src/internal/connection.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/connectivity-verifier.js b/src/internal/connectivity-verifier.js index b05332fc7..02884c9cc 100644 --- a/src/internal/connectivity-verifier.js +++ b/src/internal/connectivity-verifier.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/constants.js b/src/internal/constants.js index 0a1355b09..ca3531297 100644 --- a/src/internal/constants.js +++ b/src/internal/constants.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/least-connected-load-balancing-strategy.js b/src/internal/least-connected-load-balancing-strategy.js index 272162e64..bf5ca57bd 100644 --- a/src/internal/least-connected-load-balancing-strategy.js +++ b/src/internal/least-connected-load-balancing-strategy.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/load-balancing-strategy.js b/src/internal/load-balancing-strategy.js index 650a0e08b..0e4582ec1 100644 --- a/src/internal/load-balancing-strategy.js +++ b/src/internal/load-balancing-strategy.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/logger.js b/src/internal/logger.js index 1bd56ee6c..fcd305f35 100644 --- a/src/internal/logger.js +++ b/src/internal/logger.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/node/index.js b/src/internal/node/index.js index 82e15fc8b..80f911361 100644 --- a/src/internal/node/index.js +++ b/src/internal/node/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/node/node-buf.js b/src/internal/node/node-buf.js index bbc3be430..d86b71aa0 100644 --- a/src/internal/node/node-buf.js +++ b/src/internal/node/node-buf.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/node/node-channel.js b/src/internal/node/node-channel.js index bbc561f30..2a7774e3d 100644 --- a/src/internal/node/node-channel.js +++ b/src/internal/node/node-channel.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/node/node-host-name-resolver.js b/src/internal/node/node-host-name-resolver.js index ea6731fb9..3310c30c0 100644 --- a/src/internal/node/node-host-name-resolver.js +++ b/src/internal/node/node-host-name-resolver.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/node/node-utf8.js b/src/internal/node/node-utf8.js index 689d19590..ba0485259 100644 --- a/src/internal/node/node-utf8.js +++ b/src/internal/node/node-utf8.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. @@ -70,11 +70,11 @@ function streamDecodeCombinedBuffer (combinedBuffers, length, decodeFn, endFn) { return '' } else { partBuffer._updatePos(position - partBuffer.position) - let bytesToRead = Math.min( + const bytesToRead = Math.min( partBuffer.length - position, remainingBytesToRead ) - let lastSlice = partBuffer.readSlice(bytesToRead) + const lastSlice = partBuffer.readSlice(bytesToRead) partBuffer._updatePos(bytesToRead) remainingBytesToRead = Math.max( remainingBytesToRead - lastSlice.length, diff --git a/src/internal/packstream-v1.js b/src/internal/packstream-v1.js index c9783fc12..5e254c294 100644 --- a/src/internal/packstream-v1.js +++ b/src/internal/packstream-v1.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. @@ -154,7 +154,7 @@ class Packer { return () => this.packStruct(x.signature, packableFields) } else if (typeof x === 'object') { return () => { - let keys = Object.keys(x) + const keys = Object.keys(x) let count = 0 for (let i = 0; i < keys.length; i++) { @@ -164,7 +164,7 @@ class Packer { } this.packMapHeader(count) for (let i = 0; i < keys.length; i++) { - let key = keys[i] + const key = keys[i] if (x[key] !== undefined) { this.packString(key) this.packable(x[key])() @@ -198,6 +198,7 @@ class Packer { packableFields[i]() } } + packInteger (x) { var high = x.high var low = x.low @@ -226,8 +227,8 @@ class Packer { } packString (x) { - let bytes = utf8.encode(x) - let size = bytes.length + const bytes = utf8.encode(x) + const size = bytes.length if (size < 0x10) { this._ch.writeUInt8(TINY_STRING | size) this._ch.writeBytes(bytes) @@ -456,7 +457,7 @@ class Unpacker { } else if (marker === INT_16) { return int(buffer.readInt16()) } else if (marker === INT_32) { - let b = buffer.readInt32() + const b = buffer.readInt32() return int(b) } else if (marker === INT_64) { const high = buffer.readInt32() @@ -496,7 +497,7 @@ class Unpacker { } _unpackListWithSize (size, buffer) { - let value = [] + const value = [] for (let i = 0; i < size; i++) { value.push(this.unpack(buffer)) } @@ -538,9 +539,9 @@ class Unpacker { } _unpackMapWithSize (size, buffer) { - let value = {} + const value = {} for (let i = 0; i < size; i++) { - let key = this.unpack(buffer) + const key = this.unpack(buffer) value[key] = this.unpack(buffer) } return value @@ -621,7 +622,7 @@ class Unpacker { for (let i = 0; i < sequence.length; i += 2) { const nextNode = nodes[sequence[i + 1]] - let relIndex = sequence[i] + const relIndex = sequence[i] let rel if (relIndex > 0) { diff --git a/src/internal/packstream-v2.js b/src/internal/packstream-v2.js index d359d5018..05ab8f33a 100644 --- a/src/internal/packstream-v2.js +++ b/src/internal/packstream-v2.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. @@ -580,7 +580,7 @@ function convertIntegerPropsIfNeeded (obj, disableLosslessIntegers) { } const clone = Object.create(Object.getPrototypeOf(obj)) - for (let prop in obj) { + for (const prop in obj) { if (obj.hasOwnProperty(prop)) { const value = obj[prop] clone[prop] = isInt(value) ? value.toNumberOrInfinity() : value diff --git a/src/internal/pool-config.js b/src/internal/pool-config.js index 780c13b27..325e9a3fc 100644 --- a/src/internal/pool-config.js +++ b/src/internal/pool-config.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/pool.js b/src/internal/pool.js index 2563226b1..514f2cdc4 100644 --- a/src/internal/pool.js +++ b/src/internal/pool.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/protocol-handshaker.js b/src/internal/protocol-handshaker.js index 93b16b1ea..13b5f3135 100644 --- a/src/internal/protocol-handshaker.js +++ b/src/internal/protocol-handshaker.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/rediscovery.js b/src/internal/rediscovery.js index ab8741d65..667c3cf88 100644 --- a/src/internal/rediscovery.js +++ b/src/internal/rediscovery.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/request-message.js b/src/internal/request-message.js index 5a87f7a49..4f426184c 100644 --- a/src/internal/request-message.js +++ b/src/internal/request-message.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/resolver/base-host-name-resolver.js b/src/internal/resolver/base-host-name-resolver.js index 7c00c985e..a2220f6a4 100644 --- a/src/internal/resolver/base-host-name-resolver.js +++ b/src/internal/resolver/base-host-name-resolver.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/resolver/configured-custom-resolver.js b/src/internal/resolver/configured-custom-resolver.js index 80324eb83..7712bbd6a 100644 --- a/src/internal/resolver/configured-custom-resolver.js +++ b/src/internal/resolver/configured-custom-resolver.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. @@ -33,7 +33,7 @@ export default class ConfiguredCustomResolver { ).then(resolved => { if (!Array.isArray(resolved)) { throw new TypeError( - `Configured resolver function should either return an array of addresses or a Promise resolved with an array of addresses.` + + 'Configured resolver function should either return an array of addresses or a Promise resolved with an array of addresses.' + `Each address is ':'. Got: ${resolved}` ) } diff --git a/src/internal/retry-logic-rx.js b/src/internal/retry-logic-rx.js index 46aa98e29..9fcd20c95 100644 --- a/src/internal/retry-logic-rx.js +++ b/src/internal/retry-logic-rx.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. @@ -84,9 +84,7 @@ export default class RxRetryLogic { Date.now() - startTime >= this._maxRetryTimeout ) { const error = newError( - `Failed after retried for ${retryCount} times in ${ - this._maxRetryTimeout - } ms. Make sure that your database is online and retry again.`, + `Failed after retried for ${retryCount} times in ${this._maxRetryTimeout} ms. Make sure that your database is online and retry again.`, SERVICE_UNAVAILABLE ) diff --git a/src/internal/round-robin-array-index.js b/src/internal/round-robin-array-index.js index 269a9362d..7743c167b 100644 --- a/src/internal/round-robin-array-index.js +++ b/src/internal/round-robin-array-index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/routing-table.js b/src/internal/routing-table.js index bc00d66e4..7f5a344fb 100644 --- a/src/internal/routing-table.js +++ b/src/internal/routing-table.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/routing-util.js b/src/internal/routing-util.js index f7b0ec06d..12dae83b6 100644 --- a/src/internal/routing-util.js +++ b/src/internal/routing-util.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. @@ -101,8 +101,8 @@ export default class RoutingUtil { let writers = [] servers.forEach(server => { - const role = server['role'] - const addresses = server['addresses'] + const role = server.role + const addresses = server.addresses if (role === 'ROUTE') { routers = parseArray(addresses).map(address => diff --git a/src/internal/server-address.js b/src/internal/server-address.js index fe49309bb..049e39c99 100644 --- a/src/internal/server-address.js +++ b/src/internal/server-address.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/server-version.js b/src/internal/server-version.js index d1ae7d635..25eb2c00b 100644 --- a/src/internal/server-version.js +++ b/src/internal/server-version.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/stream-observers.js b/src/internal/stream-observers.js index a3eceb807..fedee5aab 100644 --- a/src/internal/stream-observers.js +++ b/src/internal/stream-observers.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/temporal-util.js b/src/internal/temporal-util.js index ab9653cda..a80c0be40 100644 --- a/src/internal/temporal-util.js +++ b/src/internal/temporal-util.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. @@ -260,7 +260,7 @@ export function epochDayToDate (epochDay) { ) } year = year.add(adjust) - let marchDayOfYear = dayOfYearEst + const marchDayOfYear = dayOfYearEst const marchMonth = marchDayOfYear .multiply(5) @@ -339,7 +339,7 @@ export function timeZoneOffsetToIsoString (offsetSeconds) { offsetSeconds.div(SECONDS_PER_MINUTE).modulo(MINUTES_PER_HOUR), 2 ) - let secondsValue = offsetSeconds.modulo(SECONDS_PER_MINUTE) + const secondsValue = offsetSeconds.modulo(SECONDS_PER_MINUTE) const seconds = secondsValue.equals(0) ? null : formatNumber(secondsValue, 2) return seconds @@ -397,7 +397,7 @@ export function totalNanoseconds (standardDate, nanoseconds) { * @return {number} the time zone offset in seconds. */ export function timeZoneOffsetInSeconds (standardDate) { - let offsetInMinutes = standardDate.getTimezoneOffset() + const offsetInMinutes = standardDate.getTimezoneOffset() if (offsetInMinutes === 0) { return 0 } diff --git a/src/internal/transaction-executor.js b/src/internal/transaction-executor.js index 6e6672c01..096ebda57 100644 --- a/src/internal/transaction-executor.js +++ b/src/internal/transaction-executor.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/tx-config.js b/src/internal/tx-config.js index 0f5b5ea90..823976524 100644 --- a/src/internal/tx-config.js +++ b/src/internal/tx-config.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/url-util.js b/src/internal/url-util.js index a9bbff8a3..02aaa2c84 100644 --- a/src/internal/url-util.js +++ b/src/internal/url-util.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/internal/util.js b/src/internal/util.js index 0c924d858..e561ddbd3 100644 --- a/src/internal/util.js +++ b/src/internal/util.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/record.js b/src/record.js index c8857ba49..46d61b31f 100644 --- a/src/record.js +++ b/src/record.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/result-rx.js b/src/result-rx.js index 79571c1b0..4b55f3df5 100644 --- a/src/result-rx.js +++ b/src/result-rx.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/result-summary.js b/src/result-summary.js index 05d0d5d46..ec45c312b 100644 --- a/src/result-summary.js +++ b/src/result-summary.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/result.js b/src/result.js index be9abb19a..2c7dea014 100644 --- a/src/result.js +++ b/src/result.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/routing-driver.js b/src/routing-driver.js index d5f68f4d7..f7b022450 100644 --- a/src/routing-driver.js +++ b/src/routing-driver.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/session-rx.js b/src/session-rx.js index e2a8dbc4c..794906a51 100644 --- a/src/session-rx.js +++ b/src/session-rx.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/session.js b/src/session.js index aa62cd373..36bee60a2 100644 --- a/src/session.js +++ b/src/session.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/spatial-types.js b/src/spatial-types.js index b16b001f2..3a3f32398 100644 --- a/src/spatial-types.js +++ b/src/spatial-types.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/temporal-types.js b/src/temporal-types.js index bb821000f..5b5934759 100644 --- a/src/temporal-types.js +++ b/src/temporal-types.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/transaction-rx.js b/src/transaction-rx.js index 7143724b3..c47724807 100644 --- a/src/transaction-rx.js +++ b/src/transaction-rx.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/transaction.js b/src/transaction.js index 996691e35..18d2b618c 100644 --- a/src/transaction.js +++ b/src/transaction.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/src/version.js b/src/version.js index c16371d61..39f3fe5ce 100644 --- a/src/version.js +++ b/src/version.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/test/auth.test.js b/test/auth.test.js index bca76186e..1a5810b68 100644 --- a/test/auth.test.js +++ b/test/auth.test.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/test/bolt-v3.test.js b/test/bolt-v3.test.js index 7cd5ea68d..e13720fd6 100644 --- a/test/bolt-v3.test.js +++ b/test/bolt-v3.test.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/test/bolt-v4.test.js b/test/bolt-v4.test.js index d9958e344..1a411ab23 100644 --- a/test/bolt-v4.test.js +++ b/test/bolt-v4.test.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002-2019 "Neo4j," + * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. diff --git a/test/browser/jasmine-runner.html b/test/browser/jasmine-runner.html index fb7bd30e9..cfd641392 100644 --- a/test/browser/jasmine-runner.html +++ b/test/browser/jasmine-runner.html @@ -1,5 +1,5 @@