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

@rushstack/rush-sdk

Package Overview
Dependencies
Maintainers
0
Versions
265
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rushstack/rush-sdk - npm Package Compare versions

Comparing version 5.135.0 to 5.136.0

lib/api/Variants.d.ts

2

lib/api/CommonVersionsConfiguration.d.ts

@@ -83,3 +83,3 @@ import type { RushConfiguration } from './RushConfiguration';

*/
static loadFromFile(jsonFilename: string, rushConfiguration?: RushConfiguration): CommonVersionsConfiguration;
static loadFromFile(jsonFilePath: string, rushConfiguration?: RushConfiguration): CommonVersionsConfiguration;
private static _deserializeTable;

@@ -86,0 +86,0 @@ private static _serializeTable;

@@ -40,2 +40,9 @@ import type { IEnvironment } from '../utilities/Utilities';

/**
* This variable selects a specific installation variant for Rush to use when installing
* and linking package dependencies.
* For more information, see the command-line help for the `--variant` parameter
* and this article: https://rushjs.io/pages/advanced/installation_variants/
*/
readonly RUSH_VARIANT: "RUSH_VARIANT";
/**
* Specifies the maximum number of concurrent processes to launch during a build.

@@ -42,0 +49,0 @@ * For more information, see the command-line help for the `--parallelism` parameter for "rush build".

@@ -1,2 +0,2 @@

import { type PackageNameParser } from '@rushstack/node-core-library';
import { type PackageNameParser, type JsonNull } from '@rushstack/node-core-library';
import { LookupByPath } from '@rushstack/lookup-by-path';

@@ -81,2 +81,9 @@ import { RushConfigurationProject, type IRushConfigurationProjectJson } from './RushConfigurationProject';

/**
* Options defining an allowed variant as part of IRushConfigurationJson.
*/
export interface IRushVariantOptionsJson {
variantName: string;
description: string;
}
/**
* This represents the JSON data structure for the "rush.json" configuration file.

@@ -110,5 +117,11 @@ * See rush.schema.json for documentation.

ensureConsistentVersions?: boolean;
variants?: unknown;
variants?: IRushVariantOptionsJson[];
}
/**
* This represents the JSON data structure for the "current-variant.json" data file.
*/
export interface ICurrentVariantJson {
variant: string | JsonNull;
}
/**
* The filter parameters to search from all projects

@@ -144,2 +157,6 @@ */

private readonly _pathTrees;
/**
* @internal
*/
_currentVariantJsonLoadingPromise: Promise<ICurrentVariantJson | undefined> | undefined;
private _projects;

@@ -249,8 +266,9 @@ private _projectsByName;

