-
Notifications
You must be signed in to change notification settings - Fork 450
Breaking Changes
For some reason, in v2.x.y there may also be a Break Change in the x bit.
- 修改了三个 Tabbar 位置的名称,使用更语义化的 view、extendView、panel 代替原来的 left、right、bottom,请在引用 SlotLocation 的位置修改
- layout 相关命令,统一移动到了
@opensumi/ide-main-layout/lib/browser/command路径下,使用旧 tab 位置的 command,如main-layout.left-panel.toggle等也将在下个版本废弃,改为对应的main-layout.view.toggle等更语义化的版本 - 注册 slotRenderer 时增加了
TabbarBehaviorConfig,声明该 Renderer 的一些行为,如是否支持完全展开等
- 删除了 xterm 依赖
- 引用了新的 @xterm/xterm 依赖
- 需要在集成方的 webpack 中添加
experiments: { asyncWebAssembly: true }配置
如果你使用了 OpenSumi 的 Popover 组件,我们优化了一下该组件的参数。
仅需传入一个 className 即可。
由于循环依赖 原来从 @opensumi/ide-comments 里引入的 toRange 要换成 positionToRange.
同时 positionToRange 要从 @opensumi/ide-monaco 里引入了。
3.0 已经移除了对 vscode-jsonrpc 的依赖,如果你仍在使用并遇到以下报错:
Uncaught (in promise) Error: No runtime abstraction layer installed
at RAL (xxx.js:xx:x)
请在你的前端代码顶部加入一句 import '@opensumi/vscode-jsonrpc/lib/node/main';
- import { ExplorerOpenedEditorViewId } from '@opensumi/ide-opened-editor/lib/browser/opened-editor.contribution'
+ import { ExplorerOpenedEditorViewId } from '@opensumi/ide-opened-editor'Please see our CHANGELOG.md
We added a new Provider in ElectronBasicModule: ElectronHeaderService, which allow you change the header text in Electron.

