Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@skypilot/nodegit-tools

skypilotcc27ISC1.0.7TypeScript support: included

A collection of utilities for working with NodeGit

convenience, functions, git, nodegit, utilities

readme

@skypilot/nodegit-tools

build  npm stable  npm next  license: ISC

A collection of utilities for working with NodeGit

Functions

Commit functions

findCommitByBranchName

async findCommitByBranchName(branchName: string, { repository?: Repository }): Promise<Commit>

findCommitByOid

async findCommitByOid(oid: Oid, { repository?: Repository }): Promise<Commit>

findCommitByReference

async findCommitByReference(reference: Reference, { repository?: Repository }): Promise<Commit>

findCommitBySha

async findCommitBySha(sha: string, { repository?: Repository }): Promise<Commit>

findCommitByTagName

async findCommitByTagName(tagName: string, { repository?: Repository }): Promise<Commit>

findRangeOfCommitsByOid

async findRangeOfCommitsByOid(newestOid: Oid, oldestOid: Oid, { repository?: Repository }): Promise<Commit[]>

findRangeOfCommitsBySha

async findRangeOfCommitsBySha(newestSha: string, oldestSha: string, { repository?: Repository }): Promise<Commit[]>

getCommitOid

getCommitOid(commit: Commit): Oid

getCommitRecord

getCommitRecord(commit: Commit): { date: Date, message: string, sha: string } 

retrieveHeadCommit

async retrieveHeadCommit({ repository?: Repository }): Promise<Commit>

Oid (object ID) functions

findMergeBaseOid

async findMergBaseOid(oidA: Oid, oidB: Oid, { repository?: Repository }): Promise<Oid>

findOidBySha

async findOidBySha(sha: string, { repository?: Repository }): Promise<Oid>

getOidSha

getOidSha(oid: Oid): string

Reference functions

findReferenceByTagName

async findReferenceByTagName(tagName: string, { repository?: Repository }): Promise<Reference>

getReferenceShorthand

getReferenceShorthand(reference: Reference): string

retrieveCurrentBranchName

async retrieveCurrentBranchName({ repository?: Repository }): Promise<Reference>

retrieveCurrentBranchReference

async retrieveCurrentBranchReference({ repository?: Repository }): Promise<Reference>

Repo functions

openRepo

async openRepository({ path?: string }): Promise<Repository>

Tag functions

async retrieveTagNames({ repository?: Repository }): Promise<string[]>

changelog

1.0.7 (2020-02-06)

1.0.7-next.0 (2020-02-06)

1.0.6 (2020-02-06)

1.0.6-next.0 (2020-02-06)

1.0.5-next.0 (2020-02-06)

1.0.4 (2020-02-06)

1.0.3 (2020-02-06)

1.0.2 (2020-02-06)

1.0.1-next.0 (2020-02-05)

1.0.1 (2020-02-05)

1.0.0 (2020-02-05)

1.0.0-alpha.0 (2020-02-05)

0.1.5-alpha.3 (2020-02-01)

0.1.5-alpha.2 (2020-02-01)

0.1.5-alpha.1 (2020-01-31)

Features

  • Export CommitRecord type (d4f97b8)

0.1.5-alpha.0 (2020-01-31)

0.1.5-alpha (2020-01-31)

0.1.4-alpha (2020-01-31)

Bug Fixes

  • retrieveCurrentBranchName is defined but not exported (8b593c5)
  • Tests fail at a commit that follows a merge-commit (eebc724)

Features

  • Can retrieve the current branch in different formats (406ce1e)
  • Can retrieve the name of the current branch (7f46db6)

0.1.2-alpha (2020-01-31)

Features

  • Can find a Commit by branch name (d154316)
  • Can find a Commit by Oid (e229b8d)
  • Can find a Commit by Reference (fab7ad6)
  • Can find a Commit by SHA (7284885)
  • Can find a Commit by tag name (f4b95b2)
  • Can find a range of commits by starting & ending Oid (42a11e2)
  • Can find a range of commits by starting & ending SHA (d5c1a48)
  • Can find a Reference by tag name (e763c95)
  • Can find an Oid by SHA (1b80e2f)
  • Can find the Oid of the merge base of two Oids (39e372c)
  • Can get the commit message of a Commit (f4e7bbe)
  • Can get the Oid of a Commit (5d5264e)
  • Can get the SHA of a Commit (384912f)
  • Can get the SHA of an Oid (6498560)
  • Can get the shorthand representation of a Reference (c01c2dc)
  • Can open a Repository (bcff1a3)
  • Can retrieve a Reference to the current branch (e7e015c)
  • Can retrieve the Commit at HEAD (c6e01c0)
  • Can retrieve the names of all tags in a repo (4c90d21)