Comparing version 0.2.3-4 to 0.2.3-5
{ | ||
"name": "scrat", | ||
"version": "0.2.3-4", | ||
"version": "0.2.3-5", | ||
"description": "uc front-end integrated solution", | ||
@@ -20,3 +20,3 @@ "main": "index.js", | ||
"fis": "1.7.8", | ||
"scrat-command-install" : "0.1.2", | ||
"scrat-command-install" : "0.1.4", | ||
"scrat-command-server" : "0.0.8", | ||
@@ -23,0 +23,0 @@ "scrat-parser-stylus" : "0.0.4", |
module.exports = function(content, file){ | ||
if(file.isMod){ | ||
content = 'define(\'' + file.getId() + '\', function(require, exports, module){' + content + '\n\n});'; | ||
var componentJson = file.dirname + '/component.json'; | ||
var exports = ''; | ||
if(fis.util.isFile(componentJson)){ | ||
var json = require(componentJson); | ||
if(json.exports){ | ||
var main = fis.util(file.dirname, json.main || 'index.js'); | ||
if(main === file.realpath){ | ||
exports = ';module.exports = ' + json.exports; | ||
} | ||
} | ||
} | ||
content = 'define(\'' + file.getId() + '\', function(require, exports, module){' + content + exports + '\n\n});'; | ||
} | ||
return content; | ||
}; |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
47602
1186
0
2
+ Addedscrat-command-install@0.1.4(transitive)
- Removedscrat-command-install@0.1.2(transitive)
Updatedscrat-command-install@0.1.4