Socket
Socket
Sign inDemoInstall

node-api-dotnet

Package Overview
Dependencies
Maintainers
5
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-api-dotnet - npm Package Compare versions

Comparing version 0.7.14 to 0.7.16

30

init.js

@@ -44,8 +44,32 @@ // Copyright (c) Microsoft Corporation.

/**
* Build tools like webpack are not able to package up dynamic includes like the default case.
* The switch supports the currently packaged DLLs to work with build tools while maintaining
* potential backwards and future compatibility utilizing the default case.
*/
const assemblyName = 'Microsoft.JavaScript.NodeApi';
const nativeHostPath = __dirname + `/${rid}/${assemblyName}.node`;
let nativeHost;
switch(rid) {
case 'win-x64':
nativeHost = require(`./win-x64/${assemblyName}.node`);
break;
case 'win-arm64':
nativeHost = require(`./win-arm64/${assemblyName}.node`);
break;
case 'osx-x64':
nativeHost = require(`./osx-x64/${assemblyName}.node`);
break;
case 'osx-arm64':
nativeHost = require(`./osx-arm64/${assemblyName}.node`);
break;
case 'linux-x64':
nativeHost = require(`./linux-x64/${assemblyName}.node`);
break;
default:
// Handle unknown platform (Likely will not work with build tools e.g. webpack)
nativeHost = require(__dirname + `/${rid}/${assemblyName}.node`);
}
const managedHostPath = __dirname + `/${targetFramework}/${assemblyName}.DotNetHost.dll`
const nativeHost = require(nativeHostPath);
// Pass require() and import() functions to the host initialize() method.

@@ -52,0 +76,0 @@ // Since `import` is a keyword and not a function it has to be wrapped in a function value.

2

package.json
{
"name": "node-api-dotnet",
"version": "0.7.14",
"version": "0.7.16",
"description": "Node-API bindings for .Net",

@@ -5,0 +5,0 @@ "license": "MIT",

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

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

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

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