@iobroker/repochecker 3.1.0 → 3.1.2
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 +10 -0
- package/lib/M000_PackageJson.js +1 -1
- package/lib/M100_IOPackageJson.js +19 -12
- package/lib/M500_Code.js +8 -2
- package/lib/M900_GitNpmIgnore.js +0 -1
- package/lib/config.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,6 +20,16 @@ Branch (`master/main/dev`) is optional.
|
|
|
20
20
|
-->
|
|
21
21
|
|
|
22
22
|
## Changelog
|
|
23
|
+
### 3.1.2 (2024-10-04)
|
|
24
|
+
* (mcm1957) Require node 18 minimum as engines clause.
|
|
25
|
+
|
|
26
|
+
### 3.1.1 (2024-10-04)
|
|
27
|
+
* (mcm1957) "[E166] 'common.mode: extension' is unknown" has been fixed [#308]
|
|
28
|
+
* (mcm1957) "[E904] file iob_npm.done found in repository, but not found in .gitignore" removed as covered by [E503]. [#309]
|
|
29
|
+
* (mcm1957) "[E500] node_modules found" has been retricted to adapetr root. [#297]
|
|
30
|
+
* (mcm1957) Do not check main entry if common.mode none or extension.
|
|
31
|
+
* (mcm1957) Change "[W113] Adapter should support compact mode" text and honor common.compact set to false. [#300]
|
|
32
|
+
|
|
23
33
|
### 3.1.0 (2024-09-29)
|
|
24
34
|
* (mcm1957) "@iobroker/plugin-sentry" blacklisted as dependency [#301]
|
|
25
35
|
* (mcm1957) Accept .ts files as main file too. [#303]
|
package/lib/M000_PackageJson.js
CHANGED
|
@@ -12,7 +12,7 @@ const compareVersions = require('compare-versions');
|
|
|
12
12
|
const common = require('./common.js');
|
|
13
13
|
|
|
14
14
|
const recommendedNodeVersion = '18'; // This is the minimum node version that should be required
|
|
15
|
-
const requiredNodeVersion = '
|
|
15
|
+
const requiredNodeVersion = '18'; // This is the minimum node version that must be required
|
|
16
16
|
|
|
17
17
|
/* TODO: configuration should be moved to context */
|
|
18
18
|
|
|
@@ -269,7 +269,11 @@ async function checkIOPackageJson(context) {
|
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
if (!context.ioPackageJson.common.compact && !context.ioPackageJson.common.onlyWWW) {
|
|
272
|
-
context.
|
|
272
|
+
if (context.ioPackageJson.common.compact === undefined ) {
|
|
273
|
+
context.warnings.push('[W113] Please test whether adapter can support compact mode, if not set "common.compact:false" at io-package.json');
|
|
274
|
+
} else {
|
|
275
|
+
context.warnings.push('[S139] Please evaluate whether adapter can be modified to support compact mode');
|
|
276
|
+
}
|
|
273
277
|
} else if (!context.ioPackageJson.common.onlyWWW) {
|
|
274
278
|
context.checks.push('"common.compact" found in io-package.json');
|
|
275
279
|
}
|
|
@@ -435,14 +439,17 @@ async function checkIOPackageJson(context) {
|
|
|
435
439
|
|
|
436
440
|
}
|
|
437
441
|
|
|
438
|
-
//
|
|
439
|
-
if (
|
|
440
|
-
!context.
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
442
|
+
// check main entry
|
|
443
|
+
if ((context.ioPackageJson.common.mode !== 'none') && (context.ioPackageJson.common.mode !== 'extension')) {
|
|
444
|
+
if (!context.packageJson.main) {
|
|
445
|
+
!context.ioPackageJson.common.onlyWWW && context.errors.push('[E143] No main found in the package.json');
|
|
446
|
+
} else {
|
|
447
|
+
context.checks.push('"main" found in package.json');
|
|
448
|
+
if (!context.packageJson.main.endsWith('.js') && !context.packageJson.main.endsWith('.ts')) {
|
|
449
|
+
!context.ioPackageJson.common.onlyWWW && context.errors.push(`[E163] common.mode "${context.ioPackageJson.common.mode}" requires JavaScript or Typescript file for "main" in package.json`);
|
|
450
|
+
} else {
|
|
451
|
+
context.checks.push('"main" references .js or .ts file');
|
|
452
|
+
}
|
|
446
453
|
}
|
|
447
454
|
}
|
|
448
455
|
|
|
@@ -646,7 +653,7 @@ async function checkIOPackageJson(context) {
|
|
|
646
653
|
}
|
|
647
654
|
}
|
|
648
655
|
|
|
649
|
-
// single free
|
|
656
|
+
// single free
|
|
650
657
|
// first free 187
|
|
651
658
|
|
|
652
659
|
return context;
|
|
@@ -696,8 +703,8 @@ exports.checkIOPackageJson = checkIOPackageJson;
|
|
|
696
703
|
// [135] "common.tier" is required in io-package.json. Please check https://github.com/ioBroker/ioBroker.docs/blob/master/docs/en/dev/objectsschema.md#adapter.
|
|
697
704
|
// [136] No "common.news" found for actual version ${context.ioPackageJson.common.version} in io-package.json
|
|
698
705
|
// [137] "common.automaticUpgrade" will be defined by the user. Please remove from io-package.json
|
|
699
|
-
// [138] Main file not found under URL: ${context.githubUrl}/${context.packageJson.main} and not located at build/ directory too
|
|
700
|
-
// [139]
|
|
706
|
+
// [138] Main file not found under URL: ${context.githubUrl}/${context.packageJson.main} and not located at build/ directory too.
|
|
707
|
+
// [139] Please evaluate whether adapter can be modified to support compact mode.
|
|
701
708
|
// [140] width and height of logo are not equal
|
|
702
709
|
// [141] logo is too small. It must be greater or equal than 32x32
|
|
703
710
|
// [142] logo is too big. It must be less or equal than 512x512
|
package/lib/M500_Code.js
CHANGED
|
@@ -150,14 +150,20 @@ async function checkCode(context) {
|
|
|
150
150
|
const promises = [];
|
|
151
151
|
await (function () { return new Promise(_resolve => {
|
|
152
152
|
common.debug('init bufferstream');
|
|
153
|
+
let root='';
|
|
153
154
|
bufferStream
|
|
154
155
|
.pipe(unzipper.Parse())
|
|
155
156
|
.on('entry', entry => {
|
|
156
157
|
common.debug('on.entry ' + entry.path);
|
|
157
|
-
if (
|
|
158
|
+
if (root === '') {
|
|
159
|
+
root=entry.path;
|
|
160
|
+
console.log(`Directory root set to ${root}`);
|
|
161
|
+
}
|
|
162
|
+
//if (!found && entry.type === 'Directory' && entry.path.match(/\/node_modules\/$/)) {
|
|
163
|
+
if (!found && entry.type === 'Directory' && entry.path === `${root}node_modules/`) {
|
|
158
164
|
console.log(`Found ${entry.path}`);
|
|
159
165
|
found = true;
|
|
160
|
-
context.errors.push('[E500] node_modules found in
|
|
166
|
+
context.errors.push('[E500] Directory node_modules found in root of repository. Please delete directory.');
|
|
161
167
|
}
|
|
162
168
|
|
|
163
169
|
// Get a list of all files and `.npmignore` + `.gitignore`
|
package/lib/M900_GitNpmIgnore.js
CHANGED
package/lib/config.js
CHANGED
|
@@ -384,7 +384,7 @@ const allowedModes = {
|
|
|
384
384
|
'daemon': 'always running process (will be restarted if process exits)',
|
|
385
385
|
'schedule': 'is started by schedule found in system.adapter…common.schedule - reacts on changes of .schedule by rescheduling with new state',
|
|
386
386
|
'once': 'his adapter will be started every time the system.adapter.. object changed. It will not be restarted after termination.',
|
|
387
|
-
'extension': ''
|
|
387
|
+
'extension': 'this adapter provides a web extension only'
|
|
388
388
|
};
|
|
389
389
|
const allowedTypes = {
|
|
390
390
|
'alarm': 'security of home, car, boat, ...',
|
package/package.json
CHANGED