Skip to content

Commit 7aa45f3

Browse files
author
Nicholas Pape
authored
Add an api on CommonVersionsConfiguration to get the filepath (microsoft#777)
* Add extra API to common-versions so we dont have toimoirt the filname * Add a changefile * Change the API
1 parent 2249209 commit 7aa45f3

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

‎apps/rush-lib/src/api/CommonVersionsConfiguration.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ export class CommonVersionsConfiguration {
9393
return table;
9494
}
9595

96+
/**
97+
* Get the absolute file path of the common-versions.json file.
98+
*/
99+
public get filepath(): string {
100+
return this._filename;
101+
}
102+
96103
/**
97104
* Writes the "common-versions.json" file to disk, using the filename that was passed to loadFromFile().
98105
*/
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"comment": "git st",
5+
"packageName": "@microsoft/rush",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@microsoft/rush",
10+
"email": ""
11+
}

‎common/reviews/api/rush-lib.api.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ class ChangeManager {
6464
// @public
6565
class CommonVersionsConfiguration {
6666
readonly allowedAlternativeVersions: Map<string, ReadonlyArray<string>>;
67+
readonly filepath: string;
6768
getAllPreferredVersions(): Map<string, string>;
6869
static loadFromFile(jsonFilename: string): CommonVersionsConfiguration;
6970
readonly preferredVersions: Map<string, string>;

0 commit comments

Comments
 (0)