diff --git a/src/lib/mirror.ts b/src/lib/mirror.ts index 21571aa2..c416867c 100644 --- a/src/lib/mirror.ts +++ b/src/lib/mirror.ts @@ -604,7 +604,7 @@ export class Mirror { try { if (dirPath && !dirPath.startsWith('.') && existsSync(dirPath)) { const files = readdirSync(dirPath).filter(name => !name.startsWith('.')); - files.forEach(file => { + for (const file of files) { const fullName = join(dirPath, file); const stats = statSync(fullName); if (stats.isDirectory()) { @@ -617,7 +617,7 @@ export class Mirror { name: fullName, }; } - }); + } } } catch (err: unknown) { this.log.error(`Error while checking files in directory ${dirPath}: ${err as Error}`); diff --git a/src/lib/typescriptSettings.ts b/src/lib/typescriptSettings.ts index 29fbc40d..33a39ab2 100644 --- a/src/lib/typescriptSettings.ts +++ b/src/lib/typescriptSettings.ts @@ -1,4 +1,4 @@ -import { type CompilerOptions, ScriptTarget, ModuleResolutionKind, ModuleKind } from 'typescript'; +import { type CompilerOptions, ScriptTarget /*, ModuleResolutionKind, ModuleKind */ } from 'typescript'; // Node.js 18+ supports the features of ES2022 // consider changing this, so we get to support the newest features too @@ -22,8 +22,8 @@ export const tsCompilerOptions: CompilerOptions = { // This is required for QueryResults to be iterable (https://github.com/ioBroker/ioBroker.javascript/pull/663#issuecomment-721645705) downlevelIteration: true, // Specify the module resolution strategy - moduleResolution: ModuleResolutionKind.NodeNext, - module: ModuleKind.ESNext, + // moduleResolution: ModuleResolutionKind.NodeNext, + // module: ModuleKind.ESNext, lib: [`lib.${targetTsLib}.d.ts`], };