Przeglądaj źródła

Updates dependencies (typescript)

Fixes newly detected typescript errors
main
Eric Amodio 7 lat temu
rodzic
commit
3081632815
11 zmienionych plików z 56 dodań i 38 usunięć
  1. +37
    -19
      package-lock.json
  2. +1
    -1
      package.json
  3. +3
    -3
      src/annotations/blameAnnotationProvider.ts
  4. +1
    -1
      src/annotations/gutterBlameAnnotationProvider.ts
  5. +3
    -3
      src/git/gitLocator.ts
  6. +1
    -1
      src/git/remotes/provider.ts
  7. +1
    -1
      src/gitService.ts
  8. +3
    -3
      src/quickPicks/commitDetails.ts
  9. +4
    -4
      src/quickPicks/commitFileDetails.ts
  10. +1
    -1
      src/quickPicks/remotes.ts
  11. +1
    -1
      src/telemetry.ts

+ 37
- 19
package-lock.json Wyświetl plik

@ -1,6 +1,6 @@
{
"name": "gitlens",
"version": "4.1.3",
"version": "4.2.0",
"lockfileVersion": 1,
"dependencies": {
"@types/copy-paste": {
@ -22,9 +22,9 @@
"dev": true
},
"@types/node": {
"version": "8.0.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.0.2.tgz",
"integrity": "sha512-1uANgw7TMKnSSO0jffiFnrcMsKVqK3n1IHiSwSgptsRzgLfTCu0QdxZPofyYKVA2U0vH4OmullQ2IiU/XhFp5w==",
"version": "8.0.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.0.7.tgz",
"integrity": "sha512-fuCPLPe4yY0nv6Z1rTLFCEC452jl0k7i3gF/c8hdEKpYtEpt6Sk67hTGbxx8C0wmifFGPvKYd/O8CvS6dpgxMQ==",
"dev": true
},
"@types/tmp": {
@ -1027,9 +1027,9 @@
"dev": true
},
"js-tokens": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.1.tgz",
"integrity": "sha1-COnxMkhKLEWjCQfp3E1VZ7fxFNc=",
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
"dev": true
},
"jsbn": {
@ -1483,6 +1483,12 @@
"integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=",
"dev": true
},
"querystringify": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-1.0.0.tgz",
"integrity": "sha1-YoYkIRLFtxL6ZU5SZlK/ahP/Bcs=",
"dev": true
},
"queue": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/queue/-/queue-3.1.0.tgz",
@ -1518,9 +1524,9 @@
}
},
"readable-stream": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.2.tgz",
"integrity": "sha1-WgTfBeT1f+Pw3Gj90R3FyXx+b00=",
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz",
"integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==",
"dev": true
},
"regex-cache": {
@ -1585,6 +1591,12 @@
}
}
},
"requires-port": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
"dev": true
},
"resolve": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz",
@ -1799,9 +1811,9 @@
"dev": true
},
"tsutils": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.4.0.tgz",
"integrity": "sha1-rUzm26Dlo+2934Ymt8oEB4IYn+o=",
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.5.1.tgz",
"integrity": "sha1-wgATkMee7Bpcz6esEtWZY5aD4M8=",
"dev": true
},
"tunnel-agent": {
@ -1818,9 +1830,9 @@
"optional": true
},
"typescript": {
"version": "2.3.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.3.4.tgz",
"integrity": "sha1-PTgyGCgjHkNPKHUUlZw3qCtin0I=",
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.4.1.tgz",
"integrity": "sha1-w8yxbdqgsjFN4DHn5v7onlujRrw=",
"dev": true
},
"unique-stream": {
@ -1829,6 +1841,12 @@
"integrity": "sha1-WqADz76Uxf+GbE59ZouxxNuts2k=",
"dev": true
},
"url-parse": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.1.9.tgz",
"integrity": "sha1-xn8dd11R8KGJEd17P/rSe7nlvRk=",
"dev": true
},
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
@ -1924,9 +1942,9 @@
}
},
"vscode": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.0.tgz",
"integrity": "sha1-sEwjmbbsdoE1yWiOeHPXduKNy5U=",
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.1.tgz",
"integrity": "sha1-LAztdumYZc0oKTxJ5tXF9d9t0HE=",
"dev": true
},
"wrappy": {

+ 1
- 1
package.json Wyświetl plik

@ -1374,7 +1374,7 @@
"@types/copy-paste": "1.1.30",
"@types/iconv-lite": "0.0.1",
"@types/mocha": "2.2.41",
"@types/node": "8.0.4",
"@types/node": "8.0.7",
"@types/tmp": "0.0.33",
"mocha": "3.4.2",
"tslint": "5.4.3",

+ 3
- 3
src/annotations/blameAnnotationProvider.ts Wyświetl plik

@ -7,7 +7,7 @@ import { WhitespaceController } from './whitespaceController';
export abstract class BlameAnnotationProviderBase extends AnnotationProviderBase {
protected _blame: Promise<GitBlame>;
protected _blame: Promise<GitBlame | undefined>;
constructor(context: ExtensionContext, editor: TextEditor, decoration: TextEditorDecorationType | undefined, highlightDecoration: TextEditorDecorationType | undefined, whitespaceController: WhitespaceController | undefined, protected git: GitService, protected uri: GitUri) {
super(context, editor, decoration, highlightDecoration, whitespaceController);
@ -63,7 +63,7 @@ export abstract class BlameAnnotationProviderBase extends AnnotationProviderBase
whitespacePromise = this.whitespaceController && this.whitespaceController.override();
}
let blame: GitBlame;
let blame: GitBlame | undefined;
if (whitespacePromise) {
[blame] = await Promise.all([this._blame, whitespacePromise]);
}
@ -71,7 +71,7 @@ export abstract class BlameAnnotationProviderBase extends AnnotationProviderBase
blame = await this._blame;
}
if (!blame || !blame.lines.length) {
if (blame === undefined || !blame.lines.length) {
this.whitespaceController && await this.whitespaceController.restore();
return undefined;
}

+ 1
- 1
src/annotations/gutterBlameAnnotationProvider.ts Wyświetl plik

@ -20,7 +20,7 @@ export class GutterBlameAnnotationProvider extends BlameAnnotationProviderBase {
// Precalculate the formatting options so we don't need to do it on each iteration
const tokenOptions = Strings.getTokensFromTemplate(cfg.format)
.reduce((map, token) => {
map[token.key] = token.options;
map[token.key] = token.options as ICommitFormatOptions;
return map;
}, {} as { [token: string]: ICommitFormatOptions });

+ 3
- 3
src/git/gitLocator.ts Wyświetl plik

@ -55,9 +55,9 @@ function findSystemGitWin32(basePath: string): Promise {
}
function findGitWin32(): Promise<IGit> {
return findSystemGitWin32(process.env['ProgramW6432'])
.then(null, () => findSystemGitWin32(process.env['ProgramFiles(x86)']))
.then(null, () => findSystemGitWin32(process.env['ProgramFiles']))
return findSystemGitWin32(process.env['ProgramW6432']!)
.then(null, () => findSystemGitWin32(process.env['ProgramFiles(x86)']!))
.then(null, () => findSystemGitWin32(process.env['ProgramFiles']!))
.then(null, () => findSpecificGit('git'));
}

+ 1
- 1
src/git/remotes/provider.ts Wyświetl plik

@ -41,7 +41,7 @@ export abstract class RemoteProvider {
return commands.executeCommand(BuiltInCommands.Open, Uri.parse(url));
}
open(resource: RemoteResource): Promise<{}> {
open(resource: RemoteResource): Promise<{} | undefined> {
switch (resource.type) {
case 'branch':
return this.openBranch(resource.branch);

+ 1
- 1
src/gitService.ts Wyświetl plik

@ -88,7 +88,7 @@ export class GitService extends Disposable {
private _disposable: Disposable | undefined;
private _fireGitCacheChangeDebounced: () => void;
private _fsWatcher: FileSystemWatcher | undefined;
private _gitignore: Promise<ignore.Ignore>;
private _gitignore: Promise<ignore.Ignore | undefined>;
static EmptyPromise: Promise<GitBlame | GitDiff | GitLog | undefined> = Promise.resolve(undefined);

+ 3
- 3
src/quickPicks/commitDetails.ts Wyświetl plik

@ -5,7 +5,7 @@ import { Commands, CopyMessageToClipboardCommandArgs, CopyShaToClipboardCommandA
import { CommandQuickPickItem, getQuickPickIgnoreFocusOut, KeyCommandQuickPickItem, OpenFileCommandQuickPickItem, OpenFilesCommandQuickPickItem, QuickPickItem } from './common';
import { GlyphChars } from '../constants';
import { getGitStatusOcticon, GitCommit, GitLog, GitLogCommit, GitService, GitStashCommit, GitStatusFile, GitStatusFileStatus, GitUri, IGitCommitInfo, IGitStatusFile, RemoteResource } from '../gitService';
import { Keyboard, KeyNoopCommand, Keys } from '../keyboard';
import { Keyboard, KeyCommand, KeyNoopCommand, Keys } from '../keyboard';
import { OpenRemotesCommandQuickPickItem } from './remotes';
import * as moment from 'moment';
import * as path from 'path';
@ -203,8 +203,8 @@ export class CommitDetailsQuickPick {
items.splice(0, 0, goBackCommand);
}
let previousCommand: CommandQuickPickItem | (() => Promise<CommandQuickPickItem>) | undefined = undefined;
let nextCommand: CommandQuickPickItem | (() => Promise<CommandQuickPickItem>) | undefined = undefined;
let previousCommand: KeyCommand | (() => Promise<KeyCommand>) | undefined = undefined;
let nextCommand: KeyCommand | (() => Promise<KeyCommand>) | undefined = undefined;
if (!stash) {
// If we have the full history, we are good
if (repoLog !== undefined && !repoLog.truncated && repoLog.sha === undefined) {

+ 4
- 4
src/quickPicks/commitFileDetails.ts Wyświetl plik

@ -5,7 +5,7 @@ import { Commands, CopyMessageToClipboardCommandArgs, CopyShaToClipboardCommandA
import { CommandQuickPickItem, getQuickPickIgnoreFocusOut, KeyCommandQuickPickItem, OpenFileCommandQuickPickItem } from './common';
import { GlyphChars } from '../constants';
import { GitBranch, GitLog, GitLogCommit, GitService, GitUri, RemoteResource } from '../gitService';
import { Keyboard, KeyNoopCommand } from '../keyboard';
import { Keyboard, KeyCommand, KeyNoopCommand } from '../keyboard';
import { OpenRemotesCommandQuickPickItem } from './remotes';
import * as moment from 'moment';
import * as path from 'path';
@ -173,8 +173,8 @@ export class CommitFileDetailsQuickPick {
items.splice(0, 0, goBackCommand);
}
let previousCommand: CommandQuickPickItem | (() => Promise<CommandQuickPickItem>) | undefined = undefined;
let nextCommand: CommandQuickPickItem | (() => Promise<CommandQuickPickItem>) | undefined = undefined;
let previousCommand: KeyCommand | (() => Promise<KeyCommand>) | undefined = undefined;
let nextCommand: KeyCommand | (() => Promise<KeyCommand>) | undefined = undefined;
if (!stash) {
// If we have the full history, we are good
if (fileLog !== undefined && !fileLog.truncated && fileLog.sha === undefined) {
@ -278,7 +278,7 @@ export class CommitFileDetailsQuickPick {
placeHolder: `${commit.getFormattedPath()} ${Strings.pad(GlyphChars.Dot, 1, 1)} ${isUncommitted ? `Uncommitted ${GlyphChars.ArrowRightHollow} ` : '' }${commit.shortSha} ${Strings.pad(GlyphChars.Dot, 1, 1)} ${commit.author}, ${moment(commit.date).fromNow()} ${Strings.pad(GlyphChars.Dot, 1, 1)} ${commit.message}`,
ignoreFocusOut: getQuickPickIgnoreFocusOut(),
onDidSelectItem: (item: QuickPickItem) => {
scope.setKeyCommand('right', item);
scope.setKeyCommand('right', item as KeyCommand);
}
} as QuickPickOptions);

+ 1
- 1
src/quickPicks/remotes.ts Wyświetl plik

@ -22,7 +22,7 @@ export class OpenRemoteCommandQuickPickItem extends CommandQuickPickItem {
this.resource = resource;
}
async execute(): Promise<{}> {
async execute(): Promise<{} | undefined> {
return this.remote.provider!.open(this.resource);
}
}

+ 1
- 1
src/telemetry.ts Wyświetl plik

@ -41,7 +41,7 @@ export class TelemetryReporter {
constructor(key: string) {
const diagChannelState = process.env['APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL'];
process.env['APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL'] = true;
(process.env['APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL'] as any) = true;
this.appInsights = require('applicationinsights') as ApplicationInsights;
process.env['APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL'] = diagChannelState;

Ładowanie…
Anuluj
Zapisz