@graphql-inspector/action 5.0.16-alpha-20251126052709-1e9f99e5828f6aaf67924ae5761419279d6539e1 → 5.0.16-alpha-20251209221244-ff89fd2707cf16b24ef14c13d056b38377608670
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/core/src/diff/changes/argument.js +7 -3
- package/cjs/core/src/diff/changes/directive.js +16 -6
- package/cjs/core/src/diff/changes/enum.js +7 -5
- package/cjs/core/src/diff/changes/field.js +7 -3
- package/esm/core/src/diff/changes/argument.js +7 -3
- package/esm/core/src/diff/changes/directive.js +16 -6
- package/esm/core/src/diff/changes/enum.js +7 -5
- package/esm/core/src/diff/changes/field.js +7 -3
- package/package.json +2 -2
|
@@ -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,15 @@ function directiveArgumentRemoved(directive, arg) {
|
|
|
260
264
|
});
|
|
261
265
|
}
|
|
262
266
|
function buildDirectiveArgumentDescriptionChangedMessage(args) {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
267
|
+
if (args.oldDirectiveArgumentDescription === null &&
|
|
268
|
+
args.newDirectiveArgumentDescription !== null) {
|
|
269
|
+
return `Description '${(0, string_js_1.fmt)(args.newDirectiveArgumentDescription)}' was added to argument '${args.directiveArgumentName}' on directive '${args.directiveName}'`;
|
|
270
|
+
}
|
|
271
|
+
if (args.newDirectiveArgumentDescription === null &&
|
|
272
|
+
args.oldDirectiveArgumentDescription !== null) {
|
|
273
|
+
return `Description '${(0, string_js_1.fmt)(args.oldDirectiveArgumentDescription)}' was removed from argument '${args.directiveArgumentName}' on directive '${args.directiveName}'`;
|
|
274
|
+
}
|
|
275
|
+
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
276
|
}
|
|
267
277
|
function directiveArgumentDescriptionChangedFromMeta(args) {
|
|
268
278
|
return {
|
|
@@ -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,15 @@ export function directiveArgumentRemoved(directive, arg) {
|
|
|
234
238
|
});
|
|
235
239
|
}
|
|
236
240
|
function buildDirectiveArgumentDescriptionChangedMessage(args) {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
241
|
+
if (args.oldDirectiveArgumentDescription === null &&
|
|
242
|
+
args.newDirectiveArgumentDescription !== null) {
|
|
243
|
+
return `Description '${fmt(args.newDirectiveArgumentDescription)}' was added to argument '${args.directiveArgumentName}' on directive '${args.directiveName}'`;
|
|
244
|
+
}
|
|
245
|
+
if (args.newDirectiveArgumentDescription === null &&
|
|
246
|
+
args.oldDirectiveArgumentDescription !== null) {
|
|
247
|
+
return `Description '${fmt(args.oldDirectiveArgumentDescription)}' was removed from argument '${args.directiveArgumentName}' on directive '${args.directiveName}'`;
|
|
248
|
+
}
|
|
249
|
+
return `Description for argument '${args.directiveArgumentName}' on directive '${args.directiveName}' changed from '${fmt(args.oldDirectiveArgumentDescription ?? '')}' to '${fmt(args.newDirectiveArgumentDescription ?? '')}'`;
|
|
240
250
|
}
|
|
241
251
|
export function directiveArgumentDescriptionChangedFromMeta(args) {
|
|
242
252
|
return {
|
|
@@ -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/action",
|
|
3
|
-
"version": "5.0.16-alpha-
|
|
3
|
+
"version": "5.0.16-alpha-20251209221244-ff89fd2707cf16b24ef14c13d056b38377608670",
|
|
4
4
|
"description": "GraphQL Inspector functionality for GitHub Actions",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"dependencies": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"probot": "13.2.2",
|
|
12
12
|
"tslib": "2.6.2",
|
|
13
13
|
"@graphql-inspector/commands": "6.0.0",
|
|
14
|
-
"@graphql-inspector/core": "7.0.4-alpha-
|
|
14
|
+
"@graphql-inspector/core": "7.0.4-alpha-20251209221244-ff89fd2707cf16b24ef14c13d056b38377608670"
|
|
15
15
|
},
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|