/**
* If true, the `variants` field is present in rush.json.
* The filename of the variant dependency data file. By default this is
* called 'current-variant.json' and resides in the Rush common folder.
* Its data structure is defined by ICurrentVariantJson.
*
* @internal
* @deprecated - Remove when the field is removed from the rush.json schema.
* Example: `C:\MyRepo\common\temp\current-variant.json`
*/
readonly _hasVariantsField: boolean;
readonly currentVariantJsonFilePath: string;
/**

@@ -442,2 +460,8 @@ * The version of the locally package manager tool. (Example: "1.2.3")

/**
* The variants specified in the rush.json configuration file.
*
* @beta
*/
readonly variants: ReadonlySet<string>;
/**
* Use RushConfiguration.loadFromConfigurationFile() or Use RushConfiguration.loadFromDefaultLocation()

@@ -568,19 +592,30 @@ * instead.

*
* @deprecated Use `getCommonVersions` instead, which gets the correct common version data.
* @deprecated Use `getCommonVersions` instead, which gets the correct common version data
* for a given active variant.
*/
get commonVersions(): CommonVersionsConfiguration;
/**
* Gets the currently-installed variant, if an installation has occurred.
* For Rush operations which do not take a --variant parameter, this method
* determines which variant, if any, was last specified when performing "rush install"
* or "rush update".
*/
getCurrentlyInstalledVariantAsync(): Promise<string | undefined>;
/**
* @deprecated Use {@link Subspace.getCommonVersionsFilePath} instead
*/
getCommonVersionsFilePath(subspace?: Subspace): string;
getCommonVersionsFilePath(subspace?: Subspace, variant?: string): string;
/**
* @deprecated Use {@link Subspace.getCommonVersions} instead
*/
getCommonVersions(subspace?: Subspace): CommonVersionsConfiguration;
getCommonVersions(subspace?: Subspace, variant?: string): CommonVersionsConfiguration;
/**
* Returns a map of all direct dependencies that only have a single semantic version specifier.
*
* @param subspace - The subspace to use
* @param variant - The name of the current variant in use by the active command.
*
* @returns A map of dependency name --\> version specifier for implicitly preferred versions.
*/
getImplicitlyPreferredVersions(subspace?: Subspace): Map<string, string>;
getImplicitlyPreferredVersions(subspace?: Subspace, variant?: string): Map<string, string>;
/**

@@ -595,9 +630,9 @@ * @deprecated Use {@link Subspace.getRepoStateFilePath} instead

/**
* @deprecated Use {@link Subspace.getCommittedShrinkwrapFilename} instead
* @deprecated Use {@link Subspace.getCommittedShrinkwrapFilePath} instead
*/
getCommittedShrinkwrapFilename(subspace?: Subspace): string;
getCommittedShrinkwrapFilename(subspace?: Subspace, variant?: string): string;
/**
* @deprecated Use {@link Subspace.getRepoStateFilePath} instead
* @deprecated Use {@link Subspace.getPnpmfilePath} instead
*/
getPnpmfilePath(subspace?: Subspace): string;
getPnpmfilePath(subspace?: Subspace, variant?: string): string;
/**

@@ -630,3 +665,4 @@ * Looks up a project in the projectsByName map. If the project is not found,

tryGetProjectForPath(currentFolderPath: string): RushConfigurationProject | undefined;
private _loadCurrentVariantJsonAsync;
}
//# sourceMappingURL=RushConfiguration.d.ts.map

@@ -41,2 +41,17 @@ import type { RushConfiguration } from './RushConfiguration';

/**
* Returns the full path of the folder containing this subspace's variant-dependent configuration files
* such as `pnpm-lock.yaml`.
*
* Example: `common/config/subspaces/my-subspace` or `common/config/subspaces/my-subspace/variants/my-variant`
* @beta
*
* @remarks
* The following files may be variant-dependent:
* - Lockfiles: (i.e. - `pnpm-lock.yaml`, `npm-shrinkwrap.json`, `yarn.lock`, etc)
* - 'common-versions.json'
* - 'pnpmfile.js'/'.pnpmfile.cjs'
* - 'pnpm-config.js'
*/
getVariantDependentSubspaceConfigFolderPath(variant: string | undefined): string;
/**
* Returns the full path of the folder containing this subspace's configuration files such as `pnpm-lock.yaml`.

@@ -76,2 +91,6 @@ *

/**
* @deprecated - Use {@link Subspace.getTempShrinkwrapPreinstallFilePath} instead.
*/
getTempShrinkwrapPreinstallFilename(subspaceName?: string | undefined): string;
/**
* The full path of a backup copy of tempShrinkwrapFilename. This backup copy is made

@@ -86,3 +105,3 @@ * before installation begins, and can be compared to determine how the package manager

*/
getTempShrinkwrapPreinstallFilename(subspaceName?: string | undefined): string;
getTempShrinkwrapPreinstallFilePath(): string;
/**

@@ -94,3 +113,3 @@ * Gets the path to the common-versions.json config file for this subspace.

*/
getCommonVersionsFilePath(): string;
getCommonVersionsFilePath(variant?: string): string;
/**

@@ -102,3 +121,3 @@ * Gets the path to the pnpm-config.json config file for this subspace.

*/
getPnpmConfigFilePath(): string;
getPnpmConfigFilePath(variant?: string): string;
/**

@@ -108,3 +127,3 @@ * Gets the settings from the common-versions.json config file.

*/
getCommonVersions(): CommonVersionsConfiguration;
getCommonVersions(variant?: string): CommonVersionsConfiguration;
/**

@@ -115,3 +134,3 @@ * Gets the ensureConsistentVersions property from the common-versions.json config file,

*/
get shouldEnsureConsistentVersions(): boolean;
shouldEnsureConsistentVersions(variant?: string): boolean;
/**

@@ -129,7 +148,12 @@ * Gets the path to the repo-state.json file.

/**
* Gets the committed shrinkwrap file name.
* @beta
* @deprecated - Use {@link Subspace.getCommittedShrinkwrapFilePath} instead.
*/
getCommittedShrinkwrapFilename(): string;
/**
* Gets the committed shrinkwrap file name for a specific variant.
* @param variant - The name of the current variant in use by the active command.
* @beta
*/
getCommittedShrinkwrapFilePath(variant?: string): string;
/**
* Gets the absolute path for "pnpmfile.js" for a specific subspace.

@@ -141,3 +165,3 @@ * @param subspace - The name of the current subspace in use by the active command.

*/
getPnpmfilePath(): string;
getPnpmfilePath(variant?: string): string;
/**

@@ -154,4 +178,4 @@ * Returns true if the specified project belongs to this subspace.

*/
getPackageJsonInjectedDependenciesHash(): string | undefined;
getPackageJsonInjectedDependenciesHash(variant?: string): string | undefined;
}
//# sourceMappingURL=Subspace.d.ts.map

