Skip to content

Commit

Permalink
build: upgrade dependent
Browse files Browse the repository at this point in the history
  • Loading branch information
seatonjiang committed Aug 16, 2023
1 parent 4b46fbb commit fbdc5af
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v1.2.4 (2023-08-16)

- Upgrade dependent.

## v1.2.3 (2023-06-13)

- Add Japanese translation.
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "gitmoji-vscode",
"displayName": "Gitmoji",
"description": "Gitmoji tool for git commit messages in VSCode",
"version": "1.2.3",
"version": "1.2.4",
"author": {
"name": "Seaton Jiang",
"email": "[email protected]"
Expand Down Expand Up @@ -111,17 +111,17 @@
"devDependencies": {
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.1",
"@types/node": "^20.3.0",
"@types/node": "^20.5.0",
"@types/vscode": "^1.74.0",
"@vscode/test-electron": "^2.3.3",
"@vscode/l10n-dev": "^0.0.26",
"@vscode/vsce": "^2.15.0",
"glob": "^8.0.3",
"@vscode/test-electron": "^2.3.4",
"@vscode/l10n-dev": "^0.0.29",
"@vscode/vsce": "^2.20.1",
"glob": "^10.3.3",
"mocha": "^10.2.0",
"tslint": "^6.1.3",
"typescript": "^5.1.3"
"typescript": "^5.1.6"
},
"dependencies": {
"@vscode/l10n": "^0.0.14"
"@vscode/l10n": "^0.0.16"
}
}
43 changes: 36 additions & 7 deletions src/git.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Links: https://raw.githubusercontent.com/microsoft/vscode/main/extensions/git/src/api/git.d.ts
*------------------------------------------------------------------------------------------------*/

import { Uri, Event, Disposable, ProviderResult, Command } from 'vscode';
import { Uri, Event, Disposable, ProviderResult, Command, CancellationToken } from 'vscode';
export { ProviderResult } from 'vscode';

export interface Git {
Expand Down Expand Up @@ -79,6 +79,8 @@ export const enum Status {
UNTRACKED,
IGNORED,
INTENT_TO_ADD,
INTENT_TO_RENAME,
TYPE_CHANGED,

ADDED_BY_US,
ADDED_BY_THEM,
Expand Down Expand Up @@ -156,11 +158,19 @@ export interface FetchOptions {
depth?: number;
}

export interface BranchQuery {
readonly remote?: boolean;
readonly pattern?: string;
readonly count?: number;
export interface InitOptions {
defaultBranch?: string;
}

export interface RefQuery {
readonly contains?: string;
readonly count?: number;
readonly pattern?: string;
readonly sort?: 'alphabetically' | 'committerdate';
}

export interface BranchQuery extends RefQuery {
readonly remote?: boolean;
}

export interface Repository {
Expand Down Expand Up @@ -203,9 +213,11 @@ export interface Repository {
createBranch(name: string, checkout: boolean, ref?: string): Promise<void>;
deleteBranch(name: string, force?: boolean): Promise<void>;
getBranch(name: string): Promise<Branch>;
getBranches(query: BranchQuery): Promise<Ref[]>;
getBranches(query: BranchQuery, cancellationToken?: CancellationToken): Promise<Ref[]>;
setBranchUpstream(name: string, upstream: string): Promise<void>;

getRefs(query: RefQuery, cancellationToken?: CancellationToken): Promise<Ref[]>;

getMergeBase(ref1: string, ref2: string): Promise<string>;

tag(name: string, upstream: string): Promise<void>;
Expand Down Expand Up @@ -267,6 +279,21 @@ export interface PushErrorHandler {
handlePushError(repository: Repository, remote: Remote, refspec: string, error: Error & { gitErrorCode: GitErrorCodes }): Promise<boolean>;
}

export interface BranchProtection {
readonly remote: string;
readonly rules: BranchProtectionRule[];
}

export interface BranchProtectionRule {
readonly include?: string[];
readonly exclude?: string[];
}

export interface BranchProtectionProvider {
onDidChangeBranchProtection: Event<Uri>;
provideBranchProtection(): BranchProtection[];
}

export type APIState = 'uninitialized' | 'initialized';

export interface PublishEvent {
Expand All @@ -285,14 +312,15 @@ export interface API {

toGitUri(uri: Uri, ref: string): Uri;
getRepository(uri: Uri): Repository | null;
init(root: Uri): Promise<Repository | null>;
init(root: Uri, options?: InitOptions): Promise<Repository | null>;
openRepository(root: Uri): Promise<Repository | null>;

registerRemoteSourcePublisher(publisher: RemoteSourcePublisher): Disposable;
registerRemoteSourceProvider(provider: RemoteSourceProvider): Disposable;
registerCredentialsProvider(provider: CredentialsProvider): Disposable;
registerPostCommitCommandsProvider(provider: PostCommitCommandsProvider): Disposable;
registerPushErrorHandler(handler: PushErrorHandler): Disposable;
registerBranchProtectionProvider(root: Uri, provider: BranchProtectionProvider): Disposable;
}

export interface GitExtension {
Expand Down Expand Up @@ -350,5 +378,6 @@ export const enum GitErrorCodes {
UnknownPath = 'UnknownPath',
EmptyCommitMessage = 'EmptyCommitMessage',
BranchFastForwardRejected = 'BranchFastForwardRejected',
BranchNotYetBorn = 'BranchNotYetBorn',
TagConflict = 'TagConflict',
}

0 comments on commit fbdc5af

Please sign in to comment.