@superhero/core 4.0.3 → 4.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +12 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -652,7 +652,7 @@ export default class Core
652
652
  continue
653
653
  }
654
654
 
655
- if(true === path)
655
+ if(true === dependencyPath)
656
656
  {
657
657
  dependencyPath = id
658
658
  }
@@ -671,8 +671,18 @@ export default class Core
671
671
 
672
672
  if('string' === typeof absolutePath)
673
673
  {
674
- dependencies[i] = path.normalize(path.join(absolutePath, dependencyPath))
674
+ dependencies[id] = path.normalize(path.join(absolutePath, dependencyPath))
675
675
  }
676
+ else
677
+ {
678
+ const error = new Error(`Could not resolve path for dependency "${id}"`)
679
+ error.code = 'E_CORE_RESOLVE_DEPENDENCY_PATH'
680
+ throw error
681
+ }
682
+ }
683
+ else
684
+ {
685
+ dependencies[id] = dependencyPath
676
686
  }
677
687
  }
678
688
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superhero/core",
3
- "version": "4.0.3",
3
+ "version": "4.0.5",
4
4
  "description": "Core functionalities for the superhero framework.",
5
5
  "main": "index.js",
6
6
  "license": "MIT",