Skip to content

Commit

Permalink
Bump minimum versions - Neo4j 5.s and Node.js 20.x (#5638)
Browse files Browse the repository at this point in the history
* Bump minimums of Neo4j and Node.js

* Remove GHA tests against 4.4

* Update all engines

* Update blue-sloths-enjoy.md
  • Loading branch information
darrellwarde authored Oct 9, 2024
1 parent 8a39a87 commit cab1a8d
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 17 deletions.
7 changes: 7 additions & 0 deletions .changeset/blue-sloths-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@neo4j/graphql": major
"@neo4j/graphql-ogm": major
"@neo4j/introspector": major
---

The Neo4j GraphQL Library now requires a Neo4j 5.x database.
6 changes: 6 additions & 0 deletions .changeset/wild-knives-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@neo4j/graphql": major
"@neo4j/graphql-ogm": major
---

The Neo4j GraphQL Library now requires Node.js 20 or greater.
2 changes: 0 additions & 2 deletions .github/workflows/reusable-api-library-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
- "^15.0.0"
- "^16.0.0"
neo4j-version:
- 4.4-community
- 4.4-enterprise
- 5-community
- 5-enterprise

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/reusable-integration-tests-on-prem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ jobs:
{ package: "graphql", shard: 4/4, coverage_name: 6 },
]
neo4j-version:
# - 4.4-community
- 4.4-enterprise
# - 5-community
- 5-enterprise
graphql-version: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
- "^15.0.0"
- "^16.0.0"
neo4j-version:
# - 4.4-community
- 4.4-enterprise
# - 5-community
- 5-enterprise
services:
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dist/**/*.js.map"
],
"engines": {
"node": ">=16.0.0"
"node": ">=20.0.0"
},
"scripts": {
"build": "tsc --build src/tsconfig.production.json",
Expand Down
14 changes: 7 additions & 7 deletions packages/graphql/src/classes/utils/verify-database.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
*/

import type { Driver, Session } from "neo4j-driver";
import checkNeo4jCompat from "./verify-database";
import { REQUIRED_APOC_FUNCTIONS, MIN_NEO4J_VERSION } from "../../constants";
import { Neo4jDatabaseInfo } from "../Neo4jDatabaseInfo";
import { MIN_NEO4J_VERSION, REQUIRED_APOC_FUNCTIONS } from "../../constants";
import type { Neo4jGraphQLSessionConfig } from "../Executor";
import { Neo4jDatabaseInfo } from "../Neo4jDatabaseInfo";
import checkNeo4jCompat from "./verify-database";

describe("checkNeo4jCompat", () => {
test("should add driver config to session", async () => {
Expand Down Expand Up @@ -270,15 +270,15 @@ describe("checkNeo4jCompat", () => {
).resolves.not.toThrow();
});

test("should not throw Error that 4.2 is minimum", async () => {
test("should throw Error for Neo4j 4.4", async () => {
// @ts-ignore
const fakeSession: Session = {
// @ts-ignore
run: () => ({
records: [
{
toObject: () => ({
version: "4.1.10",
version: "4.4.37",
functions: REQUIRED_APOC_FUNCTIONS,
}),
},
Expand All @@ -296,8 +296,8 @@ describe("checkNeo4jCompat", () => {
verifyConnectivity: () => undefined,
};

await expect(checkNeo4jCompat({ driver: fakeDriver, dbInfo: new Neo4jDatabaseInfo("4.1.10") })).rejects.toThrow(
`Encountered the following DBMS compatiblility issues:\nExpected minimum Neo4j version: '${MIN_NEO4J_VERSION}', received: '4.1.10'`
await expect(checkNeo4jCompat({ driver: fakeDriver, dbInfo: new Neo4jDatabaseInfo("4.4.37") })).rejects.toThrow(
`Encountered the following DBMS compatiblility issues:\nExpected minimum Neo4j version: '${MIN_NEO4J_VERSION}', received: '4.4.37'`
);
});
});
2 changes: 1 addition & 1 deletion packages/graphql/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const DEBUG_PREFIX = "@neo4j/graphql";

export const AUTH_FORBIDDEN_ERROR = "@neo4j/graphql/FORBIDDEN";
export const AUTH_UNAUTHENTICATED_ERROR = "@neo4j/graphql/UNAUTHENTICATED";
export const MIN_NEO4J_VERSION = "4.4";
export const MIN_NEO4J_VERSION = "5.0";
export const REQUIRED_APOC_FUNCTIONS = ["apoc.util.validatePredicate", "apoc.date.convertFormat"];
export const AUTHORIZATION_UNAUTHENTICATED = "Unauthenticated";
export const DEBUG_ALL = `${DEBUG_PREFIX}:*`;
Expand Down
2 changes: 1 addition & 1 deletion packages/introspector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dist/**/*.js.map"
],
"engines": {
"node": ">=16.0.0"
"node": ">=20.0.0"
},
"scripts": {
"build:clean": "yarn clean && yarn build",
Expand Down
2 changes: 1 addition & 1 deletion packages/ogm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dist/**/*.js.map"
],
"engines": {
"node": ">=16.0.0"
"node": ">=20.0.0"
},
"scripts": {
"build": "tsc --build tsconfig.production.json",
Expand Down

0 comments on commit cab1a8d

Please sign in to comment.