Skip to content

Update mono-repo dependencies #1129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7,102 changes: 4,380 additions & 2,722 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"private": true,
"type": "module",
"devDependencies": {
"husky": "^7.0.4",
"husky": "^8.0.3",
"lerna": "^4.0.0",
"lint-staged": "^12.3.7",
"standard": "^16.0.4",
"ts-standard": "^11.0.0",
"typescript": "^4.6.3"
"lint-staged": "^14.0.0",
"standard": "^17.1.0",
"ts-standard": "^12.0.2",
"typescript": "^4.9.5"
},
"lint-staged": {
"*.{js,md,html}": [
Expand Down
6 changes: 3 additions & 3 deletions packages/bolt-connection/src/bolt/bolt-protocol-v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export default class BoltProtocol {
logoff ({ onComplete, onError, flush } = {}) {
const observer = new LogoffObserver({
onCompleted: onComplete,
onError: onError
onError
})

// TODO: Verify the Neo4j version in the message
Expand Down Expand Up @@ -284,8 +284,8 @@ export default class BoltProtocol {
'BEGIN',
bookmarks ? bookmarks.asBeginTransactionParameters() : {},
{
bookmarks: bookmarks,
txConfig: txConfig,
bookmarks,
txConfig,
database,
mode,
impersonatedUser,
Expand Down
4 changes: 2 additions & 2 deletions packages/bolt-connection/src/bolt/bolt-protocol-v4x0.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ export default class BoltProtocol extends BoltProtocolV3 {
) {
const observer = new ResultStreamObserver({
server: this._server,
reactive: reactive,
fetchSize: fetchSize,
reactive,
fetchSize,
moreFunction: this._requestMore.bind(this),
discardFunction: this._requestDiscard.bind(this),
beforeKeys,
Expand Down
4 changes: 2 additions & 2 deletions packages/bolt-connection/src/bolt/bolt-protocol-v4x4.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ export default class BoltProtocol extends BoltProtocolV43 {
) {
const observer = new ResultStreamObserver({
server: this._server,
reactive: reactive,
fetchSize: fetchSize,
reactive,
fetchSize,
moreFunction: this._requestMore.bind(this),
discardFunction: this._requestDiscard.bind(this),
beforeKeys,
Expand Down
2 changes: 1 addition & 1 deletion packages/bolt-connection/src/bolt/bolt-protocol-v5x1.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export default class BoltProtocol extends BoltProtocolV5x0 {
logoff ({ onComplete, onError, flush } = {}) {
const observer = new LogoffObserver({
onCompleted: onComplete,
onError: onError
onError
})

this.write(
Expand Down
4 changes: 2 additions & 2 deletions packages/bolt-connection/src/bolt/bolt-protocol-v5x2.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ export default class BoltProtocol extends BoltProtocolV5x1 {
) {
const observer = new ResultStreamObserver({
server: this._server,
reactive: reactive,
fetchSize: fetchSize,
reactive,
fetchSize,
moreFunction: this._requestMore.bind(this),
discardFunction: this._requestDiscard.bind(this),
beforeKeys,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ function determineWebSocketScheme (config, protocolSupplier) {
ENCRYPTION_OFF +
'"` in the driver configuration.'
)
return { scheme: null, error: error }
return { scheme: null, error }
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/bolt-connection/src/channel/channel-buf.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function newChannelJSBuffer (arg) {
return buffer.Buffer.alloc(arg)
} else {
// fallback to the old, potentially deprecated constructor
// eslint-disable-next-line node/no-deprecated-api
// eslint-disable-next-line n/no-deprecated-api
return new buffer.Buffer(arg)
}
}
2 changes: 1 addition & 1 deletion packages/bolt-connection/src/channel/node/node-channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ function newTlsOptions (hostname, ca = undefined) {
return {
rejectUnauthorized: false, // we manually check for this in the connect callback, to give a more helpful error to the user
servername: hostname, // server name for the SNI (Server Name Indication) TLS extension
ca: ca // optional CA useful for TRUST_CUSTOM_CA_SIGNED_CERTIFICATES trust mode
ca // optional CA useful for TRUST_CUSTOM_CA_SIGNED_CERTIFICATES trust mode
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/bolt-connection/src/channel/utf8.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function newBuffer (str) {
if (typeof buffer.Buffer.from === 'function') {
return buffer.Buffer.from(str, 'utf8')
} else {
// eslint-disable-next-line node/no-deprecated-api
// eslint-disable-next-line n/no-deprecated-api
return new buffer.Buffer(str, 'utf8')
}
}
Expand Down
6 changes: 3 additions & 3 deletions packages/bolt-connection/src/rediscovery/routing-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ function parseServers (rawRoutingTable, routerAddress) {
})

return {
routers: routers,
readers: readers,
writers: writers
routers,
readers,
writers
}
} catch (error) {
throw newError(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ describe('#unit BoltProtocolV1', () => {
const bookmarks = new Bookmarks('neo4j:bookmark:v1:tx42')

const observer = protocol.beginTransaction({
bookmarks: bookmarks,
bookmarks,
txConfig: TxConfig.empty(),
mode: WRITE
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ describe('#unit BoltProtocolV5x3', () => {
}
const authToken = { username: 'neo4j', password: 'secret' }

const observer = protocol.initialize({ userAgent: clientName, boltAgent: boltAgent, authToken })
const observer = protocol.initialize({ userAgent: clientName, boltAgent, authToken })

protocol.verifyMessageCount(2)
expect(protocol.messages[0]).toBeMessage(
Expand Down
24 changes: 12 additions & 12 deletions packages/bolt-connection/test/bolt/stream-observer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ describe('#unit ResultStreamObserver', () => {
const more = jest.fn()
const streamObserver = new ResultStreamObserver({
moreFunction: more,
fetchSize: fetchSize
fetchSize
})

streamObserver.pause()
Expand Down Expand Up @@ -418,7 +418,7 @@ describe('#unit ResultStreamObserver', () => {
const more = jest.fn()
const streamObserver = new ResultStreamObserver({
moreFunction: more,
fetchSize: fetchSize,
fetchSize,
reactive: true
})
streamObserver.pause()
Expand All @@ -441,7 +441,7 @@ describe('#unit ResultStreamObserver', () => {
const more = jest.fn()
const streamObserver = new ResultStreamObserver({
moreFunction: more,
fetchSize: fetchSize,
fetchSize,
reactive: true
})
streamObserver.pause()
Expand All @@ -462,7 +462,7 @@ describe('#unit ResultStreamObserver', () => {
const more = jest.fn()
const streamObserver = new ResultStreamObserver({
moreFunction: more,
fetchSize: fetchSize,
fetchSize,
reactive: false
})
streamObserver.pause()
Expand All @@ -485,7 +485,7 @@ describe('#unit ResultStreamObserver', () => {
const more = jest.fn()
const streamObserver = new ResultStreamObserver({
moreFunction: more,
fetchSize: fetchSize
fetchSize
})

streamObserver.pause()
Expand All @@ -508,7 +508,7 @@ describe('#unit ResultStreamObserver', () => {
const more = jest.fn()
const streamObserver = new ResultStreamObserver({
moreFunction: more,
fetchSize: fetchSize
fetchSize
})

streamObserver.pause()
Expand Down Expand Up @@ -541,7 +541,7 @@ describe('#unit ResultStreamObserver', () => {
const more = jest.fn()
const streamObserver = new ResultStreamObserver({
moreFunction: more,
fetchSize: fetchSize
fetchSize
})

streamObserver.pause()
Expand Down Expand Up @@ -570,7 +570,7 @@ describe('#unit ResultStreamObserver', () => {
const more = jest.fn()
const streamObserver = new ResultStreamObserver({
moreFunction: more,
fetchSize: fetchSize
fetchSize
})

streamObserver.pause()
Expand Down Expand Up @@ -610,7 +610,7 @@ describe('#unit ResultStreamObserver', () => {
const more = jest.fn()
const streamObserver = new ResultStreamObserver({
moreFunction: more,
fetchSize: fetchSize
fetchSize
})

streamObserver.pause()
Expand Down Expand Up @@ -985,8 +985,8 @@ function newStreamObserver (server) {

function newObserver (onNext = NO_OP, onError = NO_OP, onCompleted = NO_OP) {
return {
onNext: onNext,
onError: onError,
onCompleted: onCompleted
onNext,
onError,
onCompleted
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ describe('WebSocketChannel', () => {
const address = ServerAddress.fromUrl('bolt://localhost:8989')
const config = new ChannelConfig(
address,
{ encrypted: encrypted },
{ encrypted },
SERVICE_UNAVAILABLE
)
const protocolSupplier = () => (scheme != null ? scheme + ':' : scheme)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ function newDirectConnectionProvider (address, pool, authTokenManager) {
id: 0,
config: {},
log: Logger.noOp(),
address: address,
address,
authTokenManager
})
connectionProvider._connectionPool = pool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3727,7 +3727,7 @@ describe.each([
hostNameResolver: new SimpleHostNameResolver(),
config: {},
log: Logger.noOp(),
routingTablePurgeDelay: routingTablePurgeDelay
routingTablePurgeDelay
})
connectionProvider._connectionPool = pool
routingTables.forEach(r => {
Expand Down
8 changes: 4 additions & 4 deletions packages/bolt-connection/test/pool/pool.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -731,8 +731,8 @@ describe('#unit Pool', () => {
// Create a fake connection that makes it possible control when it's connected
// and released from the outer scope.
const conn = {
server: server,
release: release
server,
release
}
const promise = new Promise((resolve, reject) => {
conn.resolve = resolve
Expand Down Expand Up @@ -1204,8 +1204,8 @@ describe('#unit Pool', () => {
const pool = new Pool({
create: (_, server, release) =>
Promise.resolve(new Resource(server, counter++, release)),
destroy: destroy,
removeIdleObserver: removeIdleObserver,
destroy,
removeIdleObserver,
config: new PoolConfig(1, 5000)
})

Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const auth = {
scheme: 'basic',
principal: username,
credentials: password,
realm: realm
realm
}
} else {
return { scheme: 'basic', principal: username, credentials: password }
Expand Down Expand Up @@ -66,8 +66,8 @@ const auth = {
parameters?: object
) => {
const output: any = {
scheme: scheme,
principal: principal
scheme,
principal
}
if (isNotEmpty(credentials)) {
output.credentials = credentials
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/graph-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ function isPath<T extends NumberOrInteger = Integer> (obj: unknown): obj is Path
return hasIdentifierProperty(obj, PATH_IDENTIFIER_PROPERTY)
}

function _valueOrGetDefault<T> (value: T|undefined|null, getDefault: () => T): T {
function _valueOrGetDefault<T> (value: T | undefined | null, getDefault: () => T): T {
return value === undefined || value === null ? getDefault() : value
}

Expand Down
4 changes: 3 additions & 1 deletion packages/core/src/integer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ class Integer {
// Do several (6) digits each time through the loop, so as to
// minimize the calls to the very expensive emulated div.
const radixToPower = Integer.fromNumber(Math.pow(radix, 6))
// eslint-disable-next-line @typescript-eslint/no-this-alias
rem = this
let result = ''
while (true) {
Expand Down Expand Up @@ -579,6 +580,7 @@ class Integer {
// the approximate value is less than or equal to the real value so that the
// remainder never becomes negative.
res = Integer.ZERO
// eslint-disable-next-line @typescript-eslint/no-this-alias
rem = this
while (rem.greaterThanOrEqual(theDivisor)) {
// Approximate the result of division. This may be a little greater or
Expand Down Expand Up @@ -853,7 +855,7 @@ class Integer {
* @returns {!Integer} The corresponding Integer value
* @expose
*/
static fromString (str: string, radix?: number, { strictStringValidation }: { strictStringValidation?: boolean} = {}): Integer {
static fromString (str: string, radix?: number, { strictStringValidation }: { strictStringValidation?: boolean } = {}): Integer {
if (str.length === 0) {
throw newError('number format error: empty string')
}
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/internal/connection-holder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class ConnectionHolder implements ConnectionHolderInterface {
*/
private _releaseConnection (hasTx?: boolean): Promise<Connection | null> {
this._connectionPromise = this._connectionPromise
.then((connection?: Connection|null) => {
.then((connection?: Connection | null) => {
if (connection != null) {
if (connection.isOpen() && (connection.hasOngoingObservableRequests() || hasTx === true)) {
return connection
Expand Down Expand Up @@ -333,7 +333,7 @@ class EmptyConnectionHolder extends ConnectionHolder {
*/
const EMPTY_CONNECTION_HOLDER: EmptyConnectionHolder = new EmptyConnectionHolder()

// eslint-disable-next-line node/handle-callback-err
// eslint-disable-next-line n/handle-callback-err
function ignoreError (error: Error): null {
return null
}
Expand Down
5 changes: 3 additions & 2 deletions packages/core/src/internal/observers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,11 @@ export class CompletedObserver implements ResultStreamObserver {
// do nothing
}

// eslint-disable-next-line node/handle-callback-err
onError (error: Error): void {
// nothing to do, already finished
throw Error('CompletedObserver not supposed to call onError')
// eslint-disable-next-line
// @ts-ignore: not available in ES oldest supported version
throw new Error('CompletedObserver not supposed to call onError', { cause: error })
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/internal/url-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function sanitizeUrl (url: string): { schemeMissing: boolean, url: string } {
return { schemeMissing: true, url: `none://${url}` }
}

return { schemeMissing: false, url: url }
return { schemeMissing: false, url }
}

function extractScheme (scheme?: string): string | null {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/result-summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ const notificationSeverityLevel: { [key in NotificationSeverityLevel]: key } = {
Object.freeze(notificationSeverityLevel)
const severityLevels = Object.values(notificationSeverityLevel)

type NotificationCategory = 'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' |'PERFORMANCE' |
type NotificationCategory = 'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' | 'PERFORMANCE' |
'DEPRECATION' | 'GENERIC' | 'UNKNOWN'
/**
* @typedef {'HINT' | 'UNRECOGNIZED' | 'UNSUPPORTED' |'PERFORMANCE' | 'DEPRECATION' | 'GENERIC' | 'UNKNOWN'} NotificationCategory
Expand Down
Loading