@pactflow/openapi-pact-comparator 2.2.0 → 2.3.0

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.
@@ -5,7 +5,7 @@ type InteractionContext = {
5
5
  description?: string;
6
6
  providerState?: string;
7
7
  asyncapiReferences?: {
8
- operationId: string;
8
+ operationId?: string;
9
9
  };
10
10
  };
11
11
  export declare function checkAsyncapiPreamble(asyncapi: AsyncAPIDocument | undefined, interaction: InteractionContext, index: number, interactionKind: string): {
@@ -35,7 +35,7 @@ export interface AsyncInteraction {
35
35
  description?: string;
36
36
  providerState?: string;
37
37
  asyncapiReferences?: {
38
- operationId: string;
38
+ operationId?: string;
39
39
  };
40
40
  payload: unknown;
41
41
  contentType?: string;
@@ -46,7 +46,7 @@ export interface SyncInteraction {
46
46
  description?: string;
47
47
  providerState?: string;
48
48
  asyncapiReferences?: {
49
- operationId: string;
49
+ operationId?: string;
50
50
  };
51
51
  request: {
52
52
  payload: unknown;
@@ -2,9 +2,12 @@ import type { SchemaObject } from "ajv";
2
2
  import type { OpenAPIV3 } from "openapi-types";
3
3
  export declare const resolveSchemaRefs: (schema: unknown, doc: object, visited?: Set<string>) => unknown;
4
4
  export declare const splitPath: (path: string) => string | string[];
5
- export declare const dereferenceOas: (schema: SchemaObject, oas: OpenAPIV3.Document) => any;
5
+ export declare const dereferenceOas: <T extends object>(schema: T, oas: OpenAPIV3.Document) => T;
6
6
  export declare const dereferenceDoc: (schema: {
7
7
  $ref?: string;
8
8
  }, doc: object) => unknown;
9
+ export declare const lastRefInChain: (schema: {
10
+ $ref?: string;
11
+ }, doc: object) => string | undefined;
9
12
  export declare const traverse: (schema: SchemaObject, visitor: (schema: SchemaObject) => void) => void;
10
13
  export declare const traverseWithDereferencing: (schema: SchemaObject, visitor: (schema: SchemaObject) => void) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pactflow/openapi-pact-comparator",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "An OpenAPI Specification and Pact Comparison library",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -58,28 +58,28 @@
58
58
  "@tsconfig/node22": "22.0.5",
59
59
  "@types/js-yaml": "4.0.9",
60
60
  "@types/lodash-es": "4.17.12",
61
- "@types/node": "24.13.1",
61
+ "@types/node": "24.13.2",
62
62
  "@types/qs": "6.15.1",
63
- "@vitest/coverage-v8": "4.1.8",
63
+ "@vitest/coverage-v8": "4.1.9",
64
64
  "ajv": "8.20.0",
65
65
  "ajv-formats": "3.0.1",
66
66
  "commander": "15.0.0",
67
- "eslint": "10.4.1",
67
+ "eslint": "10.6.0",
68
68
  "eslint-config-prettier": "10.1.8",
69
69
  "find-my-way": "9.6.0",
70
- "js-yaml": "4.2.0",
70
+ "js-yaml": "5.2.1",
71
71
  "lodash-es": "4.18.1",
72
72
  "openapi-types": "12.1.3",
73
73
  "parse-multipart-data": "1.5.0",
74
74
  "patch-package": "8.0.1",
75
- "prettier": "3.8.3",
76
- "qs": "6.15.2",
77
- "rollup": "4.61.1",
75
+ "prettier": "3.9.4",
76
+ "qs": "6.15.3",
77
+ "rollup": "4.62.2",
78
78
  "tslib": "2.8.1",
79
- "tsx": "4.22.4",
79
+ "tsx": "4.23.0",
80
80
  "typescript": "6.0.3",
81
- "typescript-eslint": "8.60.1",
82
- "vitest": "4.1.8"
81
+ "typescript-eslint": "8.62.1",
82
+ "vitest": "4.1.9"
83
83
  },
84
84
  "imports": {
85
85
  "#compare/*": "./src/compare/*.ts",