Rush StackShopBlogEvents
Skip to main content

Home > @microsoft/rush-lib > IInputsSnapshot > getOperationOwnStateHash

IInputsSnapshot.getOperationOwnStateHash() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the state hash for the files owned by this operation, including the resolutions of package.json dependencies. This will later be combined with the hash of the command being executed and the final hashes of the operation's dependencies to compute the final hash for the operation.

Signature:

getOperationOwnStateHash(project: IRushConfigurationProjectForSnapshot, operationName?: string): string;

Parameters

Parameter

Type

Description

project

IRushConfigurationProjectForSnapshot

The Rush project to compute the state hash for

operationName

string

(Optional) The name of the operation (phase) to get hashes for. If omitted, returns a generic hash for the whole project, as used for bulk commands.

Returns:

string

The local state hash for the project. This is a hash of the environment, the project's tracked files, and any additional files.