Socket
Socket
Sign inDemoInstall

node-addon-api

Package Overview
Dependencies
Maintainers
3
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-addon-api - npm Package Compare versions

Comparing version 0.5.1 to 0.6.2

2

package.json

@@ -34,3 +34,3 @@ {

},
"version": "0.5.1"
"version": "0.6.2"
}
const fs = require('fs');
const path = require('path');

@@ -225,4 +226,4 @@ const args = process.argv.slice(2);

var paths = listFiles(dir);
paths.forEach(function(path) {
var filename = path.split('\\').pop().split('/').pop();
paths.forEach(function(dirEntry) {
var filename = dirEntry.split('\\').pop().split('/').pop();

@@ -233,5 +234,5 @@ // Check whether the file is a source file or a config file

if (sourcePattern.test(filename)) {
convertFile(path, SourceFileOperations);
convertFile(dirEntry, SourceFileOperations);
} else if (ConfigFileOperations[filename] != null) {
convertFile(path, ConfigFileOperations[filename]);
convertFile(dirEntry, ConfigFileOperations[filename]);
}

@@ -241,3 +242,2 @@ });

function listFiles(dir, filelist) {
var path = path || require('path');
files = fs.readdirSync(dir);

@@ -263,4 +263,4 @@ filelist = filelist || [];

function convertFile(path, operations) {
fs.readFile(path, "utf-8", function (err, file) {
function convertFile(fileName, operations) {
fs.readFile(fileName, "utf-8", function (err, file) {
if (err) throw err;

@@ -270,3 +270,3 @@

fs.writeFile(path, file, function(err){
fs.writeFile(fileName, file, function(err){
if (err) throw err;

@@ -273,0 +273,0 @@ });

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc