@iobroker/repochecker 5.6.7 → 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 +3 -0
- package/lib/M5000_Code.js +5 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,6 +25,9 @@ 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
|
+
|
|
28
31
|
### 5.6.7 (2026-04-02)
|
|
29
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.
|
|
30
33
|
|
package/lib/M5000_Code.js
CHANGED
|
@@ -215,7 +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
|
-
|
|
218
|
+
common.debug(` require: found ${match[1]}`);
|
|
219
219
|
imports.add(match[1]);
|
|
220
220
|
}
|
|
221
221
|
|
|
@@ -228,21 +228,21 @@ function extractImports(content) {
|
|
|
228
228
|
// which would otherwise span many lines and falsely match 'from' in string literals.
|
|
229
229
|
const fromPattern = /\b(?:import)\b(?!\s*\()[\s\S]*?\bfrom\s+['"`]([^'"`\n]+)['"`]/g;
|
|
230
230
|
while ((match = fromPattern.exec(code)) !== null) {
|
|
231
|
-
|
|
231
|
+
common.debug(` import from: found ${match[1]}`);
|
|
232
232
|
imports.add(match[1]);
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
// Side-effect imports: import 'package'
|
|
236
236
|
const sideEffectImportPattern = /\bimport\s+['"`]([^'"`\n]+)['"`]/g;
|
|
237
237
|
while ((match = sideEffectImportPattern.exec(code)) !== null) {
|
|
238
|
-
|
|
238
|
+
common.debug(` import ...: found ${match[1]}`);
|
|
239
239
|
imports.add(match[1]);
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
// dynamic import('...')
|
|
243
243
|
const dynamicImportPattern = /\bimport\s*\(\s*['"`]([^'"`\n]+)['"`]\s*\)/g;
|
|
244
244
|
while ((match = dynamicImportPattern.exec(code)) !== null) {
|
|
245
|
-
|
|
245
|
+
common.debug(` dyn import: found ${match[1]}`);
|
|
246
246
|
imports.add(match[1]);
|
|
247
247
|
}
|
|
248
248
|
|
|
@@ -1172,6 +1172,7 @@ async function checkCode(context) {
|
|
|
1172
1172
|
'doc',
|
|
1173
1173
|
'src-admin',
|
|
1174
1174
|
'src-widgets',
|
|
1175
|
+
'widgets',
|
|
1175
1176
|
'admin-src',
|
|
1176
1177
|
'test',
|
|
1177
1178
|
'node_modules',
|
package/package.json
CHANGED