Skip to content

Commit

Permalink
Update electron and node packages
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Moran <rob.moran@arm.com>
  • Loading branch information
thegecko committed Apr 1, 2019
1 parent 6365339 commit 8add844
Show file tree
Hide file tree
Showing 15 changed files with 189 additions and 147 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sudo: required
language: node_js
node_js: '8'
node_js: '10'
git:
depth: 1
cache:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
## v0.6.0

- [filesystem] added the menu item `Upload Files...` to easily upload files into a workspace
- [electron] upgraded version of electron used to version 3.

Breaking changes:

- [node] moved to using Node.js version 10, dropping support for Node.js version 8.

## v0.5.0

Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ shallow_clone: true

environment:
matrix:
- nodejs_version: "8"
- nodejs_version: "10"

platform:
- x64
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/application-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"circular-dependency-plugin": "^5.0.0",
"copy-webpack-plugin": "^4.5.0",
"css-loader": "^0.28.1",
"electron": "^2.0.14",
"electron": "^3.1.7",
"electron-rebuild": "^1.5.11",
"file-loader": "^1.1.11",
"font-awesome-webpack": "0.0.5-beta.2",
Expand Down
7 changes: 3 additions & 4 deletions doc/Developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ For Windows instructions [click here](#building-on-windows).
- [Root privileges errors](#root-privileges-errors)

## Prerequisites
- Node.js `>= 8.x`, `< 9.x`.
- Preferably, **use** version `8.11.4`, it has the [active LTS](https://github.com/nodejs/Release).
- Node.js `9.x` is untested.
- Node.js `10.x` is **not** supported yet due to a known issue in [`nsfw`](https://github.com/theia-ide/theia/issues/2009).
- Node.js `>= 10.2.0`.
- Preferably, **use** version `10.15.3`, it has the [active LTS](https://github.com/nodejs/Release).
- Node.js `11.x` is untested.
- [Yarn package manager](https://yarnpkg.com/en/docs/install) v1.7.0
- git (If you would like to use the Git-extension too, you will need to have git version 2.11.0 or higher.)

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
"version": "0.0.0",
"engines": {
"yarn": "1.0.x || >=1.2.1",
"node": ">=8.9.3"
"node": ">=10.2.0"
},
"resolution": {
"**/@types/node": "8.10.20"
"**/@types/node": "~10.3.6"
},
"devDependencies": {
"@types/chai": "^4.0.1",
"@types/chai-string": "^1.4.0",
"@types/jsdom": "^11.0.4",
"@types/mocha": "^2.2.41",
"@types/node": "8.10.20",
"@types/node": "~10.3.6",
"@types/sinon": "^2.3.5",
"@types/temp": "^0.8.29",
"@types/webdriverio": "^4.7.0",
Expand All @@ -39,7 +39,7 @@
"typedoc-plugin-external-module-map": "^1.0.0",
"typescript": "^3.1.3",
"uuid": "^3.1.0",
"wdio-mocha-framework": "0.5.13",
"wdio-mocha-framework": "0.6.4",
"wdio-selenium-standalone-service": "0.0.12",
"wdio-spec-reporter": "0.1.5",
"webdriverio": "4.14.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/yargs": "^11.1.0",
"ajv": "^6.5.3",
"body-parser": "^1.17.2",
"electron": "^2.0.14",
"electron": "^3.1.7",
"electron-store": "^2.0.0",
"es6-promise": "^4.2.4",
"express": "^4.16.3",
Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/browser/tree/tree.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ describe('Tree', () => {
const expectedRefreshedNodes = new Set([
retrieveNode<CompositeTreeNode>('1'),
retrieveNode<CompositeTreeNode>('1.1'),
retrieveNode<CompositeTreeNode>('1.2'),
retrieveNode<CompositeTreeNode>('1.2.1')]);
retrieveNode<CompositeTreeNode>('1.2')]);
model.onNodeRefreshed((e: Readonly<CompositeTreeNode>) => {
result = result && expectedRefreshedNodes.has(e);
expectedRefreshedNodes.delete(e);
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/node/backend-application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { ILogger, ContributionProvider, MaybePromise } from '../common';
import { CliContribution } from './cli';
import { Deferred } from '../common/promise-util';
import { environment } from '../common/index';
import { AddressInfo } from 'net';

export const BackendApplicationContribution = Symbol('BackendApplicationContribution');
export interface BackendApplicationContribution {
Expand Down Expand Up @@ -185,7 +186,7 @@ export class BackendApplication {

server.listen(port, hostname, () => {
const scheme = this.cliParams.ssl ? 'https' : 'http';
this.logger.info(`Theia app listening on ${scheme}://${hostname || 'localhost'}:${server.address().port}.`);
this.logger.info(`Theia app listening on ${scheme}://${hostname || 'localhost'}:${(server.address() as AddressInfo).port}.`);
deferred.resolve(server);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import * as http from 'http';
import * as https from 'https';
import { WebSocketChannel } from '../../../common/messaging/web-socket-channel';
import { Disposable } from '../../../common/disposable';
import { AddressInfo } from 'net';

export class TestWebSocketChannel extends WebSocketChannel {

Expand All @@ -27,7 +28,7 @@ export class TestWebSocketChannel extends WebSocketChannel {
path: string
}) {
super(0, content => socket.send(content));
const socket = new ws(`ws://localhost:${server.address().port}${WebSocketChannel.wsPath}`);
const socket = new ws(`ws://localhost:${(server.address() as AddressInfo).port}${WebSocketChannel.wsPath}`);
socket.on('error', error =>
this.fireError(error)
);
Expand Down
3 changes: 2 additions & 1 deletion packages/git/src/electron-node/askpass/askpass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { MaybePromise } from '@theia/core/lib/common/types';
import { Deferred } from '@theia/core/lib/common/promise-util';
import { GitPrompt } from '../../common/git-prompt';
import { DugiteGitPromptServer } from '../../node/dugite-git-prompt';
import { AddressInfo } from 'net';

/**
* Environment for the Git askpass helper.
Expand Down Expand Up @@ -89,7 +90,7 @@ export class Askpass implements Disposable {
return new Promise<Address>(resolve => {
this.server.on('error', err => this.logger.error(err));
this.server.listen(0, this.hostname(), () => {
resolve(this.server.address());
resolve(this.server.address() as AddressInfo);
});
});
} catch (err) {
Expand Down
5 changes: 3 additions & 2 deletions packages/java/src/node/java-contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { JAVA_LANGUAGE_ID, JAVA_LANGUAGE_NAME, JavaStartParams } from '../common
import { JavaCliContribution } from './java-cli-contribution';
import { ContributionProvider } from '@theia/core';
import { JavaExtensionContribution } from './java-extension-model';
import { AddressInfo } from 'net';
const sha1 = require('sha1');

export type ConfigurationType = 'config_win' | 'config_mac' | 'config_linux';
Expand Down Expand Up @@ -137,8 +138,8 @@ export class JavaContribution extends BaseLanguageServerContribution {
this.logInfo('logs at ' + path.resolve(workspacePath, '.metadata', '.log'));
const env = Object.create(process.env);
const address = server.address();
env.CLIENT_HOST = address.address;
env.CLIENT_PORT = address.port;
env.CLIENT_HOST = (address as AddressInfo).address;
env.CLIENT_PORT = (address as AddressInfo).port;
const serverConnection = await this.createProcessSocketConnection(socket, socket, command, args, { env });
this.forward(clientConnection, serverConnection);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class MarkdownPreviewHandler implements PreviewHandler {
if (!elementToReveal) {
return;
}
elementToReveal.scrollIntoView({ behavior: 'instant' });
elementToReveal.scrollIntoView();
}

findElementForFragment(content: HTMLElement, link: string): HTMLElement | undefined {
Expand Down
4 changes: 2 additions & 2 deletions packages/preview/src/browser/preview-widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export class PreviewWidget extends BaseWidget implements Navigatable {
const elementToReveal = this.previewHandler.findElementForFragment(this.node, uri.fragment);
if (elementToReveal) {
this.preventScrollNotification = true;
elementToReveal.scrollIntoView({ behavior: 'instant' });
elementToReveal.scrollIntoView();
window.setTimeout(() => {
this.preventScrollNotification = false;
}, 50);
Expand All @@ -225,7 +225,7 @@ export class PreviewWidget extends BaseWidget implements Navigatable {
const elementToReveal = this.previewHandler.findElementForSourceLine(this.node, sourceLine);
if (elementToReveal) {
this.preventScrollNotification = true;
elementToReveal.scrollIntoView({ behavior: 'instant' });
elementToReveal.scrollIntoView();
window.setTimeout(() => {
this.preventScrollNotification = false;
}, 50);
Expand Down

0 comments on commit 8add844

Please sign in to comment.