The registerColor function's parameter changed:
import { registerColor, Color } from '@opensumi/ide-theme/lib';
/* default button */
export const defaultButtonForeground = registerColor(
'xxxx',
{ dark: '#D7DBDE', light: '#4D4D4D', hcDark: Color.black, hcLight: Color.white },
localize('xxxx', 'Danger Ghost Button Foreground color.')
);The Terminal View ID changed from TerminalContainerId to TERMINAL_CONTAINER_ID.
Common dependencies such as TERMINAL_COMMANDS, LAYOUT_COMMANDS, MARKER_COMMANDS, SCM_COMMANDS, QUICK_OPEN_COMMANDS are moved to common.command.ts file, you need to adjust the import path when using it.
It is recommended to uniformly import it through the following paths:
import { TERMINAL_COMMANDS } from '@opensumi/ide-core-browser';Removed the ide- prefix in the ID to make it consistent with how the view IDs of other regions of the framework are named.
- export const MARKER_CONTAINER_ID = 'ide-markers';
+ export const MARKER_CONTAINER_ID = 'markers';- const OUTPUT_CONTAINER_ID = 'ide-output';
+ const OUTPUT_CONTAINER_ID = 'output';In order to further improve the monitoring performance and accuracy of the framework file service, we replace the nsfw dependency with @parcel/watcher in this version.
It is recommended to replace the relevant version dependencies globally as follows:
- "nsfw": "2.1.2"
+ "@parcel/watcher": "2.0.5"At the same time, you also need to replace nsfw in build native dependencies with @parcel/watcher, as in webpack.node.config.ts:
externals: [
({ context, request }, callback) => {
- if (['node-pty', 'nsfw', 'spdlog', '@opensumi/vscode-ripgrep', 'vm2', 'keytar'].indexOf(request || '') !== -1) {
+ if (['node-pty', '@parcel/watcher', 'spdlog', '@opensumi/vscode-ripgrep', 'vm2', 'keytar'].indexOf(request || '') !== -1) {
return callback(undefined, `commonjs ${request}`);
}
callback();
},
],The same is true for other modifications. It is recommended to search for nsfw directly in the project repository and replace them one by one.
Fix the typo in the INodePtyInstance object returned by TerminalServiceClientImpl.create2 #1528
// packages/terminal-next/src/node/terminal.service.client.ts
export interface INodePtyInstance {
id: string;
name: string;
pid: number;
- proess: string;
+ process: string;
shellPath?: string;
}Remove ITerminalClientFactory, please replace with ITerminalClientFactory2, the usage remains the same #1528
- @Autowired(ITerminalClientFactory)
- protected readonly clientFactory: ITerminalClientFactory;
+ @Autowired(ITerminalClientFactory2)
+ protected readonly clientFactory2: ITerminalClientFactory2;
createTerminal() {
- const client = await this.clientFactory(widget, /** @type TerminalOptions */ options);
+ const client = await this.clientFactory2(widget, /** @type ICreateTerminalOptions */ options);
}
ITerminalController API Changed #1528
- Change from
createClientWithWidget2tocreateTerminalWithWidgetByTerminalOptions - Remove
createClientWithWidget
Some of the function name changed:
createTerminal(options: ICreateTerminalOptions): Promise<ITerminalClient>;
createTerminalWithWidget(options: ICreateTerminalOptions): Promise<ITerminalClient>;
createTerminalWithWidgetByTerminalOptions(options: ICreateClientWithWidgetOptions): Promise<ITerminalClient>;If you were using createClientWithWidget before, you can change it to:
- this.terminalController.createClientWithWidget({
- name: terminalName,
- shellArgs: ['-c', ...args],
- cwd: cwd,
- })
+ this.terminalController.createTerminalWithWidgetByTerminalOptions({
+ terminalOptions: {
+ name: terminalName,
+ shellArgs: ['-c', ...args],
+ cwd: cwd,
+ },
+ });
ITerminalClient remove options property and add launchConfig property #1528
The TerminalOptions type was originally only used as an input parameter for the plugin API to create a terminal. We need to use IShellLaunchConfig to create a terminal within the entire OpenSumi.
We implemented IShellLaunchConfig on v2.15.0 and is compatible with the previous TerminalOptions notation.
And ITerminalClient has an attribute _terminalOptions to save the parameters when it was created, and the external can get the value through the options getter. Since v2.20.0, we have removed all TerminalOptions logic inside ITerminalClient, the changes are as follows:
class TerminalClient {
- get options() {
- return this._terminalOptions;
- }
- updateOptions(options: TerminalOptions) {
- // ...
- }
-
+ get launchConfig(): IShellLaunchConfig {
+ return this._launchConfig;
+ }
+ updateLaunchConfig(launchConfig: IShellLaunchConfig) {
+ // ...
+ }
+ updateTerminalName(options: ITerminalNameOptions) {
+ // ...
+ }
}For example, .options is useful for the value of TerminalClient in Task, and now all are changed to .launchConfig, the changes are visible: #1528。
Changes:
- import { IWorkspaceService } from '@opensumi/ide-workspace/lib/common/workspace-defination';
+ import { IWorkspaceService } from '@opensumi/ide-workspace';- import { IMainLayoutService } from '@opensumi/ide-main-layout/lib/common/main-layout.defination';
+ import { IMainLayoutService } from '@opensumi/ide-main-layout';Due to the updated version of Monaco Editor (0.35.x), you need to upgrade the dependent vscode-textmate and vscode-origuruma to the latest version
- "vscode-textmate": "5.4.0"
+ "vscode-textmate": "7.0.1"- "vscode-oniguruma": "1.5.1"
+ "vscode-oniguruma": "1.6.1"Change Schemas to Schemes #1013
Fix the wrong spelling problem, and let Schemes define variables as a global scheme for easy reuse.
Change Explorer Container ID from ExplorerContainerId to EXPLORER_CONTAINER_ID #784
Since there are multiple ways to write the global view ID, all subsequent view IDs are unified in all uppercase format, such as EXPLORER_CONTAINER_ID, and the used integrator needs to be referenced in the following way:
import { EXPLORER_CONTAINER_ID } from '@opensumi/ide-explorer/lib/browser/explorer-contribution';Added @opensumi/ide-utils module, and adjusted the introduction method of some tool methods #784
Due to the repeated content of tools and methods in opensumi, in this version, we have summarized the utils-related codes, removed most of the unnecessary methods, and extracted the @opensumi/ide-utils module. You can still import corresponding tool methods from @opensumi/ide-core-common, @opensumi/ide-core-browser, @opensumi/ide-core-node.
There are the following changes in simultaneous use:
For some tool methods, there may be duplicate method problems, such as strings, objects, arrays, path and other methods, and you need to obtain specific methods in the following ways:
import { path } from '@opensumi/ide-core-common';
const { Path } = path;See the changes here:utils/src/index.ts
Replaced the parse method in the glob utility method with the more explicit notation of parseGlob.