@iobroker/repochecker 5.17.3 → 5.17.4
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 +4 -0
- package/lib/M0000_PackageJson.js +2 -2
- package/lib/M3000_Testing.js +36 -15
- package/lib/postprocessing.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,6 +25,10 @@ Example:
|
|
|
25
25
|
Placeholder for the next version (at the beginning of the line):
|
|
26
26
|
### **WORK IN PROGRESS**
|
|
27
27
|
-->
|
|
28
|
+
### 5.17.4 (2026-05-31)
|
|
29
|
+
|
|
30
|
+
- (mcm1957) default value for engines corrected.
|
|
31
|
+
|
|
28
32
|
### 5.17.3 (2026-05-30)
|
|
29
33
|
|
|
30
34
|
- (mcm1957) exclude 'scripts' directory from scanning
|
package/lib/M0000_PackageJson.js
CHANGED
|
@@ -572,7 +572,7 @@ async function checkNpmDependencyUpdateSuggestions(context) {
|
|
|
572
572
|
const dayLabel = packageAgeDays === 1 ? 'day' : 'days';
|
|
573
573
|
const issueCode = updateRule.level === 'W' ? 'W0083' : 'S0082';
|
|
574
574
|
context.warnings.push(
|
|
575
|
-
`[${issueCode}]
|
|
575
|
+
`[${issueCode}] A newer version (${latestVersion}) for package "${packageName}" (${sourceType}) exists for ${packageAgeDays} ${dayLabel}. Please evaluate if upgrading from ${packageVersion} to ${latestVersion} is possible.`,
|
|
576
576
|
);
|
|
577
577
|
} catch (e) {
|
|
578
578
|
common.debug(
|
|
@@ -1203,7 +1203,7 @@ async function checkPackageJson(context) {
|
|
|
1203
1203
|
|
|
1204
1204
|
// Default to Node.js 20 if no engines clause was found for non-WWW adapters
|
|
1205
1205
|
if (minimumNodeJsSupported === null && !context.cfg.onlyWWW) {
|
|
1206
|
-
minimumNodeJsSupported = '20';
|
|
1206
|
+
minimumNodeJsSupported = '20.0.0'; // ensure valid semver
|
|
1207
1207
|
}
|
|
1208
1208
|
|
|
1209
1209
|
// Apply conditional requirements based on dependencies present in package.json
|
package/lib/M3000_Testing.js
CHANGED
|
@@ -61,6 +61,7 @@ function findTagTriggeredRun(workflowRuns, version, taggedVersion) {
|
|
|
61
61
|
return null;
|
|
62
62
|
}
|
|
63
63
|
const branchCandidates = new Set([taggedVersion, ...getVersionTagCandidates(version)]);
|
|
64
|
+
common.debug(`findTagTriggeredRun - condidates: ${JSON.stringify(branchCandidates)}`);
|
|
64
65
|
return (
|
|
65
66
|
workflowRuns.find(
|
|
66
67
|
run => run.event === 'push' && run.head_branch && branchCandidates.has(run.head_branch) && run.html_url,
|
|
@@ -72,7 +73,7 @@ function checkTagTriggeredRun(context, workflowRuns, version, taggedVersion, cod
|
|
|
72
73
|
const tagRun = findTagTriggeredRun(workflowRuns, version, taggedVersion);
|
|
73
74
|
if (!tagRun) {
|
|
74
75
|
context.warnings.push(
|
|
75
|
-
`[S${codeBase}] No workflow run for "${WORKFLOW_FILE_SHORT}" triggered by tag "${taggedVersion}" was found for ${sourceLabel}. ` +
|
|
76
|
+
`[S${codeBase}] Just for Info: No workflow run for "${WORKFLOW_FILE_SHORT}" triggered by tag "${taggedVersion}" was found for ${sourceLabel}. ` +
|
|
76
77
|
`Workflow logs might be deleted already.`,
|
|
77
78
|
);
|
|
78
79
|
return;
|
|
@@ -599,10 +600,11 @@ async function checkTests(context) {
|
|
|
599
600
|
|
|
600
601
|
// --- check runs ---
|
|
601
602
|
try {
|
|
602
|
-
const defaultBranch = context.branch || 'main';
|
|
603
|
-
const
|
|
604
|
-
|
|
605
|
-
);
|
|
603
|
+
const defaultBranch = context.branch || 'main';
|
|
604
|
+
//const url = `${context.githubUrlApi}/actions/workflows/${WORKFLOW_FILE_SHORT}/runs?per_page=100&branch=${encodeURIComponent(defaultBranch)}`;
|
|
605
|
+
const url = `${context.githubUrlApi}/actions/workflows/${WORKFLOW_FILE_SHORT}/runs?per_page=100}`;
|
|
606
|
+
common.debug(`Retrieving list of workflow runs from url ${url}`);
|
|
607
|
+
const workflowRunsResponse = await axios(url);
|
|
606
608
|
const workflowRuns = workflowRunsResponse.data && workflowRunsResponse.data.workflow_runs;
|
|
607
609
|
if (!Array.isArray(workflowRuns) || workflowRuns.length === 0) {
|
|
608
610
|
const workflowUrl = `${context.githubUrlOriginal}/actions/workflows/${WORKFLOW_FILE_SHORT}`;
|
|
@@ -610,19 +612,27 @@ async function checkTests(context) {
|
|
|
610
612
|
`[W3031] No workflow runs found for "${WORKFLOW_FILE_SHORT}". Please check [${workflowUrl}](${workflowUrl}).`,
|
|
611
613
|
);
|
|
612
614
|
} else {
|
|
613
|
-
const
|
|
614
|
-
if (
|
|
615
|
+
const defaultBranchRuns = workflowRuns.filter(run => run.head_branch === defaultBranch);
|
|
616
|
+
if (!Array.isArray(defaultBranchRuns) || defaultBranchRuns.length === 0) {
|
|
617
|
+
const workflowUrl = `${context.githubUrlOriginal}/actions/workflows/${WORKFLOW_FILE_SHORT}`;
|
|
615
618
|
context.warnings.push(
|
|
616
|
-
`[
|
|
617
|
-
);
|
|
618
|
-
} else if (lastRun.conclusion === 'failure') {
|
|
619
|
-
context.errors.push(
|
|
620
|
-
`[E3031] Latest workflow run of "${WORKFLOW_FILE_SHORT}" on branch "${defaultBranch}" failed ${formatRunLink(lastRun)}.`,
|
|
619
|
+
`[W3031] No workflow runs found for "${WORKFLOW_FILE_SHORT}" and branch "${defaultBranch}". Please check [${workflowUrl}](${workflowUrl}).`,
|
|
621
620
|
);
|
|
622
621
|
} else {
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
622
|
+
const lastRun = defaultBranchRuns[0];
|
|
623
|
+
if (lastRun.conclusion === 'cancelled') {
|
|
624
|
+
context.warnings.push(
|
|
625
|
+
`[W3041] Latest workflow run of "${WORKFLOW_FILE_SHORT}" on branch "${defaultBranch}" was cancelled ${formatRunLink(lastRun)}.`,
|
|
626
|
+
);
|
|
627
|
+
} else if (lastRun.conclusion === 'failure') {
|
|
628
|
+
context.errors.push(
|
|
629
|
+
`[E3031] Latest workflow run of "${WORKFLOW_FILE_SHORT}" on branch "${defaultBranch}" failed ${formatRunLink(lastRun)}.`,
|
|
630
|
+
);
|
|
631
|
+
} else {
|
|
632
|
+
context.checks.push(
|
|
633
|
+
`Latest workflow run of "${WORKFLOW_FILE_SHORT}" on branch "${defaultBranch}" finished with conclusion "${lastRun.conclusion}" ${formatRunLink(lastRun)}.`,
|
|
634
|
+
);
|
|
635
|
+
}
|
|
626
636
|
}
|
|
627
637
|
|
|
628
638
|
const tagsResponse = await axios(`${context.githubUrlApi}/tags?per_page=100`);
|
|
@@ -715,19 +725,23 @@ async function checkTests(context) {
|
|
|
715
725
|
// skip detailled tests if adapter uses legacy testing
|
|
716
726
|
if (!hasLegacyTesting) {
|
|
717
727
|
// --- Check jobs ---
|
|
728
|
+
common.debug('testing jobs');
|
|
718
729
|
const jobs = workflow.jobs || {};
|
|
719
730
|
|
|
720
731
|
// Compute effective minimum and recommended node.js versions per non-matrix job.
|
|
721
732
|
// If the engines:node clause in package.json is higher than the config defaults, use that value.
|
|
722
733
|
const testingCfg = config.testingNodeJs;
|
|
734
|
+
common.debug(` testingCfg: ${JSON.stringify(testingCfg)}`);
|
|
723
735
|
let effectiveMinCheckAndLint = parseInt(testingCfg.minimumNodeVersionCheckAndLint, 10);
|
|
724
736
|
let effectiveRecCheckAndLint = parseInt(testingCfg.recommendedNodeVersionCheckAndLint, 10);
|
|
725
737
|
let effectiveMinDeploy = parseInt(testingCfg.minimumNodeVersionDeploy, 10);
|
|
726
738
|
let effectiveRecDeploy = parseInt(testingCfg.recommendedNodeVersionDeploy, 10);
|
|
727
739
|
let enginesMajor = 0;
|
|
728
740
|
const minimumNodeJsSupported = context.minimumNodeJsSupported;
|
|
741
|
+
common.debug(` minimumNodeJsSupported: ${minimumNodeJsSupported}`);
|
|
729
742
|
if (minimumNodeJsSupported) {
|
|
730
743
|
enginesMajor = semverMajor(minimumNodeJsSupported);
|
|
744
|
+
common.debug(` enginesMajor: ${enginesMajor}`);
|
|
731
745
|
if (enginesMajor > effectiveMinCheckAndLint) {
|
|
732
746
|
effectiveMinCheckAndLint = enginesMajor;
|
|
733
747
|
}
|
|
@@ -744,6 +758,7 @@ async function checkTests(context) {
|
|
|
744
758
|
|
|
745
759
|
// E3010: check-and-lint job
|
|
746
760
|
if (!jobs['check-and-lint']) {
|
|
761
|
+
common.debug(' job check-and-lint not found');
|
|
747
762
|
if (!context.cfg.onlyWWW) {
|
|
748
763
|
context.errors.push(
|
|
749
764
|
`[E3010] Workflow "${WORKFLOW_FILE_SHORT}": job "check-and-lint" is missing. Please add it.`,
|
|
@@ -754,6 +769,7 @@ async function checkTests(context) {
|
|
|
754
769
|
);
|
|
755
770
|
}
|
|
756
771
|
} else {
|
|
772
|
+
common.debug(' job check-and-lint found');
|
|
757
773
|
context.checks.push('Job "check-and-lint" found.');
|
|
758
774
|
|
|
759
775
|
// W3013: check-and-lint must use ioBroker/testing-action-check@v1
|
|
@@ -824,12 +840,15 @@ async function checkTests(context) {
|
|
|
824
840
|
|
|
825
841
|
// E3011: adapter-tests job
|
|
826
842
|
if (context.cfg.onlyWWW) {
|
|
843
|
+
common.debug(' job adapter-tests skipped');
|
|
827
844
|
context.checks.push('Job "adapter-tests" check skipped (onlyWWW adapter).');
|
|
828
845
|
} else if (!jobs['adapter-tests']) {
|
|
846
|
+
common.debug(' job adapter-tests not found');
|
|
829
847
|
context.errors.push(
|
|
830
848
|
`[E3011] Workflow "${WORKFLOW_FILE_SHORT}": job "adapter-tests" is missing. Please add it.`,
|
|
831
849
|
);
|
|
832
850
|
} else {
|
|
851
|
+
common.debug(' job adapter-tests found');
|
|
833
852
|
context.checks.push('Job "adapter-tests" found.');
|
|
834
853
|
|
|
835
854
|
// S3014: adapter-tests should need check-and-lint
|
|
@@ -972,10 +991,12 @@ async function checkTests(context) {
|
|
|
972
991
|
|
|
973
992
|
// S3012: deploy job (suggestion if missing)
|
|
974
993
|
if (!jobs['deploy']) {
|
|
994
|
+
common.debug(' job deploy found');
|
|
975
995
|
context.warnings.push(
|
|
976
996
|
`[S3012] Workflow "${WORKFLOW_FILE_SHORT}": job "deploy" is not defined. Consider adding it for automated releases.`,
|
|
977
997
|
);
|
|
978
998
|
} else {
|
|
999
|
+
common.debug(' job deploy found');
|
|
979
1000
|
context.checks.push('Job "deploy" found.');
|
|
980
1001
|
|
|
981
1002
|
// E3016: deploy must depend (directly or transitively) on check-and-lint and adapter-tests,
|
package/lib/postprocessing.js
CHANGED
|
@@ -38,6 +38,7 @@ const mapSeverity4New = {
|
|
|
38
38
|
W3027: 'E', // [W3027] Workflow "test-and-release.yml": job "adapter-tests" OS matrix is missing: windows-latest, macos-latest. Consider adding tests for all of: ubuntu-latest, windows-latest, macos-latest
|
|
39
39
|
W5018: 'E', // [W5018] "@alcalzone/release-script" (>=3.0.0) is used, but ".releaseconfig.json" not found. Please create.',
|
|
40
40
|
W5512: 'E', // [W5512] admin/jsonConfig.json schema validation error: ...
|
|
41
|
+
W5612: 'E', // W5612] "admin/jsonConfig.json/items/..." attribute "label" uses key "..." which is not found in the English translation file at "admin/i18n/en".
|
|
41
42
|
W6020: 'E', // [W6020] Consider adding a CHANGELOG_OLD.md file to store older changelog entries.
|
|
42
43
|
W6021: 'E', // [W6021] "## License" is not the last section in README.md.
|
|
43
44
|
W8915: 'E', // [W8915] Dependabot npm entry (directory: "/") has no "cooldown" configured.
|
package/package.json
CHANGED