@neo4j-cypher/query-tools 2.0.0-next.30 → 2.0.0-next.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/cjs/package.json +2 -2
  3. package/dist/cjs/src/cypher-execution/extract-unique-nodes-and-relationships.d.ts +1 -1
  4. package/dist/cjs/src/cypher-execution/extract-unique-nodes-and-relationships.test.js +6 -6
  5. package/dist/cjs/src/cypher-execution/extract-unique-nodes-and-relationships.test.js.map +1 -1
  6. package/dist/cjs/src/data-transforms/cypher-type-names.d.ts +1 -1
  7. package/dist/cjs/src/data-transforms/cypher-type-names.js +3 -3
  8. package/dist/cjs/src/data-transforms/cypher-type-names.js.map +1 -1
  9. package/dist/cjs/src/data-transforms/record-to-string.d.ts +1 -1
  10. package/dist/cjs/src/data-transforms/record-to-string.js +8 -8
  11. package/dist/cjs/src/data-transforms/record-to-string.js.map +1 -1
  12. package/dist/cjs/src/index.d.ts +17 -17
  13. package/dist/cjs/src/index.js +15 -15
  14. package/dist/cjs/src/index.js.map +1 -1
  15. package/dist/cjs/src/integration-tests/pollingIntegrationTests.test.js +7 -7
  16. package/dist/cjs/src/integration-tests/pollingIntegrationTests.test.js.map +1 -1
  17. package/dist/cjs/src/neo4jConnection.d.ts +1 -1
  18. package/dist/cjs/src/queries/dataSummary.d.ts +1 -1
  19. package/dist/cjs/src/queries/databases.d.ts +1 -1
  20. package/dist/cjs/src/queries/databases.js +2 -2
  21. package/dist/cjs/src/queries/databases.js.map +1 -1
  22. package/dist/cjs/src/queries/functions.js +3 -3
  23. package/dist/cjs/src/queries/functions.js.map +1 -1
  24. package/dist/cjs/src/queries/graphSchema.d.ts +1 -1
  25. package/dist/cjs/src/queries/procedures.d.ts +1 -1
  26. package/dist/cjs/src/queries/procedures.js +3 -3
  27. package/dist/cjs/src/queries/procedures.js.map +1 -1
  28. package/dist/cjs/src/queries/version.d.ts +1 -1
  29. package/dist/cjs/src/result-transformers/graph-result-transformer.d.ts +1 -1
  30. package/dist/cjs/src/result-transformers/graph-result-transformer.js +2 -2
  31. package/dist/cjs/src/result-transformers/graph-result-transformer.js.map +1 -1
  32. package/dist/cjs/src/schemaPoller.d.ts +3 -3
  33. package/dist/cjs/src/schemaPoller.js +15 -15
  34. package/dist/cjs/src/schemaPoller.js.map +1 -1
  35. package/dist/cjs/tsconfig.tsbuildinfo +1 -1
  36. package/dist/esm/package.json +2 -2
  37. package/dist/esm/src/cypher-execution/extract-unique-nodes-and-relationships.d.ts +1 -1
  38. package/dist/esm/src/cypher-execution/extract-unique-nodes-and-relationships.test.js +1 -1
  39. package/dist/esm/src/cypher-execution/extract-unique-nodes-and-relationships.test.js.map +1 -1
  40. package/dist/esm/src/data-transforms/cypher-type-names.d.ts +1 -1
  41. package/dist/esm/src/data-transforms/cypher-type-names.js +1 -1
  42. package/dist/esm/src/data-transforms/cypher-type-names.js.map +1 -1
  43. package/dist/esm/src/data-transforms/record-to-string.d.ts +1 -1
  44. package/dist/esm/src/data-transforms/record-to-string.js +2 -2
  45. package/dist/esm/src/data-transforms/record-to-string.js.map +1 -1
  46. package/dist/esm/src/index.d.ts +17 -17
  47. package/dist/esm/src/index.js +9 -9
  48. package/dist/esm/src/index.js.map +1 -1
  49. package/dist/esm/src/integration-tests/pollingIntegrationTests.test.js +2 -2
  50. package/dist/esm/src/integration-tests/pollingIntegrationTests.test.js.map +1 -1
  51. package/dist/esm/src/neo4jConnection.d.ts +1 -1
  52. package/dist/esm/src/queries/dataSummary.d.ts +1 -1
  53. package/dist/esm/src/queries/databases.d.ts +1 -1
  54. package/dist/esm/src/queries/databases.js +1 -1
  55. package/dist/esm/src/queries/databases.js.map +1 -1
  56. package/dist/esm/src/queries/functions.js +1 -1
  57. package/dist/esm/src/queries/functions.js.map +1 -1
  58. package/dist/esm/src/queries/graphSchema.d.ts +1 -1
  59. package/dist/esm/src/queries/procedures.d.ts +1 -1
  60. package/dist/esm/src/queries/procedures.js +1 -1
  61. package/dist/esm/src/queries/procedures.js.map +1 -1
  62. package/dist/esm/src/queries/version.d.ts +1 -1
  63. package/dist/esm/src/result-transformers/graph-result-transformer.d.ts +1 -1
  64. package/dist/esm/src/result-transformers/graph-result-transformer.js +1 -1
  65. package/dist/esm/src/result-transformers/graph-result-transformer.js.map +1 -1
  66. package/dist/esm/src/schemaPoller.d.ts +3 -3
  67. package/dist/esm/src/schemaPoller.js +4 -4
  68. package/dist/esm/src/schemaPoller.js.map +1 -1
  69. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  70. package/dist/types/src/cypher-execution/extract-unique-nodes-and-relationships.d.ts +1 -1
  71. package/dist/types/src/data-transforms/cypher-type-names.d.ts +1 -1
  72. package/dist/types/src/data-transforms/record-to-string.d.ts +1 -1
  73. package/dist/types/src/index.d.ts +17 -17
  74. package/dist/types/src/neo4jConnection.d.ts +1 -1
  75. package/dist/types/src/queries/dataSummary.d.ts +1 -1
  76. package/dist/types/src/queries/databases.d.ts +1 -1
  77. package/dist/types/src/queries/graphSchema.d.ts +1 -1
  78. package/dist/types/src/queries/procedures.d.ts +1 -1
  79. package/dist/types/src/queries/version.d.ts +1 -1
  80. package/dist/types/src/result-transformers/graph-result-transformer.d.ts +1 -1
  81. package/dist/types/src/schemaPoller.d.ts +3 -3
  82. package/dist/types/tsconfig.tsbuildinfo +1 -1
  83. package/package.json +3 -3
  84. package/src/cypher-execution/extract-unique-nodes-and-relationships.test.ts +1 -1
  85. package/src/cypher-execution/extract-unique-nodes-and-relationships.ts +1 -1
  86. package/src/data-transforms/cypher-type-names.ts +2 -2
  87. package/src/data-transforms/record-to-string.ts +3 -3
  88. package/src/index.ts +20 -17
  89. package/src/integration-tests/pollingIntegrationTests.test.ts +2 -2
  90. package/src/neo4jConnection.ts +1 -1
  91. package/src/queries/dataSummary.ts +1 -1
  92. package/src/queries/databases.ts +1 -1
  93. package/src/queries/functions.ts +4 -1
  94. package/src/queries/graphSchema.ts +1 -1
  95. package/src/queries/procedures.ts +2 -2
  96. package/src/queries/version.ts +1 -1
  97. package/src/result-transformers/graph-result-transformer.ts +1 -1
  98. package/src/schemaPoller.ts +4 -4
  99. package/tsconfig.json +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-cypher/query-tools",
