@rushstack/rush-sdk 5.142.0 → 5.143.0-pr5009.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/logic/ApprovedPackagesChecker.d.ts +23 -0
- package/lib/logic/ApprovedPackagesChecker.js +1 -0
- package/lib/logic/InstallManagerFactory.d.ts +9 -0
- package/lib/logic/InstallManagerFactory.js +1 -0
- package/lib/logic/InteractiveUpgrader.d.ts +17 -0
- package/lib/logic/InteractiveUpgrader.js +1 -0
- package/lib/logic/LinkManagerFactory.d.ts +6 -0
- package/lib/logic/LinkManagerFactory.js +1 -0
- package/lib/logic/PackageJsonUpdater.d.ts +131 -0
- package/lib/logic/PackageJsonUpdater.js +1 -0
- package/lib/logic/PackageLookup.d.ts +8 -0
- package/lib/logic/PackageLookup.js +1 -0
- package/lib/logic/ProjectImpactGraphGenerator.d.ts +51 -0
- package/lib/logic/ProjectImpactGraphGenerator.js +1 -0
- package/lib/logic/ProjectWatcher.d.ts +78 -0
- package/lib/logic/ProjectWatcher.js +1 -0
- package/lib/logic/TempProjectHelper.d.ts +19 -0
- package/lib/logic/TempProjectHelper.js +1 -0
- package/lib/logic/VersionManager.d.ts +48 -0
- package/lib/logic/VersionManager.js +1 -0
- package/lib/logic/base/BaseInstallManager.d.ts +57 -0
- package/lib/logic/base/BaseInstallManager.js +1 -0
- package/lib/logic/base/BaseLinkManager.d.ts +35 -0
- package/lib/logic/base/BaseLinkManager.js +1 -0
- package/lib/logic/base/BasePackage.d.ts +113 -0
- package/lib/logic/base/BasePackage.js +1 -0
- package/lib/logic/base/BaseWorkspaceFile.d.ts +31 -0
- package/lib/logic/base/BaseWorkspaceFile.js +1 -0
- package/lib/logic/installManager/RushInstallManager.d.ts +77 -0
- package/lib/logic/installManager/RushInstallManager.js +1 -0
- package/lib/logic/installManager/WorkspaceInstallManager.d.ts +46 -0
- package/lib/logic/installManager/WorkspaceInstallManager.js +1 -0
- package/lib/logic/installManager/doBasicInstallAsync.d.ts +17 -0
- package/lib/logic/installManager/doBasicInstallAsync.js +1 -0
- package/lib/logic/npm/NpmLinkManager.d.ts +12 -0
- package/lib/logic/npm/NpmLinkManager.js +1 -0
- package/lib/logic/npm/NpmPackage.d.ts +86 -0
- package/lib/logic/npm/NpmPackage.js +1 -0
- package/lib/logic/operations/BuildPlanPlugin.d.ts +8 -0
- package/lib/logic/operations/BuildPlanPlugin.js +1 -0
- package/lib/logic/operations/ConsoleTimelinePlugin.d.ts +26 -0
- package/lib/logic/operations/ConsoleTimelinePlugin.js +1 -0
- package/lib/logic/operations/IPCOperationRunner.d.ts +34 -0
- package/lib/logic/operations/IPCOperationRunner.js +1 -0
- package/lib/logic/operations/IPCOperationRunnerPlugin.d.ts +8 -0
- package/lib/logic/operations/IPCOperationRunnerPlugin.js +1 -0
- package/lib/logic/operations/PnpmSyncCopyOperationPlugin.d.ts +8 -0
- package/lib/logic/operations/PnpmSyncCopyOperationPlugin.js +1 -0
- package/lib/logic/pnpm/PnpmLinkManager.d.ts +18 -0
- package/lib/logic/pnpm/PnpmLinkManager.js +1 -0
- package/lib/logic/pnpm/PnpmShrinkWrapFileConverters.d.ts +11 -0
- package/lib/logic/pnpm/PnpmShrinkWrapFileConverters.js +1 -0
- package/lib/logic/pnpm/PnpmShrinkwrapFile.d.ts +46 -90
- package/lib/logic/pnpm/PnpmWorkspaceFile.d.ts +18 -0
- package/lib/logic/pnpm/PnpmWorkspaceFile.js +1 -0
- package/lib/utilities/InteractiveUpgradeUI.d.ts +22 -0
- package/lib/utilities/InteractiveUpgradeUI.js +1 -0
- package/lib/utilities/WebClient.d.ts +56 -0
- package/lib/utilities/WebClient.js +1 -0
- package/package.json +7 -6
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
2
|
+
export declare class ApprovedPackagesChecker {
|
|
3
|
+
private readonly _rushConfiguration;
|
|
4
|
+
private _approvedPackagesPolicy;
|
|
5
|
+
private _filesAreOutOfDate;
|
|
6
|
+
constructor(rushConfiguration: RushConfiguration);
|
|
7
|
+
/**
|
|
8
|
+
* If true, the files on disk are out of date.
|
|
9
|
+
*/
|
|
10
|
+
get approvedPackagesFilesAreOutOfDate(): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Examines the current dependencies for the projects specified in RushConfiguration,
|
|
13
|
+
* and then adds them to the 'browser-approved-packages.json' and
|
|
14
|
+
* 'nonbrowser-approved-packages.json' config files. If these files don't exist,
|
|
15
|
+
* they will be created.
|
|
16
|
+
*
|
|
17
|
+
* If the "approvedPackagesPolicy" feature is not enabled, then no action is taken.
|
|
18
|
+
*/
|
|
19
|
+
rewriteConfigFiles(): void;
|
|
20
|
+
private _updateApprovedPackagesPolicy;
|
|
21
|
+
private _collectDependencies;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=ApprovedPackagesChecker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/ApprovedPackagesChecker");
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PurgeManager } from './PurgeManager';
|
|
2
|
+
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
3
|
+
import type { RushGlobalFolder } from '../api/RushGlobalFolder';
|
|
4
|
+
import type { BaseInstallManager } from './base/BaseInstallManager';
|
|
5
|
+
import type { IInstallManagerOptions } from './base/BaseInstallManagerTypes';
|
|
6
|
+
export declare class InstallManagerFactory {
|
|
7
|
+
static getInstallManagerAsync(rushConfiguration: RushConfiguration, rushGlobalFolder: RushGlobalFolder, purgeManager: PurgeManager, options: IInstallManagerOptions): Promise<BaseInstallManager>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=InstallManagerFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/InstallManagerFactory");
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
2
|
+
import { type IDepsToUpgradeAnswers } from '../utilities/InteractiveUpgradeUI';
|
|
3
|
+
import type { RushConfigurationProject } from '../api/RushConfigurationProject';
|
|
4
|
+
interface IUpgradeInteractiveDeps {
|
|
5
|
+
projects: RushConfigurationProject[];
|
|
6
|
+
depsToUpgrade: IDepsToUpgradeAnswers;
|
|
7
|
+
}
|
|
8
|
+
export declare class InteractiveUpgrader {
|
|
9
|
+
private readonly _rushConfiguration;
|
|
10
|
+
constructor(rushConfiguration: RushConfiguration);
|
|
11
|
+
upgradeAsync(): Promise<IUpgradeInteractiveDeps>;
|
|
12
|
+
private _getUserSelectedDependenciesToUpgradeAsync;
|
|
13
|
+
private _getUserSelectedProjectForUpgradeAsync;
|
|
14
|
+
private _getPackageDependenciesStatusAsync;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=InteractiveUpgrader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/InteractiveUpgrader");
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
2
|
+
import type { BaseLinkManager } from './base/BaseLinkManager';
|
|
3
|
+
export declare class LinkManagerFactory {
|
|
4
|
+
static getLinkManager(rushConfiguration: RushConfiguration): BaseLinkManager;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=LinkManagerFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/LinkManagerFactory");
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/// <reference path="../../src/npm-check-typings.d.ts" />
|
|
2
|
+
import type * as NpmCheck from 'npm-check';
|
|
3
|
+
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
4
|
+
import { DependencyType } from '../api/PackageJsonEditor';
|
|
5
|
+
import type { RushGlobalFolder } from '../api/RushGlobalFolder';
|
|
6
|
+
import type { RushConfigurationProject } from '../api/RushConfigurationProject';
|
|
7
|
+
import type { VersionMismatchFinderEntity } from './versionMismatch/VersionMismatchFinderEntity';
|
|
8
|
+
import { type IPackageJsonUpdaterRushBaseUpdateOptions } from './PackageJsonUpdaterTypes';
|
|
9
|
+
/**
|
|
10
|
+
* Options for adding a dependency to a particular project.
|
|
11
|
+
*/
|
|
12
|
+
export interface IPackageJsonUpdaterRushUpgradeOptions {
|
|
13
|
+
/**
|
|
14
|
+
* The projects whose package.jsons should get updated
|
|
15
|
+
*/
|
|
16
|
+
projects: RushConfigurationProject[];
|
|
17
|
+
/**
|
|
18
|
+
* The dependencies to be added.
|
|
19
|
+
*/
|
|
20
|
+
packagesToAdd: NpmCheck.INpmCheckPackage[];
|
|
21
|
+
/**
|
|
22
|
+
* If specified, other packages that use this dependency will also have their package.json's updated.
|
|
23
|
+
*/
|
|
24
|
+
updateOtherPackages: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* If specified, "rush update" will not be run after updating the package.json file(s).
|
|
27
|
+
*/
|
|
28
|
+
skipUpdate: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* If specified, "rush update" will be run in debug mode.
|
|
31
|
+
*/
|
|
32
|
+
debugInstall: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The variant to consider when performing installations and validating shrinkwrap updates.
|
|
35
|
+
*/
|
|
36
|
+
variant: string | undefined;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Configuration options for adding or updating a dependency in single project
|
|
40
|
+
* or removing a dependency from a particular project
|
|
41
|
+
*/
|
|
42
|
+
export interface IBaseUpdateProjectOptions {
|
|
43
|
+
/**
|
|
44
|
+
* The project which will have its package.json updated
|
|
45
|
+
*/
|
|
46
|
+
project: VersionMismatchFinderEntity;
|
|
47
|
+
/**
|
|
48
|
+
* Map of packages to update
|
|
49
|
+
* Its key is the name of the dependency to be added or updated in the project
|
|
50
|
+
* Its value is the new SemVer specifier that should be added to the project's package.json
|
|
51
|
+
* If trying to remove this packages, value can be empty string
|
|
52
|
+
*/
|
|
53
|
+
dependenciesToAddOrUpdateOrRemove: Record<string, string>;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Configuration options for adding or updating a dependency in a single project
|
|
57
|
+
*/
|
|
58
|
+
export interface IUpdateProjectOptions extends IBaseUpdateProjectOptions {
|
|
59
|
+
/**
|
|
60
|
+
* The type of dependency that should be updated. If left empty, this will be auto-detected.
|
|
61
|
+
* If it cannot be auto-detected an exception will be thrown.
|
|
62
|
+
*/
|
|
63
|
+
dependencyType?: DependencyType;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Configuration options for removing dependencies from a single project
|
|
67
|
+
*/
|
|
68
|
+
export interface IRemoveProjectOptions extends IBaseUpdateProjectOptions {
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* A helper class for managing the dependencies of various package.json files.
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
export declare class PackageJsonUpdater {
|
|
75
|
+
private _rushConfiguration;
|
|
76
|
+
private _rushGlobalFolder;
|
|
77
|
+
private readonly _terminalProvider;
|
|
78
|
+
private readonly _terminal;
|
|
79
|
+
constructor(rushConfiguration: RushConfiguration, rushGlobalFolder: RushGlobalFolder);
|
|
80
|
+
/**
|
|
81
|
+
* Upgrade dependencies to a particular project, or across specified projects. This is the core business logic for
|
|
82
|
+
* "rush upgrade-interactive".
|
|
83
|
+
*/
|
|
84
|
+
doRushUpgradeAsync(options: IPackageJsonUpdaterRushUpgradeOptions): Promise<void>;
|
|
85
|
+
doRushUpdateAsync(options: IPackageJsonUpdaterRushBaseUpdateOptions): Promise<void>;
|
|
86
|
+
private _doUpdateAsync;
|
|
87
|
+
/**
|
|
88
|
+
* Adds a dependency to a particular project. The core business logic for "rush add".
|
|
89
|
+
*/
|
|
90
|
+
private _doRushAddAsync;
|
|
91
|
+
private _updateProjectsAsync;
|
|
92
|
+
private _getUpdates;
|
|
93
|
+
/**
|
|
94
|
+
* Remove a dependency from a particular project. The core business logic for "rush remove".
|
|
95
|
+
*/
|
|
96
|
+
private _doRushRemoveAsync;
|
|
97
|
+
/**
|
|
98
|
+
* Updates several projects' package.json files
|
|
99
|
+
*/
|
|
100
|
+
updateProjects(projectUpdates: IUpdateProjectOptions[]): void;
|
|
101
|
+
/**
|
|
102
|
+
* Updates a single project's package.json file
|
|
103
|
+
*/
|
|
104
|
+
updateProject(options: IUpdateProjectOptions): void;
|
|
105
|
+
removePackageFromProject(options: IRemoveProjectOptions): void;
|
|
106
|
+
/**
|
|
107
|
+
* Selects an appropriate version number for a particular package, given an optional initial SemVer spec.
|
|
108
|
+
* If ensureConsistentVersions, tries to pick a version that will be consistent.
|
|
109
|
+
* Otherwise, will choose the latest semver matching the initialSpec and append the proper range style.
|
|
110
|
+
* @param projects - the projects which will have their package.json's updated
|
|
111
|
+
* @param packageName - the name of the package to be used
|
|
112
|
+
* @param initialSpec - a semver pattern that should be used to find the latest version matching the spec
|
|
113
|
+
* @param implicitlyPreferredVersion - the implicitly preferred (aka common/primary) version of the package in use
|
|
114
|
+
* @param rangeStyle - if this version is selected by querying registry, then this range specifier is prepended to
|
|
115
|
+
* the selected version.
|
|
116
|
+
*/
|
|
117
|
+
private _getNormalizedVersionSpecAsync;
|
|
118
|
+
private _collectAllDownstreamDependencies;
|
|
119
|
+
/**
|
|
120
|
+
* Given a package name, this function returns a {@see RushConfigurationProject} if the package is a project
|
|
121
|
+
* in the local Rush repo and is not marked as cyclic for any of the projects.
|
|
122
|
+
*
|
|
123
|
+
* @remarks
|
|
124
|
+
* This function throws an error if adding the discovered local project as a dependency
|
|
125
|
+
* would create a dependency cycle, or if it would be added to multiple projects.
|
|
126
|
+
*/
|
|
127
|
+
private _tryGetLocalProject;
|
|
128
|
+
private _cheaplyDetectSemVerRangeStyle;
|
|
129
|
+
private _normalizeDepsToUpgrade;
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=PackageJsonUpdater.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/PackageJsonUpdater");
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BasePackage } from './base/BasePackage';
|
|
2
|
+
export declare class PackageLookup {
|
|
3
|
+
private _packageMap;
|
|
4
|
+
constructor();
|
|
5
|
+
loadTree(root: BasePackage): void;
|
|
6
|
+
getPackage(nameAndVersion: string): BasePackage | undefined;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=PackageLookup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/PackageLookup");
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
2
|
+
import { type ITerminal } from '@rushstack/terminal';
|
|
3
|
+
/**
|
|
4
|
+
* Project property configuration
|
|
5
|
+
*/
|
|
6
|
+
export interface IProjectImpactGraphProjectConfiguration {
|
|
7
|
+
includedGlobs: string[];
|
|
8
|
+
excludedGlobs?: string[];
|
|
9
|
+
dependentProjects: string[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The schema of `project-impact-graph.yaml`
|
|
13
|
+
*/
|
|
14
|
+
export interface IProjectImpactGraphFile {
|
|
15
|
+
globalExcludedGlobs: string[];
|
|
16
|
+
projects: Record<string, IProjectImpactGraphProjectConfiguration>;
|
|
17
|
+
}
|
|
18
|
+
export declare class ProjectImpactGraphGenerator {
|
|
19
|
+
private readonly _terminal;
|
|
20
|
+
/**
|
|
21
|
+
* The Rush configuration
|
|
22
|
+
*/
|
|
23
|
+
private readonly _rushConfiguration;
|
|
24
|
+
/**
|
|
25
|
+
* Full path of repository root
|
|
26
|
+
*/
|
|
27
|
+
private readonly _repositoryRoot;
|
|
28
|
+
/**
|
|
29
|
+
* Full path to `project-impact-graph.yaml`
|
|
30
|
+
*/
|
|
31
|
+
private readonly _projectImpactGraphFilePath;
|
|
32
|
+
/**
|
|
33
|
+
* Get repositoryRoot and load projects within the rush.json
|
|
34
|
+
*/
|
|
35
|
+
constructor(terminal: ITerminal, rushConfiguration: RushConfiguration);
|
|
36
|
+
/**
|
|
37
|
+
* Load global excluded globs
|
|
38
|
+
*/
|
|
39
|
+
private _loadGlobalExcludedGlobsAsync;
|
|
40
|
+
/**
|
|
41
|
+
* Load project excluded globs
|
|
42
|
+
* @param projectRootRelativePath - project root relative path
|
|
43
|
+
*/
|
|
44
|
+
private _tryLoadProjectExcludedGlobsAsync;
|
|
45
|
+
/**
|
|
46
|
+
* Core Logic: generate project-impact-graph.yaml
|
|
47
|
+
*/
|
|
48
|
+
generateAsync(): Promise<void>;
|
|
49
|
+
validateAsync(): Promise<boolean>;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=ProjectImpactGraphGenerator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/ProjectImpactGraphGenerator");
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { type ITerminal } from '@rushstack/terminal';
|
|
2
|
+
import type { IInputsSnapshot, GetInputsSnapshotAsyncFn } from './incremental/InputsSnapshot';
|
|
3
|
+
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
4
|
+
import type { RushConfigurationProject } from '../api/RushConfigurationProject';
|
|
5
|
+
export interface IProjectWatcherOptions {
|
|
6
|
+
getInputsSnapshotAsync: GetInputsSnapshotAsyncFn;
|
|
7
|
+
debounceMs?: number;
|
|
8
|
+
rushConfiguration: RushConfiguration;
|
|
9
|
+
projectsToWatch: ReadonlySet<RushConfigurationProject>;
|
|
10
|
+
terminal: ITerminal;
|
|
11
|
+
initialSnapshot?: IInputsSnapshot | undefined;
|
|
12
|
+
}
|
|
13
|
+
export interface IProjectChangeResult {
|
|
14
|
+
/**
|
|
15
|
+
* The set of projects that have changed since the last iteration
|
|
16
|
+
*/
|
|
17
|
+
changedProjects: ReadonlySet<RushConfigurationProject>;
|
|
18
|
+
/**
|
|
19
|
+
* Contains the git hashes for all tracked files in the repo
|
|
20
|
+
*/
|
|
21
|
+
inputsSnapshot: IInputsSnapshot;
|
|
22
|
+
}
|
|
23
|
+
export interface IPromptGeneratorFunction {
|
|
24
|
+
(isPaused: boolean): Iterable<string>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* This class is for incrementally watching a set of projects in the repository for changes.
|
|
28
|
+
*
|
|
29
|
+
* We are manually using fs.watch() instead of `chokidar` because all we want from the file system watcher is a boolean
|
|
30
|
+
* signal indicating that "at least 1 file in a watched project changed". We then defer to getInputsSnapshotAsync (which
|
|
31
|
+
* is responsible for change detection in all incremental builds) to determine what actually chanaged.
|
|
32
|
+
*
|
|
33
|
+
* Calling `waitForChange()` will return a promise that resolves when the package-deps of one or
|
|
34
|
+
* more projects differ from the value the previous time it was invoked. The first time will always resolve with the full selection.
|
|
35
|
+
*/
|
|
36
|
+
export declare class ProjectWatcher {
|
|
37
|
+
private readonly _getInputsSnapshotAsync;
|
|
38
|
+
private readonly _debounceMs;
|
|
39
|
+
private readonly _repoRoot;
|
|
40
|
+
private readonly _rushConfiguration;
|
|
41
|
+
private readonly _projectsToWatch;
|
|
42
|
+
private readonly _terminal;
|
|
43
|
+
private _initialSnapshot;
|
|
44
|
+
private _previousSnapshot;
|
|
45
|
+
private _forceChangedProjects;
|
|
46
|
+
private _resolveIfChanged;
|
|
47
|
+
private _getPromptLines;
|
|
48
|
+
private _renderedStatusLines;
|
|
49
|
+
isPaused: boolean;
|
|
50
|
+
constructor(options: IProjectWatcherOptions);
|
|
51
|
+
pause(): void;
|
|
52
|
+
resume(): void;
|
|
53
|
+
invalidateProject(project: RushConfigurationProject, reason: string): boolean;
|
|
54
|
+
invalidateAll(reason: string): void;
|
|
55
|
+
clearStatus(): void;
|
|
56
|
+
setPromptGenerator(promptGenerator: IPromptGeneratorFunction): void;
|
|
57
|
+
/**
|
|
58
|
+
* Waits for a change to the package-deps of one or more of the selected projects, since the previous invocation.
|
|
59
|
+
* Will return immediately the first time it is invoked, since no state has been recorded.
|
|
60
|
+
* If no change is currently present, watches the source tree of all selected projects for file changes.
|
|
61
|
+
* `waitForChange` is not allowed to be called multiple times concurrently.
|
|
62
|
+
*/
|
|
63
|
+
waitForChangeAsync(onWatchingFiles?: () => void): Promise<IProjectChangeResult>;
|
|
64
|
+
private _setStatus;
|
|
65
|
+
/**
|
|
66
|
+
* Determines which, if any, projects (within the selection) have new hashes for files that are not in .gitignore
|
|
67
|
+
*/
|
|
68
|
+
private _computeChangedAsync;
|
|
69
|
+
private _commitChanges;
|
|
70
|
+
/**
|
|
71
|
+
* Tests for inequality of the passed Maps. Order invariant.
|
|
72
|
+
*
|
|
73
|
+
* @returns `true` if the maps are different, `false` otherwise
|
|
74
|
+
*/
|
|
75
|
+
private static _haveProjectDepsChanged;
|
|
76
|
+
private static _enumeratePathsToWatch;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=ProjectWatcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/ProjectWatcher");
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { RushConfigurationProject } from '../api/RushConfigurationProject';
|
|
2
|
+
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
3
|
+
import type { Subspace } from '../api/Subspace';
|
|
4
|
+
export declare class TempProjectHelper {
|
|
5
|
+
private _rushConfiguration;
|
|
6
|
+
private _subspace;
|
|
7
|
+
constructor(rushConfiguration: RushConfiguration, subspace: Subspace);
|
|
8
|
+
/**
|
|
9
|
+
* Deletes the existing tarball and creates a tarball for the given rush project
|
|
10
|
+
*/
|
|
11
|
+
createTempProjectTarball(rushProject: RushConfigurationProject): void;
|
|
12
|
+
/**
|
|
13
|
+
* Gets the path to the tarball
|
|
14
|
+
* Example: "C:\MyRepo\common\temp\projects\my-project-2.tgz"
|
|
15
|
+
*/
|
|
16
|
+
getTarballFilePath(project: RushConfigurationProject): string;
|
|
17
|
+
getTempProjectFolder(rushProject: RushConfigurationProject): string;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=TempProjectHelper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/TempProjectHelper");
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type IPackageJson } from '@rushstack/node-core-library';
|
|
2
|
+
import { type BumpType } from '../api/VersionPolicy';
|
|
3
|
+
import { ChangeFile } from '../api/ChangeFile';
|
|
4
|
+
import { RushConfiguration } from '../api/RushConfiguration';
|
|
5
|
+
import type { VersionPolicyConfiguration } from '../api/VersionPolicyConfiguration';
|
|
6
|
+
export declare class VersionManager {
|
|
7
|
+
private _rushConfiguration;
|
|
8
|
+
private _userEmail;
|
|
9
|
+
private _versionPolicyConfiguration;
|
|
10
|
+
readonly updatedProjects: Map<string, IPackageJson>;
|
|
11
|
+
readonly changeFiles: Map<string, ChangeFile>;
|
|
12
|
+
constructor(rushConfiguration: RushConfiguration, userEmail: string, versionPolicyConfiguration: VersionPolicyConfiguration);
|
|
13
|
+
/**
|
|
14
|
+
* Ensures project versions follow the provided version policy. If version policy is not
|
|
15
|
+
* provided, all projects will have their version checked according to the associated version policy.
|
|
16
|
+
* package.json files will be updated if needed.
|
|
17
|
+
* This method does not commit changes.
|
|
18
|
+
* @param versionPolicyName -- version policy name
|
|
19
|
+
* @param shouldCommit -- should update files to disk
|
|
20
|
+
* @param force -- update even when project version is higher than policy version.
|
|
21
|
+
*/
|
|
22
|
+
ensure(versionPolicyName?: string, shouldCommit?: boolean, force?: boolean): void;
|
|
23
|
+
/**
|
|
24
|
+
* Bumps versions following version policies.
|
|
25
|
+
*
|
|
26
|
+
* @param lockStepVersionPolicyName - a specified lock step version policy name. Without this value,
|
|
27
|
+
* versions for all lock step policies and all individual policies will be bumped.
|
|
28
|
+
* With this value, only the specified lock step policy will be bumped along with all individual policies.
|
|
29
|
+
* @param bumpType - overrides the default bump type and only works for lock step policy
|
|
30
|
+
* @param identifier - overrides the prerelease identifier and only works for lock step policy
|
|
31
|
+
* @param shouldCommit - whether the changes will be written to disk
|
|
32
|
+
*/
|
|
33
|
+
bumpAsync(lockStepVersionPolicyName?: string, bumpType?: BumpType, identifier?: string, shouldCommit?: boolean): Promise<void>;
|
|
34
|
+
private _ensure;
|
|
35
|
+
private _getManuallyVersionedProjects;
|
|
36
|
+
private _updateVersionsByPolicy;
|
|
37
|
+
private _isPrerelease;
|
|
38
|
+
private _addChangeInfo;
|
|
39
|
+
private _updateDependencies;
|
|
40
|
+
private _updateProjectAllDependencies;
|
|
41
|
+
private _updateProjectDependencies;
|
|
42
|
+
private _shouldTrackDependencyChange;
|
|
43
|
+
private _trackDependencyChange;
|
|
44
|
+
private _addChange;
|
|
45
|
+
private _updatePackageJsonFiles;
|
|
46
|
+
private _createChangeInfo;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=VersionManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/VersionManager");
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type ITerminal } from '@rushstack/terminal';
|
|
2
|
+
import type { AsyncRecycler } from '../../utilities/AsyncRecycler';
|
|
3
|
+
import type { BaseShrinkwrapFile } from './BaseShrinkwrapFile';
|
|
4
|
+
import { type LastInstallFlag } from '../../api/LastInstallFlag';
|
|
5
|
+
import type { PurgeManager } from '../PurgeManager';
|
|
6
|
+
import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
7
|
+
import type { RushGlobalFolder } from '../../api/RushGlobalFolder';
|
|
8
|
+
import type { IInstallManagerOptions } from './BaseInstallManagerTypes';
|
|
9
|
+
import type { Subspace } from '../../api/Subspace';
|
|
10
|
+
import { ProjectImpactGraphGenerator } from '../ProjectImpactGraphGenerator';
|
|
11
|
+
/**
|
|
12
|
+
* Pnpm don't support --ignore-compatibility-db, so use --config.ignoreCompatibilityDb for now.
|
|
13
|
+
*/
|
|
14
|
+
export declare const pnpmIgnoreCompatibilityDbParameter: string;
|
|
15
|
+
/**
|
|
16
|
+
* This class implements common logic between "rush install" and "rush update".
|
|
17
|
+
*/
|
|
18
|
+
export declare abstract class BaseInstallManager {
|
|
19
|
+
private readonly _commonTempLinkFlag;
|
|
20
|
+
private _npmSetupValidated;
|
|
21
|
+
private _syncNpmrcAlreadyCalled;
|
|
22
|
+
protected readonly _terminal: ITerminal;
|
|
23
|
+
protected readonly rushConfiguration: RushConfiguration;
|
|
24
|
+
protected readonly rushGlobalFolder: RushGlobalFolder;
|
|
25
|
+
protected readonly installRecycler: AsyncRecycler;
|
|
26
|
+
protected readonly options: IInstallManagerOptions;
|
|
27
|
+
protected readonly subspaceInstallFlags: Map<string, LastInstallFlag>;
|
|
28
|
+
constructor(rushConfiguration: RushConfiguration, rushGlobalFolder: RushGlobalFolder, purgeManager: PurgeManager, options: IInstallManagerOptions);
|
|
29
|
+
doInstallAsync(): Promise<void>;
|
|
30
|
+
protected abstract prepareCommonTempAsync(subspace: Subspace, shrinkwrapFile: BaseShrinkwrapFile | undefined): Promise<{
|
|
31
|
+
shrinkwrapIsUpToDate: boolean;
|
|
32
|
+
shrinkwrapWarnings: string[];
|
|
33
|
+
}>;
|
|
34
|
+
protected abstract installAsync(cleanInstall: boolean, subspace: Subspace): Promise<void>;
|
|
35
|
+
protected abstract postInstallAsync(subspace: Subspace): Promise<void>;
|
|
36
|
+
protected canSkipInstallAsync(lastModifiedDate: Date, subspace: Subspace, variant: string | undefined): Promise<boolean>;
|
|
37
|
+
protected prepareAsync(subspace: Subspace, variant: string | undefined, projectImpactGraphGenerator: ProjectImpactGraphGenerator | undefined): Promise<{
|
|
38
|
+
shrinkwrapIsUpToDate: boolean;
|
|
39
|
+
npmrcHash: string | undefined;
|
|
40
|
+
projectImpactGraphIsUpToDate: boolean;
|
|
41
|
+
variantIsUpToDate: boolean;
|
|
42
|
+
}>;
|
|
43
|
+
/**
|
|
44
|
+
* Git hooks are only installed if the repo opts in by including files in /common/git-hooks
|
|
45
|
+
*/
|
|
46
|
+
private _installGitHooksAsync;
|
|
47
|
+
/**
|
|
48
|
+
* Used when invoking the NPM tool. Appends the common configuration options
|
|
49
|
+
* to the command-line.
|
|
50
|
+
*/
|
|
51
|
+
protected pushConfigurationArgs(args: string[], options: IInstallManagerOptions, subspace: Subspace): void;
|
|
52
|
+
private _checkIfReleaseIsPublishedAsync;
|
|
53
|
+
private _queryIfReleaseIsPublishedAsync;
|
|
54
|
+
private _syncTempShrinkwrap;
|
|
55
|
+
protected validateNpmSetupAsync(): Promise<void>;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=BaseInstallManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/base/BaseInstallManager");
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type IFileSystemCreateLinkOptions } from '@rushstack/node-core-library';
|
|
2
|
+
import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
3
|
+
import type { BasePackage } from './BasePackage';
|
|
4
|
+
export declare enum SymlinkKind {
|
|
5
|
+
File = 0,
|
|
6
|
+
Directory = 1
|
|
7
|
+
}
|
|
8
|
+
export interface IBaseLinkManagerCreateSymlinkOptions extends IFileSystemCreateLinkOptions {
|
|
9
|
+
symlinkKind: SymlinkKind;
|
|
10
|
+
}
|
|
11
|
+
export declare abstract class BaseLinkManager {
|
|
12
|
+
protected _rushConfiguration: RushConfiguration;
|
|
13
|
+
constructor(rushConfiguration: RushConfiguration);
|
|
14
|
+
static _createSymlink(options: IBaseLinkManagerCreateSymlinkOptions): void;
|
|
15
|
+
/**
|
|
16
|
+
* For a Package object that represents a top-level Rush project folder
|
|
17
|
+
* (i.e. with source code that we will be building), this clears out its
|
|
18
|
+
* node_modules folder and then recursively creates all the symlinked folders.
|
|
19
|
+
*/
|
|
20
|
+
protected static _createSymlinksForTopLevelProject(localPackage: BasePackage): void;
|
|
21
|
+
/**
|
|
22
|
+
* This is a helper function used by createSymlinksForTopLevelProject().
|
|
23
|
+
* It will recursively creates symlinked folders corresponding to each of the
|
|
24
|
+
* Package objects in the provided tree.
|
|
25
|
+
*/
|
|
26
|
+
private static _createSymlinksForDependencies;
|
|
27
|
+
/**
|
|
28
|
+
* Creates node_modules symlinks for all Rush projects defined in the RushConfiguration.
|
|
29
|
+
* @param force - Normally the operation will be skipped if the links are already up to date;
|
|
30
|
+
* if true, this option forces the links to be recreated.
|
|
31
|
+
*/
|
|
32
|
+
createSymlinksForProjectsAsync(force: boolean): Promise<void>;
|
|
33
|
+
protected abstract _linkProjectsAsync(): Promise<void>;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=BaseLinkManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/base/BaseLinkManager");
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { type IPackageJson } from '@rushstack/node-core-library';
|
|
2
|
+
/**
|
|
3
|
+
* The type of dependency; used by IPackageDependency.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum PackageDependencyKind {
|
|
6
|
+
Normal = 0,
|
|
7
|
+
/**
|
|
8
|
+
* The dependency was listed in the optionalDependencies section of package.json.
|
|
9
|
+
*/
|
|
10
|
+
Optional = 1,
|
|
11
|
+
/**
|
|
12
|
+
* The dependency should be a symlink to a project that is locally built by Rush..
|
|
13
|
+
*/
|
|
14
|
+
LocalLink = 2
|
|
15
|
+
}
|
|
16
|
+
export interface IPackageDependency {
|
|
17
|
+
/**
|
|
18
|
+
* The name of the dependency
|
|
19
|
+
*/
|
|
20
|
+
name: string;
|
|
21
|
+
/**
|
|
22
|
+
* The requested version, which may be a pattern such as "^1.2.3"
|
|
23
|
+
*/
|
|
24
|
+
versionRange: string;
|
|
25
|
+
/**
|
|
26
|
+
* The kind of dependency
|
|
27
|
+
*/
|
|
28
|
+
kind: PackageDependencyKind;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Represents a "@rush-temp" scoped package, which has our additional custom field
|
|
32
|
+
* for tracking the dependency graph.
|
|
33
|
+
*/
|
|
34
|
+
export interface IRushTempPackageJson extends IPackageJson {
|
|
35
|
+
/**
|
|
36
|
+
* An extra setting written into package.json for temp packages, to track
|
|
37
|
+
* references to locally built projects.
|
|
38
|
+
*/
|
|
39
|
+
rushDependencies?: {
|
|
40
|
+
[key: string]: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Represents an NPM package being processed by the linking algorithm.
|
|
45
|
+
*/
|
|
46
|
+
export declare class BasePackage {
|
|
47
|
+
/**
|
|
48
|
+
* The "name" field from package.json
|
|
49
|
+
*/
|
|
50
|
+
name: string;
|
|
51
|
+
/**
|
|
52
|
+
* The package.json name can differ from the installation folder name, in the case of an NPM package alias
|
|
53
|
+
* such as this:
|
|
54
|
+
*
|
|
55
|
+
* ```
|
|
56
|
+
* "dependencies": {
|
|
57
|
+
* "@alias-scope/alias-name": "npm:target-name@^1.2.3"
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* In this case the folder will be `node_modules/@alias-scope/alias-name`
|
|
62
|
+
* instead of `node_modules/target-name`.
|
|
63
|
+
*/
|
|
64
|
+
installedName: string;
|
|
65
|
+
/**
|
|
66
|
+
* The "version" field from package.json. This is expensive to read
|
|
67
|
+
* because we have to open the package.json file. Only when DEBUG=true
|
|
68
|
+
*/
|
|
69
|
+
version: string | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* The absolute path to the folder that contains package.json.
|
|
72
|
+
*/
|
|
73
|
+
folderPath: string;
|
|
74
|
+
/**
|
|
75
|
+
* The parent package, or undefined if this is the root of the tree.
|
|
76
|
+
*/
|
|
77
|
+
parent: BasePackage | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* The raw package.json information for this Package
|
|
80
|
+
*/
|
|
81
|
+
packageJson: IRushTempPackageJson | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* If this is a local path that we are planning to symlink to a target folder,
|
|
84
|
+
* then symlinkTargetFolderPath keeps track of the intended target.
|
|
85
|
+
*/
|
|
86
|
+
symlinkTargetFolderPath: string | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Packages that were placed in node_modules subfolders of this package.
|
|
89
|
+
* The child packages are not necessarily dependencies of this package.
|
|
90
|
+
*/
|
|
91
|
+
children: BasePackage[];
|
|
92
|
+
private _childrenByName;
|
|
93
|
+
protected constructor(name: string, version: string | undefined, folderPath: string, packageJson: IRushTempPackageJson | undefined);
|
|
94
|
+
/**
|
|
95
|
+
* Used by link managers, creates a virtual Package object that represents symbolic links
|
|
96
|
+
* which will be created later
|
|
97
|
+
*/
|
|
98
|
+
static createLinkedPackage(name: string, version: string | undefined, folderPath: string, packageJson?: IRushTempPackageJson): BasePackage;
|
|
99
|
+
/**
|
|
100
|
+
* Used by "npm link" to simulate a temp project that is missing from the common/node_modules
|
|
101
|
+
* folder (e.g. because it was added after the shrinkwrap file was regenerated).
|
|
102
|
+
* @param packageJsonFilename - Filename of the source package.json
|
|
103
|
+
* Example: `C:\MyRepo\common\temp\projects\project1\package.json`
|
|
104
|
+
* @param targetFolderName - Filename where it should have been installed
|
|
105
|
+
* Example: `C:\MyRepo\common\temp\node_modules\@rush-temp\project1`
|
|
106
|
+
*/
|
|
107
|
+
static createVirtualTempPackage(packageJsonFilename: string, installFolderName: string): BasePackage;
|
|
108
|
+
get nameAndVersion(): string;
|
|
109
|
+
addChild<T extends BasePackage>(child: T): void;
|
|
110
|
+
getChildByName(childPackageName: string): BasePackage | undefined;
|
|
111
|
+
printTree(indent?: string): void;
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=BasePackage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/base/BasePackage");
|