Browse Source

Removes re-exports to limit import scopes

main
Eric Amodio 1 year ago
parent
commit
1b447ffdfa
14 changed files with 28 additions and 34 deletions
  1. +2
    -1
      src/annotations/annotationProvider.ts
  2. +2
    -1
      src/annotations/blameAnnotationProvider.ts
  3. +2
    -5
      src/annotations/fileAnnotationController.ts
  4. +2
    -1
      src/annotations/gutterChangesAnnotationProvider.ts
  5. +2
    -1
      src/annotations/lineAnnotationController.ts
  6. +2
    -5
      src/codelens/codeLensController.ts
  7. +2
    -1
      src/env/node/git/localGitProvider.ts
  8. +1
    -1
      src/hovers/lineHoverController.ts
  9. +2
    -1
      src/statusbar/statusBarController.ts
  10. +6
    -3
      src/trackers/documentTracker.ts
  11. +0
    -2
      src/trackers/gitDocumentTracker.ts
  12. +2
    -4
      src/trackers/gitLineTracker.ts
  13. +2
    -7
      src/trackers/trackedDocument.ts
  14. +1
    -1
      src/views/nodes/lineHistoryTrackerNode.ts

+ 2
- 1
src/annotations/annotationProvider.ts View File

@ -11,7 +11,8 @@ import { Disposable, window } from 'vscode';
import type { FileAnnotationType } from '../config';
import { setContext } from '../system/context';
import { Logger } from '../system/logger';
import type { GitDocumentState, TrackedDocument } from '../trackers/gitDocumentTracker';
import type { GitDocumentState } from '../trackers/gitDocumentTracker';
import type { TrackedDocument } from '../trackers/trackedDocument';
export type AnnotationStatus = 'computing' | 'computed';

+ 2
- 1
src/annotations/blameAnnotationProvider.ts View File

@ -8,7 +8,8 @@ import type { GitCommit } from '../git/models/commit';
import { changesMessage, detailsMessage } from '../hovers/hovers';
import { configuration } from '../system/configuration';
import { log } from '../system/decorators/log';
import type { GitDocumentState, TrackedDocument } from '../trackers/gitDocumentTracker';
import type { GitDocumentState } from '../trackers/gitDocumentTracker';
import type { TrackedDocument } from '../trackers/trackedDocument';
import { AnnotationProviderBase } from './annotationProvider';
import type { ComputedHeatmap } from './annotations';
import { getHeatmapColors } from './annotations';

+ 2
- 5
src/annotations/fileAnnotationController.ts View File

@ -32,11 +32,8 @@ import type { KeyboardScope } from '../system/keyboard';
import { Logger } from '../system/logger';
import { basename } from '../system/path';
import { isTextEditor } from '../system/utils';
import type {
DocumentBlameStateChangeEvent,
DocumentDirtyStateChangeEvent,
GitDocumentState,
} from '../trackers/gitDocumentTracker';
import type { DocumentBlameStateChangeEvent, DocumentDirtyStateChangeEvent } from '../trackers/documentTracker';
import type { GitDocumentState } from '../trackers/gitDocumentTracker';
import type { AnnotationContext, AnnotationProviderBase, TextEditorCorrelationKey } from './annotationProvider';
import { getEditorCorrelationKey } from './annotationProvider';
import type { ChangesAnnotationContext } from './gutterChangesAnnotationProvider';

+ 2
- 1
src/annotations/gutterChangesAnnotationProvider.ts View File

@ -15,7 +15,8 @@ import { configuration } from '../system/configuration';
import { log } from '../system/decorators/log';
import { getLogScope } from '../system/logger.scope';
import { maybeStopWatch } from '../system/stopwatch';
import type { GitDocumentState, TrackedDocument } from '../trackers/gitDocumentTracker';
import type { GitDocumentState } from '../trackers/gitDocumentTracker';
import type { TrackedDocument } from '../trackers/trackedDocument';
import type { AnnotationContext } from './annotationProvider';
import { AnnotationProviderBase } from './annotationProvider';
import { Decorations } from './fileAnnotationController';

+ 2
- 1
src/annotations/lineAnnotationController.ts View File

