@iobroker/repochecker 5.3.0 → 5.3.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 +3 -0
- package/index.js +18 -19
- package/lib/M0000_PackageJson.js +1 -1
- package/lib/M3000_Testing.js +27 -14
- package/lib/M8900__Dependabot.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,6 +25,9 @@ Example:
|
|
|
25
25
|
Placeholder for the next version (at the beginning of the line):
|
|
26
26
|
### **WORK IN PROGRESS**
|
|
27
27
|
-->
|
|
28
|
+
### 5.3.2 (2026-03-11)
|
|
29
|
+
- (@copilot) OnlyWWW adapters no longer require testing dependencies or adapter test workflows (skips E3000, E3011, and W3015 checks for adapters with `common.onlyWWW = true`).
|
|
30
|
+
|
|
28
31
|
### 5.3.0 (2026-03-11)
|
|
29
32
|
- (@copilot) Added validation for dependabot configuration: checks for required ecosystems (github-actions, npm), schedule settings, open-pull-requests-limit, and automerge workflow configuration (checks S8901–S8914).
|
|
30
33
|
- (@copilot) Extended W5034 check to also warn when `.ts` and `.js`/`.cjs`/`.mjs` versions of the same file exist in the same directory.
|
package/index.js
CHANGED
|
@@ -307,29 +307,28 @@ if (typeof module !== 'undefined' && module.parent) {
|
|
|
307
307
|
} else {
|
|
308
308
|
console.log('\n\nNO errors encountered.');
|
|
309
309
|
}
|
|
310
|
-
if (context.warnings.length) {
|
|
310
|
+
if (context.warnings.filter(txt => txt.startsWith('[W')).length) {
|
|
311
311
|
console.log('\nWarnings:');
|
|
312
|
-
context.warnings
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
// //}
|
|
319
|
-
// if (issues[issue].explanation) {
|
|
320
|
-
// console.warn(getText(issues[issue].explanation, 'en'));
|
|
321
|
-
// }
|
|
322
|
-
// if (issues[issue].resolving) {
|
|
323
|
-
// console.warn(getText(issues[issue].resolving, 'en'));
|
|
324
|
-
// }
|
|
325
|
-
// if (issues[issue].notes) {
|
|
326
|
-
// console.warn(getText(issues[issue].notes, 'en'));
|
|
327
|
-
// }
|
|
328
|
-
// }
|
|
329
|
-
});
|
|
312
|
+
context.warnings
|
|
313
|
+
.filter(txt => txt.startsWith('[W'))
|
|
314
|
+
.sort()
|
|
315
|
+
.forEach(err => {
|
|
316
|
+
console.warn(err);
|
|
317
|
+
});
|
|
330
318
|
} else {
|
|
331
319
|
console.log('\n\nNO warnings encountered.');
|
|
332
320
|
}
|
|
321
|
+
if (context.warnings.filter(txt => txt.startsWith('[S')).length) {
|
|
322
|
+
console.log('\nSuggestionss:');
|
|
323
|
+
context.warnings
|
|
324
|
+
.filter(txt => txt.startsWith('[S'))
|
|
325
|
+
.sort()
|
|
326
|
+
.forEach(err => {
|
|
327
|
+
console.warn(err);
|
|
328
|
+
});
|
|
329
|
+
} else {
|
|
330
|
+
console.log('\n\nNO suggestions encountered.');
|
|
331
|
+
}
|
|
333
332
|
console.log(`\ncreated by repochecker ${context.version} based on commit ${context.lastCommitSha}`);
|
|
334
333
|
},
|
|
335
334
|
);
|
package/lib/M0000_PackageJson.js
CHANGED
|
@@ -1094,7 +1094,7 @@ async function checkPackageJson(context) {
|
|
|
1094
1094
|
} else if (optional) {
|
|
1095
1095
|
context.checks.push(`devDependency ${dependency} is optional`);
|
|
1096
1096
|
if (suggested) {
|
|
1097
|
-
context.warnings.push(`[S0062] Consider
|
|
1097
|
+
context.warnings.push(`[S0062] Consider adding package "${dependency}".`);
|
|
1098
1098
|
}
|
|
1099
1099
|
} else {
|
|
1100
1100
|
context.errors.push(
|
package/lib/M3000_Testing.js
CHANGED
|
@@ -70,15 +70,16 @@ async function checkTests(context) {
|
|
|
70
70
|
const hasLegacyTesting = Object.prototype.hasOwnProperty.call(devDeps, '@iobroker/legacy-testing');
|
|
71
71
|
|
|
72
72
|
if (!hasTesting && !hasLegacyTesting) {
|
|
73
|
-
context.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
if (!context.cfg.onlyWWW) {
|
|
74
|
+
context.errors.push(
|
|
75
|
+
'[E3000] Neither "@iobroker/testing" nor "@iobroker/legacy-testing" is listed as a devDependency in package.json. Please add one of them.',
|
|
76
|
+
);
|
|
77
|
+
} else {
|
|
78
|
+
context.checks.push('Testing devDependency check skipped (onlyWWW adapter).');
|
|
79
|
+
}
|
|
78
80
|
}
|
|
79
|
-
context.checks.push('Testing devDependency found in package.json.');
|
|
80
81
|
|
|
81
|
-
if (
|
|
82
|
+
if (!hasTesting && hasLegacyTesting) {
|
|
82
83
|
context.warnings.push(
|
|
83
84
|
'[S3001] "@iobroker/legacy-testing" is used. Consider migrating to "@iobroker/testing" for better support.',
|
|
84
85
|
);
|
|
@@ -129,7 +130,7 @@ async function checkTests(context) {
|
|
|
129
130
|
// --- W3004: check workflow name ---
|
|
130
131
|
if (workflow.name !== 'Test and Release') {
|
|
131
132
|
context.warnings.push(
|
|
132
|
-
`[W3004] Workflow "name" in "${WORKFLOW_FILE}"
|
|
133
|
+
`[W3004] Workflow "name" in "${WORKFLOW_FILE}" must be "Test and Release" (found: "${workflow.name || '(not set)'}" ).`,
|
|
133
134
|
);
|
|
134
135
|
} else {
|
|
135
136
|
context.checks.push('Workflow name is "Test and Release".');
|
|
@@ -179,7 +180,7 @@ async function checkTests(context) {
|
|
|
179
180
|
}
|
|
180
181
|
|
|
181
182
|
// E3008: check push tags
|
|
182
|
-
const tags = pushConfig.tags;
|
|
183
|
+
const tags = pushConfig.tags.map( tag => tag.replaceAll('v?', 'v'));
|
|
183
184
|
const requiredTagPatterns = ['v[0-9]+.[0-9]+.[0-9]+', 'v[0-9]+.[0-9]+.[0-9]+-**'];
|
|
184
185
|
if (!tags || !Array.isArray(tags)) {
|
|
185
186
|
context.errors.push(
|
|
@@ -216,7 +217,15 @@ async function checkTests(context) {
|
|
|
216
217
|
|
|
217
218
|
// E3010: check-and-lint job
|
|
218
219
|
if (!jobs['check-and-lint']) {
|
|
219
|
-
context.
|
|
220
|
+
if (!context.cfg.onlyWWW) {
|
|
221
|
+
context.errors.push(
|
|
222
|
+
`[E3010] Workflow "${WORKFLOW_FILE}": job "check-and-lint" is missing. Please add it.`,
|
|
223
|
+
);
|
|
224
|
+
} else {
|
|
225
|
+
context.errors.push(
|
|
226
|
+
`[S3010] Workflow "${WORKFLOW_FILE}": job "check-and-lint" is missing. Consider adding it.`,
|
|
227
|
+
);
|
|
228
|
+
}
|
|
220
229
|
} else {
|
|
221
230
|
context.checks.push('Job "check-and-lint" found.');
|
|
222
231
|
|
|
@@ -231,7 +240,9 @@ async function checkTests(context) {
|
|
|
231
240
|
}
|
|
232
241
|
|
|
233
242
|
// E3011: adapter-tests job
|
|
234
|
-
if (
|
|
243
|
+
if (context.cfg.onlyWWW) {
|
|
244
|
+
context.checks.push('Job "adapter-tests" check skipped (onlyWWW adapter).');
|
|
245
|
+
} else if (!jobs['adapter-tests']) {
|
|
235
246
|
context.errors.push(`[E3011] Workflow "${WORKFLOW_FILE}": job "adapter-tests" is missing. Please add it.`);
|
|
236
247
|
} else {
|
|
237
248
|
context.checks.push('Job "adapter-tests" found.');
|
|
@@ -263,13 +274,15 @@ async function checkTests(context) {
|
|
|
263
274
|
} else {
|
|
264
275
|
context.checks.push('Job "deploy" found.');
|
|
265
276
|
|
|
266
|
-
// E3016: deploy must need check-and-lint and adapter-tests
|
|
267
|
-
|
|
277
|
+
// E3016: deploy must need check-and-lint and adapter-tests (adapter-tests not required for onlyWWW)
|
|
278
|
+
const otherJobs = Object.keys(jobs).filter(job => job != 'deploy');
|
|
279
|
+
console.log(`DEBUG: jobs = ${JSON.stringify(otherJobs)}`)
|
|
280
|
+
if (!jobNeedsAll(jobs['deploy'], otherJobs)) {
|
|
268
281
|
context.errors.push(
|
|
269
282
|
`[E3016] Workflow "${WORKFLOW_FILE}": job "deploy" must declare "needs" for both "check-and-lint" and "adapter-tests".`,
|
|
270
283
|
);
|
|
271
284
|
} else {
|
|
272
|
-
context.checks.push('Job "deploy" correctly requires "check-and-lint"
|
|
285
|
+
context.checks.push('Job "deploy" correctly requires "check-and-lint" jobsand "adapter-tests".');
|
|
273
286
|
}
|
|
274
287
|
|
|
275
288
|
// W3017: deploy must use ioBroker/testing-action-deploy@v1
|
package/lib/M8900__Dependabot.js
CHANGED
|
@@ -44,7 +44,7 @@ async function checkAutomerge(context) {
|
|
|
44
44
|
if (!automergeConfigured) {
|
|
45
45
|
// S8913: Suggest to set up automerging
|
|
46
46
|
context.warnings.push(
|
|
47
|
-
`[S8913] No automerge workflow found. Consider setting up automerging by adding ".github/workflows/automerge-dependabot.yml".`,
|
|
47
|
+
`[S8913] No automerge workflow for dependabot PRs found. Consider setting up automerging by adding ".github/workflows/automerge-dependabot.yml".`,
|
|
48
48
|
);
|
|
49
49
|
return;
|
|
50
50
|
}
|
package/package.json
CHANGED