@iobroker/repochecker 5.6.6 → 5.6.9-alpha.1
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 +6 -0
- package/lib/M5000_Code.js +8 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -25,6 +25,12 @@ Example:
|
|
|
25
25
|
Placeholder for the next version (at the beginning of the line):
|
|
26
26
|
### **WORK IN PROGRESS**
|
|
27
27
|
-->
|
|
28
|
+
### 5.6.9-alpha.1 (2026-04-02)
|
|
29
|
+
- (mcm1957) Ignore "widgets" directory when scanning for imported packages.
|
|
30
|
+
|
|
31
|
+
### 5.6.7 (2026-04-02)
|
|
32
|
+
- (@copilot) Fixed false positive package detection in `extractImports`: dynamic imports like `import("pkg")` no longer incorrectly trigger the `import ... from ...` pattern, preventing values in log strings (e.g. `from 'force_full'`) from being mistaken for package names.
|
|
33
|
+
|
|
28
34
|
### 5.6.6 (2026-03-29)
|
|
29
35
|
- (mcm1957) Severity for [S3010] has been corrected.
|
|
30
36
|
|
package/lib/M5000_Code.js
CHANGED
|
@@ -215,6 +215,7 @@ function extractImports(content) {
|
|
|
215
215
|
const requirePattern = /\brequire\s*\(\s*['"`]([^'"`\n]+)['"`]\s*\)/g;
|
|
216
216
|
let match;
|
|
217
217
|
while ((match = requirePattern.exec(code)) !== null) {
|
|
218
|
+
common.debug(` require: found ${match[1]}`);
|
|
218
219
|
imports.add(match[1]);
|
|
219
220
|
}
|
|
220
221
|
|
|
@@ -223,20 +224,25 @@ function extractImports(content) {
|
|
|
223
224
|
// 'from' in log messages, strings, or other non-import contexts.
|
|
224
225
|
// Non-greedy [\s\S]*? always stops at the nearest 'from', so consecutive
|
|
225
226
|
// import statements are each matched independently.
|
|
226
|
-
|
|
227
|
+
// The negative lookahead (?!\s*\() excludes dynamic imports like import("pkg")
|
|
228
|
+
// which would otherwise span many lines and falsely match 'from' in string literals.
|
|
229
|
+
const fromPattern = /\b(?:import)\b(?!\s*\()[\s\S]*?\bfrom\s+['"`]([^'"`\n]+)['"`]/g;
|
|
227
230
|
while ((match = fromPattern.exec(code)) !== null) {
|
|
231
|
+
common.debug(` import from: found ${match[1]}`);
|
|
228
232
|
imports.add(match[1]);
|
|
229
233
|
}
|
|
230
234
|
|
|
231
235
|
// Side-effect imports: import 'package'
|
|
232
236
|
const sideEffectImportPattern = /\bimport\s+['"`]([^'"`\n]+)['"`]/g;
|
|
233
237
|
while ((match = sideEffectImportPattern.exec(code)) !== null) {
|
|
238
|
+
common.debug(` import ...: found ${match[1]}`);
|
|
234
239
|
imports.add(match[1]);
|
|
235
240
|
}
|
|
236
241
|
|
|
237
242
|
// dynamic import('...')
|
|
238
243
|
const dynamicImportPattern = /\bimport\s*\(\s*['"`]([^'"`\n]+)['"`]\s*\)/g;
|
|
239
244
|
while ((match = dynamicImportPattern.exec(code)) !== null) {
|
|
245
|
+
common.debug(` dyn import: found ${match[1]}`);
|
|
240
246
|
imports.add(match[1]);
|
|
241
247
|
}
|
|
242
248
|
|
|
@@ -1166,6 +1172,7 @@ async function checkCode(context) {
|
|
|
1166
1172
|
'doc',
|
|
1167
1173
|
'src-admin',
|
|
1168
1174
|
'src-widgets',
|
|
1175
|
+
'widgets',
|
|
1169
1176
|
'admin-src',
|
|
1170
1177
|
'test',
|
|
1171
1178
|
'node_modules',
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "5.6.
|
|
2
|
+
"version": "5.6.9-alpha.1",
|
|
3
3
|
"name": "@iobroker/repochecker",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"ajv": "^8.18.0",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@alcalzone/release-script": "^5.1.1",
|
|
15
15
|
"@iobroker/eslint-config": "^2.2.0",
|
|
16
16
|
"@tsconfig/node20": "^20.1.9",
|
|
17
|
-
"@types/node": "^24.
|
|
17
|
+
"@types/node": "^24.12.0",
|
|
18
18
|
"@types/semver": "^7.7.1"
|
|
19
19
|
},
|
|
20
20
|
"repository": {
|