Skip to content

Commit

Permalink
yarn upgrade
Browse files Browse the repository at this point in the history
Upgrade all our dependencies, according to our already specified ranges.

I had to tigthen some constraints because the latest version of some
packages cause issues. Notably, the typescript compiler has an issue on
3.6.3 but not 3.5.3, so I constrained it such as it wouldn't ever match
the version that causes issues.

In the long run, we should be more careful with the version ranges we
use, especially with runtime dependencies.

Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
  • Loading branch information
paul-marechal committed Sep 24, 2019
1 parent d4728ae commit e1467da
Show file tree
Hide file tree
Showing 23 changed files with 3,320 additions and 1,797 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cache:
# All directories need to be listed here, because Travis does not support globs.
# Auto generated by scripts/prepare-travis
# start_cache_directories
- /tmp/vscode-ripgrep-cache-1.2.4
- /tmp/vscode-ripgrep-cache-1.5.7
- dev-packages/application-manager/node_modules
- dev-packages/application-package/node_modules
- dev-packages/electron/node_modules
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 @@ -39,7 +39,7 @@
"circular-dependency-plugin": "^5.0.0",
"copy-webpack-plugin": "^4.5.0",
"css-loader": "^0.28.1",
"electron-rebuild": "^1.5.11",
"electron-rebuild": "~1.5.11",
"file-loader": "^1.1.11",
"font-awesome-webpack": "0.0.5-beta.2",
"fs-extra": "^4.0.2",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"@types/node": "~10.3.6",
"@types/sinon": "^2.3.5",
"@types/temp": "^0.8.29",
"@types/webdriverio": "^4.7.0",
"@types/uuid": "^3.4.3",
"@types/webdriverio": "^4.7.0",
"chai": "^4.1.0",
"chai-string": "^1.4.0",
"concurrently": "^3.5.0",
Expand All @@ -38,7 +38,7 @@
"tslint-language-service": "^0.9.9",
"typedoc": "^0.15.0-0",
"typedoc-plugin-external-module-map": "^1.0.0",
"typescript": "^3.1.3",
"typescript": "~3.5.3",
"uuid": "^3.2.1",
"wdio-mocha-framework": "0.6.4",
"wdio-selenium-standalone-service": "0.0.12",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/browser/logger-frontend-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const loggerFrontendModule = new ContainerModule(bind => {
const loggerWatcher = ctx.container.get(LoggerWatcher);
const connection = ctx.container.get(WebSocketConnectionProvider);
const target = connection.createProxy<ILoggerServer>(loggerPath, loggerWatcher.getLoggerClient());
function get<K extends keyof ILoggerServer>(_: ILoggerServer, property: K): ILoggerServer[K] {
function get<K extends keyof ILoggerServer>(_: ILoggerServer, property: K): ILoggerServer[K] | ILoggerServer['log'] {
if (property === 'log') {
return (name, logLevel, message, params) => {
ConsoleLogger.log(name, logLevel, message, params);
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/browser/shell/shell-layout-restorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ export class ShellLayoutRestorer implements CommandContribution {
const widget = await this.widgetManager.getOrCreateWidget(desc.constructionOptions.factoryId, desc.constructionOptions.options);
if (StatefulWidget.is(widget) && desc.innerWidgetState !== undefined) {
try {
let oldState;
let oldState: object;
if (typeof desc.innerWidgetState === 'string') {
const parseContext = new ShellLayoutRestorer.ParseContext();
oldState = this.parse(desc.innerWidgetState, parseContext);
Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/browser/widgets/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ export class BaseWidget extends Widget {
this.scrollBar.destroy();
this.scrollBar = undefined;
}
// tslint:disable-next-line:no-null-keyword
container.style.overflow = null;
container.style.overflow = 'initial';
}));
})();
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/common/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export interface EmitterOptions {
onLastListenerRemove?: Function;
}

export class Emitter<T> {
export class Emitter<T = any> {

private static _noop = function (): void { };

Expand Down
8 changes: 8 additions & 0 deletions packages/core/src/common/uri-command-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ export namespace UriAwareCommandHandler {
}

}
/**
* @todo Create different classes for single and multi-uris. State can be
* corrupt if the developer does something like:
* ```ts
* new UriAwareCommandHandler<URI[]>(selectionService, handler, { multi: false })
* ```
*/
export class UriAwareCommandHandler<T extends MaybeArray<URI>> implements CommandHandler {

constructor(
Expand All @@ -73,6 +80,7 @@ export class UriAwareCommandHandler<T extends MaybeArray<URI>> implements Comman
// tslint:disable-next-line:no-any
protected getUri(...args: any[]): T | undefined {
if (args && args[0] instanceof URI) {
// @ts-ignore we want to always return URIs
return this.isMulti() ? [args[0]] : args[0];
}
const { selection } = this.selectionService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const ConnectionContainerModule: symbol & { create(callback: ConnectionCo
path,
onConnection: connection => serviceFactory.listen(connection)
});
return bind(serviceIdentifier).toConstantValue(service);
return bind(serviceIdentifier).toConstantValue(service as any);
};
const bindBackendService: BindBackendService = (path, serviceIdentifier, onActivation) => {
bind(ConnectionHandler).toDynamicValue(context =>
Expand Down
3 changes: 1 addition & 2 deletions packages/cpp/src/browser/cpp-protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

import { RequestType } from 'vscode-jsonrpc';
import { TextDocumentIdentifier } from '@theia/languages/lib/browser';
import { RequestType, TextDocumentIdentifier } from '@theia/languages/lib/browser';

export namespace SwitchSourceHeaderRequest {
export const type = new RequestType<TextDocumentIdentifier, string | undefined, void, void>('textDocument/switchSourceHeader');
Expand Down
3 changes: 1 addition & 2 deletions packages/java/src/browser/java-protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

import { RequestType, NotificationType } from 'vscode-jsonrpc';
import { TextDocumentIdentifier, Command, MessageType, ExecuteCommandParams } from '@theia/languages/lib/browser';
import { RequestType, NotificationType, TextDocumentIdentifier, Command, MessageType, ExecuteCommandParams } from '@theia/languages/lib/browser';

export interface StatusReport {
message: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ import {
ServerCapabilities,
Disposable,
DocumentSelector
} from '../';
} from '../language-client-services';
import { SemanticHighlight, SemanticHighlightingParams } from './semantic-highlighting-protocol';

// NOTE: This module can be removed, or at least can be simplified once the semantic highlighting will become the part of the LSP.
// https://github.com/Microsoft/vscode-languageserver-node/issues/368

export class SemanticHighlightFeature extends TextDocumentFeature<TextDocumentRegistrationOptions> {
export class SemanticHighlightFeature extends TextDocumentFeature<{}, TextDocumentRegistrationOptions> {

protected readonly languageId: string;
protected readonly toDispose: DisposableCollection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

import { NotificationType } from 'vscode-jsonrpc';
import { NotificationType } from '../';
import { VersionedTextDocumentIdentifier } from '..';

// NOTE: This module can be removed, once the semantic highlighting will become the part of the LSP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { TypeHierarchyRequest } from './typehierarchy-protocol';
/**
* Text document feature for handling super- and subtype hierarchies through the LSP.
*/
export class TypeHierarchyFeature extends TextDocumentFeature<TextDocumentRegistrationOptions> {
export class TypeHierarchyFeature extends TextDocumentFeature<{}, TextDocumentRegistrationOptions> {

constructor(readonly client: ILanguageClient) {
super(client, TypeHierarchyRequest.type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

import { RequestType } from 'vscode-jsonrpc';
import { RequestType } from '../language-client-services';
import { SymbolKind, Range } from 'vscode-languageserver-types';
import { TextDocumentPositionParams, TextDocumentRegistrationOptions, StaticRegistrationOptions } from 'vscode-languageserver';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export abstract class BaseLanguageServerContribution implements LanguageServerCo
command: string, args?: string[], options?: cp.SpawnOptions): Promise<IConnection> {

const process = await this.spawnProcessAsync(command, args, options);
const [outSock, inSock] = await Promise.all([outSocket, inSocket]);
const [outSock, inSock] = await Promise.all<net.Socket>([outSocket, inSocket]);
return createProcessSocketConnection(process.process!, outSock, inSock);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-ext/src/common/rpc-protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class ProxyIdentifier<T> {
public readonly id: string;
constructor(public readonly isMain: boolean, id: string | T) {
// TODO this is nasty, rewrite this
this.id = id.toString();
this.id = (id as any).toString();
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/preview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@theia/languages": "^0.10.0",
"@theia/mini-browser": "^0.10.0",
"@types/highlight.js": "^9.12.2",
"@types/markdown-it": "^0.0.4",
"@types/markdown-it": "^0.0.8",
"@types/markdown-it-anchor": "^4.0.1",
"highlight.js": "^9.12.0",
"markdown-it": "^8.4.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@ export class MarkdownPreviewHandler implements PreviewHandler {
return attribute ? Number.parseInt(attribute) : undefined;
}

protected engine: markdownit.MarkdownIt | undefined;
protected getEngine(): markdownit.MarkdownIt {
protected engine: markdownit | undefined;
protected getEngine(): markdownit {
if (!this.engine) {
const engine: markdownit.MarkdownIt = this.engine = markdownit({
const engine: markdownit = this.engine = markdownit({
html: true,
linkify: true,
highlight: (str, lang) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/scm/src/browser/scm-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export class ScmWidget extends ReactWidget implements StatefulWidget {
}
}

protected setInputValue = (event: React.ChangeEvent<HTMLTextAreaElement> | string) => {
protected setInputValue = (event: React.FormEvent<HTMLTextAreaElement> | React.ChangeEvent<HTMLTextAreaElement> | string) => {
const repository = this.scmService.selectedRepository;
if (repository) {
repository.input.value = typeof event === 'string' ? event : event.currentTarget.value;
Expand Down
4 changes: 2 additions & 2 deletions packages/task/src/node/task-abstract-line-matcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export abstract class AbstractLineMatcher {
if (trim) {
value = value.trim();
}
data[property] += endOfLine + value;
(data[property] as string) += endOfLine + value;
}
}

Expand All @@ -122,7 +122,7 @@ export abstract class AbstractLineMatcher {
if (trim) {
value = value.trim();
}
data[property] = value;
(data[property] as string) = value;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/task/src/node/task-server.slow-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ function createTaskConfigTaskLongRunning(processType: ProcessType): TaskConfigur
}

function checkSuccessfullProcessExit(taskInfo: TaskInfo, taskWatcher: TaskWatcher): Promise<object> {
const p = new Promise((resolve, reject) => {
const p = new Promise<object>((resolve, reject) => {
const toDispose = taskWatcher.onTaskExit((event: TaskExitedEvent) => {
if (event.taskId === taskInfo.taskId && event.code === 0) {
toDispose.dispose();
Expand Down
Loading

0 comments on commit e1467da

Please sign in to comment.