Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(core): Effect metadata argument #94

Merged
merged 3 commits into from Jan 22, 2019

Conversation

Projects
1 participant
@JozefFlakus
Copy link
Member

commented Jan 18, 2019

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[x] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the new behavior?

  • In Marble.js v1 the third Effect argument (metadata) wasn't used often. The PR introduces a refactored way, where the third argument is a common EffectMetadata object which can contain eventual error object or contextual injector.
  • Shareable injection container
  • The http.Server instance is registered to the injection container during httpListener bootstrapping, it can be easily retrieved via container.

Does this PR introduce a breaking change?

[x] Yes
[ ] No

@JozefFlakus JozefFlakus added this to the 2.0.0 milestone Jan 18, 2019

@JozefFlakus JozefFlakus self-assigned this Jan 18, 2019

@JozefFlakus JozefFlakus added this to In progress in @marblejs/next via automation Jan 18, 2019

@JozefFlakus JozefFlakus changed the title imp(core): Effect metadata argument refactor(core): Effect metadata argument Jan 18, 2019

@JozefFlakus JozefFlakus force-pushed the imp/next/injector branch from b949fd7 to 12ffe66 Jan 19, 2019

@JozefFlakus JozefFlakus force-pushed the imp/next/injector branch from 12ffe66 to 86c6bd7 Jan 19, 2019

@codecov

This comment has been minimized.

Copy link

commented Jan 19, 2019

Codecov Report

Merging #94 into next will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@         Coverage Diff         @@
##           next    #94   +/-   ##
===================================
  Coverage   100%   100%           
===================================
  Files        74     75    +1     
  Lines       937    949   +12     
  Branches     83     84    +1     
===================================
+ Hits        937    949   +12
Impacted Files Coverage Δ
packages/websockets/src/error/ws-error.handler.ts 100% <100%> (ø) ⬆️
packages/core/src/error/error.effect.ts 100% <100%> (ø) ⬆️
packages/core/src/listener/http.listener.ts 100% <100%> (ø) ⬆️
.../src/operators/mapToServer/mapToServer.operator.ts 100% <100%> (ø) ⬆️
packages/websockets/src/error/ws-error.effect.ts 100% <100%> (ø) ⬆️
packages/core/src/server/server.injector.ts 100% <100%> (ø) ⬆️
packages/core/src/effects/effects.combiner.ts 100% <100%> (ø) ⬆️
packages/core/src/server/server.factory.ts 100% <100%> (ø) ⬆️
...ages/websockets/src/listener/websocket.listener.ts 100% <100%> (ø) ⬆️
packages/core/src/server/server.token.ts 100% <100%> (ø)
... and 3 more

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 bce8abf...13aec28. Read the comment docs.

@JozefFlakus JozefFlakus merged commit d11b842 into next Jan 22, 2019

2 checks passed

Travis CI - Pull Request Build Passed
Details
codecov/patch 100% of diff hit (target 100%)
Details

@marblejs/next automation moved this from In progress to Done Jan 22, 2019

@JozefFlakus JozefFlakus deleted the imp/next/injector branch Jan 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.