From cd78ce22ecd3f91f51b8af97ced01de2feca353d Mon Sep 17 00:00:00 2001 From: Neil Dobson Date: Mon, 24 Jul 2023 09:19:41 +1000 Subject: [PATCH] Update packages. Stop performing verify connectivity check on start --- package-lock.json | 122 ++++++++++++++++++++++---------------------- package.json | 14 ++--- src/neo4j.module.ts | 6 +-- src/neo4j.utils.ts | 4 +- 4 files changed, 71 insertions(+), 75 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4e4eeef..634aff1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,23 +1,23 @@ { - "name": "nest-neo4j", - "version": "0.3.1", + "name": "@dbc-tech/nest-neo4j", + "version": "0.8.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "nest-neo4j", - "version": "0.3.1", + "name": "@dbc-tech/nest-neo4j", + "version": "0.8.0", "license": "Apache-2.0", "dependencies": { - "neo4j-driver": "^5.6.0" + "neo4j-driver": "^5.10.0" }, "devDependencies": { - "@nestjs/common": "^9.1.4", - "@nestjs/config": "^2.2.0", - "@nestjs/core": "^9.1.4", - "@nestjs/platform-express": "^9.1.4", + "@nestjs/common": "^10.1.0", + "@nestjs/config": "^3.0.0", + "@nestjs/core": "^10.1.0", + "@nestjs/platform-express": "^10.1.0", "@types/node": "^18.8.2", - "typescript": "^4.8.4" + "typescript": "^5.0.2" } }, "node_modules/@lukeed/csprng": { @@ -30,13 +30,13 @@ } }, "node_modules/@nestjs/common": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-9.4.0.tgz", - "integrity": "sha512-RUcVAQsEF4WPrmzFXEOUfZnPwrLTe1UVlzXTlSyfqfqbdWDPKDGlIPVelBLfc5/+RRUQ0I5iE4+CQvpCmkqldw==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-10.1.0.tgz", + "integrity": "sha512-3GNOuDjeAqEVt5Zjia3ZSK55Jg80hIIkq52BOzU+LkCjFgbuEhDot80lCKu05WyntAMAq5wREoDRGEGlSVxENw==", "dev": true, "dependencies": { "iterare": "1.2.1", - "tslib": "2.5.0", + "tslib": "2.6.0", "uid": "2.0.2" }, "funding": { @@ -44,16 +44,12 @@ "url": "https://opencollective.com/nest" }, "peerDependencies": { - "cache-manager": "<=5", "class-transformer": "*", "class-validator": "*", "reflect-metadata": "^0.1.12", "rxjs": "^7.1.0" }, "peerDependenciesMeta": { - "cache-manager": { - "optional": true - }, "class-transformer": { "optional": true }, @@ -63,26 +59,25 @@ } }, "node_modules/@nestjs/config": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@nestjs/config/-/config-2.3.1.tgz", - "integrity": "sha512-Ckzel0NZ9CWhNsLfE1hxfDuxJuEbhQvGxSlmZ1/X8awjRmAA/g3kT6M1+MO1SHj1wMtPyUfd9WpwkiqFbiwQgA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@nestjs/config/-/config-3.0.0.tgz", + "integrity": "sha512-fzASk1Uv6AjdE6uA1na8zpqRCXAhRpcfgpCVv3SAKlgJ3VR3bEjcI4G17WHLgLBsmPzI1ofdkSI451WLD1F1Rw==", "dev": true, "dependencies": { - "dotenv": "16.0.3", + "dotenv": "16.1.4", "dotenv-expand": "10.0.0", "lodash": "4.17.21", "uuid": "9.0.0" }, "peerDependencies": { - "@nestjs/common": "^7.0.0 || ^8.0.0 || ^9.0.0", - "reflect-metadata": "^0.1.13", - "rxjs": "^6.0.0 || ^7.2.0" + "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0", + "reflect-metadata": "^0.1.13" } }, "node_modules/@nestjs/core": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-9.4.0.tgz", - "integrity": "sha512-yTLryCgFD0462wPe4HIzhyTcDgibt8Stfwb5YzcX7Ma0NM4m8uBIpcPG109KBubp8ZmV85e5mw4rl20qLQQVsQ==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-10.1.0.tgz", + "integrity": "sha512-3ogHxrRAktQZNBSV709QxhNJQPsVInZRqxAK2fV7JDnfoBMu1lM3xI7cO498iViqq5xme3o/46+AdfjW9W2E2A==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -90,7 +85,7 @@ "fast-safe-stringify": "2.1.1", "iterare": "1.2.1", "path-to-regexp": "3.2.0", - "tslib": "2.5.0", + "tslib": "2.6.0", "uid": "2.0.2" }, "funding": { @@ -98,10 +93,10 @@ "url": "https://opencollective.com/nest" }, "peerDependencies": { - "@nestjs/common": "^9.0.0", - "@nestjs/microservices": "^9.0.0", - "@nestjs/platform-express": "^9.0.0", - "@nestjs/websockets": "^9.0.0", + "@nestjs/common": "^10.0.0", + "@nestjs/microservices": "^10.0.0", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/websockets": "^10.0.0", "reflect-metadata": "^0.1.12", "rxjs": "^7.1.0" }, @@ -118,24 +113,24 @@ } }, "node_modules/@nestjs/platform-express": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-9.4.0.tgz", - "integrity": "sha512-PpnfghpNq7mwG43z3+pacHulsabUCBMla4nUikntXT525ORpZSDvh/nLi1HLfE4w5+FcINc8/RBOyYTeRVmiRQ==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-10.1.0.tgz", + "integrity": "sha512-wl3gsad9Zsv+Im8Fl+meXwpzPLNFRlLbrepGL6Y8za35xXsdx74oCv7NJbjptHMYdwzTZHvbyprfSxV+oHUaXg==", "dev": true, "dependencies": { "body-parser": "1.20.2", "cors": "2.8.5", "express": "4.18.2", "multer": "1.4.4-lts.1", - "tslib": "2.5.0" + "tslib": "2.6.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/nest" }, "peerDependencies": { - "@nestjs/common": "^9.0.0", - "@nestjs/core": "^9.0.0" + "@nestjs/common": "^10.0.0", + "@nestjs/core": "^10.0.0" } }, "node_modules/@nuxtjs/opencollective": { @@ -447,12 +442,15 @@ } }, "node_modules/dotenv": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", - "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==", + "version": "16.1.4", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.1.4.tgz", + "integrity": "sha512-m55RtE8AsPeJBpOIFKihEmqUcoVncQIwo7x9U8ZwLEZw9ZpXboz2c+rvog+jUaJvVrZ5kBOeYQBX5+8Aa/OZQw==", "dev": true, "engines": { "node": ">=12" + }, + "funding": { + "url": "https://github.com/motdotla/dotenv?sponsor=1" } }, "node_modules/dotenv-expand": { @@ -884,29 +882,29 @@ } }, "node_modules/neo4j-driver": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/neo4j-driver/-/neo4j-driver-5.8.0.tgz", - "integrity": "sha512-SH/YsRl52TYqLnIoT1NkaVg/Wz4AtgN5z+YCr0gyWwxqFcN4eklJG0UtxCZgbKqXSCgQNQDvmpQCnrCe/AYPTQ==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/neo4j-driver/-/neo4j-driver-5.10.0.tgz", + "integrity": "sha512-xvexTGrMxS3Nj/vU/OO5FA0wMcmdOJOOqHgztydw8iSFnKBgxxAo3giiH1UKGwP4k12BnOSXSQeZGXT3faVHJQ==", "dependencies": { - "neo4j-driver-bolt-connection": "^5.8.0", - "neo4j-driver-core": "^5.8.0", - "rxjs": "^7.8.0" + "neo4j-driver-bolt-connection": "5.10.0", + "neo4j-driver-core": "5.10.0", + "rxjs": "^7.8.1" } }, "node_modules/neo4j-driver-bolt-connection": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/neo4j-driver-bolt-connection/-/neo4j-driver-bolt-connection-5.8.0.tgz", - "integrity": "sha512-WdfNk0qQK9tz8JzLRobwXb5xTS45+eqsF1HNAJnb2aOG+SIO8E7WlkYTwBOV6qIgyPvFlwRCE95HmLvX6psh8g==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/neo4j-driver-bolt-connection/-/neo4j-driver-bolt-connection-5.10.0.tgz", + "integrity": "sha512-TgxaQ1kRtd4hP2iromtun3twx+tLP9I0F7CIhDpYaUix8Z1nHcI6z9y+uJ1+YU/doyzgS+R/ZP8h2C4S75iClw==", "dependencies": { "buffer": "^6.0.3", - "neo4j-driver-core": "^5.8.0", + "neo4j-driver-core": "5.10.0", "string_decoder": "^1.3.0" } }, "node_modules/neo4j-driver-core": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/neo4j-driver-core/-/neo4j-driver-core-5.8.0.tgz", - "integrity": "sha512-EZnCrkKVRmirDuI/k+wkZ4YPq8PFI3bQswOWMveSruxSkYqFDsj0lGgA0EWAEuiF/xRp/GqIDs966BuNDYC1qQ==" + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/neo4j-driver-core/-/neo4j-driver-core-5.10.0.tgz", + "integrity": "sha512-Wf50GRvEqG2R0PWMJg3tF7YxILJb4QjYgpoC7g/2OCjmQQUuSy+wj65aUlV66XB4I9J07FElGWy6Xrm/rDyA5A==" }, "node_modules/node-fetch": { "version": "2.6.11", @@ -1220,9 +1218,9 @@ "dev": true }, "node_modules/tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", + "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==" }, "node_modules/type-is": { "version": "1.6.18", @@ -1244,16 +1242,16 @@ "dev": true }, "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", + "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/uid": { diff --git a/package.json b/package.json index d20062b..5914b58 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dbc-tech/nest-neo4j", - "version": "0.7.0", + "version": "0.8.0", "description": "", "main": "dist/index.js", "types": "dist/index.d.js", @@ -20,14 +20,14 @@ }, "homepage": "https://github.com/adam-cowley/nest-neo4j#readme", "devDependencies": { - "@nestjs/common": "^9.1.4", - "@nestjs/config": "^2.2.0", - "@nestjs/core": "^9.1.4", - "@nestjs/platform-express": "^9.1.4", + "@nestjs/common": "^10.1.0", + "@nestjs/config": "^3.0.0", + "@nestjs/core": "^10.1.0", + "@nestjs/platform-express": "^10.1.0", "@types/node": "^18.8.2", - "typescript": "^4.8.4" + "typescript": "^5.0.2" }, "dependencies": { - "neo4j-driver": "^5.6.0" + "neo4j-driver": "^5.10.0" } } diff --git a/src/neo4j.module.ts b/src/neo4j.module.ts index ffd3abd..dbef353 100644 --- a/src/neo4j.module.ts +++ b/src/neo4j.module.ts @@ -20,7 +20,7 @@ export class Neo4jModule { { provide: NEO4J_DRIVER, inject: [ NEO4J_OPTIONS ], - useFactory: async (connection: Neo4jConnection) => createDriver(connection), + useFactory: (connection: Neo4jConnection) => createDriver(connection), }, Neo4jService, ], @@ -46,7 +46,7 @@ export class Neo4jModule { { provide: NEO4J_DRIVER, inject: [ NEO4J_OPTIONS ], - useFactory: async (connection: Neo4jConnection) => createDriver(connection), + useFactory: (connection: Neo4jConnection) => createDriver(connection), }, Neo4jService, ], @@ -94,7 +94,7 @@ export class Neo4jModule { { provide: NEO4J_DRIVER, inject: [ NEO4J_OPTIONS ], - useFactory: async (connection: Neo4jConnection) => createDriver(connection), + useFactory: (connection: Neo4jConnection) => createDriver(connection), }, Neo4jService, ], diff --git a/src/neo4j.utils.ts b/src/neo4j.utils.ts index 5eab273..6457406 100644 --- a/src/neo4j.utils.ts +++ b/src/neo4j.utils.ts @@ -1,15 +1,13 @@ import neo4j from 'neo4j-driver' import { Neo4jConnection } from './interfaces/neo4j-connection.interface' -export const createDriver = async (connection: Neo4jConnection) => { +export const createDriver = (connection: Neo4jConnection) => { const driver = neo4j.driver( `${connection.scheme}://${connection.host}:${connection.port}`, neo4j.auth.basic(connection.username, connection.password), connection.config ) - await driver.verifyConnectivity() - return driver }