Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/rush-lib

Package Overview
Dependencies
Maintainers
0
Versions
507
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/rush-lib

A library for writing scripts that interact with the Rush tool

  • 5.147.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created

What is @microsoft/rush-lib?

@microsoft/rush-lib is a library for managing large monorepos with many projects. It provides tools for orchestrating builds, managing dependencies, and automating workflows in a consistent and efficient manner.

What are @microsoft/rush-lib's main functionalities?

Project Management

This feature allows you to load and manage the configuration of projects within a Rush monorepo. The code sample demonstrates how to load the Rush configuration and print the list of projects.

const rushLib = require('@microsoft/rush-lib');
const rushConfiguration = rushLib.RushConfiguration.loadFromDefaultLocation();
console.log(rushConfiguration.projects);

Dependency Management

This feature helps in managing dependencies across projects in the monorepo. The code sample shows how to load the Rush configuration and print the package manager being used.

const rushLib = require('@microsoft/rush-lib');
const rushConfiguration = rushLib.RushConfiguration.loadFromDefaultLocation();
const packageManager = rushConfiguration.packageManager;
console.log(`Using package manager: ${packageManager}`);

Build Orchestration

This feature allows you to orchestrate builds across multiple projects in the monorepo. The code sample demonstrates how to execute the Rush build command programmatically.

const rushLib = require('@microsoft/rush-lib');
const rushConfiguration = rushLib.RushConfiguration.loadFromDefaultLocation();
const buildCommand = rushLib.Utilities.executeCommand({
  command: 'rush',
  args: ['build'],
  workingDirectory: rushConfiguration.rushJsonFolder
});
buildCommand.then(() => console.log('Build completed successfully')).catch(err => console.error('Build failed', err));

Other packages similar to @microsoft/rush-lib

FAQs

Package last updated on 12 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc