mendel-development
Advanced tools
Comparing version 1.0.2 to 1.0.5
@@ -26,2 +26,4 @@ /* Copyright 2015, Yahoo Inc. | ||
row.rawSource = row.source; | ||
row.source = mendelifyRequireTransform(row.file, row.source, variations); | ||
@@ -28,0 +30,0 @@ row.sha = shasum(row.source); |
{ | ||
"name": "mendel-development", | ||
"version": "1.0.2", | ||
"version": "1.0.5", | ||
"description": "Mendel shared dependencies for build and development", | ||
@@ -21,4 +21,5 @@ "main": "index.js", | ||
"shasum": "^1.0.2", | ||
"through2": "^2.0.1" | ||
"through2": "^2.0.1", | ||
"glob": "^7.0.3" | ||
} | ||
} |
@@ -7,2 +7,3 @@ /* Copyright 2015, Yahoo Inc. | ||
var isRequire = require('./falafel-util').isRequire; | ||
var variationMatches = require('./variation-matches'); | ||
@@ -18,3 +19,3 @@ var wrapper = [ | ||
function replaceRequiresOnSource (src, wrap) { | ||
function replaceRequiresOnSource (src, dirs, wrap) { | ||
var opts = { | ||
@@ -27,3 +28,7 @@ ecmaVersion: 6, | ||
var module = node.arguments[0].value; | ||
node.update("__mendel_require__('" + module + "')"); | ||
var match = variationMatches([{chain: dirs}], module); | ||
if (match) { | ||
node.update("__mendel_require__('" + match.file + "')"); | ||
} | ||
} | ||
@@ -30,0 +35,0 @@ }).toString(); |
@@ -9,3 +9,3 @@ /* Copyright 2015, Yahoo Inc. | ||
variations.some(function(variation) { | ||
variation.chain.some(function(dir) { | ||
return variation.chain.some(function(dir) { | ||
var parts = path.split(new RegExp("/"+dir+"/")); | ||
@@ -12,0 +12,0 @@ var found = parts.length > 1; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7488
8
202
4
+ Addedglob@^7.0.3
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedwrappy@1.0.2(transitive)