@iobroker/repochecker 5.18.7 → 5.18.9

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.18.9 (2026-06-22)
29
+
30
+ - (mcm1957) eslint-config import check has been adapted
31
+ - (mcm1957) EXCEPTION: exceptions added flase positive apiKey paramaters
32
+
33
+ ### 5.18.8 (2026-06-21)
34
+
35
+ - (mcm1957) Sentry text check has been adapted
36
+ - (mcm1957) Fixed validation of serialized default values for array, object, mixed, json, and file states
37
+
28
38
  ### 5.18.7 (2026-06-10)
29
39
 
30
40
  - (mcm1957) Detection of github install guide extended
@@ -21,14 +21,14 @@ const common = require('./common.js');
21
21
  const specialAdapters = ['admin', 'backitup', 'javascript', 'js-controller'];
22
22
  let recommendedNodeVersion = '22'; // This is the minimum node version that should be required at engines clause
23
23
  let requiredNodeVersion = '20'; // This is the minimum node version that must be required at engines clause
24
- const minimumNodeVersion = '18'; // This is the minimum node version that must be required ba all adapters at engines clause
24
+ const minimumNodeVersion = '18'; // This is the minimum node version that must be required by all adapters at engines clause
25
25
 
26
26
  // packages which must or should be required as dependencies
27
27
  const dependenciesPackageJson = {
28
28
  '@iobroker/adapter-core': {
29
29
  required: '3.2.3',
30
- recommended: '3.3.2',
31
- actual: '3.3.2',
30
+ recommended: '3.4.1',
31
+ actual: '3.4.1',
32
32
  onlyWWW: false,
33
33
  },
34
34
  };
@@ -1709,12 +1709,12 @@ async function checkEslintFileChecks(context) {
1709
1709
  } else {
1710
1710
  try {
1711
1711
  const eslintConfigContent = await common.getFile(context, '/eslint.config.mjs');
1712
- const hasImport = /import\s+config\s+from\s+['"]@iobroker\/eslint-config['"]\s*;?/.test(
1712
+ const hasImport = /import\s+.*\s+from\s+['"]@iobroker\/eslint-config['"]\s*;?/.test(
1713
1713
  String(eslintConfigContent || ''),
1714
1714
  );
1715
1715
  if (!hasImport) {
1716
1716
  context.errors.push(
1717
- '[E0077] "eslint.config.mjs" should use installed "@iobroker/eslint-config" via `import config from \'@iobroker/eslint-config\';`.',
1717
+ '[E0077] "eslint.config.mjs" should use installed "@iobroker/eslint-config" via `import ... from \'@iobroker/eslint-config\';`.',
1718
1718
  );
1719
1719
  } else {
1720
1720
  context.checks.push('"eslint.config.mjs" imports "@iobroker/eslint-config".');
@@ -84,7 +84,7 @@ const GERMAN_WORD_DETECTION_LIMIT = 3;
84
84
 
85
85
  // Keep this text in sync with the exact README wording required for adapters using the Sentry plugin.
86
86
  const SENTRY_NOTICE_TEXT_1 =
87
- '**This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers.**';
87
+ 'This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers.';
88
88
  const SENTRY_NOTICE_TEXT_2 =
89
89
  'This adapter uses the service `Sentry.io` to automatically report exceptions and code errors';
90
90
  const SENTRY_NOTICE_TEXT_3 =
@@ -619,6 +619,8 @@ async function checkReadme(context) {
619
619
  ).test(data) ||
620
620
  // Install from custom URL
621
621
  new RegExp(`install\\s+from\\s+custom\\s+url`, 'i').test(data) ||
622
+ // Installation via Github Cat possible.
623
+ new RegExp(`installation\\s+via\\s+github`, 'i').test(data) ||
622
624
  // iobroker/iob npm install commands with owner/repo GitHub shorthand
623
625
  new RegExp(`(?:^|\\n)[^\\n]*(?:iobroker|iob)\\s+npm\\s+install\\s+${ownerAdapterPattern}`, 'i').test(
624
626
  data,
@@ -121,22 +121,46 @@ function validateI18n(value, fieldPath) {
121
121
  return { errors, warnings };
122
122
  }
123
123
 
124
+ /**
125
+ * Validates a JSON-serialized value and returns the parsed result when valid.
126
+ *
127
+ * @param {*} value
128
+ * @returns {object}
129
+ */
130
+ function parseSerializedValue(value) {
131
+ if (typeof value !== 'string') {
132
+ return { ok: false };
133
+ }
134
+ try {
135
+ return { ok: true, parsed: JSON.parse(value) };
136
+ } catch {
137
+ return { ok: false };
138
+ }
139
+ }
140
+
124
141
  function matchesCommonType(value, commonType) {
125
142
  switch (commonType) {
126
143
  case 'mixed':
127
- return true;
128
- case 'array':
129
- return Array.isArray(value);
144
+ case 'json':
145
+ return parseSerializedValue(value).ok;
146
+ case 'array': {
147
+ const { ok, parsed } = parseSerializedValue(value);
148
+ return ok && Array.isArray(parsed);
149
+ }
130
150
  case 'boolean':
131
151
  return typeof value === 'boolean';
132
152
  case 'number':
133
153
  return typeof value === 'number' && Number.isFinite(value);
134
- case 'object':
135
- return isPlainObject(value);
136
154
  case 'string':
137
- case 'file':
138
- case 'json':
139
155
  return typeof value === 'string';
156
+ case 'file': {
157
+ const { ok, parsed } = parseSerializedValue(value);
158
+ return ok && typeof parsed === 'string';
159
+ }
160
+ case 'object': {
161
+ const { ok, parsed } = parseSerializedValue(value);
162
+ return ok && isPlainObject(parsed);
163
+ }
140
164
  case 'multistate':
141
165
  return ['string', 'number', 'boolean'].includes(typeof value);
142
166
  default:
@@ -33,6 +33,10 @@ const filterByAdapter = {
33
33
  backitup: [
34
34
  '[E5050] process.exit() used in * (lib/restore.js)*',
35
35
  ],
36
+ 'schlueter-thermostat': [
37
+ '[W1073] Potential sensitive data "apiKey" not listed at "protectedNative" in io-package.json',
38
+ '[W1074] Potential sensitive data "apiKey" not listed at "encryptedNative" in io-package.json',
39
+ ],
36
40
  };
37
41
 
38
42
  /**
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.18.7",
2
+ "version": "5.18.9",
3
3
  "name": "@iobroker/repochecker",
4
4
  "dependencies": {
5
5
  "ajv": "^8.20.0",