@@ -13,5 +13,6 @@ import type { CommandLineFlagParameter, CommandLineStringListParameter } from '@rushstack/ts-command-line';

private readonly _makeConsistentFlag;
private readonly _variantParameter;
constructor(parser: RushCommandLineParser);
getUpdateOptions(): IPackageJsonUpdaterRushAddOptions;
getUpdateOptionsAsync(): Promise<IPackageJsonUpdaterRushAddOptions>;
}
//# sourceMappingURL=AddAction.d.ts.map

@@ -32,3 +32,3 @@ import type { CommandLineFlagParameter, CommandLineStringListParameter } from '@rushstack/ts-command-line';

constructor(options: IBaseRushActionOptions);
protected abstract getUpdateOptions(): IPackageJsonUpdaterRushBaseUpdateOptions;
protected abstract getUpdateOptionsAsync(): Promise<IPackageJsonUpdaterRushBaseUpdateOptions>;
protected getProjects(): RushConfigurationProject[];

@@ -35,0 +35,0 @@ runAsync(): Promise<void>;

@@ -1,2 +0,2 @@

import type { CommandLineFlagParameter, CommandLineIntegerParameter, IRequiredCommandLineIntegerParameter } from '@rushstack/ts-command-line';
import type { CommandLineFlagParameter, CommandLineIntegerParameter, CommandLineStringParameter, IRequiredCommandLineIntegerParameter } from '@rushstack/ts-command-line';
import { type ITerminal } from '@rushstack/terminal';

@@ -11,2 +11,3 @@ import { BaseRushAction, type IBaseRushActionOptions } from './BaseRushAction';

protected readonly _terminal: ITerminal;
protected readonly _variantParameter: CommandLineStringParameter;
protected readonly _purgeParameter: CommandLineFlagParameter;

@@ -13,0 +14,0 @@ protected readonly _bypassPolicyParameter: CommandLineFlagParameter;

@@ -8,2 +8,3 @@ import type { RushCommandLineParser } from '../RushCommandLineParser';

private readonly _subspaceParameter;
private readonly _variantParameter;
constructor(parser: RushCommandLineParser);

@@ -10,0 +11,0 @@ protected runAsync(): Promise<void>;

@@ -8,7 +8,7 @@ import type { CommandLineFlagParameter, CommandLineStringListParameter } from '@rushstack/ts-command-line';

protected readonly _packageNameList: CommandLineStringListParameter;
private _terminalProvider;
private _terminal;
private readonly _variantParameter;
private readonly _terminal;
constructor(parser: RushCommandLineParser);
getUpdateOptions(): IPackageJsonUpdaterRushRemoveOptions;
getUpdateOptionsAsync(): Promise<IPackageJsonUpdaterRushRemoveOptions>;
}
//# sourceMappingURL=RemoveAction.d.ts.map

@@ -6,2 +6,3 @@ import type { RushCommandLineParser } from '../RushCommandLineParser';

private _skipUpdateFlag;
private readonly _variantParameter;
constructor(parser: RushCommandLineParser);

@@ -8,0 +9,0 @@ runAsync(): Promise<void>;

