mendel-core
Advanced tools
Comparing version 3.0.5 to 3.0.6
{ | ||
"name": "mendel-core", | ||
"version": "3.0.5", | ||
"version": "3.0.6", | ||
"description": "Mendel shared dependencies production use", | ||
@@ -5,0 +5,0 @@ "main": "trees.js", |
32
trees.js
@@ -35,3 +35,6 @@ /* Copyright 2015, Yahoo Inc. | ||
MendelTrees.prototype.findTreeForVariations = function(bundle, lookupChains) { | ||
var finder = new MendelVariationWalker(lookupChains, this.config.baseConfig.id); | ||
var finder = new MendelVariationWalker( | ||
lookupChains, | ||
this.config.baseConfig.dir | ||
); | ||
@@ -45,6 +48,8 @@ this._walkTree(bundle, finder); | ||
if (!this.ssrBundle) | ||
throw new Error([ | ||
'For a server-side render, you must use', | ||
'"mendel-outlet-server-side-render"', | ||
].join(' ')); | ||
throw new Error( | ||
[ | ||
'For a server-side render, you must use', | ||
'"mendel-outlet-server-side-render"', | ||
].join(' ') | ||
); | ||
@@ -71,5 +76,3 @@ var base = this.config.baseConfig.dir; | ||
confBundles | ||
.filter(bundle => bundle.manifest) | ||
.forEach(function(bundle) { | ||
confBundles.filter(bundle => bundle.manifest).forEach(function(bundle) { | ||
var bundlePath = bundle.manifest; | ||
@@ -82,6 +85,10 @@ try { | ||
if (error.code === 'MODULE_NOT_FOUND' || error.code === 'ENOENT') { | ||
newError.message = 'Could not find "' + bundle.id | ||
+ '" bundle at path '+ bundlePath; | ||
newError.message = | ||
'Could not find "' + | ||
bundle.id + | ||
'" bundle at path ' + | ||
bundlePath; | ||
} else { | ||
newError.message = 'Invalid bundle file at path '+ bundle.manifest; | ||
newError.message = | ||
'Invalid bundle file at path ' + bundle.manifest; | ||
} | ||
@@ -115,3 +122,3 @@ throw newError; | ||
var lookupVar = variation.chain[j]; | ||
if (lookupVar !== this.config.basetree) { | ||
if (lookupVar !== this.config.baseConfig.dir) { | ||
lookupChain.push(lookupVar); | ||
@@ -146,3 +153,2 @@ } | ||
module.exports = MendelTrees; |
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
26073
426