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: remove egg-core from midway-core #159

Merged
merged 8 commits into from
Mar 6, 2019
Merged

Conversation

czy88840616
Copy link
Member

@czy88840616 czy88840616 commented Mar 5, 2019

这个 mr 是希望在 midway-core 这层和 egg-loader 解耦,把和 egg 相关的依赖都放到 midway-web 中,这样 midway-core 可以用在其他的场景,例如 faas。

  • 移除 midway-core 中跟 egg-loader 相关联的部分,转为放到 midway-web 中。
  • 移除 midway 中的 egg 定义,放到 midway-web 中,这样 midway 只需要导出一个 midway-web 即可
  • 抽象 core 中的 ContainerLoader 部分,方便其他场景使用初始化 ioc
  • 剥离 @plugin/@config/@logger 到 midway-decorator 包,统一管理
  • 移除 pluginContext 的代理 app 的逻辑,@plugin 目前直接从 app 上拿插件

"camelcase": "^5.0.0",
"debug": "^4.1.1",
"egg-core": "^4.14.1",
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

他这个是可以自己增加特定目录的加载器,貌似我们暂时用不到了。

@codecov-io
Copy link

Codecov Report

Merging #159 into master will increase coverage by 2.15%.
The diff coverage is 91.72%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #159      +/-   ##
=========================================
+ Coverage   85.95%   88.1%   +2.15%     
=========================================
  Files          41      36       -5     
  Lines         762     656     -106     
  Branches       45      42       -3     
=========================================
- Hits          655     578      -77     
+ Misses         97      68      -29     
  Partials       10      10
Impacted Files Coverage Δ
packages/midway/src/index.ts 100% <ø> (ø) ⬆️
packages/midway-core/src/requestContainer.ts 83.33% <ø> (+30.2%) ⬆️
packages/midway-core/src/providerWrapper.ts 100% <100%> (ø)
packages/midway-core/src/index.ts 100% <100%> (ø) ⬆️
packages/midway-core/src/constant.ts 100% <100%> (ø)
packages/midway-web/src/loader/loader.ts 100% <100%> (ø) ⬆️
packages/midway-core/src/container.ts 87.93% <100%> (+2.21%) ⬆️
packages/midway-web/src/index.ts 100% <100%> (ø) ⬆️
packages/midway-web/src/utils.ts 96% <75%> (-4%) ⬇️
packages/midway-web/src/loader/webLoader.ts 91.26% <88%> (-8.74%) ⬇️
... and 5 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 fef300b...fb620f7. Read the comment docs.

@czy88840616
Copy link
Member Author

这次重构属于内部调整,我先发 next 版本,等内部一段时间后,再切 latest。

@czy88840616 czy88840616 merged commit 217ec2b into master Mar 6, 2019
@czy88840616 czy88840616 deleted the refactor_core branch March 6, 2019 02:33
czy88840616 pushed a commit that referenced this pull request Mar 6, 2019
Merge pull request #159 from midwayjs/refactor_core

refactor: remove egg-core from midway-core
@czy88840616
Copy link
Member Author

czy88840616 commented Mar 8, 2019

  • 状态同步:内部 midway 包已切 latest
  • 状态同步:外部 midway 切到 latest
  • 状态同步:injection 切 latest

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.

None yet

4 participants