@iobroker/repochecker 5.20.7 → 5.20.8
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 +5 -0
- package/lib/M0000_PackageJson.js +15 -9
- package/lib/M5000_Code.js +12 -7
- package/lib/postprocessing.js +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,6 +31,11 @@ Example:
|
|
|
31
31
|
Placeholder for the next version (at the beginning of the line):
|
|
32
32
|
### **WORK IN PROGRESS**
|
|
33
33
|
-->
|
|
34
|
+
### 5.20.8 (2026-08-09)
|
|
35
|
+
|
|
36
|
+
* (mcm1957) Fixed source directory exclusion so multi-level paths (e.g. `src/lib/scripts`, `src/scripts`) are correctly skipped during code scanning, avoiding false positives such as `[S5051]`.
|
|
37
|
+
* (mcm1957) Adaptions for backitup required due to ts migration
|
|
38
|
+
|
|
34
39
|
### 5.20.7 (2026-08-09)
|
|
35
40
|
|
|
36
41
|
* (mcm1957) Exclude directories 'example(s)' from processing
|
package/lib/M0000_PackageJson.js
CHANGED
|
@@ -1488,9 +1488,11 @@ async function checkPackageJson(context) {
|
|
|
1488
1488
|
|
|
1489
1489
|
let shouldAdjustTsConfig = false;
|
|
1490
1490
|
if (!tsConfigNodeDevDependencyName) {
|
|
1491
|
-
context.
|
|
1492
|
-
|
|
1493
|
-
|
|
1491
|
+
if (context.cfg.isNewAdapter) {
|
|
1492
|
+
context.warnings.push(
|
|
1493
|
+
'[S0085] No devDependency "@tsconfig/nodeXX" found. Consider adding one for proper type checking (see ioBroker.examples for examples).',
|
|
1494
|
+
);
|
|
1495
|
+
}
|
|
1494
1496
|
} else {
|
|
1495
1497
|
const tsConfigNodeDevDependencyMatch = tsConfigNodeDevDependencyName.match(tsConfigNodeDependencyPattern);
|
|
1496
1498
|
const tsConfigNodeDevDependencyMajor = parseInt(tsConfigNodeDevDependencyMatch.groups.major, 10);
|
|
@@ -1513,16 +1515,20 @@ async function checkPackageJson(context) {
|
|
|
1513
1515
|
const extendsMatch = tsConfigContent.match(/"extends"\s*:\s*"(?<extendsPath>[^"]+)"/);
|
|
1514
1516
|
|
|
1515
1517
|
if (!extendsMatch || !extendsMatch.groups.extendsPath) {
|
|
1516
|
-
context.
|
|
1517
|
-
|
|
1518
|
-
|
|
1518
|
+
if (context.cfg.isNewAdapter) {
|
|
1519
|
+
context.warnings.push(
|
|
1520
|
+
'[S0088] "/tsconfig.json" should contain an extends clause like "extends": "@tsconfig/node20/tsconfig.json" (see ioBroker.examples).',
|
|
1521
|
+
);
|
|
1522
|
+
}
|
|
1519
1523
|
} else {
|
|
1520
1524
|
const extendsPath = extendsMatch.groups.extendsPath;
|
|
1521
1525
|
const extendsTsConfigNodeMatch = extendsPath.match(/^@tsconfig\/node(?<major>\d{2})\//);
|
|
1522
1526
|
if (!extendsTsConfigNodeMatch) {
|
|
1523
|
-
context.
|
|
1524
|
-
|
|
1525
|
-
|
|
1527
|
+
if (context.cfg.isNewAdapter) {
|
|
1528
|
+
context.warnings.push(
|
|
1529
|
+
'[S0088] "/tsconfig.json" should use an extends clause like "extends": "@tsconfig/node20/tsconfig.json" (see ioBroker.examples).',
|
|
1530
|
+
);
|
|
1531
|
+
}
|
|
1526
1532
|
} else {
|
|
1527
1533
|
const extendsDependencyName = `@tsconfig/node${extendsTsConfigNodeMatch.groups.major}`;
|
|
1528
1534
|
if (tsConfigNodeDevDependencyName && extendsDependencyName !== tsConfigNodeDevDependencyName) {
|
package/lib/M5000_Code.js
CHANGED
|
@@ -1827,8 +1827,8 @@ async function checkCode(context) {
|
|
|
1827
1827
|
'/example',
|
|
1828
1828
|
'/examples',
|
|
1829
1829
|
'/scripts',
|
|
1830
|
-
'/src/scripts',
|
|
1831
|
-
'/src/lib/scripts',
|
|
1830
|
+
// '/src/scripts', - do NOT include, might contain called code
|
|
1831
|
+
// '/src/lib/scripts', - do NOT include, might contain called code
|
|
1832
1832
|
'/template',
|
|
1833
1833
|
'/templates',
|
|
1834
1834
|
'/test',
|
|
@@ -1850,13 +1850,15 @@ async function checkCode(context) {
|
|
|
1850
1850
|
'/hass_frontend', // special for ioBroker.hass
|
|
1851
1851
|
'tmp',
|
|
1852
1852
|
]);
|
|
1853
|
-
|
|
1853
|
+
// Rooted entries ('/foo' or '/foo/bar') are matched as path prefixes relative to the repo
|
|
1854
|
+
// root, so multi-level paths like '/src/lib/scripts' are honored and not just their first segment.
|
|
1855
|
+
const excludedSourceRootPaths = new Set();
|
|
1854
1856
|
const excludedSourceAnyLevelDirs = new Set();
|
|
1855
1857
|
for (const excludedSourceDir of excludedSourceDirs) {
|
|
1856
1858
|
if (excludedSourceDir.startsWith('/')) {
|
|
1857
|
-
const
|
|
1858
|
-
if (
|
|
1859
|
-
|
|
1859
|
+
const rootPath = excludedSourceDir.slice(1);
|
|
1860
|
+
if (rootPath) {
|
|
1861
|
+
excludedSourceRootPaths.add(rootPath);
|
|
1860
1862
|
}
|
|
1861
1863
|
} else {
|
|
1862
1864
|
excludedSourceAnyLevelDirs.add(excludedSourceDir);
|
|
@@ -1916,7 +1918,10 @@ async function checkCode(context) {
|
|
|
1916
1918
|
|
|
1917
1919
|
// Skip files in excluded directories
|
|
1918
1920
|
const pathParts = filePath.split('/').filter(p => p !== '');
|
|
1919
|
-
const
|
|
1921
|
+
const relFilePath = pathParts.join('/'); // path relative to repo root, e.g. "src/lib/scripts/36-grafana.ts"
|
|
1922
|
+
const isInExcludedSourceRootDir = [...excludedSourceRootPaths].some(
|
|
1923
|
+
rootPath => relFilePath === rootPath || relFilePath.startsWith(`${rootPath}/`),
|
|
1924
|
+
);
|
|
1920
1925
|
const isInExcludedSourceAnyLevelDir = pathParts.some(pathPart => excludedSourceAnyLevelDirs.has(pathPart));
|
|
1921
1926
|
const isInExcludedSourceDir = isInExcludedSourceRootDir || isInExcludedSourceAnyLevelDir;
|
|
1922
1927
|
if (isInExcludedSourceDir) {
|
package/lib/postprocessing.js
CHANGED
|
@@ -33,9 +33,10 @@ const filterByAdapter = {
|
|
|
33
33
|
backitup: [
|
|
34
34
|
'[E5050] process.exit() used in * (lib/restore.js)*',
|
|
35
35
|
'[E5050] process.exit() used in * (src/lib/restore.ts)*',
|
|
36
|
+
'[W1144] Untranslated "common.news" entries detected*', // reduce disussions ...
|
|
37
|
+
'[W8905] Repository contains package.json files in non-root directories*', // reduce disussions ...
|
|
36
38
|
'[S5004] Plain setInterval() found in source files (src/lib/restore/mysql.ts*',
|
|
37
|
-
'[
|
|
38
|
-
'[W1144] Untranslated "common.news" entries detected (identical to English text): de(4.0.1); pl(4.0.1).', // reduce disussions ...
|
|
39
|
+
'[S5051] Custom sleep/wait function(s) found in source files*',
|
|
39
40
|
],
|
|
40
41
|
'schlueter-thermostat': [
|
|
41
42
|
'[W1073] Potential sensitive data "apiKey" not listed at "protectedNative" in io-package.json',
|
package/package.json
CHANGED