@graphql-inspector/core 7.0.4-alpha-20251126052709-1e9f99e5828f6aaf67924ae5761419279d6539e1 → 7.0.4-alpha-20251209220655-34aadc8b6d7b9eb674f5ab85c5fbad474e045e30
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.
- package/cjs/diff/changes/argument.js +7 -3
- package/cjs/diff/changes/directive.js +14 -6
- package/cjs/diff/changes/enum.js +7 -5
- package/cjs/diff/changes/field.js +7 -3
- package/esm/diff/changes/argument.js +7 -3
- package/esm/diff/changes/directive.js +14 -6
- package/esm/diff/changes/enum.js +7 -5
- package/esm/diff/changes/field.js +7 -3
- package/package.json +1 -1
|
@@ -10,9 +10,13 @@ const graphql_js_1 = require("../../utils/graphql.js");
|
|
|
10
10
|
const string_js_1 = require("../../utils/string.js");
|
|
11
11
|
const change_js_1 = require("./change.js");
|
|
12
12
|
function buildFieldArgumentDescriptionChangedMessage(args) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
if (args.oldDescription === null && args.newDescription !== null) {
|
|
14
|
+
return `Description '${(0, string_js_1.fmt)(args.newDescription)}' was added to argument '${args.argumentName}' on field '${args.typeName}.${args.fieldName}'`;
|
|
15
|
+
}
|
|
16
|
+
if (args.newDescription === null && args.oldDescription !== null) {
|
|
17
|
+
return `Description '${(0, string_js_1.fmt)(args.oldDescription)}' was removed from argument '${args.argumentName}' on field '${args.typeName}.${args.fieldName}'`;
|
|
18
|
+
}
|
|
19
|
+
return `Description for argument '${args.argumentName}' on field '${args.typeName}.${args.fieldName}' changed from '${(0, string_js_1.fmt)(args.oldDescription ?? '')}' to '${(0, string_js_1.fmt)(args.newDescription ?? '')}'`;
|
|
16
20
|
}
|
|
17
21
|
function fieldArgumentDescriptionChangedFromMeta(args) {
|
|
18
22
|
return {
|
|
@@ -78,9 +78,13 @@ function directiveAdded(directive) {
|
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
function buildDirectiveDescriptionChangedMessage(args) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
if (args.oldDirectiveDescription === null && args.newDirectiveDescription !== null) {
|
|
82
|
+
return `Directive '${args.directiveName}' description '${(0, string_js_1.fmt)(args.newDirectiveDescription)}' was added`;
|
|
83
|
+
}
|
|
84
|
+
if (args.newDirectiveDescription === null && args.oldDirectiveDescription !== null) {
|
|
85
|
+
return `Directive '${args.directiveName}' description '${(0, string_js_1.fmt)(args.oldDirectiveDescription)}' was removed`;
|
|
86
|
+
}
|
|
87
|
+
return `Directive '${args.directiveName}' description changed from '${(0, string_js_1.fmt)(args.oldDirectiveDescription ?? '')}' to '${(0, string_js_1.fmt)(args.newDirectiveDescription ?? '')}'`;
|
|
84
88
|
}
|
|
85
89
|
function directiveDescriptionChangedFromMeta(args) {
|
|
86
90
|
return {
|
|
@@ -260,9 +264,13 @@ function directiveArgumentRemoved(directive, arg) {
|
|
|
260
264
|
});
|
|
261
265
|
}
|
|
262
266
|
function buildDirectiveArgumentDescriptionChangedMessage(args) {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
267
|
+
if (args.oldDirectiveArgumentDescription === null && args.newDirectiveArgumentDescription !== null) {
|
|
268
|
+
return `Description '${(0, string_js_1.fmt)(args.newDirectiveArgumentDescription)}' was added to argument '${args.directiveArgumentName}' on directive '${args.directiveName}'`;
|
|
269
|
+
}
|
|
270
|
+
if (args.newDirectiveArgumentDescription === null && args.oldDirectiveArgumentDescription !== null) {
|
|
271
|
+
return `Description '${(0, string_js_1.fmt)(args.oldDirectiveArgumentDescription)}' was removed from argument '${args.directiveArgumentName}' on directive '${args.directiveName}'`;
|
|
272
|
+
}
|
|
273
|
+
return `Description for argument '${args.directiveArgumentName}' on directive '${args.directiveName}' changed from '${(0, string_js_1.fmt)(args.oldDirectiveArgumentDescription ?? '')}' to '${(0, string_js_1.fmt)(args.newDirectiveArgumentDescription ?? '')}'`;
|
|
266
274
|
}
|
|
267
275
|
function directiveArgumentDescriptionChangedFromMeta(args) {
|
|
268
276
|
return {
|
package/cjs/diff/changes/enum.js
CHANGED
|
@@ -72,11 +72,13 @@ function enumValueAdded(type, value, addedToNewType) {
|
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
function buildEnumValueDescriptionChangedMessage(args) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
if (args.oldEnumValueDescription === null && args.newEnumValueDescription !== null) {
|
|
76
|
+
return `Description '${(0, string_js_1.fmt)(args.newEnumValueDescription)}' was added to enum value '${args.enumName}.${args.enumValueName}'`;
|
|
77
|
+
}
|
|
78
|
+
if (args.newEnumValueDescription === null && args.oldEnumValueDescription !== null) {
|
|
79
|
+
return `Description '${(0, string_js_1.fmt)(args.oldEnumValueDescription)}' was removed from enum value '${args.enumName}.${args.enumValueName}'`;
|
|
80
|
+
}
|
|
81
|
+
return `Description for enum value '${args.enumName}.${args.enumValueName}' changed from '${(0, string_js_1.fmt)(args.oldEnumValueDescription ?? '')}' to '${(0, string_js_1.fmt)(args.newEnumValueDescription ?? '')}'`;
|
|
80
82
|
}
|
|
81
83
|
function enumValueDescriptionChangedFromMeta(args) {
|
|
82
84
|
return {
|
|
@@ -86,9 +86,13 @@ function fieldAdded(type, field) {
|
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
function buildFieldDescriptionChangedMessage(args) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
if (!args.oldDescription && args.newDescription) {
|
|
90
|
+
return `Field '${args.typeName}.${args.fieldName}' description '${(0, string_js_1.fmt)(args.newDescription)}' was added`;
|
|
91
|
+
}
|
|
92
|
+
if (!args.newDescription && args.oldDescription) {
|
|
93
|
+
return `Field '${args.typeName}.${args.fieldName}' description '${(0, string_js_1.fmt)(args.oldDescription)}' was removed`;
|
|
94
|
+
}
|
|
95
|
+
return `Field '${args.typeName}.${args.fieldName}' description changed from '${(0, string_js_1.fmt)(args.oldDescription)}' to '${(0, string_js_1.fmt)(args.newDescription)}'`;
|
|
92
96
|
}
|
|
93
97
|
function fieldDescriptionChangedFromMeta(args) {
|
|
94
98
|
return {
|
|
@@ -2,9 +2,13 @@ import { safeChangeForInputValue } from '../../utils/graphql.js';
|
|
|
2
2
|
import { fmt, safeString } from '../../utils/string.js';
|
|
3
3
|
import { ChangeType, CriticalityLevel, } from './change.js';
|
|
4
4
|
function buildFieldArgumentDescriptionChangedMessage(args) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
if (args.oldDescription === null && args.newDescription !== null) {
|
|
6
|
+
return `Description '${fmt(args.newDescription)}' was added to argument '${args.argumentName}' on field '${args.typeName}.${args.fieldName}'`;
|
|
7
|
+
}
|
|
8
|
+
if (args.newDescription === null && args.oldDescription !== null) {
|
|
9
|
+
return `Description '${fmt(args.oldDescription)}' was removed from argument '${args.argumentName}' on field '${args.typeName}.${args.fieldName}'`;
|
|
10
|
+
}
|
|
11
|
+
return `Description for argument '${args.argumentName}' on field '${args.typeName}.${args.fieldName}' changed from '${fmt(args.oldDescription ?? '')}' to '${fmt(args.newDescription ?? '')}'`;
|
|
8
12
|
}
|
|
9
13
|
export function fieldArgumentDescriptionChangedFromMeta(args) {
|
|
10
14
|
return {
|
|
@@ -52,9 +52,13 @@ export function directiveAdded(directive) {
|
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
function buildDirectiveDescriptionChangedMessage(args) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
if (args.oldDirectiveDescription === null && args.newDirectiveDescription !== null) {
|
|
56
|
+
return `Directive '${args.directiveName}' description '${fmt(args.newDirectiveDescription)}' was added`;
|
|
57
|
+
}
|
|
58
|
+
if (args.newDirectiveDescription === null && args.oldDirectiveDescription !== null) {
|
|
59
|
+
return `Directive '${args.directiveName}' description '${fmt(args.oldDirectiveDescription)}' was removed`;
|
|
60
|
+
}
|
|
61
|
+
return `Directive '${args.directiveName}' description changed from '${fmt(args.oldDirectiveDescription ?? '')}' to '${fmt(args.newDirectiveDescription ?? '')}'`;
|
|
58
62
|
}
|
|
59
63
|
export function directiveDescriptionChangedFromMeta(args) {
|
|
60
64
|
return {
|
|
@@ -234,9 +238,13 @@ export function directiveArgumentRemoved(directive, arg) {
|
|
|
234
238
|
});
|
|
235
239
|
}
|
|
236
240
|
function buildDirectiveArgumentDescriptionChangedMessage(args) {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
241
|
+
if (args.oldDirectiveArgumentDescription === null && args.newDirectiveArgumentDescription !== null) {
|
|
242
|
+
return `Description '${fmt(args.newDirectiveArgumentDescription)}' was added to argument '${args.directiveArgumentName}' on directive '${args.directiveName}'`;
|
|
243
|
+
}
|
|
244
|
+
if (args.newDirectiveArgumentDescription === null && args.oldDirectiveArgumentDescription !== null) {
|
|
245
|
+
return `Description '${fmt(args.oldDirectiveArgumentDescription)}' was removed from argument '${args.directiveArgumentName}' on directive '${args.directiveName}'`;
|
|
246
|
+
}
|
|
247
|
+
return `Description for argument '${args.directiveArgumentName}' on directive '${args.directiveName}' changed from '${fmt(args.oldDirectiveArgumentDescription ?? '')}' to '${fmt(args.newDirectiveArgumentDescription ?? '')}'`;
|
|
240
248
|
}
|
|
241
249
|
export function directiveArgumentDescriptionChangedFromMeta(args) {
|
|
242
250
|
return {
|
package/esm/diff/changes/enum.js
CHANGED
|
@@ -58,11 +58,13 @@ export function enumValueAdded(type, value, addedToNewType) {
|
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
function buildEnumValueDescriptionChangedMessage(args) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
if (args.oldEnumValueDescription === null && args.newEnumValueDescription !== null) {
|
|
62
|
+
return `Description '${fmt(args.newEnumValueDescription)}' was added to enum value '${args.enumName}.${args.enumValueName}'`;
|
|
63
|
+
}
|
|
64
|
+
if (args.newEnumValueDescription === null && args.oldEnumValueDescription !== null) {
|
|
65
|
+
return `Description '${fmt(args.oldEnumValueDescription)}' was removed from enum value '${args.enumName}.${args.enumValueName}'`;
|
|
66
|
+
}
|
|
67
|
+
return `Description for enum value '${args.enumName}.${args.enumValueName}' changed from '${fmt(args.oldEnumValueDescription ?? '')}' to '${fmt(args.newEnumValueDescription ?? '')}'`;
|
|
66
68
|
}
|
|
67
69
|
export function enumValueDescriptionChangedFromMeta(args) {
|
|
68
70
|
return {
|
|
@@ -58,9 +58,13 @@ export function fieldAdded(type, field) {
|
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
function buildFieldDescriptionChangedMessage(args) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
if (!args.oldDescription && args.newDescription) {
|
|
62
|
+
return `Field '${args.typeName}.${args.fieldName}' description '${fmt(args.newDescription)}' was added`;
|
|
63
|
+
}
|
|
64
|
+
if (!args.newDescription && args.oldDescription) {
|
|
65
|
+
return `Field '${args.typeName}.${args.fieldName}' description '${fmt(args.oldDescription)}' was removed`;
|
|
66
|
+
}
|
|
67
|
+
return `Field '${args.typeName}.${args.fieldName}' description changed from '${fmt(args.oldDescription)}' to '${fmt(args.newDescription)}'`;
|
|
64
68
|
}
|
|
65
69
|
export function fieldDescriptionChangedFromMeta(args) {
|
|
66
70
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-inspector/core",
|
|
3
|
-
"version": "7.0.4-alpha-
|
|
3
|
+
"version": "7.0.4-alpha-20251209220655-34aadc8b6d7b9eb674f5ab85c5fbad474e045e30",
|
|
4
4
|
"description": "Tooling for GraphQL. Compare GraphQL Schemas, check documents, find breaking changes, find similar types.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|