Skip to content

Commit

Permalink
Uplift theia dependencies from v1.37.2 to 1.40.1
Browse files Browse the repository at this point in the history
Perform a 'yarn upgrade' to keep the yarn.lock fully aligned.

Base this uplifted-to Theia version on community [1]'s below.

Fixed compilation error by making constructors of injectable classes
public.

Align to @postContruct changes of new inversify version [2]. Use Theia's
re-export dependencies for inversify according to [3]

Change electron-main location to ../src-gen/backend/ instead of
../src-gen/frontend due to breaking change described here [4]

[1] https://theia-ide.org/releases/
[2] https://github.com/eclipse-theia/theia/blob/master/doc/Migration.md#inversify-60
[3] https://github.com/eclipse-theia/theia/blob/master/packages/core/README.md#re-exports
[4] https://github.com/eclipse-theia/theia/blob/master/CHANGELOG.md#breaking_changes_1.39.0

Signed-off-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
  • Loading branch information
bhufmann committed Sep 8, 2023
1 parent d18ca4e commit 22877a9
Show file tree
Hide file tree
Showing 31 changed files with 1,830 additions and 1,658 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"windows": {
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd"
},
"program": "${workspaceRoot}/examples/electron/src-gen/frontend/electron-main.js",
"program": "${workspaceRoot}/examples/electron/src-gen/backend/electron-main.js",
"cwd": "${workspaceFolder}/examples/electron",
"protocol": "inspector",
"args": [
Expand Down
30 changes: 15 additions & 15 deletions examples/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@
}
},
"dependencies": {
"@theia/core": "1.37.2",
"@theia/editor": "1.37.2",
"@theia/filesystem": "1.37.2",
"@theia/getting-started": "1.37.2",
"@theia/keymaps": "1.37.2",
"@theia/markers": "1.37.2",
"@theia/messages": "1.37.2",
"@theia/monaco": "1.37.2",
"@theia/navigator": "1.37.2",
"@theia/preferences": "1.37.2",
"@theia/process": "1.37.2",
"@theia/terminal": "1.37.2",
"@theia/vsx-registry": "1.37.2",
"@theia/workspace": "1.37.2",
"@theia/core": "1.40.1",
"@theia/editor": "1.40.1",
"@theia/filesystem": "1.40.1",
"@theia/getting-started": "1.40.1",
"@theia/keymaps": "1.40.1",
"@theia/markers": "1.40.1",
"@theia/messages": "1.40.1",
"@theia/monaco": "1.40.1",
"@theia/navigator": "1.40.1",
"@theia/preferences": "1.40.1",
"@theia/process": "1.40.1",
"@theia/terminal": "1.40.1",
"@theia/vsx-registry": "1.40.1",
"@theia/workspace": "1.40.1",
"theia-traceviewer": "0.1.0"
},
"devDependencies": {
"@theia/cli": "1.37.2"
"@theia/cli": "1.40.1"
},
"scripts": {
"prepare": "theia build --mode development",
Expand Down
30 changes: 15 additions & 15 deletions examples/docker/example-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@
}
},
"dependencies": {
"@theia/core": "1.37.2",
"@theia/editor": "1.37.2",
"@theia/filesystem": "1.37.2",
"@theia/getting-started": "1.37.2",
"@theia/keymaps": "1.37.2",
"@theia/markers": "1.37.2",
"@theia/messages": "1.37.2",
"@theia/monaco": "1.37.2",
"@theia/navigator": "1.37.2",
"@theia/preferences": "1.37.2",
"@theia/process": "1.37.2",
"@theia/terminal": "1.37.2",
"@theia/vsx-registry": "1.37.2",
"@theia/workspace": "1.37.2",
"@theia/core": "1.40.1",
"@theia/editor": "1.40.1",
"@theia/filesystem": "1.40.1",
"@theia/getting-started": "1.40.1",
"@theia/keymaps": "1.40.1",
"@theia/markers": "1.40.1",
"@theia/messages": "1.40.1",
"@theia/monaco": "1.40.1",
"@theia/navigator": "1.40.1",
"@theia/preferences": "1.40.1",
"@theia/process": "1.40.1",
"@theia/terminal": "1.40.1",
"@theia/vsx-registry": "1.40.1",
"@theia/workspace": "1.40.1",
"theia-traceviewer": "next"
},
"devDependencies": {
"@theia/cli": "1.37.2"
"@theia/cli": "1.40.1"
},
"scripts": {
"prepare": "theia build",
Expand Down
2 changes: 1 addition & 1 deletion examples/electron/electron-builder.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
electronVersion: 23.3.6
electronVersion: 23.3.13
electronDist: ../../node_modules/electron/dist
productName: Theia Trace Example Application
appId: theia-trace-example
Expand Down
32 changes: 16 additions & 16 deletions examples/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,25 @@
}
},
"dependencies": {
"@theia/core": "1.37.2",
"@theia/editor": "1.37.2",
"@theia/electron": "1.37.2",
"@theia/filesystem": "1.37.2",
"@theia/getting-started": "1.37.2",
"@theia/keymaps": "1.37.2",
"@theia/markers": "1.37.2",
"@theia/messages": "1.37.2",
"@theia/monaco": "1.37.2",
"@theia/navigator": "1.37.2",
"@theia/preferences": "1.37.2",
"@theia/process": "1.37.2",
"@theia/terminal": "1.37.2",
"@theia/vsx-registry": "1.37.2",
"@theia/workspace": "1.37.2",
"@theia/core": "1.40.1",
"@theia/editor": "1.40.1",
"@theia/electron": "1.40.1",
"@theia/filesystem": "1.40.1",
"@theia/getting-started": "1.40.1",
"@theia/keymaps": "1.40.1",
"@theia/markers": "1.40.1",
"@theia/messages": "1.40.1",
"@theia/monaco": "1.40.1",
"@theia/navigator": "1.40.1",
"@theia/preferences": "1.40.1",
"@theia/process": "1.40.1",
"@theia/terminal": "1.40.1",
"@theia/vsx-registry": "1.40.1",
"@theia/workspace": "1.40.1",
"theia-traceviewer": "0.1.0"
},
"devDependencies": {
"@theia/cli": "1.37.2",
"@theia/cli": "1.40.1",
"electron": "^23.2.4",
"electron-builder": "~23.6.0"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/electron/scripts/theia-trace-main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { resolve } = require('path');

process.env.THEIA_DEFAULT_PLUGINS = `local-dir:${resolve(__dirname, '..', 'plugins')}`;
require('../src-gen/frontend/electron-main');
require('../src-gen/backend/electron-main');
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@types/react-dom": "^18.0.6"
},
"devDependencies": {
"@theia/cli": "1.37.2",
"@theia/cli": "1.40.1",
"jsonc-parser": "^3.0.0",
"lerna": "^4.0.0",
"prettier": "2.8.8",
Expand Down Expand Up @@ -127,6 +127,8 @@
"dependencies": {
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@mui/material": "^5.10.14"
"@mui/material": "^5.10.14",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6"
}
}
6 changes: 3 additions & 3 deletions theia-extensions/viewer-prototype/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"style"
],
"dependencies": {
"@theia/core": "1.37.2",
"@theia/editor": "1.37.2",
"@theia/filesystem": "1.37.2",
"@theia/core": "1.40.1",
"@theia/editor": "1.40.1",
"@theia/filesystem": "1.40.1",
"traceviewer-base": "0.1.0",
"traceviewer-react-components": "0.1.0",
"tree-kill": "latest",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Messages from 'traceviewer-base/lib/message-manager';
import { inject, injectable } from 'inversify';
import { inject, injectable } from '@theia/core/shared/inversify';
import { StatusBar, StatusBarAlignment } from '@theia/core/lib/browser';

/* eslint-disable @typescript-eslint/no-unused-vars */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { injectable } from 'inversify';
import { injectable } from '@theia/core/shared/inversify';
import { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-contribution';
import { TraceExplorerWidget } from './trace-explorer-widget';
import { FrontendApplicationContribution, FrontendApplication } from '@theia/core/lib/browser';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { inject, injectable } from 'inversify';
import { inject, injectable } from '@theia/core/shared/inversify';
import { DialogProps } from '@theia/core/lib/browser/dialogs';
import { ReactDialog } from '@theia/core/lib/browser/dialogs/react-dialog';
import { Message } from '@theia/core/lib/browser/widgets/widget';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { inject, injectable, postConstruct } from 'inversify';
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
import { ReactWidget, Widget, WidgetManager } from '@theia/core/lib/browser';
import * as React from 'react';
import { Experiment } from 'tsp-typescript-client/lib/models/experiment';
Expand Down Expand Up @@ -30,7 +30,11 @@ export class TraceExplorerOpenedTracesWidget extends ReactWidget {
private _experimentManager!: ExperimentManager;

@postConstruct()
async init(): Promise<void> {
protected init(): void {
this.doInit();
}

protected async doInit(): Promise<void> {
this.id = TraceExplorerOpenedTracesWidget.ID;
this.title.label = TraceExplorerOpenedTracesWidget.LABEL;
this._experimentManager = this.tspClientProvider.getExperimentManager();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { inject, injectable, postConstruct } from 'inversify';
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
import { ReactWidget } from '@theia/core/lib/browser';
import * as React from 'react';
import { CommandService } from '@theia/core';
Expand All @@ -14,14 +14,10 @@ export class TraceExplorerPlaceholderWidget extends ReactWidget {
loading: false
};

private constructor() {
super();
}

@inject(CommandService) protected readonly commandService!: CommandService;

@postConstruct()
init(): void {
protected init(): void {
this.id = TraceExplorerPlaceholderWidget.ID;
this.title.label = TraceExplorerPlaceholderWidget.LABEL;
this.update();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { inject, injectable, postConstruct } from 'inversify';
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
import { Message, ReactWidget, Widget } from '@theia/core/lib/browser';
import * as React from 'react';
import { EditorOpenerOptions, EditorManager } from '@theia/editor/lib/browser';
Expand All @@ -13,7 +13,7 @@ export class TraceExplorerItemPropertiesWidget extends ReactWidget {
@inject(EditorManager) protected readonly editorManager!: EditorManager;

@postConstruct()
init(): void {
protected init(): void {
this.id = TraceExplorerItemPropertiesWidget.ID;
this.title.label = TraceExplorerItemPropertiesWidget.LABEL;
this.update();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { inject, injectable, postConstruct } from 'inversify';
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
import { ReactWidget, Widget, Message, WidgetManager } from '@theia/core/lib/browser';
import * as React from 'react';
import { ReactTimeRangeDataWidget } from 'traceviewer-react-components/lib/trace-explorer//trace-explorer-time-range-data-widget';
Expand All @@ -11,7 +11,7 @@ export class TraceExplorerTimeRangeDataWidget extends ReactWidget {
@inject(WidgetManager) protected readonly widgetManager!: WidgetManager;

@postConstruct()
init(): void {
protected init(): void {
this.id = TraceExplorerTimeRangeDataWidget.ID;
this.title.label = TraceExplorerTimeRangeDataWidget.LABEL;
this.update();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { inject, injectable, postConstruct } from 'inversify';
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
import { ReactWidget, Widget, Message, WidgetManager } from '@theia/core/lib/browser';
import { TspClientProvider } from '../../tsp-client-provider-impl';
import * as React from 'react';
Expand All @@ -13,7 +13,7 @@ export class TraceExplorerViewsWidget extends ReactWidget {
@inject(WidgetManager) protected readonly widgetManager!: WidgetManager;

@postConstruct()
init(): void {
protected init(): void {
this.id = TraceExplorerViewsWidget.ID;
this.title.label = TraceExplorerViewsWidget.LABEL;
this.update();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { inject, injectable, postConstruct } from 'inversify';
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
import { ReactWidget } from '@theia/core/lib/browser';
import * as React from 'react';
import { CommandService } from '@theia/core';
Expand All @@ -8,14 +8,10 @@ export class TraceExplorerServerStatusWidget extends ReactWidget {
static ID = 'trace-explorer-server-status-widget';
static LABEL = 'Trace Explorer Server Status Widget';

private constructor() {
super();
}

@inject(CommandService) protected readonly commandService!: CommandService;

@postConstruct()
init(): void {
protected init(): void {
this.id = TraceExplorerServerStatusWidget.ID;
this.title.label = TraceExplorerServerStatusWidget.LABEL;
this.update();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { injectable, inject, postConstruct, interfaces, Container } from 'inversify';
import { injectable, inject, postConstruct, interfaces, Container } from '@theia/core/shared/inversify';
import { TraceExplorerViewsWidget } from './trace-explorer-sub-widgets/theia-trace-explorer-views-widget';
import { ViewContainer, BaseWidget, Message, PanelLayout } from '@theia/core/lib/browser';
import { TraceExplorerItemPropertiesWidget } from './trace-explorer-sub-widgets/theia-trace-explorer-properties-widget';
Expand Down Expand Up @@ -57,7 +57,7 @@ export class TraceExplorerWidget extends BaseWidget {
}

@postConstruct()
init(): void {
protected init(): void {
this.id = TraceExplorerWidget.ID;
this.title.label = TraceExplorerWidget.LABEL;
this.title.caption = TraceExplorerWidget.LABEL;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { interfaces } from 'inversify';
import { interfaces } from '@theia/core/shared/inversify';
import { PreferenceService, createPreferenceProxy, PreferenceContribution } from '@theia/core/lib/browser';
import { OverviewPreferences, OverviewSchema } from './trace-overview-preference';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { interfaces } from 'inversify';
import { interfaces } from '@theia/core/shared/inversify';
import { PreferenceService, createPreferenceProxy, PreferenceContribution } from '@theia/core/lib/browser';
import { TracePreferences, ServerSchema } from './trace-server-preference';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { injectable } from 'inversify';
import { injectable } from '@theia/core/shared/inversify';
import { RestClient, ConnectionStatusListener } from 'tsp-typescript-client/lib/protocol/rest-client';

@injectable()
export class TraceServerConnectionStatusService {
private connectionStatusListener: ConnectionStatusListener;

private constructor() {
constructor() {
this.connectionStatusListener = (status: boolean) => {
TraceServerConnectionStatusService.renderStatus(status);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Emitter, Event, MessageService } from '@theia/core';
import { FrontendApplicationContribution } from '@theia/core/lib/browser';
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables/env-variables-protocol';
import { inject, injectable } from 'inversify';
import { inject, injectable } from '@theia/core/shared/inversify';
import { TraceServerConfigService } from '../common/trace-server-config';
import { TraceServerUrlProvider, TRACE_SERVER_DEFAULT_URL } from '../common/trace-server-url-provider';
import { TracePreferences, TRACE_PORT } from './trace-server-preference';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { injectable, inject } from 'inversify';
import { injectable, inject } from '@theia/core/shared/inversify';
import { CommandRegistry, CommandContribution, MessageService } from '@theia/core';
import {
WidgetOpenerOptions,
Expand Down Expand Up @@ -39,7 +39,7 @@ export class TraceViewerContribution
{
private tspClient: TspClient;

private constructor(@inject(TspClientProvider) private tspClientProvider: TspClientProvider) {
constructor(@inject(TspClientProvider) private tspClientProvider: TspClientProvider) {
super();
this.tspClient = this.tspClientProvider.getTspClient();
this.tspClientProvider.addTspClientChangeListener(tspClient => (this.tspClient = tspClient));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ContainerModule, Container } from 'inversify';
import { ContainerModule, Container } from '@theia/core/shared/inversify';
import {
WidgetFactory,
OpenHandler,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CommandContribution, CommandRegistry, DisposableCollection, Emitter, MenuModelRegistry } from '@theia/core';
import { ApplicationShell, ContextMenuRenderer, Widget } from '@theia/core/lib/browser';
import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
import { inject, injectable, postConstruct } from 'inversify';
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
import * as React from 'react';
import { signalManager, Signals } from 'traceviewer-base/lib/signals/signal-manager';
import { TraceExplorerOpenedTracesWidget } from '../trace-explorer/trace-explorer-sub-widgets/theia-trace-explorer-opened-traces-widget';
Expand Down
Loading

0 comments on commit 22877a9

Please sign in to comment.