Socket
Socket
Sign inDemoInstall

native-ext-loader

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

native-ext-loader - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

4

CHANGELOG.md

@@ -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); } " +

2

package.json

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc