electrolyte
Advanced tools
Comparing version 0.7.0 to 0.7.1
@@ -9,2 +9,8 @@ # Changelog | ||
## [0.7.1] - 2023-11-20 | ||
### Changed | ||
- Auto-selection of app-provided component when multiple components implement an | ||
interface. | ||
## [0.7.0] - 2023-10-19 | ||
@@ -16,4 +22,5 @@ | ||
[Unreleased]: https://github.com/jaredhanson/electrolyte/compare/v0.6.1...HEAD | ||
[Unreleased]: https://github.com/jaredhanson/electrolyte/compare/v0.7.0...HEAD | ||
[0.7.0]: https://github.com/jaredhanson/electrolyte/compare/v0.6.1...v0.7.0 | ||
[0.6.1]: https://github.com/jaredhanson/electrolyte/compare/v0.6.0...v0.6.1 | ||
[0.6.0]: https://github.com/jaredhanson/electrolyte/compare/v0.5.1...v0.6.0 |
@@ -248,2 +248,16 @@ // Load modules. | ||
if (candidates.length > 1) { | ||
// FIXME: hack to auto-select "app/" prefixed components. This should be factored | ||
// out to a bixby-based resolver | ||
var countAppProvided = 0 | ||
, iAppProvided, i, len; | ||
for (i = 0, len = candidates.length; i < len; ++i) { | ||
if (candidates[i].id.indexOf('app/') == 0) { | ||
countAppProvided++; | ||
iAppProvided = i; | ||
} | ||
} | ||
if (countAppProvided == 1) { | ||
return create(candidates[iAppProvided]); | ||
} | ||
// TODO: Make this error string to candidate ids | ||
@@ -250,0 +264,0 @@ // FIXME: this is giving [object Object],[object Object] in string where the map is |
{ | ||
"name": "electrolyte", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "Elegant dependency injection for Node.js.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
56128
969