directory-import
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -58,2 +58,3 @@ "use strict"; | ||
const isValidModuleExtension = VALID_IMPORT_EXTENSIONS.has(fileExtension); | ||
const isDeclarationFile = filePath.endsWith('.d.ts'); | ||
const isValidFilePath = options.importPattern ? options.importPattern.test(filePath) : true; | ||
@@ -64,2 +65,4 @@ if (!isValidModuleExtension) | ||
return false; | ||
if (isDeclarationFile) | ||
return false; | ||
const relativeModulePath = filePath.slice(options.targetDirectoryPath.length + 1); | ||
@@ -66,0 +69,0 @@ // eslint-disable-next-line security/detect-non-literal-require, @typescript-eslint/no-var-requires, unicorn/prefer-module |
{ | ||
"name": "directory-import", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Module will allow you to synchronously or asynchronously import (requires) all modules from the folder you specify", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
@@ -338,2 +338,12 @@ <!--suppress HtmlDeprecatedAttribute --> | ||
### [3.1.1] - 2023-11-17 | ||
#### Added | ||
- .mjs files are supported now. | ||
#### Fixed | ||
- options.callerFilePath now returns the correct path to the file from which the function was called. | ||
- Declaration files are no longer imported. | ||
- Other minor fixes. | ||
### [3.0.0] - 2023-07-29 | ||
@@ -340,0 +350,0 @@ |
36459
395
410