File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -716,8 +716,9 @@ pub trait DenoJsonCache {
716
716
717
717
#[ derive( Debug , Error , JsError ) ]
718
718
#[ class( type ) ]
719
- #[ error( "compilerOptions should be an object" ) ]
719
+ #[ error( "compilerOptions should be an object in '{specifier}' " ) ]
720
720
pub struct CompilerOptionsParseError {
721
+ specifier : Url ,
721
722
#[ source]
722
723
source : serde_json:: Error ,
723
724
}
@@ -1049,8 +1050,12 @@ impl ConfigFile {
1049
1050
) -> Result < ParsedTsConfigOptions , CompilerOptionsParseError > {
1050
1051
if let Some ( compiler_options) = self . json . compiler_options . clone ( ) {
1051
1052
let options: serde_json:: Map < String , Value > =
1052
- serde_json:: from_value ( compiler_options)
1053
- . map_err ( |source| CompilerOptionsParseError { source } ) ?;
1053
+ serde_json:: from_value ( compiler_options) . map_err ( |source| {
1054
+ CompilerOptionsParseError {
1055
+ specifier : self . specifier . clone ( ) ,
1056
+ source,
1057
+ }
1058
+ } ) ?;
1054
1059
Ok ( parse_compiler_options ( options, Some ( & self . specifier ) ) )
1055
1060
} else {
1056
1061
Ok ( Default :: default ( ) )
You can’t perform that action at this time.
0 commit comments