pr-checkmate 1.22.5 → 1.22.7
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.
|
@@ -35,13 +35,21 @@ exports.outdatedDepsCheck = {
|
|
|
35
35
|
const entries = Object.entries(outdated).filter(([pkg]) => !ignore.has(pkg));
|
|
36
36
|
if (entries.length === 0)
|
|
37
37
|
return (0, types_1.pass)();
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
// `current` is only populated when the package is installed in node_modules.
|
|
39
|
+
// In CI (npx-invoked validator, no `npm ci` for the target repo) it's absent,
|
|
40
|
+
// so fall back to `wanted` — the version the package.json range resolves to,
|
|
41
|
+
// which npm computes from the registry even without node_modules. Comparing
|
|
42
|
+
// that baseline to `latest` keeps the check meaningful in CI. Skip entries
|
|
43
|
+
// with neither, rather than treating a missing baseline as major 0.
|
|
44
|
+
const majorBehind = entries
|
|
45
|
+
.map(([pkg, info]) => ({ pkg, baseline: info.current ?? info.wanted, latest: info.latest }))
|
|
46
|
+
.filter(({ baseline, latest }) => {
|
|
47
|
+
if (!baseline)
|
|
48
|
+
return false;
|
|
49
|
+
return parseInt(latest?.split('.')[0] ?? '0', 10) > parseInt(baseline.split('.')[0], 10);
|
|
42
50
|
});
|
|
43
51
|
if (majorBehind.length > 0) {
|
|
44
|
-
majorBehind.forEach((
|
|
52
|
+
majorBehind.forEach(({ pkg, baseline, latest }) => utils_1.logger.warn(`[Outdated Deps]: ⚠️ ${pkg}: ${baseline} → ${latest}`));
|
|
45
53
|
return (0, types_1.warn)(`${majorBehind.length} package(s) major versions behind`);
|
|
46
54
|
}
|
|
47
55
|
const minorBehind = entries.length - majorBehind.length;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pr-checkmate",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.7",
|
|
4
4
|
"description": "Automated PR quality checks: linting, formatting, dependency analysis, and spellcheck",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"github-actions",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"release": "standard-version"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
|
-
"node": ">=
|
|
57
|
+
"node": ">=20.0.0",
|
|
58
58
|
"npm": ">=8.0.0"
|
|
59
59
|
},
|
|
60
60
|
"repository": {
|