Rush Stack Documentation

repository·main·Indexed 27 days ago

https://github.com/microsoft/rushstack

A suite of specialized tools for managing, building, and documenting large-scale TypeScript monorepos. Includes API Extractor for API surface management and documentation, @microsoft/api-documenter for generating reference manuals, Heft for config-driven toolchain orchestration, Rush Lockfile Explorer for resolving PNPM version conflicts, Rundown for analyzing import performance, and @rushstack/playwright-browser-tunnel for remote browser testing.

Tokens
138.9K
Snippets
357
Records
847
Agent score
91%

What's inside Rush Stack

  1. Overview of @rushstack/webpack4-localization-plugin

    main

    The @rushstack/webpack4-localization-plugin is a Webpack plugin that produces bundles containing multiple locale variants of embedded strings.

    Key features include:

    • Out-of-the-box support for .resx (XML format) and .loc.json (JSON format) files.
    • Support for .resjson files.
    • Ability to generate typings for localized resources.
    • Support for both direct resource references and dynamic imports of async chunks containing localized data.
  2. Overview of @rushstack/heft

    main

    Heft is a config-driven toolchain designed to invoke popular development tools like TypeScript, ESLint, Jest, Webpack, and API Extractor. It is optimized for large-scale monorepos (often used with the Rush orchestrator) but also works for small standalone projects.

    Key features include:

    • Optimized Performance: Implements filesystem caching, incremental compilation, and a unified compiler pass for Jest/Webpack/ESLint.
    • Extensible Plugin System: Uses the tapable hook system (similar to Webpack) for custom preprocessors, postprocessors, or loaders.
    • Standardized Project Types: Encourages the use of "rigs" (stereotypical project configurations) to maintain consistency across projects.
    • Built-in Tasks: Supports TypeScript (with watch mode), TypeScript-ESLint, Jest, Webpack (including webpack-dev-server), API Extractor, and a copy-static-assets helper.
  3. Overview of @rushstack/npm-check-fork

    main

    The @rushstack/npm-check-fork package is a temporary fork of the original npm-check library. It is maintained by the Rushstack team specifically to support rush upgrade-interactive by addressing security vulnerabilities and compatibility issues found in the upstream version.

    Key differences from the upstream npm-check include:

    • Compatibility: Uses a CommonJS-compatible version of path-exists instead of the ESM-only version.
    • Dependency Cleanup: Removed the deprecated semverDiff dependency in favor of direct semver usage.
    • Feature Stripping: Removed emoji support and unused state properties to align with rushstack/rush-lib requirements.
    • Schema Changes: Removed peerDependencies from INpmCheckPackageSummary as it was deprecated and unused.
  4. Overview of @microsoft/api-extractor

    main

    API Extractor is a tool designed to help build better TypeScript library packages by managing the public API surface. It integrates into your build toolchain and uses the TypeScript compiler engine to perform several key tasks:

    • API Surface Detection: Identifies the exported API of a project.
    • Contract Reporting: Captures API contracts in concise reports to facilitate code reviews and detect accidental breaking changes.
    • Error Detection: Warns about common mistakes such as missing exports (e.g., an exported function using a non-exported type) or inconsistent visibility (e.g., a public member returning a beta-quality type).
    • D.TS Rollup: Consolidates messy trees of .d.ts files into a single, tidy rollup file. It supports trimming based on release types (e.g., removing internal or beta members for production releases).
    • Documentation Generation: Outputs API documentation in a portable format based on TSDoc annotations.
  5. Overview of @rushstack/terminal

    main

    @rushstack/terminal is a library for processing human-readable text output from console applications. It provides a synchronous streaming system inspired by the Web Streams API (WritableStream and TransformStream), but designed for text messages rather than asynchronous byte streams.

    Key concepts:

    • TerminalWritable: Subclasses represent final destinations for output (e.g., a shell console or a log file).
    • TerminalTransform: Subclasses represent processing steps that transform messages before they reach a destination (e.g., normalizing newlines or removing ANSI colors).
    • ITerminalChunk: The unit of data in the stream, representing messages from stdout or stderr channels.
    • Synchronous Processing: The pipeline operates synchronously on each chunk to avoid high memory usage, requiring transformations (like ANSI removal) to be implemented as state machines (TextRewriter subclasses) to handle substrings that span multiple chunks.
  6. Overview of @rushstack/node-core-library

    main

    @rushstack/node-core-library provides a standardized, conservative set of core Node.js utilities designed to solve ubiquitous problems across tooling projects.

    Key functional areas include:

    • Basic file and folder manipulation
    • JSON file loading, saving, and validation
    • package.json parsing
    • Build performance timers
    • Executing shell commands

    This library is intended for high-value, widely applicable utilities that have been design-reviewed and API-approved. It is not a general-purpose utility dumping ground.