Skip to content

Commit

Permalink
Merge pull request #5953 from neo4j/2025-version
Browse files Browse the repository at this point in the history
2025 version
  • Loading branch information
angrykoala authored Jan 24, 2025
2 parents 635e508 + ebbb921 commit c0cce92
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/serious-paws-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@neo4j/graphql": patch
---

Add support for CalVer editions of neo4j
5 changes: 5 additions & 0 deletions packages/graphql/src/classes/Neo4jDatabaseInfo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,9 @@ describe("Neo4jDatabaseInfo", () => {
return new Neo4jDatabaseInfo("this_seems_not_valid", "enterprise");
}).toThrow();
});

test("should accept CalVar", () => {
const dbInfo = new Neo4jDatabaseInfo("2025.01.0-aura", "enterprise");
expect(dbInfo).toBeInstanceOf(Neo4jDatabaseInfo);
});
});
2 changes: 2 additions & 0 deletions packages/graphql/src/classes/Neo4jDatabaseInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export class Neo4jDatabaseInfo {
public edition: Neo4jEdition | undefined;

constructor(version: string, edition?: Neo4jEdition) {
// Quick hack to support CalVar
version = version.replace(/\.0([0-9]+)/, ".$1");
this.version = this.toSemVer(version);
this.rawVersion = version;
this.edition = edition;
Expand Down

0 comments on commit c0cce92

Please sign in to comment.