@@ -54,2 +54,3 @@ import { PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';

private readonly _installParameter;
private readonly _variantParameter;
private readonly _noIPCParameter;

@@ -56,0 +57,0 @@ constructor(options: IPhasedScriptActionOptions);

@@ -68,2 +68,6 @@ import type { ITerminal } from '@rushstack/terminal';

/**
* The variant to consider when performing installations and validating shrinkwrap updates.
*/
variant: string | undefined;
/**
* Retry the install the specified number of times

@@ -70,0 +74,0 @@ */

@@ -88,6 +88,7 @@ import { type ITerminal } from '@rushstack/terminal';

* @param project - the Rush project that is being validated against the shrinkwrap
* @param variant - the variant that is being validated
*
* @virtual
*/
abstract isWorkspaceProjectModifiedAsync(project: RushConfigurationProject, subspace: Subspace): Promise<boolean>;
abstract isWorkspaceProjectModifiedAsync(project: RushConfigurationProject, subspace: Subspace, variant: string | undefined): Promise<boolean>;
/** @virtual */

@@ -94,0 +95,0 @@ protected abstract serialize(): string;

@@ -23,6 +23,6 @@ import type { CommonVersionsConfiguration } from '../api/CommonVersionsConfiguration';

private _rushConfiguration;
private _analysisBySubspace;
private _analysisByVariantBySubspace;
private constructor();
static forRushConfiguration(rushConfiguration: RushConfiguration): DependencyAnalyzer;
getAnalysis(subspace?: Subspace, addAction?: boolean): IDependencyAnalysis;
getAnalysis(subspace: Subspace | undefined, variant: string | undefined, addAction: boolean): IDependencyAnalysis;
/**

@@ -29,0 +29,0 @@ * Generates the {@link IDependencyAnalysis}.

@@ -28,4 +28,4 @@ import { BaseShrinkwrapFile } from '../base/BaseShrinkwrapFile';

/** @override */
isWorkspaceProjectModifiedAsync(project: RushConfigurationProject, subspace: Subspace): Promise<boolean>;
isWorkspaceProjectModifiedAsync(project: RushConfigurationProject, subspace: Subspace, variant: string | undefined): Promise<boolean>;
}
//# sourceMappingURL=NpmShrinkwrapFile.d.ts.map

@@ -48,2 +48,6 @@ import type { RushConfigurationProject } from '../api/RushConfigurationProject';

actionName: string;
/**
* The variant to consider when performing installations and validating shrinkwrap updates.
*/
variant: string | undefined | undefined;
}

@@ -50,0 +54,0 @@ /**

@@ -11,4 +11,4 @@ import { type IPackageJson } from '@rushstack/node-core-library';

private constructor();
static initializeAsync(rushConfiguration: RushConfiguration, subspace: Subspace): Promise<PnpmfileConfiguration>;
static writeCommonTempPnpmfileShimAsync(rushConfiguration: RushConfiguration, targetDir: string, subspace: Subspace): Promise<void>;
static initializeAsync(rushConfiguration: RushConfiguration, subspace: Subspace, variant: string | undefined): Promise<PnpmfileConfiguration>;
static writeCommonTempPnpmfileShimAsync(rushConfiguration: RushConfiguration, targetDir: string, subspace: Subspace, variant: string | undefined): Promise<void>;
private static _getPnpmfileShimSettingsAsync;

@@ -15,0 +15,0 @@ /**

@@ -258,3 +258,3 @@ import { type ITerminal } from '@rushstack/terminal';

/** @override */
isWorkspaceProjectModifiedAsync(project: RushConfigurationProject, subspace: Subspace): Promise<boolean>;
isWorkspaceProjectModifiedAsync(project: RushConfigurationProject, subspace: Subspace, variant: string | undefined): Promise<boolean>;
private _getIntegrityForPackage;

@@ -261,0 +261,0 @@ private _addIntegrities;

@@ -14,4 +14,4 @@ import type { ISubspacePnpmfileShimSettings } from './IPnpmfile';

*/
static writeCommonTempSubspaceGlobalPnpmfileAsync(rushConfiguration: RushConfiguration, subspace: Subspace): Promise<void>;
static getSubspacePnpmfileShimSettings(rushConfiguration: RushConfiguration, subspace: Subspace): ISubspacePnpmfileShimSettings;
static writeCommonTempSubspaceGlobalPnpmfileAsync(rushConfiguration: RushConfiguration, subspace: Subspace, variant: string | undefined): Promise<void>;
static getSubspacePnpmfileShimSettings(rushConfiguration: RushConfiguration, subspace: Subspace, variant: string | undefined): ISubspacePnpmfileShimSettings;
private static _getProjectNameToInjectedDependenciesMap;

@@ -18,0 +18,0 @@ private static _processDependenciesForTransitiveInjectedInstall;

@@ -8,3 +8,3 @@ import type { RushConfiguration } from '../../api/RushConfiguration';

}
export declare function validatePolicyAsync(rushConfiguration: RushConfiguration, subspace: Subspace, options: IPolicyValidatorOptions): Promise<void>;
export declare function validatePolicyAsync(rushConfiguration: RushConfiguration, subspace: Subspace, variant: string | undefined, options: IPolicyValidatorOptions): Promise<void>;
//# sourceMappingURL=PolicyValidator.d.ts.map

@@ -11,3 +11,3 @@ import type { RushConfiguration } from '../../api/RushConfiguration';