@ -15,7 +15,8 @@ import { Logger } from '../system/logger';
import { getLogScope, setLogScopeExit } from '../system/logger.scope';
import { getSettledValue } from '../system/promise';
import { isTextEditor } from '../system/utils';
import type { GitLineState, LinesChangeEvent } from '../trackers/gitLineTracker';
import type { GitLineState } from '../trackers/gitLineTracker';
import type { LinesChangeEvent } from '../trackers/lineTracker';
import { getInlineDecoration } from './annotations';
const annotationDecoration: TextEditorDecorationType = window.createTextEditorDecorationType({

+ 2
- 5
src/codelens/codeLensController.ts View File

@ -5,11 +5,8 @@ import { configuration } from '../system/configuration';
import { setContext } from '../system/context';
import { once } from '../system/event';
import { Logger } from '../system/logger';
import type {
DocumentBlameStateChangeEvent,
DocumentDirtyIdleTriggerEvent,
GitDocumentState,
} from '../trackers/gitDocumentTracker';
import type { DocumentBlameStateChangeEvent, DocumentDirtyIdleTriggerEvent } from '../trackers/documentTracker';
import type { GitDocumentState } from '../trackers/gitDocumentTracker';
export class GitCodeLensController implements Disposable {
private _canToggle: boolean = false;

+ 2
- 1
src/env/node/git/localGitProvider.ts View File

@ -173,8 +173,9 @@ import { equalsIgnoreCase, getDurationMilliseconds, interpolate, splitSingle } f
import { PathTrie } from '../../../system/trie';
import { compare, fromString } from '../../../system/version';
import { serializeWebviewItemContext } from '../../../system/webview';
import type { CachedBlame, CachedDiff, CachedLog, TrackedDocument } from '../../../trackers/gitDocumentTracker';
import type { CachedBlame, CachedDiff, CachedLog } from '../../../trackers/gitDocumentTracker';
import { GitDocumentState } from '../../../trackers/gitDocumentTracker';
import type { TrackedDocument } from '../../../trackers/trackedDocument';
import type { Git } from './git';
import {
getShaInLogRegex,

+ 1
- 1
src/hovers/lineHoverController.ts View File

@ -6,7 +6,7 @@ import { configuration } from '../system/configuration';
import { debug } from '../system/decorators/log';
import { once } from '../system/event';
import { Logger } from '../system/logger';
import type { LinesChangeEvent } from '../trackers/gitLineTracker';
import type { LinesChangeEvent } from '../trackers/lineTracker';
import { changesMessage, detailsMessage } from './hovers';
const maxSmallIntegerV8 = 2 ** 30; // Max number that can be stored in V8's smis (small integers)

+ 2
- 1
src/statusbar/statusBarController.ts View File

@ -17,7 +17,8 @@ import { Logger } from '../system/logger';
import { getLogScope } from '../system/logger.scope';
import { getSettledValue } from '../system/promise';
import { isTextEditor } from '../system/utils';
import type { GitLineState, LinesChangeEvent } from '../trackers/gitLineTracker';
import type { GitLineState } from '../trackers/gitLineTracker';
import type { LinesChangeEvent } from '../trackers/lineTracker';
export class StatusBarController implements Disposable {
private _cancellation: CancellationTokenSource | undefined;

+ 6
- 3
src/trackers/documentTracker.ts View File

@ -24,17 +24,20 @@ import type { Deferrable } from '../system/function';
import { debounce } from '../system/function';
import { filter, join, map } from '../system/iterable';
import { findTextDocument, isActiveDocument, isTextEditor } from '../system/utils';
import type { DocumentBlameStateChangeEvent } from './trackedDocument';
import { TrackedDocument } from './trackedDocument';
export * from './trackedDocument';
export interface DocumentContentChangeEvent<T> {
readonly editor: TextEditor;
readonly document: TrackedDocument<T>;
readonly contentChanges: readonly TextDocumentContentChangeEvent[];
}
export interface DocumentBlameStateChangeEvent<T> {
readonly editor: TextEditor;
readonly document: TrackedDocument<T>;
readonly blameable: boolean;
}
export interface DocumentDirtyStateChangeEvent<T> {
readonly editor: TextEditor;
readonly document: TrackedDocument<T>;

+ 0
- 2
src/trackers/gitDocumentTracker.ts View File

@ -4,8 +4,6 @@ import type { GitDiffFile } from '../git/models/diff';
import type { GitLog } from '../git/models/log';
import { DocumentTracker } from './documentTracker';
export * from './documentTracker';
interface CachedItem<T> {
item: Promise<T>;
errorMessage?: string;

+ 2
- 4
src/trackers/gitLineTracker.ts View File

@ -11,13 +11,11 @@ import type {
DocumentContentChangeEvent,
DocumentDirtyIdleTriggerEvent,
DocumentDirtyStateChangeEvent,
GitDocumentState,
} from './gitDocumentTracker';
} from './documentTracker';
import type { GitDocumentState } from './gitDocumentTracker';
import type { LinesChangeEvent, LineSelection } from './lineTracker';
import { LineTracker } from './lineTracker';
export * from './lineTracker';
export interface GitLineState {
commit: GitCommit;
}

+ 2
- 7
src/trackers/trackedDocument.ts View File

@ -1,4 +1,4 @@
import type { Disposable, Event, TextDocument, TextEditor } from 'vscode';
import type { Disposable, Event, TextDocument } from 'vscode';
import { EventEmitter } from 'vscode';
import type { Container } from '../container';
import { GitUri } from '../git/gitUri';
@ -8,12 +8,7 @@ import type { Deferrable } from '../system/function';
import { debounce } from '../system/function';
import { Logger } from '../system/logger';
import { getEditorIfActive, isActiveDocument } from '../system/utils';
export interface DocumentBlameStateChangeEvent<T> {
readonly editor: TextEditor;
readonly document: TrackedDocument<T>;
readonly blameable: boolean;
}
import type { DocumentBlameStateChangeEvent } from './documentTracker';
export class TrackedDocument<T> implements Disposable {
static async create<T>(

+ 1
- 1
src/views/nodes/lineHistoryTrackerNode.ts View File

@ -12,7 +12,7 @@ import { debug, log } from '../../system/decorators/log';
import { debounce } from '../../system/function';
import { Logger } from '../../system/logger';
import { getLogScope, setLogScopeExit } from '../../system/logger.scope';
import type { LinesChangeEvent } from '../../trackers/gitLineTracker';
import type { LinesChangeEvent } from '../../trackers/lineTracker';
import type { FileHistoryView } from '../fileHistoryView';
import type { LineHistoryView } from '../lineHistoryView';
import { LineHistoryNode } from './lineHistoryNode';

Loading…
Cancel
Save