Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

package-merger

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

package-merger - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

.idea/encodings.xml

15

index.js
#! /usr/bin/env node
var fs = require("fs"),
path = require("path"),
async = require('async'),
objectMerge = require('object-merge');
async = require('async');
var cwd = process.cwd();
var masterPackageJson={

@@ -16,2 +16,9 @@ "name": "package-merger-dummy",

function merge_options(obj1,obj2){
var obj3 = {};
for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }
for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }
return obj3;
}
fs.readdir(cwd, function (err, files) {

@@ -24,3 +31,3 @@ var folders=[];

if(fs.statSync(file).isDirectory() && fs.existsSync(path.join(cwd,file,"package.json"))){
masterPackageJson.dependencies = objectMerge(objectMerge.dependencies,require(path.join(cwd,file,"package.json")).dependencies);
masterPackageJson.dependencies = merge_options(masterPackageJson.dependencies,require(path.join(cwd,file,"package.json")).dependencies);
cb(null);

@@ -35,2 +42,2 @@ }

})
});
});
{
"name": "package-merger",
"version": "1.0.2",
"version": "1.0.3",
"description": "This modules reads all directories inside current directory for package.json files and creates a master package.json",

@@ -22,5 +22,4 @@ "preferGlobal": true,

"dependencies": {
"async": "^0.9.0",
"object-merge": "^2.5.1"
"async": "^0.9.0"
}
}

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