Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
@microsoft/rush-lib
Advanced tools
A library for writing scripts that interact with the Rush tool
@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.
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));
Lerna is a popular tool for managing JavaScript projects with multiple packages. It optimizes the workflow around managing multi-package repositories with git and npm. Compared to @microsoft/rush-lib, Lerna is more focused on JavaScript and TypeScript projects and offers a simpler setup, but it may not scale as well for very large monorepos.
Nx is a set of extensible dev tools for monorepos, which helps you develop like Google, Facebook, and Microsoft. It offers powerful integrations with modern frameworks and libraries. Compared to @microsoft/rush-lib, Nx provides more advanced features for code generation, testing, and CI/CD pipelines, making it a more comprehensive solution for modern web development.
This is a companion package for the Rush tool. See the @microsoft/rush package for details.
The rush-lib package implements the rush.json config file loader and some other helpful utilities. Tools that want to reuse this functionality can install rush-lib alone to avoid inadvertently adding another "rush" executable to the command-line path (which might interfere with the globally installed Rush).
The @microsoft/rush version number is always exactly equal to the @microsoft/rush-lib version number that it depends on.
API documentation for this package: https://rushjs.io/pages/advanced/api/
Rush is part of the Rush Stack family of projects.
FAQs
A library for writing scripts that interact with the Rush tool
We found that @microsoft/rush-lib demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.