Home > @microsoft/rush-lib

rush-lib package

A library for writing scripts that interact with the Rush tool.

Classes

Class Description
ApprovedPackagesConfiguration This represents the JSON file specified via the “approvedPackagesFile” option in rush.json.
ApprovedPackagesItem An item returned by ApprovedPackagesConfiguration
ApprovedPackagesPolicy This is a helper object for RushConfiguration. It exposes the “approvedPackagesPolicy” feature from rush.json.
ChangeManager A class that helps with programatically interacting with Rush’s change files.
CommonVersionsConfiguration Use this class to load and save the “common/config/rush/common-versions.json” config file. This config file stores dependency version information that affects all projects in the repo.
EventHooks (BETA) This class represents Rush event hooks configured for this repo. Hooks are customized script actions that Rush executes when specific events occur. The actions are expressed as a command-line that is executed using the operating system shell.
IndividualVersionPolicy (BETA) This policy indicates all related projects get version bump driven by their own changes.
LockStepVersionPolicy (BETA) This policy indicates all related projects should use the same version.
PackageJsonDependency (BETA)
PackageJsonEditor (BETA)
PackageManager (BETA) An abstraction for controlling the supported package managers: PNPM, NPM, and Yarn.
PnpmOptionsConfiguration Options that are only used when the PNPM package manager is selected.
Rush General operations for the Rush engine.
RushConfiguration This represents the Rush configuration for a repository, based on the “rush.json” configuration file.
RushConfigurationProject This represents the configuration of a project that is built by Rush, based on the Rush.json configuration file.
VersionPolicy (BETA) This is the base class for version policy which controls how versions get bumped.
VersionPolicyConfiguration (BETA) Use this class to load and save the “common/config/rush/version-policies.json” config file. This config file configures how different groups of projects will be published by Rush, and how their version numbers will be determined.
YarnOptionsConfiguration Options that are only used when the yarn package manager is selected.

Enumerations

Enumeration Description
BumpType (BETA) Type of version bumps
DependencyType (BETA)
EnvironmentVariableNames Names of environment variables used by Rush.
Event (BETA) Events happen during Rush runs.
VersionPolicyDefinitionName (BETA) Version policy base type names

Interfaces

Interface Description
ILaunchOptions Options to pass to the rush “launch” functions.
ITryFindRushJsonLocationOptions Options for RushConfiguration.tryFindRushJsonLocation.

Type Aliases

Type Alias Description
PackageManagerName This represents the available Package Manager tools as a string
ResolutionStrategy This represents the available PNPM resolution strategies as a string