3
- "version": "2.0.0-next.30",
3
+ "version": "2.0.0-next.32",
4
4
  "description": "",
5
5
  "bugs": {
6
6
  "url": "https://github.com/neo4j/cypher-language-support/issues"
@@ -25,7 +25,7 @@
25
25
  "dependencies": {
26
26
  "ajv": "^8.12.0",
27
27
  "neo4j-driver": "6.0.1",
28
- "@neo4j-cypher/language-support": "2.0.0-next.30"
28
+ "@neo4j-cypher/language-support": "2.0.0-next.32"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@testcontainers/neo4j": "^11.5.1"
@@ -37,7 +37,7 @@
37
37
  "scripts": {
38
38
  "build": "concurrently 'npm:build-esm' 'npm:build-commonjs' 'npm:build-types'",
39
39
  "build-esm": "tsc --module esnext --outDir dist/esm",
40
- "build-commonjs": "tsc --module commonjs --outDir dist/cjs",
40
+ "build-commonjs": "tsc --module commonjs --moduleResolution node --outDir dist/cjs",
41
41
  "build-types": "tsc --emitDeclarationOnly --outDir dist/types",
42
42
  "dev": "concurrently 'npm:build-esm -- --watch' 'npm:build-commonjs -- --watch'",
43
43
  "clean": "rm -rf {dist,tsconfig.tsbuildinfo}",
@@ -2,7 +2,7 @@ import type { Record } from 'neo4j-driver';
2
2
  import { Node, Path, PathSegment, Relationship } from 'neo4j-driver';
3
3
 
4
4
  import { describe, expect, test } from 'vitest';
5
- import { extractUniqueNodesAndRels } from './extract-unique-nodes-and-relationships';
5
+ import { extractUniqueNodesAndRels } from './extract-unique-nodes-and-relationships.js';
6
6
 
7
7
  describe('extractNodesAndRels', () => {
8
8
  test('should map bolt records with a path to nodes and relationships', () => {
@@ -7,7 +7,7 @@ import type {
7
7
  Relationship,
8
8
  } from 'neo4j-driver';
9
9
  import { isNode, isPath, isRelationship } from 'neo4j-driver';
10
- import { CypherProperty } from '../types/cypher-data-types';
10
+ import { CypherProperty } from '../types/cypher-data-types.js';
11
11
 
12
12
  export type Properties = RecordShape<string, CypherProperty>;
13
13
 
@@ -16,11 +16,11 @@ import {
16
16
  import type {
17
17
  CypherDataType,
18
18
  CypherProperty,
19
- } from '../types/cypher-data-types';
19
+ } from '../types/cypher-data-types.js';
20
20
  import {
21
21
  isCypherBasicPropertyType,
22
22
  isInt8Array,
23
- } from '../types/cypher-data-types';
23
+ } from '../types/cypher-data-types.js';
24
24
 
25
25
  type CypherPropertyName =
26
26
  | 'Float'
@@ -13,13 +13,13 @@ import {
13
13
  import type {
14
14
  CypherDataType,
15
15
  CypherProperty,
16
- } from '../types/cypher-data-types';
16
+ } from '../types/cypher-data-types.js';
17
17
  import {
18
18
  isCypherPropertyType,
19
19
  isCypherTemporalType,
20
20
  isInt8Array,
21
- } from '../types/cypher-data-types';
22
- import { formatFloat } from './format-float';
21
+ } from '../types/cypher-data-types.js';
22
+ import { formatFloat } from './format-float.js';
23
23
 
24
24
  export const spacialFormat = (p: Point): string => {
25
25
  const zString = p.z !== undefined ? `, z:${formatFloat(p.z)}` : '';
package/src/index.ts CHANGED
@@ -1,24 +1,27 @@
1
- export { FRIENDLY_ERROR_MESSAGES } from './connectionErrorHandler';
2
- export type { ConnectionError } from './connectionErrorHandler';
3
- export * from './cypher-execution/extract-unique-nodes-and-relationships';
4
- export * from './cypher-execution/query-result';
5
- export type { Neo4jType } from './cypher-execution/query-result';
1
+ export { FRIENDLY_ERROR_MESSAGES } from './connectionErrorHandler.js';
2
+ export type { ConnectionError } from './connectionErrorHandler.js';
3
+ export * from './cypher-execution/extract-unique-nodes-and-relationships.js';
4
+ export * from './cypher-execution/query-result.js';
5
+ export type { Neo4jType } from './cypher-execution/query-result.js';
6
6
  export {
7
7
  getCypherTypeName,
8
8
  getPropertyTypeDisplayName,
9
- } from './data-transforms/cypher-type-names';
10
- export type { CypherDataTypeName } from './data-transforms/cypher-type-names';
11
- export * from './data-transforms/record-to-string';
12
- export * from './types/cypher-data-types';
9
+ } from './data-transforms/cypher-type-names.js';
10
+ export type { CypherDataTypeName } from './data-transforms/cypher-type-names.js';
11
+ export * from './data-transforms/record-to-string.js';
12
+ export * from './types/cypher-data-types.js';
13
13
  export type {
14
14
  ConnectedMetadataPoller as CypherMetadataPoller,
15
15
  DisconnectedMetadataPoller as EmptyMetadataPoller,
16
16
  MetadataPoller,
17
- } from './metadataPoller';
18
- export type { Neo4jConnection, QueryResultWithLimit } from './neo4jConnection';
19
- export type { Database } from './queries/databases';
20
- export { graphResultTransformer } from './result-transformers/graph-result-transformer';
21
- export { Neo4jSchemaPoller } from './schemaPoller';
22
- export type { ConnnectionResult } from './schemaPoller';
23
- export type { CypherDataType } from './types/cypher-data-types';
24
- export { getVersion } from './queries/version';
17
+ } from './metadataPoller.js';
18
+ export type {
19
+ Neo4jConnection,
20
+ QueryResultWithLimit,
21
+ } from './neo4jConnection.js';
22
+ export type { Database } from './queries/databases.js';
23
+ export { graphResultTransformer } from './result-transformers/graph-result-transformer.js';
24
+ export { Neo4jSchemaPoller } from './schemaPoller.js';
25
+ export type { ConnnectionResult } from './schemaPoller.js';
26
+ export type { CypherDataType } from './types/cypher-data-types.js';
27
+ export { getVersion } from './queries/version.js';
@@ -1,11 +1,11 @@
1
1
  import { auth, Driver, driver, Session } from 'neo4j-driver';
2
- import { createAndStartTestContainer } from './setupTestContainer';
2
+ import { createAndStartTestContainer } from './setupTestContainer.js';
3
3
  import { StartedNeo4jContainer } from '@testcontainers/neo4j';
4
4
  import {
5
5
  extractRelationshipsWithNamedNodes,
6
6
  GraphSchema,
7
7
  validateGraphSchema,
8
- } from '../queries/graphSchema';
8
+ } from '../queries/graphSchema.js';
9
9
 
10
10
  describe('Polling integration', () => {
11
11
  let session: Session;
@@ -8,7 +8,7 @@ import {
8
8
  } from 'neo4j-driver';
9
9
  import { version } from '../package.json';
10
10
  import { Database } from './queries/databases.js';
11
- import { ExecuteQueryArgs, QueryType } from './types/sdkTypes';
11
+ import { ExecuteQueryArgs, QueryType } from './types/sdkTypes.js';
12
12
 
13
13
  const METADATA_BASE = {
14
14
  app: 'neo4j-sdk',
@@ -1,5 +1,5 @@
1
1
  import { resultTransformers } from 'neo4j-driver';
2
- import { ExecuteQueryArgs } from '../types/sdkTypes';
2
+ import { ExecuteQueryArgs } from '../types/sdkTypes.js';
3
3
 
4
4
  export type DataSummary = {
5
5
  labels: string[];
@@ -1,6 +1,6 @@
1
1
  import type { CypherVersion } from '@neo4j-cypher/language-support';
2
2
  import { resultTransformers } from 'neo4j-driver';
3
- import { ExecuteQueryArgs, DbType } from '../types/sdkTypes';
3
+ import { ExecuteQueryArgs, DbType } from '../types/sdkTypes.js';
4
4
 
5
5
  export type DatabaseStatus =
6
6
  | 'online'
@@ -1,7 +1,10 @@
1
1
  import { CypherVersion, Neo4jFunction } from '@neo4j-cypher/language-support';
2
2
  import Ajv, { JSONSchemaType } from 'ajv';
3
3
  import { resultTransformers } from 'neo4j-driver';
4
- import { cleanType, cleanTypeDescription } from '../data-transforms/clean-type';
4
+ import {
5
+ cleanType,
6
+ cleanTypeDescription,
7
+ } from '../data-transforms/clean-type.js';
5
8
  import type { ExecuteQueryArgs } from '../types/sdkTypes.js';
6
9
 
7
10
  type ListFunctionArgs = {
@@ -1,5 +1,5 @@
1
1
  import { resultTransformers } from 'neo4j-driver';
2
- import { ExecuteQueryArgs } from '../types/sdkTypes';
2
+ import { ExecuteQueryArgs } from '../types/sdkTypes.js';
3
3
  import Ajv, { JSONSchemaType } from 'ajv';
4
4
 
5
5
  export type NeoNode = {
@@ -1,8 +1,8 @@
1
1
  import { CypherVersion, Neo4jProcedure } from '@neo4j-cypher/language-support';
2
2
  import Ajv, { JSONSchemaType } from 'ajv';
3
3
  import { resultTransformers } from 'neo4j-driver';
4
- import { cleanTypeDescription } from '../data-transforms/clean-type';
5
- import type { ExecuteQueryArgs } from '../types/sdkTypes';
4
+ import { cleanTypeDescription } from '../data-transforms/clean-type.js';
5
+ import type { ExecuteQueryArgs } from '../types/sdkTypes.js';
6
6
 
7
7
  type ListProcedureArgs = {
8
8
  executableByMe: boolean;
@@ -1,5 +1,5 @@
1
1
  import { resultTransformers } from 'neo4j-driver';
2
- import { ExecuteQueryArgs } from '../types/sdkTypes';
2
+ import { ExecuteQueryArgs } from '../types/sdkTypes.js';
3
3
 
4
4
  /**
5
5
  * Get dbms version
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  DeduplicatedNodesAndRels,
10
10
  extractUniqueNodesAndRels,
11
- } from '../cypher-execution/extract-unique-nodes-and-relationships';
11
+ } from '../cypher-execution/extract-unique-nodes-and-relationships.js';
12
12
 
13
13
  /**
14
14
  * Result type for graph queries that includes deduplicated nodes and relationships
@@ -5,15 +5,15 @@ import {
5
5
  FRIENDLY_ERROR_MESSAGES,
6
6
  getConnectionError,
7
7
  isRetriableNeo4jError,
8
- } from './connectionErrorHandler';
8
+ } from './connectionErrorHandler.js';
9
9
  import {
10
10
  ConnectedMetadataPoller,
11
11
  DisconnectedMetadataPoller,
12
12
  MetadataPoller,
13
- } from './metadataPoller';
14
- import { Neo4jConnection } from './neo4jConnection';
13
+ } from './metadataPoller.js';
14
+ import { Neo4jConnection } from './neo4jConnection.js';
15
15
  import { listDatabases } from './queries/databases.js';
16
- import { getVersion } from './queries/version';
16
+ import { getVersion } from './queries/version.js';
17
17
 
18
18
  export type ConnnectionResult = {
19
19
  success: boolean;
package/tsconfig.json CHANGED
@@ -3,6 +3,8 @@
3
3
  "include": ["src", "package.json", "vitest.config.mts"],
4
4
  "compilerOptions": {
5
5
  "strict": true,
6
+ "module": "esnext",
7
+ "moduleResolution": "bundler",
6
8
  "resolveJsonModule": true,
7
9
  "types": ["vitest/globals"]
8
10
  }