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

@rushstack/rush-sdk

Package Overview
Dependencies
Maintainers
3
Versions
263
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.138.0 to 5.139.0

lib/logic/incremental/InputsSnapshot.d.ts

2

dist/tsdoc-metadata.json

@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.

"packageName": "@microsoft/api-extractor",
"packageVersion": "7.47.9"
"packageVersion": "7.47.11"
}
]
}

@@ -29,2 +29,6 @@ import { type JsonObject } from '@rushstack/node-core-library';

cacheEntryNamePattern?: string;
/**
* An optional salt to inject during calculation of the cache key. This can be used to invalidate the cache for all projects when the salt changes.
*/
cacheHashSalt?: string;
}

@@ -76,2 +80,6 @@ /**

readonly cloudCacheProvider: ICloudBuildCacheProvider | undefined;
/**
* An optional salt to inject during calculation of the cache key. This can be used to invalidate the cache for all projects when the salt changes.
*/
readonly cacheHashSalt: string | undefined;
private constructor();

@@ -78,0 +86,0 @@ /**

@@ -39,3 +39,4 @@ /**

export { CustomTipsConfiguration, CustomTipId, type ICustomTipsJson, type ICustomTipInfo, type ICustomTipItemJson, CustomTipSeverity, CustomTipType } from './api/CustomTipsConfiguration';
export { ProjectChangeAnalyzer, type IGetChangedProjectsOptions, type IRawRepoState as _IRawRepoState } from './logic/ProjectChangeAnalyzer';
export { ProjectChangeAnalyzer, type IGetChangedProjectsOptions } from './logic/ProjectChangeAnalyzer';
export type { IInputsSnapshot, GetInputsSnapshotAsyncFn as GetInputsSnapshotAsyncFn, IRushConfigurationProjectForSnapshot } from './logic/incremental/InputsSnapshot';
export type { IOperationRunner, IOperationRunnerContext } from './logic/operations/IOperationRunner';

@@ -42,0 +43,0 @@ export type { IExecutionResult, IOperationExecutionResult } from './logic/operations/IOperationExecutionResult';

import type { ITerminal } from '@rushstack/terminal';
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
import type { ProjectChangeAnalyzer } from '../ProjectChangeAnalyzer';
import type { BuildCacheConfiguration } from '../../api/BuildCacheConfiguration';
export interface IProjectBuildCacheOptions {
/**
* The repo-wide configuration for the build cache.
*/
buildCacheConfiguration: BuildCacheConfiguration;
/**
* The project to be cached.
*/
project: RushConfigurationProject;
/**
* Value from rush-project.json
*/
projectOutputFolderNames: ReadonlyArray<string>;
additionalProjectOutputFilePaths?: ReadonlyArray<string>;
additionalContext?: Record<string, string>;
configHash: string;
projectChangeAnalyzer: ProjectChangeAnalyzer;
/**
* The hash of all relevant inputs and configuration that uniquely identifies this execution.
*/
operationStateHash: string;
/**
* The terminal to use for logging.
*/
terminal: ITerminal;
/**
* The name of the phase that is being cached.
*/
phaseName: string;
}
export declare class ProjectBuildCache {
/**
* null === we haven't tried to initialize yet
* undefined === unable to initialize
*/
private static _tarUtilityPromise;

@@ -28,8 +38,7 @@ private readonly _project;

private readonly _projectOutputFolderNames;
private readonly _additionalProjectOutputFilePaths;
private _cacheId;
private readonly _cacheId;
private constructor();
private static _tryGetTarUtility;
get cacheId(): string | undefined;
static tryGetProjectBuildCacheAsync(options: IProjectBuildCacheOptions): Promise<ProjectBuildCache | undefined>;
static getProjectBuildCache(options: IProjectBuildCacheOptions): ProjectBuildCache;
tryRestoreFromCacheAsync(terminal: ITerminal, specifiedCacheId?: string): Promise<boolean>;

@@ -44,4 +53,4 @@ trySetCacheEntryAsync(terminal: ITerminal, specifiedCacheId?: string): Promise<boolean>;

private _getTarLogFilePath;
private static _getCacheIdAsync;
private static _getCacheId;
}
//# sourceMappingURL=ProjectBuildCache.d.ts.map
import { type TerminalWritable, type ITerminal } from '@rushstack/terminal';
import { CobuildLock } from '../cobuild/CobuildLock';
import { ProjectBuildCache } from '../buildCache/ProjectBuildCache';
import { type IOperationSettings } from '../../api/RushProjectConfiguration';
import type { CobuildConfiguration } from '../../api/CobuildConfiguration';

@@ -10,3 +9,2 @@ import { DisjointSet } from '../cobuild/DisjointSet';

