File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -91,22 +91,20 @@ export async function result(
9191 const data = await response . json ( ) as any ;
9292 formattedRepository = data . full_name ;
9393 }
94- catch {
94+ catch ( error ) {
9595 if ( ! resolveOnNpmRegistry ) {
96- throw new Error ( "Invalid repository, cannot find it on GitHub" ) ;
96+ throw new Error ( "Invalid repository, cannot find it on GitHub" , {
97+ cause : error
98+ } ) ;
9799 }
98100
99- let failed = false ;
100-
101101 try {
102102 formattedRepository = await getNpmRepository ( repository ) ;
103103 }
104- catch {
105- failed = true ;
106- }
107-
108- if ( failed ) {
109- throw new Error ( "Invalid repository, cannot find it on GitHub or NPM registry" ) ;
104+ catch ( error ) {
105+ throw new Error ( "Invalid repository, cannot find it on GitHub or NPM registry" , {
106+ cause : error
107+ } ) ;
110108 }
111109 }
112110
Original file line number Diff line number Diff line change 22 "compilerOptions" : {
33 "declaration" : true ,
44 "strictNullChecks" : true ,
5- "target" : " ES2020 " ,
5+ "target" : " ES2022 " ,
66 "outDir" : " dist" ,
7- "module" : " ES2020 " ,
7+ "module" : " ES2022 " ,
88 "moduleResolution" : " node" ,
99 "esModuleInterop" : true ,
1010 "resolveJsonModule" : true ,
You can’t perform that action at this time.
0 commit comments