native-ext-loader
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -0,1 +1,5 @@ | ||
# 2.2.0 | ||
- Allow adjusting base path for relative locations (d073559673, 64505798ee) | ||
# 2.1.0 | ||
@@ -2,0 +6,0 @@ |
@@ -5,2 +5,3 @@ var path = require("path"); | ||
const defaultConfig = { | ||
basePath: [], | ||
rewritePath: undefined | ||
@@ -37,6 +38,9 @@ }; | ||
} else { | ||
const filePathArray = config.basePath.concat(fileName); | ||
const filePath = JSON.stringify(filePathArray).slice(1, -1); | ||
return ( | ||
"const path = require('path');" + | ||
"const filePath = path.resolve(__dirname, " + | ||
JSON.stringify(fileName) + | ||
filePath + | ||
");" + | ||
@@ -43,0 +47,0 @@ "try { global.process.dlopen(module, filePath); } " + |
@@ -17,3 +17,3 @@ { | ||
"scripts": {}, | ||
"version": "2.1.0" | ||
"version": "2.2.0" | ||
} |
@@ -5,3 +5,3 @@ # Node Native Loader | ||
## Install | ||
## Installation | ||
@@ -51,2 +51,8 @@ Add the package to the development dependencies: | ||
### `basePath` (default: `[]`) | ||
It allows adjusting path to the native module. The array will be concatenated with the resource name and then used in the runtime. For example, when the compile application lives inside `app.asar/renderer` subdirectory (Electron package), the path to the native module can be adjusted by using `basePath: ['app.asar', 'renderer']`. | ||
Note that `basePath` is ignored when `rewritePath` option is used. | ||
### `rewritePath` (default: `undefined`) | ||
@@ -53,0 +59,0 @@ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
70
1
5436
5
43