Skip to content

Commit

Permalink
fix all import ... from '.'
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-marechal committed Apr 26, 2022
1 parent 0ab5141 commit e6c6472
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
import * as chalk from 'chalk';
import * as fs from 'fs-extra';
import * as path from 'path';
import { sortLocalization } from '.';
import { Localization } from './common';
import { Localization, sortLocalization } from './common';
import { deepl, DeeplLanguage, DeeplParameters, isSupportedLanguage, supportedLanguages } from './deepl-api';

export interface LocalizationOptions {
Expand Down
3 changes: 1 addition & 2 deletions dev-packages/private-re-exports/src/package-re-exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
import cp = require('child_process');
import fs = require('fs');
import path = require('path');
import { parseModule } from '.';
import { PackageJson, ReExportJson } from './utility';
import { PackageJson, parseModule, ReExportJson } from './utility';

export async function readJson<T = unknown>(jsonPath: string): Promise<T> {
return JSON.parse(await fs.promises.readFile(jsonPath, 'utf8')) as T;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
import { inject, injectable, postConstruct } from 'inversify';
import { PreferenceSchema } from '../../common/preferences/preference-schema';
import { Disposable, DisposableCollection, Emitter, Event, MaybePromise } from '../../common';
import { PreferenceChangeEvent, PreferenceEventEmitter, PreferenceProxyOptions, PreferenceRetrieval } from './preference-proxy';
import { PreferenceChange, PreferenceScope, PreferenceService } from './preference-service';
import { OverridePreferenceName, PreferenceChangeImpl, PreferenceChanges, PreferenceProviderDataChange, PreferenceProxy } from '.';
import { PreferenceChangeEvent, PreferenceEventEmitter, PreferenceProxy, PreferenceProxyOptions, PreferenceRetrieval } from './preference-proxy';
import { PreferenceChange, PreferenceChangeImpl, PreferenceChanges, PreferenceScope, PreferenceService } from './preference-service';
import { JSONValue } from '@phosphor/coreutils';
import { PreferenceProviderDataChange } from './preference-provider';
import { OverridePreferenceName } from './preference-language-override-service';

export const PreferenceProxySchema = Symbol('PreferenceProxySchema');
export interface PreferenceProxyFactory {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ process.on('unhandledRejection', (reason, promise) => {
});

import { expect } from 'chai';
import { PreferenceValidationService } from '.';
import { PreferenceValidationService } from './preference-validation-service';
import { JSONValue } from '@phosphor/coreutils';
let testContainer: Container;

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/common/uri-command-handler.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// *****************************************************************************

import * as chai from 'chai';
import { SelectionService } from '.';
import { SelectionService } from './selection-service';
import { MaybeArray } from './types';
import URI from './uri';
import { UriAwareCommandHandler, UriCommandHandler } from './uri-command-handler';
Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/common/uri-command-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import { SelectionService } from '../common/selection-service';
import { UriSelection } from '../common/selection';
import { CommandHandler } from './command';
import { MaybeArray } from '.';
import { MaybeArray } from './types';
import URI from './uri';

export interface UriCommandHandler<T extends MaybeArray<URI>> extends CommandHandler {
Expand Down Expand Up @@ -145,4 +145,3 @@ export namespace UriAwareCommandHandler {
return new UriAwareCommandHandler<URI[]>(selectionService, handler, { multi: true });
}
}

3 changes: 2 additions & 1 deletion packages/editor/src/browser/quick-editor-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ import { LabelProvider } from '@theia/core/lib/browser/label-provider';
import { OpenerService } from '@theia/core/lib/browser/opener-service';
import { QuickAccessProvider, QuickAccessRegistry, QuickAccessContribution } from '@theia/core/lib/browser/quick-input/quick-access';
import { filterItems, QuickPickItem, QuickPickSeparator } from '@theia/core/lib/browser/quick-input/quick-input-service';
import { EditorManager, EditorWidget } from '.';
import { EditorManager } from './editor-manager';
import { EditorWidget } from './editor-widget';

@injectable()
export class QuickEditorService implements QuickAccessContribution, QuickAccessProvider {
Expand Down
2 changes: 1 addition & 1 deletion packages/filesystem/src/common/filesystem-utils.spec.ts
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 { FileSystemUtils } from '.';
import { FileSystemUtils } from './filesystem-utils';
import { FileStat } from './files';
import { expect } from 'chai';

Expand Down
15 changes: 2 additions & 13 deletions packages/scm-extra/src/browser/history/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,5 @@
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
// *****************************************************************************

import { ScmProvider } from '@theia/scm/lib/browser/scm-provider';
import { ScmHistorySupport } from './scm-history-widget';

export { ScmHistorySupport };

export interface ScmHistoryProvider extends ScmProvider {
historySupport?: ScmHistorySupport;
}
export namespace ScmHistoryProvider {
export function is(scmProvider: ScmProvider | undefined): scmProvider is ScmHistoryProvider {
return !!scmProvider && 'historySupport' in scmProvider;
}
}
export { ScmHistorySupport } from './scm-history-widget';
export { ScmHistoryProvider } from './scm-history-provider';
28 changes: 28 additions & 0 deletions packages/scm-extra/src/browser/history/scm-history-provider.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// *****************************************************************************
// Copyright (C) 2022 Ericsson and others.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License v. 2.0 which is available at
// http://www.eclipse.org/legal/epl-2.0.
//
// This Source Code may also be made available under the following Secondary
// Licenses when the conditions for such availability set forth in the Eclipse
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
// with the GNU Classpath Exception which is available at
// https://www.gnu.org/software/classpath/license.html.
//
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
// *****************************************************************************


import { ScmProvider } from '@theia/scm/lib/browser/scm-provider';
import { ScmHistorySupport } from './scm-history-widget';

export interface ScmHistoryProvider extends ScmProvider {
historySupport?: ScmHistorySupport;
}
export namespace ScmHistoryProvider {
export function is(scmProvider: ScmProvider | undefined): scmProvider is ScmHistoryProvider {
return !!scmProvider && 'historySupport' in scmProvider;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { CancellationTokenSource } from '@theia/core/lib/common/cancellation';
import { Message } from '@theia/core/shared/@phosphor/messaging';
import { AutoSizer, List, ListRowRenderer, ListRowProps, InfiniteLoader, IndexRange, ScrollParams, CellMeasurerCache, CellMeasurer } from '@theia/core/shared/react-virtualized';
import URI from '@theia/core/lib/common/uri';
import { ScmHistoryProvider } from '.';
import { ScmHistoryProvider } from './scm-history-provider';
import { SCM_HISTORY_ID, SCM_HISTORY_MAX_COUNT, SCM_HISTORY_LABEL } from './scm-history-contribution';
import { ScmHistoryCommit, ScmFileChange, ScmFileChangeNode } from '../scm-file-change-node';
import { ScmAvatarService } from '@theia/scm/lib/browser/scm-avatar-service';
Expand Down
2 changes: 1 addition & 1 deletion packages/workspace/src/browser/workspace-trust-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { nls } from '@theia/core/lib/common/nls';
import { Deferred } from '@theia/core/lib/common/promise-util';
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
import { WindowService } from '@theia/core/lib/browser/window/window-service';
import { WorkspaceService } from '.';
import { WorkspaceService } from './workspace-service';
import {
WorkspaceTrustPreferences, WORKSPACE_TRUST_EMPTY_WINDOW, WORKSPACE_TRUST_ENABLED, WORKSPACE_TRUST_STARTUP_PROMPT, WorkspaceTrustPrompt
} from './workspace-trust-preferences';
Expand Down

0 comments on commit e6c6472

Please sign in to comment.