@rushstack/rush-sdk 5.131.0 → 5.131.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/dist/rush-lib.d.ts +4 -119
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/api/RushConfiguration.d.ts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib-shim/index.js +1995 -119
- package/lib-shim/index.js.map +1 -1
- package/lib-shim/loader.js +299 -174
- package/lib-shim/loader.js.map +1 -1
- package/package.json +5 -4
- package/lib/logic/LookupByPath.d.ts +0 -120
- package/lib/logic/LookupByPath.js +0 -1
- package/lib-commonjs/generate-stubs.d.ts +0 -2
- package/lib-commonjs/generate-stubs.d.ts.map +0 -1
- package/lib-commonjs/generate-stubs.js +0 -84
- package/lib-commonjs/generate-stubs.js.map +0 -1
- package/lib-commonjs/helpers.d.ts +0 -21
- package/lib-commonjs/helpers.d.ts.map +0 -1
- package/lib-commonjs/helpers.js +0 -83
- package/lib-commonjs/helpers.js.map +0 -1
- package/lib-commonjs/index.d.ts +0 -5
- package/lib-commonjs/index.d.ts.map +0 -1
- package/lib-commonjs/index.js +0 -207
- package/lib-commonjs/index.js.map +0 -1
- package/lib-commonjs/loader.d.ts +0 -86
- package/lib-commonjs/loader.d.ts.map +0 -1
- package/lib-commonjs/loader.js +0 -192
- package/lib-commonjs/loader.js.map +0 -1
- package/lib-esnext/generate-stubs.js +0 -57
- package/lib-esnext/generate-stubs.js.map +0 -1
- package/lib-esnext/helpers.js +0 -54
- package/lib-esnext/helpers.js.map +0 -1
- package/lib-esnext/index.js +0 -180
- package/lib-esnext/index.js.map +0 -1
- package/lib-esnext/loader.js +0 -165
- package/lib-esnext/loader.js.map +0 -1
- package/lib-shim/commons.js +0 -2200
- package/lib-shim/commons.js.map +0 -1
package/dist/rush-lib.d.ts
CHANGED
|
@@ -14,9 +14,11 @@ import type { CommandLineParameter } from '@rushstack/ts-command-line';
|
|
|
14
14
|
import { CommandLineParameterKind } from '@rushstack/ts-command-line';
|
|
15
15
|
import { HookMap } from 'tapable';
|
|
16
16
|
import { IPackageJson } from '@rushstack/node-core-library';
|
|
17
|
+
import { IPrefixMatch } from '@rushstack/lookup-by-path';
|
|
17
18
|
import { ITerminal } from '@rushstack/terminal';
|
|
18
19
|
import { ITerminalProvider } from '@rushstack/terminal';
|
|
19
20
|
import { JsonObject } from '@rushstack/node-core-library';
|
|
21
|
+
import { LookupByPath } from '@rushstack/lookup-by-path';
|
|
20
22
|
import { PackageNameParser } from '@rushstack/node-core-library';
|
|
21
23
|
import type { StdioSummarizer } from '@rushstack/terminal';
|
|
22
24
|
import { SyncHook } from 'tapable';
|
|
@@ -2059,15 +2061,7 @@ export declare interface IPnpmPeerDependencyRules {
|
|
|
2059
2061
|
allowedVersions?: Record<string, string>;
|
|
2060
2062
|
}
|
|
2061
2063
|
|
|
2062
|
-
|
|
2063
|
-
* Object containing both the matched item and the start index of the remainder of the query.
|
|
2064
|
-
*
|
|
2065
|
-
* @beta
|
|
2066
|
-
*/
|
|
2067
|
-
export declare interface IPrefixMatch<TItem> {
|
|
2068
|
-
value: TItem;
|
|
2069
|
-
index: number;
|
|
2070
|
-
}
|
|
2064
|
+
export { IPrefixMatch }
|
|
2071
2065
|
|
|
2072
2066
|
/**
|
|
2073
2067
|
* @internal
|
|
@@ -2590,116 +2584,7 @@ export declare class LockStepVersionPolicy extends VersionPolicy {
|
|
|
2590
2584
|
private _getReleaseType;
|
|
2591
2585
|
}
|
|
2592
2586
|
|
|
2593
|
-
|
|
2594
|
-
* This class is used to associate POSIX relative paths, such as those returned by `git` commands,
|
|
2595
|
-
* with entities that correspond with ancestor folders, such as Rush Projects.
|
|
2596
|
-
*
|
|
2597
|
-
* It is optimized for efficiently locating the nearest ancestor path with an associated value.
|
|
2598
|
-
*
|
|
2599
|
-
* @example
|
|
2600
|
-
* ```ts
|
|
2601
|
-
* const tree = new LookupByPath([['foo', 1], ['bar', 2], ['foo/bar', 3]]);
|
|
2602
|
-
* tree.findChildPath('foo'); // returns 1
|
|
2603
|
-
* tree.findChildPath('foo/baz'); // returns 1
|
|
2604
|
-
* tree.findChildPath('baz'); // returns undefined
|
|
2605
|
-
* tree.findChildPath('foo/bar/baz'); returns 3
|
|
2606
|
-
* tree.findChildPath('bar/foo/bar'); returns 2
|
|
2607
|
-
* ```
|
|
2608
|
-
* @beta
|
|
2609
|
-
*/
|
|
2610
|
-
export declare class LookupByPath<TItem> {
|
|
2611
|
-
/**
|
|
2612
|
-
* The delimiter used to split paths
|
|
2613
|
-
*/
|
|
2614
|
-
readonly delimiter: string;
|
|
2615
|
-
/**
|
|
2616
|
-
* The root node of the tree, corresponding to the path ''
|
|
2617
|
-
*/
|
|
2618
|
-
private readonly _root;
|
|
2619
|
-
/**
|
|
2620
|
-
* Constructs a new `LookupByPath`
|
|
2621
|
-
*
|
|
2622
|
-
* @param entries - Initial path-value pairs to populate the tree.
|
|
2623
|
-
*/
|
|
2624
|
-
constructor(entries?: Iterable<[string, TItem]>, delimiter?: string);
|
|
2625
|
-
/**
|
|
2626
|
-
* Iterates over the segments of a serialized path.
|
|
2627
|
-
*
|
|
2628
|
-
* @example
|
|
2629
|
-
*
|
|
2630
|
-
* `LookupByPath.iteratePathSegments('foo/bar/baz')` yields 'foo', 'bar', 'baz'
|
|
2631
|
-
*
|
|
2632
|
-
* `LookupByPath.iteratePathSegments('foo\\bar\\baz', '\\')` yields 'foo', 'bar', 'baz'
|
|
2633
|
-
*/
|
|
2634
|
-
static iteratePathSegments(serializedPath: string, delimiter?: string): Iterable<string>;
|
|
2635
|
-
private static _iteratePrefixes;
|
|
2636
|
-
/**
|
|
2637
|
-
* Associates the value with the specified serialized path.
|
|
2638
|
-
* If a value is already associated, will overwrite.
|
|
2639
|
-
*
|
|
2640
|
-
* @returns this, for chained calls
|
|
2641
|
-
*/
|
|
2642
|
-
setItem(serializedPath: string, value: TItem): this;
|
|
2643
|
-
/**
|
|
2644
|
-
* Associates the value with the specified path.
|
|
2645
|
-
* If a value is already associated, will overwrite.
|
|
2646
|
-
*
|
|
2647
|
-
* @returns this, for chained calls
|
|
2648
|
-
*/
|
|
2649
|
-
setItemFromSegments(pathSegments: Iterable<string>, value: TItem): this;
|
|
2650
|
-
/**
|
|
2651
|
-
* Searches for the item associated with `childPath`, or the nearest ancestor of that path that
|
|
2652
|
-
* has an associated item.
|
|
2653
|
-
*
|
|
2654
|
-
* @returns the found item, or `undefined` if no item was found
|
|
2655
|
-
*
|
|
2656
|
-
* @example
|
|
2657
|
-
* ```ts
|
|
2658
|
-
* const tree = new LookupByPath([['foo', 1], ['foo/bar', 2]]);
|
|
2659
|
-
* tree.findChildPath('foo/baz'); // returns 1
|
|
2660
|
-
* tree.findChildPath('foo/bar/baz'); // returns 2
|
|
2661
|
-
* ```
|
|
2662
|
-
*/
|
|
2663
|
-
findChildPath(childPath: string): TItem | undefined;
|
|
2664
|
-
/**
|
|
2665
|
-
* Searches for the item for which the recorded prefix is the longest matching prefix of `query`.
|
|
2666
|
-
* Obtains both the item and the length of the matched prefix, so that the remainder of the path can be
|
|
2667
|
-
* extracted.
|
|
2668
|
-
*
|
|
2669
|
-
* @returns the found item and the length of the matched prefix, or `undefined` if no item was found
|
|
2670
|
-
*
|
|
2671
|
-
* @example
|
|
2672
|
-
* ```ts
|
|
2673
|
-
* const tree = new LookupByPath([['foo', 1], ['foo/bar', 2]]);
|
|
2674
|
-
* tree.findLongestPrefixMatch('foo/baz'); // returns { item: 1, index: 3 }
|
|
2675
|
-
* tree.findLongestPrefixMatch('foo/bar/baz'); // returns { item: 2, index: 7 }
|
|
2676
|
-
* ```
|
|
2677
|
-
*/
|
|
2678
|
-
findLongestPrefixMatch(query: string): IPrefixMatch<TItem> | undefined;
|
|
2679
|
-
/**
|
|
2680
|
-
* Searches for the item associated with `childPathSegments`, or the nearest ancestor of that path that
|
|
2681
|
-
* has an associated item.
|
|
2682
|
-
*
|
|
2683
|
-
* @returns the found item, or `undefined` if no item was found
|
|
2684
|
-
*
|
|
2685
|
-
* @example
|
|
2686
|
-
* ```ts
|
|
2687
|
-
* const tree = new LookupByPath([['foo', 1], ['foo/bar', 2]]);
|
|
2688
|
-
* tree.findChildPathFromSegments(['foo', 'baz']); // returns 1
|
|
2689
|
-
* tree.findChildPathFromSegments(['foo','bar', 'baz']); // returns 2
|
|
2690
|
-
* ```
|
|
2691
|
-
*/
|
|
2692
|
-
findChildPathFromSegments(childPathSegments: Iterable<string>): TItem | undefined;
|
|
2693
|
-
/**
|
|
2694
|
-
* Iterates through progressively longer prefixes of a given string and returns as soon
|
|
2695
|
-
* as the number of candidate items that match the prefix are 1 or 0.
|
|
2696
|
-
*
|
|
2697
|
-
* If a match is present, returns the matched itme and the length of the matched prefix.
|
|
2698
|
-
*
|
|
2699
|
-
* @returns the found item, or `undefined` if no item was found
|
|
2700
|
-
*/
|
|
2701
|
-
private _findLongestPrefixMatch;
|
|
2702
|
-
}
|
|
2587
|
+
export { LookupByPath }
|
|
2703
2588
|
|
|
2704
2589
|
/**
|
|
2705
2590
|
* Options that are only used when the NPM package manager is selected.
|
package/dist/tsdoc-metadata.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type PackageNameParser } from '@rushstack/node-core-library';
|
|
2
|
+
import { LookupByPath } from '@rushstack/lookup-by-path';
|
|
2
3
|
import { RushConfigurationProject, type IRushConfigurationProjectJson } from './RushConfigurationProject';
|
|
3
4
|
import { ApprovedPackagesPolicy } from './ApprovedPackagesPolicy';
|
|
4
5
|
import { EventHooks } from './EventHooks';
|
|
@@ -7,7 +8,6 @@ import type { CommonVersionsConfiguration } from './CommonVersionsConfiguration'
|
|
|
7
8
|
import type { PackageManagerName, PackageManager } from './packageManager/PackageManager';
|
|
8
9
|
import { ExperimentsConfiguration } from './ExperimentsConfiguration';
|
|
9
10
|
import type { RepoStateFile } from '../logic/RepoStateFile';
|
|
10
|
-
import { LookupByPath } from '../logic/LookupByPath';
|
|
11
11
|
import { RushPluginsConfiguration } from './RushPluginsConfiguration';
|
|
12
12
|
import { type IPnpmOptionsJson, PnpmOptionsConfiguration } from '../logic/pnpm/PnpmOptionsConfiguration';
|
|
13
13
|
import { type INpmOptionsJson, NpmOptionsConfiguration } from '../logic/npm/NpmOptionsConfiguration';
|
package/lib/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* A library for writing scripts that interact with the {@link https://rushjs.io/ | Rush} tool.
|
|
3
3
|
* @packageDocumentation
|
|
4
4
|
*/
|
|
5
|
+
export { LookupByPath as LookupByPath, type IPrefixMatch } from '@rushstack/lookup-by-path';
|
|
5
6
|
export { ApprovedPackagesPolicy } from './api/ApprovedPackagesPolicy';
|
|
6
7
|
export { RushConfiguration, type ITryFindRushJsonLocationOptions } from './api/RushConfiguration';
|
|
7
8
|
export { Subspace } from './api/Subspace';
|
|
@@ -26,7 +27,6 @@ export { ApprovedPackagesItem, ApprovedPackagesConfiguration } from './api/Appro
|
|
|
26
27
|
export { CommonVersionsConfiguration } from './api/CommonVersionsConfiguration';
|
|
27
28
|
export { PackageJsonEditor, PackageJsonDependency, DependencyType, PackageJsonDependencyMeta } from './api/PackageJsonEditor';
|
|
28
29
|
export { RepoStateFile } from './logic/RepoStateFile';
|
|
29
|
-
export { LookupByPath, type IPrefixMatch } from './logic/LookupByPath';
|
|
30
30
|
export { EventHooks, Event } from './api/EventHooks';
|
|
31
31
|
export { ChangeManager } from './api/ChangeManager';
|
|
32
32
|
export { FlagFile as _FlagFile } from './api/FlagFile';
|