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

feat: support inject in lifecycle #145

Merged
merged 4 commits into from
Aug 1, 2022
Merged

Conversation

hyj1991
Copy link
Member

@hyj1991 hyj1991 commented Jul 15, 2022

ref: #143

@JerrysShan
Copy link
Collaborator

之前专门为 lifecycle 实现的装饰器貌似可以移除了

@hyj1991
Copy link
Member Author

hyj1991 commented Jul 27, 2022

之前专门为 lifecycle 实现的装饰器貌似可以移除了

现在是存储 lifecycle 的 class 吧?看起来不能移除

@JerrysShan
Copy link
Collaborator

现在是存储 lifecycle 的 class 吧?看起来不能移除

WithApplication , WithContainer 这几个好像是 lifecycyle 专用吧

@hyj1991
Copy link
Member Author

hyj1991 commented Jul 27, 2022

对,这两个是可以去掉了,稍后我再改下

@JerrysShan
Copy link
Collaborator

这个进度如何了,什么时候可以合并

@codecov-commenter
Copy link

codecov-commenter commented Aug 1, 2022

Codecov Report

Merging #145 (608128c) into master (6945a13) will decrease coverage by 0.18%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #145      +/-   ##
==========================================
- Coverage   89.44%   89.25%   -0.19%     
==========================================
  Files          51       51              
  Lines        1108     1089      -19     
  Branches      182      178       -4     
==========================================
- Hits          991      972      -19     
  Misses        117      117              
Impacted Files Coverage Δ
src/constant.ts 100.00% <ø> (ø)
src/decorator.ts 92.30% <100.00%> (-3.70%) ⬇️
src/index.ts 100.00% <100.00%> (ø)
src/lifecycle/index.ts 82.35% <100.00%> (-0.99%) ⬇️
src/loader/impl/lifecycle.ts 100.00% <100.00%> (ø)

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 6945a13...608128c. Read the comment docs.

@hyj1991
Copy link
Member Author

hyj1991 commented Aug 1, 2022

cc @noahziheng @JerrysShan ,合并了 master,去除了 WithXXX 的 API 已经更新了对应的 test case

Copy link
Member

@noahziheng noahziheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好像没有在 set 的时候用上 lazy?@hyj1991 @JerrysShan

@hyj1991
Copy link
Member Author

hyj1991 commented Aug 1, 2022

我确认下 lazy set 如何实现的

Copy link
Member

@noahziheng noahziheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@noahziheng noahziheng merged commit 6f79b40 into artusjs:master Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants