@@ -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
2730export 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
0 commit comments