Skip to content

Commit f681fd1

Browse files
author
Nick Pape
committed
PR Feedback
1 parent 540904f commit f681fd1

3 files changed

Lines changed: 12 additions & 10 deletions

File tree

‎apps/rush-lib/src/cli/utilities/pnpm/PnpmShrinkwrapFile.ts‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ interface IShrinkwrapDependencyJson {
1212
dependencies: { [dependency: string]: string };
1313
}
1414

15-
interface IShrinkwrapJson {
15+
/**
16+
* This interface represents the raw shrinkwrap.YAML file
17+
*/
18+
interface IShrinkwrapYaml {
1619
/** The list of resolved direct dependencies */
1720
dependencies: { [dependency: string]: string };
1821
/** The description of the solved DAG */
@@ -25,7 +28,7 @@ interface IShrinkwrapJson {
2528
}
2629

2730
export default class PnpmShrinkwrapFile extends ShrinkwrapFile {
28-
private _shrinkwrapJson: IShrinkwrapJson;
31+
private _shrinkwrapJson: IShrinkwrapYaml;
2932

3033
public static loadFromFile(shrinkwrapYamlFilename: string): ShrinkwrapFile | undefined {
3134
try {
@@ -35,7 +38,7 @@ export default class PnpmShrinkwrapFile extends ShrinkwrapFile {
3538

3639
// We don't use JsonFile/jju here because shrinkwrap.json is a special NPM file format
3740
// and typically very large, so we want to load it the same way that NPM does.
38-
const parsedData: IShrinkwrapJson = yaml.safeLoad(fsx.readFileSync(shrinkwrapYamlFilename).toString());
41+
const parsedData: IShrinkwrapYaml = yaml.safeLoad(fsx.readFileSync(shrinkwrapYamlFilename).toString());
3942

4043
return new PnpmShrinkwrapFile(parsedData);
4144
} catch (error) {
@@ -68,7 +71,7 @@ export default class PnpmShrinkwrapFile extends ShrinkwrapFile {
6871
return dependencyVersion;
6972
}
7073

71-
private constructor(shrinkwrapJson: IShrinkwrapJson) {
74+
private constructor(shrinkwrapJson: IShrinkwrapYaml) {
7275
super();
7376
this._shrinkwrapJson = shrinkwrapJson;
7477

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
// DO NOT ADD COMMENTS IN THIS FILE. They will be lost when the Rush tool resaves it.
22
{
3-
"packages": [
4-
{
5-
"name": "encode-registry",
6-
"allowedCategories": [ "libraries" ]
7-
}
8-
]
3+
"packages": []
94
}

‎common/config/rush/nonbrowser-approved-packages.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@
105105
"name": "del",
106106
"allowedCategories": [ "libraries" ]
107107
},
108+
{
109+
"name": "encode-registry",
110+
"allowedCategories": [ "libraries" ]
111+
},
108112
{
109113
"name": "end-of-stream",
110114
"allowedCategories": [ "libraries" ]

0 commit comments

Comments
 (0)