import type { IPhasedCommandPlugin, PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';
import type { ProjectChangeAnalyzer } from '../ProjectChangeAnalyzer';
import type { BuildCacheConfiguration } from '../../api/BuildCacheConfiguration';

@@ -22,6 +20,6 @@ export interface IProjectDeps {

isCacheReadAllowed: boolean;
projectChangeAnalyzer: ProjectChangeAnalyzer;
projectBuildCache: ProjectBuildCache | undefined;
stateHash: string;
operationBuildCache: ProjectBuildCache | undefined;
cacheDisabledReason: string | undefined;
operationSettings: IOperationSettings | undefined;
outputFolderNames: ReadonlyArray<string>;
cobuildLock: CobuildLock | undefined;

@@ -48,3 +46,3 @@ cobuildClusterId: string | undefined;

private _getBuildCacheContextByOperationOrThrow;
private _tryGetProjectBuildCacheAsync;
private _tryGetProjectBuildCache;
private _tryGetLogOnlyProjectBuildCacheAsync;

@@ -51,0 +49,0 @@ private _tryGetCobuildLockAsync;

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

/**
* If this operation is only present in the graph to maintain dependency relationships, this flag will be set to true.
*/
readonly silent: boolean;
/**
* Object tracking execution timing.

@@ -45,2 +49,6 @@ */

/**
* The relative path to the folder that contains operation metadata. This folder will be automatically included in cache entries.
*/
readonly metadataFolderPath: string | undefined;
/**
* The paths to the log files, if applicable.

@@ -47,0 +55,0 @@ */

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

settings: IOperationSettings | undefined;
/**
* If set to false, this operation will be skipped during evaluation (return OperationStatus.Skipped).
* This is useful for plugins to alter the scope of the operation graph across executions,
* e.g. to enable or disable unit test execution, or to include or exclude dependencies.
*/
enabled: boolean;
constructor(options: IOperationOptions);

@@ -88,0 +94,0 @@ /**

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

import { type ILogFilePaths } from './ProjectLogWritable';
import type { IOperationExecutionResult } from './IOperationExecutionResult';
export interface IOperationExecutionRecordContext {

@@ -23,3 +24,3 @@ streamCollator: StreamCollator;

*/
export declare class OperationExecutionRecord implements IOperationRunnerContext {
export declare class OperationExecutionRecord implements IOperationRunnerContext, IOperationExecutionResult {
/**

@@ -92,2 +93,3 @@ * The associated operation.

get cobuildRunnerId(): string | undefined;
get metadataFolderPath(): string | undefined;
get isTerminal(): boolean;

@@ -102,2 +104,3 @@ /**

set status(newStatus: OperationStatus);
get silent(): boolean;
/**

@@ -104,0 +107,0 @@ * {@inheritdoc IOperationRunnerContext.runWithTerminalAsync}

@@ -40,5 +40,2 @@ import { type ITerminalChunk, type ITerminal, type ITerminalProvider } from '@rushstack/terminal';

private readonly _logChunksPath;
private readonly _relativeLogPath;
private readonly _relativeLogChunksPath;
private readonly _relativeErrorLogPath;
constructor(options: IOperationMetadataManagerOptions);

@@ -52,3 +49,3 @@ /**

*/
get relativeFilepaths(): string[];
get metadataFolderPath(): string;
saveAsync({ durationInSeconds, cobuildContextId, cobuildRunnerId, logPath, errorLogPath, logChunksPath }: IOperationMetaData): Promise<void>;

@@ -55,0 +52,0 @@ tryRestoreAsync({ terminal, terminalProvider, errorLogPath }: {

@@ -0,6 +1,8 @@

import type { LookupByPath } from '@rushstack/lookup-by-path';
import { type IFileDiffStatus } from '@rushstack/package-deps-hash';
import type { ITerminal } from '@rushstack/terminal';
import type { RushConfiguration } from '../api/RushConfiguration';
import { RushProjectConfiguration } from '../api/RushProjectConfiguration';
import type { RushConfigurationProject } from '../api/RushConfigurationProject';
import type { LookupByPath } from '@rushstack/lookup-by-path';
import { type GetInputsSnapshotAsyncFn } from './incremental/InputsSnapshot';
/**

@@ -37,9 +39,2 @@ * @beta

export declare class ProjectChangeAnalyzer {
/**
* UNINITIALIZED === we haven't looked
* undefined === data isn't available (i.e. - git isn't present)
*/
private _data;
private readonly _filteredData;
private readonly _projectStateCache;
private readonly _rushConfiguration;

@@ -49,39 +44,20 @@ private readonly _git;

/**
* Try to get a list of the specified project's dependencies and their hashes.
*
* @remarks
* If the data can't be generated (i.e. - if Git is not present) this returns undefined.
*
* @internal
* Gets a list of projects that have changed in the current state of the repo
* when compared to the specified branch, optionally taking the shrinkwrap and settings in
* the rush-project.json file into consideration.
*/
_tryGetProjectDependenciesAsync(project: RushConfigurationProject, terminal: ITerminal): Promise<Map<string, string> | undefined>;
getChangedProjectsAsync(options: IGetChangedProjectsOptions): Promise<Set<RushConfigurationProject>>;
protected getChangesByProject(lookup: LookupByPath<RushConfigurationProject>, changedFiles: Map<string, IFileDiffStatus>): Map<RushConfigurationProject, Map<string, IFileDiffStatus>>;
/**
* Gets a snapshot of the input state of the Rush workspace that can be queried for incremental
* build operations and use by the build cache.
* @internal
*/
_ensureInitializedAsync(terminal: ITerminal): Promise<IRawRepoState | undefined>;
_tryGetSnapshotProviderAsync(projectConfigurations: ReadonlyMap<RushConfigurationProject, RushProjectConfiguration>, terminal: ITerminal): Promise<GetInputsSnapshotAsyncFn | undefined>;
/**
* The project state hash is calculated in the following way:
* - Project dependencies are collected (see ProjectChangeAnalyzer.getPackageDeps)
* - If project dependencies cannot be collected (i.e. - if Git isn't available),
* this function returns `undefined`
* - The (path separator normalized) repo-root-relative dependencies' file paths are sorted
* - A SHA1 hash is created and each (sorted) file path is fed into the hash and then its
* Git SHA is fed into the hash
* - A hex digest of the hash is returned
*
* @internal
*/
_tryGetProjectStateHashAsync(project: RushConfigurationProject, terminal: ITerminal): Promise<string | undefined>;
_filterProjectDataAsync<T>(project: RushConfigurationProject, unfilteredProjectData: Map<string, T>, rootDir: string, terminal: ITerminal): Promise<Map<string, T>>;
/**
* Gets a list of projects that have changed in the current state of the repo
* when compared to the specified branch, optionally taking the shrinkwrap and settings in
* the rush-project.json file into consideration.
*/
getChangedProjectsAsync(options: IGetChangedProjectsOptions): Promise<Set<RushConfigurationProject>>;
protected getChangesByProject(lookup: LookupByPath<RushConfigurationProject>, changedFiles: Map<string, IFileDiffStatus>): Map<RushConfigurationProject, Map<string, IFileDiffStatus>>;
private _getDataAsync;
private _getIgnoreMatcherForProjectAsync;
private _getRepoDepsAsync;
}
//# sourceMappingURL=ProjectChangeAnalyzer.d.ts.map

@@ -8,3 +8,2 @@ import { AsyncParallelHook, AsyncSeriesBailHook, AsyncSeriesHook, AsyncSeriesWaterfallHook, SyncHook } from 'tapable';

import type { Operation } from '../logic/operations/Operation';
import type { ProjectChangeAnalyzer } from '../logic/ProjectChangeAnalyzer';
import type { IExecutionResult, IOperationExecutionResult } from '../logic/operations/IOperationExecutionResult';

@@ -16,2 +15,3 @@ import type { CobuildConfiguration } from '../api/CobuildConfiguration';

import type { OperationStatus } from '../logic/operations/OperationStatus';
import type { IInputsSnapshot } from '../logic/incremental/InputsSnapshot';
/**

@@ -97,7 +97,6 @@ * A plugin that interacts with a phased commands.

/**
* The current state of the repository.
*
* Note that this is not defined during the initial operation creation.
* The current state of the repository, if available.
* Not part of the creation context to avoid the overhead of Git calls when initializing the graph.
*/
readonly projectChangeAnalyzer: ProjectChangeAnalyzer;
readonly inputsSnapshot?: IInputsSnapshot;
}

@@ -104,0 +103,0 @@ /**

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

@@ -38,6 +38,6 @@ "repository": {

"tapable": "2.2.1",
"@rushstack/lookup-by-path": "0.3.0",
"@rushstack/node-core-library": "5.9.0",
"@rushstack/package-deps-hash": "4.2.3",
"@rushstack/terminal": "0.14.2"
"@rushstack/lookup-by-path": "0.4.0",
"@rushstack/terminal": "0.14.2",
"@rushstack/package-deps-hash": "4.2.5"
},

@@ -48,9 +48,9 @@ "devDependencies": {

"webpack": "~5.95.0",
"@microsoft/rush-lib": "5.138.0",
"@rushstack/heft": "0.68.2",
"@rushstack/heft-webpack5-plugin": "0.11.0",
"@microsoft/rush-lib": "5.139.0",
"@rushstack/heft": "0.68.4",
"@rushstack/heft-webpack5-plugin": "0.11.2",
"@rushstack/stream-collator": "4.1.72",
"local-node-rig": "1.0.0",
"@rushstack/ts-command-line": "4.22.8",
"@rushstack/webpack-preserve-dynamic-require-plugin": "0.11.69",
"@rushstack/stream-collator": "4.1.70"
"@rushstack/ts-command-line": "4.23.0",
"@rushstack/webpack-preserve-dynamic-require-plugin": "0.11.71"
},

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

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

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