@@ -812,9 +812,10 @@ fn name_without_path(name: &str) -> &str {
812
812
}
813
813
}
814
814
815
- #[ derive( Debug , Error ) ]
815
+ #[ derive( Debug , Error , Clone , JsError ) ]
816
816
pub enum IncompleteSnapshotFromLockfileError {
817
817
#[ error( transparent) ]
818
+ #[ class( inherit) ]
818
819
PackageIdDeserialization ( #[ from] NpmPackageIdDeserializationError ) ,
819
820
}
820
821
@@ -884,7 +885,8 @@ pub fn incomplete_snapshot_from_lockfile(
884
885
} )
885
886
}
886
887
887
- #[ derive( Debug , Clone , Error ) ]
888
+ #[ derive( Debug , Clone , Error , JsError ) ]
889
+ #[ class( type ) ]
888
890
#[ error( "Integrity check failed for package: \" {package_display_id}\" . Unable to verify that the package
889
891
is the same as when the lockfile was generated.
890
892
@@ -904,18 +906,22 @@ pub struct IntegrityCheckFailedError {
904
906
pub filename : String ,
905
907
}
906
908
907
- #[ derive( Debug , Error , Clone ) ]
909
+ #[ derive( Debug , Error , Clone , JsError ) ]
908
910
pub enum SnapshotFromLockfileError {
909
911
#[ error( transparent) ]
912
+ #[ class( inherit) ]
910
913
PackageInfoLoad ( #[ from] NpmRegistryPackageInfoLoadError ) ,
911
914
#[ error( "Could not find '{}' specified in the lockfile." , . source. 0 ) ]
915
+ #[ class( inherit) ]
912
916
VersionNotFound {
913
917
#[ from]
914
918
source : NpmPackageVersionNotFound ,
915
919
} ,
916
920
#[ error( "The lockfile is corrupt. Remove the lockfile to regenerate it." ) ]
921
+ #[ class( inherit) ]
917
922
PackageIdNotFound ( #[ from] PackageIdNotFoundError ) ,
918
923
#[ error( transparent) ]
924
+ #[ class( inherit) ]
919
925
IntegrityCheckFailed ( #[ from] IntegrityCheckFailedError ) ,
920
926
}
921
927
0 commit comments