Rush StackShopBlogEvents
Skip to main content

Home > @microsoft/rush-lib > RushConstants

RushConstants class

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

Constants used by the Rush tool.

Signature:

export declare class RushConstants 

Remarks

These are NOT part of the public API surface for rush-lib. The rationale is that we don't want people implementing custom parsers for the Rush config files; instead, they should rely on the official APIs from rush-lib.

Properties

PropertyModifiersTypeDescription
artifactoryFilename

static

readonly

string(BETA) The artifactory.json configuration file name.
browserApprovedPackagesFilename

static

readonly

string(BETA) The filename ("browser-approved-packages.json") for an optional policy configuration file that stores a list of NPM packages that have been approved for usage by Rush projects. This is part of a pair of config files, one for projects that run in a web browser (e.g. whose approval criteria mostly focuses on licensing and code size), and one for everywhere else (e.g. tooling projects whose approval criteria mostly focuses on avoiding node_modules sprawl).
buildCacheFilename

static

readonly

string(BETA) Build cache configuration file.
buildCacheVersion

static

readonly

number(BETA) Build cache version number, incremented when the logic to create cache entries changes. Changing this ensures that cache entries generated by an old version will no longer register as a cache hit.
buildCommandName

static

readonly

string(BETA) The name of the incremental build command.
bulkCommandKind

static

readonly

'bulk'(BETA) The value of the "commandKind" property for a bulk command in command-line.json
bypassPolicyFlagLongName

static

readonly

'--bypass-policy'(BETA) The name of the parameter that can be used to bypass policies.
changeFilesFolderName

static

readonly

string(BETA) The folder name ("changes") where change files will be stored.
commandLineFilename

static

readonly

string(BETA) Custom command line configuration file, which is used by rush for implementing custom command and options.
commonFolderName

static

readonly

string(BETA) The folder name ("common") where Rush's common data will be stored.
commonVersionsFilename

static

readonly

string(BETA) The filename ("common-versions.json") for an optional configuration file that stores dependency version information that affects all projects in the repo. This configuration file should go in the "common/config/rush" folder.
defaultMaxInstallAttempts

static

readonly

number(BETA) Number of installation attempts
defaultWatchDebounceMs

static

readonly

number(BETA) The default debounce value for Rush multi-project watch mode. When watching, controls how long to wait after the last encountered file system event before execution. If another file system event occurs in this interval, the timeout will reset.
experimentsFilename

static

readonly

string(BETA) Experiments configuration file.
globalCommandKind

static

readonly

'global'(BETA) The value of the "commandKind" property for a global command in command-line.json
hashDelimiter

static

readonly

string(BETA) When a hash generated that contains multiple input segments, this character may be used to separate them to avoid issues like crypto.createHash('sha1').update('a').update('bc').digest('hex') === crypto.createHash('sha1').update('ab').update('c').digest('hex')
nodeModulesFolderName

static

readonly

string(BETA) The folder name ("node_modules") where NPM installs its packages.
nonbrowserApprovedPackagesFilename

static

readonly

string(BETA) The filename ("nonbrowser-approved-packages.json") for an optional policy configuration file that stores a list of NPM packages that have been approved for usage by Rush projects. This is part of a pair of config files, one for projects that run in a web browser (e.g. whose approval criteria mostly focuses on licensing and code size), and one for everywhere else (e.g. tooling projects whose approval criteria mostly focuses on avoiding node_modules sprawl).
npmShrinkwrapFilename

static

readonly

string(BETA) The filename ("npm-shrinkwrap.json") used to store an installation plan for the NPM package manger.
phasedCommandKind

static

readonly

'phased'(BETA) The value of the "commandKind" property for a phased command in command-line.json
phaseNamePrefix

static

readonly

'_phase:'(BETA) The expected prefix for phase names in "common/config/rush/command-line.json"
pinnedVersionsFilename

static

readonly

string(BETA) The filename ("pinned-versions.json") for an old configuration file that that is no longer supported.
pnpmConfigFilename

static

readonly

string(BETA) Pnpm configuration file
pnpmfileV1Filename

static

readonly

string(BETA) The filename ("pnpmfile.js") used to add custom configuration to PNPM (PNPM version 1.x and later).
pnpmfileV6Filename

static

readonly

string(BETA) The filename (".pnpmfile.cjs") used to add custom configuration to PNPM (PNPM version 6.x and later).
pnpmPatchesFolderName

static

readonly

string(BETA) The folder name used to store patch files for pnpm Example: C:\MyRepo\common\config\pnpm-patches Example: C:\MyRepo\common\temp\patches
pnpmV3ShrinkwrapFilename

static

readonly

string(BETA) The filename ("pnpm-lock.yaml") used to store an installation plan for the PNPM package manger (PNPM version 3.x and later).
projectRushFolderName

static

readonly

string(BETA) The name of the per-project folder where project-specific Rush files are stored. For example, the package-deps files, which are used by commands to determine if a particular project needs to be rebuilt.
projectShrinkwrapFilename

static

readonly

string(BETA) The name of the file to drop in project-folder/.rush/temp/ containing a listing of the project's direct and indirect dependencies. This is used to detect if a project's dependencies have changed since the last build.
rebuildCommandName

static

readonly

string(BETA) The name of the non-incremental build command.
repoStateFilename

static

readonly

string(BETA) The filename ("repo-state.json") for a file used by Rush to store the state of various features as they stand in the repo.
rushLogsFolderName

static

readonly

string(BETA) The name of the project rush-logs folder.
rushPackageName

static

readonly

string(BETA) The name of the NPM package for the Rush tool ("@microsoft/rush").
rushPluginManifestFilename

static

readonly

string(BETA) Rush plugin manifest file name.
rushPluginsConfigFilename

static

readonly

string(BETA) Rush plugins configuration file name.
rushProjectConfigFilename

static

readonly

string(BETA) Per-project configuration filename.
rushRecyclerFolderName

static

readonly

string(BETA) The folder name ("rush-recycler") where Rush moves large folder trees before asynchronously deleting them.
rushTempFolderName

static

readonly

string(BETA) The folder name ("temp") under the common folder, or under the .rush folder in each project's directory where temporary files will be stored. Example: C:\MyRepo\common\temp
rushTempNpmScope

static

readonly

string(BETA) The NPM scope ("@rush-temp") that is used for Rush's temporary projects.
rushTempProjectsFolderName

static

readonly

string(BETA) The folder name ("projects") where temporary projects will be stored. Example: C:\MyRepo\common\temp\projects
rushUserConfigurationFolderName

static

readonly

string(BETA) The name of the per-user Rush configuration data folder.
rushVariantsFolderName

static

readonly

string(BETA) The folder name ("variants") under which named variant configurations for alternate dependency sets may be found. Example: C:\MyRepo\common\config\rush\variants
rushWebSiteUrl

static

readonly

string(BETA) The URL ("http://rushjs.io") for the Rush web site.
updateCloudCredentialsCommandName

static

readonly

string(BETA)
versionPoliciesFilename

static

readonly

string(BETA)
yarnShrinkwrapFilename

static

readonly

string(BETA) The filename ("shrinkwrap.yaml") used to store state for pnpm