@iobroker/repochecker 5.20.13 → 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 +5 -0
- package/lib/M0000_PackageJson.js +29 -16
- package/package.json +2 -2
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.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
|
+
|
|
34
39
|
### 5.20.13 (2026-08-19)
|
|
35
40
|
|
|
36
41
|
* (mcm1957) Text for 5019 (common.nogit) has been corrected.
|
package/lib/M0000_PackageJson.js
CHANGED
|
@@ -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
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
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
|
-
|
|
939
|
-
Object.prototype.hasOwnProperty.call(context.packageJson.scripts, scriptName)
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
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/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "5.20.
|
|
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.
|
|
9
|
+
"js-yaml": "^4.3.1",
|
|
10
10
|
"json5": "^2.2.3",
|
|
11
11
|
"minimatch": "^10.2.6",
|
|
12
12
|
"semver": "^7.8.5"
|