-
Notifications
You must be signed in to change notification settings - Fork 354
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: add @opensumi/ide-utils module #784
Conversation
针对部分工具方法可能存在重复方法问题,如 import { path } from '@opensumi/ide-core-common';
const { Path } = path; 详细改动见:utils/src/index.ts |
e6def14
to
b1bf9e7
Compare
cd8d025
to
98d38e1
Compare
c2f4f35
to
6118b6d
Compare
6118b6d
to
a6f2f05
Compare
这种集成方式嵌了太多套了 |
只有部分方法这样嵌套,因为本身方法名重复度太高了,这个是兼容的写法,如果不希望嵌套,可以直接从 |
/publish |
🎉 Pre-Release version 2.16.7-next-1649304413.0 publish successful! You can install prerelease version via |
/publish |
1 similar comment
/publish |
🎉 Pre-Release version 2.16.7-next-1649326301.0 publish successful! You can install prerelease version via |
Codecov Report
@@ Coverage Diff @@
## main #784 +/- ##
==========================================
- Coverage 58.62% 58.48% -0.14%
==========================================
Files 1216 1220 +4
Lines 75477 75099 -378
Branches 15708 15616 -92
==========================================
- Hits 44248 43922 -326
+ Misses 28464 28417 -47
+ Partials 2765 2760 -5
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Types
Background or solution
抽取了一部分
ide-core-common
和ide-components
中的公共 utils 新建了一个@opensumi/ide-utils
模块,统一维护,解决循环引用,重复代码等问题的同时对全局 utils 方法进行归类,让代码更精简。相关问题:
@opensumi/di
#130修改内容如下:
packages/extension/src/common/vscode
和packages/components/src/browser/utils
下的工具方法进行规整,后续直接依赖@opensumi/ide-utils
core-common/src/utils
中重复定义的方法import { Event, Uri } from '..';
. 等写法Changelog
add @opensumi/ide-utils module