@iobroker/repochecker 4.2.0-alpha.4 → 4.2.0-alpha.5
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 +1 -1
- package/lib/M100_IOPackageJson.js +5 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.javascript --loca
|
|
|
33
33
|
-->
|
|
34
34
|
|
|
35
35
|
## Changelog
|
|
36
|
-
### 4.2.0-alpha.
|
|
36
|
+
### 4.2.0-alpha.5 (2025-09-15)
|
|
37
37
|
- (copilot) Added io-package.json schema validation against official schema (W205, W207, W208) [#503].
|
|
38
38
|
- (copilot) Added check for deprecated adapter methods (createState/createChannel/createDevice/deleteState/deleteChannel/deleteDevice) (W533) [#182].
|
|
39
39
|
- (copilot) Added check for outdated lib/tools.js file usage (W532) [#432].
|
|
@@ -108,13 +108,14 @@ async function validateIOPackageSchema(context) {
|
|
|
108
108
|
|
|
109
109
|
const schemaData = await common.downloadURL(schemaUrl, false);
|
|
110
110
|
if (!schemaData) {
|
|
111
|
-
context.warnings.push('[W207] Could not download io-package.json
|
|
111
|
+
context.warnings.push('[W207] Could not download ${schemaUrl} for validation of io-package.json');
|
|
112
112
|
return context;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
const schema = JSON.parse(schemaData);
|
|
116
116
|
|
|
117
117
|
// Initialize AJV validator
|
|
118
|
+
// @ts-expect-error not constructable - but working
|
|
118
119
|
const ajv = new Ajv({ allErrors: true, verbose: true });
|
|
119
120
|
const validate = ajv.compile(schema);
|
|
120
121
|
|
|
@@ -128,7 +129,7 @@ async function validateIOPackageSchema(context) {
|
|
|
128
129
|
if (validate.errors) {
|
|
129
130
|
for (const error of validate.errors) {
|
|
130
131
|
common.debug(`Schema validation error block:\n ${JSON.stringify(error)}`);
|
|
131
|
-
|
|
132
|
+
|
|
132
133
|
const path = error.instancePath || 'root';
|
|
133
134
|
const message = error.message;
|
|
134
135
|
|
|
@@ -146,7 +147,7 @@ async function validateIOPackageSchema(context) {
|
|
|
146
147
|
errorMsg = `Property "${path}" ${message}`;
|
|
147
148
|
}
|
|
148
149
|
|
|
149
|
-
context.warnings.push(`[W205]
|
|
150
|
+
context.warnings.push(`[W205] io-package.json schema validation error: ${errorMsg}`);
|
|
150
151
|
}
|
|
151
152
|
} else {
|
|
152
153
|
context.warnings.push('[W205] io-package.json does not validate against schema');
|
|
@@ -154,7 +155,7 @@ async function validateIOPackageSchema(context) {
|
|
|
154
155
|
}
|
|
155
156
|
} catch (error) {
|
|
156
157
|
common.debug(`Schema validation error: ${error.message}`);
|
|
157
|
-
context.warnings.push(`[W208]
|
|
158
|
+
context.warnings.push(`[W208] io-package.json schema validation failed: ${error.message}`);
|
|
158
159
|
}
|
|
159
160
|
|
|
160
161
|
return context;
|
package/package.json
CHANGED