@neon-rs/load
Advanced tools
Comparing version 0.0.22 to 0.0.23
@@ -98,5 +98,8 @@ "use strict"; | ||
} | ||
function debug(dirname) { | ||
const m = path.join(dirname, "index.node"); | ||
return fs.existsSync(m) ? require(m) : null; | ||
function debug(...components) { | ||
if (components.length === 0 || !components[components.length - 1].endsWith(".node")) { | ||
components.push("index.node"); | ||
} | ||
const pathSpec = path.join(...components); | ||
return fs.existsSync(pathSpec) ? require(pathSpec) : null; | ||
} | ||
@@ -103,0 +106,0 @@ exports.debug = debug; |
{ | ||
"name": "@neon-rs/load", | ||
"version": "0.0.22", | ||
"version": "0.0.23", | ||
"description": "Utilities for loading Neon modules.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
export declare function currentTarget(): string; | ||
export declare function debug(dirname: string): any; | ||
export declare function debug(...components: string[]): any; | ||
export declare function scope(scope: string): any; | ||
export declare function custom(toRequireSpec: (target: string) => string): any; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
6155
117