@iobroker/repochecker 5.20.12 → 5.20.14

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
@@ -31,6 +31,15 @@ Example:
31
31
  Placeholder for the next version (at the beginning of the line):
32
32
  ### **WORK IN PROGRESS**
33
33
  -->
34
+ ### 5.20.14 (2026-08-30)
35
+
36
+ * (mcm1957) 'allowScripts' is now recognizedd as valid package.json attribute.
37
+ * (mcm1957) npm scripts 'preprepare', 'prepare' and 'postprepare' now raise an error and 'prepublish', 'prepublishOnly', 'publish' and 'postpublish' now raise a warning.
38
+
39
+ ### 5.20.13 (2026-08-19)
40
+
41
+ * (mcm1957) Text for 5019 (common.nogit) has been corrected.
42
+
34
43
  ### 5.20.12 (2026-08-17)
35
44
 
36
45
  * (mcm1957) Do not check src-www directory tree for dependencies.
@@ -264,6 +264,7 @@ const blacklistPackageJson = {
264
264
  };
265
265
 
266
266
  const validObjectsPackageJson = [
267
+ 'allowScripts',
267
268
  'author',
268
269
  'bin',
269
270
  // 'browser',
@@ -925,24 +926,36 @@ async function checkPackageJson(context) {
925
926
  } else {
926
927
  context.checks.push('"lint" script found in package.json');
927
928
  }
929
+
928
930
  if (context.packageJson.scripts && typeof context.packageJson.scripts === 'object') {
929
- const warningInstallScripts = ['prepare', 'preinstall'].filter(scriptName =>
930
- Object.prototype.hasOwnProperty.call(context.packageJson.scripts, scriptName),
931
- );
932
- if (warningInstallScripts.length) {
933
- context.warnings.push(
934
- `[W0092] Script(s) ${warningInstallScripts.map(scriptName => `"${scriptName}"`).join(', ')} found in package.json. Usage of npm install lifecycle scripts should be avoided.`,
935
- );
936
- }
931
+
932
+ const lifecycleScripts = ['preinstall'];
933
+ const forbiddenScripts = ['preprepare', 'prepare', 'postprepare', 'install', 'postinstall'];
934
+ const discouragedScripts = ['prepublish', 'prepublishOnly', 'publish', 'postpublish'];
935
+
936
+ lifecycleScripts
937
+ .filter(scriptName => Object.prototype.hasOwnProperty.call(context.packageJson.scripts, scriptName))
938
+ .forEach(scriptName => {
939
+ context.warnings.push(
940
+ `[E0092] "${scriptName}" found in package.json. Usage of npm install lifecycle scripts should be avoided.`,
941
+ );
942
+ });
937
943
 
938
- const forbiddenInstallScripts = ['install', 'postinstall'].filter(scriptName =>
939
- Object.prototype.hasOwnProperty.call(context.packageJson.scripts, scriptName),
940
- );
941
- if (forbiddenInstallScripts.length) {
942
- context.errors.push(
943
- `[E0093] Script(s) ${forbiddenInstallScripts.map(scriptName => `"${scriptName}"`).join(', ')} found in package.json. Remove npm install lifecycle scripts.`,
944
- );
945
- }
944
+ forbiddenScripts
945
+ .filter(scriptName => Object.prototype.hasOwnProperty.call(context.packageJson.scripts, scriptName))
946
+ .forEach(scriptName => {
947
+ context.errors.push(
948
+ `[E0094] "${scriptName}" script is not allowed at ioBroker adapters and needs to be removed.`,
949
+ );
950
+ });
951
+
952
+ discouragedScripts
953
+ .filter(scriptName => Object.prototype.hasOwnProperty.call(context.packageJson.scripts, scriptName))
954
+ .forEach(scriptName => {
955
+ context.warnings.push(
956
+ `[W0095] "${scriptName}" script is not needed in most cases when using the standard ioBroker workflow test-and-release. Usage should be reviewed.`,
957
+ );
958
+ });
946
959
  }
947
960
 
948
961
  if (context.packageJson.maintainers) {
package/lib/M5000_Code.js CHANGED
@@ -1498,7 +1498,7 @@ async function checkCode(context) {
1498
1498
  if (!context[`/${context.packageJson.main}`]) {
1499
1499
  if (!context.ioPackageJson.common.nogit) {
1500
1500
  context.errors.push(
1501
- `[E5019] "${context.packageJson.main}" found in package.json, but not found as file. Please commit "build/*" tree to github or set "common.noGit" attribute to true at io-package.json.`,
1501
+ `[E5019] "${context.packageJson.main}" found in package.json, but not found as file. Please commit "build/*" tree to github or set "common.nogit" attribute to true at io-package.json.`,
1502
1502
  );
1503
1503
  }
1504
1504
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
- "version": "5.20.12",
2
+ "version": "5.20.14",
3
3
  "name": "@iobroker/repochecker",
4
4
  "dependencies": {
5
5
  "ajv": "^8.20.0",
6
6
  "axios": "^1.18.1",
7
7
  "compare-versions": "^6.1.1",
8
8
  "image-size": "^1.2.0",
9
- "js-yaml": "^4.1.1",
9
+ "js-yaml": "^4.3.1",
10
10
  "json5": "^2.2.3",
11
11
  "minimatch": "^10.2.6",
12
12
  "semver": "^7.8.5"