*/
export declare function validate(rushConfiguration: RushConfiguration, subspace: Subspace, options: IPolicyValidatorOptions): void;
export declare function validate(rushConfiguration: RushConfiguration, subspace: Subspace, variant: string | undefined, options: IPolicyValidatorOptions): void;
//# sourceMappingURL=ShrinkwrapFilePolicy.d.ts.map

@@ -11,2 +11,3 @@ import type { ITerminal } from '@rushstack/terminal';

shouldFetch?: boolean;
variant?: string;
/**

@@ -13,0 +14,0 @@ * If set to `true`, consider a project's external dependency installation layout as defined in the

@@ -54,3 +54,3 @@ import type { RushConfiguration } from '../api/RushConfiguration';

*/
refreshState(rushConfiguration: RushConfiguration, subspace: Subspace | undefined): boolean;
refreshState(rushConfiguration: RushConfiguration, subspace: Subspace | undefined, variant?: string): boolean;
/**

@@ -57,0 +57,0 @@ * Writes the "repo-state.json" file to disk, using the filename that was passed to loadFromFile().

@@ -45,2 +45,8 @@ /**

/**
* The folder name ("variants") under which named variant configurations for
* alternate dependency sets may be found.
* Example: `C:\MyRepo\common\config\rush\variants`
*/
static readonly rushVariantsFolderName: 'variants';
/**
* The folder name ("temp") under the common folder, or under the .rush folder in each project's directory where

@@ -272,3 +278,7 @@ * temporary files will be stored.

static readonly rushAlertsStateFilename: 'rush-alerts-state.json';
/**
* The filename for the file that tracks which variant is currently installed.
*/
static readonly currentVariantsFilename: 'current-variants.json';
}
//# sourceMappingURL=RushConstants.d.ts.map

@@ -6,3 +6,4 @@ import { type ITerminal } from '@rushstack/terminal';

export interface IVersionMismatchFinderOptions {
subspace: Subspace;
subspace?: Subspace;
variant: string | undefined;
}

@@ -12,3 +13,2 @@ export interface IVersionMismatchFinderRushCheckOptions extends IVersionMismatchFinderOptions {

truncateLongPackageNameLists?: boolean | undefined;
subspace: Subspace;
}

@@ -15,0 +15,0 @@ export interface IVersionMismatchFinderEnsureConsistentVersionsOptions extends IVersionMismatchFinderOptions {

@@ -61,7 +61,15 @@ import { AsyncParallelHook, AsyncSeriesHook, HookMap } from 'tapable';

*/
readonly beforeInstall: AsyncSeriesHook<[IGlobalCommand, Subspace]>;
readonly beforeInstall: AsyncSeriesHook<[
command: IGlobalCommand,
subspace: Subspace,
variant: string | undefined
]>;
/**
* The hook to run after a successful install.
*/
readonly afterInstall: AsyncSeriesHook<[IRushCommand, Subspace]>;
readonly afterInstall: AsyncSeriesHook<[
command: IRushCommand,
subspace: Subspace,
variant: string | undefined
]>;
/**

@@ -68,0 +76,0 @@ * A hook to allow plugins to hook custom logic to process telemetry data.

@@ -123,3 +123,3 @@ /// <reference types="node" />

static dangerouslyDeletePath(folderPath: string): void;
static isFileTimestampCurrent(dateToCompare: Date, inputFilenames: string[]): boolean;
static isFileTimestampCurrentAsync(dateToCompare: Date, inputFilePaths: string[]): Promise<boolean>;
static executeCommandAsync(options: IExecuteCommandOptions & {

@@ -126,0 +126,0 @@ captureExitCodeAndSignal: true;

{
"name": "@rushstack/rush-sdk",
"version": "5.135.0",
"version": "5.136.0",
"description": "An API for interacting with the Rush engine",

@@ -46,9 +46,9 @@ "repository": {

"webpack": "~5.82.1",
"@microsoft/rush-lib": "5.135.0",
"@microsoft/rush-lib": "5.136.0",
"@rushstack/heft": "0.67.2",
"@rushstack/heft-webpack5-plugin": "0.10.11",
"local-node-rig": "1.0.0",
"@rushstack/ts-command-line": "4.22.8",
"@rushstack/heft-webpack5-plugin": "0.10.12",
"@rushstack/stream-collator": "4.1.67",
"@rushstack/webpack-preserve-dynamic-require-plugin": "0.11.66",
"@rushstack/ts-command-line": "4.22.8",
"local-node-rig": "1.0.0"
"@rushstack/webpack-preserve-dynamic-require-plugin": "0.11.66"
},

@@ -55,0 +55,0 @@ "scripts": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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