@@ -211,21 +211,21 @@ async function getLatestReleaseMetadata(context: ExtensionContext, storagePath:
211
211
: undefined ;
212
212
const opts : https . RequestOptions = releasesUrl
213
213
? {
214
- host : releasesUrl . host ,
215
- path : releasesUrl . path ,
216
- }
214
+ host : releasesUrl . host ,
215
+ path : releasesUrl . path ,
216
+ }
217
217
: {
218
- host : 'api.github.com' ,
219
- path : '/repos/haskell/haskell-language-server/releases' ,
220
- } ;
218
+ host : 'api.github.com' ,
219
+ path : '/repos/haskell/haskell-language-server/releases' ,
220
+ } ;
221
221
222
222
const offlineCache = path . join ( storagePath , 'latestApprovedRelease.cache.json' ) ;
223
223
224
224
async function readCachedReleaseData ( ) : Promise < IRelease | null > {
225
225
try {
226
226
const cachedInfo = await promisify ( fs . readFile ) ( offlineCache , { encoding : 'utf-8' } ) ;
227
227
return validate . parseAndValidate ( cachedInfo , cachedReleaseValidator ) ;
228
- } catch ( err ) {
228
+ } catch ( err : any ) {
229
229
// If file doesn't exist, return null, otherwise consider it a failure
230
230
if ( err . code === 'ENOENT' ) {
231
231
return null ;
@@ -268,7 +268,7 @@ async function getLatestReleaseMetadata(context: ExtensionContext, storagePath:
268
268
// Cache the latest successfully fetched release information
269
269
await promisify ( fs . writeFile ) ( offlineCache , JSON . stringify ( latestInfoParsed ) , { encoding : 'utf-8' } ) ;
270
270
return latestInfoParsed ;
271
- } catch ( githubError ) {
271
+ } catch ( githubError : any ) {
272
272
// Attempt to read from the latest cached file
273
273
try {
274
274
const cachedInfoParsed = await readCachedReleaseData ( ) ;
0 commit comments