directory-import
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -37,3 +37,5 @@ 'use strict'; | ||
if (notIgnoredExt) { | ||
const func = require(`${process.cwd()}/${path}`); | ||
const func = path.startsWith(process.cwd()) | ||
? require(path) | ||
: require(`${process.cwd()}/${path}`); | ||
@@ -40,0 +42,0 @@ modules[path] = func; |
{ | ||
"name": "directory-import", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Module sync or async import(requires) all modules from the folder you specify.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
7580
39
2