Skip to content

Commit

Permalink
Ensure buildtime compatibility with Theia Community Release (#91)
Browse files Browse the repository at this point in the history
- Updates to Typescript 4.8
- Upgrades the resolved Theia versions to the latest Release (i.e. bump in yarn.lock)
- Bumps the version of eslint and related plugins to be compatible with TS 4.8
- Fixes two compilation errors introduced by the new TS version
  • Loading branch information
tortmayr committed Dec 2, 2022
1 parent efd153a commit ff3f30a
Show file tree
Hide file tree
Showing 4 changed files with 748 additions and 691 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@
"devDependencies": {
"@types/chai": "^4.2.12",
"@types/mocha": "^8.0.0",
"@typescript-eslint/eslint-plugin": "5.3.0",
"@typescript-eslint/parser": "5.3.0",
"@typescript-eslint/eslint-plugin": "5.39.0",
"@typescript-eslint/parser": "5.39.0",
"chai": "^4.2.0",
"eslint": "^8.1.0",
"eslint-config-prettier": "^8.3.0",
"eslint": "^8.24.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-no-null": "^1.0.2",
"jenkins-mocha": "^8.0.0",
Expand All @@ -60,7 +60,7 @@
"rimraf": "^3.0.2",
"semver": "^7.3.2",
"ts-node": "^8.10.2",
"typescript": "3.9.2"
"typescript": "^4.8.4"
},
"scripts": {
"clean": "rimraf lib artifacts",
Expand Down
2 changes: 1 addition & 1 deletion src/sprotty/theia-sprotty-context-menu-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function getBooleanValue(value: any, defaultValue: boolean) {
}

function isFunction(value: () => boolean | boolean): value is () => boolean {
return !!(value && value.constructor && value.call && value.apply);
return !!(value && value.constructor && value.apply);
}

function isBoolean(value: () => boolean | boolean): boolean {
Expand Down
15 changes: 7 additions & 8 deletions src/theia/diagram-widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ export class DiagramWidget extends BaseWidget implements StatefulWidget, Navigat

protected _modelSource: ModelSource;

readonly id: string;

get uri(): URI {
return new URI(this.options.uri);
}
Expand All @@ -84,18 +86,15 @@ export class DiagramWidget extends BaseWidget implements StatefulWidget, Navigat
return this.widgetId;
}

get id(): string {
return this.widgetId;
}

constructor(protected options: DiagramWidgetOptions,
readonly widgetId: string,
readonly diContainer: Container,
readonly connector?: TheiaSprottyConnector) {
readonly widgetId: string,
readonly diContainer: Container,
readonly connector?: TheiaSprottyConnector) {
super();
this.title.closable = true;
this.title.label = options.label;
this.title.iconClass = options.iconClass;
this.id = widgetId;
}

protected onAfterAttach(msg: Message): void {
Expand Down Expand Up @@ -196,7 +195,7 @@ export class DiagramWidget extends BaseWidget implements StatefulWidget, Navigat
* after creating the widget and before activating it, we use this method to wait for the
* SVG to be appended to the DOM.
*/
async getSvgElement(): Promise<HTMLElement | undefined> {
async getSvgElement(): Promise<HTMLElement | undefined> {
return new Promise<HTMLElement | undefined>((resolve) => {
let frames = 0;
const waitForSvg = () => {
Expand Down

0 comments on commit ff3f30a

Please sign in to comment.