Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/package-deps-hash

package-deps-hash package

This package builds a JSON object containing the git hashes of all files used to produce a given NPM package. The Rush tool uses this library to implement incremental build detection.

Remarks

For more info, please see the package README.

Functions

FunctionDescription
ensureGitMinimumVersion(gitPath)Checks the git version and throws an error if it is less than the minimum required version.
getGitHashForFiles(filesToHash, packagePath, gitPath)Takes a list of files and returns the current git hashes for them
getPackageDeps(packagePath, excludedPaths, gitPath)Builds an object containing hashes for the files under the specified packagePath folder.
getRepoChanges(currentWorkingDirectory, revision, gitPath)(BETA) Find all changed files tracked by Git, their current hashes, and the nature of the change. Only useful if all changes are staged or committed.
getRepoRoot(currentWorkingDirectory, gitPath)(BETA) Finds the root of the current Git repository
getRepoStateAsync(rootDirectory, additionalRelativePathsToHash, gitPath)(BETA) Gets the object hashes for all files in the Git repo, combining the current commit with working tree state. Uses async operations and runs all primary Git calls in parallel.

Interfaces

InterfaceDescription
IFileDiffStatus(BETA) Information about the changes to a file.