@iobroker/repochecker 5.19.8 → 5.19.10

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 CHANGED
@@ -25,6 +25,16 @@ Example:
25
25
  Placeholder for the next version (at the beginning of the line):
26
26
  ### **WORK IN PROGRESS**
27
27
  -->
28
+ ### 5.19.10 (2026-07-13)
29
+
30
+ - (mcm1957) Workflow runs older than 90 days now emit a single suggestion instead of one per job log (S3056)
31
+
32
+ ### 5.19.9 (2026-07-12)
33
+
34
+ - (mcm1957) Checker accepst node.js 26 testing now
35
+ - (mcm1957) Missing tests for os raised to error level
36
+ - (mcm1957) Version parsing at changelog has been adapted
37
+
28
38
  ### 5.19.8 (2026-07-04)
29
39
 
30
40
  - (mcm1957) more check for package.json lifecycle scripts
@@ -131,6 +131,25 @@ function formatRunLink(run) {
131
131
  return `[run #${run.run_number}](${run.html_url})`;
132
132
  }
133
133
 
134
+ /**
135
+ * Returns true if the workflow run was created more than 90 days ago.
136
+ * GitHub deletes workflow run logs after 90 days, causing 410 errors on retrieval.
137
+ *
138
+ * @param {object} run - GitHub Actions workflow run object (must have `created_at` field)
139
+ * @returns {boolean} true if the run is older than 90 days
140
+ */
141
+ function isRunOlderThan90Days(run) {
142
+ // console.log(`### checking run ${run.id} + ${run.created_at}`);
143
+
144
+ if (!run || !run.created_at) {
145
+ return false;
146
+ }
147
+ const runDate = new Date(run.created_at);
148
+ const ninetyDaysAgo = new Date();
149
+ ninetyDaysAgo.setDate(ninetyDaysAgo.getDate() - 90);
150
+ return runDate < ninetyDaysAgo;
151
+ }
152
+
134
153
  function getNewestNpmVersion(npmPackageData) {
135
154
  const versions = npmPackageData && npmPackageData.versions ? Object.keys(npmPackageData.versions) : [];
136
155
  if (versions.length === 0) {
@@ -186,32 +205,48 @@ async function checkTagTriggeredRun(context, workflowRuns, version, taggedVersio
186
205
 
187
206
  // Check log content for check-and-lint and adapter-tests jobs
188
207
  try {
208
+ let oldWorkflowRun = false;
209
+ // GitHub deletes workflow logs after 90 days (returns HTTP 410).
210
+ // Instead of emitting one issue per job, emit a single suggestion for the whole run.
211
+ if (isRunOlderThan90Days(tagRun)) {
212
+ oldWorkflowRun = true;
213
+ context.warnings.push(
214
+ `[S3056] "${WORKFLOW_FILE_SHORT}": workflow ${formatRunLink(tagRun)} for ${sourceLabel} is older than 90 days; log files might no longer be available.`,
215
+ );
216
+ }
217
+
189
218
  const runJobs = await fetchRunJobs(context, tagRun.id);
190
219
 
191
220
  // W3050 / S3051: check-and-lint job log
192
221
  const checkAndLintJob = runJobs.find(job => job.name === 'check-and-lint');
193
222
  if (!checkAndLintJob) {
194
223
  context.warnings.push(
195
- `[W3050] "${WORKFLOW_FILE_SHORT}": no "check-and-lint" job found in ${formatRunLink(tagRun)}. ` +
224
+ `[W3050] "${WORKFLOW_FILE_SHORT}": no "check-and-lint" job found in ${formatRunLink(tagRun)} for ${sourceLabel}. ` +
196
225
  `Cannot verify "npm run test:package" output.`,
197
226
  );
198
227
  } else {
199
228
  const checkAndLintLog = await fetchJobLog(context, checkAndLintJob.id);
200
229
  if (!checkAndLintLog) {
201
230
  context.warnings.push(
202
- `[W3050] "${WORKFLOW_FILE_SHORT}": could not retrieve log for "check-and-lint" job in ${formatRunLink(tagRun)}.`,
231
+ `[W3050] "${WORKFLOW_FILE_SHORT}": could not retrieve log for "check-and-lint" job in ${formatRunLink(tagRun)} for ${sourceLabel}.`,
203
232
  );
233
+ } else if (checkAndLintLog === 'Error: 410') {
234
+ if (!oldWorkflowRun) {
235
+ context.warnings.push(
236
+ `[S3054] "${WORKFLOW_FILE_SHORT}": log for "check-and-lint" job in ${formatRunLink(tagRun)} for ${sourceLabel} does no longer exist.`,
237
+ );
238
+ }
204
239
  } else {
205
240
  const missingCheckLines = findMissingExpectedLines(EXPECTED_TEST_PACKAGE_LINES, checkAndLintLog);
206
241
  if (missingCheckLines.length > 0) {
207
242
  context.warnings.push(
208
- `[S3051] "${WORKFLOW_FILE_SHORT}": "testing-action-check" in ${formatRunLink(tagRun)} ` +
243
+ `[W3051] "${WORKFLOW_FILE_SHORT}": "testing-action-check" in ${formatRunLink(tagRun)} for ${sourceLabel} ` +
209
244
  `does not log the expected defaults for "npm run test:package". ` +
210
245
  `Please check the [log](${checkAndLintJob.html_url})`,
211
246
  );
212
247
  if (common.isDebug()) {
213
248
  common.debug(
214
- `[S3051] Missing lines in check-and-lint log (${missingCheckLines.length}):\n${missingCheckLines.map(l => ` - ${l}`).join('\n')}`,
249
+ `[W3051] Missing lines in check-and-lint log (${missingCheckLines.length}):\n${missingCheckLines.map(l => ` - ${l}`).join('\n')}`,
215
250
  );
216
251
  }
217
252
  } else {
@@ -220,45 +255,51 @@ async function checkTagTriggeredRun(context, workflowRuns, version, taggedVersio
220
255
  );
221
256
  }
222
257
  }
223
- }
224
258
 
225
- // W3052 / S3053: adapter-tests job logs
226
- if (!context.cfg.onlyWWW) {
227
- const adapterTestJobs = runJobs.filter(
228
- job => job.name === 'adapter-tests' || job.name.startsWith('adapter-tests ('),
229
- );
230
- if (adapterTestJobs.length === 0) {
231
- context.warnings.push(
232
- `[W3052] "${WORKFLOW_FILE_SHORT}": no "adapter-tests" job found in ${formatRunLink(tagRun)}. ` +
233
- `Cannot verify "npm run test:integration" output.`,
259
+ // W3052 / S3053: adapter-tests job logs
260
+ if (!context.cfg.onlyWWW) {
261
+ const adapterTestJobs = runJobs.filter(
262
+ job => job.name === 'adapter-tests' || job.name.startsWith('adapter-tests ('),
234
263
  );
235
- } else {
236
- for (const adapterJob of adapterTestJobs) {
237
- const adapterLog = await fetchJobLog(context, adapterJob.id);
238
- if (!adapterLog) {
239
- context.warnings.push(
240
- `[W3052] "${WORKFLOW_FILE_SHORT}": could not retrieve log for job "${adapterJob.name}" in ${formatRunLink(tagRun)}.`,
241
- );
242
- } else {
243
- const missingAdapterLines = findMissingExpectedLines(
244
- EXPECTED_TEST_INTEGRATION_LINES,
245
- adapterLog,
246
- );
247
- if (missingAdapterLines.length > 0) {
264
+ if (adapterTestJobs.length === 0) {
265
+ context.warnings.push(
266
+ `[W3052] "${WORKFLOW_FILE_SHORT}": no "adapter-tests" job found in ${formatRunLink(tagRun)} for ${sourceLabel}. ` +
267
+ `Cannot verify "npm run test:integration" output.`,
268
+ );
269
+ } else {
270
+ for (const adapterJob of adapterTestJobs) {
271
+ const adapterLog = await fetchJobLog(context, adapterJob.id);
272
+ if (!adapterLog) {
248
273
  context.warnings.push(
249
- `[S3053] "${WORKFLOW_FILE_SHORT}": "testing-action-adapter" job "${adapterJob.name}" in ${formatRunLink(tagRun)} ` +
250
- `does not log the expected defaults for "npm run test:integration". ` +
251
- `Please check the [log](${adapterJob.html_url}).`,
274
+ `[W3052] "${WORKFLOW_FILE_SHORT}": could not retrieve log for job "${adapterJob.name}" in ${formatRunLink(tagRun)} for ${sourceLabel}.`,
252
275
  );
253
- if (common.isDebug()) {
254
- common.debug(
255
- `[S3053] Missing lines in adapter-tests job "${adapterJob.name}" log (${missingAdapterLines.length}):\n${missingAdapterLines.map(l => ` - ${l}`).join('\n')}`,
276
+ } else if (adapterLog === 'Error: 410') {
277
+ if (!oldWorkflowRun){
278
+ context.warnings.push(
279
+ `[S3055] "${WORKFLOW_FILE_SHORT}": log for "${adapterJob.name}" job in ${formatRunLink(tagRun)} for ${sourceLabel} does no longer exist.`,
256
280
  );
257
281
  }
258
282
  } else {
259
- context.checks.push(
260
- `Job "${adapterJob.name}" log contains expected "npm run test:integration" output in ${formatRunLink(tagRun)}.`,
283
+ const missingAdapterLines = findMissingExpectedLines(
284
+ EXPECTED_TEST_INTEGRATION_LINES,
285
+ adapterLog,
261
286
  );
287
+ if (missingAdapterLines.length > 0) {
288
+ context.warnings.push(
289
+ `[W3053] "${WORKFLOW_FILE_SHORT}": "testing-action-adapter" job "${adapterJob.name}" in ${formatRunLink(tagRun)} for ${sourceLabel} ` +
290
+ `does not log the expected defaults for "npm run test:integration". ` +
291
+ `Please check the [log](${adapterJob.html_url}).`,
292
+ );
293
+ if (common.isDebug()) {
294
+ common.debug(
295
+ `[W3053] Missing lines in adapter-tests job "${adapterJob.name}" log (${missingAdapterLines.length}):\n${missingAdapterLines.map(l => ` - ${l}`).join('\n')}`,
296
+ );
297
+ }
298
+ } else {
299
+ context.checks.push(
300
+ `Job "${adapterJob.name}" log contains expected "npm run test:integration" output in ${formatRunLink(tagRun)}.`,
301
+ );
302
+ }
262
303
  }
263
304
  }
264
305
  }
@@ -737,11 +778,18 @@ async function fetchRunJobs(context, runId) {
737
778
  async function fetchJobLog(context, jobId) {
738
779
  const url = `${context.githubUrlApi}/actions/jobs/${jobId}/logs`;
739
780
  try {
781
+ // console.log('###############');
782
+ // console.log(url);
740
783
  common.debug(`Fetching log for job ${jobId}`);
741
784
  const response = await axios.get(url, { maxRedirects: 10, responseType: 'text' });
785
+ // console.log( response );
742
786
  return typeof response.data === 'string' ? response.data : null;
743
787
  } catch (e) {
788
+ // console.log(`Could not fetch log for job ${jobId}: ${e.code} ${e.status} - ${e.message}`);
744
789
  common.debug(`Could not fetch log for job ${jobId}: ${e.message}`);
790
+ if (e.status === 410) {
791
+ return 'Error: 410';
792
+ }
745
793
  return null;
746
794
  }
747
795
  }
@@ -957,21 +1005,37 @@ async function checkTests(context) {
957
1005
 
958
1006
  // Check log content for check-and-lint and adapter-tests jobs
959
1007
  try {
1008
+ let oldWorkflowRun = false;
1009
+ // GitHub deletes workflow logs after 90 days (returns HTTP 410).
1010
+ // Instead of emitting one issue per job, emit a single suggestion for the whole run.
1011
+ if (isRunOlderThan90Days(lastRun)) {
1012
+ context.warnings.push(
1013
+ `[S3056] "${WORKFLOW_FILE_SHORT}": workflow ${formatRunLink(lastRun)} on branch "${defaultBranch}" is older than 90 days; log files are no longer available.`,
1014
+ );
1015
+ oldWorkflowRun = true;
1016
+ }
1017
+
960
1018
  const runJobs = await fetchRunJobs(context, lastRun.id);
961
1019
 
962
1020
  // W3050 / S3051: check-and-lint job log
963
1021
  const checkAndLintJob = runJobs.find(job => job.name === 'check-and-lint');
964
1022
  if (!checkAndLintJob) {
965
1023
  context.warnings.push(
966
- `[W3050] "${WORKFLOW_FILE_SHORT}": no "check-and-lint" job found in ${formatRunLink(lastRun)}. ` +
1024
+ `[W3050] "${WORKFLOW_FILE_SHORT}": no "check-and-lint" job found in ${formatRunLink(lastRun)} on branch "${defaultBranch}". ` +
967
1025
  `Cannot verify "npm run test:package" output.`,
968
1026
  );
969
1027
  } else {
970
1028
  const checkAndLintLog = await fetchJobLog(context, checkAndLintJob.id);
971
1029
  if (!checkAndLintLog) {
972
1030
  context.warnings.push(
973
- `[W3050] "${WORKFLOW_FILE_SHORT}": could not retrieve log for "check-and-lint" job in ${formatRunLink(lastRun)}.`,
1031
+ `[W3050] "${WORKFLOW_FILE_SHORT}": could not retrieve log for "check-and-lint" job in ${formatRunLink(lastRun)} on branch "${defaultBranch}".`,
974
1032
  );
1033
+ } else if (checkAndLintLog === 'Error: 410') {
1034
+ if (!oldWorkflowRun) {
1035
+ context.warnings.push(
1036
+ `[S3054] "${WORKFLOW_FILE_SHORT}": log for "check-and-lint" job in ${formatRunLink(lastRun)} on branch "${defaultBranch}" does no longer exist.`,
1037
+ );
1038
+ }
975
1039
  } else {
976
1040
  const missingCheckLines = findMissingExpectedLines(
977
1041
  EXPECTED_TEST_PACKAGE_LINES,
@@ -979,18 +1043,18 @@ async function checkTests(context) {
979
1043
  );
980
1044
  if (missingCheckLines.length > 0) {
981
1045
  context.warnings.push(
982
- `[S3051] "${WORKFLOW_FILE_SHORT}": "testing-action-check" in ${formatRunLink(lastRun)} ` +
1046
+ `[W3051] "${WORKFLOW_FILE_SHORT}": "testing-action-check" in ${formatRunLink(lastRun)} on branch "${defaultBranch}"` +
983
1047
  `does not log the expected defaults for "npm run test:package". ` +
984
1048
  `Please check the [log](${checkAndLintJob.html_url}),`,
985
1049
  );
986
1050
  if (common.isDebug()) {
987
1051
  common.debug(
988
- `[S3051] Missing lines in check-and-lint log (${missingCheckLines.length}):\n${missingCheckLines.map(l => ` - ${l}`).join('\n')}`,
1052
+ `[W3051] Missing lines in check-and-lint log (${missingCheckLines.length}):\n${missingCheckLines.map(l => ` - ${l}`).join('\n')}`,
989
1053
  );
990
1054
  }
991
1055
  } else {
992
1056
  context.checks.push(
993
- `Job "check-and-lint" log contains expected "npm run test:package" output in ${formatRunLink(lastRun)}.`,
1057
+ `Job "check-and-lint" log contains expected "npm run test:package" output in ${formatRunLink(lastRun)} on branch "${defaultBranch}".`,
994
1058
  );
995
1059
  }
996
1060
  }
@@ -1003,7 +1067,7 @@ async function checkTests(context) {
1003
1067
  );
1004
1068
  if (adapterTestJobs.length === 0) {
1005
1069
  context.warnings.push(
1006
- `[W3052] "${WORKFLOW_FILE_SHORT}": no "adapter-tests" job found in ${formatRunLink(lastRun)}. ` +
1070
+ `[W3052] "${WORKFLOW_FILE_SHORT}": no "adapter-tests" job found in ${formatRunLink(lastRun)} on branch "${defaultBranch}". ` +
1007
1071
  `Cannot verify "npm run test:integration" output.`,
1008
1072
  );
1009
1073
  } else {
@@ -1011,8 +1075,14 @@ async function checkTests(context) {
1011
1075
  const adapterLog = await fetchJobLog(context, adapterJob.id);
1012
1076
  if (!adapterLog) {
1013
1077
  context.warnings.push(
1014
- `[W3052] "${WORKFLOW_FILE_SHORT}": could not retrieve log for job "${adapterJob.name}" in ${formatRunLink(lastRun)}.`,
1078
+ `[W3052] "${WORKFLOW_FILE_SHORT}": could not retrieve log for job "${adapterJob.name}" in ${formatRunLink(lastRun)} on branch "${defaultBranch}".`,
1015
1079
  );
1080
+ } else if (adapterLog === 'Error: 410') {
1081
+ if (!oldWorkflowRun) {
1082
+ context.warnings.push(
1083
+ `[S3055] "${WORKFLOW_FILE_SHORT}": log for "${adapterJob.name}" job in ${formatRunLink(lastRun)} on branch "${defaultBranch}" does no longer exist.`,
1084
+ );
1085
+ }
1016
1086
  } else {
1017
1087
  const missingAdapterLines = findMissingExpectedLines(
1018
1088
  EXPECTED_TEST_INTEGRATION_LINES,
@@ -1020,18 +1090,18 @@ async function checkTests(context) {
1020
1090
  );
1021
1091
  if (missingAdapterLines.length > 0) {
1022
1092
  context.warnings.push(
1023
- `[S3053] "${WORKFLOW_FILE_SHORT}": "testing-action-adapter" job "${adapterJob.name}" in ${formatRunLink(lastRun)} ` +
1093
+ `[W3053] "${WORKFLOW_FILE_SHORT}": "testing-action-adapter" job "${adapterJob.name}" in ${formatRunLink(lastRun)} on branch "${defaultBranch}" ` +
1024
1094
  `does not log the expected defaults for "npm run test:integration". ` +
1025
1095
  `Please check the [log](${adapterJob.html_url}).`,
1026
1096
  );
1027
1097
  if (common.isDebug()) {
1028
1098
  common.debug(
1029
- `[S3053] Missing lines in adapter-tests job "${adapterJob.name}" log (${missingAdapterLines.length}):\n${missingAdapterLines.map(l => ` - ${l}`).join('\n')}`,
1099
+ `[W3053] Missing lines in adapter-tests job "${adapterJob.name}" log (${missingAdapterLines.length}):\n${missingAdapterLines.map(l => ` - ${l}`).join('\n')}`,
1030
1100
  );
1031
1101
  }
1032
1102
  } else {
1033
1103
  context.checks.push(
1034
- `Job "${adapterJob.name}" log contains expected "npm run test:integration" output in ${formatRunLink(lastRun)}.`,
1104
+ `Job "${adapterJob.name}" log contains expected "npm run test:integration" output in ${formatRunLink(lastRun)} on branch "${defaultBranch}".`,
1035
1105
  );
1036
1106
  }
1037
1107
  }
@@ -1444,8 +1514,8 @@ async function checkTests(context) {
1444
1514
 
1445
1515
  const uncoveredMissingSystems = missingSystems.filter(system => allowedSystems.has(system));
1446
1516
  if (uncoveredMissingSystems.length > 0) {
1447
- context.warnings.push(
1448
- `[W3027] "${WORKFLOW_FILE_SHORT}": testing for OS ${uncoveredMissingSystems.join(', ')} is missing in job "adapter-tests". ` +
1517
+ context.errors.push(
1518
+ `[E3027] "${WORKFLOW_FILE_SHORT}": testing for OS ${uncoveredMissingSystems.join(', ')} is missing in job "adapter-tests". ` +
1449
1519
  `Add corresponding tests to "${WORKFLOW_FILE_SHORT}" or adapt package.json "os" accordingly.`,
1450
1520
  );
1451
1521
  } else {
@@ -1632,3 +1702,6 @@ exports.checkTests = checkTests;
1632
1702
  // [S3051] "${WORKFLOW_FILE_SHORT}": output of "testing-action-check" does not match expected defaults. Please check the log manually.
1633
1703
  // [W3052] "${WORKFLOW_FILE_SHORT}": no "adapter-tests" job / log found in the latest run. Cannot verify "npm run test:integration" output.
1634
1704
  // [S3053] "${WORKFLOW_FILE_SHORT}": output of "testing-action-adapter" does not match expected defaults. Please check the log manually.
1705
+ // [S3054] "${WORKFLOW_FILE_SHORT}": log for "check-and-lint" job in ${formatRunLink(tagRun)} for ${sourceLabel} does no longer exist.`,
1706
+ // [S3055] "${WORKFLOW_FILE_SHORT}": log for "${adapterJob.name}" job in ${formatRunLink(tagRun)} for ${sourceLabel} does no longer exist.`,
1707
+ // [S3056] "${WORKFLOW_FILE_SHORT}": workflow ${formatRunLink(run)} for ${sourceLabel} is older than 90 days; log files are no longer available.
@@ -408,7 +408,7 @@ async function checkReadme(context) {
408
408
  context.checks.push('README.md changelog contains "###" entries');
409
409
  const invalidVersionHeaders = [];
410
410
  for (const header of changelogHeaders) {
411
- const match = /^(\d+\.\d+\.\d+(-\w+\.\d+)?)(?:\s+.*)?$/.exec(header);
411
+ const match = /^(\d+\.\d+\.\d+(-\w+(\.\d+)?)?)(?:\s+.*)?$/.exec(header);
412
412
  if (!match) {
413
413
  if (
414
414
  !header.includes('WORK IN PROGRESS') &&
package/lib/config.js CHANGED
@@ -436,12 +436,13 @@ const testingNodeJs = {
436
436
 
437
437
  // Node.js version requirements for non-matrix jobs
438
438
  minimumNodeVersionCheckAndLint: '22',
439
- recommendedNodeVersionCheckAndLint: '24',
439
+ recommendedNodeVersionCheckAndLint: '',
440
440
  minimumNodeVersionDeploy: '24',
441
441
  recommendedNodeVersionDeploy: '24',
442
442
 
443
443
  // Node.js versions for the adapter-tests matrix
444
- validMatrixNodeVersions: ['20', '22', '24'], // valid versions to use in testing matrix
444
+ // older versions disallowed by engines clause are removed automatically
445
+ validMatrixNodeVersions: ['20', '22', '24', '26', '27'], // valid versions to use in testing matrix
445
446
  requiredMatrixNodeVersions: ['20', '22', '24'], // versions that MUST be present in testing matrix
446
447
  recommendedMatrixNodeVersions: ['20', '22', '24'], // recommended versions that SHOULD be added to testing matrix
447
448
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.19.8",
2
+ "version": "5.19.10",
3
3
  "name": "@iobroker/repochecker",
4
4
  "dependencies": {
5
5
  "ajv": "^8.20.0",