fusionjs / fusion-core

Migrated to https://github.com/fusionjs/fusionjs
MIT License
630 stars 45 forks source link

Fix aliasing with optional tokens #335

Closed dennisgl closed 6 years ago

dennisgl commented 6 years ago

Previously to alias an optional dependency of a plugin, one would have to alias the "optional type token" given the alias map key was TokenImpl instead of Ref().

app
  .register(PluginWithOptionalDep)
  .alias(OptionalDep.optional, AlternativeDep);
app.register(AlternativeDep, AlternativePlugin);

->

app
  .register(PluginWithOptionalDep)
  .alias(OptionalDep, AlternativeDep);
app.register(AlternativeDep, AlternativePlugin);
CLAassistant commented 6 years ago

CLA assistant check
All committers have signed the CLA.

codecov[bot] commented 6 years ago

Codecov Report

Merging #335 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #335   +/-   ##
=======================================
  Coverage   93.67%   93.67%           
=======================================
  Files          18       18           
  Lines         443      443           
  Branches       86       86           
=======================================
  Hits          415      415           
  Misses         15       15           
  Partials       13       13
Impacted Files Coverage Δ
src/base-app.js 91.08% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 262aa5f...4110b46. Read the comment docs.

dennisgl commented 6 years ago

!merge