New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fis-auto-packager

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fis-auto-packager - npm Package Compare versions

Comparing version

to
0.0.4

14

core/codeAnalyzer.js

@@ -144,3 +144,3 @@ var File = require("./file.js"),

function createPackageMap(autopackJsons, defaultPackages){
var index = 0;
var keyIndex = 0;
util.map(autopackJsons, function(index, autopackJson){

@@ -154,10 +154,11 @@ var filename = autopackJson.split("/").pop();

util.map(packConf, function(path, patterns){
var pid = "p" + index;
index++;
var pid = "p" + keyIndex;
keyIndex++;
if(typeof patterns === 'string' || patterns instanceof RegExp){
patterns = [ patterns ];
}
var packageKey = fixManualPkgkey(path, module);
if(util.is(patterns, 'Array') && patterns.length){
defaultPackages[pid] = {
file : path,
file : packageKey,
regs : patterns,

@@ -175,1 +176,6 @@ module : module

//添加模块名前缀,防止不同模块出现相同的filename
function fixManualPkgkey(filename, module){
filename = filename.replace(/\/|\./g, "_");
return module + "_" + filename;
}

@@ -29,5 +29,6 @@

util.map(resources, function(packageKeyPrefix, packages){
//这里注意对于生成的packageKeyPrefix是是有格式要求的:第一个是module,最后一个是type
var tokens = packageKeyPrefix.split("_"),
module = tokens[0],
type = tokens[2];
type = tokens[tokens.length-1];
if(!packResults[module]){

@@ -34,0 +35,0 @@ packResults[module] = {};

{
"name": "fis-auto-packager",
"version": "0.0.3",
"version": "0.0.4",
"description": "fis-auto-packager",

@@ -5,0 +5,0 @@ "main": "fis-auto-packager.js",

@@ -87,3 +87,3 @@ /**

}
var packageKey = mergedFile.get("module") + "_" + file.replace(".", "_");
var packageKey = file;
mergedFile.set("id", file);

@@ -90,0 +90,0 @@ mergedFile.set("packageType", "manual");