Options
All
  • Public
  • Public/Protected
  • All
Menu

Representing an API for handling git flow SemVer.

Hierarchy

  • GitFlowNodeProject

Index

Constructors

  • Initializes a new instance of this class.

    Parameters

    • Optional options: ProjectConfig

      Options of the git flow node project instance.

    Returns GitFlowNodeProject

Methods

  • checkoutBranch(branchName: string): Promise<void>
  • Checks out the given branch of the project.

    Parameters

    • branchName: string

      Name of the branch to be checked out.

    Returns Promise<void>

  • commitChanges(commitVersionFiles?: boolean, commitChangelog?: boolean): Promise<string>
  • Commits the changes of the git repository.

    Parameters

    • commitVersionFiles: boolean = true

      Indicates if the defined version files should be committed if they exists.

    • commitChangelog: boolean = true

      Indicates if the changelog should be committed.

    Returns Promise<string>

    The hash of the commit.

  • Gets an object representing the current context of the node project.

    Parameters

    • Optional version: string

      A optional user defined version.

    • Optional name: string

      A optional user defined release name.

    Returns Promise<GitRepositoryContext>

    An object with information about the node project.

  • getCurrentBranch(): Promise<string>
  • Gets the current branch.

    Returns Promise<string>

    The current branch checked out.

  • getVersion(): Promise<undefined | string>
  • Gets the current version from the package.json.

    Returns Promise<undefined | string>

    The version of the project.

  • popLatestStash(): Promise<void>
  • Pops the latest stash.

    Returns Promise<void>

    Promise on popping the latest stash.

  • stash(): Promise<boolean>
  • Stashes the uncommited changes from the current branch.

    Returns Promise<boolean>

    true if stash was successful, otherwise false.

  • updateChangelog<T>(changelogConfig: ChangelogConfig<T>, version?: string, name?: string): Promise<void>
  • Updates the changelog with the changes since the last release.

    Type Parameters

    • T

    Parameters

    • changelogConfig: ChangelogConfig<T>

      The changelog configuration.

    • Optional version: string

      Version the changelog is created for.

    • Optional name: string

      Name of the release.

    Returns Promise<void>

  • writeVersion(version: string): Promise<void>
  • Writes the version and commits the changes in the git repository.

    Parameters

    • version: string

      Version to commit.

    Returns Promise<void>