@file-cache/core
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "@file-cache/core", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A cache for file metadata or file content.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -38,2 +38,4 @@ import path from "node:path"; | ||
}; | ||
// FIXME: https://github.com/milesj/packemon/issues/138 | ||
const _importDynamic = new Function("modulePath", "return import(modulePath)"); | ||
export type DeleteCacheOptions = Omit<CreateCacheOptions, "noCache">; | ||
@@ -46,3 +48,3 @@ /** | ||
export const deleteCacheFile = async (options: DeleteCacheOptions) => { | ||
const { packageDirectory } = await import("pkg-dir"); | ||
const { packageDirectory } = await _importDynamic("pkg-dir"); | ||
const pkgDir = await packageDirectory(); | ||
@@ -49,0 +51,0 @@ const pkgName = await getPackageName(pkgDir); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
49783
938
2