@iobroker/repochecker 5.22.0 → 5.22.1
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/M4000_Repository.js +13 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -56,6 +56,10 @@ GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
|
56
56
|
Placeholder for the next version (at the beginning of the line):
|
|
57
57
|
### **WORK IN PROGRESS**
|
|
58
58
|
-->
|
|
59
|
+
### 5.22.1 (2026-09-11)
|
|
60
|
+
|
|
61
|
+
* (mcm1957) Copyright email check (E4050/E4051) no longer misfires on the standard MIT license text; only real copyright notice lines with a year are validated
|
|
62
|
+
|
|
59
63
|
### 5.22.0 (2026-09-11)
|
|
60
64
|
|
|
61
65
|
* (mcm1957) LICENSE file and README license section are now checked for the complete license text (see: 1160)
|
package/lib/M4000_Repository.js
CHANGED
|
@@ -399,6 +399,13 @@ const DISPOSABLE_EMAIL_DOMAINS = [
|
|
|
399
399
|
];
|
|
400
400
|
|
|
401
401
|
// Extract all email addresses contained in an arbitrary string.
|
|
402
|
+
// Matches a standard copyright notice line that carries a year specification,
|
|
403
|
+
// e.g. "Copyright (c) 2026 SentiQ <yves@nuesser.digital>" or a year range
|
|
404
|
+
// "Copyright (c) 2020-2026 ..." / "Copyright (c) 2020 - 2026 ...". The year
|
|
405
|
+
// specification prevents this from matching license boilerplate lines that merely
|
|
406
|
+
// contain the word "copyright" (e.g. the MIT "above copyright notice" sentence).
|
|
407
|
+
const COPYRIGHT_NOTICE_REGEX = /copyright\s*(?:\(c\)|©)?\s*\d{4}(?:\s*-\s*\d{4})?/i;
|
|
408
|
+
|
|
402
409
|
function extractEmails(text) {
|
|
403
410
|
if (!text || typeof text !== 'string') {
|
|
404
411
|
return [];
|
|
@@ -516,7 +523,12 @@ async function checkEmailAddresses(context) {
|
|
|
516
523
|
// file existence is checked elsewhere - do not raise a second error here
|
|
517
524
|
return;
|
|
518
525
|
}
|
|
519
|
-
|
|
526
|
+
// Only look at actual copyright notice lines of the form
|
|
527
|
+
// "Copyright (c) <year> <name> <email>"
|
|
528
|
+
// where <year> is a single year (nnnn) or a range (nnnn-mmmm / nnnn - mmmm).
|
|
529
|
+
// Requiring the year specification avoids matching license boilerplate such
|
|
530
|
+
// as "The above copyright notice and this permission notice shall be ...".
|
|
531
|
+
const copyrightLines = (content || '').split('\n').filter(line => COPYRIGHT_NOTICE_REGEX.test(line));
|
|
520
532
|
const invalid = [];
|
|
521
533
|
for (const line of copyrightLines) {
|
|
522
534
|
const email = extractEmails(line)[0];
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "5.22.
|
|
2
|
+
"version": "5.22.1",
|
|
3
3
|
"name": "@iobroker/repochecker",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"ajv": "^8.20.0",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@alcalzone/release-script": "^5.2.1",
|
|
17
17
|
"@iobroker/eslint-config": "^2.3.4",
|
|
18
18
|
"@tsconfig/node20": "^20.1.10",
|
|
19
|
-
"@types/node": "^26.
|
|
19
|
+
"@types/node": "^26.5.0",
|
|
20
20
|
"@types/semver": "^7.8.0"
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|