Eric Amodio 7 лет назад
Родитель
Сommit
787b2bd117
17 измененных файлов: 32 добавлений и 26 удалений
  1. +3
    -3
      package-lock.json
  2. +1
    -1
      package.json
  3. +1
    -1
      src/annotations/annotationProvider.ts
  4. +1
    -1
      src/annotations/blameAnnotationProvider.ts
  5. +1
    -1
      src/codeLensController.ts
  6. +4
    -3
      src/currentLineController.ts
  7. +2
    -2
      src/git/formatters/formatter.ts
  8. +3
    -0
      src/git/models/branch.ts
  9. +1
    -1
      src/gitCodeLensProvider.ts
  10. +1
    -1
      src/quickPicks/branches.ts
  11. +1
    -1
      src/quickPicks/branchesAndTags.ts
  12. +2
    -2
      src/quickPicks/common.ts
  13. +1
    -1
      src/quickPicks/repositories.ts
  14. +4
    -4
      src/system/searchTree.ts
  15. +2
    -1
      src/trackers/documentTracker.ts
  16. +2
    -1
      src/trackers/lineTracker.ts
  17. +2
    -2
      src/trackers/trackedDocument.ts

+ 3
- 3
package-lock.json Просмотреть файл

@ -6479,9 +6479,9 @@
"dev": true
},
"typescript": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz",
"integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=",
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.1.tgz",
"integrity": "sha512-bqB1yS6o9TNA9ZC/MJxM0FZzPnZdtHj0xWK/IZ5khzVqdpGul/R/EIiHRgFXlwTD7PSIaYVnGKq1QgMCu2mnqw==",
"dev": true
},
"uglify-es": {

+ 1
- 1
package.json Просмотреть файл

@ -3339,7 +3339,7 @@
"husky": "0.14.3",
"ts-loader": "3.4.0",
"tslint": "5.9.1",
"typescript": "2.6.2",
"typescript": "2.7.1",
"uglify-es": "3.3.9",
"uglifyjs-webpack-plugin": "1.1.8",
"vscode": "1.1.10",

+ 1
- 1
src/annotations/annotationProvider.ts Просмотреть файл

@ -19,7 +19,7 @@ export abstract class AnnotationProviderBase extends Disposable {
return editor !== undefined ? (editor as any).id : '';
}
annotationType: FileAnnotationType;
annotationType: FileAnnotationType | undefined;
correlationKey: TextEditorCorrelationKey;
document: TextDocument;
status: AnnotationStatus | undefined;

+ 1
- 1
src/annotations/blameAnnotationProvider.ts Просмотреть файл

@ -12,7 +12,7 @@ import { GitBlame, GitCommit, GitUri } from '../gitService';
export abstract class BlameAnnotationProviderBase extends AnnotationProviderBase {
protected _blame: Promise<GitBlame | undefined>;
protected _hoverProviderDisposable: Disposable;
protected _hoverProviderDisposable: Disposable | undefined;
protected readonly _uri: GitUri;
constructor(

+ 1
- 1
src/codeLensController.ts Просмотреть файл

@ -9,7 +9,7 @@ import { Logger } from './logger';
export class CodeLensController extends Disposable {
private _canToggle: boolean;
private _canToggle: boolean = false;
private _disposable: Disposable | undefined;
private _provider: GitCodeLensProvider | undefined;
private _providerDisposable: Disposable | undefined;

+ 4
- 3
src/currentLineController.ts Просмотреть файл

@ -391,7 +391,8 @@ export class CurrentLineController extends Disposable {
};
}
private _updateBlameDebounced: ((line: number, editor: TextEditor, trackedDocument: TrackedDocument<GitDocumentState>) => void) & IDeferrable;
private _updateBlameDebounced: (((line: number, editor: TextEditor, trackedDocument: TrackedDocument<GitDocumentState>) => void) & IDeferrable) | undefined;
private async refresh(editor: TextEditor | undefined, options: { full?: boolean, trackedDocument?: TrackedDocument<GitDocumentState> } = {}) {
if (editor === undefined && this._editor === undefined) return;
@ -462,7 +463,7 @@ export class CurrentLineController extends Disposable {
this._lineTracker.reset();
// Make sure we are still on the same line and not pending
if (this._lineTracker.line !== line || this._updateBlameDebounced.pending!()) return;
if (this._lineTracker.line !== line || (this._updateBlameDebounced && this._updateBlameDebounced.pending!())) return;
const blameLine = editor.document.isDirty
? await Container.git.getBlameForLineContents(trackedDocument.uri, line, editor.document.getText())
@ -472,7 +473,7 @@ export class CurrentLineController extends Disposable {
let commitLine;
// Make sure we are still on the same line, blameable, and not pending, after the await
if (this._lineTracker.line === line && trackedDocument.isBlameable && !this._updateBlameDebounced.pending!()) {
if (this._lineTracker.line === line && trackedDocument.isBlameable && !(this._updateBlameDebounced && this._updateBlameDebounced.pending!())) {
const state = this.getBlameAnnotationState();
if (state.enabled) {
commitLine = blameLine === undefined ? undefined : blameLine.line;

+ 2
- 2
src/git/formatters/formatter.ts Просмотреть файл

@ -10,8 +10,8 @@ type Constructor = new (...args: any[]) => T;
export abstract class Formatter<TItem = any, TOptions extends IFormatOptions = IFormatOptions> {
protected _item: TItem;
protected _options: TOptions;
protected _item!: TItem;
protected _options!: TOptions;
constructor(item: TItem, options?: TOptions) {
this.reset(item, options);

+ 3
- 0
src/git/models/branch.ts Просмотреть файл

@ -23,6 +23,9 @@ export class GitBranch {
branch = branch.substring(8);
this.remote = true;
}
else {
this.remote = false;
}
this.current = current;
this.name = branch;

+ 1
- 1
src/gitCodeLensProvider.ts Просмотреть файл

@ -56,7 +56,7 @@ export class GitCodeLensProvider implements CodeLensProvider {
static selector: DocumentSelector = [{ scheme: DocumentSchemes.File }, { scheme: DocumentSchemes.Git }, { scheme: DocumentSchemes.GitLensGit }];
private _debug: boolean;
private _debug: boolean = false;
constructor(
context: ExtensionContext,

+ 1
- 1
src/quickPicks/branches.ts Просмотреть файл

@ -8,7 +8,7 @@ export class BranchQuickPickItem implements QuickPickItem {
label: string;
description: string;
detail: string;
detail: string | undefined;
constructor(
public readonly branch: GitBranch

+ 1
- 1
src/quickPicks/branchesAndTags.ts Просмотреть файл

@ -10,7 +10,7 @@ export class BranchOrTagQuickPickItem implements QuickPickItem {
label: string;
description: string;
detail: string;
detail: string | undefined;
constructor(
public readonly branchOrTag: GitBranch | GitTag

+ 2
- 2
src/quickPicks/common.ts Просмотреть файл

@ -53,8 +53,8 @@ export interface QuickPickItem extends QuickPickItem {
export class CommandQuickPickItem implements QuickPickItem {
label: string;
description: string;
label!: string;
description!: string;
detail?: string | undefined;
protected command: Commands | undefined;
protected args: any[] | undefined;

+ 1
- 1
src/quickPicks/repositories.ts Просмотреть файл

@ -9,7 +9,7 @@ export class RepositoryQuickPickItem implements QuickPickItem {
label: string;
description: string;
detail: string;
detail: string | undefined;
constructor(
public readonly repository: Repository

+ 4
- 4
src/system/searchTree.ts Просмотреть файл

@ -53,9 +53,9 @@ export class PathIterator implements IKeyIterator {
private static readonly _fwd = '/'.charCodeAt(0);
private static readonly _bwd = '\\'.charCodeAt(0);
private _value: string;
private _from: number;
private _to: number;
private _value!: string;
private _from!: number;
private _to!: number;
reset(key: string): this {
this._value = key.replace(/\\$|\/$/, '');
@ -121,7 +121,7 @@ export class PathIterator implements IKeyIterator {
}
class TernarySearchTreeNode<E> {
str: string;
str!: string;
element: E | undefined;
left: TernarySearchTreeNode<E> | undefined;
mid: TernarySearchTreeNode<E> | undefined;

+ 2
- 1
src/trackers/documentTracker.ts Просмотреть файл

@ -38,7 +38,7 @@ export class DocumentTracker extends Disposable {
return this._onDidTriggerDirtyIdle.event;
}
private _dirtyIdleTriggerDelay: number;
private _dirtyIdleTriggerDelay!: number;
private readonly _disposable: Disposable | undefined;
private readonly _documentMap: Map<TextDocument | string, TrackedDocument<T>> = new Map();
@ -334,6 +334,7 @@ class MissingRevisionTextDocument implements TextDocument {
this.isClosed = false;
this.isDirty = false;
this.isUntitled = false;
this.languageId = '';
this.lineCount = 0;
this.version = 0;
}

+ 2
- 1
src/trackers/lineTracker.ts Просмотреть файл

@ -91,7 +91,8 @@ export class LineTracker extends Disposable {
this._disposable = undefined;
}
private _lineChangedDebounced: ((e: LineChangeEvent) => void) & IDeferrable;
private _lineChangedDebounced: (((e: LineChangeEvent) => void) & IDeferrable) | undefined;
private fireLineChanged(e: LineChangeEvent) {
if (e.line === undefined) {
setImmediate(() => {

+ 2
- 2
src/trackers/trackedDocument.ts Просмотреть файл

@ -21,10 +21,10 @@ export class TrackedDocument extends Disposable {
state: T | undefined;
private _disposable: Disposable;
private _disposable: Disposable | undefined;
private _disposed: boolean = false;
private _repo: (Repository | undefined) | Promise<Repository | undefined>;
private _uri: GitUri;
private _uri!: GitUri;
constructor(
private readonly _document: TextDocument,

Загрузка…
Отмена
Сохранить