@iobroker/repochecker 5.13.0 → 5.13.2
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/README.md +9 -0
- package/lib/M1000_IOPackageJson.js +43 -27
- package/lib/postprocessing.js +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,6 +25,15 @@ Example:
|
|
|
25
25
|
Placeholder for the next version (at the beginning of the line):
|
|
26
26
|
### **WORK IN PROGRESS**
|
|
27
27
|
-->
|
|
28
|
+
### 5.13.2 (2026-05-26)
|
|
29
|
+
|
|
30
|
+
- (mcm1957) Adapter some severities for new adapters.
|
|
31
|
+
- (mcm1957) Missing state common attributes added.
|
|
32
|
+
|
|
33
|
+
### 5.13.1 (2026-05-24)
|
|
34
|
+
|
|
35
|
+
- (mcm1957) Some flase positives have been fixed.
|
|
36
|
+
|
|
28
37
|
### 5.13.0 (2026-05-22)
|
|
29
38
|
|
|
30
39
|
- (@copilot) Ignored `/www`, `/template`, and `/templates` during source dependency scanning, ignored `native.webInstance` for extension adapters in native checks, and updated `[W1130]` array default validation to require a JSON-stringified array. Related to [#881].
|
|
@@ -999,31 +999,34 @@ async function checkIOPackageJson(context) {
|
|
|
999
999
|
'desc',
|
|
1000
1000
|
'read',
|
|
1001
1001
|
'write',
|
|
1002
|
-
'role',
|
|
1002
|
+
'role', // string
|
|
1003
1003
|
'states',
|
|
1004
1004
|
'workingID',
|
|
1005
1005
|
'custom',
|
|
1006
1006
|
'type',
|
|
1007
|
-
'name',
|
|
1008
|
-
'expert',
|
|
1007
|
+
'name', // StringOrTranslated
|
|
1008
|
+
'expert', // boolean
|
|
1009
|
+
'dontDelete', // boolean
|
|
1010
|
+
'color', // string
|
|
1011
|
+
'icon', // string
|
|
1009
1012
|
]);
|
|
1010
1013
|
|
|
1011
1014
|
instanceObjects.forEach((instanceObject, index) => {
|
|
1012
1015
|
if (!instanceObject || typeof instanceObject !== 'object' || Array.isArray(instanceObject)) {
|
|
1013
|
-
context.warnings.push(`[W1118] instanceObject[${index}] must be an object`);
|
|
1016
|
+
context.warnings.push(`[W1118] io-package.json: instanceObject[${index}] must be an object`);
|
|
1014
1017
|
return;
|
|
1015
1018
|
}
|
|
1016
1019
|
|
|
1017
1020
|
if (
|
|
1018
|
-
instanceObject._id === undefined ||
|
|
1021
|
+
(instanceObject._id === undefined ||
|
|
1019
1022
|
typeof instanceObject._id !== 'string' ||
|
|
1020
|
-
!instanceObject._id.trim()
|
|
1023
|
+
!instanceObject._id.trim()) && (instanceObject.type !== 'meta')
|
|
1021
1024
|
) {
|
|
1022
|
-
context.warnings.push(`[W1119] instanceObject[${index}] must define non-empty string "_id"`);
|
|
1025
|
+
context.warnings.push(`[W1119] io-package.json: instanceObject[${index}] must define non-empty string "_id"`);
|
|
1023
1026
|
}
|
|
1024
1027
|
|
|
1025
1028
|
if (instanceObject.type !== undefined && !instanceObjectValidTypes.includes(instanceObject.type)) {
|
|
1026
|
-
context.warnings.push(`[W1047] instanceObject type has an invalid type: ${instanceObject.type}`);
|
|
1029
|
+
context.warnings.push(`[W1047] io-package.json: instanceObject type has an invalid type: ${instanceObject.type}`);
|
|
1027
1030
|
}
|
|
1028
1031
|
|
|
1029
1032
|
if (instanceObject.type !== 'state') {
|
|
@@ -1036,32 +1039,32 @@ async function checkIOPackageJson(context) {
|
|
|
1036
1039
|
Array.isArray(instanceObject.common)
|
|
1037
1040
|
) {
|
|
1038
1041
|
context.warnings.push(
|
|
1039
|
-
`[W1120] instanceObject "${instanceObject._id || index}" with type "state" must have "common" object`,
|
|
1042
|
+
`[W1120] io-package.json: instanceObject "${instanceObject._id || index}" with type "state" must have "common" object`,
|
|
1040
1043
|
);
|
|
1041
1044
|
return;
|
|
1042
1045
|
}
|
|
1043
1046
|
|
|
1044
1047
|
if (typeof instanceObject.common.type !== 'string') {
|
|
1045
1048
|
context.warnings.push(
|
|
1046
|
-
`[W1048] instanceObject common.type has an invalid type! Expected "string", received "${typeof instanceObject.common.type}"`,
|
|
1049
|
+
`[W1048] io-package.json: instanceObject common.type has an invalid type! Expected "string", received "${typeof instanceObject.common.type}"`,
|
|
1047
1050
|
);
|
|
1048
1051
|
} else if (!instanceObjectStateTypes.includes(instanceObject.common.type)) {
|
|
1049
1052
|
context.warnings.push(
|
|
1050
|
-
`[W1049] instanceObject common.type has an invalid value: ${instanceObject.common.type}`,
|
|
1053
|
+
`[W1049] io-package.json: instanceObject common.type has an invalid value: ${instanceObject.common.type}`,
|
|
1051
1054
|
);
|
|
1052
1055
|
}
|
|
1053
1056
|
|
|
1054
1057
|
['min', 'max', 'step'].forEach(key => {
|
|
1055
1058
|
if (instanceObject.common[key] !== undefined && typeof instanceObject.common[key] !== 'number') {
|
|
1056
1059
|
context.warnings.push(
|
|
1057
|
-
`[W1121] instanceObject "${instanceObject._id || index}" common.${key} must be a number`,
|
|
1060
|
+
`[W1121] io-package.json: instanceObject "${instanceObject._id || index}" common.${key} must be a number`,
|
|
1058
1061
|
);
|
|
1059
1062
|
}
|
|
1060
1063
|
});
|
|
1061
1064
|
|
|
1062
1065
|
if (instanceObject.common.unit !== undefined && typeof instanceObject.common.unit !== 'string') {
|
|
1063
1066
|
context.warnings.push(
|
|
1064
|
-
`[W1122] instanceObject "${instanceObject._id || index}" common.unit must be a string`,
|
|
1067
|
+
`[W1122] io-package.json: instanceObject "${instanceObject._id || index}" common.unit must be a string`,
|
|
1065
1068
|
);
|
|
1066
1069
|
}
|
|
1067
1070
|
|
|
@@ -1073,23 +1076,23 @@ async function checkIOPackageJson(context) {
|
|
|
1073
1076
|
Array.isArray(instanceObject.common.desc))
|
|
1074
1077
|
) {
|
|
1075
1078
|
context.warnings.push(
|
|
1076
|
-
`[W1123] instanceObject "${instanceObject._id || index}" common.desc must be a string or object`,
|
|
1079
|
+
`[W1123] io-package.json: instanceObject "${instanceObject._id || index}" common.desc must be a string or object`,
|
|
1077
1080
|
);
|
|
1078
1081
|
}
|
|
1079
1082
|
|
|
1080
1083
|
if (typeof instanceObject.common.read !== 'boolean') {
|
|
1081
1084
|
context.warnings.push(
|
|
1082
|
-
`[W1124] instanceObject "${instanceObject._id || index}" common.read is mandatory and must be boolean`,
|
|
1085
|
+
`[W1124] io-package.json: instanceObject "${instanceObject._id || index}" common.read is mandatory and must be boolean`,
|
|
1083
1086
|
);
|
|
1084
1087
|
}
|
|
1085
1088
|
if (typeof instanceObject.common.write !== 'boolean') {
|
|
1086
1089
|
context.warnings.push(
|
|
1087
|
-
`[W1125] instanceObject "${instanceObject._id || index}" common.write is mandatory and must be boolean`,
|
|
1090
|
+
`[W1125] io-package.json: instanceObject "${instanceObject._id || index}" common.write is mandatory and must be boolean`,
|
|
1088
1091
|
);
|
|
1089
1092
|
}
|
|
1090
1093
|
if (typeof instanceObject.common.role !== 'string' || !instanceObject.common.role.trim()) {
|
|
1091
1094
|
context.warnings.push(
|
|
1092
|
-
`[W1126] instanceObject "${instanceObject._id || index}" common.role is mandatory and must be a non-empty string`,
|
|
1095
|
+
`[W1126] io-package.json: instanceObject "${instanceObject._id || index}" common.role is mandatory and must be a non-empty string`,
|
|
1093
1096
|
);
|
|
1094
1097
|
}
|
|
1095
1098
|
if (
|
|
@@ -1098,19 +1101,19 @@ async function checkIOPackageJson(context) {
|
|
|
1098
1101
|
typeof instanceObject.common.states !== 'string')
|
|
1099
1102
|
) {
|
|
1100
1103
|
context.warnings.push(
|
|
1101
|
-
`[W1127] instanceObject "${instanceObject._id || index}" common.states must be number or string`,
|
|
1104
|
+
`[W1127] io-package.json: instanceObject "${instanceObject._id || index}" common.states must be number or string`,
|
|
1102
1105
|
);
|
|
1103
1106
|
}
|
|
1104
1107
|
|
|
1105
1108
|
if (instanceObject.common.defAck !== undefined && typeof instanceObject.common.defAck !== 'boolean') {
|
|
1106
1109
|
context.warnings.push(
|
|
1107
|
-
`[W1128] instanceObject "${instanceObject._id || index}" common.defAck must be boolean`,
|
|
1110
|
+
`[W1128] io-package.json: instanceObject "${instanceObject._id || index}" common.defAck must be boolean`,
|
|
1108
1111
|
);
|
|
1109
1112
|
}
|
|
1110
1113
|
|
|
1111
1114
|
if (instanceObject.common.expert !== undefined && typeof instanceObject.common.expert !== 'boolean') {
|
|
1112
1115
|
context.warnings.push(
|
|
1113
|
-
`[W1136] instanceObject "${instanceObject._id || index}" common.expert must be boolean`,
|
|
1116
|
+
`[W1136] io-package.json: instanceObject "${instanceObject._id || index}" common.expert must be boolean`,
|
|
1114
1117
|
);
|
|
1115
1118
|
}
|
|
1116
1119
|
|
|
@@ -1119,7 +1122,7 @@ async function checkIOPackageJson(context) {
|
|
|
1119
1122
|
typeof instanceObject.common.workingID !== 'string'
|
|
1120
1123
|
) {
|
|
1121
1124
|
context.warnings.push(
|
|
1122
|
-
`[W1129] instanceObject "${instanceObject._id || index}" common.workingID must be string`,
|
|
1125
|
+
`[W1129] io-package.json: instanceObject "${instanceObject._id || index}" common.workingID must be string`,
|
|
1123
1126
|
);
|
|
1124
1127
|
}
|
|
1125
1128
|
if (
|
|
@@ -1127,14 +1130,14 @@ async function checkIOPackageJson(context) {
|
|
|
1127
1130
|
!doesValueMatchStateType(instanceObject.common.def, instanceObject.common.type)
|
|
1128
1131
|
) {
|
|
1129
1132
|
context.warnings.push(
|
|
1130
|
-
`[W1130] instanceObject "${instanceObject._id || index}" common.def must match common.type "${instanceObject.common.type}"`,
|
|
1133
|
+
`[W1130] io-package.json: instanceObject "${instanceObject._id || index}" common.def must match common.type "${instanceObject.common.type}"`,
|
|
1131
1134
|
);
|
|
1132
1135
|
}
|
|
1133
1136
|
|
|
1134
1137
|
Object.keys(instanceObject.common).forEach(commonKey => {
|
|
1135
1138
|
if (!validStateCommonKeys.has(commonKey)) {
|
|
1136
1139
|
context.warnings.push(
|
|
1137
|
-
`[W1131] instanceObject "${instanceObject._id || index}" has unsupported common.${commonKey} attribute`,
|
|
1140
|
+
`[W1131] io-package.json: instanceObject "${instanceObject._id || index}" has unsupported common.${commonKey} attribute`,
|
|
1138
1141
|
);
|
|
1139
1142
|
}
|
|
1140
1143
|
});
|
|
@@ -1144,7 +1147,7 @@ async function checkIOPackageJson(context) {
|
|
|
1144
1147
|
const roleDefinition = stateRoleDefinitions[roleForLookup];
|
|
1145
1148
|
if (!roleDefinition) {
|
|
1146
1149
|
context.warnings.push(
|
|
1147
|
-
`[W1132] instanceObject "${instanceObject._id || index}" common.role "${instanceObject.common.role}" is not a known ioBroker state role`,
|
|
1150
|
+
`[W1132] io-package.json: instanceObject "${instanceObject._id || index}" common.role "${instanceObject.common.role}" is not a known ioBroker state role`,
|
|
1148
1151
|
);
|
|
1149
1152
|
return;
|
|
1150
1153
|
}
|
|
@@ -1155,7 +1158,7 @@ async function checkIOPackageJson(context) {
|
|
|
1155
1158
|
!roleDefinition.types.includes(instanceObject.common.type)
|
|
1156
1159
|
) {
|
|
1157
1160
|
context.warnings.push(
|
|
1158
|
-
`[W1133] instanceObject "${instanceObject._id || index}" role "${instanceObject.common.role}" expects common.type to be one of [${roleDefinition.types.join(', ')}], but found "${instanceObject.common.type}"`,
|
|
1161
|
+
`[W1133] io-package.json: instanceObject "${instanceObject._id || index}" role "${instanceObject.common.role}" expects common.type to be one of [${roleDefinition.types.join(', ')}], but found "${instanceObject.common.type}"`,
|
|
1159
1162
|
);
|
|
1160
1163
|
}
|
|
1161
1164
|
if (
|
|
@@ -1164,7 +1167,7 @@ async function checkIOPackageJson(context) {
|
|
|
1164
1167
|
instanceObject.common.read !== roleDefinition.read
|
|
1165
1168
|
) {
|
|
1166
1169
|
context.warnings.push(
|
|
1167
|
-
`[W1134] instanceObject "${instanceObject._id || index}" role "${instanceObject.common.role}" expects common.read=${roleDefinition.read}`,
|
|
1170
|
+
`[W1134] io-package.json: instanceObject "${instanceObject._id || index}" role "${instanceObject.common.role}" expects common.read=${roleDefinition.read}`,
|
|
1168
1171
|
);
|
|
1169
1172
|
}
|
|
1170
1173
|
if (
|
|
@@ -1173,10 +1176,23 @@ async function checkIOPackageJson(context) {
|
|
|
1173
1176
|
instanceObject.common.write !== roleDefinition.write
|
|
1174
1177
|
) {
|
|
1175
1178
|
context.warnings.push(
|
|
1176
|
-
`[W1135] instanceObject "${instanceObject._id || index}" role "${instanceObject.common.role}" expects common.write=${roleDefinition.write}`,
|
|
1179
|
+
`[W1135] io-package.json: instanceObject "${instanceObject._id || index}" role "${instanceObject.common.role}" expects common.write=${roleDefinition.write}`,
|
|
1177
1180
|
);
|
|
1178
1181
|
}
|
|
1179
1182
|
}
|
|
1183
|
+
|
|
1184
|
+
if (instanceObject.common.color !== undefined && typeof instanceObject.common.color !== 'string') {
|
|
1185
|
+
context.warnings.push(
|
|
1186
|
+
`[W1136] io-package.json: instanceObject "${instanceObject._id || index}" common.color must be a string`,
|
|
1187
|
+
);
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
if (instanceObject.common.icon !== undefined && typeof instanceObject.common.icon !== 'string') {
|
|
1191
|
+
context.warnings.push(
|
|
1192
|
+
`[W1136] io-package.json: instanceObject "${instanceObject._id || index}" common.icon must be a string`,
|
|
1193
|
+
);
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1180
1196
|
});
|
|
1181
1197
|
}
|
|
1182
1198
|
}
|
package/lib/postprocessing.js
CHANGED
|
@@ -29,17 +29,23 @@ const mapSeverity4New = {
|
|
|
29
29
|
W1027: 'E', // [W1027] Missing suggested translation into ru,pt,nl,fr,it,es,pl,uk,zh-cn of "common.titleLang"
|
|
30
30
|
W1032: 'E', // [W1032] Many "common.news" found in io-package.json
|
|
31
31
|
W1034: 'E', // [W1034] Missing suggested translation into ru,pt,nl,fr,it,es,pl,uk,zh-cn of "common.desc"
|
|
32
|
+
W1054: 'E', // [W1054] Missing suggested translation into ru,pt,nl,fr,it,es,pl,uk,zh-cn of some "common.news" in io-package.json.
|
|
32
33
|
W1056: 'E', // [W1056] admin 7.6.17 listed as dependency but 7.6.20 is reW1commended.
|
|
33
34
|
W1084: 'E', // [W1084] "common.title" is deprecated and replaced by "common.titleLang".
|
|
34
35
|
W2007: 'E', // [W2007] Version 0.7.0-beta.2 is tagged as "latest" at npm
|
|
35
36
|
W3009: 'E', // [W3009] Workflow "test-and-release.yml" is missing recommended concurrency configuration.
|
|
37
|
+
W3019: 'E', // [W3019] Workflow "test-and-release.yml": job "deploy" step using "ioBroker/testing-action-deploy@v1" has "npm-token" parameter specified. Trusted publishing will not work while "npm-token" is set.
|
|
36
38
|
W5512: 'E', // [W5512] admin/jsonConfig.json schema validation error: ...
|
|
39
|
+
W6020: 'E', // [W6020] Consider adding a CHANGELOG_OLD.md file to store older changelog entries.
|
|
37
40
|
W6021: 'E', // [W6021] "## License" is not the last section in README.md.
|
|
38
41
|
W8915: 'E', // [W8915] Dependabot npm entry (directory: "/") has no "cooldown" configured.
|
|
39
42
|
W8916: 'E', // [W8916] Dependabot configuration "/.github/dependabot.yml" has no entry with "package-ecosystem: github-actions".
|
|
40
43
|
W8917: 'E', // [W8917] At least major versions of @types/node should not be updated by dependabot.
|
|
41
44
|
S0062: 'W', // [S0062] Consider adding and using package "@alcalzone/release-script".
|
|
42
45
|
S3012: 'E', // [S3012] Workflow "test-and-release.yml": job "deploy" is not defined.
|
|
46
|
+
S5022: 'W', // [S5022] Please consider migrating to admin 5 UI (jsonConfig) or react based UI.
|
|
47
|
+
S5043: 'E', // [S5043] Package "xx" is a built-in Node.js module. Please use "node:fs" instead.
|
|
48
|
+
S5051: 'W', // [S5051] Custom sleep/wait function(s) found in source files (src/lib/adsb.ts).
|
|
43
49
|
S6008: 'E', // [S6008] Changelog for version 0.7.0-beta.19 should be added to README.md
|
|
44
50
|
S6020: 'W', // [S6020] Consider adding a CHANGELOG_OLD.md file to store older changelog entries. This is supported by @alcalzone/releasescript.
|
|
45
51
|
S8901: 'W', // [S8901] Dependabot configuration file ".github/dependabot.yml" not found. Consider adding dependabot to keep dependencies up to date.
|
package/package.json
CHANGED