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

fix: component inject global object and add case #663

Merged
merged 4 commits into from
Oct 8, 2020

Conversation

czy88840616
Copy link
Member

@czy88840616 czy88840616 commented Oct 7, 2020

在手动调用 registerObject 的时候把 key 存起来,bind 的时候判断是否增加前缀。修复在组件中注入baseDir等找不到对象的问题。

  • 全局注入 baseDir/appDir
  • 全局注入 onReady 中 registerObject 的对象
  • 组件注入组件自己 onReady 中 registerObject 的对象
  • 组件注入全局的 baseDir/appDir
  • 组件注入 Main 中 onReady 中 registerObject 的对象

@gitpod-io
Copy link

gitpod-io bot commented Oct 7, 2020

@codecov-io
Copy link

codecov-io commented Oct 7, 2020

Codecov Report

Merging #663 into 2.x will decrease coverage by 2.19%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              2.x     #663      +/-   ##
==========================================
- Coverage   84.58%   82.38%   -2.20%     
==========================================
  Files          96      101       +5     
  Lines        3995     4270     +275     
  Branches      656      685      +29     
==========================================
+ Hits         3379     3518     +139     
- Misses        603      719     +116     
- Partials       13       33      +20     
Impacted Files Coverage Δ
packages/core/src/context/container.ts 100.00% <ø> (ø)
packages/core/src/interface.ts 100.00% <ø> (ø)
packages/core/src/context/applicationContext.ts 99.31% <100.00%> (+<0.01%) ⬆️
packages/core/src/context/configuration.ts 99.21% <100.00%> (ø)
...ackages/core/src/context/managedResolverFactory.ts 100.00% <100.00%> (ø)
packages/core/src/context/midwayContainer.ts 94.55% <100.00%> (+0.34%) ⬆️
packages/mock/src/utils.ts 75.00% <100.00%> (+0.39%) ⬆️
packages/decorator/src/faas/fun.ts 86.66% <0.00%> (ø)
packages/decorator/src/common/decoratorManager.ts 97.32% <0.00%> (ø)
packages/web/dist/framework.js 50.60% <0.00%> (ø)
... and 4 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 7ba7f8a...e12537b. Read the comment docs.

@czy88840616 czy88840616 merged commit e768ee8 into 2.x Oct 8, 2020
@czy88840616 czy88840616 deleted the fix_component_inject_appdir branch October 8, 2020 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants